tplus-components-touch 3.40.1 → 3.40.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/billSearch/api.js +74 -13
- package/dist/components/billSearch/api.js.map +1 -1
- package/dist/components/billSearch/index.js +39 -27
- package/dist/components/billSearch/index.js.map +1 -1
- package/dist/components/commonForm/addressPicker/index.js +16 -7
- package/dist/components/commonForm/addressPicker/index.js.map +1 -1
- package/dist/components/commonForm/datePicker/index.js +6 -3
- package/dist/components/commonForm/datePicker/index.js.map +1 -1
- package/dist/components/commonForm/formControl/index.js +3 -2
- package/dist/components/commonForm/formControl/index.js.map +1 -1
- package/dist/components/commonForm/index.js +9 -3
- package/dist/components/commonForm/index.js.map +1 -1
- package/dist/components/deliverySearch/index.js +1 -1
- package/dist/components/deliverySearch/index.js.map +1 -1
- package/dist/components/hotKey/index.js +5 -0
- package/dist/components/hotKey/index.js.map +1 -1
- package/dist/components/hotKey/localConfig.js +65 -0
- package/dist/components/hotKey/localConfig.js.map +1 -1
- package/dist/components/input/style.less +7 -0
- package/dist/components/inventorySearch/tab.js +1 -1
- package/dist/components/inventorySearch/tab.js.map +1 -1
- package/dist/components/layout/style.less +1 -1
- package/dist/components/loading/loadingContent.js +1 -1
- package/dist/components/loading/loadingContent.js.map +1 -1
- package/dist/components/presale/pickup.js +479 -0
- package/dist/components/presale/pickup.js.map +1 -0
- package/dist/components/presale/style.less +59 -0
- package/dist/components/settlement/prototypeTable/index.js +4 -2
- package/dist/components/settlement/prototypeTable/index.js.map +1 -1
- package/dist/components/settlement/settlement.js +484 -186
- package/dist/components/settlement/settlement.js.map +1 -1
- package/dist/components/settlement/settlement.less +24 -9
- package/dist/components/settlement/settlementStore.js +320 -230
- package/dist/components/settlement/settlementStore.js.map +1 -1
- package/dist/components/settlement/utils.js +2 -2
- package/dist/components/settlement/utils.js.map +1 -1
- package/dist/components/ticon/iconfont/demo_index.html +3 -3
- package/dist/components/ticon/iconfont/iconfont.css +3 -3
- package/dist/components/ticon/iconfont/iconfont.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 +12 -0
- package/dist/components/touchTable/index.js.map +1 -1
- package/dist/index.js +8 -3
- package/dist/index.js.map +1 -1
- package/package.json +35 -35
@@ -16,6 +16,14 @@ var _drawer = require('antd/es/drawer');
|
|
16
16
|
|
17
17
|
var _drawer2 = _interopRequireDefault(_drawer);
|
18
18
|
|
19
|
+
var _table = require('antd/es/table');
|
20
|
+
|
21
|
+
var _table2 = _interopRequireDefault(_table);
|
22
|
+
|
23
|
+
var _keys = require('babel-runtime/core-js/object/keys');
|
24
|
+
|
25
|
+
var _keys2 = _interopRequireDefault(_keys);
|
26
|
+
|
19
27
|
var _extends2 = require('babel-runtime/helpers/extends');
|
20
28
|
|
21
29
|
var _extends3 = _interopRequireDefault(_extends2);
|
@@ -88,6 +96,8 @@ require('antd/es/input/style');
|
|
88
96
|
|
89
97
|
require('antd/es/drawer/style');
|
90
98
|
|
99
|
+
require('antd/es/table/style');
|
100
|
+
|
91
101
|
require('antd/es/carousel/style');
|
92
102
|
|
93
103
|
require('antd/es/button/style');
|
@@ -269,6 +279,22 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
269
279
|
_this2.hotkeydebouncedPayMode = "";
|
270
280
|
_this2.currentInput = null;
|
271
281
|
|
282
|
+
_this2.getIsReturn = function () {
|
283
|
+
var dataModal = _this2.context && _this2.context.viewModel && _this2.context.viewModel.data;
|
284
|
+
return dataModal.IdbusiType === 35 || dataModal.IdbusiType === 40; //40预售退货类型。
|
285
|
+
};
|
286
|
+
|
287
|
+
_this2.getBoriginReturn = function () {
|
288
|
+
var boriginReturn = _this2.context && _this2.context.viewModel && _this2.context.viewModel.data && JSON.getCellValue(_this2.context.viewModel.data, "IsOriginalReturn");
|
289
|
+
return boriginReturn || false;
|
290
|
+
};
|
291
|
+
|
292
|
+
_this2.getNotBoriginReturn = function () {
|
293
|
+
var isReturn = _this2.getIsReturn();
|
294
|
+
var boriginReturn = _this2.getBoriginReturn();
|
295
|
+
return isReturn && !boriginReturn;
|
296
|
+
};
|
297
|
+
|
272
298
|
_this2.resizeSettlementToolBtns = function () {
|
273
299
|
var newStyle = _this2.store.newStyle;
|
274
300
|
var isMemberStorePage = _this2.props.isMemberStorePage;
|
@@ -362,7 +388,9 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
362
388
|
isReturn = _this2$props.isReturn,
|
363
389
|
type = _this2$props.type;
|
364
390
|
|
365
|
-
_promise2.default.resolve(!_this2.props.onValidate || _this2.props.onValidate({ isNotAutoFocus: true
|
391
|
+
_promise2.default.resolve(!_this2.props.onValidate || _this2.props.onValidate({ isNotAutoFocus: true, fn: function fn(data) {
|
392
|
+
return _this2.isNoProductTip(data);
|
393
|
+
} })).then(function (result) {
|
366
394
|
if (result) {
|
367
395
|
_this2.setState({
|
368
396
|
settleDisabled: false
|
@@ -401,14 +429,12 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
401
429
|
_this2.handleGuestShow(amount < 0 ? 2 : 3, amount);
|
402
430
|
setTimeout(function () {
|
403
431
|
_this2.handleDefault();
|
404
|
-
// // 单据模式 临时性获取第一个结算方式焦点
|
405
|
-
// // document.querySelector('.modeItem:nth-child(1) .content input').focus()
|
406
432
|
var _this2$store = _this2.store,
|
407
433
|
paymode = _this2$store.paymode,
|
408
434
|
brefund = _this2$store.brefund,
|
409
435
|
newStyle = _this2$store.newStyle;
|
410
436
|
|
411
|
-
var boriginReturn = _this2.
|
437
|
+
var boriginReturn = _this2.getBoriginReturn();
|
412
438
|
var thePaymodes = newStyle ? (0, _filter3.default)(paymode.thePaymodes, function (m) {
|
413
439
|
return !(_this2.checkModeDisabled(m.paymentType, brefund, boriginReturn) && parseFloat(m.value) == 0);
|
414
440
|
}) : paymode.thePaymodes;
|
@@ -427,6 +453,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
427
453
|
return (0, _assign2.default)({}, o);
|
428
454
|
});
|
429
455
|
var discountRetailTotalAount = null;
|
456
|
+
var discountPrototypeTotalAmount = 0;
|
430
457
|
var count = 0;
|
431
458
|
dataSource && dataSource.forEach(function (item) {
|
432
459
|
var count1 = 0;
|
@@ -450,16 +477,18 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
450
477
|
} else {
|
451
478
|
item.badge = { text: '', position: '', className: '' };
|
452
479
|
}
|
453
|
-
if (!item.IsPresent) {
|
454
|
-
discountRetailTotalAount += item.RetailPrice * item.Quantity;
|
455
|
-
}
|
456
480
|
if (item.PromotionDetails && item.PromotionDetails.length > 0) {
|
457
481
|
count++;
|
458
482
|
}
|
459
483
|
item.InventoryName = item.Inventory.Name;
|
460
484
|
item.Discount = (0, _utils.getRoundValue)(item.RetailPrice - item.TaxPrice, pricePrecision);
|
485
|
+
if (!item.IsPresent) {
|
486
|
+
discountPrototypeTotalAmount += item.DetailDiscountAmount;
|
487
|
+
item.TotalDiscount = item.DetailDiscountAmount;
|
488
|
+
} else {
|
489
|
+
item.TotalDiscount = 0;
|
490
|
+
}
|
461
491
|
//item.TotalDiscount = getFixedNumber(item.Discount * item.Quantity);
|
462
|
-
item.TotalDiscount = item.DetailDiscountAmount;
|
463
492
|
item.nAmount = (0, _utils.getFixedNumber)(item.TaxAmount);
|
464
493
|
item.UnitName = item.Unit.Name;
|
465
494
|
item.nQuantity = (0, _utils.getRoundValue)(item.Quantity, quantityPrecision);
|
@@ -468,11 +497,10 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
468
497
|
});
|
469
498
|
_this2.setState({
|
470
499
|
dataSource: dataSource,
|
471
|
-
discountTotalAmount: (0, _utils.getFixedNumber)(
|
472
|
-
|
473
|
-
|
500
|
+
discountTotalAmount: (0, _utils.getFixedNumber)(_this2.props.amount),
|
501
|
+
discountPrototypeTotalAmount: (0, _utils.getFixedNumber)(discountPrototypeTotalAmount),
|
502
|
+
discountRetailTotalAount: (0, _utils.getFixedNumber)(_this2.props.amount + parseFloat(discountPrototypeTotalAmount))
|
474
503
|
});
|
475
|
-
console.log(RetailDetails, 'RetailDetails-----');
|
476
504
|
return count;
|
477
505
|
};
|
478
506
|
|
@@ -483,7 +511,9 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
483
511
|
|
484
512
|
var isAutoShowCouponWhenCash = (0, _tplusPoslogin.PosInitData)('IsAutoShowCouponWhenCash');
|
485
513
|
// 支持异步验证过程
|
486
|
-
_promise2.default.resolve(!_this2.props.onValidate || _this2.props.onValidate(
|
514
|
+
_promise2.default.resolve(!_this2.props.onValidate || _this2.props.onValidate({ fn: function fn(data) {
|
515
|
+
return _this2.isNoProductTip(data);
|
516
|
+
} })).then(function (result) {
|
487
517
|
if (result) {
|
488
518
|
_this2.setState({
|
489
519
|
settleDisabled: false
|
@@ -507,6 +537,12 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
507
537
|
|
508
538
|
_this2.settleZero = function () {
|
509
539
|
var that = _this2;
|
540
|
+
//预售取货无需支付时省略弹框确认这一步
|
541
|
+
var IdbusiType = _this2.context && _this2.context.viewModel && _this2.context.viewModel.data && _this2.context.viewModel.data.IdbusiType;
|
542
|
+
if (IdbusiType == 39) {
|
543
|
+
that.handleSettle("zero");
|
544
|
+
return;
|
545
|
+
}
|
510
546
|
_modalWraper2.default.confirm({
|
511
547
|
className: 'tplus-confirm-modal',
|
512
548
|
title: '结算',
|
@@ -610,36 +646,37 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
610
646
|
|
611
647
|
_this2.showCzkModal = function () {
|
612
648
|
var _ref = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee(id, append) {
|
613
|
-
var _enumController$getEn2, PayStyle,
|
649
|
+
var _ref2, isInputMember, _enumController$getEn2, PayStyle, ctMode, memberId, returnType, memberdata1;
|
614
650
|
|
615
651
|
return _regenerator2.default.wrap(function _callee$(_context) {
|
616
652
|
while (1) {
|
617
653
|
switch (_context.prev = _context.next) {
|
618
654
|
case 0:
|
619
|
-
_this2.
|
655
|
+
_ref2 = _this2.state || {}, isInputMember = _ref2.isInputMember;
|
620
656
|
_enumController$getEn2 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn2.PayStyle;
|
657
|
+
ctMode = _this2.store && _this2.store.paymode && _this2.store.paymode.currentMode;
|
658
|
+
memberId = ctMode && ctMode.memberId;
|
659
|
+
returnType = _this2.getNotBoriginReturn();
|
621
660
|
|
661
|
+
_this2.connectRfCard();
|
622
662
|
_this2.store.setCurrentMode(id, PayStyle.hyczk, append);
|
623
|
-
|
624
|
-
_context.t0 = isInputMember && _this2.store.paymode.currentMode.memberId;
|
663
|
+
_context.t0 = isInputMember && memberId;
|
625
664
|
|
626
665
|
if (!_context.t0) {
|
627
|
-
_context.next =
|
666
|
+
_context.next = 12;
|
628
667
|
break;
|
629
668
|
}
|
630
669
|
|
631
|
-
_context.next =
|
632
|
-
return _this2.store.updateCurrentMode(
|
670
|
+
_context.next = 11;
|
671
|
+
return _this2.store.updateCurrentMode(memberId, returnType);
|
633
672
|
|
634
|
-
case
|
673
|
+
case 11:
|
635
674
|
_context.t0 = _context.sent;
|
636
675
|
|
637
|
-
case
|
676
|
+
case 12:
|
638
677
|
memberdata1 = _context.t0;
|
639
678
|
|
640
|
-
_this2.setState({
|
641
|
-
czkVisible: true
|
642
|
-
});
|
679
|
+
_this2.setState({ czkVisible: true });
|
643
680
|
if (memberdata1 && memberdata1.length === 1) {
|
644
681
|
_this2.handleCzkMoreData(true);
|
645
682
|
_this2.store.handleCzkData(memberdata1[0]);
|
@@ -655,7 +692,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
655
692
|
}, 300);
|
656
693
|
}
|
657
694
|
|
658
|
-
case
|
695
|
+
case 15:
|
659
696
|
case 'end':
|
660
697
|
return _context.stop();
|
661
698
|
}
|
@@ -699,7 +736,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
699
736
|
};
|
700
737
|
|
701
738
|
_this2.handleCzkData = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2() {
|
702
|
-
var _enumController$getEn3, PayStyle;
|
739
|
+
var _enumController$getEn3, PayStyle, returnType;
|
703
740
|
|
704
741
|
return _regenerator2.default.wrap(function _callee2$(_context2) {
|
705
742
|
while (1) {
|
@@ -711,43 +748,44 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
711
748
|
_enumController$getEn3 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn3.PayStyle;
|
712
749
|
|
713
750
|
if (_this2.store.paymode.currentMode.storageCardNo) {
|
714
|
-
_context2.next =
|
751
|
+
_context2.next = 6;
|
715
752
|
break;
|
716
753
|
}
|
717
754
|
|
718
|
-
|
719
|
-
|
755
|
+
returnType = _this2.getNotBoriginReturn();
|
756
|
+
_context2.next = 6;
|
757
|
+
return _this2.store.loadCzk(_this2.czkInput.input.value, returnType);
|
720
758
|
|
721
|
-
case
|
759
|
+
case 6:
|
722
760
|
if (_this2.store.paymode.currentMode.storageCardNo) {
|
723
|
-
_context2.next =
|
761
|
+
_context2.next = 9;
|
724
762
|
break;
|
725
763
|
}
|
726
764
|
|
727
765
|
_message2.default.error("请录入储值卡!");
|
728
766
|
return _context2.abrupt('return');
|
729
767
|
|
730
|
-
case
|
768
|
+
case 9:
|
731
769
|
if (!(0, _find3.default)(_this2.store.paymode.thePaymodes, function (mode) {
|
732
770
|
return mode.paymethodId != _this2.store.paymode.currentMode.paymethodId && mode.paymentType == PayStyle.hyczk && mode.storageCardNo == _this2.store.paymode.currentMode.storageCardNo;
|
733
771
|
})) {
|
734
|
-
_context2.next =
|
772
|
+
_context2.next = 12;
|
735
773
|
break;
|
736
774
|
}
|
737
775
|
|
738
776
|
_message2.default.error("该储值卡已使用。");
|
739
777
|
return _context2.abrupt('return');
|
740
778
|
|
741
|
-
case
|
779
|
+
case 12:
|
742
780
|
if (!(_this2.store.bquick && _this2.store.paymode.amount != _this2.store.paymode.currentMode.value)) {
|
743
|
-
_context2.next =
|
781
|
+
_context2.next = 15;
|
744
782
|
break;
|
745
783
|
}
|
746
784
|
|
747
785
|
_message2.default.error("实收金额应等于应收金额。");
|
748
786
|
return _context2.abrupt('return');
|
749
787
|
|
750
|
-
case
|
788
|
+
case 15:
|
751
789
|
|
752
790
|
_this2.setState({
|
753
791
|
czkVisible: false,
|
@@ -758,7 +796,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
758
796
|
_this2.store.paymode.calcMemberBalance();
|
759
797
|
_this2.handleCzk();
|
760
798
|
|
761
|
-
case
|
799
|
+
case 19:
|
762
800
|
case 'end':
|
763
801
|
return _context2.stop();
|
764
802
|
}
|
@@ -1050,7 +1088,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
1050
1088
|
setTimeout(function () {
|
1051
1089
|
_this2.inputJfdxAmount.input.focus();
|
1052
1090
|
_this2.inputJfdxAmount.input.setSelectionRange(0, _this2.inputJfdxAmount.input.value.length);
|
1053
|
-
},
|
1091
|
+
}, 300);
|
1054
1092
|
};
|
1055
1093
|
|
1056
1094
|
_this2.handleJfdxOk = function (e) {
|
@@ -1092,7 +1130,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
1092
1130
|
}
|
1093
1131
|
};
|
1094
1132
|
|
1095
|
-
_this2.onTabsClick2 = function (paymode, brefund, themode, key) {
|
1133
|
+
_this2.onTabsClick2 = function (paymode, brefund, themode, key, bookType) {
|
1096
1134
|
var _enumController$getEn7 = _mutantsUtil.enumController.getEnumOj(),
|
1097
1135
|
PayStyle = _enumController$getEn7.PayStyle,
|
1098
1136
|
Differentiate = _enumController$getEn7.Differentiate;
|
@@ -1125,7 +1163,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
1125
1163
|
})) {
|
1126
1164
|
_message2.default.error('已使用了其他的付款码支付,不可以再使用微信了。');
|
1127
1165
|
} else {
|
1128
|
-
_this2.setCurrentFocusAndAddPay(key);
|
1166
|
+
_this2.setCurrentFocusAndAddPay(key, bookType);
|
1129
1167
|
}
|
1130
1168
|
break;
|
1131
1169
|
case PayStyle.zfb:
|
@@ -1134,7 +1172,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
1134
1172
|
})) {
|
1135
1173
|
_message2.default.error('已使用了其他的付款码支付,不可以再使用支付宝了。');
|
1136
1174
|
} else {
|
1137
|
-
_this2.setCurrentFocusAndAddPay(key);
|
1175
|
+
_this2.setCurrentFocusAndAddPay(key, bookType);
|
1138
1176
|
}
|
1139
1177
|
break;
|
1140
1178
|
case PayStyle.smzf:
|
@@ -1143,11 +1181,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
1143
1181
|
})) {
|
1144
1182
|
_message2.default.error('已使用了其他的付款码支付,不可以再使用扫码支付了。');
|
1145
1183
|
} else {
|
1146
|
-
_this2.setCurrentFocusAndAddPay(key);
|
1184
|
+
_this2.setCurrentFocusAndAddPay(key, bookType);
|
1147
1185
|
}
|
1148
1186
|
break;
|
1149
1187
|
default:
|
1150
|
-
_this2.setCurrentFocusAndAddPay(key);
|
1188
|
+
_this2.setCurrentFocusAndAddPay(key, bookType);
|
1151
1189
|
break;
|
1152
1190
|
}
|
1153
1191
|
};
|
@@ -1190,7 +1228,15 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
1190
1228
|
return bdisabled;
|
1191
1229
|
};
|
1192
1230
|
|
1193
|
-
_this2.onTabsClick = function (key) {
|
1231
|
+
_this2.onTabsClick = function (key, bookType) {
|
1232
|
+
if (!_this2.isDjqValidated(key)) {
|
1233
|
+
return;
|
1234
|
+
};
|
1235
|
+
var _this2$store3 = _this2.store,
|
1236
|
+
paymode = _this2$store3.paymode,
|
1237
|
+
brefund = _this2$store3.brefund,
|
1238
|
+
boriginReturn = _this2$store3.boriginReturn;
|
1239
|
+
|
1194
1240
|
var _enumController$getEn9 = _mutantsUtil.enumController.getEnumOj(),
|
1195
1241
|
PayStyle = _enumController$getEn9.PayStyle,
|
1196
1242
|
Differentiate = _enumController$getEn9.Differentiate;
|
@@ -1207,10 +1253,6 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
1207
1253
|
var _enumController$getEn10 = _mutantsUtil.enumController.getEnumOj(),
|
1208
1254
|
MultiPay = _enumController$getEn10.MultiPay;
|
1209
1255
|
|
1210
|
-
var _this2$store3 = _this2.store,
|
1211
|
-
paymode = _this2$store3.paymode,
|
1212
|
-
brefund = _this2$store3.brefund,
|
1213
|
-
boriginReturn = _this2$store3.boriginReturn;
|
1214
1256
|
var noAlreadyWarn = _this2.state.noAlreadyWarn;
|
1215
1257
|
|
1216
1258
|
if (!_mutantsMicrofx.stores.offlineSys.shouldSettlement(key)) return false;
|
@@ -1219,6 +1261,10 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
1219
1261
|
return;
|
1220
1262
|
}
|
1221
1263
|
var themode = (0, _find3.default)(paymode.paymodes, { 'paymentType': key });
|
1264
|
+
//预订非全款不可使用零售抵现类支付方式
|
1265
|
+
// if(bookType == 'bookPay' && this.store.paymode.isNotFullOnlyBook && themode.virtualPay){
|
1266
|
+
// return Message.error("付订金时不可使用零售抵现类结算方式!");
|
1267
|
+
// }
|
1222
1268
|
if (themode.exchangeRate != 1) {
|
1223
1269
|
var forign = (0, _find3.default)(paymode.thePaymodes, function (mode) {
|
1224
1270
|
return mode.exchangeRate != 1 && mode.paymentType != key;
|
@@ -1249,17 +1295,17 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
1249
1295
|
that.setState({
|
1250
1296
|
noAlreadyWarn: false
|
1251
1297
|
});
|
1252
|
-
that.onTabsClick2(paymode, brefund, themode, key);
|
1298
|
+
that.onTabsClick2(paymode, brefund, themode, key, bookType);
|
1253
1299
|
},
|
1254
1300
|
onCancel: function onCancel() {}
|
1255
|
-
}) : that.onTabsClick2(paymode, brefund, themode, key)
|
1301
|
+
}) : that.onTabsClick2(paymode, brefund, themode, key, bookType);
|
1256
1302
|
break;
|
1257
1303
|
default:
|
1258
|
-
_this2.onTabsClick2(paymode, brefund, themode, key);
|
1304
|
+
_this2.onTabsClick2(paymode, brefund, themode, key, bookType);
|
1259
1305
|
break;
|
1260
1306
|
}
|
1261
1307
|
} else {
|
1262
|
-
_this2.onTabsClick2(paymode, brefund, themode, key);
|
1308
|
+
_this2.onTabsClick2(paymode, brefund, themode, key, bookType);
|
1263
1309
|
}
|
1264
1310
|
};
|
1265
1311
|
|
@@ -1282,8 +1328,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
1282
1328
|
}
|
1283
1329
|
};
|
1284
1330
|
|
1285
|
-
_this2.setCurrentFocusAndAddPay = function (key, payId) {
|
1286
|
-
_this2.store.changeFocusAndAddPay(key);
|
1331
|
+
_this2.setCurrentFocusAndAddPay = function (key, bookType, payId) {
|
1332
|
+
_this2.store.changeFocusAndAddPay(key, bookType);
|
1287
1333
|
if (_this2.store.bquick) {
|
1288
1334
|
_this2.handleSettle("quickPay");
|
1289
1335
|
} else {
|
@@ -1291,7 +1337,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
1291
1337
|
}
|
1292
1338
|
};
|
1293
1339
|
|
1294
|
-
_this2.onDelPay = function (index, boriginReturn, type) {
|
1340
|
+
_this2.onDelPay = function (index, boriginReturn, type, bookType) {
|
1295
1341
|
var _enumController$getEn12 = _mutantsUtil.enumController.getEnumOj(),
|
1296
1342
|
PayStyle = _enumController$getEn12.PayStyle;
|
1297
1343
|
|
@@ -1300,26 +1346,32 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
1300
1346
|
if (storeType != 1 && boriginReturn && (type == PayStyle.hyczk || type == PayStyle.djq || type == PayStyle.jfdx)) {
|
1301
1347
|
_message2.default.info('原单退货时,该结算方式不可以删除。');
|
1302
1348
|
} else {
|
1303
|
-
_this2.store.delPay(index);
|
1349
|
+
_this2.store.delPay(index, bookType);
|
1304
1350
|
}
|
1305
1351
|
};
|
1306
1352
|
|
1307
|
-
_this2.handleChange = function (index, e) {
|
1353
|
+
_this2.handleChange = function (index, e, type) {
|
1308
1354
|
if (!_mutantsMicrofx.stores.offlineSys.shouldSettlement(_this2.store.paymode.currentFocus)) return;
|
1355
|
+
var mode = (0, _find3.default)(_this2.store.paymode.thePaymodes, { 'paymethodId': index });
|
1356
|
+
// if(type == 'bookPay' && this.store.paymode.isNotFullOnlyBook && mode.virtualPay){
|
1357
|
+
// return Message.error("付订金时不可使用零售抵现类结算方式!");
|
1358
|
+
// }
|
1309
1359
|
var currentInput = e.target;
|
1310
1360
|
var amountMaxLength = parseInt(_this2.props.initData["AmountMaxLength"] || 10);
|
1311
1361
|
if (!isNaN(e.target.value) || e.target.value == '-') {
|
1312
1362
|
if (e.target.value.length <= amountMaxLength) {
|
1313
|
-
_this2.store.changeValue(index, e.target.value, false);
|
1363
|
+
_this2.store.changeValue(index, e.target.value, false, type);
|
1314
1364
|
}
|
1315
1365
|
}
|
1316
1366
|
};
|
1317
1367
|
|
1318
1368
|
_this2.setCurrentModeValue = function (val, max) {
|
1369
|
+
var returnType = _this2.getNotBoriginReturn();
|
1370
|
+
|
1319
1371
|
var _enumController$getEn13 = _mutantsUtil.enumController.getEnumOj(),
|
1320
1372
|
PayStyle = _enumController$getEn13.PayStyle;
|
1321
1373
|
|
1322
|
-
var reg = /^[\d.]+$/g;
|
1374
|
+
var reg = returnType ? /^[\d.-]+$/g : /^[\d.]+$/g;
|
1323
1375
|
if (_this2.store.paymode.currentMode.paymentType === PayStyle.hyczk || _this2.store.paymode.currentMode.paymentType === PayStyle.jfdx) {
|
1324
1376
|
if (!val) {
|
1325
1377
|
_this2.setState({
|
@@ -1350,14 +1402,13 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
1350
1402
|
}
|
1351
1403
|
}
|
1352
1404
|
}
|
1353
|
-
// let bjfdx=this.store.paymode.currentMode.paymentType==PayStyle.jfdx;
|
1354
1405
|
_this2.store.paymode.setCurrentModeValue(val, max);
|
1355
1406
|
};
|
1356
1407
|
|
1357
|
-
_this2.onBlur = function (index, e) {
|
1408
|
+
_this2.onBlur = function (index, e, type) {
|
1358
1409
|
_this2.currentInput = null;
|
1359
1410
|
_this2.store.changeFocusOnly(-1);
|
1360
|
-
_this2.store.changeValue(index, e.target.value == '-' ? 0 : e.target.value, true);
|
1411
|
+
_this2.store.changeValue(index, e.target.value == '-' ? 0 : e.target.value, true, type);
|
1361
1412
|
};
|
1362
1413
|
|
1363
1414
|
_this2.onFocus = function (index, mode, paymode, e) {
|
@@ -1439,15 +1490,16 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
1439
1490
|
return;
|
1440
1491
|
}
|
1441
1492
|
_this2.czkdebounced = (0, _debounce3.default)((0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee5() {
|
1442
|
-
var memberdata1;
|
1493
|
+
var returnType, memberdata1;
|
1443
1494
|
return _regenerator2.default.wrap(function _callee5$(_context5) {
|
1444
1495
|
while (1) {
|
1445
1496
|
switch (_context5.prev = _context5.next) {
|
1446
1497
|
case 0:
|
1447
|
-
|
1448
|
-
|
1498
|
+
returnType = _this2.getNotBoriginReturn();
|
1499
|
+
_context5.next = 3;
|
1500
|
+
return _this2.store.loadCzk(v, returnType);
|
1449
1501
|
|
1450
|
-
case
|
1502
|
+
case 3:
|
1451
1503
|
memberdata1 = _context5.sent;
|
1452
1504
|
|
1453
1505
|
if (memberdata1 && memberdata1.length === 1) {
|
@@ -1464,7 +1516,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
1464
1516
|
});
|
1465
1517
|
}
|
1466
1518
|
|
1467
|
-
case
|
1519
|
+
case 5:
|
1468
1520
|
case 'end':
|
1469
1521
|
return _context5.stop();
|
1470
1522
|
}
|
@@ -1481,7 +1533,13 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
1481
1533
|
}, 2000);
|
1482
1534
|
};
|
1483
1535
|
|
1484
|
-
_this2.onHotKeyClick1 = function (mode, index, boriginReturn) {
|
1536
|
+
_this2.onHotKeyClick1 = function (mode, index, boriginReturn, bookType) {
|
1537
|
+
if (!_this2.isDjqValidated(mode.paymentType)) {
|
1538
|
+
return;
|
1539
|
+
};
|
1540
|
+
// if (bookType == 'bookPay' && this.store.paymode.isNotFullOnlyBook && mode.virtualPay){
|
1541
|
+
// return Message.error("付订金时不可使用零售抵现类结算方式!");
|
1542
|
+
// }
|
1485
1543
|
if (!_mutantsMicrofx.stores.offlineSys.shouldSettlement(mode.paymentType)) return false;
|
1486
1544
|
if (_this2.hotkeydebouncedPayMode == mode) {
|
1487
1545
|
return;
|
@@ -1521,11 +1579,14 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
1521
1579
|
}
|
1522
1580
|
};
|
1523
1581
|
|
1524
|
-
_this2.onHotKeyClick2 = function (index, mode, paymode, e) {
|
1582
|
+
_this2.onHotKeyClick2 = function (index, mode, paymode, e, bookType) {
|
1525
1583
|
if (!_mutantsMicrofx.stores.offlineSys.shouldSettlement(mode.paymentType)) return false;
|
1526
1584
|
if (_this2.hotkeydebouncedPayMode == mode) {
|
1527
1585
|
return;
|
1528
1586
|
}
|
1587
|
+
// if (bookType == 'bookPay' && this.store.paymode.isNotFullOnlyBook && mode.virtualPay){
|
1588
|
+
// return Message.error("付订金时不可使用零售抵现类结算方式!");
|
1589
|
+
// }
|
1529
1590
|
_this2.store.changeClickFocusOnly(mode.paymentType);
|
1530
1591
|
_this2.setCurrentFocusOnly(mode.paymentType);
|
1531
1592
|
if (_this2.hotkeydebounced) {
|
@@ -1561,8 +1622,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
1561
1622
|
_this2.hotkeydebounced = null;
|
1562
1623
|
}
|
1563
1624
|
_this2.hotkeydebounced = (0, _debounce3.default)(function () {
|
1564
|
-
|
1565
|
-
var boriginReturn = _this2.context && _this2.context.viewModel && _this2.context.viewModel.data && JSON.getCellValue(_this2.context.viewModel.data, "IsOriginalReturn");
|
1625
|
+
var boriginReturn = _this2.getBoriginReturn();
|
1566
1626
|
var thePaymodes = newStyle ? (0, _filter3.default)(paymode.thePaymodes, function (m) {
|
1567
1627
|
return !(_this2.checkModeDisabled(m.paymentType, brefund, boriginReturn) && parseFloat(m.value) == 0);
|
1568
1628
|
}) : paymode.thePaymodes;
|
@@ -1571,7 +1631,6 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
1571
1631
|
if (!notsettle && !_this2.checkSettleDisabled(paymode, thePaymodes)) {
|
1572
1632
|
_this2.handleSettle();
|
1573
1633
|
} else if ((thePaymodes || []).length > 0) {
|
1574
|
-
|
1575
1634
|
// 根据currentIndex = paymethodeId 获取当前支付方式位置
|
1576
1635
|
var payIndex = -1;
|
1577
1636
|
thePaymodes.forEach(function (paymodes, index) {
|
@@ -1676,6 +1735,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
1676
1735
|
|
1677
1736
|
_modalWraper2.default.confirm({
|
1678
1737
|
className: 'tplus-confirm-modal',
|
1738
|
+
zIndex: 1007,
|
1679
1739
|
content: _react2.default.createElement(
|
1680
1740
|
'div',
|
1681
1741
|
{ className: 'unReturn' },
|
@@ -1762,7 +1822,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
1762
1822
|
};
|
1763
1823
|
|
1764
1824
|
_this2.settleSuccess = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee8() {
|
1765
|
-
var _enumController$getEn20, PayStyle, _this2$store$paymode, amount, received, thePaymodes, IdbusiType, charge, openCashBox, _this, showTwoScreen, getSettleGift, type, resp1;
|
1825
|
+
var _enumController$getEn20, PayStyle, _this2$store$paymode, amount, received, thePaymodes, IdbusiType, charge, openCashBox, _this, showTwoScreen, _this2$store6, getSettleGift, isFull, type, resp1;
|
1766
1826
|
|
1767
1827
|
return _regenerator2.default.wrap(function _callee8$(_context8) {
|
1768
1828
|
while (1) {
|
@@ -1822,7 +1882,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
1822
1882
|
}
|
1823
1883
|
};
|
1824
1884
|
|
1825
|
-
|
1885
|
+
_this2$store6 = _this2.store, getSettleGift = _this2$store6.getSettleGift, isFull = _this2$store6.isFull;
|
1826
1886
|
type = _this2.props.type;
|
1827
1887
|
resp1 = false;
|
1828
1888
|
|
@@ -1870,8 +1930,10 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
1870
1930
|
message = "退货成功";
|
1871
1931
|
} else if (MemberPoints && Number(amount) == Number(0)) {
|
1872
1932
|
message = "兑换成功";
|
1933
|
+
} else if (IdbusiType == 39 && received == 0) {
|
1934
|
+
message = "取货成功";
|
1873
1935
|
}
|
1874
|
-
window.__successModal = (0, _utils.showSuccessModal)(amount, received, charge, _this.props.onModalClose, isXianjin, message, resp1 && resp1.data, _mutantsMicrofx.stores, function () {
|
1936
|
+
window.__successModal = (0, _utils.showSuccessModal)(amount, received, charge, _this.props.onModalClose, isXianjin, message, resp1 && resp1.data, _mutantsMicrofx.stores, IdbusiType, isFull, function () {
|
1875
1937
|
_this.handleGuestShow(5);
|
1876
1938
|
});
|
1877
1939
|
_this2.setState({ isXianjin: false });
|
@@ -2028,7 +2090,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2028
2090
|
};
|
2029
2091
|
}();
|
2030
2092
|
|
2031
|
-
var _enumController$getEn21, PayStyle, _this2$
|
2093
|
+
var _enumController$getEn21, PayStyle, _this2$store7, paymode, brefund, boriginReturn, newStyle, isQuickPay, that, status, zeromode, promises, thePaymodes, quickmode, commit;
|
2032
2094
|
|
2033
2095
|
return _regenerator2.default.wrap(function _callee11$(_context11) {
|
2034
2096
|
while (1) {
|
@@ -2039,7 +2101,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2039
2101
|
});
|
2040
2102
|
console.log("settlement.handleSettle开始执行,参数:", +args);
|
2041
2103
|
_enumController$getEn21 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn21.PayStyle;
|
2042
|
-
_this2$
|
2104
|
+
_this2$store7 = _this2.store, paymode = _this2$store7.paymode, brefund = _this2$store7.brefund, boriginReturn = _this2$store7.boriginReturn, newStyle = _this2$store7.newStyle;
|
2043
2105
|
isQuickPay = args === 'quickPay';
|
2044
2106
|
that = _this2;
|
2045
2107
|
status = false;
|
@@ -2368,7 +2430,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2368
2430
|
|
2369
2431
|
//成功
|
2370
2432
|
//返回
|
2371
|
-
that.setCurrentFocusAndAddPay(curmode.paymentType, curmode.paymethodId);
|
2433
|
+
that.setCurrentFocusAndAddPay(curmode.paymentType, null, curmode.paymethodId);
|
2372
2434
|
_promise2.default.resolve();
|
2373
2435
|
_context12.next = 15;
|
2374
2436
|
break;
|
@@ -2591,58 +2653,122 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2591
2653
|
};
|
2592
2654
|
}();
|
2593
2655
|
|
2594
|
-
_this2.btnDebounced = function (
|
2595
|
-
|
2596
|
-
|
2597
|
-
isInputMember: true
|
2598
|
-
});
|
2656
|
+
_this2.btnDebounced = function () {
|
2657
|
+
var _ref24 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee16(type, bquick) {
|
2658
|
+
var IdbusiType, CustomerPhone, DistributionMode, Address, isEnableSerialNumber, resultObj, title, _enumController$getEn23, PayStyle, _this2$store8, paymode, brefund, boriginReturn, newStyle, status;
|
2599
2659
|
|
2600
|
-
|
2601
|
-
|
2660
|
+
return _regenerator2.default.wrap(function _callee16$(_context16) {
|
2661
|
+
while (1) {
|
2662
|
+
switch (_context16.prev = _context16.next) {
|
2663
|
+
case 0:
|
2664
|
+
IdbusiType = _this2.context && _this2.context.viewModel && _this2.context.viewModel.data && _this2.context.viewModel.data.IdbusiType;
|
2665
|
+
CustomerPhone = _this2.context && _this2.context.viewModel && _this2.context.viewModel.data && _this2.context.viewModel.data.CustomerPhone;
|
2666
|
+
DistributionMode = _this2.context && _this2.context.viewModel && _this2.context.viewModel.data && _this2.context.viewModel.data.DistributionMode;
|
2667
|
+
Address = _this2.context && _this2.context.viewModel && _this2.context.viewModel.data && _this2.context.viewModel.data.Address;
|
2668
|
+
//预订时,若没录入买家手机号,或配送方式为快递时,弹框买家信息确认框
|
2669
|
+
|
2670
|
+
if (!(IdbusiType == 38)) {
|
2671
|
+
_context16.next = 14;
|
2672
|
+
break;
|
2673
|
+
}
|
2602
2674
|
|
2603
|
-
|
2604
|
-
|
2605
|
-
|
2606
|
-
|
2607
|
-
|
2675
|
+
//预售下单时,启用了序列号管理和批号/有效期管理的商品,不支持快递和同城配送
|
2676
|
+
isEnableSerialNumber = (0, _tplusPoslogin.PosInitData)("IsEnableSerialNumber");
|
2677
|
+
resultObj = _this2.context.viewModel.data.RetailDetails.find(function (o) {
|
2678
|
+
return o.Inventory.IsSerialNumber && (o.Inventory.IsBatch || o.Inventory.IsQualityPeriod);
|
2679
|
+
});
|
2608
2680
|
|
2681
|
+
if (!(isEnableSerialNumber && resultObj && (DistributionMode.Id == 'ELECTRONIC' || DistributionMode.Id == 'CITY_DISTRIBUTE'))) {
|
2682
|
+
_context16.next = 9;
|
2683
|
+
break;
|
2684
|
+
}
|
2609
2685
|
|
2610
|
-
|
2686
|
+
return _context16.abrupt('return', _message2.default.error('启用了序列号管理和批号/有效期管理的商品,不支持快递和同城配送'));
|
2611
2687
|
|
2612
|
-
|
2613
|
-
paymode.thePaymodes.forEach(function (v) {
|
2614
|
-
if (v.paymentType === PayStyle.xianjin && v.value !== '0.00') {
|
2615
|
-
status = true;
|
2616
|
-
}
|
2617
|
-
});
|
2618
|
-
_this2.setState({
|
2619
|
-
isXianjin: status ? true : false
|
2620
|
-
});
|
2688
|
+
case 9:
|
2621
2689
|
|
2622
|
-
|
2623
|
-
|
2624
|
-
|
2625
|
-
|
2626
|
-
|
2627
|
-
|
2628
|
-
|
2629
|
-
|
2630
|
-
|
2631
|
-
|
2632
|
-
|
2633
|
-
|
2634
|
-
|
2635
|
-
|
2636
|
-
|
2637
|
-
|
2638
|
-
|
2639
|
-
|
2640
|
-
|
2690
|
+
if (DistributionMode.Id == 'ON_SITE_PICKUP' && !CustomerPhone && _this2.context.viewModel.data.Member.Mobilephone) {
|
2691
|
+
_this2.props.syncMemberInfoProcessor();
|
2692
|
+
}
|
2693
|
+
|
2694
|
+
if (!(!CustomerPhone && !_this2.context.viewModel.data.Member.Mobilephone || DistributionMode.Id == 'ELECTRONIC' || DistributionMode.Id == 'CITY_DISTRIBUTE')) {
|
2695
|
+
_context16.next = 14;
|
2696
|
+
break;
|
2697
|
+
}
|
2698
|
+
|
2699
|
+
title = (DistributionMode.Id == 'ELECTRONIC' || DistributionMode.Id == 'CITY_DISTRIBUTE') && Address ? '收货地址确认' : '收货人';
|
2700
|
+
_context16.next = 14;
|
2701
|
+
return _this2.props.openBuyerModal(title);
|
2702
|
+
|
2703
|
+
case 14:
|
2704
|
+
|
2705
|
+
_this2.setState({
|
2706
|
+
bquick: bquick,
|
2707
|
+
isInputMember: true
|
2708
|
+
});
|
2709
|
+
_enumController$getEn23 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn23.PayStyle;
|
2710
|
+
_this2$store8 = _this2.store, paymode = _this2$store8.paymode, brefund = _this2$store8.brefund, boriginReturn = _this2$store8.boriginReturn, newStyle = _this2$store8.newStyle;
|
2711
|
+
|
2712
|
+
if (!(bquick && !_mutantsMicrofx.stores.offlineSys.shouldSettlement(type))) {
|
2713
|
+
_context16.next = 19;
|
2714
|
+
break;
|
2715
|
+
}
|
2716
|
+
|
2717
|
+
return _context16.abrupt('return', false);
|
2718
|
+
|
2719
|
+
case 19:
|
2720
|
+
status = false;
|
2721
|
+
|
2722
|
+
paymode.thePaymodes.forEach(function (v) {
|
2723
|
+
if (v.paymentType === PayStyle.xianjin && v.value !== '0.00') {
|
2724
|
+
status = true;
|
2725
|
+
}
|
2726
|
+
});
|
2727
|
+
_this2.setState({
|
2728
|
+
isXianjin: status ? true : false
|
2729
|
+
});
|
2730
|
+
|
2731
|
+
if (!_this2.btndebounced) {
|
2732
|
+
_context16.next = 24;
|
2733
|
+
break;
|
2734
|
+
}
|
2735
|
+
|
2736
|
+
return _context16.abrupt('return');
|
2737
|
+
|
2738
|
+
case 24:
|
2739
|
+
_this2.btndebounced = (0, _debounce3.default)(function () {
|
2740
|
+
if (bquick) {
|
2741
|
+
_this2.quickSettle(type);
|
2742
|
+
} else {
|
2743
|
+
_this2.showModal();
|
2744
|
+
}
|
2745
|
+
}, 1000, {
|
2746
|
+
'leading': true,
|
2747
|
+
'trailing': false
|
2748
|
+
});
|
2749
|
+
_this2.btndebounced();
|
2750
|
+
setTimeout(function () {
|
2751
|
+
_this2.btndebounced.cancel();
|
2752
|
+
_this2.btndebounced = null;
|
2753
|
+
}, 2000);
|
2754
|
+
|
2755
|
+
case 27:
|
2756
|
+
case 'end':
|
2757
|
+
return _context16.stop();
|
2758
|
+
}
|
2759
|
+
}
|
2760
|
+
}, _callee16, _this3);
|
2761
|
+
}));
|
2762
|
+
|
2763
|
+
return function (_x10, _x11) {
|
2764
|
+
return _ref24.apply(this, arguments);
|
2765
|
+
};
|
2766
|
+
}();
|
2641
2767
|
|
2642
2768
|
_this2.onCzkChange = function (v) {
|
2643
2769
|
// console.log("czk change:"+new Date().toLocaleTimeString())
|
2644
|
-
var
|
2645
|
-
isNewRetailBCPos =
|
2770
|
+
var _ref25 = _mutantsUtil.platform || {},
|
2771
|
+
isNewRetailBCPos = _ref25.isNewRetailBCPos;
|
2646
2772
|
|
2647
2773
|
if (!isNewRetailBCPos) {
|
2648
2774
|
_this2.store.paymode.currentMode.member.setCardNo(v);
|
@@ -2680,7 +2806,6 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2680
2806
|
if (_this2.debounced) {
|
2681
2807
|
_this2.debounced.cancel();
|
2682
2808
|
_this2.debounced = null;
|
2683
|
-
// console.log("debounce canceled");
|
2684
2809
|
}
|
2685
2810
|
if (!isKeyBorad) {
|
2686
2811
|
_this2.debounced = (0, _debounce3.default)(function () {
|
@@ -2722,7 +2847,20 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2722
2847
|
value = parseFloat(receivable) + parseFloat(inputTarget2.innerHTML);
|
2723
2848
|
}
|
2724
2849
|
inputTarget.value = value;
|
2725
|
-
|
2850
|
+
//预订现金快捷支付,这里修改找零计算,大于应收小于全额金额,不找零,大于全额金额找零
|
2851
|
+
if (_this2.store.paymode.isNotFullBook) {
|
2852
|
+
if (parseFloat(value || 0) > _this2.store.paymode.bookMaxValue) {
|
2853
|
+
inputTarget2.innerHTML = (0, _utils.getFixedNumber)(parseFloat(value || 0) - parseFloat(_this2.store.paymode.bookMaxValue));
|
2854
|
+
}
|
2855
|
+
if (parseFloat(value || 0) < parseFloat(receivable)) {
|
2856
|
+
inputTarget2.innerHTML = (0, _utils.getFixedNumber)(parseFloat(value || 0) - parseFloat(receivable));
|
2857
|
+
}
|
2858
|
+
if (parseFloat(receivable) <= parseFloat(value || 0) && parseFloat(value || 0) <= _this2.store.paymode.bookMaxValue) {
|
2859
|
+
inputTarget2.innerHTML = (0, _utils.getFixedNumber)(0);
|
2860
|
+
}
|
2861
|
+
} else {
|
2862
|
+
inputTarget2.innerHTML = (0, _utils.getFixedNumber)(parseFloat(value || 0) - parseFloat(receivable));
|
2863
|
+
}
|
2726
2864
|
};
|
2727
2865
|
|
2728
2866
|
_this2.changeScanProduct = function () {
|
@@ -2779,6 +2917,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2779
2917
|
type = _this2$props3.type;
|
2780
2918
|
|
2781
2919
|
var isManualIntoAmount = void 0;
|
2920
|
+
var BuyerPayFreight = _this2.context && _this2.context.viewModel && _this2.context.viewModel.data && _this2.context.viewModel.data.BuyerPayFreight;
|
2921
|
+
var DistributionMode = _this2.context && _this2.context.viewModel && _this2.context.viewModel.data && _this2.context.viewModel.data.DistributionMode;
|
2782
2922
|
// 付款弹窗
|
2783
2923
|
return new _promise2.default(function (resolve, reject) {
|
2784
2924
|
var _enumController$getEn27 = _mutantsUtil.enumController.getEnumOj(),
|
@@ -2868,7 +3008,14 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2868
3008
|
_react2.default.createElement(
|
2869
3009
|
'span',
|
2870
3010
|
{ className: 'yfje' },
|
2871
|
-
paymode.value
|
3011
|
+
paymode.value,
|
3012
|
+
DistributionMode && (DistributionMode.Id == 'ELECTRONIC' || DistributionMode.Id == 'CITY_DISTRIBUTE') && BuyerPayFreight && BuyerPayFreight > 0 ? _react2.default.createElement(
|
3013
|
+
'span',
|
3014
|
+
{ className: 'freight' },
|
3015
|
+
'(\u5305\u542B',
|
3016
|
+
BuyerPayFreight,
|
3017
|
+
'\u5143\u8FD0\u8D39)'
|
3018
|
+
) : null
|
2872
3019
|
)
|
2873
3020
|
),
|
2874
3021
|
paymode.paymentType == PayStyle.xianjin && _react2.default.createElement(
|
@@ -2992,7 +3139,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2992
3139
|
settleDisabled: false
|
2993
3140
|
});
|
2994
3141
|
that.store.bquick && that.props.onCancelSettle && that.props.onCancelSettle();
|
2995
|
-
that.store.bquick && that.store.delPay(paymode.paymethodId);
|
3142
|
+
that.store.bquick && that.store.delPay(paymode.paymethodId, !isQuickPay ? 'bookPay' : '');
|
2996
3143
|
reject('\u652F\u4ED8\u65B9\u5F0F: ' + paymode.name + '\u5931\u8D25');
|
2997
3144
|
} },
|
2998
3145
|
'\u53D6\u6D88'
|
@@ -3022,7 +3169,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
3022
3169
|
modal.destroy();
|
3023
3170
|
setTimeout(function () {
|
3024
3171
|
if (paymode.paymentType == PayStyle.xianjin) {
|
3025
|
-
that.store.changeValue(paymode.paymethodId, v, false);
|
3172
|
+
that.store.changeValue(paymode.paymethodId, v, false, 'bookPay');
|
3026
3173
|
} else {
|
3027
3174
|
paymode.authCode = v;
|
3028
3175
|
}
|
@@ -3051,9 +3198,9 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
3051
3198
|
};
|
3052
3199
|
|
3053
3200
|
_this2.checkCurrentModeHaveMutex = function (type) {
|
3054
|
-
var _this2$
|
3055
|
-
paymode = _this2$
|
3056
|
-
newStyle = _this2$
|
3201
|
+
var _this2$store9 = _this2.store,
|
3202
|
+
paymode = _this2$store9.paymode,
|
3203
|
+
newStyle = _this2$store9.newStyle;
|
3057
3204
|
|
3058
3205
|
var _enumController$getEn28 = _mutantsUtil.enumController.getEnumOj(),
|
3059
3206
|
PayStyle = _enumController$getEn28.PayStyle;
|
@@ -3161,6 +3308,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
3161
3308
|
var CarouselTp = CarouseOut || _carousel2.default;
|
3162
3309
|
var newParams = CarouseOut ? {} : params;
|
3163
3310
|
var mapList = [];
|
3311
|
+
var type = _this2.props.type;
|
3312
|
+
|
3164
3313
|
paymodes.forEach(function (item, index) {
|
3165
3314
|
// 整除则新增轮播页面
|
3166
3315
|
if (index % carouselStart === 0) {
|
@@ -3176,7 +3325,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
3176
3325
|
'div',
|
3177
3326
|
null,
|
3178
3327
|
(0, _map3.default)(modeList, function (mode, modeIndex) {
|
3179
|
-
return _this2.renderToolbtn(mode, index * carouselStart + modeIndex);
|
3328
|
+
return _this2.renderToolbtn(mode, index * carouselStart + modeIndex, type !== 1 ? 'bookPay' : '');
|
3180
3329
|
})
|
3181
3330
|
);
|
3182
3331
|
})
|
@@ -3227,19 +3376,23 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
3227
3376
|
|
3228
3377
|
_this2.hasElectron = hasElectron;
|
3229
3378
|
|
3230
|
-
var
|
3231
|
-
MemberMeStorageCardInputByKeyBoard =
|
3232
|
-
ICCardServer =
|
3233
|
-
ICCardPassword =
|
3379
|
+
var _ref26 = _mutantsMicrofx.stores.user.options.get('loginInfo') || {},
|
3380
|
+
MemberMeStorageCardInputByKeyBoard = _ref26.MemberMeStorageCardInputByKeyBoard,
|
3381
|
+
ICCardServer = _ref26.ICCardServer,
|
3382
|
+
ICCardPassword = _ref26.ICCardPassword,
|
3383
|
+
PreSellOrBook = _ref26.PreSellOrBook,
|
3384
|
+
PercentageWhenBook = _ref26.PercentageWhenBook;
|
3234
3385
|
|
3235
3386
|
_this2.isStorageCardInputType = MemberMeStorageCardInputByKeyBoard; // 仅储值卡是否禁用键盘输入,'0'为不禁用 '1'为禁用
|
3236
3387
|
_this2.iCCardServer = parseInt(ICCardServer); // 启用IC卡:0为禁用 1为启用
|
3237
3388
|
_this2.iCCardPassword = ICCardPassword; //IC卡密码
|
3389
|
+
_this2.isBook = PreSellOrBook == 'BOOK';
|
3390
|
+
_this2.percentageWhenBook = PercentageWhenBook;
|
3238
3391
|
//移动端环境下,没有读取IC卡的方式。
|
3239
3392
|
|
3240
|
-
var
|
3241
|
-
isHorizontalPad =
|
3242
|
-
isHorizontalSunMi =
|
3393
|
+
var _ref27 = _mutantsUtil.platform || {},
|
3394
|
+
isHorizontalPad = _ref27.isHorizontalPad,
|
3395
|
+
isHorizontalSunMi = _ref27.isHorizontalSunMi;
|
3243
3396
|
|
3244
3397
|
_this2.isHorizontalPad = !!isHorizontalPad;
|
3245
3398
|
_this2.isHorizontalSunMi = !!isHorizontalSunMi;
|
@@ -3276,6 +3429,15 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
3276
3429
|
}
|
3277
3430
|
}
|
3278
3431
|
|
3432
|
+
//是否退货
|
3433
|
+
|
3434
|
+
|
3435
|
+
//原单退货状态
|
3436
|
+
|
3437
|
+
|
3438
|
+
//非原单退货状态
|
3439
|
+
|
3440
|
+
|
3279
3441
|
//对结算按钮超出的处理
|
3280
3442
|
|
3281
3443
|
}, {
|
@@ -3356,6 +3518,20 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
3356
3518
|
|
3357
3519
|
//jfdx
|
3358
3520
|
|
3521
|
+
}, {
|
3522
|
+
key: 'isDjqValidated',
|
3523
|
+
value: function isDjqValidated(key) {
|
3524
|
+
var paymode = this.store.paymode;
|
3525
|
+
|
3526
|
+
var _enumController$getEn32 = _mutantsUtil.enumController.getEnumOj(),
|
3527
|
+
PayStyle = _enumController$getEn32.PayStyle;
|
3528
|
+
|
3529
|
+
if (key === PayStyle.djq && Math.Minus(paymode.received, paymode.amount) > 0) {
|
3530
|
+
_message2.default.warn('实收金额已大于应收金额,不允许使用优惠券');
|
3531
|
+
return false;
|
3532
|
+
}
|
3533
|
+
return true;
|
3534
|
+
}
|
3359
3535
|
|
3360
3536
|
/**
|
3361
3537
|
*
|
@@ -3366,8 +3542,79 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
3366
3542
|
|
3367
3543
|
// 处理客显显示功能
|
3368
3544
|
|
3545
|
+
|
3369
3546
|
//that[`inputS${paymode.paymethodId}`]
|
3370
3547
|
|
3548
|
+
}, {
|
3549
|
+
key: 'isNoProductTip',
|
3550
|
+
value: function isNoProductTip(nonProductMap) {
|
3551
|
+
var _ref28 = this.context.viewModel.data || {},
|
3552
|
+
RetailDetails = _ref28.RetailDetails;
|
3553
|
+
|
3554
|
+
var temphtml = [];
|
3555
|
+
if ((0, _keys2.default)(nonProductMap).length > 0) {
|
3556
|
+
var columns = [{
|
3557
|
+
title: '商品名称',
|
3558
|
+
dataIndex: 'name',
|
3559
|
+
key: 'name',
|
3560
|
+
ellipsis: true
|
3561
|
+
}, {
|
3562
|
+
title: '原因',
|
3563
|
+
dataIndex: 'reason',
|
3564
|
+
key: 'reason',
|
3565
|
+
ellipsis: true
|
3566
|
+
}];
|
3567
|
+
|
3568
|
+
var _loop = function _loop(key) {
|
3569
|
+
var product = RetailDetails.find(function (o) {
|
3570
|
+
return o.Idinventory == key;
|
3571
|
+
});
|
3572
|
+
temphtml.push({ name: product.Inventory.Name, reason: nonProductMap[key] });
|
3573
|
+
};
|
3574
|
+
|
3575
|
+
for (var key in nonProductMap) {
|
3576
|
+
_loop(key);
|
3577
|
+
}
|
3578
|
+
var modal = (0, _asyncModal2.default)({
|
3579
|
+
onPressEnter: function onPressEnter() {
|
3580
|
+
modal.destroy();
|
3581
|
+
},
|
3582
|
+
maskClosable: false,
|
3583
|
+
keyboard: false,
|
3584
|
+
closable: true,
|
3585
|
+
title: '不可配送商品',
|
3586
|
+
width: 600,
|
3587
|
+
className: '',
|
3588
|
+
content: _react2.default.createElement(
|
3589
|
+
'div',
|
3590
|
+
{ className: 'not-distribution-tip' },
|
3591
|
+
_react2.default.createElement(
|
3592
|
+
'div',
|
3593
|
+
{ className: 'tip-content' },
|
3594
|
+
_react2.default.createElement(_table2.default, {
|
3595
|
+
columns: columns,
|
3596
|
+
dataSource: temphtml,
|
3597
|
+
scroll: { y: 240 },
|
3598
|
+
pagination: false,
|
3599
|
+
size: 'middle' })
|
3600
|
+
),
|
3601
|
+
_react2.default.createElement(
|
3602
|
+
'div',
|
3603
|
+
{ className: 'not-distribution-btn' },
|
3604
|
+
_react2.default.createElement(
|
3605
|
+
_button2.default,
|
3606
|
+
{ type: 'primary', onClick: function onClick() {
|
3607
|
+
modal.destroy();
|
3608
|
+
} },
|
3609
|
+
'\u77E5\u9053\u4E86'
|
3610
|
+
)
|
3611
|
+
)
|
3612
|
+
)
|
3613
|
+
});
|
3614
|
+
return true;
|
3615
|
+
}
|
3616
|
+
return false;
|
3617
|
+
}
|
3371
3618
|
}, {
|
3372
3619
|
key: 'checkThepaymode',
|
3373
3620
|
value: function checkThepaymode(key) {
|
@@ -3376,8 +3623,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
3376
3623
|
}, {
|
3377
3624
|
key: 'onKeyboardChange',
|
3378
3625
|
value: function onKeyboardChange(key) {
|
3379
|
-
var _enumController$
|
3380
|
-
PayStyle = _enumController$
|
3626
|
+
var _enumController$getEn33 = _mutantsUtil.enumController.getEnumOj(),
|
3627
|
+
PayStyle = _enumController$getEn33.PayStyle;
|
3381
3628
|
|
3382
3629
|
if (this.currentInput) {
|
3383
3630
|
if (this.store.paymode.currentMode) {
|
@@ -3395,12 +3642,12 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
3395
3642
|
}
|
3396
3643
|
}, {
|
3397
3644
|
key: 'renderToolbtn',
|
3398
|
-
value: function renderToolbtn(mode, index) {
|
3645
|
+
value: function renderToolbtn(mode, index, bookType) {
|
3399
3646
|
var _this7 = this;
|
3400
3647
|
|
3401
|
-
var _enumController$
|
3402
|
-
PayIcon = _enumController$
|
3403
|
-
PayStyle = _enumController$
|
3648
|
+
var _enumController$getEn34 = _mutantsUtil.enumController.getEnumOj(),
|
3649
|
+
PayIcon = _enumController$getEn34.PayIcon,
|
3650
|
+
PayStyle = _enumController$getEn34.PayStyle;
|
3404
3651
|
|
3405
3652
|
var isReturn = this.props.isReturn;
|
3406
3653
|
var _store = this.store,
|
@@ -3433,7 +3680,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
3433
3680
|
return _react2.default.createElement(
|
3434
3681
|
'div',
|
3435
3682
|
{ key: index + "", className: paymodeDisabled + ' ' + paymodeSelected + ' paymode hotkey_' + this.compoundHotkeysList[hotkeyIndex], onClick: function onClick() {
|
3436
|
-
_this7.onTabsClick(mode.paymentType);
|
3683
|
+
_this7.onTabsClick(mode.paymentType, bookType);
|
3437
3684
|
} },
|
3438
3685
|
_react2.default.createElement(
|
3439
3686
|
'div',
|
@@ -3472,11 +3719,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
3472
3719
|
value: function render() {
|
3473
3720
|
var _this8 = this;
|
3474
3721
|
|
3475
|
-
var _enumController$
|
3476
|
-
PayIcon = _enumController$
|
3477
|
-
PayIcon2 = _enumController$
|
3478
|
-
PayStyle = _enumController$
|
3479
|
-
Differentiate = _enumController$
|
3722
|
+
var _enumController$getEn35 = _mutantsUtil.enumController.getEnumOj(),
|
3723
|
+
PayIcon = _enumController$getEn35.PayIcon,
|
3724
|
+
PayIcon2 = _enumController$getEn35.PayIcon2,
|
3725
|
+
PayStyle = _enumController$getEn35.PayStyle,
|
3726
|
+
Differentiate = _enumController$getEn35.Differentiate;
|
3480
3727
|
|
3481
3728
|
var _state2 = this.state,
|
3482
3729
|
btnDissabled = _state2.btnDissabled,
|
@@ -3504,17 +3751,36 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
3504
3751
|
noIsMinAmount = _props.noIsMinAmount;
|
3505
3752
|
// 原单退货
|
3506
3753
|
|
3507
|
-
var boriginReturn = this.
|
3754
|
+
var boriginReturn = this.getBoriginReturn();
|
3508
3755
|
var totalTaxAmount = this.context && this.context.viewModel && this.context.viewModel.data && this.context.viewModel.data.TotalTaxAmount;
|
3756
|
+
|
3757
|
+
//收订金
|
3758
|
+
var IdbusiType = this.context && this.context.viewModel && this.context.viewModel.data && this.context.viewModel.data.IdbusiType;
|
3759
|
+
var BuyerPayFreight = this.context && this.context.viewModel && this.context.viewModel.data && this.context.viewModel.data.BuyerPayFreight;
|
3760
|
+
var DistributionMode = this.context && this.context.viewModel && this.context.viewModel.data && this.context.viewModel.data.DistributionMode;
|
3761
|
+
if (IdbusiType == 38 && this.isBook && this.percentageWhenBook < 100 && (!DistributionMode.Id || DistributionMode.Id == 'ON_SITE_PICKUP')) {
|
3762
|
+
totalTaxAmount = totalTaxAmount * this.percentageWhenBook / 100;
|
3763
|
+
}
|
3764
|
+
|
3509
3765
|
// 单据模式
|
3510
3766
|
var thePaymodes = newStyle ? (0, _filter3.default)(paymode.thePaymodes, function (m) {
|
3767
|
+
if (IdbusiType == 39) {
|
3768
|
+
return !(_this8.checkModeDisabled(m.paymentType, brefund, boriginReturn) && parseFloat(m.value) == 0) && m.paymentType != PayStyle.hyczk;
|
3769
|
+
}
|
3511
3770
|
return !(_this8.checkModeDisabled(m.paymentType, brefund, boriginReturn) && parseFloat(m.value) == 0);
|
3512
3771
|
}) : paymode.thePaymodes;
|
3513
3772
|
var paymodes = paymode.paymodes,
|
3514
3773
|
settle = paymode.settle,
|
3515
3774
|
currentMode = paymode.currentMode;
|
3516
|
-
// 积分兑换 总积分
|
3517
3775
|
|
3776
|
+
|
3777
|
+
if (IdbusiType == 39) {
|
3778
|
+
totalTaxAmount = _mutantsMicrofx.stores.drawerStore.thisWaitPaidAmount;
|
3779
|
+
paymodes = (0, _filter3.default)(paymodes, function (mode) {
|
3780
|
+
return mode.paymentType != PayStyle.hyczk;
|
3781
|
+
}); //取货过滤掉储值
|
3782
|
+
}
|
3783
|
+
// 积分兑换 总积分
|
3518
3784
|
var ExchangeIntegral = this.context && this.context.viewModel && this.context.viewModel.data.ExchangeIntegral;
|
3519
3785
|
|
3520
3786
|
var _hasSMZF = (0, _find3.default)(paymodes, function (item) {
|
@@ -3530,7 +3796,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
3530
3796
|
}
|
3531
3797
|
|
3532
3798
|
var quickPay = boriginReturn ? [] : (0, _filter3.default)(paymodes, function (paymode) {
|
3533
|
-
|
3799
|
+
if (IdbusiType == 39) {
|
3800
|
+
return paymode.isQuick && paymode.paymentType != PayStyle.hyczk; //取货过滤掉储值
|
3801
|
+
} else {
|
3802
|
+
return paymode.isQuick;
|
3803
|
+
}
|
3534
3804
|
});
|
3535
3805
|
var productsIsEmpty = type != 1 && this.context.viewModel.data.RetailDetails.length == 0 || type == 1 && parseFloat(amount || 0) <= 0 || memberDisabled || noIsMinAmount;
|
3536
3806
|
var moreToolbtns = [];
|
@@ -3550,11 +3820,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
3550
3820
|
quantity4 = 0;
|
3551
3821
|
var sumQuantity = 0; //数量总和的值,包括称重的。
|
3552
3822
|
|
3553
|
-
var
|
3554
|
-
|
3555
|
-
buyQuantity =
|
3556
|
-
|
3557
|
-
returnQuantity =
|
3823
|
+
var _ref29 = quantityDetail || {},
|
3824
|
+
_ref29$buyQuantity = _ref29.buyQuantity,
|
3825
|
+
buyQuantity = _ref29$buyQuantity === undefined ? 0 : _ref29$buyQuantity,
|
3826
|
+
_ref29$returnQuantity = _ref29.returnQuantity,
|
3827
|
+
returnQuantity = _ref29$returnQuantity === undefined ? 0 : _ref29$returnQuantity;
|
3558
3828
|
|
3559
3829
|
var quantityPrecision = (0, _tplusPoslogin.PosInitData)("QuantityPrecision");
|
3560
3830
|
quantityPrecision = quantityPrecision ? parseInt(quantityPrecision) : '';
|
@@ -3732,7 +4002,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
3732
4002
|
{ key: 'settle', className: (0, _classnames4.default)({ "settle": true, "settle2": type == 1, "settleStorage": true, 'primary-btn': true }), onClick: function onClick() {
|
3733
4003
|
_this8.btnDebounced();
|
3734
4004
|
}, disabled: productsIsEmpty },
|
3735
|
-
this.props.isMemberPoints ? '立即兑换' : this.props.isMemberPointsReturn ? '退货' : settle.name
|
4005
|
+
this.props.isMemberPoints ? '立即兑换' : this.props.isMemberPointsReturn ? '退货' : IdbusiType == 39 && _mutantsMicrofx.stores.drawerStore.thisWaitPaidAmount == 0 ? '取货' : settle.name
|
3736
4006
|
)
|
3737
4007
|
),
|
3738
4008
|
!newStyle && _react2.default.createElement(
|
@@ -3759,7 +4029,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
3759
4029
|
'div',
|
3760
4030
|
null,
|
3761
4031
|
(0, _map3.default)(paymodes, function (mode, index) {
|
3762
|
-
return _this8.renderToolbtn(mode, index);
|
4032
|
+
return _this8.renderToolbtn(mode, index, 'bookPay');
|
3763
4033
|
})
|
3764
4034
|
),
|
3765
4035
|
paymodes.length > carouselStart && this.paymodesCarouselList(params, paymodes, carouselStart)
|
@@ -3804,20 +4074,20 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
3804
4074
|
return _this8.onHotKeyClick2(index, mode, paymode, e);
|
3805
4075
|
},
|
3806
4076
|
onBlur: function onBlur(e) {
|
3807
|
-
return _this8.onBlur(index, e);
|
4077
|
+
return _this8.onBlur(index, e, 'bookPay');
|
3808
4078
|
},
|
3809
4079
|
onFocus: function onFocus(e) {
|
3810
4080
|
return _this8.onFocusHack(index, mode, paymode, e);
|
3811
4081
|
},
|
3812
4082
|
onChange: function onChange(e) {
|
3813
|
-
return _this8.handleChange(index, e);
|
4083
|
+
return _this8.handleChange(index, e, 'bookPay');
|
3814
4084
|
}
|
3815
4085
|
})
|
3816
4086
|
),
|
3817
4087
|
_react2.default.createElement(
|
3818
4088
|
'span',
|
3819
4089
|
{ className: 'minus', onClick: function onClick() {
|
3820
|
-
_this8.onDelPay(index, boriginReturn && mode.boriginReturn, mode.paymentType);
|
4090
|
+
_this8.onDelPay(index, boriginReturn && mode.boriginReturn, mode.paymentType, 'bookPay');
|
3821
4091
|
} },
|
3822
4092
|
_react2.default.createElement(_ticon2.default, { type: 'shanchu', className: 'minusIcon primary-color' })
|
3823
4093
|
)
|
@@ -3951,6 +4221,20 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
3951
4221
|
{ className: 'received' },
|
3952
4222
|
(0, _utils.getFixedNumber)(Math.abs(paymode.receivable))
|
3953
4223
|
)
|
4224
|
+
),
|
4225
|
+
_react2.default.createElement(
|
4226
|
+
'div',
|
4227
|
+
{ className: 'receivable', style: { display: DistributionMode && (DistributionMode.Id == 'ELECTRONIC' || DistributionMode.Id == 'CITY_DISTRIBUTE') && BuyerPayFreight && BuyerPayFreight > 0 ? 'block' : 'none' } },
|
4228
|
+
_react2.default.createElement(
|
4229
|
+
'span',
|
4230
|
+
null,
|
4231
|
+
'\u8FD0\u8D39'
|
4232
|
+
),
|
4233
|
+
_react2.default.createElement(
|
4234
|
+
'span',
|
4235
|
+
{ className: 'received' },
|
4236
|
+
(0, _utils.getFixedNumber)(Math.abs(BuyerPayFreight))
|
4237
|
+
)
|
3954
4238
|
)
|
3955
4239
|
),
|
3956
4240
|
type != 1 && !isReturn && _react2.default.createElement(
|
@@ -4087,6 +4371,20 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
4087
4371
|
{ className: 'received' },
|
4088
4372
|
(0, _utils.getFixedNumber)(Math.abs(paymode.receivable))
|
4089
4373
|
)
|
4374
|
+
),
|
4375
|
+
_react2.default.createElement(
|
4376
|
+
'div',
|
4377
|
+
{ className: 'receivable', style: { display: DistributionMode && (DistributionMode.Id == 'ELECTRONIC' || DistributionMode.Id == 'CITY_DISTRIBUTE') && BuyerPayFreight && BuyerPayFreight > 0 ? 'block' : 'none' } },
|
4378
|
+
_react2.default.createElement(
|
4379
|
+
'span',
|
4380
|
+
null,
|
4381
|
+
'\u8FD0\u8D39'
|
4382
|
+
),
|
4383
|
+
_react2.default.createElement(
|
4384
|
+
'span',
|
4385
|
+
{ className: 'received' },
|
4386
|
+
(0, _utils.getFixedNumber)(Math.abs(BuyerPayFreight))
|
4387
|
+
)
|
4090
4388
|
)
|
4091
4389
|
),
|
4092
4390
|
type != 1 && !isReturn && _react2.default.createElement(
|
@@ -4181,7 +4479,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
4181
4479
|
_this8.onHotKeyClick1(mode, index, boriginReturn);
|
4182
4480
|
}
|
4183
4481
|
} else {
|
4184
|
-
_this8.onHotKeyClick1(mode, index, boriginReturn);
|
4482
|
+
_this8.onHotKeyClick1(mode, index, boriginReturn, 'bookPay');
|
4185
4483
|
}
|
4186
4484
|
},
|
4187
4485
|
value: mode.paymentType == PayStyle.hyczk ? (0, _utils.getFixedNumber)((0, _reduce3.default)((0, _filter3.default)(thePaymodes, function (tm) {
|
@@ -4193,16 +4491,16 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
4193
4491
|
disabled: _this8.checkModeDisabled(mode.paymentType, brefund, boriginReturn) || _this8.checkScanDisabled(mode.paymentType),
|
4194
4492
|
value: mode.exchangeRate != 1 ? mode.value2 : mode.value,
|
4195
4493
|
onClick: function onClick(e) {
|
4196
|
-
return _this8.onHotKeyClick2(index, mode, paymode, e);
|
4494
|
+
return _this8.onHotKeyClick2(index, mode, paymode, e, 'bookPay');
|
4197
4495
|
},
|
4198
4496
|
onBlur: function onBlur(e) {
|
4199
|
-
return _this8.onBlur(index, e);
|
4497
|
+
return _this8.onBlur(index, e, 'bookPay');
|
4200
4498
|
},
|
4201
4499
|
onFocus: function onFocus(e) {
|
4202
4500
|
return _this8.onFocusHack(index, mode, paymode, e);
|
4203
4501
|
},
|
4204
4502
|
onChange: function onChange(e) {
|
4205
|
-
return _this8.handleChange(index, e);
|
4503
|
+
return _this8.handleChange(index, e, 'bookPay');
|
4206
4504
|
}
|
4207
4505
|
})
|
4208
4506
|
)
|
@@ -4411,22 +4709,22 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
4411
4709
|
return _this8.czkInput = input;
|
4412
4710
|
},
|
4413
4711
|
onKeyDown: function () {
|
4414
|
-
var
|
4712
|
+
var _ref30 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee17(e) {
|
4415
4713
|
var time, _paymode;
|
4416
4714
|
|
4417
|
-
return _regenerator2.default.wrap(function
|
4715
|
+
return _regenerator2.default.wrap(function _callee17$(_context17) {
|
4418
4716
|
while (1) {
|
4419
|
-
switch (
|
4717
|
+
switch (_context17.prev = _context17.next) {
|
4420
4718
|
case 0:
|
4421
4719
|
if (!(e.keyCode == 13)) {
|
4422
|
-
|
4720
|
+
_context17.next = 14;
|
4423
4721
|
break;
|
4424
4722
|
}
|
4425
4723
|
|
4426
4724
|
time = Date.parse(new Date());
|
4427
4725
|
|
4428
4726
|
if (!(_this8.isStorageCardInputType && time - _this8.keypressStime > 350)) {
|
4429
|
-
|
4727
|
+
_context17.next = 7;
|
4430
4728
|
break;
|
4431
4729
|
}
|
4432
4730
|
|
@@ -4435,11 +4733,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
4435
4733
|
_this8.setState({
|
4436
4734
|
czkValue: null
|
4437
4735
|
});
|
4438
|
-
return
|
4736
|
+
return _context17.abrupt('return');
|
4439
4737
|
|
4440
4738
|
case 7:
|
4441
4739
|
_this8.keypressStime = null;
|
4442
|
-
|
4740
|
+
_context17.next = 10;
|
4443
4741
|
return _this8.loadCzk(e.target.value);
|
4444
4742
|
|
4445
4743
|
case 10:
|
@@ -4450,7 +4748,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
4450
4748
|
czkvalue: null
|
4451
4749
|
});
|
4452
4750
|
}
|
4453
|
-
|
4751
|
+
_context17.next = 15;
|
4454
4752
|
break;
|
4455
4753
|
|
4456
4754
|
case 14:
|
@@ -4460,14 +4758,14 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
4460
4758
|
|
4461
4759
|
case 15:
|
4462
4760
|
case 'end':
|
4463
|
-
return
|
4761
|
+
return _context17.stop();
|
4464
4762
|
}
|
4465
4763
|
}
|
4466
|
-
},
|
4764
|
+
}, _callee17, _this8);
|
4467
4765
|
}));
|
4468
4766
|
|
4469
|
-
return function (
|
4470
|
-
return
|
4767
|
+
return function (_x13) {
|
4768
|
+
return _ref30.apply(this, arguments);
|
4471
4769
|
};
|
4472
4770
|
}(),
|
4473
4771
|
onFocus: function onFocus(e) {
|
@@ -4524,8 +4822,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
4524
4822
|
_this8.setCurrentModeValue(event.target.value, Math.min(currentMode.maxamount, currentMode.balance));
|
4525
4823
|
},
|
4526
4824
|
defaultValue: currentMode && (0, _utils.getFixedNumber)(brefund ? currentMode.value : Math.min(currentMode.value, currentMode.maxamount, currentMode.balance)),
|
4527
|
-
ref: function ref(
|
4528
|
-
return _this8["inputCzkAmount"] =
|
4825
|
+
ref: function ref(_ref31) {
|
4826
|
+
return _this8["inputCzkAmount"] = _ref31;
|
4529
4827
|
},
|
4530
4828
|
onFocus: function onFocus(e) {
|
4531
4829
|
_this8.inputkey = "inputCzkAmount";
|
@@ -5118,12 +5416,12 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
5118
5416
|
_react2.default.createElement(
|
5119
5417
|
'div',
|
5120
5418
|
{ className: 'value' },
|
5121
|
-
currentMode && currentMode.member && (0, _utils.getFixedNumber)(currentMode.
|
5419
|
+
currentMode && currentMode.member && (0, _utils.getFixedNumber)(currentMode.steadCashIntegral)
|
5122
5420
|
),
|
5123
5421
|
_react2.default.createElement(
|
5124
5422
|
'div',
|
5125
5423
|
{ className: 'name' },
|
5126
|
-
'\
|
5424
|
+
'\u672C\u5355\u4F7F\u7528\u79EF\u5206'
|
5127
5425
|
)
|
5128
5426
|
),
|
5129
5427
|
_react2.default.createElement(
|
@@ -5144,7 +5442,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
5144
5442
|
_react2.default.createElement(
|
5145
5443
|
'div',
|
5146
5444
|
{ className: 'name' },
|
5147
|
-
'\u672C\u5355\u53EF\
|
5445
|
+
'\u672C\u5355\u53EF\u62B5\u73B0\u91D1\u989D'
|
5148
5446
|
)
|
5149
5447
|
)
|
5150
5448
|
),
|
@@ -5195,8 +5493,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
5195
5493
|
_this8.setCurrentModeValue(e.target.value, Math.min(currentMode.maxamount, currentMode.member.exchangable));
|
5196
5494
|
},
|
5197
5495
|
defaultValue: currentMode && currentMode.member && (0, _utils.getFixedNumber)(Math.min(currentMode.value, currentMode.maxamount, currentMode.member.exchangable)),
|
5198
|
-
ref: function ref(
|
5199
|
-
return _this8["inputJfdxAmount"] =
|
5496
|
+
ref: function ref(_ref32) {
|
5497
|
+
return _this8["inputJfdxAmount"] = _ref32;
|
5200
5498
|
},
|
5201
5499
|
onFocus: function onFocus(e) {
|
5202
5500
|
_this8.inputkey = "inputJfdxAmount";
|