tplus-components-touch 3.54.11 → 3.55.3
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/components/billSearch/index.js +20 -10
- package/dist/components/billSearch/index.js.map +1 -1
- package/dist/components/commonForm/inputNumber/index.js +2 -17
- package/dist/components/commonForm/inputNumber/index.js.map +1 -1
- package/dist/components/hotKey/localConfig.js +0 -39
- package/dist/components/hotKey/localConfig.js.map +1 -1
- package/dist/components/inventorySearch/tab.js +14 -12
- package/dist/components/inventorySearch/tab.js.map +1 -1
- package/dist/components/keyboard/numkeyboardPassword.js +0 -31
- package/dist/components/keyboard/numkeyboardPassword.js.map +1 -1
- package/dist/components/message/index.js +11 -3
- package/dist/components/message/index.js.map +1 -1
- package/dist/components/settlement/settlement.js +751 -752
- package/dist/components/settlement/settlement.js.map +1 -1
- package/dist/components/settlement/settlement.less +0 -17
- 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 -610
- package/dist/components/collection/index.js.map +0 -1
- package/dist/components/collection/searchView/index.js +0 -297
- package/dist/components/collection/searchView/index.js.map +0 -1
- package/dist/components/collection/searchView/index.less +0 -138
- package/dist/components/password/ModifyPass.js +0 -442
- 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 -216
- package/dist/components/password/confirmPwd.js.map +0 -1
- package/dist/components/password/store.js +0 -284
- 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,91 +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);
|
905
866
|
|
906
|
-
|
907
|
-
|
867
|
+
case 4:
|
868
|
+
result = _context4.sent;
|
869
|
+
cardTypeEnum = _this2.store.paymode.currentMode.cardTypeEnum;
|
870
|
+
|
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
|
-
|
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);
|
932
890
|
|
933
|
-
|
934
|
-
|
935
|
-
|
936
|
-
}
|
891
|
+
if (!_this2.store.member.ID) {
|
892
|
+
_context4.next = 16;
|
893
|
+
break;
|
894
|
+
}
|
937
895
|
|
938
|
-
|
939
|
-
|
896
|
+
_context4.next = 14;
|
897
|
+
return _this2.store.updateMemberInfo(_this2.store);
|
940
898
|
|
941
|
-
|
942
|
-
|
943
|
-
|
944
|
-
|
945
|
-
|
946
|
-
|
947
|
-
|
948
|
-
|
949
|
-
});
|
950
|
-
_message2.default.info(result);
|
899
|
+
case 14:
|
900
|
+
resp = _context4.sent;
|
901
|
+
|
902
|
+
updataMemberInfo(resp);
|
903
|
+
|
904
|
+
case 16:
|
905
|
+
if (cardTypeEnum === 'BALANCE_CARD') {
|
906
|
+
_this2.store.paymode.updateCardInfo();
|
951
907
|
}
|
952
908
|
|
953
|
-
case
|
909
|
+
case 17:
|
954
910
|
case 'end':
|
955
|
-
return
|
911
|
+
return _context4.stop();
|
956
912
|
}
|
957
913
|
}
|
958
|
-
},
|
914
|
+
}, _callee4, _this3);
|
959
915
|
}));
|
960
916
|
|
961
|
-
_this2.handleConfirmPwdCancel = function () {
|
962
|
-
_this2.setState({
|
963
|
-
confirmStatus: false
|
964
|
-
});
|
965
|
-
};
|
966
|
-
|
967
|
-
_this2.getConfirmPwd = function (value) {
|
968
|
-
_this2.setState({
|
969
|
-
confirmPwd: value
|
970
|
-
});
|
971
|
-
};
|
972
|
-
|
973
|
-
_this2.changeBtnDisabled = function (value) {
|
974
|
-
_this2.setState({
|
975
|
-
btnDissabled: value
|
976
|
-
});
|
977
|
-
};
|
978
|
-
|
979
917
|
_this2.onPressEnterCzk = function (field) {
|
980
|
-
var
|
981
|
-
|
982
|
-
newPass =
|
983
|
-
|
984
|
-
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;
|
985
923
|
|
986
924
|
if (field === 'newPass' && newPass.length === 6) {
|
987
925
|
_this2.inputConfirmAmount.input.focus();
|
@@ -991,6 +929,60 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
991
929
|
}
|
992
930
|
};
|
993
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
|
+
|
994
986
|
_this2.setInventoryFocus = function () {
|
995
987
|
if (!!_this2.isHorizontalPad) return;
|
996
988
|
var doms = document.getElementsByClassName('app hot-key-focus-container');
|
@@ -1103,8 +1095,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
1103
1095
|
};
|
1104
1096
|
|
1105
1097
|
_this2.checkOfflineEnable = function (paymode, key) {
|
1106
|
-
var
|
1107
|
-
paymodes =
|
1098
|
+
var _ref9 = paymode || {},
|
1099
|
+
paymodes = _ref9.paymodes;
|
1108
1100
|
|
1109
1101
|
var isOffline = _mutantsMicrofx.stores.offlineSys.isOffline;
|
1110
1102
|
|
@@ -1336,7 +1328,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
1336
1328
|
|
1337
1329
|
var storeType = _this2.props.type;
|
1338
1330
|
|
1339
|
-
if (
|
1331
|
+
if (storeType != 1 && boriginReturn && (type == PayStyle.hyczk || type == PayStyle.djq || type == PayStyle.jfdx)) {
|
1340
1332
|
_message2.default.info('原单退货时,该结算方式不可以删除。');
|
1341
1333
|
} else {
|
1342
1334
|
_this2.store.delPay(index, bookType);
|
@@ -1482,18 +1474,18 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
1482
1474
|
if (_this2.czkdebounced) {
|
1483
1475
|
return;
|
1484
1476
|
}
|
1485
|
-
_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() {
|
1486
1478
|
var returnType, memberdata1;
|
1487
|
-
return _regenerator2.default.wrap(function
|
1479
|
+
return _regenerator2.default.wrap(function _callee5$(_context5) {
|
1488
1480
|
while (1) {
|
1489
|
-
switch (
|
1481
|
+
switch (_context5.prev = _context5.next) {
|
1490
1482
|
case 0:
|
1491
1483
|
returnType = _this2.getNotBoriginReturn();
|
1492
|
-
|
1484
|
+
_context5.next = 3;
|
1493
1485
|
return _this2.store.loadCzk(v, returnType);
|
1494
1486
|
|
1495
1487
|
case 3:
|
1496
|
-
memberdata1 =
|
1488
|
+
memberdata1 = _context5.sent;
|
1497
1489
|
|
1498
1490
|
if (memberdata1 && memberdata1.length === 1) {
|
1499
1491
|
if (_this2.store.paymode.currentMode.storageCardNo) {
|
@@ -1511,10 +1503,10 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
1511
1503
|
|
1512
1504
|
case 5:
|
1513
1505
|
case 'end':
|
1514
|
-
return
|
1506
|
+
return _context5.stop();
|
1515
1507
|
}
|
1516
1508
|
}
|
1517
|
-
},
|
1509
|
+
}, _callee5, _this3);
|
1518
1510
|
})), 1000, {
|
1519
1511
|
'leading': true,
|
1520
1512
|
'trailing': false
|
@@ -1718,11 +1710,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
1718
1710
|
}
|
1719
1711
|
};
|
1720
1712
|
|
1721
|
-
_this2.settleUnReturn = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function
|
1713
|
+
_this2.settleUnReturn = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee7() {
|
1722
1714
|
var that;
|
1723
|
-
return _regenerator2.default.wrap(function
|
1715
|
+
return _regenerator2.default.wrap(function _callee7$(_context7) {
|
1724
1716
|
while (1) {
|
1725
|
-
switch (
|
1717
|
+
switch (_context7.prev = _context7.next) {
|
1726
1718
|
case 0:
|
1727
1719
|
that = _this2;
|
1728
1720
|
|
@@ -1746,18 +1738,18 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
1746
1738
|
onOk: function onOk() {
|
1747
1739
|
var _this4 = this;
|
1748
1740
|
|
1749
|
-
return (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function
|
1741
|
+
return (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee6() {
|
1750
1742
|
var result;
|
1751
|
-
return _regenerator2.default.wrap(function
|
1743
|
+
return _regenerator2.default.wrap(function _callee6$(_context6) {
|
1752
1744
|
while (1) {
|
1753
|
-
switch (
|
1745
|
+
switch (_context6.prev = _context6.next) {
|
1754
1746
|
case 0:
|
1755
1747
|
window.__queryingModal = (0, _utils.openQueryingModal)();
|
1756
|
-
|
1748
|
+
_context6.next = 3;
|
1757
1749
|
return that.store.querySettleResult();
|
1758
1750
|
|
1759
1751
|
case 3:
|
1760
|
-
result =
|
1752
|
+
result = _context6.sent;
|
1761
1753
|
|
1762
1754
|
setTimeout(function () {
|
1763
1755
|
if (window.__queryingModal) {
|
@@ -1765,34 +1757,34 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
1765
1757
|
window.__queryingModal = null;
|
1766
1758
|
}
|
1767
1759
|
}, 0);
|
1768
|
-
|
1769
|
-
|
1760
|
+
_context6.t0 = result.Flag;
|
1761
|
+
_context6.next = _context6.t0 === "0" ? 8 : _context6.t0 === "1" ? 11 : _context6.t0 === "2" ? 13 : 15;
|
1770
1762
|
break;
|
1771
1763
|
|
1772
1764
|
case 8:
|
1773
1765
|
//成功
|
1774
1766
|
that.store.setDtoID(result.ID);
|
1775
1767
|
that.settleSuccess();
|
1776
|
-
return
|
1768
|
+
return _context6.abrupt('break', 15);
|
1777
1769
|
|
1778
1770
|
case 11:
|
1779
1771
|
//处理中
|
1780
1772
|
that.settleUnReturn();
|
1781
1773
|
// Message.info("结算正在处理中,请稍后再次查询。");
|
1782
|
-
return
|
1774
|
+
return _context6.abrupt('break', 15);
|
1783
1775
|
|
1784
1776
|
case 13:
|
1785
1777
|
//失败
|
1786
1778
|
_message2.default.info('\u7ED3\u7B97\u5931\u8D25\uFF0C\u539F\u56E0:' + result.Message + '\u3002');
|
1787
1779
|
// that.settleCanceled();
|
1788
|
-
return
|
1780
|
+
return _context6.abrupt('break', 15);
|
1789
1781
|
|
1790
1782
|
case 15:
|
1791
1783
|
case 'end':
|
1792
|
-
return
|
1784
|
+
return _context6.stop();
|
1793
1785
|
}
|
1794
1786
|
}
|
1795
|
-
},
|
1787
|
+
}, _callee6, _this4);
|
1796
1788
|
}))();
|
1797
1789
|
},
|
1798
1790
|
onCancel: function onCancel() {
|
@@ -1802,10 +1794,10 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
1802
1794
|
|
1803
1795
|
case 2:
|
1804
1796
|
case 'end':
|
1805
|
-
return
|
1797
|
+
return _context7.stop();
|
1806
1798
|
}
|
1807
1799
|
}
|
1808
|
-
},
|
1800
|
+
}, _callee7, _this3);
|
1809
1801
|
}));
|
1810
1802
|
|
1811
1803
|
_this2.settleCanceled = function () {
|
@@ -1814,135 +1806,119 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
1814
1806
|
_this2.cancelState();
|
1815
1807
|
};
|
1816
1808
|
|
1817
|
-
_this2.settleSuccess = function () {
|
1818
|
-
var
|
1819
|
-
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;
|
1820
1811
|
|
1821
|
-
|
1822
|
-
|
1823
|
-
|
1824
|
-
|
1825
|
-
|
1826
|
-
|
1827
|
-
|
1828
|
-
|
1829
|
-
|
1830
|
-
|
1831
|
-
|
1832
|
-
|
1833
|
-
|
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
|
+
// 判断双屏显示。
|
1834
1825
|
|
1835
|
-
|
1826
|
+
_this = _this2;
|
1836
1827
|
|
1837
|
-
|
1838
|
-
|
1839
|
-
|
1840
|
-
|
1841
|
-
|
1842
|
-
|
1843
|
-
|
1844
|
-
|
1845
|
-
|
1846
|
-
|
1847
|
-
|
1848
|
-
}
|
1849
|
-
}
|
1850
|
-
return flag;
|
1851
|
-
};
|
1852
|
-
var params = {
|
1853
|
-
step: 3,
|
1854
|
-
data: {
|
1855
|
-
amount: amount,
|
1856
|
-
received: received,
|
1857
|
-
charge: charge
|
1858
|
-
}
|
1859
|
-
};
|
1860
|
-
var screenType = getScreenType();
|
1861
|
-
if (screenType === true) {
|
1862
|
-
//副屏-第二屏幕
|
1863
|
-
if (_this.isHorizontalSunMi) {
|
1864
|
-
window.sunMi_PresentationManager.sendMessageToSecondScreen(params);
|
1865
|
-
setTimeout(function () {
|
1866
|
-
window.sunMi_PresentationManager.sendMessageToSecondScreen({ step: 1 });
|
1867
|
-
}, 3000);
|
1868
|
-
} else {
|
1869
|
-
_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;
|
1870
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);
|
1871
1856
|
setTimeout(function () {
|
1872
|
-
|
1873
|
-
},
|
1857
|
+
window.sunMi_PresentationManager.sendMessageToSecondScreen({ step: 1 });
|
1858
|
+
}, 3000);
|
1874
1859
|
} else {
|
1875
|
-
|
1860
|
+
_mutantsMicrofx.nativeMs && _mutantsMicrofx.nativeMs.setIpcRendererMethod('ReplyScreen', params);
|
1876
1861
|
}
|
1877
|
-
|
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
|
+
};
|
1878
1869
|
|
1879
|
-
|
1880
|
-
|
1881
|
-
|
1870
|
+
isFull = _this2.store.isFull;
|
1871
|
+
_context8.next = 10;
|
1872
|
+
return _this2.settleGiftOpenedInRunningFast();
|
1882
1873
|
|
1883
|
-
|
1884
|
-
|
1874
|
+
case 10:
|
1875
|
+
resp1 = _context8.sent;
|
1885
1876
|
|
1886
1877
|
|
1887
|
-
|
1888
|
-
|
1889
|
-
|
1890
|
-
|
1891
|
-
|
1892
|
-
|
1893
|
-
|
1894
|
-
|
1895
|
-
|
1896
|
-
|
1897
|
-
|
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
|
+
});
|
1898
1889
|
|
1899
|
-
|
1900
|
-
|
1901
|
-
|
1902
|
-
|
1903
|
-
|
1904
|
-
|
1905
|
-
|
1906
|
-
|
1907
|
-
|
1908
|
-
|
1909
|
-
|
1910
|
-
|
1911
|
-
|
1912
|
-
|
1913
|
-
|
1914
|
-
|
1915
|
-
|
1916
|
-
|
1917
|
-
|
1918
|
-
_message2.default.success('退货成功,此单无须退款!');
|
1919
|
-
} else {
|
1920
|
-
window.__successModal = (0, _utils.showSuccessModal)(amount, received, charge, _this.props.onModalClose, isXianjin, message, resp1 && resp1.data, _mutantsMicrofx.stores, IdbusiType, isFull, function () {
|
1921
|
-
_this.handleGuestShow(5);
|
1922
|
-
});
|
1923
|
-
}
|
1924
|
-
_this2.setState({ isXianjin: false });
|
1925
|
-
_this2.cancelState();
|
1926
|
-
}, 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);
|
1927
1909
|
|
1928
|
-
|
1929
|
-
|
1930
|
-
|
1931
|
-
}
|
1910
|
+
case 12:
|
1911
|
+
case 'end':
|
1912
|
+
return _context8.stop();
|
1932
1913
|
}
|
1933
|
-
}
|
1934
|
-
})
|
1935
|
-
|
1936
|
-
|
1937
|
-
return _ref10.apply(this, arguments);
|
1938
|
-
};
|
1939
|
-
}();
|
1940
|
-
|
1941
|
-
_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() {
|
1942
1918
|
var resp, isCheckGift, vocherPayGift, getSettleGift, type;
|
1943
|
-
return _regenerator2.default.wrap(function
|
1919
|
+
return _regenerator2.default.wrap(function _callee9$(_context9) {
|
1944
1920
|
while (1) {
|
1945
|
-
switch (
|
1921
|
+
switch (_context9.prev = _context9.next) {
|
1946
1922
|
case 0:
|
1947
1923
|
resp = false;
|
1948
1924
|
isCheckGift = true;
|
@@ -1956,55 +1932,55 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
1956
1932
|
}
|
1957
1933
|
|
1958
1934
|
if (!isCheckGift) {
|
1959
|
-
|
1935
|
+
_context9.next = 16;
|
1960
1936
|
break;
|
1961
1937
|
}
|
1962
1938
|
|
1963
1939
|
getSettleGift = _this2.store.getSettleGift;
|
1964
1940
|
type = _this2.props.type;
|
1965
1941
|
|
1966
|
-
if (type) {
|
1967
|
-
|
1942
|
+
if (!(type != 1)) {
|
1943
|
+
_context9.next = 16;
|
1968
1944
|
break;
|
1969
1945
|
}
|
1970
1946
|
|
1971
|
-
|
1972
|
-
|
1947
|
+
_context9.prev = 7;
|
1948
|
+
_context9.next = 10;
|
1973
1949
|
return getSettleGift();
|
1974
1950
|
|
1975
1951
|
case 10:
|
1976
|
-
resp =
|
1977
|
-
|
1952
|
+
resp = _context9.sent;
|
1953
|
+
_context9.next = 16;
|
1978
1954
|
break;
|
1979
1955
|
|
1980
1956
|
case 13:
|
1981
|
-
|
1982
|
-
|
1957
|
+
_context9.prev = 13;
|
1958
|
+
_context9.t0 = _context9['catch'](7);
|
1983
1959
|
|
1984
1960
|
console.log("获取支付礼包getSettleGift失败");
|
1985
1961
|
|
1986
1962
|
case 16:
|
1987
|
-
return
|
1963
|
+
return _context9.abrupt('return', resp);
|
1988
1964
|
|
1989
1965
|
case 17:
|
1990
1966
|
case 'end':
|
1991
|
-
return
|
1967
|
+
return _context9.stop();
|
1992
1968
|
}
|
1993
1969
|
}
|
1994
|
-
},
|
1970
|
+
}, _callee9, _this3, [[7, 13]]);
|
1995
1971
|
}));
|
1996
1972
|
|
1997
1973
|
_this2.handleGuestShow = function (dtype, value) {
|
1998
1974
|
if (_this2.hasElectron === false) return;
|
1999
1975
|
var dt = _mutantsMicrofx.localStore.get('portsetting_hardSet') || [];
|
2000
1976
|
|
2001
|
-
var
|
2002
|
-
guestshow_enable =
|
2003
|
-
guestshow_clear =
|
2004
|
-
guestshow_welcome =
|
2005
|
-
guestshow_collect =
|
2006
|
-
guestshow_refund =
|
2007
|
-
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;
|
2008
1984
|
|
2009
1985
|
var hasSuccess = _mutantsMicrofx.localStore && _mutantsMicrofx.localStore.get('portsetting_hardSet_isSuccess');
|
2010
1986
|
if (!guestshow_enable || !!guestshow_enable && hasSuccess == '0') return;
|
@@ -2039,108 +2015,108 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2039
2015
|
};
|
2040
2016
|
|
2041
2017
|
_this2.handleSettle = function () {
|
2042
|
-
var
|
2018
|
+
var _ref15 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee12(args) {
|
2043
2019
|
var handleUserInputs = function () {
|
2044
|
-
var
|
2020
|
+
var _ref17 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee11(promises) {
|
2045
2021
|
var results, _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, p, _result;
|
2046
2022
|
|
2047
|
-
return _regenerator2.default.wrap(function
|
2023
|
+
return _regenerator2.default.wrap(function _callee11$(_context11) {
|
2048
2024
|
while (1) {
|
2049
|
-
switch (
|
2025
|
+
switch (_context11.prev = _context11.next) {
|
2050
2026
|
case 0:
|
2051
2027
|
results = [];
|
2052
|
-
|
2028
|
+
_context11.prev = 1;
|
2053
2029
|
_iteratorNormalCompletion = true;
|
2054
2030
|
_didIteratorError = false;
|
2055
2031
|
_iteratorError = undefined;
|
2056
|
-
|
2032
|
+
_context11.prev = 5;
|
2057
2033
|
_iterator = (0, _getIterator3.default)(promises);
|
2058
2034
|
|
2059
2035
|
case 7:
|
2060
2036
|
if (_iteratorNormalCompletion = (_step = _iterator.next()).done) {
|
2061
|
-
|
2037
|
+
_context11.next = 16;
|
2062
2038
|
break;
|
2063
2039
|
}
|
2064
2040
|
|
2065
2041
|
p = _step.value;
|
2066
|
-
|
2042
|
+
_context11.next = 11;
|
2067
2043
|
return p;
|
2068
2044
|
|
2069
2045
|
case 11:
|
2070
|
-
_result =
|
2046
|
+
_result = _context11.sent;
|
2071
2047
|
|
2072
2048
|
results.push(_result);
|
2073
2049
|
|
2074
2050
|
case 13:
|
2075
2051
|
_iteratorNormalCompletion = true;
|
2076
|
-
|
2052
|
+
_context11.next = 7;
|
2077
2053
|
break;
|
2078
2054
|
|
2079
2055
|
case 16:
|
2080
|
-
|
2056
|
+
_context11.next = 22;
|
2081
2057
|
break;
|
2082
2058
|
|
2083
2059
|
case 18:
|
2084
|
-
|
2085
|
-
|
2060
|
+
_context11.prev = 18;
|
2061
|
+
_context11.t0 = _context11['catch'](5);
|
2086
2062
|
_didIteratorError = true;
|
2087
|
-
_iteratorError =
|
2063
|
+
_iteratorError = _context11.t0;
|
2088
2064
|
|
2089
2065
|
case 22:
|
2090
|
-
|
2091
|
-
|
2066
|
+
_context11.prev = 22;
|
2067
|
+
_context11.prev = 23;
|
2092
2068
|
|
2093
2069
|
if (!_iteratorNormalCompletion && _iterator.return) {
|
2094
2070
|
_iterator.return();
|
2095
2071
|
}
|
2096
2072
|
|
2097
2073
|
case 25:
|
2098
|
-
|
2074
|
+
_context11.prev = 25;
|
2099
2075
|
|
2100
2076
|
if (!_didIteratorError) {
|
2101
|
-
|
2077
|
+
_context11.next = 28;
|
2102
2078
|
break;
|
2103
2079
|
}
|
2104
2080
|
|
2105
2081
|
throw _iteratorError;
|
2106
2082
|
|
2107
2083
|
case 28:
|
2108
|
-
return
|
2084
|
+
return _context11.finish(25);
|
2109
2085
|
|
2110
2086
|
case 29:
|
2111
|
-
return
|
2087
|
+
return _context11.finish(22);
|
2112
2088
|
|
2113
2089
|
case 30:
|
2114
2090
|
window.__loadingModal = (0, _utils.openLoadingModal)();
|
2115
|
-
|
2091
|
+
_context11.next = 33;
|
2116
2092
|
return commit(results);
|
2117
2093
|
|
2118
2094
|
case 33:
|
2119
|
-
|
2095
|
+
_context11.next = 37;
|
2120
2096
|
break;
|
2121
2097
|
|
2122
2098
|
case 35:
|
2123
|
-
|
2124
|
-
|
2099
|
+
_context11.prev = 35;
|
2100
|
+
_context11.t1 = _context11['catch'](1);
|
2125
2101
|
|
2126
2102
|
case 37:
|
2127
2103
|
case 'end':
|
2128
|
-
return
|
2104
|
+
return _context11.stop();
|
2129
2105
|
}
|
2130
2106
|
}
|
2131
|
-
},
|
2107
|
+
}, _callee11, this, [[1, 35], [5, 18, 22, 30], [23,, 25, 29]]);
|
2132
2108
|
}));
|
2133
2109
|
|
2134
|
-
return function handleUserInputs(
|
2135
|
-
return
|
2110
|
+
return function handleUserInputs(_x6) {
|
2111
|
+
return _ref17.apply(this, arguments);
|
2136
2112
|
};
|
2137
2113
|
}();
|
2138
2114
|
|
2139
2115
|
var _enumController$getEn21, PayStyle, _this2$store6, paymode, brefund, boriginReturn, newStyle, isQuickPay, that, status, zeromode, promises, thePaymodes, quickmode, commit;
|
2140
2116
|
|
2141
|
-
return _regenerator2.default.wrap(function
|
2117
|
+
return _regenerator2.default.wrap(function _callee12$(_context12) {
|
2142
2118
|
while (1) {
|
2143
|
-
switch (
|
2119
|
+
switch (_context12.prev = _context12.next) {
|
2144
2120
|
case 0:
|
2145
2121
|
_this2.setState({
|
2146
2122
|
settleDisabled: true
|
@@ -2162,7 +2138,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2162
2138
|
});
|
2163
2139
|
|
2164
2140
|
if (!(that.checkCharge() && Math.abs(paymode.receivable) > that.props.initData("posChangeUpperAmount"))) {
|
2165
|
-
|
2141
|
+
_context12.next = 13;
|
2166
2142
|
break;
|
2167
2143
|
}
|
2168
2144
|
|
@@ -2170,11 +2146,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2170
2146
|
_this2.setState({
|
2171
2147
|
settleDisabled: false
|
2172
2148
|
});
|
2173
|
-
return
|
2149
|
+
return _context12.abrupt('return');
|
2174
2150
|
|
2175
2151
|
case 13:
|
2176
2152
|
if (!(args !== "zero" && !newStyle)) {
|
2177
|
-
|
2153
|
+
_context12.next = 19;
|
2178
2154
|
break;
|
2179
2155
|
}
|
2180
2156
|
|
@@ -2183,7 +2159,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2183
2159
|
});
|
2184
2160
|
|
2185
2161
|
if (!zeromode) {
|
2186
|
-
|
2162
|
+
_context12.next = 19;
|
2187
2163
|
break;
|
2188
2164
|
}
|
2189
2165
|
|
@@ -2191,7 +2167,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2191
2167
|
settleDisabled: false
|
2192
2168
|
});
|
2193
2169
|
_message2.default.error(zeromode.name + ' 的结算金额为零,不可以结算。');
|
2194
|
-
return
|
2170
|
+
return _context12.abrupt('return');
|
2195
2171
|
|
2196
2172
|
case 19:
|
2197
2173
|
promises = [];
|
@@ -2200,14 +2176,14 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2200
2176
|
}) : paymode.thePaymodes, 'orderBy');
|
2201
2177
|
|
2202
2178
|
if (!isQuickPay) {
|
2203
|
-
|
2179
|
+
_context12.next = 27;
|
2204
2180
|
break;
|
2205
2181
|
}
|
2206
2182
|
|
2207
2183
|
quickmode = thePaymodes[0];
|
2208
2184
|
|
2209
2185
|
if (!_this2.checkModeDisabled(quickmode.paymentType, brefund, boriginReturn)) {
|
2210
|
-
|
2186
|
+
_context12.next = 27;
|
2211
2187
|
break;
|
2212
2188
|
}
|
2213
2189
|
|
@@ -2215,7 +2191,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2215
2191
|
settleDisabled: false
|
2216
2192
|
});
|
2217
2193
|
_message2.default.error('退款不能使用' + quickmode.name + '结算,请使用其他结算方式!');
|
2218
|
-
return
|
2194
|
+
return _context12.abrupt('return');
|
2219
2195
|
|
2220
2196
|
case 27:
|
2221
2197
|
(0, _forEach3.default)(thePaymodes, function (mode) {
|
@@ -2225,27 +2201,27 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2225
2201
|
});
|
2226
2202
|
|
2227
2203
|
commit = function () {
|
2228
|
-
var
|
2204
|
+
var _ref16 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee10(values) {
|
2229
2205
|
var result;
|
2230
|
-
return _regenerator2.default.wrap(function
|
2206
|
+
return _regenerator2.default.wrap(function _callee10$(_context10) {
|
2231
2207
|
while (1) {
|
2232
|
-
switch (
|
2208
|
+
switch (_context10.prev = _context10.next) {
|
2233
2209
|
case 0:
|
2234
|
-
|
2210
|
+
_context10.next = 2;
|
2235
2211
|
return _this2.store.commit(_this2.props.bTest);
|
2236
2212
|
|
2237
2213
|
case 2:
|
2238
|
-
result =
|
2214
|
+
result = _context10.sent;
|
2239
2215
|
|
2240
2216
|
if (!(result === true)) {
|
2241
|
-
|
2217
|
+
_context10.next = 8;
|
2242
2218
|
break;
|
2243
2219
|
}
|
2244
2220
|
|
2245
2221
|
//成功
|
2246
2222
|
that.settleSuccess();
|
2247
2223
|
_promise2.default.resolve();
|
2248
|
-
|
2224
|
+
_context10.next = 23;
|
2249
2225
|
break;
|
2250
2226
|
|
2251
2227
|
case 8:
|
@@ -2262,24 +2238,24 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2262
2238
|
}, 0);
|
2263
2239
|
|
2264
2240
|
if (!(result && (result.Code || result.code))) {
|
2265
|
-
|
2241
|
+
_context10.next = 20;
|
2266
2242
|
break;
|
2267
2243
|
}
|
2268
2244
|
|
2269
|
-
|
2270
|
-
|
2245
|
+
_context10.t0 = result.Code || result.code;
|
2246
|
+
_context10.next = _context10.t0 === 'RE_Settle_UnReturn' ? 14 : _context10.t0 === 'ECONNABORTED' ? 18 : 20;
|
2271
2247
|
break;
|
2272
2248
|
|
2273
2249
|
case 14:
|
2274
2250
|
console.log('settlement--RE_Settle_UnReturn--调用清除数据==Focus==');
|
2275
2251
|
_this2.props.clearVoucherData && _this2.props.clearVoucherData();
|
2276
2252
|
_this2.cancelState();
|
2277
|
-
return
|
2253
|
+
return _context10.abrupt('break', 20);
|
2278
2254
|
|
2279
2255
|
case 18:
|
2280
2256
|
//error.code === 'ECONNABORTED' && error.message.indexOf('timeout')
|
2281
2257
|
result.message.indexOf('timeout') > -1 && that.settleUnReturn();
|
2282
|
-
return
|
2258
|
+
return _context10.abrupt('break', 20);
|
2283
2259
|
|
2284
2260
|
case 20:
|
2285
2261
|
if (isQuickPay) {
|
@@ -2287,19 +2263,19 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2287
2263
|
that.cancelState();
|
2288
2264
|
}
|
2289
2265
|
|
2290
|
-
|
2266
|
+
_context10.next = 23;
|
2291
2267
|
return _promise2.default.reject();
|
2292
2268
|
|
2293
2269
|
case 23:
|
2294
2270
|
case 'end':
|
2295
|
-
return
|
2271
|
+
return _context10.stop();
|
2296
2272
|
}
|
2297
2273
|
}
|
2298
|
-
},
|
2274
|
+
}, _callee10, _this3);
|
2299
2275
|
}));
|
2300
2276
|
|
2301
|
-
return function commit(
|
2302
|
-
return
|
2277
|
+
return function commit(_x5) {
|
2278
|
+
return _ref16.apply(this, arguments);
|
2303
2279
|
};
|
2304
2280
|
}();
|
2305
2281
|
|
@@ -2307,210 +2283,205 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2307
2283
|
|
2308
2284
|
case 30:
|
2309
2285
|
case 'end':
|
2310
|
-
return
|
2286
|
+
return _context12.stop();
|
2311
2287
|
}
|
2312
2288
|
}
|
2313
|
-
},
|
2289
|
+
}, _callee12, _this3);
|
2314
2290
|
}));
|
2315
2291
|
|
2316
|
-
return function (
|
2317
|
-
return
|
2292
|
+
return function (_x4) {
|
2293
|
+
return _ref15.apply(this, arguments);
|
2318
2294
|
};
|
2319
2295
|
}();
|
2320
2296
|
|
2321
|
-
_this2.handleCzk = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function
|
2322
|
-
var
|
2323
|
-
|
2324
|
-
|
2325
|
-
|
2326
|
-
|
2327
|
-
|
2328
|
-
|
2329
|
-
|
2330
|
-
|
2331
|
-
|
2332
|
-
|
2333
|
-
|
2334
|
-
|
2335
|
-
|
2336
|
-
|
2337
|
-
|
2338
|
-
|
2339
|
-
|
2340
|
-
|
2341
|
-
|
2342
|
-
});
|
2297
|
+
_this2.handleCzk = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee15() {
|
2298
|
+
var handleUserInputs = function () {
|
2299
|
+
var _ref20 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee14(promises) {
|
2300
|
+
var results, _iteratorNormalCompletion2, _didIteratorError2, _iteratorError2, _iterator2, _step2, p, _result2;
|
2301
|
+
|
2302
|
+
return _regenerator2.default.wrap(function _callee14$(_context14) {
|
2303
|
+
while (1) {
|
2304
|
+
switch (_context14.prev = _context14.next) {
|
2305
|
+
case 0:
|
2306
|
+
results = [];
|
2307
|
+
_context14.prev = 1;
|
2308
|
+
_iteratorNormalCompletion2 = true;
|
2309
|
+
_didIteratorError2 = false;
|
2310
|
+
_iteratorError2 = undefined;
|
2311
|
+
_context14.prev = 5;
|
2312
|
+
_iterator2 = (0, _getIterator3.default)(promises);
|
2313
|
+
|
2314
|
+
case 7:
|
2315
|
+
if (_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done) {
|
2316
|
+
_context14.next = 16;
|
2317
|
+
break;
|
2343
2318
|
}
|
2344
|
-
}
|
2345
|
-
}
|
2346
2319
|
|
2347
|
-
|
2348
|
-
|
2349
|
-
|
2350
|
-
var results, _iteratorNormalCompletion2, _didIteratorError2, _iteratorError2, _iterator2, _step2, p, _result2;
|
2320
|
+
p = _step2.value;
|
2321
|
+
_context14.next = 11;
|
2322
|
+
return p;
|
2351
2323
|
|
2352
|
-
|
2353
|
-
|
2354
|
-
switch (_context15.prev = _context15.next) {
|
2355
|
-
case 0:
|
2356
|
-
results = [];
|
2357
|
-
_context15.prev = 1;
|
2358
|
-
_iteratorNormalCompletion2 = true;
|
2359
|
-
_didIteratorError2 = false;
|
2360
|
-
_iteratorError2 = undefined;
|
2361
|
-
_context15.prev = 5;
|
2362
|
-
_iterator2 = (0, _getIterator3.default)(promises);
|
2363
|
-
|
2364
|
-
case 7:
|
2365
|
-
if (_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done) {
|
2366
|
-
_context15.next = 16;
|
2367
|
-
break;
|
2368
|
-
}
|
2324
|
+
case 11:
|
2325
|
+
_result2 = _context14.sent;
|
2369
2326
|
|
2370
|
-
|
2371
|
-
_context15.next = 11;
|
2372
|
-
return p;
|
2327
|
+
results.push(_result2);
|
2373
2328
|
|
2374
|
-
|
2375
|
-
|
2329
|
+
case 13:
|
2330
|
+
_iteratorNormalCompletion2 = true;
|
2331
|
+
_context14.next = 7;
|
2332
|
+
break;
|
2376
2333
|
|
2377
|
-
|
2334
|
+
case 16:
|
2335
|
+
_context14.next = 22;
|
2336
|
+
break;
|
2378
2337
|
|
2379
|
-
|
2380
|
-
|
2381
|
-
|
2382
|
-
|
2338
|
+
case 18:
|
2339
|
+
_context14.prev = 18;
|
2340
|
+
_context14.t0 = _context14['catch'](5);
|
2341
|
+
_didIteratorError2 = true;
|
2342
|
+
_iteratorError2 = _context14.t0;
|
2383
2343
|
|
2384
|
-
|
2385
|
-
|
2386
|
-
|
2344
|
+
case 22:
|
2345
|
+
_context14.prev = 22;
|
2346
|
+
_context14.prev = 23;
|
2387
2347
|
|
2388
|
-
|
2389
|
-
|
2390
|
-
|
2391
|
-
_didIteratorError2 = true;
|
2392
|
-
_iteratorError2 = _context15.t0;
|
2348
|
+
if (!_iteratorNormalCompletion2 && _iterator2.return) {
|
2349
|
+
_iterator2.return();
|
2350
|
+
}
|
2393
2351
|
|
2394
|
-
|
2395
|
-
|
2396
|
-
_context15.prev = 23;
|
2352
|
+
case 25:
|
2353
|
+
_context14.prev = 25;
|
2397
2354
|
|
2398
|
-
|
2399
|
-
|
2400
|
-
|
2355
|
+
if (!_didIteratorError2) {
|
2356
|
+
_context14.next = 28;
|
2357
|
+
break;
|
2358
|
+
}
|
2401
2359
|
|
2402
|
-
|
2403
|
-
_context15.prev = 25;
|
2360
|
+
throw _iteratorError2;
|
2404
2361
|
|
2405
|
-
|
2406
|
-
|
2407
|
-
break;
|
2408
|
-
}
|
2362
|
+
case 28:
|
2363
|
+
return _context14.finish(25);
|
2409
2364
|
|
2410
|
-
|
2365
|
+
case 29:
|
2366
|
+
return _context14.finish(22);
|
2411
2367
|
|
2412
|
-
|
2413
|
-
|
2368
|
+
case 30:
|
2369
|
+
_context14.next = 32;
|
2370
|
+
return commit(results);
|
2414
2371
|
|
2415
|
-
|
2416
|
-
|
2372
|
+
case 32:
|
2373
|
+
_context14.next = 37;
|
2374
|
+
break;
|
2417
2375
|
|
2418
|
-
|
2419
|
-
|
2420
|
-
|
2376
|
+
case 34:
|
2377
|
+
_context14.prev = 34;
|
2378
|
+
_context14.t1 = _context14['catch'](1);
|
2421
2379
|
|
2422
|
-
|
2423
|
-
|
2424
|
-
|
2380
|
+
if (_context14.t1 != "cancelpwd") {
|
2381
|
+
_message2.default.error(_context14.t1);
|
2382
|
+
setTimeout(function () {
|
2383
|
+
that.handleCzk();
|
2384
|
+
}, 500);
|
2385
|
+
}
|
2425
2386
|
|
2426
|
-
|
2427
|
-
|
2428
|
-
|
2387
|
+
case 37:
|
2388
|
+
case 'end':
|
2389
|
+
return _context14.stop();
|
2390
|
+
}
|
2391
|
+
}
|
2392
|
+
}, _callee14, this, [[1, 34], [5, 18, 22, 30], [23,, 25, 29]]);
|
2393
|
+
}));
|
2429
2394
|
|
2430
|
-
|
2431
|
-
|
2432
|
-
|
2433
|
-
|
2434
|
-
}, 500);
|
2435
|
-
}
|
2395
|
+
return function handleUserInputs(_x8) {
|
2396
|
+
return _ref20.apply(this, arguments);
|
2397
|
+
};
|
2398
|
+
}();
|
2436
2399
|
|
2437
|
-
|
2438
|
-
case 'end':
|
2439
|
-
return _context15.stop();
|
2440
|
-
}
|
2441
|
-
}
|
2442
|
-
}, _callee15, this, [[1, 34], [5, 18, 22, 30], [23,, 25, 29]]);
|
2443
|
-
}));
|
2400
|
+
var that, curmode, promises, _enumController$getEn22, PayStyle, commit;
|
2444
2401
|
|
2445
|
-
|
2446
|
-
|
2447
|
-
|
2448
|
-
|
2402
|
+
return _regenerator2.default.wrap(function _callee15$(_context15) {
|
2403
|
+
while (1) {
|
2404
|
+
switch (_context15.prev = _context15.next) {
|
2405
|
+
case 0:
|
2406
|
+
that = _this2;
|
2407
|
+
curmode = _this2.store.paymode.currentMode;
|
2408
|
+
promises = [];
|
2449
2409
|
|
2450
|
-
|
2451
|
-
|
2452
|
-
var result;
|
2453
|
-
return _regenerator2.default.wrap(function _callee14$(_context14) {
|
2454
|
-
while (1) {
|
2455
|
-
switch (_context14.prev = _context14.next) {
|
2456
|
-
case 0:
|
2457
|
-
if (!(values.length > 0)) {
|
2458
|
-
_context14.next = 6;
|
2459
|
-
break;
|
2460
|
-
}
|
2410
|
+
if (curmode.value > 0) {
|
2411
|
+
_enumController$getEn22 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn22.PayStyle;
|
2461
2412
|
|
2462
|
-
|
2463
|
-
|
2413
|
+
if (curmode.paymentType === PayStyle.hyczk) {
|
2414
|
+
if (curmode.cardTypeEnum === 'BALANCE_CARD') {
|
2415
|
+
!curmode.freePaymentPasswordStore && promises.push(that.inputPwd(curmode));
|
2416
|
+
} else {
|
2417
|
+
curmode.isNeedPassword && promises.push(that.inputPwd(curmode));
|
2418
|
+
}
|
2419
|
+
}
|
2420
|
+
}
|
2464
2421
|
|
2465
|
-
|
2466
|
-
|
2467
|
-
|
2422
|
+
commit = function () {
|
2423
|
+
var _ref19 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee13(values) {
|
2424
|
+
var result;
|
2425
|
+
return _regenerator2.default.wrap(function _callee13$(_context13) {
|
2426
|
+
while (1) {
|
2427
|
+
switch (_context13.prev = _context13.next) {
|
2428
|
+
case 0:
|
2429
|
+
if (!(values.length > 0)) {
|
2430
|
+
_context13.next = 6;
|
2468
2431
|
break;
|
2432
|
+
}
|
2469
2433
|
|
2470
|
-
|
2471
|
-
|
2434
|
+
_context13.next = 3;
|
2435
|
+
return that.store.validePwd(values[0]);
|
2472
2436
|
|
2473
|
-
|
2474
|
-
|
2437
|
+
case 3:
|
2438
|
+
_context13.t0 = _context13.sent;
|
2439
|
+
_context13.next = 7;
|
2440
|
+
break;
|
2475
2441
|
|
2476
|
-
|
2477
|
-
|
2478
|
-
break;
|
2479
|
-
}
|
2442
|
+
case 6:
|
2443
|
+
_context13.t0 = "";
|
2480
2444
|
|
2481
|
-
|
2482
|
-
|
2483
|
-
|
2484
|
-
|
2485
|
-
|
2445
|
+
case 7:
|
2446
|
+
result = _context13.t0;
|
2447
|
+
|
2448
|
+
if (!(result == "")) {
|
2449
|
+
_context13.next = 13;
|
2486
2450
|
break;
|
2451
|
+
}
|
2487
2452
|
|
2488
|
-
|
2489
|
-
|
2490
|
-
|
2453
|
+
//成功
|
2454
|
+
//返回
|
2455
|
+
that.setCurrentFocusAndAddPay(curmode.paymentType, null, curmode.paymethodId);
|
2456
|
+
_promise2.default.resolve();
|
2457
|
+
_context13.next = 15;
|
2458
|
+
break;
|
2491
2459
|
|
2492
|
-
|
2493
|
-
|
2494
|
-
|
2495
|
-
|
2460
|
+
case 13:
|
2461
|
+
_context13.next = 15;
|
2462
|
+
return _promise2.default.reject(result);
|
2463
|
+
|
2464
|
+
case 15:
|
2465
|
+
case 'end':
|
2466
|
+
return _context13.stop();
|
2496
2467
|
}
|
2497
|
-
}
|
2498
|
-
})
|
2468
|
+
}
|
2469
|
+
}, _callee13, _this3);
|
2470
|
+
}));
|
2499
2471
|
|
2500
|
-
|
2501
|
-
|
2502
|
-
|
2503
|
-
|
2472
|
+
return function commit(_x7) {
|
2473
|
+
return _ref19.apply(this, arguments);
|
2474
|
+
};
|
2475
|
+
}();
|
2504
2476
|
|
2505
|
-
|
2506
|
-
}
|
2477
|
+
handleUserInputs(promises);
|
2507
2478
|
|
2508
2479
|
case 6:
|
2509
2480
|
case 'end':
|
2510
|
-
return
|
2481
|
+
return _context15.stop();
|
2511
2482
|
}
|
2512
2483
|
}
|
2513
|
-
},
|
2484
|
+
}, _callee15, _this3);
|
2514
2485
|
}));
|
2515
2486
|
|
2516
2487
|
_this2.fKeyboardOnOk = function (paymethodeId) {
|
@@ -2549,8 +2520,163 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2549
2520
|
});
|
2550
2521
|
};
|
2551
2522
|
|
2552
|
-
_this2.
|
2553
|
-
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) {
|
2554
2680
|
var IdbusiType, CustomerPhone, DistributionMode, Address, isEnableSerialNumber, resultObj, title, productStore, checkResult, _enumController$getEn23, PayStyle, _this2$store7, paymode, brefund, boriginReturn, newStyle, status;
|
2555
2681
|
|
2556
2682
|
return _regenerator2.default.wrap(function _callee17$(_context17) {
|
@@ -2674,155 +2800,13 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2674
2800
|
}));
|
2675
2801
|
|
2676
2802
|
return function (_x10, _x11) {
|
2677
|
-
return
|
2678
|
-
};
|
2679
|
-
}();
|
2680
|
-
|
2681
|
-
_this2.btnDebounced = function () {
|
2682
|
-
var _ref20 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee18(type, bquick) {
|
2683
|
-
var _this2$props3, settlementType, _this2$props3$creditS, creditSalesVoucher, amount, notSelectableVoucherList, _this2$context$viewMo2, IdbusiType, _this2$context$viewMo3, TotalTaxAmount, _this2$context$viewMo4, ArrearsAmount, returnAmount1, _result3;
|
2684
|
-
|
2685
|
-
return _regenerator2.default.wrap(function _callee18$(_context18) {
|
2686
|
-
while (1) {
|
2687
|
-
switch (_context18.prev = _context18.next) {
|
2688
|
-
case 0:
|
2689
|
-
_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;
|
2690
|
-
notSelectableVoucherList = [];
|
2691
|
-
//赊销-未生成零售结算单的单据不能进行收款
|
2692
|
-
|
2693
|
-
if (!(settlementType == 2)) {
|
2694
|
-
_context18.next = 9;
|
2695
|
-
break;
|
2696
|
-
}
|
2697
|
-
|
2698
|
-
if (!(Number(amount) < 0)) {
|
2699
|
-
_context18.next = 5;
|
2700
|
-
break;
|
2701
|
-
}
|
2702
|
-
|
2703
|
-
return _context18.abrupt('return', _message2.default.warn('所勾选零售单的欠款合计须大于等于0!'));
|
2704
|
-
|
2705
|
-
case 5:
|
2706
|
-
notSelectableVoucherList = creditSalesVoucher.filter(function (o) {
|
2707
|
-
return o.SettleStatusEnum != 'SETTLED';
|
2708
|
-
});
|
2709
|
-
|
2710
|
-
if (!(notSelectableVoucherList.length > 0)) {
|
2711
|
-
_context18.next = 9;
|
2712
|
-
break;
|
2713
|
-
}
|
2714
|
-
|
2715
|
-
_modalWraper2.default.confirm({
|
2716
|
-
className: 'not-selectable-voucher',
|
2717
|
-
title: '以下零售单尚未生成零售结算单,不能进行收款',
|
2718
|
-
content: _react2.default.createElement(
|
2719
|
-
'ul',
|
2720
|
-
null,
|
2721
|
-
notSelectableVoucherList.map(function (o) {
|
2722
|
-
return _react2.default.createElement(
|
2723
|
-
'li',
|
2724
|
-
null,
|
2725
|
-
o.Code
|
2726
|
-
);
|
2727
|
-
})
|
2728
|
-
)
|
2729
|
-
});
|
2730
|
-
return _context18.abrupt('return');
|
2731
|
-
|
2732
|
-
case 9:
|
2733
|
-
if (!(_this2.props.type != 1)) {
|
2734
|
-
_context18.next = 28;
|
2735
|
-
break;
|
2736
|
-
}
|
2737
|
-
|
2738
|
-
_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;
|
2739
|
-
//赊销原单退货
|
2740
|
-
|
2741
|
-
if (!(IdbusiType === 42)) {
|
2742
|
-
_context18.next = 25;
|
2743
|
-
break;
|
2744
|
-
}
|
2745
|
-
|
2746
|
-
//实际退款金额
|
2747
|
-
returnAmount1 = Math.abs(TotalTaxAmount) - ArrearsAmount;
|
2748
|
-
|
2749
|
-
_this2.setState({
|
2750
|
-
returnAmount: returnAmount1
|
2751
|
-
});
|
2752
|
-
//判断欠款金额
|
2753
|
-
|
2754
|
-
if (!(returnAmount1 > 0)) {
|
2755
|
-
_context18.next = 18;
|
2756
|
-
break;
|
2757
|
-
}
|
2758
|
-
|
2759
|
-
_modalWraper2.default.confirm({
|
2760
|
-
className: 'tplus-confirm-modal',
|
2761
|
-
title: '退款',
|
2762
|
-
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',
|
2763
|
-
onOk: function onOk() {
|
2764
|
-
_this2.handleBtnDebounced(type, bquick);
|
2765
|
-
},
|
2766
|
-
onCancel: function onCancel() {}
|
2767
|
-
});
|
2768
|
-
_context18.next = 23;
|
2769
|
-
break;
|
2770
|
-
|
2771
|
-
case 18:
|
2772
|
-
returnAmount1 = 0;
|
2773
|
-
_context18.next = 21;
|
2774
|
-
return _this2.store.commit(_this2.props.bTest, _this2.context.viewModel.data, _this2.context);
|
2775
|
-
|
2776
|
-
case 21:
|
2777
|
-
_result3 = _context18.sent;
|
2778
|
-
|
2779
|
-
if (_result3 === true) {
|
2780
|
-
//成功
|
2781
|
-
_this2.settleSuccess('onCreditReturn');
|
2782
|
-
_promise2.default.resolve();
|
2783
|
-
} else {
|
2784
|
-
_this2.setState({
|
2785
|
-
settleDisabled: false
|
2786
|
-
});
|
2787
|
-
//提示失败
|
2788
|
-
setTimeout(function () {
|
2789
|
-
if (window.__loadingModal) {
|
2790
|
-
window.__loadingModal.destroy();
|
2791
|
-
window.__loadingModal = null;
|
2792
|
-
}
|
2793
|
-
}, 0);
|
2794
|
-
}
|
2795
|
-
|
2796
|
-
case 23:
|
2797
|
-
_context18.next = 26;
|
2798
|
-
break;
|
2799
|
-
|
2800
|
-
case 25:
|
2801
|
-
_this2.handleBtnDebounced(type, bquick);
|
2802
|
-
|
2803
|
-
case 26:
|
2804
|
-
_context18.next = 29;
|
2805
|
-
break;
|
2806
|
-
|
2807
|
-
case 28:
|
2808
|
-
_this2.handleBtnDebounced(type, bquick);
|
2809
|
-
|
2810
|
-
case 29:
|
2811
|
-
case 'end':
|
2812
|
-
return _context18.stop();
|
2813
|
-
}
|
2814
|
-
}
|
2815
|
-
}, _callee18, _this3);
|
2816
|
-
}));
|
2817
|
-
|
2818
|
-
return function (_x12, _x13) {
|
2819
|
-
return _ref20.apply(this, arguments);
|
2803
|
+
return _ref24.apply(this, arguments);
|
2820
2804
|
};
|
2821
2805
|
}();
|
2822
2806
|
|
2823
2807
|
_this2.onCzkChange = function (v) {
|
2824
|
-
var
|
2825
|
-
isNewRetailBCPos =
|
2808
|
+
var _ref25 = _mutantsUtil.platform || {},
|
2809
|
+
isNewRetailBCPos = _ref25.isNewRetailBCPos;
|
2826
2810
|
|
2827
2811
|
if (!isNewRetailBCPos) {
|
2828
2812
|
_this2.store.paymode.currentMode.member.setCardNo(v);
|
@@ -2959,9 +2943,9 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2959
2943
|
var that = _this2;
|
2960
2944
|
var isStoredValueCard = false;
|
2961
2945
|
var discountPrototypeTotalAmount = _this2.state.discountPrototypeTotalAmount;
|
2962
|
-
var _this2$
|
2963
|
-
isReturn = _this2$
|
2964
|
-
type = _this2$
|
2946
|
+
var _this2$props3 = _this2.props,
|
2947
|
+
isReturn = _this2$props3.isReturn,
|
2948
|
+
type = _this2$props3.type;
|
2965
2949
|
|
2966
2950
|
var isManualIntoAmount = void 0;
|
2967
2951
|
var BuyerPayFreight = _this2.context && _this2.context.viewModel && _this2.context.viewModel.data && _this2.context.viewModel.data.BuyerPayFreight;
|
@@ -3013,9 +2997,6 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
3013
2997
|
that.setState({
|
3014
2998
|
protytypeCount: 0
|
3015
2999
|
});
|
3016
|
-
// setTimeout(() => {
|
3017
|
-
// that[`inputS${paymode.paymethodId}`].input.input.focus();
|
3018
|
-
// }, 535)
|
3019
3000
|
}
|
3020
3001
|
return prototypeVisible || protytypeCount;
|
3021
3002
|
},
|
@@ -3118,7 +3099,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
3118
3099
|
that.getXianjinBalance(paymode.paymentType, paymode.value)
|
3119
3100
|
)
|
3120
3101
|
),
|
3121
|
-
!isReturn &&
|
3102
|
+
!isReturn && type !== 1 && _react2.default.createElement(
|
3122
3103
|
'div',
|
3123
3104
|
{ className: 'zlje prototype' },
|
3124
3105
|
_react2.default.createElement(
|
@@ -3238,8 +3219,10 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
3238
3219
|
});
|
3239
3220
|
// 扫码框自动聚焦
|
3240
3221
|
setTimeout(function () {
|
3241
|
-
|
3242
|
-
|
3222
|
+
var __input = that['inputS' + paymode.paymethodId];
|
3223
|
+
if (__input && __input.input && __input.input.input) {
|
3224
|
+
__input.input.input.focus();
|
3225
|
+
}
|
3243
3226
|
}, 350);
|
3244
3227
|
});
|
3245
3228
|
};
|
@@ -3281,27 +3264,22 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
3281
3264
|
var _enumController$getEn30 = _mutantsUtil.enumController.getEnumOj(),
|
3282
3265
|
PayStyle = _enumController$getEn30.PayStyle;
|
3283
3266
|
|
3284
|
-
var type = _this2.props.type;
|
3285
|
-
|
3286
3267
|
console.log("settlement.checkSettleDisabled开始执行,参数:", { paymode: paymode, thePaymodes: thePaymodes });
|
3287
3268
|
if (paymode.amount == 0 && paymode.received == 0) {
|
3288
3269
|
console.log("settlement.checkSettleDisabled返回结果:", false);
|
3289
3270
|
return false;
|
3290
3271
|
}
|
3291
3272
|
if (_this2.store.brefund) {
|
3292
|
-
var
|
3293
|
-
console.log("settlement.checkSettleDisabled返回结果:",
|
3294
|
-
return
|
3273
|
+
var _result3 = !(paymode.receivable == 0 && thePaymodes.length > 0);
|
3274
|
+
console.log("settlement.checkSettleDisabled返回结果:", _result3);
|
3275
|
+
return _result3;
|
3295
3276
|
}
|
3296
3277
|
var xj = (0, _find3.default)(thePaymodes, function (mode) {
|
3297
3278
|
return mode.paymentType == PayStyle.xianjin;
|
3298
3279
|
});
|
3299
|
-
|
3300
|
-
var receivable = Number(paymode.receivable);
|
3301
|
-
var amount = Number(paymode.amount);
|
3302
|
-
var enabled = (receivable == 0 || type == 2 && 0 < receivable && receivable < amount) && thePaymodes.length > 0;
|
3280
|
+
var enabled = paymode.receivable == 0 && thePaymodes.length > 0;
|
3303
3281
|
if (xj && xj.value != 0) {
|
3304
|
-
enabled = receivable <= 0 && thePaymodes.length > 0 && Math.abs(receivable) < xj.value
|
3282
|
+
enabled = paymode.receivable <= 0 && thePaymodes.length > 0 && Math.abs(paymode.receivable) < xj.value;
|
3305
3283
|
}
|
3306
3284
|
console.log("settlement.checkSettleDisabled返回结果:", !enabled);
|
3307
3285
|
var settleDisabled = _this2.state.settleDisabled;
|
@@ -3377,7 +3355,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
3377
3355
|
'div',
|
3378
3356
|
null,
|
3379
3357
|
(0, _map3.default)(modeList, function (mode, modeIndex) {
|
3380
|
-
return _this2.renderToolbtn(mode, index * carouselStart + modeIndex,
|
3358
|
+
return _this2.renderToolbtn(mode, index * carouselStart + modeIndex, type !== 1 ? 'bookPay' : '');
|
3381
3359
|
})
|
3382
3360
|
);
|
3383
3361
|
})
|
@@ -3428,12 +3406,12 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
3428
3406
|
|
3429
3407
|
_this2.hasElectron = hasElectron;
|
3430
3408
|
|
3431
|
-
var
|
3432
|
-
MemberMeStorageCardInputByKeyBoard =
|
3433
|
-
ICCardServer =
|
3434
|
-
ICCardPassword =
|
3435
|
-
PreSellOrBook =
|
3436
|
-
PercentageWhenBook =
|
3409
|
+
var _ref26 = _mutantsMicrofx.stores.user.options.get('loginInfo') || {},
|
3410
|
+
MemberMeStorageCardInputByKeyBoard = _ref26.MemberMeStorageCardInputByKeyBoard,
|
3411
|
+
ICCardServer = _ref26.ICCardServer,
|
3412
|
+
ICCardPassword = _ref26.ICCardPassword,
|
3413
|
+
PreSellOrBook = _ref26.PreSellOrBook,
|
3414
|
+
PercentageWhenBook = _ref26.PercentageWhenBook;
|
3437
3415
|
|
3438
3416
|
_this2.isStorageCardInputType = MemberMeStorageCardInputByKeyBoard; // 仅储值卡是否禁用键盘输入,'0'为不禁用 '1'为禁用
|
3439
3417
|
_this2.iCCardServer = parseInt(ICCardServer); // 启用IC卡:0为禁用 1为启用
|
@@ -3442,9 +3420,9 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
3442
3420
|
_this2.percentageWhenBook = PercentageWhenBook;
|
3443
3421
|
//移动端环境下,没有读取IC卡的方式。
|
3444
3422
|
|
3445
|
-
var
|
3446
|
-
isHorizontalPad =
|
3447
|
-
isHorizontalSunMi =
|
3423
|
+
var _ref27 = _mutantsUtil.platform || {},
|
3424
|
+
isHorizontalPad = _ref27.isHorizontalPad,
|
3425
|
+
isHorizontalSunMi = _ref27.isHorizontalSunMi;
|
3448
3426
|
|
3449
3427
|
_this2.isHorizontalPad = !!isHorizontalPad;
|
3450
3428
|
_this2.isHorizontalSunMi = !!isHorizontalSunMi;
|
@@ -3452,7 +3430,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
3452
3430
|
_this2.handleReadICard = _this2.handleReadICard.bind(_this2);
|
3453
3431
|
_this2.setTimer = null;
|
3454
3432
|
_this2.keypressStime = null;
|
3455
|
-
_this2.store = !props.type ? _mutantsMicrofx.stores.settlementVoucherStore : _mutantsMicrofx.stores.settlementMemberStore;
|
3433
|
+
_this2.store = !(props.type == 1) ? _mutantsMicrofx.stores.settlementVoucherStore : _mutantsMicrofx.stores.settlementMemberStore;
|
3456
3434
|
_this2.voucherRunningFast = _mutantsMicrofx.localStore && _mutantsMicrofx.localStore.get('vocherRunningFast') == '1';
|
3457
3435
|
return _this2;
|
3458
3436
|
}
|
@@ -3593,8 +3571,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
3593
3571
|
}, {
|
3594
3572
|
key: 'isNoProductTip',
|
3595
3573
|
value: function isNoProductTip(nonProductMap) {
|
3596
|
-
var
|
3597
|
-
RetailDetails =
|
3574
|
+
var _ref28 = this.context.viewModel.data || {},
|
3575
|
+
RetailDetails = _ref28.RetailDetails;
|
3598
3576
|
|
3599
3577
|
var temphtml = [];
|
3600
3578
|
if ((0, _keys2.default)(nonProductMap).length > 0) {
|
@@ -3793,9 +3771,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
3793
3771
|
isReturn = _props.isReturn,
|
3794
3772
|
quantityDetail = _props.quantityDetail,
|
3795
3773
|
memberDisabled = _props.memberDisabled,
|
3796
|
-
noIsMinAmount = _props.noIsMinAmount
|
3797
|
-
_props$creditSalesVou = _props.creditSalesVoucher,
|
3798
|
-
creditSalesVoucher = _props$creditSalesVou === undefined ? [] : _props$creditSalesVou;
|
3774
|
+
noIsMinAmount = _props.noIsMinAmount;
|
3799
3775
|
// 原单退货
|
3800
3776
|
|
3801
3777
|
var boriginReturn = this.getBoriginReturn();
|
@@ -3849,7 +3825,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
3849
3825
|
return paymode.isQuick;
|
3850
3826
|
}
|
3851
3827
|
});
|
3852
|
-
var productsIsEmpty =
|
3828
|
+
var productsIsEmpty = type != 1 && this.context.viewModel.data.RetailDetails.length == 0 || type == 1 && parseFloat(amount || 0) <= 0 || memberDisabled || noIsMinAmount;
|
3853
3829
|
var moreToolbtns = [];
|
3854
3830
|
var params = {
|
3855
3831
|
pagination: {
|
@@ -3867,11 +3843,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
3867
3843
|
quantity4 = 0;
|
3868
3844
|
var sumQuantity = 0; //数量总和的值,包括称重的。
|
3869
3845
|
|
3870
|
-
var
|
3871
|
-
|
3872
|
-
buyQuantity =
|
3873
|
-
|
3874
|
-
returnQuantity =
|
3846
|
+
var _ref29 = quantityDetail || {},
|
3847
|
+
_ref29$buyQuantity = _ref29.buyQuantity,
|
3848
|
+
buyQuantity = _ref29$buyQuantity === undefined ? 0 : _ref29$buyQuantity,
|
3849
|
+
_ref29$returnQuantity = _ref29.returnQuantity,
|
3850
|
+
returnQuantity = _ref29$returnQuantity === undefined ? 0 : _ref29$returnQuantity;
|
3875
3851
|
|
3876
3852
|
var quantityPrecision = (0, _tplusPoslogin.PosInitData)("QuantityPrecision");
|
3877
3853
|
quantityPrecision = quantityPrecision ? parseInt(quantityPrecision) : '';
|
@@ -4018,7 +3994,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
4018
3994
|
_react2.default.createElement(
|
4019
3995
|
'div',
|
4020
3996
|
{ className: 'btns' },
|
4021
|
-
!this.isHorizontalPad && !this.props.MemberPoints &&
|
3997
|
+
!this.isHorizontalPad && !this.props.MemberPoints && (0, _map3.default)(quickPay, function (p, i) {
|
4022
3998
|
var _classnames2;
|
4023
3999
|
|
4024
4000
|
var iconclass = PayIcon2[p.paymentType] ? 'color' + p.paymentType : "primary-color";
|
@@ -4030,7 +4006,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
4030
4006
|
onClick: function onClick() {
|
4031
4007
|
_this8.btnDebounced(p.paymentType, true);
|
4032
4008
|
},
|
4033
|
-
disabled: productsIsEmpty ||
|
4009
|
+
disabled: productsIsEmpty || type != 1 && _this8.checkModeDisabled(p.paymentType, (_this8.context.viewModel.data.TotalTaxAmount || 0 - _this8.context.viewModel.data.OnlinePaymentAmount || 0) < 0, boriginReturn)
|
4034
4010
|
},
|
4035
4011
|
_react2.default.createElement(
|
4036
4012
|
'div',
|
@@ -4046,13 +4022,10 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
4046
4022
|
}),
|
4047
4023
|
_react2.default.createElement(
|
4048
4024
|
_button2.default,
|
4049
|
-
{ key: 'settle',
|
4050
|
-
className: (0, _classnames4.default)({ "settle": true, "settle2": type == 1, "settleStorage": true, 'primary-btn': true }),
|
4051
|
-
onClick: function onClick() {
|
4025
|
+
{ key: 'settle', className: (0, _classnames4.default)({ "settle": true, "settle2": type == 1, "settleStorage": true, 'primary-btn': true }), onClick: function onClick() {
|
4052
4026
|
_this8.btnDebounced();
|
4053
|
-
},
|
4054
|
-
|
4055
|
-
this.props.isMemberPoints ? '立即兑换' : this.props.isMemberPointsReturn ? '退货' : IdbusiType == 39 && _mutantsMicrofx.stores.drawerStore.thisWaitPaidAmount == 0 ? '取货' : type == 2 ? '收款' : settle.name
|
4027
|
+
}, disabled: productsIsEmpty },
|
4028
|
+
this.props.isMemberPoints ? '立即兑换' : this.props.isMemberPointsReturn ? '退货' : IdbusiType == 39 && _mutantsMicrofx.stores.drawerStore.thisWaitPaidAmount == 0 ? '取货' : settle.name
|
4056
4029
|
)
|
4057
4030
|
),
|
4058
4031
|
!newStyle && _react2.default.createElement(
|
@@ -4116,7 +4089,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
4116
4089
|
mode.paymentType == PayStyle.hyczk || mode.paymentType == PayStyle.jfdx || mode.paymentType == PayStyle.djq ? _react2.default.createElement('input', { id: 'inputS' + index,
|
4117
4090
|
className: _index.hotKey.hotKeyNotFilter(),
|
4118
4091
|
onClick: function onClick() {
|
4119
|
-
_this8.editModal(index, mode.paymentType,
|
4092
|
+
_this8.editModal(index, mode.paymentType, type != 1 ? boriginReturn : null);
|
4120
4093
|
}, value: (0, _utils.getFixedNumber)(mode.value) }) : _react2.default.createElement('input', { id: 'inputS' + index,
|
4121
4094
|
className: _index.hotKey.hotKeyNotFilter(),
|
4122
4095
|
value: mode.exchangeRate != 1 ? mode.value2 : mode.value,
|
@@ -4180,7 +4153,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
4180
4153
|
(0, _utils.getFixedNumber)(mode.balance)
|
4181
4154
|
),
|
4182
4155
|
_react2.default.createElement('br', null),
|
4183
|
-
|
4156
|
+
type != 1 && themodeHyczk && themodeHyczk.length && themodeHyczk[themodeHyczk.length - 1].paymethodId === mode.paymethodId && !isReturn && _react2.default.createElement(
|
4184
4157
|
_button2.default,
|
4185
4158
|
{ onClick: function onClick() {
|
4186
4159
|
_this8.appendCzkmode(boriginReturn, 'noPlaySetPwd');
|
@@ -4287,7 +4260,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
4287
4260
|
)
|
4288
4261
|
)
|
4289
4262
|
),
|
4290
|
-
|
4263
|
+
type != 1 && !isReturn && _react2.default.createElement(
|
4291
4264
|
'div',
|
4292
4265
|
{ onClick: this.prototypeDetailedClick, className: 'prototypeDetailed primary-color' },
|
4293
4266
|
'\u4F18\u60E0\u660E\u7EC6',
|
@@ -4437,7 +4410,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
4437
4410
|
)
|
4438
4411
|
)
|
4439
4412
|
),
|
4440
|
-
|
4413
|
+
type != 1 && !isReturn && _react2.default.createElement(
|
4441
4414
|
'div',
|
4442
4415
|
{ onClick: this.prototypeDetailedClick, className: 'prototypeDetailed primary-color' },
|
4443
4416
|
'\u4F18\u60E0\u660E\u7EC6',
|
@@ -4524,7 +4497,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
4524
4497
|
className: _index.hotKey.hotKeyNotFilter("paymode hotkey_" + _this8.compoundHotkeysList[hotkeyIndex]),
|
4525
4498
|
disabled: _this8.checkModeDisabled(mode.paymentType, brefund, boriginReturn),
|
4526
4499
|
onClick: function onClick() {
|
4527
|
-
if (
|
4500
|
+
if (type != 1 && mode.paymentType == PayStyle.hyczk) {
|
4528
4501
|
if (themodeHyczk && themodeHyczk.length === 0) {
|
4529
4502
|
_this8.onHotKeyClick1(mode, index, boriginReturn);
|
4530
4503
|
}
|
@@ -4580,7 +4553,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
4580
4553
|
null,
|
4581
4554
|
'\u5361\u53F7\uFF1A'
|
4582
4555
|
),
|
4583
|
-
|
4556
|
+
type != 1 ? _react2.default.createElement(
|
4584
4557
|
'span',
|
4585
4558
|
null,
|
4586
4559
|
m && m.storageCardNo
|
@@ -4600,7 +4573,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
4600
4573
|
'\u652F\u4ED8\u91D1\u989D\uFF1A'
|
4601
4574
|
),
|
4602
4575
|
_react2.default.createElement('br', null),
|
4603
|
-
|
4576
|
+
type != 1 && themodeHyczk && themodeHyczk.length && themodeHyczk[themodeHyczk.length - 1].paymethodId === m.paymethodId && _react2.default.createElement(
|
4604
4577
|
_button2.default,
|
4605
4578
|
{ onClick: function onClick() {
|
4606
4579
|
return _this8.onHotKeyClick1(mode, index, boriginReturn);
|
@@ -4759,22 +4732,22 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
4759
4732
|
return _this8.czkInput = input;
|
4760
4733
|
},
|
4761
4734
|
onKeyDown: function () {
|
4762
|
-
var
|
4735
|
+
var _ref30 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee18(e) {
|
4763
4736
|
var time, _paymode;
|
4764
4737
|
|
4765
|
-
return _regenerator2.default.wrap(function
|
4738
|
+
return _regenerator2.default.wrap(function _callee18$(_context18) {
|
4766
4739
|
while (1) {
|
4767
|
-
switch (
|
4740
|
+
switch (_context18.prev = _context18.next) {
|
4768
4741
|
case 0:
|
4769
4742
|
if (!(e.keyCode == 13)) {
|
4770
|
-
|
4743
|
+
_context18.next = 14;
|
4771
4744
|
break;
|
4772
4745
|
}
|
4773
4746
|
|
4774
4747
|
time = Date.parse(new Date());
|
4775
4748
|
|
4776
4749
|
if (!(_this8.isStorageCardInputType && time - _this8.keypressStime > 350)) {
|
4777
|
-
|
4750
|
+
_context18.next = 7;
|
4778
4751
|
break;
|
4779
4752
|
}
|
4780
4753
|
|
@@ -4783,11 +4756,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
4783
4756
|
_this8.setState({
|
4784
4757
|
czkValue: null
|
4785
4758
|
});
|
4786
|
-
return
|
4759
|
+
return _context18.abrupt('return');
|
4787
4760
|
|
4788
4761
|
case 7:
|
4789
4762
|
_this8.keypressStime = null;
|
4790
|
-
|
4763
|
+
_context18.next = 10;
|
4791
4764
|
return _this8.loadCzk(e.target.value);
|
4792
4765
|
|
4793
4766
|
case 10:
|
@@ -4798,7 +4771,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
4798
4771
|
czkvalue: null
|
4799
4772
|
});
|
4800
4773
|
}
|
4801
|
-
|
4774
|
+
_context18.next = 15;
|
4802
4775
|
break;
|
4803
4776
|
|
4804
4777
|
case 14:
|
@@ -4808,14 +4781,14 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
4808
4781
|
|
4809
4782
|
case 15:
|
4810
4783
|
case 'end':
|
4811
|
-
return
|
4784
|
+
return _context18.stop();
|
4812
4785
|
}
|
4813
4786
|
}
|
4814
|
-
},
|
4787
|
+
}, _callee18, _this8);
|
4815
4788
|
}));
|
4816
4789
|
|
4817
|
-
return function (
|
4818
|
-
return
|
4790
|
+
return function (_x13) {
|
4791
|
+
return _ref30.apply(this, arguments);
|
4819
4792
|
};
|
4820
4793
|
}(),
|
4821
4794
|
onFocus: function onFocus(e) {
|
@@ -4872,8 +4845,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
4872
4845
|
_this8.setCurrentModeValue(event.target.value, Math.min(currentMode.maxamount, currentMode.balance));
|
4873
4846
|
},
|
4874
4847
|
defaultValue: currentMode && (0, _utils.getFixedNumber)(brefund ? currentMode.value : Math.min(currentMode.value, currentMode.maxamount, currentMode.balance)),
|
4875
|
-
ref: function ref(
|
4876
|
-
return _this8["inputCzkAmount"] =
|
4848
|
+
ref: function ref(_ref31) {
|
4849
|
+
return _this8["inputCzkAmount"] = _ref31;
|
4877
4850
|
},
|
4878
4851
|
onFocus: function onFocus(e) {
|
4879
4852
|
_this8.inputkey = "inputCzkAmount";
|
@@ -4967,7 +4940,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
4967
4940
|
_react2.default.createElement(
|
4968
4941
|
_modal2.default,
|
4969
4942
|
(0, _defineProperty3.default)({
|
4970
|
-
wrapClassName: 'djq ' +
|
4943
|
+
wrapClassName: 'djq ' + (this.voucherRunningFast ? 'no-zoom' : '') + ' ' + (this.isHorizontalPad ? 'extraHeight' : '') + ' passwordContainer',
|
4971
4944
|
width: '400px',
|
4972
4945
|
visible: this.state.showSetPwdModal,
|
4973
4946
|
backdropClosable: false,
|
@@ -4992,48 +4965,74 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
4992
4965
|
'\u786E\u5B9A'
|
4993
4966
|
)
|
4994
4967
|
)),
|
4995
|
-
_react2.default.createElement(
|
4996
|
-
return _this8.modifyPass = _ref28;
|
4997
|
-
}, cardList: this.store.paymode.currentMode, cancelModal: this.handleSetPwdCancel })
|
4998
|
-
),
|
4999
|
-
_react2.default.createElement(
|
5000
|
-
_modal2.default,
|
5001
|
-
(0, _defineProperty3.default)({
|
5002
|
-
wrapClassName: 'djq ' + _index.hotKey.hotKeyBindClass('5', 'confirmPwdWraper') + ' ' + (this.isHorizontalPad ? 'extraHeight' : ''),
|
5003
|
-
width: '400px',
|
5004
|
-
visible: this.state.confirmStatus,
|
5005
|
-
backdropClosable: false,
|
5006
|
-
destroyOnClose: true,
|
5007
|
-
footer: null,
|
5008
|
-
onCancel: this.handleConfirmPwdCancel,
|
5009
|
-
keyboard: false,
|
5010
|
-
centered: !this.isHorizontalPad ? true : false,
|
5011
|
-
title: '\u50A8\u503C\u5361',
|
5012
|
-
zIndex: 1007
|
5013
|
-
}, 'footer', _react2.default.createElement(
|
4968
|
+
_react2.default.createElement(
|
5014
4969
|
'div',
|
5015
|
-
{ className: '
|
4970
|
+
{ className: 'setPwdContainer' },
|
5016
4971
|
_react2.default.createElement(
|
5017
|
-
|
5018
|
-
{
|
5019
|
-
|
4972
|
+
'div',
|
4973
|
+
{ className: 'setPwdDiv' },
|
4974
|
+
_react2.default.createElement(
|
4975
|
+
'div',
|
4976
|
+
{ className: 'one' },
|
4977
|
+
'\u65B0\u5BC6\u7801'
|
4978
|
+
),
|
4979
|
+
_react2.default.createElement(
|
4980
|
+
'div',
|
4981
|
+
{ className: 'two' },
|
4982
|
+
_react2.default.createElement(_input2.default.Password, {
|
4983
|
+
className: 'content',
|
4984
|
+
placeholder: '\u8BF7\u8F93\u51656\u4F4D\u6570\u5B57\u5BC6\u7801',
|
4985
|
+
style: { width: 266, height: 32 },
|
4986
|
+
maxLength: 6,
|
4987
|
+
value: newPass,
|
4988
|
+
ref: function ref(input) {
|
4989
|
+
return _this8.inputNewAmount = input;
|
4990
|
+
},
|
4991
|
+
onChange: function onChange(value) {
|
4992
|
+
return _this8.setPwdValue('newPass', value.target.value);
|
4993
|
+
},
|
4994
|
+
onBlur: function onBlur(value) {
|
4995
|
+
return _this8.handleBlur('newPass');
|
4996
|
+
},
|
4997
|
+
onPressEnter: function onPressEnter() {
|
4998
|
+
return _this8.onPressEnterCzk('newPass');
|
4999
|
+
}
|
5000
|
+
})
|
5001
|
+
)
|
5020
5002
|
),
|
5021
5003
|
_react2.default.createElement(
|
5022
|
-
|
5023
|
-
{
|
5024
|
-
|
5004
|
+
'div',
|
5005
|
+
{ className: 'setPwdDiv' },
|
5006
|
+
_react2.default.createElement(
|
5007
|
+
'div',
|
5008
|
+
{ className: 'one' },
|
5009
|
+
'\u786E\u8BA4\u65B0\u5BC6\u7801'
|
5010
|
+
),
|
5011
|
+
_react2.default.createElement(
|
5012
|
+
'div',
|
5013
|
+
{ className: 'two' },
|
5014
|
+
_react2.default.createElement(_input2.default.Password, {
|
5015
|
+
className: 'content',
|
5016
|
+
placeholder: '\u8BF7\u786E\u8BA46\u4F4D\u6570\u5B57\u5BC6\u7801',
|
5017
|
+
style: { width: 266, height: 32 },
|
5018
|
+
maxLength: 6,
|
5019
|
+
value: newPassConfirm,
|
5020
|
+
ref: function ref(input) {
|
5021
|
+
return _this8.inputConfirmAmount = input;
|
5022
|
+
},
|
5023
|
+
onChange: function onChange(value) {
|
5024
|
+
return _this8.setPwdValue('newPassConfirm', value.target.value);
|
5025
|
+
},
|
5026
|
+
onBlur: function onBlur(value) {
|
5027
|
+
return _this8.handleBlur('newPassConfirm');
|
5028
|
+
},
|
5029
|
+
onPressEnter: function onPressEnter() {
|
5030
|
+
return _this8.onPressEnterCzk('newPassConfirm');
|
5031
|
+
}
|
5032
|
+
})
|
5033
|
+
)
|
5025
5034
|
)
|
5026
|
-
)
|
5027
|
-
_react2.default.createElement(_confirmPwd2.default, {
|
5028
|
-
isLimit: 'yes',
|
5029
|
-
placeholder: '',
|
5030
|
-
maxLength: 6,
|
5031
|
-
labelName: '\u50A8\u503C\u4F59\u989D\u5BC6\u7801',
|
5032
|
-
ok: this.handleConfirmPwdModal,
|
5033
|
-
getConfirmPwd: this.getConfirmPwd,
|
5034
|
-
params: 'pay',
|
5035
|
-
amount: this.store.paymode.currentMode && (0, _utils.getFixedNumber)(this.store.paymode.currentMode.value)
|
5036
|
-
})
|
5035
|
+
)
|
5037
5036
|
),
|
5038
5037
|
_react2.default.createElement(
|
5039
5038
|
_modal2.default,
|
@@ -5517,8 +5516,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
5517
5516
|
_this8.setCurrentModeValue(e.target.value, Math.min(currentMode.maxamount, currentMode.member.exchangable));
|
5518
5517
|
},
|
5519
5518
|
defaultValue: currentMode && currentMode.member && (0, _utils.getFixedNumber)(Math.min(currentMode.value, currentMode.maxamount, currentMode.member.exchangable)),
|
5520
|
-
ref: function ref(
|
5521
|
-
return _this8["inputJfdxAmount"] =
|
5519
|
+
ref: function ref(_ref32) {
|
5520
|
+
return _this8["inputJfdxAmount"] = _ref32;
|
5522
5521
|
},
|
5523
5522
|
onFocus: function onFocus(e) {
|
5524
5523
|
_this8.inputkey = "inputJfdxAmount";
|