tplus-components-touch 3.53.8 → 3.54.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/collection/api.js +105 -0
- package/dist/components/collection/api.js.map +1 -0
- package/dist/components/collection/index.js +483 -0
- package/dist/components/collection/index.js.map +1 -0
- package/dist/components/collection/searchView/index.js +296 -0
- package/dist/components/collection/searchView/index.js.map +1 -0
- package/dist/components/collection/searchView/index.less +134 -0
- package/dist/components/commonForm/addressPicker/index.js +8 -22
- package/dist/components/commonForm/addressPicker/index.js.map +1 -1
- package/dist/components/hotKey/index.js +5 -10
- package/dist/components/hotKey/index.js.map +1 -1
- package/dist/components/hotKey/localConfig.js +32 -6
- package/dist/components/hotKey/localConfig.js.map +1 -1
- package/dist/components/password/ModifyPass.js +426 -0
- package/dist/components/password/ModifyPass.js.map +1 -0
- package/dist/components/password/api.js +100 -0
- package/dist/components/password/api.js.map +1 -0
- package/dist/components/password/confirmPwd.js +212 -0
- package/dist/components/password/confirmPwd.js.map +1 -0
- package/dist/components/password/store.js +282 -0
- package/dist/components/password/store.js.map +1 -0
- package/dist/components/password/style.less +95 -0
- package/dist/components/settlement/settlement.js +600 -780
- package/dist/components/settlement/settlement.js.map +1 -1
- package/dist/components/settlement/settlement.less +27 -0
- package/dist/components/settlement/settlementApi.js +2 -2
- package/dist/components/settlement/settlementApi.js.map +1 -1
- package/dist/components/settlement/settlementStore.js +566 -394
- package/dist/components/settlement/settlementStore.js.map +1 -1
- package/dist/components/ticon/iconfont/demo_index.html +72 -3
- package/dist/components/ticon/iconfont/iconfont.css +15 -3
- 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 +21 -0
- package/dist/components/ticon/iconfont/iconfont.ttf +0 -0
- package/dist/components/ticon/iconfont/iconfont.woff +0 -0
- package/dist/components/ticon/iconfont/iconfont.woff2 +0 -0
- package/dist/components/touchTable/index.js +0 -2
- package/dist/components/touchTable/index.js.map +1 -1
- package/dist/index.js +22 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
@@ -36,6 +36,10 @@ 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
|
+
|
39
43
|
var _getIterator2 = require('babel-runtime/core-js/get-iterator');
|
40
44
|
|
41
45
|
var _getIterator3 = _interopRequireDefault(_getIterator2);
|
@@ -48,10 +52,6 @@ var _toConsumableArray2 = require('babel-runtime/helpers/toConsumableArray');
|
|
48
52
|
|
49
53
|
var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2);
|
50
54
|
|
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,10 +182,6 @@ 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
|
-
|
189
185
|
var _ticon = require('../ticon');
|
190
186
|
|
191
187
|
var _ticon2 = _interopRequireDefault(_ticon);
|
@@ -220,6 +216,14 @@ var _moreCzkTable = require('./moreCzkTable');
|
|
220
216
|
|
221
217
|
var _moreCzkTable2 = _interopRequireDefault(_moreCzkTable);
|
222
218
|
|
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
|
+
|
223
227
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
224
228
|
|
225
229
|
var hasElectron = _mutantsMicrofx.env.platform === _mutantsMicrofx.env.constant.platform.electron;
|
@@ -269,7 +273,10 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
269
273
|
storageValue: '0.00',
|
270
274
|
czkValue: null,
|
271
275
|
selectedRowIndex: 0,
|
272
|
-
isNotAutoFocus: true
|
276
|
+
isNotAutoFocus: true,
|
277
|
+
returnAmount: 0, // 赊销退款金额
|
278
|
+
confirmStatus: false //确认密码弹框
|
279
|
+
};
|
273
280
|
_this2.compoundHotkeysList = (window.$.operationControl[5] ? window.$.operationControl[5].control || [] : []).map(function (key) {
|
274
281
|
return key.toLocaleUpperCase();
|
275
282
|
});
|
@@ -352,12 +359,25 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
352
359
|
};
|
353
360
|
|
354
361
|
_this2.payQuick = function () {
|
355
|
-
var
|
362
|
+
var IdbusiType = _this2.context.viewModel.data.IdbusiType;
|
363
|
+
var _this2$state = _this2.state,
|
364
|
+
currentKey = _this2$state.currentKey,
|
365
|
+
returnAmount = _this2$state.returnAmount;
|
356
366
|
|
357
367
|
var _enumController$getEn = _mutantsUtil.enumController.getEnumOj(),
|
358
368
|
PayStyle = _enumController$getEn.PayStyle;
|
359
369
|
|
360
|
-
_this2.store.init(
|
370
|
+
_this2.store.init({
|
371
|
+
context: _this2.props.type == 1 ? null : _this2.context,
|
372
|
+
amounthandler: _this2.props.onHandleAmount,
|
373
|
+
datasource: _this2.props.dataSource.Code_02,
|
374
|
+
storeinfo: _this2.props.storeInfo,
|
375
|
+
bquick: true,
|
376
|
+
amount: IdbusiType === 42 ? -returnAmount : _this2.props.amount,
|
377
|
+
type: _this2.props.type,
|
378
|
+
data: _this2.props.dto,
|
379
|
+
payModeKey: currentKey
|
380
|
+
});
|
361
381
|
var amount = _this2.store.paymode.amount;
|
362
382
|
if (amount == 0) {
|
363
383
|
_this2.settleZero();
|
@@ -394,7 +414,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
394
414
|
_this2.setState({
|
395
415
|
settleDisabled: false
|
396
416
|
});
|
397
|
-
if (type
|
417
|
+
if (!type) {
|
398
418
|
var count = _this2.handleShowPrototype();
|
399
419
|
if (!isReturn && isAutoShowCouponWhenCash && count > 0) {
|
400
420
|
_this2.setState({
|
@@ -418,7 +438,22 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
418
438
|
};
|
419
439
|
|
420
440
|
_this2.payFun = function () {
|
421
|
-
|
441
|
+
var IdbusiType = _this2.context.viewModel.data.IdbusiType;
|
442
|
+
var returnAmount = _this2.state.returnAmount;
|
443
|
+
|
444
|
+
_this2.store.init({
|
445
|
+
context: _this2.props.type == 1 ? null : _this2.context,
|
446
|
+
amounthandler: _this2.props.onHandleAmount,
|
447
|
+
datasource: _this2.props.dataSource.Code_02,
|
448
|
+
storeinfo: _this2.props.storeInfo,
|
449
|
+
bquick: false,
|
450
|
+
amount: IdbusiType === 42 ? -returnAmount : _this2.props.amount,
|
451
|
+
type: _this2.props.type,
|
452
|
+
data: _this2.props.dto,
|
453
|
+
creditSalesVoucher: _this2.props.creditSalesVoucher,
|
454
|
+
saleTotalTaxAmount: _this2.props.saleTotalTaxAmount,
|
455
|
+
custVendorId: _this2.props.custVendorId
|
456
|
+
});
|
422
457
|
var amount = _this2.store.paymode.amount;
|
423
458
|
if (amount == 0) {
|
424
459
|
_this2.settleZero();
|
@@ -517,7 +552,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
517
552
|
_this2.setState({
|
518
553
|
settleDisabled: false
|
519
554
|
});
|
520
|
-
if (type
|
555
|
+
if (!type) {
|
521
556
|
var count = _this2.handleShowPrototype();
|
522
557
|
if (!isReturn && isAutoShowCouponWhenCash && count > 0) {
|
523
558
|
_this2.setState({
|
@@ -719,9 +754,9 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
719
754
|
};
|
720
755
|
|
721
756
|
_this2.handleMoreCzkOk = function () {
|
722
|
-
var _this2$
|
723
|
-
memberdata1 = _this2$
|
724
|
-
selectedRowIndex = _this2$
|
757
|
+
var _this2$state2 = _this2.state,
|
758
|
+
memberdata1 = _this2$state2.memberdata1,
|
759
|
+
selectedRowIndex = _this2$state2.selectedRowIndex;
|
725
760
|
|
726
761
|
_this2.store.paymode.updateCardInfo(memberdata1[selectedRowIndex]);
|
727
762
|
_this2.handleCzkMoreData();
|
@@ -853,73 +888,99 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
853
888
|
};
|
854
889
|
|
855
890
|
_this2.handleSetModal = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee4() {
|
856
|
-
var _this2$state2, newPass, newPassConfirm, updataMemberInfo, result, cardTypeEnum, resp;
|
857
|
-
|
858
891
|
return _regenerator2.default.wrap(function _callee4$(_context4) {
|
859
892
|
while (1) {
|
860
893
|
switch (_context4.prev = _context4.next) {
|
861
894
|
case 0:
|
862
|
-
|
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;
|
895
|
+
_context4.t0 = _this2.modifyPass;
|
870
896
|
|
871
|
-
if (!
|
872
|
-
_context4.next =
|
897
|
+
if (!_context4.t0) {
|
898
|
+
_context4.next = 4;
|
873
899
|
break;
|
874
900
|
}
|
875
901
|
|
902
|
+
_context4.next = 4;
|
903
|
+
return _this2.modifyPass.handleOk(_this2.handleCzkData, _this2.store, _this2.props.updateMemberInfo);
|
904
|
+
|
905
|
+
case 4:
|
906
|
+
case 'end':
|
907
|
+
return _context4.stop();
|
908
|
+
}
|
909
|
+
}
|
910
|
+
}, _callee4, _this3);
|
911
|
+
}));
|
912
|
+
_this2.handleConfirmPwdModal = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee5() {
|
913
|
+
var curmode, result;
|
914
|
+
return _regenerator2.default.wrap(function _callee5$(_context5) {
|
915
|
+
while (1) {
|
916
|
+
switch (_context5.prev = _context5.next) {
|
917
|
+
case 0:
|
876
918
|
_this2.setState({
|
877
|
-
|
878
|
-
czkVisible: true,
|
879
|
-
newPass: '',
|
880
|
-
newPassConfirm: ''
|
919
|
+
confirmStatus: false
|
881
920
|
});
|
882
|
-
|
883
|
-
|
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);
|
921
|
+
curmode = _this2.store.paymode.currentMode;
|
922
|
+
//密码校验
|
890
923
|
|
891
|
-
|
892
|
-
|
893
|
-
|
894
|
-
}
|
924
|
+
_context5.next = 4;
|
925
|
+
return _this2.store.validePwd({
|
926
|
+
pwd: _this2.state.confirmPwd
|
927
|
+
});
|
895
928
|
|
896
|
-
|
897
|
-
|
929
|
+
case 4:
|
930
|
+
result = _context5.sent;
|
898
931
|
|
899
|
-
|
900
|
-
|
932
|
+
if (!(result == "")) {
|
933
|
+
_context5.next = 10;
|
934
|
+
break;
|
935
|
+
}
|
901
936
|
|
902
|
-
|
937
|
+
//成功
|
938
|
+
//返回
|
939
|
+
_this2.setCurrentFocusAndAddPay(curmode.paymentType, null, curmode.paymethodId);
|
940
|
+
_promise2.default.resolve();
|
941
|
+
_context5.next = 13;
|
942
|
+
break;
|
903
943
|
|
904
|
-
case
|
905
|
-
|
906
|
-
|
907
|
-
}
|
944
|
+
case 10:
|
945
|
+
_this2.setState({
|
946
|
+
confirmStatus: true
|
947
|
+
});
|
948
|
+
//Message.info("密码不正确");
|
949
|
+
_context5.next = 13;
|
950
|
+
return _promise2.default.reject(result);
|
908
951
|
|
909
|
-
case
|
952
|
+
case 13:
|
910
953
|
case 'end':
|
911
|
-
return
|
954
|
+
return _context5.stop();
|
912
955
|
}
|
913
956
|
}
|
914
|
-
},
|
957
|
+
}, _callee5, _this3);
|
915
958
|
}));
|
916
959
|
|
960
|
+
_this2.handleConfirmPwdCancel = function () {
|
961
|
+
_this2.setState({
|
962
|
+
confirmStatus: false
|
963
|
+
});
|
964
|
+
};
|
965
|
+
|
966
|
+
_this2.getConfirmPwd = function (value) {
|
967
|
+
_this2.setState({
|
968
|
+
confirmPwd: value
|
969
|
+
});
|
970
|
+
};
|
971
|
+
|
972
|
+
_this2.changeBtnDisabled = function (value) {
|
973
|
+
_this2.setState({
|
974
|
+
btnDissabled: value
|
975
|
+
});
|
976
|
+
};
|
977
|
+
|
917
978
|
_this2.onPressEnterCzk = function (field) {
|
918
|
-
var
|
919
|
-
|
920
|
-
newPass =
|
921
|
-
|
922
|
-
newPassConfirm =
|
979
|
+
var _ref6 = _this2.state || {},
|
980
|
+
_ref6$newPass = _ref6.newPass,
|
981
|
+
newPass = _ref6$newPass === undefined ? '' : _ref6$newPass,
|
982
|
+
_ref6$newPassConfirm = _ref6.newPassConfirm,
|
983
|
+
newPassConfirm = _ref6$newPassConfirm === undefined ? '' : _ref6$newPassConfirm;
|
923
984
|
|
924
985
|
if (field === 'newPass' && newPass.length === 6) {
|
925
986
|
_this2.inputConfirmAmount.input.focus();
|
@@ -929,60 +990,6 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
929
990
|
}
|
930
991
|
};
|
931
992
|
|
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
|
-
|
986
993
|
_this2.setInventoryFocus = function () {
|
987
994
|
if (!!_this2.isHorizontalPad) return;
|
988
995
|
var doms = document.getElementsByClassName('app hot-key-focus-container');
|
@@ -1095,8 +1102,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
1095
1102
|
};
|
1096
1103
|
|
1097
1104
|
_this2.checkOfflineEnable = function (paymode, key) {
|
1098
|
-
var
|
1099
|
-
paymodes =
|
1105
|
+
var _ref7 = paymode || {},
|
1106
|
+
paymodes = _ref7.paymodes;
|
1100
1107
|
|
1101
1108
|
var isOffline = _mutantsMicrofx.stores.offlineSys.isOffline;
|
1102
1109
|
|
@@ -1328,7 +1335,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
1328
1335
|
|
1329
1336
|
var storeType = _this2.props.type;
|
1330
1337
|
|
1331
|
-
if (storeType
|
1338
|
+
if (!storeType && boriginReturn && (type == PayStyle.hyczk || type == PayStyle.djq || type == PayStyle.jfdx)) {
|
1332
1339
|
_message2.default.info('原单退货时,该结算方式不可以删除。');
|
1333
1340
|
} else {
|
1334
1341
|
_this2.store.delPay(index, bookType);
|
@@ -1474,18 +1481,18 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
1474
1481
|
if (_this2.czkdebounced) {
|
1475
1482
|
return;
|
1476
1483
|
}
|
1477
|
-
_this2.czkdebounced = (0, _debounce3.default)((0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function
|
1484
|
+
_this2.czkdebounced = (0, _debounce3.default)((0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee6() {
|
1478
1485
|
var returnType, memberdata1;
|
1479
|
-
return _regenerator2.default.wrap(function
|
1486
|
+
return _regenerator2.default.wrap(function _callee6$(_context6) {
|
1480
1487
|
while (1) {
|
1481
|
-
switch (
|
1488
|
+
switch (_context6.prev = _context6.next) {
|
1482
1489
|
case 0:
|
1483
1490
|
returnType = _this2.getNotBoriginReturn();
|
1484
|
-
|
1491
|
+
_context6.next = 3;
|
1485
1492
|
return _this2.store.loadCzk(v, returnType);
|
1486
1493
|
|
1487
1494
|
case 3:
|
1488
|
-
memberdata1 =
|
1495
|
+
memberdata1 = _context6.sent;
|
1489
1496
|
|
1490
1497
|
if (memberdata1 && memberdata1.length === 1) {
|
1491
1498
|
if (_this2.store.paymode.currentMode.storageCardNo) {
|
@@ -1503,10 +1510,10 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
1503
1510
|
|
1504
1511
|
case 5:
|
1505
1512
|
case 'end':
|
1506
|
-
return
|
1513
|
+
return _context6.stop();
|
1507
1514
|
}
|
1508
1515
|
}
|
1509
|
-
},
|
1516
|
+
}, _callee6, _this3);
|
1510
1517
|
})), 1000, {
|
1511
1518
|
'leading': true,
|
1512
1519
|
'trailing': false
|
@@ -1710,11 +1717,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
1710
1717
|
}
|
1711
1718
|
};
|
1712
1719
|
|
1713
|
-
_this2.settleUnReturn = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function
|
1720
|
+
_this2.settleUnReturn = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee8() {
|
1714
1721
|
var that;
|
1715
|
-
return _regenerator2.default.wrap(function
|
1722
|
+
return _regenerator2.default.wrap(function _callee8$(_context8) {
|
1716
1723
|
while (1) {
|
1717
|
-
switch (
|
1724
|
+
switch (_context8.prev = _context8.next) {
|
1718
1725
|
case 0:
|
1719
1726
|
that = _this2;
|
1720
1727
|
|
@@ -1738,18 +1745,18 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
1738
1745
|
onOk: function onOk() {
|
1739
1746
|
var _this4 = this;
|
1740
1747
|
|
1741
|
-
return (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function
|
1748
|
+
return (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee7() {
|
1742
1749
|
var result;
|
1743
|
-
return _regenerator2.default.wrap(function
|
1750
|
+
return _regenerator2.default.wrap(function _callee7$(_context7) {
|
1744
1751
|
while (1) {
|
1745
|
-
switch (
|
1752
|
+
switch (_context7.prev = _context7.next) {
|
1746
1753
|
case 0:
|
1747
1754
|
window.__queryingModal = (0, _utils.openQueryingModal)();
|
1748
|
-
|
1755
|
+
_context7.next = 3;
|
1749
1756
|
return that.store.querySettleResult();
|
1750
1757
|
|
1751
1758
|
case 3:
|
1752
|
-
result =
|
1759
|
+
result = _context7.sent;
|
1753
1760
|
|
1754
1761
|
setTimeout(function () {
|
1755
1762
|
if (window.__queryingModal) {
|
@@ -1757,34 +1764,34 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
1757
1764
|
window.__queryingModal = null;
|
1758
1765
|
}
|
1759
1766
|
}, 0);
|
1760
|
-
|
1761
|
-
|
1767
|
+
_context7.t0 = result.Flag;
|
1768
|
+
_context7.next = _context7.t0 === "0" ? 8 : _context7.t0 === "1" ? 11 : _context7.t0 === "2" ? 13 : 15;
|
1762
1769
|
break;
|
1763
1770
|
|
1764
1771
|
case 8:
|
1765
1772
|
//成功
|
1766
1773
|
that.store.setDtoID(result.ID);
|
1767
1774
|
that.settleSuccess();
|
1768
|
-
return
|
1775
|
+
return _context7.abrupt('break', 15);
|
1769
1776
|
|
1770
1777
|
case 11:
|
1771
1778
|
//处理中
|
1772
1779
|
that.settleUnReturn();
|
1773
1780
|
// Message.info("结算正在处理中,请稍后再次查询。");
|
1774
|
-
return
|
1781
|
+
return _context7.abrupt('break', 15);
|
1775
1782
|
|
1776
1783
|
case 13:
|
1777
1784
|
//失败
|
1778
1785
|
_message2.default.info('\u7ED3\u7B97\u5931\u8D25\uFF0C\u539F\u56E0:' + result.Message + '\u3002');
|
1779
1786
|
// that.settleCanceled();
|
1780
|
-
return
|
1787
|
+
return _context7.abrupt('break', 15);
|
1781
1788
|
|
1782
1789
|
case 15:
|
1783
1790
|
case 'end':
|
1784
|
-
return
|
1791
|
+
return _context7.stop();
|
1785
1792
|
}
|
1786
1793
|
}
|
1787
|
-
},
|
1794
|
+
}, _callee7, _this4);
|
1788
1795
|
}))();
|
1789
1796
|
},
|
1790
1797
|
onCancel: function onCancel() {
|
@@ -1794,10 +1801,10 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
1794
1801
|
|
1795
1802
|
case 2:
|
1796
1803
|
case 'end':
|
1797
|
-
return
|
1804
|
+
return _context8.stop();
|
1798
1805
|
}
|
1799
1806
|
}
|
1800
|
-
},
|
1807
|
+
}, _callee8, _this3);
|
1801
1808
|
}));
|
1802
1809
|
|
1803
1810
|
_this2.settleCanceled = function () {
|
@@ -1806,119 +1813,131 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
1806
1813
|
_this2.cancelState();
|
1807
1814
|
};
|
1808
1815
|
|
1809
|
-
_this2.settleSuccess =
|
1810
|
-
var
|
1816
|
+
_this2.settleSuccess = function () {
|
1817
|
+
var _ref10 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee9(params) {
|
1818
|
+
var _enumController$getEn20, PayStyle, _this2$store$paymode, amount, received, thePaymodes, IdbusiType, charge, openCashBox, _this, showTwoScreen, isFull, resp1;
|
1811
1819
|
|
1812
|
-
|
1813
|
-
|
1814
|
-
|
1815
|
-
|
1816
|
-
|
1817
|
-
|
1818
|
-
|
1819
|
-
|
1820
|
-
|
1821
|
-
|
1822
|
-
|
1823
|
-
|
1824
|
-
|
1820
|
+
return _regenerator2.default.wrap(function _callee9$(_context9) {
|
1821
|
+
while (1) {
|
1822
|
+
switch (_context9.prev = _context9.next) {
|
1823
|
+
case 0:
|
1824
|
+
//提示成功
|
1825
|
+
_enumController$getEn20 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn20.PayStyle;
|
1826
|
+
_this2$store$paymode = _this2.store.paymode, amount = _this2$store$paymode.amount, received = _this2$store$paymode.received, thePaymodes = _this2$store$paymode.thePaymodes;
|
1827
|
+
IdbusiType = _this2.store.dto.IdbusiType;
|
1828
|
+
charge = _this2.store.paymode.charge;
|
1829
|
+
openCashBox = !!(0, _find3.default)(thePaymodes, function (mode) {
|
1830
|
+
return mode.paymentType == PayStyle.xianjin;
|
1831
|
+
});
|
1832
|
+
// 判断双屏显示。
|
1825
1833
|
|
1826
|
-
|
1834
|
+
_this = _this2;
|
1827
1835
|
|
1828
|
-
|
1829
|
-
|
1830
|
-
|
1831
|
-
|
1832
|
-
|
1833
|
-
|
1834
|
-
|
1835
|
-
|
1836
|
-
|
1837
|
-
|
1838
|
-
|
1836
|
+
showTwoScreen = function showTwoScreen(amount, received, charge) {
|
1837
|
+
var getScreenType = function getScreenType() {
|
1838
|
+
var flag = false;
|
1839
|
+
if (_this.hasElectron === true || _this.isHorizontalSunMi) {
|
1840
|
+
var data = _mutantsMicrofx.localStore.get('setting_setData') || [];
|
1841
|
+
data = data.filter(function (item) {
|
1842
|
+
return item.Name === 'EnableDoubleScreen';
|
1843
|
+
});
|
1844
|
+
data = data && data.length > 0 ? data.shift() : null;
|
1845
|
+
if (data && data.Value === '1') {
|
1846
|
+
flag = true;
|
1847
|
+
}
|
1848
|
+
}
|
1849
|
+
return flag;
|
1850
|
+
};
|
1851
|
+
var params = {
|
1852
|
+
step: 3,
|
1853
|
+
data: {
|
1854
|
+
amount: amount,
|
1855
|
+
received: received,
|
1856
|
+
charge: charge
|
1857
|
+
}
|
1858
|
+
};
|
1859
|
+
var screenType = getScreenType();
|
1860
|
+
if (screenType === true) {
|
1861
|
+
//副屏-第二屏幕
|
1862
|
+
if (_this.isHorizontalSunMi) {
|
1863
|
+
window.sunMi_PresentationManager.sendMessageToSecondScreen(params);
|
1864
|
+
setTimeout(function () {
|
1865
|
+
window.sunMi_PresentationManager.sendMessageToSecondScreen({ step: 1 });
|
1866
|
+
}, 3000);
|
1867
|
+
} else {
|
1868
|
+
_mutantsMicrofx.nativeMs && _mutantsMicrofx.nativeMs.setIpcRendererMethod('ReplyScreen', params);
|
1839
1869
|
}
|
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);
|
1856
1870
|
setTimeout(function () {
|
1857
|
-
|
1858
|
-
},
|
1871
|
+
_this.props.onSettleSuccess && _this.props.onSettleSuccess({ openCashBox: openCashBox });
|
1872
|
+
}, 1500);
|
1859
1873
|
} else {
|
1860
|
-
_mutantsMicrofx.nativeMs && _mutantsMicrofx.nativeMs.setIpcRendererMethod('ReplyScreen', params);
|
1861
|
-
}
|
1862
|
-
setTimeout(function () {
|
1863
1874
|
_this.props.onSettleSuccess && _this.props.onSettleSuccess({ openCashBox: openCashBox });
|
1864
|
-
}
|
1865
|
-
}
|
1866
|
-
_this.props.onSettleSuccess && _this.props.onSettleSuccess({ openCashBox: openCashBox });
|
1867
|
-
}
|
1868
|
-
};
|
1875
|
+
}
|
1876
|
+
};
|
1869
1877
|
|
1870
|
-
|
1871
|
-
|
1872
|
-
|
1878
|
+
isFull = _this2.store.isFull;
|
1879
|
+
_context9.next = 10;
|
1880
|
+
return _this2.settleGiftOpenedInRunningFast();
|
1873
1881
|
|
1874
|
-
|
1875
|
-
|
1882
|
+
case 10:
|
1883
|
+
resp1 = _context9.sent;
|
1876
1884
|
|
1877
1885
|
|
1878
|
-
|
1879
|
-
|
1880
|
-
|
1881
|
-
|
1882
|
-
|
1883
|
-
|
1884
|
-
|
1885
|
-
|
1886
|
-
|
1887
|
-
|
1888
|
-
|
1886
|
+
setTimeout(function () {
|
1887
|
+
if (window.__loadingModal) {
|
1888
|
+
window.__loadingModal.destroy();
|
1889
|
+
window.__loadingModal = null;
|
1890
|
+
}
|
1891
|
+
var isXianjin = _this.state.isXianjin;
|
1892
|
+
showTwoScreen(amount, received, charge);
|
1893
|
+
if (isXianjin) _this2.handleGuestShow(4, charge);
|
1894
|
+
_this.setState({
|
1895
|
+
noAlreadyWarn: true
|
1896
|
+
});
|
1889
1897
|
|
1890
|
-
|
1891
|
-
|
1892
|
-
|
1893
|
-
|
1894
|
-
|
1895
|
-
|
1896
|
-
|
1897
|
-
|
1898
|
-
|
1899
|
-
|
1900
|
-
|
1901
|
-
|
1902
|
-
|
1903
|
-
|
1904
|
-
|
1905
|
-
|
1906
|
-
|
1907
|
-
|
1908
|
-
|
1898
|
+
var _this$props = _this.props,
|
1899
|
+
MemberPoints = _this$props.MemberPoints,
|
1900
|
+
isMemberPointsReturn = _this$props.isMemberPointsReturn,
|
1901
|
+
isReturn = _this$props.isReturn;
|
1902
|
+
|
1903
|
+
var message = "支付成功";
|
1904
|
+
if ((isReturn || isMemberPointsReturn) && Number(amount) == Number(0)) {
|
1905
|
+
message = "退货成功";
|
1906
|
+
} else if (MemberPoints && Number(amount) == Number(0)) {
|
1907
|
+
message = "兑换成功";
|
1908
|
+
} else if (IdbusiType == 39 && received == 0) {
|
1909
|
+
message = "取货成功";
|
1910
|
+
}
|
1911
|
+
_mutantsMicrofx.stores.drawerStore.hide();
|
1912
|
+
if (params === 'onCreditReturn') {
|
1913
|
+
_message2.default.warn('退货成功,此单无须退款!');
|
1914
|
+
} else {
|
1915
|
+
window.__successModal = (0, _utils.showSuccessModal)(amount, received, charge, _this.props.onModalClose, isXianjin, message, resp1 && resp1.data, _mutantsMicrofx.stores, IdbusiType, isFull, function () {
|
1916
|
+
_this.handleGuestShow(5);
|
1917
|
+
});
|
1918
|
+
}
|
1919
|
+
_this2.setState({ isXianjin: false });
|
1920
|
+
_this2.cancelState();
|
1921
|
+
}, 0);
|
1909
1922
|
|
1910
|
-
|
1911
|
-
|
1912
|
-
|
1923
|
+
case 12:
|
1924
|
+
case 'end':
|
1925
|
+
return _context9.stop();
|
1926
|
+
}
|
1913
1927
|
}
|
1914
|
-
}
|
1915
|
-
}
|
1916
|
-
|
1917
|
-
|
1928
|
+
}, _callee9, _this3);
|
1929
|
+
}));
|
1930
|
+
|
1931
|
+
return function (_x4) {
|
1932
|
+
return _ref10.apply(this, arguments);
|
1933
|
+
};
|
1934
|
+
}();
|
1935
|
+
|
1936
|
+
_this2.settleGiftOpenedInRunningFast = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee10() {
|
1918
1937
|
var resp, isCheckGift, vocherPayGift, getSettleGift, type;
|
1919
|
-
return _regenerator2.default.wrap(function
|
1938
|
+
return _regenerator2.default.wrap(function _callee10$(_context10) {
|
1920
1939
|
while (1) {
|
1921
|
-
switch (
|
1940
|
+
switch (_context10.prev = _context10.next) {
|
1922
1941
|
case 0:
|
1923
1942
|
resp = false;
|
1924
1943
|
isCheckGift = true;
|
@@ -1932,55 +1951,55 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
1932
1951
|
}
|
1933
1952
|
|
1934
1953
|
if (!isCheckGift) {
|
1935
|
-
|
1954
|
+
_context10.next = 16;
|
1936
1955
|
break;
|
1937
1956
|
}
|
1938
1957
|
|
1939
1958
|
getSettleGift = _this2.store.getSettleGift;
|
1940
1959
|
type = _this2.props.type;
|
1941
1960
|
|
1942
|
-
if (
|
1943
|
-
|
1961
|
+
if (type) {
|
1962
|
+
_context10.next = 16;
|
1944
1963
|
break;
|
1945
1964
|
}
|
1946
1965
|
|
1947
|
-
|
1948
|
-
|
1966
|
+
_context10.prev = 7;
|
1967
|
+
_context10.next = 10;
|
1949
1968
|
return getSettleGift();
|
1950
1969
|
|
1951
1970
|
case 10:
|
1952
|
-
resp =
|
1953
|
-
|
1971
|
+
resp = _context10.sent;
|
1972
|
+
_context10.next = 16;
|
1954
1973
|
break;
|
1955
1974
|
|
1956
1975
|
case 13:
|
1957
|
-
|
1958
|
-
|
1976
|
+
_context10.prev = 13;
|
1977
|
+
_context10.t0 = _context10['catch'](7);
|
1959
1978
|
|
1960
1979
|
console.log("获取支付礼包getSettleGift失败");
|
1961
1980
|
|
1962
1981
|
case 16:
|
1963
|
-
return
|
1982
|
+
return _context10.abrupt('return', resp);
|
1964
1983
|
|
1965
1984
|
case 17:
|
1966
1985
|
case 'end':
|
1967
|
-
return
|
1986
|
+
return _context10.stop();
|
1968
1987
|
}
|
1969
1988
|
}
|
1970
|
-
},
|
1989
|
+
}, _callee10, _this3, [[7, 13]]);
|
1971
1990
|
}));
|
1972
1991
|
|
1973
1992
|
_this2.handleGuestShow = function (dtype, value) {
|
1974
1993
|
if (_this2.hasElectron === false) return;
|
1975
1994
|
var dt = _mutantsMicrofx.localStore.get('portsetting_hardSet') || [];
|
1976
1995
|
|
1977
|
-
var
|
1978
|
-
guestshow_enable =
|
1979
|
-
guestshow_clear =
|
1980
|
-
guestshow_welcome =
|
1981
|
-
guestshow_collect =
|
1982
|
-
guestshow_refund =
|
1983
|
-
guestshow_change =
|
1996
|
+
var _ref12 = dt || {},
|
1997
|
+
guestshow_enable = _ref12.guestshow_enable,
|
1998
|
+
guestshow_clear = _ref12.guestshow_clear,
|
1999
|
+
guestshow_welcome = _ref12.guestshow_welcome,
|
2000
|
+
guestshow_collect = _ref12.guestshow_collect,
|
2001
|
+
guestshow_refund = _ref12.guestshow_refund,
|
2002
|
+
guestshow_change = _ref12.guestshow_change;
|
1984
2003
|
|
1985
2004
|
var hasSuccess = _mutantsMicrofx.localStore && _mutantsMicrofx.localStore.get('portsetting_hardSet_isSuccess');
|
1986
2005
|
if (!guestshow_enable || !!guestshow_enable && hasSuccess == '0') return;
|
@@ -2015,108 +2034,108 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2015
2034
|
};
|
2016
2035
|
|
2017
2036
|
_this2.handleSettle = function () {
|
2018
|
-
var
|
2037
|
+
var _ref13 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee13(args) {
|
2019
2038
|
var handleUserInputs = function () {
|
2020
|
-
var
|
2039
|
+
var _ref15 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee12(promises) {
|
2021
2040
|
var results, _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, p, _result;
|
2022
2041
|
|
2023
|
-
return _regenerator2.default.wrap(function
|
2042
|
+
return _regenerator2.default.wrap(function _callee12$(_context12) {
|
2024
2043
|
while (1) {
|
2025
|
-
switch (
|
2044
|
+
switch (_context12.prev = _context12.next) {
|
2026
2045
|
case 0:
|
2027
2046
|
results = [];
|
2028
|
-
|
2047
|
+
_context12.prev = 1;
|
2029
2048
|
_iteratorNormalCompletion = true;
|
2030
2049
|
_didIteratorError = false;
|
2031
2050
|
_iteratorError = undefined;
|
2032
|
-
|
2051
|
+
_context12.prev = 5;
|
2033
2052
|
_iterator = (0, _getIterator3.default)(promises);
|
2034
2053
|
|
2035
2054
|
case 7:
|
2036
2055
|
if (_iteratorNormalCompletion = (_step = _iterator.next()).done) {
|
2037
|
-
|
2056
|
+
_context12.next = 16;
|
2038
2057
|
break;
|
2039
2058
|
}
|
2040
2059
|
|
2041
2060
|
p = _step.value;
|
2042
|
-
|
2061
|
+
_context12.next = 11;
|
2043
2062
|
return p;
|
2044
2063
|
|
2045
2064
|
case 11:
|
2046
|
-
_result =
|
2065
|
+
_result = _context12.sent;
|
2047
2066
|
|
2048
2067
|
results.push(_result);
|
2049
2068
|
|
2050
2069
|
case 13:
|
2051
2070
|
_iteratorNormalCompletion = true;
|
2052
|
-
|
2071
|
+
_context12.next = 7;
|
2053
2072
|
break;
|
2054
2073
|
|
2055
2074
|
case 16:
|
2056
|
-
|
2075
|
+
_context12.next = 22;
|
2057
2076
|
break;
|
2058
2077
|
|
2059
2078
|
case 18:
|
2060
|
-
|
2061
|
-
|
2079
|
+
_context12.prev = 18;
|
2080
|
+
_context12.t0 = _context12['catch'](5);
|
2062
2081
|
_didIteratorError = true;
|
2063
|
-
_iteratorError =
|
2082
|
+
_iteratorError = _context12.t0;
|
2064
2083
|
|
2065
2084
|
case 22:
|
2066
|
-
|
2067
|
-
|
2085
|
+
_context12.prev = 22;
|
2086
|
+
_context12.prev = 23;
|
2068
2087
|
|
2069
2088
|
if (!_iteratorNormalCompletion && _iterator.return) {
|
2070
2089
|
_iterator.return();
|
2071
2090
|
}
|
2072
2091
|
|
2073
2092
|
case 25:
|
2074
|
-
|
2093
|
+
_context12.prev = 25;
|
2075
2094
|
|
2076
2095
|
if (!_didIteratorError) {
|
2077
|
-
|
2096
|
+
_context12.next = 28;
|
2078
2097
|
break;
|
2079
2098
|
}
|
2080
2099
|
|
2081
2100
|
throw _iteratorError;
|
2082
2101
|
|
2083
2102
|
case 28:
|
2084
|
-
return
|
2103
|
+
return _context12.finish(25);
|
2085
2104
|
|
2086
2105
|
case 29:
|
2087
|
-
return
|
2106
|
+
return _context12.finish(22);
|
2088
2107
|
|
2089
2108
|
case 30:
|
2090
2109
|
window.__loadingModal = (0, _utils.openLoadingModal)();
|
2091
|
-
|
2110
|
+
_context12.next = 33;
|
2092
2111
|
return commit(results);
|
2093
2112
|
|
2094
2113
|
case 33:
|
2095
|
-
|
2114
|
+
_context12.next = 37;
|
2096
2115
|
break;
|
2097
2116
|
|
2098
2117
|
case 35:
|
2099
|
-
|
2100
|
-
|
2118
|
+
_context12.prev = 35;
|
2119
|
+
_context12.t1 = _context12['catch'](1);
|
2101
2120
|
|
2102
2121
|
case 37:
|
2103
2122
|
case 'end':
|
2104
|
-
return
|
2123
|
+
return _context12.stop();
|
2105
2124
|
}
|
2106
2125
|
}
|
2107
|
-
},
|
2126
|
+
}, _callee12, this, [[1, 35], [5, 18, 22, 30], [23,, 25, 29]]);
|
2108
2127
|
}));
|
2109
2128
|
|
2110
|
-
return function handleUserInputs(
|
2111
|
-
return
|
2129
|
+
return function handleUserInputs(_x7) {
|
2130
|
+
return _ref15.apply(this, arguments);
|
2112
2131
|
};
|
2113
2132
|
}();
|
2114
2133
|
|
2115
2134
|
var _enumController$getEn21, PayStyle, _this2$store6, paymode, brefund, boriginReturn, newStyle, isQuickPay, that, status, zeromode, promises, thePaymodes, quickmode, commit;
|
2116
2135
|
|
2117
|
-
return _regenerator2.default.wrap(function
|
2136
|
+
return _regenerator2.default.wrap(function _callee13$(_context13) {
|
2118
2137
|
while (1) {
|
2119
|
-
switch (
|
2138
|
+
switch (_context13.prev = _context13.next) {
|
2120
2139
|
case 0:
|
2121
2140
|
_this2.setState({
|
2122
2141
|
settleDisabled: true
|
@@ -2138,7 +2157,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2138
2157
|
});
|
2139
2158
|
|
2140
2159
|
if (!(that.checkCharge() && Math.abs(paymode.receivable) > that.props.initData("posChangeUpperAmount"))) {
|
2141
|
-
|
2160
|
+
_context13.next = 13;
|
2142
2161
|
break;
|
2143
2162
|
}
|
2144
2163
|
|
@@ -2146,11 +2165,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2146
2165
|
_this2.setState({
|
2147
2166
|
settleDisabled: false
|
2148
2167
|
});
|
2149
|
-
return
|
2168
|
+
return _context13.abrupt('return');
|
2150
2169
|
|
2151
2170
|
case 13:
|
2152
2171
|
if (!(args !== "zero" && !newStyle)) {
|
2153
|
-
|
2172
|
+
_context13.next = 19;
|
2154
2173
|
break;
|
2155
2174
|
}
|
2156
2175
|
|
@@ -2159,7 +2178,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2159
2178
|
});
|
2160
2179
|
|
2161
2180
|
if (!zeromode) {
|
2162
|
-
|
2181
|
+
_context13.next = 19;
|
2163
2182
|
break;
|
2164
2183
|
}
|
2165
2184
|
|
@@ -2167,7 +2186,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2167
2186
|
settleDisabled: false
|
2168
2187
|
});
|
2169
2188
|
_message2.default.error(zeromode.name + ' 的结算金额为零,不可以结算。');
|
2170
|
-
return
|
2189
|
+
return _context13.abrupt('return');
|
2171
2190
|
|
2172
2191
|
case 19:
|
2173
2192
|
promises = [];
|
@@ -2176,14 +2195,14 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2176
2195
|
}) : paymode.thePaymodes, 'orderBy');
|
2177
2196
|
|
2178
2197
|
if (!isQuickPay) {
|
2179
|
-
|
2198
|
+
_context13.next = 27;
|
2180
2199
|
break;
|
2181
2200
|
}
|
2182
2201
|
|
2183
2202
|
quickmode = thePaymodes[0];
|
2184
2203
|
|
2185
2204
|
if (!_this2.checkModeDisabled(quickmode.paymentType, brefund, boriginReturn)) {
|
2186
|
-
|
2205
|
+
_context13.next = 27;
|
2187
2206
|
break;
|
2188
2207
|
}
|
2189
2208
|
|
@@ -2191,7 +2210,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2191
2210
|
settleDisabled: false
|
2192
2211
|
});
|
2193
2212
|
_message2.default.error('退款不能使用' + quickmode.name + '结算,请使用其他结算方式!');
|
2194
|
-
return
|
2213
|
+
return _context13.abrupt('return');
|
2195
2214
|
|
2196
2215
|
case 27:
|
2197
2216
|
(0, _forEach3.default)(thePaymodes, function (mode) {
|
@@ -2201,27 +2220,27 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2201
2220
|
});
|
2202
2221
|
|
2203
2222
|
commit = function () {
|
2204
|
-
var
|
2223
|
+
var _ref14 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee11(values) {
|
2205
2224
|
var result;
|
2206
|
-
return _regenerator2.default.wrap(function
|
2225
|
+
return _regenerator2.default.wrap(function _callee11$(_context11) {
|
2207
2226
|
while (1) {
|
2208
|
-
switch (
|
2227
|
+
switch (_context11.prev = _context11.next) {
|
2209
2228
|
case 0:
|
2210
|
-
|
2229
|
+
_context11.next = 2;
|
2211
2230
|
return _this2.store.commit(_this2.props.bTest);
|
2212
2231
|
|
2213
2232
|
case 2:
|
2214
|
-
result =
|
2233
|
+
result = _context11.sent;
|
2215
2234
|
|
2216
2235
|
if (!(result === true)) {
|
2217
|
-
|
2236
|
+
_context11.next = 8;
|
2218
2237
|
break;
|
2219
2238
|
}
|
2220
2239
|
|
2221
2240
|
//成功
|
2222
2241
|
that.settleSuccess();
|
2223
2242
|
_promise2.default.resolve();
|
2224
|
-
|
2243
|
+
_context11.next = 23;
|
2225
2244
|
break;
|
2226
2245
|
|
2227
2246
|
case 8:
|
@@ -2238,24 +2257,24 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2238
2257
|
}, 0);
|
2239
2258
|
|
2240
2259
|
if (!(result && (result.Code || result.code))) {
|
2241
|
-
|
2260
|
+
_context11.next = 20;
|
2242
2261
|
break;
|
2243
2262
|
}
|
2244
2263
|
|
2245
|
-
|
2246
|
-
|
2264
|
+
_context11.t0 = result.Code || result.code;
|
2265
|
+
_context11.next = _context11.t0 === 'RE_Settle_UnReturn' ? 14 : _context11.t0 === 'ECONNABORTED' ? 18 : 20;
|
2247
2266
|
break;
|
2248
2267
|
|
2249
2268
|
case 14:
|
2250
2269
|
console.log('settlement--RE_Settle_UnReturn--调用清除数据==Focus==');
|
2251
2270
|
_this2.props.clearVoucherData && _this2.props.clearVoucherData();
|
2252
2271
|
_this2.cancelState();
|
2253
|
-
return
|
2272
|
+
return _context11.abrupt('break', 20);
|
2254
2273
|
|
2255
2274
|
case 18:
|
2256
2275
|
//error.code === 'ECONNABORTED' && error.message.indexOf('timeout')
|
2257
2276
|
result.message.indexOf('timeout') > -1 && that.settleUnReturn();
|
2258
|
-
return
|
2277
|
+
return _context11.abrupt('break', 20);
|
2259
2278
|
|
2260
2279
|
case 20:
|
2261
2280
|
if (isQuickPay) {
|
@@ -2263,19 +2282,19 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2263
2282
|
that.cancelState();
|
2264
2283
|
}
|
2265
2284
|
|
2266
|
-
|
2285
|
+
_context11.next = 23;
|
2267
2286
|
return _promise2.default.reject();
|
2268
2287
|
|
2269
2288
|
case 23:
|
2270
2289
|
case 'end':
|
2271
|
-
return
|
2290
|
+
return _context11.stop();
|
2272
2291
|
}
|
2273
2292
|
}
|
2274
|
-
},
|
2293
|
+
}, _callee11, _this3);
|
2275
2294
|
}));
|
2276
2295
|
|
2277
|
-
return function commit(
|
2278
|
-
return
|
2296
|
+
return function commit(_x6) {
|
2297
|
+
return _ref14.apply(this, arguments);
|
2279
2298
|
};
|
2280
2299
|
}();
|
2281
2300
|
|
@@ -2283,127 +2302,24 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2283
2302
|
|
2284
2303
|
case 30:
|
2285
2304
|
case 'end':
|
2286
|
-
return
|
2305
|
+
return _context13.stop();
|
2287
2306
|
}
|
2288
2307
|
}
|
2289
|
-
},
|
2308
|
+
}, _callee13, _this3);
|
2290
2309
|
}));
|
2291
2310
|
|
2292
|
-
return function (
|
2293
|
-
return
|
2311
|
+
return function (_x5) {
|
2312
|
+
return _ref13.apply(this, arguments);
|
2294
2313
|
};
|
2295
2314
|
}();
|
2296
2315
|
|
2297
|
-
_this2.handleCzk = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function
|
2298
|
-
var
|
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;
|
2318
|
-
}
|
2319
|
-
|
2320
|
-
p = _step2.value;
|
2321
|
-
_context14.next = 11;
|
2322
|
-
return p;
|
2323
|
-
|
2324
|
-
case 11:
|
2325
|
-
_result2 = _context14.sent;
|
2326
|
-
|
2327
|
-
results.push(_result2);
|
2328
|
-
|
2329
|
-
case 13:
|
2330
|
-
_iteratorNormalCompletion2 = true;
|
2331
|
-
_context14.next = 7;
|
2332
|
-
break;
|
2333
|
-
|
2334
|
-
case 16:
|
2335
|
-
_context14.next = 22;
|
2336
|
-
break;
|
2337
|
-
|
2338
|
-
case 18:
|
2339
|
-
_context14.prev = 18;
|
2340
|
-
_context14.t0 = _context14['catch'](5);
|
2341
|
-
_didIteratorError2 = true;
|
2342
|
-
_iteratorError2 = _context14.t0;
|
2343
|
-
|
2344
|
-
case 22:
|
2345
|
-
_context14.prev = 22;
|
2346
|
-
_context14.prev = 23;
|
2347
|
-
|
2348
|
-
if (!_iteratorNormalCompletion2 && _iterator2.return) {
|
2349
|
-
_iterator2.return();
|
2350
|
-
}
|
2351
|
-
|
2352
|
-
case 25:
|
2353
|
-
_context14.prev = 25;
|
2354
|
-
|
2355
|
-
if (!_didIteratorError2) {
|
2356
|
-
_context14.next = 28;
|
2357
|
-
break;
|
2358
|
-
}
|
2359
|
-
|
2360
|
-
throw _iteratorError2;
|
2361
|
-
|
2362
|
-
case 28:
|
2363
|
-
return _context14.finish(25);
|
2364
|
-
|
2365
|
-
case 29:
|
2366
|
-
return _context14.finish(22);
|
2367
|
-
|
2368
|
-
case 30:
|
2369
|
-
_context14.next = 32;
|
2370
|
-
return commit(results);
|
2371
|
-
|
2372
|
-
case 32:
|
2373
|
-
_context14.next = 37;
|
2374
|
-
break;
|
2375
|
-
|
2376
|
-
case 34:
|
2377
|
-
_context14.prev = 34;
|
2378
|
-
_context14.t1 = _context14['catch'](1);
|
2379
|
-
|
2380
|
-
if (_context14.t1 != "cancelpwd") {
|
2381
|
-
_message2.default.error(_context14.t1);
|
2382
|
-
setTimeout(function () {
|
2383
|
-
that.handleCzk();
|
2384
|
-
}, 500);
|
2385
|
-
}
|
2386
|
-
|
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
|
-
}));
|
2394
|
-
|
2395
|
-
return function handleUserInputs(_x8) {
|
2396
|
-
return _ref20.apply(this, arguments);
|
2397
|
-
};
|
2398
|
-
}();
|
2399
|
-
|
2400
|
-
var that, curmode, promises, _enumController$getEn22, PayStyle, commit;
|
2316
|
+
_this2.handleCzk = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee14() {
|
2317
|
+
var curmode, promises, _enumController$getEn22, PayStyle;
|
2401
2318
|
|
2402
|
-
return _regenerator2.default.wrap(function
|
2319
|
+
return _regenerator2.default.wrap(function _callee14$(_context14) {
|
2403
2320
|
while (1) {
|
2404
|
-
switch (
|
2321
|
+
switch (_context14.prev = _context14.next) {
|
2405
2322
|
case 0:
|
2406
|
-
that = _this2;
|
2407
2323
|
curmode = _this2.store.paymode.currentMode;
|
2408
2324
|
promises = [];
|
2409
2325
|
|
@@ -2412,76 +2328,23 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2412
2328
|
|
2413
2329
|
if (curmode.paymentType === PayStyle.hyczk) {
|
2414
2330
|
if (curmode.cardTypeEnum === 'BALANCE_CARD') {
|
2415
|
-
!curmode.freePaymentPasswordStore &&
|
2331
|
+
!curmode.freePaymentPasswordStore && _this2.setState({
|
2332
|
+
confirmStatus: true
|
2333
|
+
});
|
2416
2334
|
} else {
|
2417
|
-
curmode.isNeedPassword &&
|
2335
|
+
curmode.isNeedPassword && _this2.setState({
|
2336
|
+
confirmStatus: true
|
2337
|
+
});
|
2418
2338
|
}
|
2419
2339
|
}
|
2420
2340
|
}
|
2421
2341
|
|
2422
|
-
|
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;
|
2431
|
-
break;
|
2432
|
-
}
|
2433
|
-
|
2434
|
-
_context13.next = 3;
|
2435
|
-
return that.store.validePwd(values[0]);
|
2436
|
-
|
2437
|
-
case 3:
|
2438
|
-
_context13.t0 = _context13.sent;
|
2439
|
-
_context13.next = 7;
|
2440
|
-
break;
|
2441
|
-
|
2442
|
-
case 6:
|
2443
|
-
_context13.t0 = "";
|
2444
|
-
|
2445
|
-
case 7:
|
2446
|
-
result = _context13.t0;
|
2447
|
-
|
2448
|
-
if (!(result == "")) {
|
2449
|
-
_context13.next = 13;
|
2450
|
-
break;
|
2451
|
-
}
|
2452
|
-
|
2453
|
-
//成功
|
2454
|
-
//返回
|
2455
|
-
that.setCurrentFocusAndAddPay(curmode.paymentType, null, curmode.paymethodId);
|
2456
|
-
_promise2.default.resolve();
|
2457
|
-
_context13.next = 15;
|
2458
|
-
break;
|
2459
|
-
|
2460
|
-
case 13:
|
2461
|
-
_context13.next = 15;
|
2462
|
-
return _promise2.default.reject(result);
|
2463
|
-
|
2464
|
-
case 15:
|
2465
|
-
case 'end':
|
2466
|
-
return _context13.stop();
|
2467
|
-
}
|
2468
|
-
}
|
2469
|
-
}, _callee13, _this3);
|
2470
|
-
}));
|
2471
|
-
|
2472
|
-
return function commit(_x7) {
|
2473
|
-
return _ref19.apply(this, arguments);
|
2474
|
-
};
|
2475
|
-
}();
|
2476
|
-
|
2477
|
-
handleUserInputs(promises);
|
2478
|
-
|
2479
|
-
case 6:
|
2342
|
+
case 3:
|
2480
2343
|
case 'end':
|
2481
|
-
return
|
2344
|
+
return _context14.stop();
|
2482
2345
|
}
|
2483
2346
|
}
|
2484
|
-
},
|
2347
|
+
}, _callee14, _this3);
|
2485
2348
|
}));
|
2486
2349
|
|
2487
2350
|
_this2.fKeyboardOnOk = function (paymethodeId) {
|
@@ -2520,168 +2383,13 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2520
2383
|
});
|
2521
2384
|
};
|
2522
2385
|
|
2523
|
-
_this2.
|
2524
|
-
var
|
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) {
|
2386
|
+
_this2.handleBtnDebounced = function () {
|
2387
|
+
var _ref17 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee15(type, bquick) {
|
2680
2388
|
var IdbusiType, CustomerPhone, DistributionMode, Address, isEnableSerialNumber, resultObj, title, productStore, checkResult, _enumController$getEn23, PayStyle, _this2$store7, paymode, brefund, boriginReturn, newStyle, status;
|
2681
2389
|
|
2682
|
-
return _regenerator2.default.wrap(function
|
2390
|
+
return _regenerator2.default.wrap(function _callee15$(_context15) {
|
2683
2391
|
while (1) {
|
2684
|
-
switch (
|
2392
|
+
switch (_context15.prev = _context15.next) {
|
2685
2393
|
case 0:
|
2686
2394
|
IdbusiType = _this2.context && _this2.context.viewModel && _this2.context.viewModel.data && _this2.context.viewModel.data.IdbusiType;
|
2687
2395
|
CustomerPhone = _this2.context && _this2.context.viewModel && _this2.context.viewModel.data && _this2.context.viewModel.data.CustomerPhone;
|
@@ -2690,7 +2398,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2690
2398
|
//预订时,若没录入买家手机号,或配送方式为快递时,弹框买家信息确认框
|
2691
2399
|
|
2692
2400
|
if (!(IdbusiType == 38)) {
|
2693
|
-
|
2401
|
+
_context15.next = 14;
|
2694
2402
|
break;
|
2695
2403
|
}
|
2696
2404
|
|
@@ -2701,11 +2409,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2701
2409
|
});
|
2702
2410
|
|
2703
2411
|
if (!(isEnableSerialNumber && resultObj && (DistributionMode.Id == 'ELECTRONIC' || DistributionMode.Id == 'CITY_DISTRIBUTE'))) {
|
2704
|
-
|
2412
|
+
_context15.next = 9;
|
2705
2413
|
break;
|
2706
2414
|
}
|
2707
2415
|
|
2708
|
-
return
|
2416
|
+
return _context15.abrupt('return', _message2.default.error('启用了序列号管理和批号/有效期管理的商品,不支持快递和同城配送'));
|
2709
2417
|
|
2710
2418
|
case 9:
|
2711
2419
|
|
@@ -2714,12 +2422,12 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2714
2422
|
}
|
2715
2423
|
|
2716
2424
|
if (!(!CustomerPhone && !_this2.context.viewModel.data.Member.Mobilephone || DistributionMode.Id == 'ELECTRONIC' || DistributionMode.Id == 'CITY_DISTRIBUTE')) {
|
2717
|
-
|
2425
|
+
_context15.next = 14;
|
2718
2426
|
break;
|
2719
2427
|
}
|
2720
2428
|
|
2721
2429
|
title = (DistributionMode.Id == 'ELECTRONIC' || DistributionMode.Id == 'CITY_DISTRIBUTE') && Address ? '收货地址确认' : '收货人';
|
2722
|
-
|
2430
|
+
_context15.next = 14;
|
2723
2431
|
return _this2.props.openBuyerModal(title);
|
2724
2432
|
|
2725
2433
|
case 14:
|
@@ -2727,18 +2435,18 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2727
2435
|
// 极速模式错误校验
|
2728
2436
|
|
2729
2437
|
productStore = _mutantsMicrofx.stores.productStore;
|
2730
|
-
|
2438
|
+
_context15.next = 17;
|
2731
2439
|
return productStore.checkShouldSettlement();
|
2732
2440
|
|
2733
2441
|
case 17:
|
2734
|
-
checkResult =
|
2442
|
+
checkResult = _context15.sent;
|
2735
2443
|
|
2736
2444
|
if (checkResult) {
|
2737
|
-
|
2445
|
+
_context15.next = 20;
|
2738
2446
|
break;
|
2739
2447
|
}
|
2740
2448
|
|
2741
|
-
return
|
2449
|
+
return _context15.abrupt('return', false);
|
2742
2450
|
|
2743
2451
|
case 20:
|
2744
2452
|
|
@@ -2749,11 +2457,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2749
2457
|
_this2$store7 = _this2.store, paymode = _this2$store7.paymode, brefund = _this2$store7.brefund, boriginReturn = _this2$store7.boriginReturn, newStyle = _this2$store7.newStyle;
|
2750
2458
|
|
2751
2459
|
if (!(bquick && !_mutantsMicrofx.stores.offlineSys.shouldSettlement(type))) {
|
2752
|
-
|
2460
|
+
_context15.next = 25;
|
2753
2461
|
break;
|
2754
2462
|
}
|
2755
2463
|
|
2756
|
-
return
|
2464
|
+
return _context15.abrupt('return', false);
|
2757
2465
|
|
2758
2466
|
case 25:
|
2759
2467
|
status = false;
|
@@ -2768,11 +2476,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2768
2476
|
});
|
2769
2477
|
|
2770
2478
|
if (!_this2.btndebounced) {
|
2771
|
-
|
2479
|
+
_context15.next = 30;
|
2772
2480
|
break;
|
2773
2481
|
}
|
2774
2482
|
|
2775
|
-
return
|
2483
|
+
return _context15.abrupt('return');
|
2776
2484
|
|
2777
2485
|
case 30:
|
2778
2486
|
_this2.btndebounced = (0, _debounce3.default)(function () {
|
@@ -2793,20 +2501,151 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2793
2501
|
|
2794
2502
|
case 33:
|
2795
2503
|
case 'end':
|
2796
|
-
return
|
2504
|
+
return _context15.stop();
|
2797
2505
|
}
|
2798
2506
|
}
|
2799
|
-
},
|
2507
|
+
}, _callee15, _this3);
|
2508
|
+
}));
|
2509
|
+
|
2510
|
+
return function (_x8, _x9) {
|
2511
|
+
return _ref17.apply(this, arguments);
|
2512
|
+
};
|
2513
|
+
}();
|
2514
|
+
|
2515
|
+
_this2.btnDebounced = function () {
|
2516
|
+
var _ref18 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee16(type, bquick) {
|
2517
|
+
var _this2$context$viewMo2, IdbusiType, _this2$context$viewMo3, TotalTaxAmount, _this2$context$viewMo4, ArrearsAmount, save, _this2$props3, settlementType, _this2$props3$creditS, creditSalesVoucher, notSelectableVoucherList, returnAmount1, _result2;
|
2518
|
+
|
2519
|
+
return _regenerator2.default.wrap(function _callee16$(_context16) {
|
2520
|
+
while (1) {
|
2521
|
+
switch (_context16.prev = _context16.next) {
|
2522
|
+
case 0:
|
2523
|
+
_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;
|
2524
|
+
save = _this2.store.save;
|
2525
|
+
_this2$props3 = _this2.props, settlementType = _this2$props3.type, _this2$props3$creditS = _this2$props3.creditSalesVoucher, creditSalesVoucher = _this2$props3$creditS === undefined ? [] : _this2$props3$creditS;
|
2526
|
+
notSelectableVoucherList = [];
|
2527
|
+
//赊销-未生成零售结算单的单据不能进行收款
|
2528
|
+
|
2529
|
+
if (!(settlementType == 2)) {
|
2530
|
+
_context16.next = 9;
|
2531
|
+
break;
|
2532
|
+
}
|
2533
|
+
|
2534
|
+
notSelectableVoucherList = creditSalesVoucher.filter(function (o) {
|
2535
|
+
return o.SettleStatusEnum != 'SETTLED';
|
2536
|
+
});
|
2537
|
+
|
2538
|
+
if (!(notSelectableVoucherList.length > 0)) {
|
2539
|
+
_context16.next = 9;
|
2540
|
+
break;
|
2541
|
+
}
|
2542
|
+
|
2543
|
+
_modalWraper2.default.confirm({
|
2544
|
+
className: 'not-selectable-voucher',
|
2545
|
+
title: '提示',
|
2546
|
+
icon: false,
|
2547
|
+
content: _react2.default.createElement(
|
2548
|
+
'div',
|
2549
|
+
null,
|
2550
|
+
_react2.default.createElement(
|
2551
|
+
'div',
|
2552
|
+
{ className: 'content-title' },
|
2553
|
+
'\u4EE5\u4E0B\u96F6\u552E\u5355\u5C1A\u672A\u751F\u6210\u96F6\u552E\u7ED3\u7B97\u5355\uFF0C\u4E0D\u80FD\u8FDB\u884C\u6536\u6B3E'
|
2554
|
+
),
|
2555
|
+
_react2.default.createElement(
|
2556
|
+
'ul',
|
2557
|
+
null,
|
2558
|
+
notSelectableVoucherList.map(function (o) {
|
2559
|
+
return _react2.default.createElement(
|
2560
|
+
'li',
|
2561
|
+
null,
|
2562
|
+
o.Code
|
2563
|
+
);
|
2564
|
+
})
|
2565
|
+
)
|
2566
|
+
)
|
2567
|
+
});
|
2568
|
+
return _context16.abrupt('return');
|
2569
|
+
|
2570
|
+
case 9:
|
2571
|
+
if (!(IdbusiType === 42)) {
|
2572
|
+
_context16.next = 23;
|
2573
|
+
break;
|
2574
|
+
}
|
2575
|
+
|
2576
|
+
//实际退款金额
|
2577
|
+
returnAmount1 = Math.abs(TotalTaxAmount) - ArrearsAmount;
|
2578
|
+
|
2579
|
+
_this2.setState({
|
2580
|
+
returnAmount: returnAmount1
|
2581
|
+
});
|
2582
|
+
//判断欠款金额
|
2583
|
+
|
2584
|
+
if (!(returnAmount1 > 0)) {
|
2585
|
+
_context16.next = 16;
|
2586
|
+
break;
|
2587
|
+
}
|
2588
|
+
|
2589
|
+
_modalWraper2.default.confirm({
|
2590
|
+
className: 'tplus-confirm-modal',
|
2591
|
+
title: '退款',
|
2592
|
+
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',
|
2593
|
+
onOk: function onOk() {
|
2594
|
+
_this2.handleBtnDebounced(type, bquick);
|
2595
|
+
},
|
2596
|
+
onCancel: function onCancel() {}
|
2597
|
+
});
|
2598
|
+
_context16.next = 21;
|
2599
|
+
break;
|
2600
|
+
|
2601
|
+
case 16:
|
2602
|
+
returnAmount1 = 0;
|
2603
|
+
_context16.next = 19;
|
2604
|
+
return _this2.store.commit(_this2.props.bTest, _this2.context.viewModel.data);
|
2605
|
+
|
2606
|
+
case 19:
|
2607
|
+
_result2 = _context16.sent;
|
2608
|
+
|
2609
|
+
if (_result2 === true) {
|
2610
|
+
//成功
|
2611
|
+
_this2.settleSuccess('onCreditReturn');
|
2612
|
+
_promise2.default.resolve();
|
2613
|
+
} else {
|
2614
|
+
_this2.setState({
|
2615
|
+
settleDisabled: false
|
2616
|
+
});
|
2617
|
+
//提示失败
|
2618
|
+
setTimeout(function () {
|
2619
|
+
if (window.__loadingModal) {
|
2620
|
+
window.__loadingModal.destroy();
|
2621
|
+
window.__loadingModal = null;
|
2622
|
+
}
|
2623
|
+
}, 0);
|
2624
|
+
}
|
2625
|
+
|
2626
|
+
case 21:
|
2627
|
+
_context16.next = 24;
|
2628
|
+
break;
|
2629
|
+
|
2630
|
+
case 23:
|
2631
|
+
_this2.handleBtnDebounced(type, bquick);
|
2632
|
+
|
2633
|
+
case 24:
|
2634
|
+
case 'end':
|
2635
|
+
return _context16.stop();
|
2636
|
+
}
|
2637
|
+
}
|
2638
|
+
}, _callee16, _this3);
|
2800
2639
|
}));
|
2801
2640
|
|
2802
2641
|
return function (_x10, _x11) {
|
2803
|
-
return
|
2642
|
+
return _ref18.apply(this, arguments);
|
2804
2643
|
};
|
2805
2644
|
}();
|
2806
2645
|
|
2807
2646
|
_this2.onCzkChange = function (v) {
|
2808
|
-
var
|
2809
|
-
isNewRetailBCPos =
|
2647
|
+
var _ref19 = _mutantsUtil.platform || {},
|
2648
|
+
isNewRetailBCPos = _ref19.isNewRetailBCPos;
|
2810
2649
|
|
2811
2650
|
if (!isNewRetailBCPos) {
|
2812
2651
|
_this2.store.paymode.currentMode.member.setCardNo(v);
|
@@ -2943,9 +2782,9 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2943
2782
|
var that = _this2;
|
2944
2783
|
var isStoredValueCard = false;
|
2945
2784
|
var discountPrototypeTotalAmount = _this2.state.discountPrototypeTotalAmount;
|
2946
|
-
var _this2$
|
2947
|
-
isReturn = _this2$
|
2948
|
-
type = _this2$
|
2785
|
+
var _this2$props4 = _this2.props,
|
2786
|
+
isReturn = _this2$props4.isReturn,
|
2787
|
+
type = _this2$props4.type;
|
2949
2788
|
|
2950
2789
|
var isManualIntoAmount = void 0;
|
2951
2790
|
var BuyerPayFreight = _this2.context && _this2.context.viewModel && _this2.context.viewModel.data && _this2.context.viewModel.data.BuyerPayFreight;
|
@@ -3102,7 +2941,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
3102
2941
|
that.getXianjinBalance(paymode.paymentType, paymode.value)
|
3103
2942
|
)
|
3104
2943
|
),
|
3105
|
-
!isReturn && type
|
2944
|
+
!isReturn && !type && _react2.default.createElement(
|
3106
2945
|
'div',
|
3107
2946
|
{ className: 'zlje prototype' },
|
3108
2947
|
_react2.default.createElement(
|
@@ -3265,6 +3104,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
3265
3104
|
var _enumController$getEn30 = _mutantsUtil.enumController.getEnumOj(),
|
3266
3105
|
PayStyle = _enumController$getEn30.PayStyle;
|
3267
3106
|
|
3107
|
+
var type = _this2.props.type;
|
3108
|
+
|
3268
3109
|
console.log("settlement.checkSettleDisabled开始执行,参数:", { paymode: paymode, thePaymodes: thePaymodes });
|
3269
3110
|
if (paymode.amount == 0 && paymode.received == 0) {
|
3270
3111
|
console.log("settlement.checkSettleDisabled返回结果:", false);
|
@@ -3278,9 +3119,12 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
3278
3119
|
var xj = (0, _find3.default)(thePaymodes, function (mode) {
|
3279
3120
|
return mode.paymentType == PayStyle.xianjin;
|
3280
3121
|
});
|
3281
|
-
|
3122
|
+
//type == 2 是赊销类型,赊销支付可低于应收
|
3123
|
+
var receivable = Number(paymode.receivable);
|
3124
|
+
var amount = Number(paymode.amount);
|
3125
|
+
var enabled = (receivable == 0 || type == 2 && 0 < receivable && receivable < amount) && thePaymodes.length > 0;
|
3282
3126
|
if (xj && xj.value != 0) {
|
3283
|
-
enabled =
|
3127
|
+
enabled = receivable <= 0 && thePaymodes.length > 0 && Math.abs(receivable) < xj.value || type == 2 && 0 < receivable && receivable < amount;
|
3284
3128
|
}
|
3285
3129
|
console.log("settlement.checkSettleDisabled返回结果:", !enabled);
|
3286
3130
|
var settleDisabled = _this2.state.settleDisabled;
|
@@ -3356,7 +3200,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
3356
3200
|
'div',
|
3357
3201
|
null,
|
3358
3202
|
(0, _map3.default)(modeList, function (mode, modeIndex) {
|
3359
|
-
return _this2.renderToolbtn(mode, index * carouselStart + modeIndex, type
|
3203
|
+
return _this2.renderToolbtn(mode, index * carouselStart + modeIndex, !type ? 'bookPay' : '');
|
3360
3204
|
})
|
3361
3205
|
);
|
3362
3206
|
})
|
@@ -3407,12 +3251,12 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
3407
3251
|
|
3408
3252
|
_this2.hasElectron = hasElectron;
|
3409
3253
|
|
3410
|
-
var
|
3411
|
-
MemberMeStorageCardInputByKeyBoard =
|
3412
|
-
ICCardServer =
|
3413
|
-
ICCardPassword =
|
3414
|
-
PreSellOrBook =
|
3415
|
-
PercentageWhenBook =
|
3254
|
+
var _ref20 = _mutantsMicrofx.stores.user.options.get('loginInfo') || {},
|
3255
|
+
MemberMeStorageCardInputByKeyBoard = _ref20.MemberMeStorageCardInputByKeyBoard,
|
3256
|
+
ICCardServer = _ref20.ICCardServer,
|
3257
|
+
ICCardPassword = _ref20.ICCardPassword,
|
3258
|
+
PreSellOrBook = _ref20.PreSellOrBook,
|
3259
|
+
PercentageWhenBook = _ref20.PercentageWhenBook;
|
3416
3260
|
|
3417
3261
|
_this2.isStorageCardInputType = MemberMeStorageCardInputByKeyBoard; // 仅储值卡是否禁用键盘输入,'0'为不禁用 '1'为禁用
|
3418
3262
|
_this2.iCCardServer = parseInt(ICCardServer); // 启用IC卡:0为禁用 1为启用
|
@@ -3421,9 +3265,9 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
3421
3265
|
_this2.percentageWhenBook = PercentageWhenBook;
|
3422
3266
|
//移动端环境下,没有读取IC卡的方式。
|
3423
3267
|
|
3424
|
-
var
|
3425
|
-
isHorizontalPad =
|
3426
|
-
isHorizontalSunMi =
|
3268
|
+
var _ref21 = _mutantsUtil.platform || {},
|
3269
|
+
isHorizontalPad = _ref21.isHorizontalPad,
|
3270
|
+
isHorizontalSunMi = _ref21.isHorizontalSunMi;
|
3427
3271
|
|
3428
3272
|
_this2.isHorizontalPad = !!isHorizontalPad;
|
3429
3273
|
_this2.isHorizontalSunMi = !!isHorizontalSunMi;
|
@@ -3431,7 +3275,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
3431
3275
|
_this2.handleReadICard = _this2.handleReadICard.bind(_this2);
|
3432
3276
|
_this2.setTimer = null;
|
3433
3277
|
_this2.keypressStime = null;
|
3434
|
-
_this2.store = !
|
3278
|
+
_this2.store = !props.type ? _mutantsMicrofx.stores.settlementVoucherStore : _mutantsMicrofx.stores.settlementMemberStore;
|
3435
3279
|
_this2.voucherRunningFast = _mutantsMicrofx.localStore && _mutantsMicrofx.localStore.get('vocherRunningFast') == '1';
|
3436
3280
|
return _this2;
|
3437
3281
|
}
|
@@ -3572,8 +3416,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
3572
3416
|
}, {
|
3573
3417
|
key: 'isNoProductTip',
|
3574
3418
|
value: function isNoProductTip(nonProductMap) {
|
3575
|
-
var
|
3576
|
-
RetailDetails =
|
3419
|
+
var _ref22 = this.context.viewModel.data || {},
|
3420
|
+
RetailDetails = _ref22.RetailDetails;
|
3577
3421
|
|
3578
3422
|
var temphtml = [];
|
3579
3423
|
if ((0, _keys2.default)(nonProductMap).length > 0) {
|
@@ -3826,7 +3670,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
3826
3670
|
return paymode.isQuick;
|
3827
3671
|
}
|
3828
3672
|
});
|
3829
|
-
var productsIsEmpty = type
|
3673
|
+
var productsIsEmpty = !type && this.context.viewModel.data.RetailDetails.length == 0 || type == 1 && parseFloat(amount || 0) <= 0 || memberDisabled || noIsMinAmount || type == 2 && parseFloat(amount || 0) <= 0;
|
3830
3674
|
var moreToolbtns = [];
|
3831
3675
|
var params = {
|
3832
3676
|
pagination: {
|
@@ -3844,11 +3688,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
3844
3688
|
quantity4 = 0;
|
3845
3689
|
var sumQuantity = 0; //数量总和的值,包括称重的。
|
3846
3690
|
|
3847
|
-
var
|
3848
|
-
|
3849
|
-
buyQuantity =
|
3850
|
-
|
3851
|
-
returnQuantity =
|
3691
|
+
var _ref23 = quantityDetail || {},
|
3692
|
+
_ref23$buyQuantity = _ref23.buyQuantity,
|
3693
|
+
buyQuantity = _ref23$buyQuantity === undefined ? 0 : _ref23$buyQuantity,
|
3694
|
+
_ref23$returnQuantity = _ref23.returnQuantity,
|
3695
|
+
returnQuantity = _ref23$returnQuantity === undefined ? 0 : _ref23$returnQuantity;
|
3852
3696
|
|
3853
3697
|
var quantityPrecision = (0, _tplusPoslogin.PosInitData)("QuantityPrecision");
|
3854
3698
|
quantityPrecision = quantityPrecision ? parseInt(quantityPrecision) : '';
|
@@ -3995,7 +3839,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
3995
3839
|
_react2.default.createElement(
|
3996
3840
|
'div',
|
3997
3841
|
{ className: 'btns' },
|
3998
|
-
!this.isHorizontalPad && !this.props.MemberPoints && (0, _map3.default)(quickPay, function (p, i) {
|
3842
|
+
!this.isHorizontalPad && !this.props.MemberPoints && type != 2 && (0, _map3.default)(quickPay, function (p, i) {
|
3999
3843
|
var _classnames2;
|
4000
3844
|
|
4001
3845
|
var iconclass = PayIcon2[p.paymentType] ? 'color' + p.paymentType : "primary-color";
|
@@ -4007,7 +3851,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
4007
3851
|
onClick: function onClick() {
|
4008
3852
|
_this8.btnDebounced(p.paymentType, true);
|
4009
3853
|
},
|
4010
|
-
disabled: productsIsEmpty || type
|
3854
|
+
disabled: productsIsEmpty || !type && _this8.checkModeDisabled(p.paymentType, (_this8.context.viewModel.data.TotalTaxAmount || 0 - _this8.context.viewModel.data.OnlinePaymentAmount || 0) < 0, boriginReturn)
|
4011
3855
|
},
|
4012
3856
|
_react2.default.createElement(
|
4013
3857
|
'div',
|
@@ -4023,10 +3867,13 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
4023
3867
|
}),
|
4024
3868
|
_react2.default.createElement(
|
4025
3869
|
_button2.default,
|
4026
|
-
{ key: 'settle',
|
3870
|
+
{ key: 'settle',
|
3871
|
+
className: (0, _classnames4.default)({ "settle": true, "settle2": type == 1, "settleStorage": true, 'primary-btn': true }),
|
3872
|
+
onClick: function onClick() {
|
4027
3873
|
_this8.btnDebounced();
|
4028
|
-
},
|
4029
|
-
|
3874
|
+
},
|
3875
|
+
disabled: productsIsEmpty },
|
3876
|
+
this.props.isMemberPoints ? '立即兑换' : this.props.isMemberPointsReturn ? '退货' : IdbusiType == 39 && _mutantsMicrofx.stores.drawerStore.thisWaitPaidAmount == 0 ? '取货' : type == 2 ? '收款' : settle.name
|
4030
3877
|
)
|
4031
3878
|
),
|
4032
3879
|
!newStyle && _react2.default.createElement(
|
@@ -4090,7 +3937,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
4090
3937
|
mode.paymentType == PayStyle.hyczk || mode.paymentType == PayStyle.jfdx || mode.paymentType == PayStyle.djq ? _react2.default.createElement('input', { id: 'inputS' + index,
|
4091
3938
|
className: _index.hotKey.hotKeyNotFilter(),
|
4092
3939
|
onClick: function onClick() {
|
4093
|
-
_this8.editModal(index, mode.paymentType, type
|
3940
|
+
_this8.editModal(index, mode.paymentType, !type ? boriginReturn : null);
|
4094
3941
|
}, value: (0, _utils.getFixedNumber)(mode.value) }) : _react2.default.createElement('input', { id: 'inputS' + index,
|
4095
3942
|
className: _index.hotKey.hotKeyNotFilter(),
|
4096
3943
|
value: mode.exchangeRate != 1 ? mode.value2 : mode.value,
|
@@ -4154,7 +4001,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
4154
4001
|
(0, _utils.getFixedNumber)(mode.balance)
|
4155
4002
|
),
|
4156
4003
|
_react2.default.createElement('br', null),
|
4157
|
-
type
|
4004
|
+
!type && themodeHyczk && themodeHyczk.length && themodeHyczk[themodeHyczk.length - 1].paymethodId === mode.paymethodId && !isReturn && _react2.default.createElement(
|
4158
4005
|
_button2.default,
|
4159
4006
|
{ onClick: function onClick() {
|
4160
4007
|
_this8.appendCzkmode(boriginReturn, 'noPlaySetPwd');
|
@@ -4261,7 +4108,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
4261
4108
|
)
|
4262
4109
|
)
|
4263
4110
|
),
|
4264
|
-
type
|
4111
|
+
!type && !isReturn && _react2.default.createElement(
|
4265
4112
|
'div',
|
4266
4113
|
{ onClick: this.prototypeDetailedClick, className: 'prototypeDetailed primary-color' },
|
4267
4114
|
'\u4F18\u60E0\u660E\u7EC6',
|
@@ -4411,7 +4258,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
4411
4258
|
)
|
4412
4259
|
)
|
4413
4260
|
),
|
4414
|
-
type
|
4261
|
+
!type && !isReturn && _react2.default.createElement(
|
4415
4262
|
'div',
|
4416
4263
|
{ onClick: this.prototypeDetailedClick, className: 'prototypeDetailed primary-color' },
|
4417
4264
|
'\u4F18\u60E0\u660E\u7EC6',
|
@@ -4498,7 +4345,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
4498
4345
|
className: _index.hotKey.hotKeyNotFilter("paymode hotkey_" + _this8.compoundHotkeysList[hotkeyIndex]),
|
4499
4346
|
disabled: _this8.checkModeDisabled(mode.paymentType, brefund, boriginReturn),
|
4500
4347
|
onClick: function onClick() {
|
4501
|
-
if (type
|
4348
|
+
if (!type && mode.paymentType == PayStyle.hyczk) {
|
4502
4349
|
if (themodeHyczk && themodeHyczk.length === 0) {
|
4503
4350
|
_this8.onHotKeyClick1(mode, index, boriginReturn);
|
4504
4351
|
}
|
@@ -4554,7 +4401,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
4554
4401
|
null,
|
4555
4402
|
'\u5361\u53F7\uFF1A'
|
4556
4403
|
),
|
4557
|
-
type
|
4404
|
+
!type ? _react2.default.createElement(
|
4558
4405
|
'span',
|
4559
4406
|
null,
|
4560
4407
|
m && m.storageCardNo
|
@@ -4574,7 +4421,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
4574
4421
|
'\u652F\u4ED8\u91D1\u989D\uFF1A'
|
4575
4422
|
),
|
4576
4423
|
_react2.default.createElement('br', null),
|
4577
|
-
type
|
4424
|
+
!type && themodeHyczk && themodeHyczk.length && themodeHyczk[themodeHyczk.length - 1].paymethodId === m.paymethodId && _react2.default.createElement(
|
4578
4425
|
_button2.default,
|
4579
4426
|
{ onClick: function onClick() {
|
4580
4427
|
return _this8.onHotKeyClick1(mode, index, boriginReturn);
|
@@ -4733,22 +4580,22 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
4733
4580
|
return _this8.czkInput = input;
|
4734
4581
|
},
|
4735
4582
|
onKeyDown: function () {
|
4736
|
-
var
|
4583
|
+
var _ref24 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee17(e) {
|
4737
4584
|
var time, _paymode;
|
4738
4585
|
|
4739
|
-
return _regenerator2.default.wrap(function
|
4586
|
+
return _regenerator2.default.wrap(function _callee17$(_context17) {
|
4740
4587
|
while (1) {
|
4741
|
-
switch (
|
4588
|
+
switch (_context17.prev = _context17.next) {
|
4742
4589
|
case 0:
|
4743
4590
|
if (!(e.keyCode == 13)) {
|
4744
|
-
|
4591
|
+
_context17.next = 14;
|
4745
4592
|
break;
|
4746
4593
|
}
|
4747
4594
|
|
4748
4595
|
time = Date.parse(new Date());
|
4749
4596
|
|
4750
4597
|
if (!(_this8.isStorageCardInputType && time - _this8.keypressStime > 350)) {
|
4751
|
-
|
4598
|
+
_context17.next = 7;
|
4752
4599
|
break;
|
4753
4600
|
}
|
4754
4601
|
|
@@ -4757,11 +4604,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
4757
4604
|
_this8.setState({
|
4758
4605
|
czkValue: null
|
4759
4606
|
});
|
4760
|
-
return
|
4607
|
+
return _context17.abrupt('return');
|
4761
4608
|
|
4762
4609
|
case 7:
|
4763
4610
|
_this8.keypressStime = null;
|
4764
|
-
|
4611
|
+
_context17.next = 10;
|
4765
4612
|
return _this8.loadCzk(e.target.value);
|
4766
4613
|
|
4767
4614
|
case 10:
|
@@ -4772,7 +4619,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
4772
4619
|
czkvalue: null
|
4773
4620
|
});
|
4774
4621
|
}
|
4775
|
-
|
4622
|
+
_context17.next = 15;
|
4776
4623
|
break;
|
4777
4624
|
|
4778
4625
|
case 14:
|
@@ -4782,14 +4629,14 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
4782
4629
|
|
4783
4630
|
case 15:
|
4784
4631
|
case 'end':
|
4785
|
-
return
|
4632
|
+
return _context17.stop();
|
4786
4633
|
}
|
4787
4634
|
}
|
4788
|
-
},
|
4635
|
+
}, _callee17, _this8);
|
4789
4636
|
}));
|
4790
4637
|
|
4791
4638
|
return function (_x13) {
|
4792
|
-
return
|
4639
|
+
return _ref24.apply(this, arguments);
|
4793
4640
|
};
|
4794
4641
|
}(),
|
4795
4642
|
onFocus: function onFocus(e) {
|
@@ -4846,8 +4693,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
4846
4693
|
_this8.setCurrentModeValue(event.target.value, Math.min(currentMode.maxamount, currentMode.balance));
|
4847
4694
|
},
|
4848
4695
|
defaultValue: currentMode && (0, _utils.getFixedNumber)(brefund ? currentMode.value : Math.min(currentMode.value, currentMode.maxamount, currentMode.balance)),
|
4849
|
-
ref: function ref(
|
4850
|
-
return _this8["inputCzkAmount"] =
|
4696
|
+
ref: function ref(_ref25) {
|
4697
|
+
return _this8["inputCzkAmount"] = _ref25;
|
4851
4698
|
},
|
4852
4699
|
onFocus: function onFocus(e) {
|
4853
4700
|
_this8.inputkey = "inputCzkAmount";
|
@@ -4941,7 +4788,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
4941
4788
|
_react2.default.createElement(
|
4942
4789
|
_modal2.default,
|
4943
4790
|
(0, _defineProperty3.default)({
|
4944
|
-
wrapClassName: 'djq ' + (this.voucherRunningFast ? 'no-zoom' : '') + ' ' + (this.isHorizontalPad ? 'extraHeight' : '') + '
|
4791
|
+
wrapClassName: 'djq ' + (this.voucherRunningFast ? 'no-zoom' : '') + ' ' + (this.isHorizontalPad ? 'extraHeight' : '') + ' modify-password',
|
4945
4792
|
width: '400px',
|
4946
4793
|
visible: this.state.showSetPwdModal,
|
4947
4794
|
backdropClosable: false,
|
@@ -4966,74 +4813,47 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
4966
4813
|
'\u786E\u5B9A'
|
4967
4814
|
)
|
4968
4815
|
)),
|
4969
|
-
_react2.default.createElement(
|
4816
|
+
_react2.default.createElement(_ModifyPass2.default, { changeBtnDisabled: this.changeBtnDisabled, passwordTitle: '\u8BBE\u7F6E\u5BC6\u7801', ref: function ref(_ref26) {
|
4817
|
+
return _this8.modifyPass = _ref26;
|
4818
|
+
}, cardList: this.store.paymode.currentMode, cancelModal: this.handleSetPwdCancel })
|
4819
|
+
),
|
4820
|
+
_react2.default.createElement(
|
4821
|
+
_modal2.default,
|
4822
|
+
(0, _defineProperty3.default)({
|
4823
|
+
wrapClassName: 'djq ' + (this.isHorizontalPad ? 'extraHeight' : '') + ' confirmPwdWraper',
|
4824
|
+
width: '400px',
|
4825
|
+
visible: this.state.confirmStatus,
|
4826
|
+
backdropClosable: false,
|
4827
|
+
destroyOnClose: true,
|
4828
|
+
footer: null,
|
4829
|
+
onCancel: this.handleConfirmPwdCancel,
|
4830
|
+
keyboard: false,
|
4831
|
+
centered: !this.isHorizontalPad ? true : false,
|
4832
|
+
title: '\u50A8\u503C\u5361',
|
4833
|
+
zIndex: 1007
|
4834
|
+
}, 'footer', _react2.default.createElement(
|
4970
4835
|
'div',
|
4971
|
-
{ className: '
|
4836
|
+
{ className: 'action' },
|
4972
4837
|
_react2.default.createElement(
|
4973
|
-
|
4974
|
-
{
|
4975
|
-
|
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
|
-
)
|
4838
|
+
_button2.default,
|
4839
|
+
{ onClick: this.handleConfirmPwdCancel },
|
4840
|
+
'\u53D6\u6D88'
|
5003
4841
|
),
|
5004
4842
|
_react2.default.createElement(
|
5005
|
-
|
5006
|
-
{
|
5007
|
-
|
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
|
-
)
|
4843
|
+
_button2.default,
|
4844
|
+
{ type: 'primary', onClick: this.handleConfirmPwdModal },
|
4845
|
+
'\u786E\u5B9A'
|
5035
4846
|
)
|
5036
|
-
)
|
4847
|
+
)),
|
4848
|
+
_react2.default.createElement(_confirmPwd2.default, {
|
4849
|
+
isLimit: 'yes',
|
4850
|
+
placeholder: '',
|
4851
|
+
maxLength: 6,
|
4852
|
+
labelName: '\u50A8\u503C\u4F59\u989D\u5BC6\u7801',
|
4853
|
+
getConfirmPwd: this.getConfirmPwd,
|
4854
|
+
params: 'pay',
|
4855
|
+
amount: this.store.paymode.currentMode && (0, _utils.getFixedNumber)(this.store.paymode.currentMode.value)
|
4856
|
+
})
|
5037
4857
|
),
|
5038
4858
|
_react2.default.createElement(
|
5039
4859
|
_modal2.default,
|
@@ -5517,8 +5337,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
5517
5337
|
_this8.setCurrentModeValue(e.target.value, Math.min(currentMode.maxamount, currentMode.member.exchangable));
|
5518
5338
|
},
|
5519
5339
|
defaultValue: currentMode && currentMode.member && (0, _utils.getFixedNumber)(Math.min(currentMode.value, currentMode.maxamount, currentMode.member.exchangable)),
|
5520
|
-
ref: function ref(
|
5521
|
-
return _this8["inputJfdxAmount"] =
|
5340
|
+
ref: function ref(_ref27) {
|
5341
|
+
return _this8["inputJfdxAmount"] = _ref27;
|
5522
5342
|
},
|
5523
5343
|
onFocus: function onFocus(e) {
|
5524
5344
|
_this8.inputkey = "inputJfdxAmount";
|