tplus-components-touch 3.23.1 → 3.23.5
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/addLog/AddLogProcessor.js +1 -5
- package/dist/components/addLog/AddLogProcessor.js.map +1 -1
- package/dist/components/addLog/OperationLogApi.js +6 -45
- package/dist/components/addLog/OperationLogApi.js.map +1 -1
- package/dist/components/billSearch/index.js +64 -4
- package/dist/components/billSearch/index.js.map +1 -1
- package/dist/components/billSearch/index.less +12 -2
- package/dist/components/cloudPrint/api.js +1 -1
- package/dist/components/cloudPrint/api.js.map +1 -1
- package/dist/components/cloudPrint/index.js +114 -106
- package/dist/components/cloudPrint/index.js.map +1 -1
- package/dist/components/cloudPrint/printDispatch.js +223 -0
- package/dist/components/cloudPrint/printDispatch.js.map +1 -0
- package/dist/components/commonForm/addressPicker/index.js +4 -2
- package/dist/components/commonForm/addressPicker/index.js.map +1 -1
- package/dist/components/commonForm/formControl/index.js +3 -0
- package/dist/components/commonForm/formControl/index.js.map +1 -1
- package/dist/components/hotKey/localConfig.js +14 -1
- package/dist/components/hotKey/localConfig.js.map +1 -1
- package/dist/components/keyboard/index.js +1 -1
- package/dist/components/keyboard/index.js.map +1 -1
- package/dist/components/loading/index.js +5 -0
- package/dist/components/loading/index.js.map +1 -1
- package/dist/components/loading/loadingContent.js +23 -6
- package/dist/components/loading/loadingContent.js.map +1 -1
- package/dist/components/loading/style.less +12 -2
- package/dist/components/message/index.js +11 -0
- package/dist/components/message/index.js.map +1 -1
- package/dist/components/message/index.less +16 -1
- package/dist/components/modalWraper/style.less +6 -0
- package/dist/components/settlement/prototypeTable/style.less +1 -1
- package/dist/components/settlement/settlement.js +487 -312
- package/dist/components/settlement/settlement.js.map +1 -1
- package/dist/components/settlement/settlement.less +87 -13
- package/dist/components/settlement/settlementStore.js +518 -231
- package/dist/components/settlement/settlementStore.js.map +1 -1
- package/dist/components/settlement/utils.js +1 -1
- package/dist/components/settlement/utils.js.map +1 -1
- package/dist/components/ticon/iconfont/demo_index.html +5202 -4949
- package/dist/components/ticon/iconfont/iconfont.css +887 -843
- 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 +1535 -1458
- 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 +8 -0
- package/dist/components/touchTable/index.js.map +1 -1
- package/dist/index.js +17 -2
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -250,7 +250,10 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
250
250
|
discountRetailTotalAount: null,
|
|
251
251
|
discountPrototypeTotalAmount: null,
|
|
252
252
|
bquick: false,
|
|
253
|
-
currentKey: null
|
|
253
|
+
currentKey: null,
|
|
254
|
+
couponLight: true,
|
|
255
|
+
storageValue: '0.00',
|
|
256
|
+
czkValue: null };
|
|
254
257
|
_this2.compoundHotkeysList = (window.$.operationControl[5] ? window.$.operationControl[5].control || [] : []).map(function (key) {
|
|
255
258
|
return key.toLocaleUpperCase();
|
|
256
259
|
});
|
|
@@ -276,7 +279,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
276
279
|
});
|
|
277
280
|
}
|
|
278
281
|
if (b.lastChild) {
|
|
279
|
-
|
|
282
|
+
// 原来bWidth < cWidth,过渡过程中右边按钮会隐藏,+20之后解决
|
|
283
|
+
if (bWidth < cWidth + 20) {
|
|
280
284
|
b.lastChild.className = 'btns voucherMode';
|
|
281
285
|
} else {
|
|
282
286
|
b.lastChild.className = 'btns';
|
|
@@ -566,42 +570,51 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
566
570
|
duration: 4
|
|
567
571
|
});
|
|
568
572
|
} else {
|
|
569
|
-
if (isNewRetailBCPos) {
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
573
|
+
// if (isNewRetailBCPos) {
|
|
574
|
+
// let { isReturn } = this.props;
|
|
575
|
+
// let sMember = this.store.member;
|
|
576
|
+
// if (!sMember.StorageCardEnable) {
|
|
577
|
+
// Message.warn("该储值卡已停用");
|
|
578
|
+
// return;
|
|
579
|
+
// }
|
|
580
|
+
// if (sMember && sMember.ID) {
|
|
581
|
+
// // noPlaySetPwd 点击结算方式设置密码,点加号不设置
|
|
582
|
+
// if (!sMember.WalletEnabled && params !== 'noPlaySetPwd' && !isReturn) {
|
|
583
|
+
// this.setState({
|
|
584
|
+
// newPass: '',
|
|
585
|
+
// newPassConfirm: '',
|
|
586
|
+
// showSetPwdModal: true
|
|
587
|
+
// })
|
|
588
|
+
// } else {
|
|
589
|
+
// this.setState({
|
|
590
|
+
// showSetPwdModal: false,
|
|
591
|
+
// czkVisible: true
|
|
592
|
+
// })
|
|
593
|
+
// }
|
|
594
|
+
// }
|
|
595
|
+
// // else {
|
|
596
|
+
// // Message.warn('请先录入会员');
|
|
597
|
+
// // }
|
|
598
|
+
// // this.setState({
|
|
599
|
+
// // czkVisible: true,
|
|
600
|
+
// // });
|
|
601
|
+
// } else {
|
|
602
|
+
// this.setState({
|
|
603
|
+
// czkVisible: true,
|
|
604
|
+
// });
|
|
605
|
+
// }
|
|
606
|
+
_this2.setState({
|
|
607
|
+
czkVisible: true
|
|
608
|
+
});
|
|
609
|
+
if (currentMode.member.id) {
|
|
610
|
+
_this2.setState({
|
|
611
|
+
czkValue: currentMode.member.StorageCardNo
|
|
612
|
+
});
|
|
597
613
|
} else {
|
|
598
614
|
_this2.setState({
|
|
599
|
-
|
|
615
|
+
czkValue: null
|
|
600
616
|
});
|
|
601
617
|
}
|
|
602
|
-
// this.setState({
|
|
603
|
-
// czkVisible: true,
|
|
604
|
-
// });
|
|
605
618
|
}
|
|
606
619
|
setTimeout(function () {
|
|
607
620
|
if (!currentMode.member || !currentMode.member.id) {
|
|
@@ -618,7 +631,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
618
631
|
|
|
619
632
|
_this2.handleCzkOk = function () {
|
|
620
633
|
var _ref2 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee(e) {
|
|
621
|
-
var
|
|
634
|
+
var _enumController$getEn3, PayStyle;
|
|
622
635
|
|
|
623
636
|
return _regenerator2.default.wrap(function _callee$(_context) {
|
|
624
637
|
while (1) {
|
|
@@ -632,66 +645,57 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
632
645
|
// });
|
|
633
646
|
// return;
|
|
634
647
|
// }
|
|
635
|
-
sMember = _this2.store.member;
|
|
636
|
-
|
|
637
|
-
if (sMember.StorageCardEnable) {
|
|
638
|
-
_context.next = 4;
|
|
639
|
-
break;
|
|
640
|
-
}
|
|
641
|
-
|
|
642
|
-
_message2.default.warn("该储值卡已停用");
|
|
643
|
-
return _context.abrupt('return');
|
|
644
|
-
|
|
645
|
-
case 4:
|
|
646
648
|
_enumController$getEn3 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn3.PayStyle;
|
|
647
649
|
|
|
648
650
|
if (_this2.store.paymode.currentMode.member.id) {
|
|
649
|
-
_context.next =
|
|
651
|
+
_context.next = 4;
|
|
650
652
|
break;
|
|
651
653
|
}
|
|
652
654
|
|
|
653
|
-
_context.next =
|
|
655
|
+
_context.next = 4;
|
|
654
656
|
return _this2.store.loadCzk(_this2.czkInput.input.value);
|
|
655
657
|
|
|
656
|
-
case
|
|
658
|
+
case 4:
|
|
657
659
|
if (_this2.store.paymode.currentMode.member.id) {
|
|
658
|
-
_context.next =
|
|
660
|
+
_context.next = 7;
|
|
659
661
|
break;
|
|
660
662
|
}
|
|
661
663
|
|
|
662
664
|
_message2.default.error("请录入储值卡!");
|
|
663
665
|
return _context.abrupt('return');
|
|
664
666
|
|
|
665
|
-
case
|
|
667
|
+
case 7:
|
|
666
668
|
if (!(0, _find3.default)(_this2.store.paymode.thePaymodes, function (mode) {
|
|
667
669
|
return mode.paymethodId != _this2.store.paymode.currentMode.paymethodId && mode.paymentType == PayStyle.hyczk && mode.member.id == _this2.store.paymode.currentMode.member.id;
|
|
668
670
|
})) {
|
|
669
|
-
_context.next =
|
|
671
|
+
_context.next = 10;
|
|
670
672
|
break;
|
|
671
673
|
}
|
|
672
674
|
|
|
673
675
|
_message2.default.error("该储值卡已使用。");
|
|
674
676
|
return _context.abrupt('return');
|
|
675
677
|
|
|
676
|
-
case
|
|
678
|
+
case 10:
|
|
677
679
|
if (!(_this2.store.bquick && _this2.store.paymode.amount != _this2.store.paymode.currentMode.value)) {
|
|
678
|
-
_context.next =
|
|
680
|
+
_context.next = 13;
|
|
679
681
|
break;
|
|
680
682
|
}
|
|
681
683
|
|
|
682
684
|
_message2.default.error("实收金额应等于应收金额。");
|
|
683
685
|
return _context.abrupt('return');
|
|
684
686
|
|
|
685
|
-
case
|
|
687
|
+
case 13:
|
|
686
688
|
|
|
687
689
|
_this2.setState({
|
|
688
|
-
czkVisible: false
|
|
690
|
+
czkVisible: false,
|
|
691
|
+
storageValue: '0.00',
|
|
692
|
+
czkvalue: null
|
|
689
693
|
});
|
|
690
694
|
_this2.closeRfCard();
|
|
691
695
|
_this2.store.paymode.calcMemberBalance();
|
|
692
696
|
_this2.handleCzk();
|
|
693
697
|
|
|
694
|
-
case
|
|
698
|
+
case 17:
|
|
695
699
|
case 'end':
|
|
696
700
|
return _context.stop();
|
|
697
701
|
}
|
|
@@ -710,7 +714,9 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
710
714
|
_this2.store.clean();
|
|
711
715
|
}
|
|
712
716
|
_this2.setState({
|
|
713
|
-
czkVisible: false
|
|
717
|
+
czkVisible: false,
|
|
718
|
+
storageValue: '0.00',
|
|
719
|
+
czkvalue: null
|
|
714
720
|
});
|
|
715
721
|
_this2.closeRfCard();
|
|
716
722
|
_keyboard2.default.close();
|
|
@@ -851,8 +857,10 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
851
857
|
|
|
852
858
|
_this2.store.setCurrentMode(id, PayStyle.djq);
|
|
853
859
|
_this2.setState({
|
|
854
|
-
djqVisible: true
|
|
860
|
+
djqVisible: true,
|
|
861
|
+
couponLight: true
|
|
855
862
|
});
|
|
863
|
+
_this2.store.paymode.calcCheckList();
|
|
856
864
|
setTimeout(function () {
|
|
857
865
|
_this2.inputdjq && _this2.inputdjq.input && _this2.inputdjq.input.focus();
|
|
858
866
|
}, 200);
|
|
@@ -943,6 +951,31 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
943
951
|
});
|
|
944
952
|
};
|
|
945
953
|
|
|
954
|
+
_this2.checkOfflineEnable = function (paymode, key) {
|
|
955
|
+
var _ref8 = paymode || {},
|
|
956
|
+
paymodes = _ref8.paymodes;
|
|
957
|
+
|
|
958
|
+
var isOffline = _mutantsMicrofx.stores.offlineSys.isOffline;
|
|
959
|
+
|
|
960
|
+
if (isOffline) {
|
|
961
|
+
if (paymodes) {
|
|
962
|
+
var currentPayMode = paymodes.find(function (item) {
|
|
963
|
+
return item.paymentType === key;
|
|
964
|
+
});
|
|
965
|
+
if (currentPayMode && !currentPayMode.offlineDisable) {
|
|
966
|
+
return true;
|
|
967
|
+
} else {
|
|
968
|
+
_message2.default.warn('\u79BB\u7EBF\u6A21\u5F0F\u4E0B\u4E0D\u652F\u6301\u6B64\u7ED3\u7B97\u65B9\u5F0F');
|
|
969
|
+
return false;
|
|
970
|
+
}
|
|
971
|
+
}
|
|
972
|
+
_message2.default.warn('\u79BB\u7EBF\u6A21\u5F0F\u4E0B\u7ED3\u7B97\u65B9\u5F0F\u6570\u636E\u9519\u8BEF');
|
|
973
|
+
return false;
|
|
974
|
+
} else {
|
|
975
|
+
return true;
|
|
976
|
+
}
|
|
977
|
+
};
|
|
978
|
+
|
|
946
979
|
_this2.onTabsClick2 = function (paymode, brefund, themode, key) {
|
|
947
980
|
var _enumController$getEn7 = _mutantsUtil.enumController.getEnumOj(),
|
|
948
981
|
PayStyle = _enumController$getEn7.PayStyle,
|
|
@@ -1060,6 +1093,9 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1060
1093
|
boriginReturn = _this2$store3.boriginReturn;
|
|
1061
1094
|
var noAlreadyWarn = _this2.state.noAlreadyWarn;
|
|
1062
1095
|
|
|
1096
|
+
|
|
1097
|
+
if (!_mutantsMicrofx.stores.offlineSys.shouldSettlement(key)) return false;
|
|
1098
|
+
|
|
1063
1099
|
if (_this2.checkModeDisabled(key, brefund, boriginReturn)) {
|
|
1064
1100
|
return;
|
|
1065
1101
|
}
|
|
@@ -1148,6 +1184,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1148
1184
|
};
|
|
1149
1185
|
|
|
1150
1186
|
_this2.handleChange = function (index, e) {
|
|
1187
|
+
if (!_mutantsMicrofx.stores.offlineSys.shouldSettlement(_this2.store.paymode.currentFocus)) return;
|
|
1151
1188
|
var currentInput = e.target;
|
|
1152
1189
|
var amountMaxLength = parseInt(_this2.props.initData["AmountMaxLength"] || 10);
|
|
1153
1190
|
if (!isNaN(e.target.value) || e.target.value == '-') {
|
|
@@ -1158,6 +1195,40 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1158
1195
|
};
|
|
1159
1196
|
|
|
1160
1197
|
_this2.setCurrentModeValue = function (val, max) {
|
|
1198
|
+
var _enumController$getEn13 = _mutantsUtil.enumController.getEnumOj(),
|
|
1199
|
+
PayStyle = _enumController$getEn13.PayStyle;
|
|
1200
|
+
|
|
1201
|
+
var reg = /^[\d.]+$/g;
|
|
1202
|
+
if (_this2.store.paymode.currentMode.paymentType === PayStyle.hyczk) {
|
|
1203
|
+
if (!val) {
|
|
1204
|
+
_this2.setState({
|
|
1205
|
+
storageValue: val
|
|
1206
|
+
});
|
|
1207
|
+
} else {
|
|
1208
|
+
if (!reg.test(val)) {
|
|
1209
|
+
return;
|
|
1210
|
+
} else {
|
|
1211
|
+
var value1 = val.split('.');
|
|
1212
|
+
if (value1.length > 1) {
|
|
1213
|
+
if (value1[1].length < 3) {
|
|
1214
|
+
_this2.setState({
|
|
1215
|
+
storageValue: val
|
|
1216
|
+
});
|
|
1217
|
+
} else {
|
|
1218
|
+
return;
|
|
1219
|
+
}
|
|
1220
|
+
} else {
|
|
1221
|
+
if (val.length > 9) {
|
|
1222
|
+
return;
|
|
1223
|
+
} else {
|
|
1224
|
+
_this2.setState({
|
|
1225
|
+
storageValue: val
|
|
1226
|
+
});
|
|
1227
|
+
}
|
|
1228
|
+
}
|
|
1229
|
+
}
|
|
1230
|
+
}
|
|
1231
|
+
}
|
|
1161
1232
|
// let bjfdx=this.store.paymode.currentMode.paymentType==PayStyle.jfdx;
|
|
1162
1233
|
var value = val;
|
|
1163
1234
|
var amountMaxLength = parseInt(_this2.props.initData["AmountMaxLength"] || 10);
|
|
@@ -1200,8 +1271,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1200
1271
|
};
|
|
1201
1272
|
|
|
1202
1273
|
_this2.appendCzkmode = function (boriginReturn, params) {
|
|
1203
|
-
var _enumController$
|
|
1204
|
-
PayStyle = _enumController$
|
|
1274
|
+
var _enumController$getEn14 = _mutantsUtil.enumController.getEnumOj(),
|
|
1275
|
+
PayStyle = _enumController$getEn14.PayStyle;
|
|
1205
1276
|
|
|
1206
1277
|
if (boriginReturn) {
|
|
1207
1278
|
_message2.default.info('原单退货时不可以使用非原单的储值卡结算方式。');
|
|
@@ -1221,15 +1292,25 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1221
1292
|
_this2.showCzkModal(-1, bappend, params);
|
|
1222
1293
|
};
|
|
1223
1294
|
|
|
1224
|
-
_this2.djqChecked = function (q) {
|
|
1225
|
-
var _enumController$
|
|
1226
|
-
Differentiate = _enumController$
|
|
1295
|
+
_this2.djqChecked = function (q, dto) {
|
|
1296
|
+
var _enumController$getEn15 = _mutantsUtil.enumController.getEnumOj(),
|
|
1297
|
+
Differentiate = _enumController$getEn15.Differentiate;
|
|
1227
1298
|
|
|
1228
1299
|
if (_this2.store.paymode.currentMode.boriginReturn) {
|
|
1229
1300
|
_message2.default.info('\u539F\u5355\u9000\u8D27\u65F6' + Differentiate.COUPON + '\u4E0D\u53EF\u4EE5\u53D6\u6D88\u3002');
|
|
1230
1301
|
return;
|
|
1231
1302
|
}
|
|
1232
|
-
|
|
1303
|
+
|
|
1304
|
+
var _ref9 = _mutantsUtil.platform || {},
|
|
1305
|
+
isNewRetailBCPos = _ref9.isNewRetailBCPos;
|
|
1306
|
+
|
|
1307
|
+
if (isNewRetailBCPos) {
|
|
1308
|
+
_this2.store.paymode.calcDjqCheckValue(q, _this2.store.dto);
|
|
1309
|
+
} else {
|
|
1310
|
+
_this2.store.paymode.calcDjqValue(q);
|
|
1311
|
+
}
|
|
1312
|
+
// this.props.onGetCouponList && this.props.onGetCouponList(this.store.dto, _filter(this.store.paymode.currentMode.djqs,(djq)=>{return djq.couponCategoryEnum !== 'RIGHT'}));
|
|
1313
|
+
// this.props.onGetCouponList && this.props.onGetCouponList(this.store.dto, _filter(this.store.paymode.currentMode.djqs,(djq)=>{return djq.checked}), this.store.paymode.currentMode.djqs);
|
|
1233
1314
|
};
|
|
1234
1315
|
|
|
1235
1316
|
_this2.addDjq = function () {
|
|
@@ -1242,8 +1323,13 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1242
1323
|
// return ;
|
|
1243
1324
|
// }
|
|
1244
1325
|
_this2.store.checkCoupon(v).then(function () {
|
|
1245
|
-
_this2.inputdjq.input.value = '';
|
|
1246
1326
|
_this2.inputdjq.input.focus();
|
|
1327
|
+
}).finally(function () {
|
|
1328
|
+
setTimeout(function () {
|
|
1329
|
+
_this2.inputdjq.input.value = '';
|
|
1330
|
+
var ele = document.getElementById('djqInput');
|
|
1331
|
+
ele.value = '';
|
|
1332
|
+
}, 100);
|
|
1247
1333
|
});
|
|
1248
1334
|
};
|
|
1249
1335
|
|
|
@@ -1251,9 +1337,28 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1251
1337
|
if (_this2.czkdebounced) {
|
|
1252
1338
|
return;
|
|
1253
1339
|
}
|
|
1254
|
-
_this2.czkdebounced = (0, _debounce3.default)(function () {
|
|
1255
|
-
|
|
1256
|
-
|
|
1340
|
+
_this2.czkdebounced = (0, _debounce3.default)((0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee3() {
|
|
1341
|
+
return _regenerator2.default.wrap(function _callee3$(_context3) {
|
|
1342
|
+
while (1) {
|
|
1343
|
+
switch (_context3.prev = _context3.next) {
|
|
1344
|
+
case 0:
|
|
1345
|
+
_context3.next = 2;
|
|
1346
|
+
return _this2.store.loadCzk(v);
|
|
1347
|
+
|
|
1348
|
+
case 2:
|
|
1349
|
+
if (_this2.store.paymode.currentMode.StorageCardNo) {
|
|
1350
|
+
_this2.setState({
|
|
1351
|
+
czkValue: _this2.store.paymode.currentMode.StorageCardNo
|
|
1352
|
+
});
|
|
1353
|
+
}
|
|
1354
|
+
|
|
1355
|
+
case 3:
|
|
1356
|
+
case 'end':
|
|
1357
|
+
return _context3.stop();
|
|
1358
|
+
}
|
|
1359
|
+
}
|
|
1360
|
+
}, _callee3, _this3);
|
|
1361
|
+
})), 1000, {
|
|
1257
1362
|
'leading': true,
|
|
1258
1363
|
'trailing': false
|
|
1259
1364
|
});
|
|
@@ -1265,6 +1370,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1265
1370
|
};
|
|
1266
1371
|
|
|
1267
1372
|
_this2.onHotKeyClick1 = function (mode, index, boriginReturn) {
|
|
1373
|
+
if (!_mutantsMicrofx.stores.offlineSys.shouldSettlement(mode.paymentType)) return false;
|
|
1268
1374
|
if (_this2.hotkeydebouncedPayMode == mode) {
|
|
1269
1375
|
return;
|
|
1270
1376
|
}
|
|
@@ -1288,8 +1394,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1288
1394
|
};
|
|
1289
1395
|
|
|
1290
1396
|
_this2.onHotKeyClickModal = function (mode, index, boriginReturn) {
|
|
1291
|
-
var _enumController$
|
|
1292
|
-
PayStyle = _enumController$
|
|
1397
|
+
var _enumController$getEn16 = _mutantsUtil.enumController.getEnumOj(),
|
|
1398
|
+
PayStyle = _enumController$getEn16.PayStyle;
|
|
1293
1399
|
|
|
1294
1400
|
var brefund = _this2.store.brefund;
|
|
1295
1401
|
|
|
@@ -1304,6 +1410,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1304
1410
|
};
|
|
1305
1411
|
|
|
1306
1412
|
_this2.onHotKeyClick2 = function (index, mode, paymode, e) {
|
|
1413
|
+
if (!_mutantsMicrofx.stores.offlineSys.shouldSettlement(mode.paymentType)) return false;
|
|
1307
1414
|
if (_this2.hotkeydebouncedPayMode == mode) {
|
|
1308
1415
|
return;
|
|
1309
1416
|
}
|
|
@@ -1358,7 +1465,6 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1358
1465
|
thePaymodes.forEach(function (paymodes, index) {
|
|
1359
1466
|
if (paymodes.paymethodId == _this2.state.currentIndex) payIndex = index;
|
|
1360
1467
|
});
|
|
1361
|
-
|
|
1362
1468
|
_this2.setFocusAndSelectionMode(thePaymodes, payIndex);
|
|
1363
1469
|
}
|
|
1364
1470
|
}, 500, {
|
|
@@ -1374,8 +1480,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1374
1480
|
};
|
|
1375
1481
|
|
|
1376
1482
|
_this2.setFocusAndSelectionMode = function (thePaymodes, currentIndex) {
|
|
1377
|
-
var _enumController$
|
|
1378
|
-
PayStyle = _enumController$
|
|
1483
|
+
var _enumController$getEn17 = _mutantsUtil.enumController.getEnumOj(),
|
|
1484
|
+
PayStyle = _enumController$getEn17.PayStyle;
|
|
1379
1485
|
|
|
1380
1486
|
var displayPayModeList = [].concat((0, _toConsumableArray3.default)(thePaymodes));
|
|
1381
1487
|
// 复制支付方式列表
|
|
@@ -1398,13 +1504,13 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1398
1504
|
};
|
|
1399
1505
|
|
|
1400
1506
|
_this2.findModlePayBySplice = function (thePaymodes, currenIndex, symbol) {
|
|
1401
|
-
var _enumController$
|
|
1402
|
-
PayStyle = _enumController$
|
|
1507
|
+
var _enumController$getEn18 = _mutantsUtil.enumController.getEnumOj(),
|
|
1508
|
+
PayStyle = _enumController$getEn18.PayStyle;
|
|
1403
1509
|
|
|
1404
1510
|
var findIndex = currenIndex;
|
|
1405
1511
|
var endCurrentMode = thePaymodes.find(function (mode, index) {
|
|
1406
1512
|
findIndex++;
|
|
1407
|
-
return (symbol ? index > currenIndex : index < currenIndex) && mode.paymentType != PayStyle.hyczk && mode.paymentType != PayStyle.djq && mode.paymentType != PayStyle.jfdx;
|
|
1513
|
+
return (symbol ? index > currenIndex : index < currenIndex) && mode.paymentType != PayStyle.hyczk && mode.paymentType != PayStyle.djq && mode.paymentType != PayStyle.jfdx && _mutantsMicrofx.stores.offlineSys.shouldSettlement(mode.paymentType, true);
|
|
1408
1514
|
});
|
|
1409
1515
|
if (endCurrentMode) return { mode: endCurrentMode, index: findIndex };
|
|
1410
1516
|
return null;
|
|
@@ -1440,11 +1546,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1440
1546
|
}
|
|
1441
1547
|
};
|
|
1442
1548
|
|
|
1443
|
-
_this2.settleUnReturn = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function
|
|
1549
|
+
_this2.settleUnReturn = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee5() {
|
|
1444
1550
|
var that;
|
|
1445
|
-
return _regenerator2.default.wrap(function
|
|
1551
|
+
return _regenerator2.default.wrap(function _callee5$(_context5) {
|
|
1446
1552
|
while (1) {
|
|
1447
|
-
switch (
|
|
1553
|
+
switch (_context5.prev = _context5.next) {
|
|
1448
1554
|
case 0:
|
|
1449
1555
|
that = _this2;
|
|
1450
1556
|
|
|
@@ -1467,18 +1573,18 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1467
1573
|
onOk: function onOk() {
|
|
1468
1574
|
var _this4 = this;
|
|
1469
1575
|
|
|
1470
|
-
return (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function
|
|
1576
|
+
return (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee4() {
|
|
1471
1577
|
var result;
|
|
1472
|
-
return _regenerator2.default.wrap(function
|
|
1578
|
+
return _regenerator2.default.wrap(function _callee4$(_context4) {
|
|
1473
1579
|
while (1) {
|
|
1474
|
-
switch (
|
|
1580
|
+
switch (_context4.prev = _context4.next) {
|
|
1475
1581
|
case 0:
|
|
1476
1582
|
window.__queryingModal = (0, _utils.openQueryingModal)();
|
|
1477
|
-
|
|
1583
|
+
_context4.next = 3;
|
|
1478
1584
|
return that.store.querySettleResult();
|
|
1479
1585
|
|
|
1480
1586
|
case 3:
|
|
1481
|
-
result =
|
|
1587
|
+
result = _context4.sent;
|
|
1482
1588
|
|
|
1483
1589
|
setTimeout(function () {
|
|
1484
1590
|
if (window.__queryingModal) {
|
|
@@ -1486,34 +1592,34 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1486
1592
|
window.__queryingModal = null;
|
|
1487
1593
|
}
|
|
1488
1594
|
}, 0);
|
|
1489
|
-
|
|
1490
|
-
|
|
1595
|
+
_context4.t0 = result.Flag;
|
|
1596
|
+
_context4.next = _context4.t0 === "0" ? 8 : _context4.t0 === "1" ? 11 : _context4.t0 === "2" ? 13 : 15;
|
|
1491
1597
|
break;
|
|
1492
1598
|
|
|
1493
1599
|
case 8:
|
|
1494
1600
|
//成功
|
|
1495
1601
|
that.store.setDtoID(result.ID);
|
|
1496
1602
|
that.settleSuccess();
|
|
1497
|
-
return
|
|
1603
|
+
return _context4.abrupt('break', 15);
|
|
1498
1604
|
|
|
1499
1605
|
case 11:
|
|
1500
1606
|
//处理中
|
|
1501
1607
|
that.settleUnReturn();
|
|
1502
1608
|
// Message.info("结算正在处理中,请稍后再次查询。");
|
|
1503
|
-
return
|
|
1609
|
+
return _context4.abrupt('break', 15);
|
|
1504
1610
|
|
|
1505
1611
|
case 13:
|
|
1506
1612
|
//失败
|
|
1507
1613
|
_message2.default.info('\u7ED3\u7B97\u5931\u8D25\uFF0C\u539F\u56E0:' + result.Message + '\u3002');
|
|
1508
1614
|
// that.settleCanceled();
|
|
1509
|
-
return
|
|
1615
|
+
return _context4.abrupt('break', 15);
|
|
1510
1616
|
|
|
1511
1617
|
case 15:
|
|
1512
1618
|
case 'end':
|
|
1513
|
-
return
|
|
1619
|
+
return _context4.stop();
|
|
1514
1620
|
}
|
|
1515
1621
|
}
|
|
1516
|
-
},
|
|
1622
|
+
}, _callee4, _this4);
|
|
1517
1623
|
}))();
|
|
1518
1624
|
},
|
|
1519
1625
|
onCancel: function onCancel() {
|
|
@@ -1523,10 +1629,10 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1523
1629
|
|
|
1524
1630
|
case 2:
|
|
1525
1631
|
case 'end':
|
|
1526
|
-
return
|
|
1632
|
+
return _context5.stop();
|
|
1527
1633
|
}
|
|
1528
1634
|
}
|
|
1529
|
-
},
|
|
1635
|
+
}, _callee5, _this3);
|
|
1530
1636
|
}));
|
|
1531
1637
|
|
|
1532
1638
|
_this2.settleCanceled = function () {
|
|
@@ -1535,15 +1641,15 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1535
1641
|
_this2.cancelState();
|
|
1536
1642
|
};
|
|
1537
1643
|
|
|
1538
|
-
_this2.settleSuccess = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function
|
|
1539
|
-
var _enumController$
|
|
1644
|
+
_this2.settleSuccess = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee6() {
|
|
1645
|
+
var _enumController$getEn19, PayStyle, _this2$store$paymode, amount, received, thePaymodes, IdbusiType, charge, openCashBox, _this, showTwoScreen, getSettleGift, type, resp1;
|
|
1540
1646
|
|
|
1541
|
-
return _regenerator2.default.wrap(function
|
|
1647
|
+
return _regenerator2.default.wrap(function _callee6$(_context6) {
|
|
1542
1648
|
while (1) {
|
|
1543
|
-
switch (
|
|
1649
|
+
switch (_context6.prev = _context6.next) {
|
|
1544
1650
|
case 0:
|
|
1545
1651
|
//提示成功
|
|
1546
|
-
_enumController$
|
|
1652
|
+
_enumController$getEn19 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn19.PayStyle;
|
|
1547
1653
|
_this2$store$paymode = _this2.store.paymode, amount = _this2$store$paymode.amount, received = _this2$store$paymode.received, thePaymodes = _this2$store$paymode.thePaymodes;
|
|
1548
1654
|
IdbusiType = _this2.store.dto.IdbusiType;
|
|
1549
1655
|
charge = _this2.store.paymode.charge;
|
|
@@ -1582,6 +1688,9 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1582
1688
|
//副屏-第二屏幕
|
|
1583
1689
|
if (_this.isHorizontalSunMi) {
|
|
1584
1690
|
window.sunMi_PresentationManager.sendMessageToSecondScreen(params);
|
|
1691
|
+
setTimeout(function () {
|
|
1692
|
+
window.sunMi_PresentationManager.sendMessageToSecondScreen({ step: 1 });
|
|
1693
|
+
}, 3000);
|
|
1585
1694
|
} else {
|
|
1586
1695
|
_mutantsMicrofx.nativeMs && _mutantsMicrofx.nativeMs.setIpcRendererMethod('ReplyScreen', params);
|
|
1587
1696
|
}
|
|
@@ -1598,22 +1707,22 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1598
1707
|
resp1 = false;
|
|
1599
1708
|
|
|
1600
1709
|
if (!(type !== 1)) {
|
|
1601
|
-
|
|
1710
|
+
_context6.next = 20;
|
|
1602
1711
|
break;
|
|
1603
1712
|
}
|
|
1604
1713
|
|
|
1605
|
-
|
|
1606
|
-
|
|
1714
|
+
_context6.prev = 11;
|
|
1715
|
+
_context6.next = 14;
|
|
1607
1716
|
return getSettleGift();
|
|
1608
1717
|
|
|
1609
1718
|
case 14:
|
|
1610
|
-
resp1 =
|
|
1611
|
-
|
|
1719
|
+
resp1 = _context6.sent;
|
|
1720
|
+
_context6.next = 20;
|
|
1612
1721
|
break;
|
|
1613
1722
|
|
|
1614
1723
|
case 17:
|
|
1615
|
-
|
|
1616
|
-
|
|
1724
|
+
_context6.prev = 17;
|
|
1725
|
+
_context6.t0 = _context6['catch'](11);
|
|
1617
1726
|
|
|
1618
1727
|
console.log("获取支付礼包getSettleGift失败");
|
|
1619
1728
|
|
|
@@ -1642,7 +1751,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1642
1751
|
} else if (MemberPoints && Number(amount) == Number(0)) {
|
|
1643
1752
|
message = "兑换成功";
|
|
1644
1753
|
}
|
|
1645
|
-
window.__successModal = (0, _utils.showSuccessModal)(amount, received, charge, _this.props.onModalClose, isXianjin, message, resp1 && resp1.data, stores, function () {
|
|
1754
|
+
window.__successModal = (0, _utils.showSuccessModal)(amount, received, charge, _this.props.onModalClose, isXianjin, message, resp1 && resp1.data, _mutantsMicrofx.stores, function () {
|
|
1646
1755
|
_this.handleGuestShow(5);
|
|
1647
1756
|
});
|
|
1648
1757
|
_this2.setState({ isXianjin: false });
|
|
@@ -1651,23 +1760,23 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1651
1760
|
|
|
1652
1761
|
case 21:
|
|
1653
1762
|
case 'end':
|
|
1654
|
-
return
|
|
1763
|
+
return _context6.stop();
|
|
1655
1764
|
}
|
|
1656
1765
|
}
|
|
1657
|
-
},
|
|
1766
|
+
}, _callee6, _this3, [[11, 17]]);
|
|
1658
1767
|
}));
|
|
1659
1768
|
|
|
1660
1769
|
_this2.handleGuestShow = function (dtype, value) {
|
|
1661
1770
|
if (_this2.hasElectron === false) return;
|
|
1662
1771
|
var dt = _mutantsMicrofx.localStore.get('portsetting_hardSet') || [];
|
|
1663
1772
|
|
|
1664
|
-
var
|
|
1665
|
-
guestshow_enable =
|
|
1666
|
-
guestshow_clear =
|
|
1667
|
-
guestshow_welcome =
|
|
1668
|
-
guestshow_collect =
|
|
1669
|
-
guestshow_refund =
|
|
1670
|
-
guestshow_change =
|
|
1773
|
+
var _ref13 = dt || {},
|
|
1774
|
+
guestshow_enable = _ref13.guestshow_enable,
|
|
1775
|
+
guestshow_clear = _ref13.guestshow_clear,
|
|
1776
|
+
guestshow_welcome = _ref13.guestshow_welcome,
|
|
1777
|
+
guestshow_collect = _ref13.guestshow_collect,
|
|
1778
|
+
guestshow_refund = _ref13.guestshow_refund,
|
|
1779
|
+
guestshow_change = _ref13.guestshow_change;
|
|
1671
1780
|
|
|
1672
1781
|
var hasSuccess = _mutantsMicrofx.localStore && _mutantsMicrofx.localStore.get('portsetting_hardSet_isSuccess');
|
|
1673
1782
|
if (!guestshow_enable || !!guestshow_enable && hasSuccess == '0') return;
|
|
@@ -1702,108 +1811,108 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1702
1811
|
};
|
|
1703
1812
|
|
|
1704
1813
|
_this2.handleSettle = function () {
|
|
1705
|
-
var
|
|
1814
|
+
var _ref14 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee9(args) {
|
|
1706
1815
|
var handleUserInputs = function () {
|
|
1707
|
-
var
|
|
1816
|
+
var _ref16 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee8(promises) {
|
|
1708
1817
|
var results, _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, p, _result;
|
|
1709
1818
|
|
|
1710
|
-
return _regenerator2.default.wrap(function
|
|
1819
|
+
return _regenerator2.default.wrap(function _callee8$(_context8) {
|
|
1711
1820
|
while (1) {
|
|
1712
|
-
switch (
|
|
1821
|
+
switch (_context8.prev = _context8.next) {
|
|
1713
1822
|
case 0:
|
|
1714
1823
|
results = [];
|
|
1715
|
-
|
|
1824
|
+
_context8.prev = 1;
|
|
1716
1825
|
_iteratorNormalCompletion = true;
|
|
1717
1826
|
_didIteratorError = false;
|
|
1718
1827
|
_iteratorError = undefined;
|
|
1719
|
-
|
|
1828
|
+
_context8.prev = 5;
|
|
1720
1829
|
_iterator = (0, _getIterator3.default)(promises);
|
|
1721
1830
|
|
|
1722
1831
|
case 7:
|
|
1723
1832
|
if (_iteratorNormalCompletion = (_step = _iterator.next()).done) {
|
|
1724
|
-
|
|
1833
|
+
_context8.next = 16;
|
|
1725
1834
|
break;
|
|
1726
1835
|
}
|
|
1727
1836
|
|
|
1728
1837
|
p = _step.value;
|
|
1729
|
-
|
|
1838
|
+
_context8.next = 11;
|
|
1730
1839
|
return p;
|
|
1731
1840
|
|
|
1732
1841
|
case 11:
|
|
1733
|
-
_result =
|
|
1842
|
+
_result = _context8.sent;
|
|
1734
1843
|
|
|
1735
1844
|
results.push(_result);
|
|
1736
1845
|
|
|
1737
1846
|
case 13:
|
|
1738
1847
|
_iteratorNormalCompletion = true;
|
|
1739
|
-
|
|
1848
|
+
_context8.next = 7;
|
|
1740
1849
|
break;
|
|
1741
1850
|
|
|
1742
1851
|
case 16:
|
|
1743
|
-
|
|
1852
|
+
_context8.next = 22;
|
|
1744
1853
|
break;
|
|
1745
1854
|
|
|
1746
1855
|
case 18:
|
|
1747
|
-
|
|
1748
|
-
|
|
1856
|
+
_context8.prev = 18;
|
|
1857
|
+
_context8.t0 = _context8['catch'](5);
|
|
1749
1858
|
_didIteratorError = true;
|
|
1750
|
-
_iteratorError =
|
|
1859
|
+
_iteratorError = _context8.t0;
|
|
1751
1860
|
|
|
1752
1861
|
case 22:
|
|
1753
|
-
|
|
1754
|
-
|
|
1862
|
+
_context8.prev = 22;
|
|
1863
|
+
_context8.prev = 23;
|
|
1755
1864
|
|
|
1756
1865
|
if (!_iteratorNormalCompletion && _iterator.return) {
|
|
1757
1866
|
_iterator.return();
|
|
1758
1867
|
}
|
|
1759
1868
|
|
|
1760
1869
|
case 25:
|
|
1761
|
-
|
|
1870
|
+
_context8.prev = 25;
|
|
1762
1871
|
|
|
1763
1872
|
if (!_didIteratorError) {
|
|
1764
|
-
|
|
1873
|
+
_context8.next = 28;
|
|
1765
1874
|
break;
|
|
1766
1875
|
}
|
|
1767
1876
|
|
|
1768
1877
|
throw _iteratorError;
|
|
1769
1878
|
|
|
1770
1879
|
case 28:
|
|
1771
|
-
return
|
|
1880
|
+
return _context8.finish(25);
|
|
1772
1881
|
|
|
1773
1882
|
case 29:
|
|
1774
|
-
return
|
|
1883
|
+
return _context8.finish(22);
|
|
1775
1884
|
|
|
1776
1885
|
case 30:
|
|
1777
1886
|
window.__loadingModal = (0, _utils.openLoadingModal)();
|
|
1778
|
-
|
|
1887
|
+
_context8.next = 33;
|
|
1779
1888
|
return commit(results);
|
|
1780
1889
|
|
|
1781
1890
|
case 33:
|
|
1782
|
-
|
|
1891
|
+
_context8.next = 37;
|
|
1783
1892
|
break;
|
|
1784
1893
|
|
|
1785
1894
|
case 35:
|
|
1786
|
-
|
|
1787
|
-
|
|
1895
|
+
_context8.prev = 35;
|
|
1896
|
+
_context8.t1 = _context8['catch'](1);
|
|
1788
1897
|
|
|
1789
1898
|
case 37:
|
|
1790
1899
|
case 'end':
|
|
1791
|
-
return
|
|
1900
|
+
return _context8.stop();
|
|
1792
1901
|
}
|
|
1793
1902
|
}
|
|
1794
|
-
},
|
|
1903
|
+
}, _callee8, this, [[1, 35], [5, 18, 22, 30], [23,, 25, 29]]);
|
|
1795
1904
|
}));
|
|
1796
1905
|
|
|
1797
1906
|
return function handleUserInputs(_x4) {
|
|
1798
|
-
return
|
|
1907
|
+
return _ref16.apply(this, arguments);
|
|
1799
1908
|
};
|
|
1800
1909
|
}();
|
|
1801
1910
|
|
|
1802
|
-
var _enumController$
|
|
1911
|
+
var _enumController$getEn20, PayStyle, _this2$store6, paymode, brefund, boriginReturn, newStyle, isQuickPay, that, status, zeromode, promises, thePaymodes, quickmode, commit;
|
|
1803
1912
|
|
|
1804
|
-
return _regenerator2.default.wrap(function
|
|
1913
|
+
return _regenerator2.default.wrap(function _callee9$(_context9) {
|
|
1805
1914
|
while (1) {
|
|
1806
|
-
switch (
|
|
1915
|
+
switch (_context9.prev = _context9.next) {
|
|
1807
1916
|
case 0:
|
|
1808
1917
|
_this2.setState({
|
|
1809
1918
|
settleDisabled: true
|
|
@@ -1819,7 +1928,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1819
1928
|
// }
|
|
1820
1929
|
//
|
|
1821
1930
|
// testAsync(p);
|
|
1822
|
-
_enumController$
|
|
1931
|
+
_enumController$getEn20 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn20.PayStyle;
|
|
1823
1932
|
_this2$store6 = _this2.store, paymode = _this2$store6.paymode, brefund = _this2$store6.brefund, boriginReturn = _this2$store6.boriginReturn, newStyle = _this2$store6.newStyle;
|
|
1824
1933
|
isQuickPay = args === 'quickPay';
|
|
1825
1934
|
that = _this2;
|
|
@@ -1835,7 +1944,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1835
1944
|
});
|
|
1836
1945
|
|
|
1837
1946
|
if (!(that.checkCharge() && Math.abs(paymode.receivable) > that.props.initData("posChangeUpperAmount"))) {
|
|
1838
|
-
|
|
1947
|
+
_context9.next = 13;
|
|
1839
1948
|
break;
|
|
1840
1949
|
}
|
|
1841
1950
|
|
|
@@ -1843,11 +1952,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1843
1952
|
_this2.setState({
|
|
1844
1953
|
settleDisabled: false
|
|
1845
1954
|
});
|
|
1846
|
-
return
|
|
1955
|
+
return _context9.abrupt('return');
|
|
1847
1956
|
|
|
1848
1957
|
case 13:
|
|
1849
1958
|
if (!(args !== "zero" && !newStyle)) {
|
|
1850
|
-
|
|
1959
|
+
_context9.next = 19;
|
|
1851
1960
|
break;
|
|
1852
1961
|
}
|
|
1853
1962
|
|
|
@@ -1856,7 +1965,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1856
1965
|
});
|
|
1857
1966
|
|
|
1858
1967
|
if (!zeromode) {
|
|
1859
|
-
|
|
1968
|
+
_context9.next = 19;
|
|
1860
1969
|
break;
|
|
1861
1970
|
}
|
|
1862
1971
|
|
|
@@ -1864,7 +1973,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1864
1973
|
settleDisabled: false
|
|
1865
1974
|
});
|
|
1866
1975
|
_message2.default.error(zeromode.name + ' 的结算金额为零,不可以结算。');
|
|
1867
|
-
return
|
|
1976
|
+
return _context9.abrupt('return');
|
|
1868
1977
|
|
|
1869
1978
|
case 19:
|
|
1870
1979
|
promises = [];
|
|
@@ -1873,14 +1982,14 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1873
1982
|
}) : paymode.thePaymodes, 'orderBy');
|
|
1874
1983
|
|
|
1875
1984
|
if (!isQuickPay) {
|
|
1876
|
-
|
|
1985
|
+
_context9.next = 27;
|
|
1877
1986
|
break;
|
|
1878
1987
|
}
|
|
1879
1988
|
|
|
1880
1989
|
quickmode = thePaymodes[0];
|
|
1881
1990
|
|
|
1882
1991
|
if (!_this2.checkModeDisabled(quickmode.paymentType, brefund, boriginReturn)) {
|
|
1883
|
-
|
|
1992
|
+
_context9.next = 27;
|
|
1884
1993
|
break;
|
|
1885
1994
|
}
|
|
1886
1995
|
|
|
@@ -1888,7 +1997,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1888
1997
|
settleDisabled: false
|
|
1889
1998
|
});
|
|
1890
1999
|
_message2.default.error('退款不能使用' + quickmode.name + '结算,请使用其他结算方式!');
|
|
1891
|
-
return
|
|
2000
|
+
return _context9.abrupt('return');
|
|
1892
2001
|
|
|
1893
2002
|
case 27:
|
|
1894
2003
|
(0, _forEach3.default)(thePaymodes, function (mode) {
|
|
@@ -1898,27 +2007,27 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1898
2007
|
});
|
|
1899
2008
|
|
|
1900
2009
|
commit = function () {
|
|
1901
|
-
var
|
|
2010
|
+
var _ref15 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee7(values) {
|
|
1902
2011
|
var result;
|
|
1903
|
-
return _regenerator2.default.wrap(function
|
|
2012
|
+
return _regenerator2.default.wrap(function _callee7$(_context7) {
|
|
1904
2013
|
while (1) {
|
|
1905
|
-
switch (
|
|
2014
|
+
switch (_context7.prev = _context7.next) {
|
|
1906
2015
|
case 0:
|
|
1907
|
-
|
|
2016
|
+
_context7.next = 2;
|
|
1908
2017
|
return _this2.store.commit(_this2.props.bTest);
|
|
1909
2018
|
|
|
1910
2019
|
case 2:
|
|
1911
|
-
result =
|
|
2020
|
+
result = _context7.sent;
|
|
1912
2021
|
|
|
1913
2022
|
if (!(result === true)) {
|
|
1914
|
-
|
|
2023
|
+
_context7.next = 8;
|
|
1915
2024
|
break;
|
|
1916
2025
|
}
|
|
1917
2026
|
|
|
1918
2027
|
//成功
|
|
1919
2028
|
that.settleSuccess();
|
|
1920
2029
|
_promise2.default.resolve();
|
|
1921
|
-
|
|
2030
|
+
_context7.next = 23;
|
|
1922
2031
|
break;
|
|
1923
2032
|
|
|
1924
2033
|
case 8:
|
|
@@ -1935,24 +2044,24 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1935
2044
|
}, 0);
|
|
1936
2045
|
|
|
1937
2046
|
if (!(result && (result.Code || result.code))) {
|
|
1938
|
-
|
|
2047
|
+
_context7.next = 20;
|
|
1939
2048
|
break;
|
|
1940
2049
|
}
|
|
1941
2050
|
|
|
1942
|
-
|
|
1943
|
-
|
|
2051
|
+
_context7.t0 = result.Code || result.code;
|
|
2052
|
+
_context7.next = _context7.t0 === 'RE_Settle_UnReturn' ? 14 : _context7.t0 === 'ECONNABORTED' ? 18 : 20;
|
|
1944
2053
|
break;
|
|
1945
2054
|
|
|
1946
2055
|
case 14:
|
|
1947
2056
|
console.log('settlement--RE_Settle_UnReturn--调用清除数据==Focus==');
|
|
1948
2057
|
_this2.props.clearVoucherData && _this2.props.clearVoucherData();
|
|
1949
2058
|
_this2.cancelState();
|
|
1950
|
-
return
|
|
2059
|
+
return _context7.abrupt('break', 20);
|
|
1951
2060
|
|
|
1952
2061
|
case 18:
|
|
1953
2062
|
//error.code === 'ECONNABORTED' && error.message.indexOf('timeout')
|
|
1954
2063
|
result.message.indexOf('timeout') > -1 && that.settleUnReturn();
|
|
1955
|
-
return
|
|
2064
|
+
return _context7.abrupt('break', 20);
|
|
1956
2065
|
|
|
1957
2066
|
case 20:
|
|
1958
2067
|
if (isQuickPay) {
|
|
@@ -1960,19 +2069,19 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1960
2069
|
that.cancelState();
|
|
1961
2070
|
}
|
|
1962
2071
|
|
|
1963
|
-
|
|
2072
|
+
_context7.next = 23;
|
|
1964
2073
|
return _promise2.default.reject();
|
|
1965
2074
|
|
|
1966
2075
|
case 23:
|
|
1967
2076
|
case 'end':
|
|
1968
|
-
return
|
|
2077
|
+
return _context7.stop();
|
|
1969
2078
|
}
|
|
1970
2079
|
}
|
|
1971
|
-
},
|
|
2080
|
+
}, _callee7, _this3);
|
|
1972
2081
|
}));
|
|
1973
2082
|
|
|
1974
2083
|
return function commit(_x3) {
|
|
1975
|
-
return
|
|
2084
|
+
return _ref15.apply(this, arguments);
|
|
1976
2085
|
};
|
|
1977
2086
|
}();
|
|
1978
2087
|
|
|
@@ -1980,102 +2089,102 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1980
2089
|
|
|
1981
2090
|
case 30:
|
|
1982
2091
|
case 'end':
|
|
1983
|
-
return
|
|
2092
|
+
return _context9.stop();
|
|
1984
2093
|
}
|
|
1985
2094
|
}
|
|
1986
|
-
},
|
|
2095
|
+
}, _callee9, _this3);
|
|
1987
2096
|
}));
|
|
1988
2097
|
|
|
1989
2098
|
return function (_x2) {
|
|
1990
|
-
return
|
|
2099
|
+
return _ref14.apply(this, arguments);
|
|
1991
2100
|
};
|
|
1992
2101
|
}();
|
|
1993
2102
|
|
|
1994
|
-
_this2.handleCzk = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function
|
|
2103
|
+
_this2.handleCzk = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee12() {
|
|
1995
2104
|
var handleUserInputs = function () {
|
|
1996
|
-
var
|
|
2105
|
+
var _ref20 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee11(promises) {
|
|
1997
2106
|
var results, _iteratorNormalCompletion2, _didIteratorError2, _iteratorError2, _iterator2, _step2, p, _result2;
|
|
1998
2107
|
|
|
1999
|
-
return _regenerator2.default.wrap(function
|
|
2108
|
+
return _regenerator2.default.wrap(function _callee11$(_context11) {
|
|
2000
2109
|
while (1) {
|
|
2001
|
-
switch (
|
|
2110
|
+
switch (_context11.prev = _context11.next) {
|
|
2002
2111
|
case 0:
|
|
2003
2112
|
results = [];
|
|
2004
|
-
|
|
2113
|
+
_context11.prev = 1;
|
|
2005
2114
|
_iteratorNormalCompletion2 = true;
|
|
2006
2115
|
_didIteratorError2 = false;
|
|
2007
2116
|
_iteratorError2 = undefined;
|
|
2008
|
-
|
|
2117
|
+
_context11.prev = 5;
|
|
2009
2118
|
_iterator2 = (0, _getIterator3.default)(promises);
|
|
2010
2119
|
|
|
2011
2120
|
case 7:
|
|
2012
2121
|
if (_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done) {
|
|
2013
|
-
|
|
2122
|
+
_context11.next = 16;
|
|
2014
2123
|
break;
|
|
2015
2124
|
}
|
|
2016
2125
|
|
|
2017
2126
|
p = _step2.value;
|
|
2018
|
-
|
|
2127
|
+
_context11.next = 11;
|
|
2019
2128
|
return p;
|
|
2020
2129
|
|
|
2021
2130
|
case 11:
|
|
2022
|
-
_result2 =
|
|
2131
|
+
_result2 = _context11.sent;
|
|
2023
2132
|
|
|
2024
2133
|
results.push(_result2);
|
|
2025
2134
|
|
|
2026
2135
|
case 13:
|
|
2027
2136
|
_iteratorNormalCompletion2 = true;
|
|
2028
|
-
|
|
2137
|
+
_context11.next = 7;
|
|
2029
2138
|
break;
|
|
2030
2139
|
|
|
2031
2140
|
case 16:
|
|
2032
|
-
|
|
2141
|
+
_context11.next = 22;
|
|
2033
2142
|
break;
|
|
2034
2143
|
|
|
2035
2144
|
case 18:
|
|
2036
|
-
|
|
2037
|
-
|
|
2145
|
+
_context11.prev = 18;
|
|
2146
|
+
_context11.t0 = _context11['catch'](5);
|
|
2038
2147
|
_didIteratorError2 = true;
|
|
2039
|
-
_iteratorError2 =
|
|
2148
|
+
_iteratorError2 = _context11.t0;
|
|
2040
2149
|
|
|
2041
2150
|
case 22:
|
|
2042
|
-
|
|
2043
|
-
|
|
2151
|
+
_context11.prev = 22;
|
|
2152
|
+
_context11.prev = 23;
|
|
2044
2153
|
|
|
2045
2154
|
if (!_iteratorNormalCompletion2 && _iterator2.return) {
|
|
2046
2155
|
_iterator2.return();
|
|
2047
2156
|
}
|
|
2048
2157
|
|
|
2049
2158
|
case 25:
|
|
2050
|
-
|
|
2159
|
+
_context11.prev = 25;
|
|
2051
2160
|
|
|
2052
2161
|
if (!_didIteratorError2) {
|
|
2053
|
-
|
|
2162
|
+
_context11.next = 28;
|
|
2054
2163
|
break;
|
|
2055
2164
|
}
|
|
2056
2165
|
|
|
2057
2166
|
throw _iteratorError2;
|
|
2058
2167
|
|
|
2059
2168
|
case 28:
|
|
2060
|
-
return
|
|
2169
|
+
return _context11.finish(25);
|
|
2061
2170
|
|
|
2062
2171
|
case 29:
|
|
2063
|
-
return
|
|
2172
|
+
return _context11.finish(22);
|
|
2064
2173
|
|
|
2065
2174
|
case 30:
|
|
2066
|
-
|
|
2175
|
+
_context11.next = 32;
|
|
2067
2176
|
return commit(results);
|
|
2068
2177
|
|
|
2069
2178
|
case 32:
|
|
2070
|
-
|
|
2179
|
+
_context11.next = 37;
|
|
2071
2180
|
break;
|
|
2072
2181
|
|
|
2073
2182
|
case 34:
|
|
2074
|
-
|
|
2075
|
-
|
|
2183
|
+
_context11.prev = 34;
|
|
2184
|
+
_context11.t1 = _context11['catch'](1);
|
|
2076
2185
|
|
|
2077
|
-
if (
|
|
2078
|
-
_message2.default.error(
|
|
2186
|
+
if (_context11.t1 != "cancelpwd") {
|
|
2187
|
+
_message2.default.error(_context11.t1);
|
|
2079
2188
|
setTimeout(function () {
|
|
2080
2189
|
that.handleCzk();
|
|
2081
2190
|
}, 500);
|
|
@@ -2083,34 +2192,38 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2083
2192
|
|
|
2084
2193
|
case 37:
|
|
2085
2194
|
case 'end':
|
|
2086
|
-
return
|
|
2195
|
+
return _context11.stop();
|
|
2087
2196
|
}
|
|
2088
2197
|
}
|
|
2089
|
-
},
|
|
2198
|
+
}, _callee11, this, [[1, 34], [5, 18, 22, 30], [23,, 25, 29]]);
|
|
2090
2199
|
}));
|
|
2091
2200
|
|
|
2092
2201
|
return function handleUserInputs(_x6) {
|
|
2093
|
-
return
|
|
2202
|
+
return _ref20.apply(this, arguments);
|
|
2094
2203
|
};
|
|
2095
2204
|
}();
|
|
2096
2205
|
|
|
2097
|
-
var that, curmode, promises,
|
|
2206
|
+
var that, curmode, promises, _ref18, isNewRetailBCPos, _enumController$getEn21, PayStyle, isNeedPasswordForStoragePay, commit;
|
|
2098
2207
|
|
|
2099
|
-
return _regenerator2.default.wrap(function
|
|
2208
|
+
return _regenerator2.default.wrap(function _callee12$(_context12) {
|
|
2100
2209
|
while (1) {
|
|
2101
|
-
switch (
|
|
2210
|
+
switch (_context12.prev = _context12.next) {
|
|
2102
2211
|
case 0:
|
|
2103
2212
|
that = _this2;
|
|
2104
2213
|
curmode = _this2.store.paymode.currentMode;
|
|
2105
2214
|
promises = [];
|
|
2106
|
-
|
|
2215
|
+
_ref18 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref18.isNewRetailBCPos;
|
|
2107
2216
|
|
|
2108
2217
|
if (isNewRetailBCPos) {
|
|
2109
2218
|
if (curmode.value > 0) {
|
|
2110
|
-
_enumController$
|
|
2219
|
+
_enumController$getEn21 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn21.PayStyle;
|
|
2111
2220
|
|
|
2112
2221
|
if (curmode.paymentType === PayStyle.hyczk) {
|
|
2113
|
-
|
|
2222
|
+
isNeedPasswordForStoragePay = (0, _tplusPoslogin.PosInitData)('IsNeedPasswordForStoragePay');
|
|
2223
|
+
|
|
2224
|
+
if (isNeedPasswordForStoragePay) {
|
|
2225
|
+
promises.push(that.inputPwd(curmode));
|
|
2226
|
+
}
|
|
2114
2227
|
}
|
|
2115
2228
|
}
|
|
2116
2229
|
} else {
|
|
@@ -2120,33 +2233,33 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2120
2233
|
}
|
|
2121
2234
|
|
|
2122
2235
|
commit = function () {
|
|
2123
|
-
var
|
|
2236
|
+
var _ref19 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee10(values) {
|
|
2124
2237
|
var result;
|
|
2125
|
-
return _regenerator2.default.wrap(function
|
|
2238
|
+
return _regenerator2.default.wrap(function _callee10$(_context10) {
|
|
2126
2239
|
while (1) {
|
|
2127
|
-
switch (
|
|
2240
|
+
switch (_context10.prev = _context10.next) {
|
|
2128
2241
|
case 0:
|
|
2129
2242
|
if (!(values.length > 0)) {
|
|
2130
|
-
|
|
2243
|
+
_context10.next = 6;
|
|
2131
2244
|
break;
|
|
2132
2245
|
}
|
|
2133
2246
|
|
|
2134
|
-
|
|
2247
|
+
_context10.next = 3;
|
|
2135
2248
|
return that.store.validePwd(values[0]);
|
|
2136
2249
|
|
|
2137
2250
|
case 3:
|
|
2138
|
-
|
|
2139
|
-
|
|
2251
|
+
_context10.t0 = _context10.sent;
|
|
2252
|
+
_context10.next = 7;
|
|
2140
2253
|
break;
|
|
2141
2254
|
|
|
2142
2255
|
case 6:
|
|
2143
|
-
|
|
2256
|
+
_context10.t0 = "";
|
|
2144
2257
|
|
|
2145
2258
|
case 7:
|
|
2146
|
-
result =
|
|
2259
|
+
result = _context10.t0;
|
|
2147
2260
|
|
|
2148
2261
|
if (!(result == "")) {
|
|
2149
|
-
|
|
2262
|
+
_context10.next = 13;
|
|
2150
2263
|
break;
|
|
2151
2264
|
}
|
|
2152
2265
|
|
|
@@ -2154,23 +2267,23 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2154
2267
|
//返回
|
|
2155
2268
|
that.setCurrentFocusAndAddPay(curmode.paymentType);
|
|
2156
2269
|
_promise2.default.resolve();
|
|
2157
|
-
|
|
2270
|
+
_context10.next = 15;
|
|
2158
2271
|
break;
|
|
2159
2272
|
|
|
2160
2273
|
case 13:
|
|
2161
|
-
|
|
2274
|
+
_context10.next = 15;
|
|
2162
2275
|
return _promise2.default.reject(result);
|
|
2163
2276
|
|
|
2164
2277
|
case 15:
|
|
2165
2278
|
case 'end':
|
|
2166
|
-
return
|
|
2279
|
+
return _context10.stop();
|
|
2167
2280
|
}
|
|
2168
2281
|
}
|
|
2169
|
-
},
|
|
2282
|
+
}, _callee10, _this3);
|
|
2170
2283
|
}));
|
|
2171
2284
|
|
|
2172
2285
|
return function commit(_x5) {
|
|
2173
|
-
return
|
|
2286
|
+
return _ref19.apply(this, arguments);
|
|
2174
2287
|
};
|
|
2175
2288
|
}();
|
|
2176
2289
|
|
|
@@ -2178,10 +2291,10 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2178
2291
|
|
|
2179
2292
|
case 7:
|
|
2180
2293
|
case 'end':
|
|
2181
|
-
return
|
|
2294
|
+
return _context12.stop();
|
|
2182
2295
|
}
|
|
2183
2296
|
}
|
|
2184
|
-
},
|
|
2297
|
+
}, _callee12, _this3);
|
|
2185
2298
|
}));
|
|
2186
2299
|
|
|
2187
2300
|
_this2.fKeyboardOnOk = function (paymethodeId) {
|
|
@@ -2221,15 +2334,15 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2221
2334
|
};
|
|
2222
2335
|
|
|
2223
2336
|
_this2.inputPwd = function () {
|
|
2224
|
-
var
|
|
2337
|
+
var _ref21 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee13(paymode) {
|
|
2225
2338
|
var that, confirmPwd;
|
|
2226
|
-
return _regenerator2.default.wrap(function
|
|
2339
|
+
return _regenerator2.default.wrap(function _callee13$(_context13) {
|
|
2227
2340
|
while (1) {
|
|
2228
|
-
switch (
|
|
2341
|
+
switch (_context13.prev = _context13.next) {
|
|
2229
2342
|
case 0:
|
|
2230
2343
|
that = _this2;
|
|
2231
2344
|
confirmPwd = _this2.state.confirmPwd;
|
|
2232
|
-
return
|
|
2345
|
+
return _context13.abrupt('return', new _promise2.default(function (resolve, reject) {
|
|
2233
2346
|
var modal = (0, _asyncModal2.default)({
|
|
2234
2347
|
onPressEnter: function onPressEnter() {
|
|
2235
2348
|
_keyboard2.default.close();
|
|
@@ -2237,8 +2350,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2237
2350
|
// if (v !== '') {
|
|
2238
2351
|
modal.destroy();
|
|
2239
2352
|
|
|
2240
|
-
var
|
|
2241
|
-
confirmPwd =
|
|
2353
|
+
var _ref22 = that.state || {},
|
|
2354
|
+
confirmPwd = _ref22.confirmPwd;
|
|
2242
2355
|
|
|
2243
2356
|
setTimeout(function () {
|
|
2244
2357
|
paymode.authCode = v;
|
|
@@ -2328,8 +2441,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2328
2441
|
type: 'primary', size: 'large', onClick: function onClick() {
|
|
2329
2442
|
var v = (0, _trim3.default)(that['inputAmount']['input']['value']);
|
|
2330
2443
|
|
|
2331
|
-
var
|
|
2332
|
-
confirmPwd =
|
|
2444
|
+
var _ref23 = that.state || {},
|
|
2445
|
+
confirmPwd = _ref23.confirmPwd;
|
|
2333
2446
|
// if (v !== '') {
|
|
2334
2447
|
|
|
2335
2448
|
|
|
@@ -2358,19 +2471,19 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2358
2471
|
setTimeout(function () {
|
|
2359
2472
|
that['inputS' + paymode.paymethodId] && that['inputS' + paymode.paymethodId].input.focus();
|
|
2360
2473
|
that.inputAmount && that.inputAmount.input.focus();
|
|
2361
|
-
},
|
|
2474
|
+
}, 300);
|
|
2362
2475
|
}));
|
|
2363
2476
|
|
|
2364
2477
|
case 3:
|
|
2365
2478
|
case 'end':
|
|
2366
|
-
return
|
|
2479
|
+
return _context13.stop();
|
|
2367
2480
|
}
|
|
2368
2481
|
}
|
|
2369
|
-
},
|
|
2482
|
+
}, _callee13, _this3);
|
|
2370
2483
|
}));
|
|
2371
2484
|
|
|
2372
2485
|
return function (_x7) {
|
|
2373
|
-
return
|
|
2486
|
+
return _ref21.apply(this, arguments);
|
|
2374
2487
|
};
|
|
2375
2488
|
}();
|
|
2376
2489
|
|
|
@@ -2379,8 +2492,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2379
2492
|
bquick: bquick
|
|
2380
2493
|
});
|
|
2381
2494
|
|
|
2382
|
-
var _enumController$
|
|
2383
|
-
PayStyle = _enumController$
|
|
2495
|
+
var _enumController$getEn22 = _mutantsUtil.enumController.getEnumOj(),
|
|
2496
|
+
PayStyle = _enumController$getEn22.PayStyle;
|
|
2384
2497
|
|
|
2385
2498
|
var _this2$store7 = _this2.store,
|
|
2386
2499
|
paymode = _this2$store7.paymode,
|
|
@@ -2388,6 +2501,9 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2388
2501
|
boriginReturn = _this2$store7.boriginReturn,
|
|
2389
2502
|
newStyle = _this2$store7.newStyle;
|
|
2390
2503
|
|
|
2504
|
+
|
|
2505
|
+
if (bquick && !_mutantsMicrofx.stores.offlineSys.shouldSettlement(type)) return false;
|
|
2506
|
+
|
|
2391
2507
|
var status = false;
|
|
2392
2508
|
paymode.thePaymodes.forEach(function (v) {
|
|
2393
2509
|
if (v.paymentType === PayStyle.xianjin && v.value !== '0.00') {
|
|
@@ -2420,12 +2536,18 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2420
2536
|
|
|
2421
2537
|
_this2.onCzkChange = function (v) {
|
|
2422
2538
|
// console.log("czk change:"+new Date().toLocaleTimeString())
|
|
2423
|
-
var
|
|
2424
|
-
isNewRetailBCPos =
|
|
2539
|
+
var _ref24 = _mutantsUtil.platform || {},
|
|
2540
|
+
isNewRetailBCPos = _ref24.isNewRetailBCPos;
|
|
2425
2541
|
|
|
2426
2542
|
if (!isNewRetailBCPos) {
|
|
2427
2543
|
_this2.store.paymode.currentMode.member.setCardNo(v);
|
|
2428
2544
|
}
|
|
2545
|
+
if (!/^[0-9]*$/.test(v)) {
|
|
2546
|
+
return;
|
|
2547
|
+
}
|
|
2548
|
+
_this2.setState({
|
|
2549
|
+
czkValue: v
|
|
2550
|
+
});
|
|
2429
2551
|
// if(this.debounced){
|
|
2430
2552
|
// this.debounced.cancel();
|
|
2431
2553
|
// this.debounced=null;
|
|
@@ -2476,8 +2598,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2476
2598
|
};
|
|
2477
2599
|
|
|
2478
2600
|
_this2.checkCharge = function () {
|
|
2479
|
-
var _enumController$
|
|
2480
|
-
PayStyle = _enumController$
|
|
2601
|
+
var _enumController$getEn23 = _mutantsUtil.enumController.getEnumOj(),
|
|
2602
|
+
PayStyle = _enumController$getEn23.PayStyle;
|
|
2481
2603
|
|
|
2482
2604
|
var paymode = _this2.store.paymode;
|
|
2483
2605
|
|
|
@@ -2524,8 +2646,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2524
2646
|
};
|
|
2525
2647
|
|
|
2526
2648
|
_this2.getXianjinPayment = function (payType, value) {
|
|
2527
|
-
var _enumController$
|
|
2528
|
-
PayStyle = _enumController$
|
|
2649
|
+
var _enumController$getEn24 = _mutantsUtil.enumController.getEnumOj(),
|
|
2650
|
+
PayStyle = _enumController$getEn24.PayStyle;
|
|
2529
2651
|
|
|
2530
2652
|
var isManualIntoAmount = _this2.state.isManualIntoAmount;
|
|
2531
2653
|
|
|
@@ -2533,8 +2655,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2533
2655
|
};
|
|
2534
2656
|
|
|
2535
2657
|
_this2.getXianjinBalance = function (payType, value) {
|
|
2536
|
-
var _enumController$
|
|
2537
|
-
PayStyle = _enumController$
|
|
2658
|
+
var _enumController$getEn25 = _mutantsUtil.enumController.getEnumOj(),
|
|
2659
|
+
PayStyle = _enumController$getEn25.PayStyle;
|
|
2538
2660
|
//找零金额-存在权限控制
|
|
2539
2661
|
|
|
2540
2662
|
|
|
@@ -2554,9 +2676,9 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2554
2676
|
var isManualIntoAmount = void 0;
|
|
2555
2677
|
// 付款弹窗
|
|
2556
2678
|
return new _promise2.default(function (resolve, reject) {
|
|
2557
|
-
var _enumController$
|
|
2558
|
-
PayStyle = _enumController$
|
|
2559
|
-
PayIcon2 = _enumController$
|
|
2679
|
+
var _enumController$getEn26 = _mutantsUtil.enumController.getEnumOj(),
|
|
2680
|
+
PayStyle = _enumController$getEn26.PayStyle,
|
|
2681
|
+
PayIcon2 = _enumController$getEn26.PayIcon2;
|
|
2560
2682
|
|
|
2561
2683
|
var modal = (0, _asyncModal2.default)({
|
|
2562
2684
|
onPressEnter: function onPressEnter() {
|
|
@@ -2825,8 +2947,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2825
2947
|
paymode = _this2$store8.paymode,
|
|
2826
2948
|
newStyle = _this2$store8.newStyle;
|
|
2827
2949
|
|
|
2828
|
-
var _enumController$
|
|
2829
|
-
PayStyle = _enumController$
|
|
2950
|
+
var _enumController$getEn27 = _mutantsUtil.enumController.getEnumOj(),
|
|
2951
|
+
PayStyle = _enumController$getEn27.PayStyle;
|
|
2830
2952
|
|
|
2831
2953
|
var payTypeList = [PayStyle.SQBPAY, PayStyle.CSYH, PayStyle.smzf];
|
|
2832
2954
|
var payTypeFilterList = payTypeList.filter(function (filterType) {
|
|
@@ -2847,15 +2969,15 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2847
2969
|
};
|
|
2848
2970
|
|
|
2849
2971
|
_this2.checkModeDisabled = function (type, brefund, boriginReturn) {
|
|
2850
|
-
var _enumController$
|
|
2851
|
-
PayStyle = _enumController$
|
|
2972
|
+
var _enumController$getEn28 = _mutantsUtil.enumController.getEnumOj(),
|
|
2973
|
+
PayStyle = _enumController$getEn28.PayStyle;
|
|
2852
2974
|
|
|
2853
2975
|
return (brefund && (type == PayStyle.wx || type == PayStyle.zfb || type == PayStyle.smzf || type == PayStyle.jfdx || type == PayStyle.djq || type == PayStyle.SQBPAY || type == PayStyle.CSYH) || boriginReturn && type == PayStyle.hyczk) && !(boriginReturn && (type == PayStyle.wx || type == PayStyle.zfb)) || _this2.checkCurrentModeHaveMutex(type);
|
|
2854
2976
|
};
|
|
2855
2977
|
|
|
2856
2978
|
_this2.checkSettleDisabled = function (paymode, thePaymodes) {
|
|
2857
|
-
var _enumController$
|
|
2858
|
-
PayStyle = _enumController$
|
|
2979
|
+
var _enumController$getEn29 = _mutantsUtil.enumController.getEnumOj(),
|
|
2980
|
+
PayStyle = _enumController$getEn29.PayStyle;
|
|
2859
2981
|
|
|
2860
2982
|
console.log("settlement.checkSettleDisabled开始执行,参数:", { paymode: paymode, thePaymodes: thePaymodes });
|
|
2861
2983
|
if (paymode.amount == 0 && paymode.received == 0) {
|
|
@@ -2901,8 +3023,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2901
3023
|
};
|
|
2902
3024
|
|
|
2903
3025
|
_this2.editCzkModal = function () {
|
|
2904
|
-
var _enumController$
|
|
2905
|
-
PayStyle = _enumController$
|
|
3026
|
+
var _enumController$getEn30 = _mutantsUtil.enumController.getEnumOj(),
|
|
3027
|
+
PayStyle = _enumController$getEn30.PayStyle;
|
|
2906
3028
|
|
|
2907
3029
|
(0, _find3.default)(_this2.store.paymode.thePaymodes, function (mode) {
|
|
2908
3030
|
if (mode.paymentType == PayStyle.hyczk) {
|
|
@@ -2988,22 +3110,28 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2988
3110
|
}
|
|
2989
3111
|
};
|
|
2990
3112
|
|
|
3113
|
+
_this2.couponClick = function () {
|
|
3114
|
+
_this2.setState({
|
|
3115
|
+
couponLight: !_this2.state.couponLight
|
|
3116
|
+
});
|
|
3117
|
+
};
|
|
3118
|
+
|
|
2991
3119
|
_this2.hasElectron = hasElectron;
|
|
2992
3120
|
|
|
2993
|
-
var
|
|
2994
|
-
|
|
3121
|
+
var _ref25 = _mutantsMicrofx.localStore.get('user') || {},
|
|
3122
|
+
_ref25$loginInfo = _ref25.loginInfo;
|
|
2995
3123
|
|
|
2996
|
-
|
|
2997
|
-
var ICCardServer =
|
|
2998
|
-
ICCardPassword =
|
|
3124
|
+
_ref25$loginInfo = _ref25$loginInfo === undefined ? {} : _ref25$loginInfo;
|
|
3125
|
+
var ICCardServer = _ref25$loginInfo.ICCardServer,
|
|
3126
|
+
ICCardPassword = _ref25$loginInfo.ICCardPassword;
|
|
2999
3127
|
|
|
3000
3128
|
_this2.iCCardServer = parseInt(ICCardServer); // 启用IC卡:0为禁用 1为启用
|
|
3001
3129
|
_this2.iCCardPassword = ICCardPassword; //IC卡密码
|
|
3002
3130
|
//移动端环境下,没有读取IC卡的方式。
|
|
3003
3131
|
|
|
3004
|
-
var
|
|
3005
|
-
isHorizontalPad =
|
|
3006
|
-
isHorizontalSunMi =
|
|
3132
|
+
var _ref26 = _mutantsUtil.platform || {},
|
|
3133
|
+
isHorizontalPad = _ref26.isHorizontalPad,
|
|
3134
|
+
isHorizontalSunMi = _ref26.isHorizontalSunMi;
|
|
3007
3135
|
|
|
3008
3136
|
_this2.isHorizontalPad = !!isHorizontalPad;
|
|
3009
3137
|
_this2.isHorizontalSunMi = !!isHorizontalSunMi;
|
|
@@ -3150,9 +3278,9 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3150
3278
|
value: function renderToolbtn(mode, index) {
|
|
3151
3279
|
var _this7 = this;
|
|
3152
3280
|
|
|
3153
|
-
var _enumController$
|
|
3154
|
-
PayIcon = _enumController$
|
|
3155
|
-
PayStyle = _enumController$
|
|
3281
|
+
var _enumController$getEn31 = _mutantsUtil.enumController.getEnumOj(),
|
|
3282
|
+
PayIcon = _enumController$getEn31.PayIcon,
|
|
3283
|
+
PayStyle = _enumController$getEn31.PayStyle;
|
|
3156
3284
|
|
|
3157
3285
|
var isReturn = this.props.isReturn;
|
|
3158
3286
|
var _store = this.store,
|
|
@@ -3224,21 +3352,22 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3224
3352
|
value: function render() {
|
|
3225
3353
|
var _this8 = this;
|
|
3226
3354
|
|
|
3227
|
-
var _enumController$
|
|
3228
|
-
PayIcon = _enumController$
|
|
3229
|
-
PayIcon2 = _enumController$
|
|
3230
|
-
PayStyle = _enumController$
|
|
3231
|
-
Differentiate = _enumController$
|
|
3355
|
+
var _enumController$getEn32 = _mutantsUtil.enumController.getEnumOj(),
|
|
3356
|
+
PayIcon = _enumController$getEn32.PayIcon,
|
|
3357
|
+
PayIcon2 = _enumController$getEn32.PayIcon2,
|
|
3358
|
+
PayStyle = _enumController$getEn32.PayStyle,
|
|
3359
|
+
Differentiate = _enumController$getEn32.Differentiate;
|
|
3232
3360
|
|
|
3233
3361
|
var _state2 = this.state,
|
|
3234
3362
|
btnDissabled = _state2.btnDissabled,
|
|
3235
3363
|
dataSource = _state2.dataSource,
|
|
3236
3364
|
discountTotalAmount = _state2.discountTotalAmount,
|
|
3237
3365
|
discountRetailTotalAount = _state2.discountRetailTotalAount,
|
|
3238
|
-
discountPrototypeTotalAmount = _state2.discountPrototypeTotalAmount
|
|
3366
|
+
discountPrototypeTotalAmount = _state2.discountPrototypeTotalAmount,
|
|
3367
|
+
storageValue = _state2.storageValue;
|
|
3239
3368
|
|
|
3240
|
-
var
|
|
3241
|
-
isNewRetailBCPos =
|
|
3369
|
+
var _ref27 = _mutantsUtil.platform || {},
|
|
3370
|
+
isNewRetailBCPos = _ref27.isNewRetailBCPos;
|
|
3242
3371
|
|
|
3243
3372
|
var _store2 = this.store,
|
|
3244
3373
|
paymode = _store2.paymode,
|
|
@@ -3301,11 +3430,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3301
3430
|
quantity4 = 0;
|
|
3302
3431
|
var sumQuantity = 0; //数量总和的值,包括称重的。
|
|
3303
3432
|
|
|
3304
|
-
var
|
|
3305
|
-
|
|
3306
|
-
buyQuantity =
|
|
3307
|
-
|
|
3308
|
-
returnQuantity =
|
|
3433
|
+
var _ref28 = quantityDetail || {},
|
|
3434
|
+
_ref28$buyQuantity = _ref28.buyQuantity,
|
|
3435
|
+
buyQuantity = _ref28$buyQuantity === undefined ? 0 : _ref28$buyQuantity,
|
|
3436
|
+
_ref28$returnQuantity = _ref28.returnQuantity,
|
|
3437
|
+
returnQuantity = _ref28$returnQuantity === undefined ? 0 : _ref28$returnQuantity;
|
|
3309
3438
|
|
|
3310
3439
|
var quantityPrecision = (0, _tplusPoslogin.PosInitData)("QuantityPrecision");
|
|
3311
3440
|
quantityPrecision = quantityPrecision ? parseInt(quantityPrecision) : '';
|
|
@@ -3322,6 +3451,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3322
3451
|
}
|
|
3323
3452
|
sumQuantity = this.changeDecimalBuZero(sumQuantity, quantityPrecision);
|
|
3324
3453
|
}
|
|
3454
|
+
|
|
3455
|
+
var isNeedPasswordForStoragePay = (0, _tplusPoslogin.PosInitData)('IsNeedPasswordForStoragePay');
|
|
3325
3456
|
return _react2.default.createElement(
|
|
3326
3457
|
'div',
|
|
3327
3458
|
{ className: 'billingSettlement', ref: function ref(r) {
|
|
@@ -3562,6 +3693,14 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3562
3693
|
return _this8.handleChange(index, e);
|
|
3563
3694
|
}
|
|
3564
3695
|
})
|
|
3696
|
+
),
|
|
3697
|
+
!isNeedPasswordForStoragePay && _react2.default.createElement(
|
|
3698
|
+
'div',
|
|
3699
|
+
{ className: 'righticon', style: { display: mode.paymentType == PayStyle.hyczk ? 'inline-block' : 'none' },
|
|
3700
|
+
onClick: function onClick() {
|
|
3701
|
+
_this8.appendCzkmode(boriginReturn, 'noPlaySetPwd');
|
|
3702
|
+
} },
|
|
3703
|
+
_react2.default.createElement(_ticon2.default, { type: 'zengjia', className: 'plus primary-color' })
|
|
3565
3704
|
)
|
|
3566
3705
|
),
|
|
3567
3706
|
mode.paymentType == PayStyle.djq ? _react2.default.createElement(
|
|
@@ -3888,16 +4027,16 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3888
4027
|
className: _index.hotKey.hotKeyNotFilter("paymode hotkey_" + _this8.compoundHotkeysList[hotkeyIndex]),
|
|
3889
4028
|
disabled: _this8.checkModeDisabled(mode.paymentType, brefund, boriginReturn),
|
|
3890
4029
|
onClick: function onClick() {
|
|
3891
|
-
|
|
3892
|
-
if (mode.paymentType === PayStyle.hyczk) {
|
|
3893
|
-
|
|
3894
|
-
|
|
3895
|
-
|
|
3896
|
-
|
|
3897
|
-
|
|
3898
|
-
|
|
3899
|
-
|
|
3900
|
-
|
|
4030
|
+
// let czkinput = document.getElementById('inputS' + index);
|
|
4031
|
+
// if (mode.paymentType === PayStyle.hyczk) {
|
|
4032
|
+
// const { isProhibitMeStorageCard } = this.props;
|
|
4033
|
+
// if (isProhibitMeStorageCard) {
|
|
4034
|
+
// Message.warn('储值卡不可键盘录入,请刷卡!');
|
|
4035
|
+
// return;
|
|
4036
|
+
// }
|
|
4037
|
+
// }
|
|
4038
|
+
// mode.paymentType == PayStyle.hyczk && czkinput && czkinput.value !== '0.00' ? this.editCzkModal() :
|
|
4039
|
+
_this8.onHotKeyClick1(mode, index, boriginReturn);
|
|
3901
4040
|
},
|
|
3902
4041
|
value: mode.paymentType == PayStyle.hyczk ? (0, _utils.getFixedNumber)((0, _reduce3.default)((0, _filter3.default)(thePaymodes, function (tm) {
|
|
3903
4042
|
return tm.paymentType == PayStyle.hyczk;
|
|
@@ -4151,6 +4290,14 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4151
4290
|
return _this8.onFocusHack(index, mode, paymode, e);
|
|
4152
4291
|
}
|
|
4153
4292
|
})
|
|
4293
|
+
),
|
|
4294
|
+
!isNeedPasswordForStoragePay && _react2.default.createElement(
|
|
4295
|
+
'div',
|
|
4296
|
+
{ className: 'righticon', style: { display: mode.paymentType == PayStyle.hyczk ? 'inline-block' : 'none' },
|
|
4297
|
+
onClick: function onClick() {
|
|
4298
|
+
_this8.appendCzkmode('', 'noPlaySetPwd');
|
|
4299
|
+
} },
|
|
4300
|
+
_react2.default.createElement(_ticon2.default, { type: 'zengjia', className: 'plus primary-color' })
|
|
4154
4301
|
)
|
|
4155
4302
|
),
|
|
4156
4303
|
mode.paymentType == PayStyle.djq ? _react2.default.createElement(
|
|
@@ -4598,12 +4745,12 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4598
4745
|
type: 'text',
|
|
4599
4746
|
placeholder: '\u8BF7\u626B\u63CF\u6216\u8F93\u5165\u4F59\u989D\u5361'
|
|
4600
4747
|
// disabled={currentMode && !currentMode.member.StorageCardNo && isReturn ? true: false}
|
|
4601
|
-
,
|
|
4602
|
-
className: 'input ' + (this.hasElectron === true && this.iCCardServer === 1 || this.isHorizontalPad === true ? 'temp' : ''),
|
|
4748
|
+
, className: 'input ' + (this.hasElectron === true && this.iCCardServer === 1 || this.isHorizontalPad === true ? 'temp' : ''),
|
|
4603
4749
|
onChange: function onChange(e) {
|
|
4604
4750
|
return _this8.onCzkChange(e.target.value);
|
|
4605
4751
|
},
|
|
4606
|
-
|
|
4752
|
+
defaultValue: isNewRetailBCPos ? currentMode && currentMode.member.StorageCardNo : currentMode && currentMode.member.cardNo,
|
|
4753
|
+
value: this.state.czkValue,
|
|
4607
4754
|
ref: function ref(input) {
|
|
4608
4755
|
return _this8.czkInput = input;
|
|
4609
4756
|
},
|
|
@@ -4648,7 +4795,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4648
4795
|
),
|
|
4649
4796
|
_react2.default.createElement(
|
|
4650
4797
|
'div',
|
|
4651
|
-
{ className: 'received' },
|
|
4798
|
+
{ className: 'received receivedNumber' },
|
|
4652
4799
|
_react2.default.createElement(
|
|
4653
4800
|
'span',
|
|
4654
4801
|
null,
|
|
@@ -4661,12 +4808,13 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4661
4808
|
id: 'paymentAmount',
|
|
4662
4809
|
type: 'text',
|
|
4663
4810
|
className: _index.hotKey.hotKeyNotFilter('input'),
|
|
4811
|
+
value: storageValue,
|
|
4664
4812
|
onChange: function onChange(event) {
|
|
4665
4813
|
_this8.setCurrentModeValue(event.target.value, Math.min(currentMode.maxamount, currentMode.member.balance));
|
|
4666
4814
|
},
|
|
4667
4815
|
defaultValue: currentMode && (0, _utils.getFixedNumber)(brefund ? currentMode.value : Math.min(currentMode.value, currentMode.maxamount, currentMode.member.balance)),
|
|
4668
|
-
ref: function ref(
|
|
4669
|
-
return _this8["inputCzkAmount"] =
|
|
4816
|
+
ref: function ref(_ref29) {
|
|
4817
|
+
return _this8["inputCzkAmount"] = _ref29;
|
|
4670
4818
|
},
|
|
4671
4819
|
onFocus: function onFocus(e) {
|
|
4672
4820
|
_this8.inputkey = "inputCzkAmount";
|
|
@@ -4676,11 +4824,6 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4676
4824
|
}, _this8.keyboardOnOk, _this8.keyboardOnClose)();
|
|
4677
4825
|
},
|
|
4678
4826
|
onBlur: function onBlur(e) {
|
|
4679
|
-
var sMember = _this8.store.member;
|
|
4680
|
-
if (!sMember.StorageCardEnable) {
|
|
4681
|
-
_message2.default.warn("该储值卡已停用");
|
|
4682
|
-
return;
|
|
4683
|
-
}
|
|
4684
4827
|
_keyboard2.default.close();
|
|
4685
4828
|
_this8.setCurrentModeValue((0, _utils.getFixedNumber)(_this8.inputCzkAmount.input.value), Math.min(currentMode.maxamount, currentMode.member.balance));
|
|
4686
4829
|
}
|
|
@@ -4820,6 +4963,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4820
4963
|
visible: this.state.djqVisible,
|
|
4821
4964
|
maskClosable: false,
|
|
4822
4965
|
onOk: this.handleDjqOk,
|
|
4966
|
+
destroyOnClose: true,
|
|
4823
4967
|
onCancel: this.handleDjqCancel,
|
|
4824
4968
|
centered: !this.isHorizontalPad ? true : false,
|
|
4825
4969
|
title: Differentiate.COUPON + '支付',
|
|
@@ -4859,7 +5003,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4859
5003
|
_react2.default.createElement(_input2.default, {
|
|
4860
5004
|
type: 'text',
|
|
4861
5005
|
placeholder: '\u626B\u63CF/\u8F93\u5165' + Differentiate.COUPON + '\u53F7\u5E76\u56DE\u8F66',
|
|
4862
|
-
className: 'input'
|
|
5006
|
+
className: 'input',
|
|
5007
|
+
id: 'djqInput'
|
|
4863
5008
|
// onChange={this.onDjqChange}
|
|
4864
5009
|
// value={currentMode && currentMode.member.cardNo}
|
|
4865
5010
|
, ref: function ref(input) {
|
|
@@ -4878,7 +5023,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4878
5023
|
}, _this8.djqKeyboardOnOk, _this8.djqKeyboardOnClose)();
|
|
4879
5024
|
},
|
|
4880
5025
|
onBlur: function onBlur(e) {
|
|
4881
|
-
_keyboard2.default.close();
|
|
5026
|
+
_keyboard2.default.close();_this8.inputdjq.input.value = '';
|
|
4882
5027
|
}
|
|
4883
5028
|
})
|
|
4884
5029
|
),
|
|
@@ -4888,6 +5033,25 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4888
5033
|
currentMode && currentMode.errinfo
|
|
4889
5034
|
)
|
|
4890
5035
|
),
|
|
5036
|
+
_react2.default.createElement(
|
|
5037
|
+
'div',
|
|
5038
|
+
{ className: 'col4' },
|
|
5039
|
+
_react2.default.createElement(
|
|
5040
|
+
_button2.default,
|
|
5041
|
+
{ className: '' + (this.state.couponLight ? "primary-color b-theme" : 'couponBorder'), onClick: this.couponClick },
|
|
5042
|
+
'\u53EF\u7528\u4F18\u60E0\u5238'
|
|
5043
|
+
),
|
|
5044
|
+
_react2.default.createElement(
|
|
5045
|
+
_button2.default,
|
|
5046
|
+
{ className: '' + (!this.state.couponLight ? "primary-color b-theme" : 'couponBorder'), onClick: this.couponClick },
|
|
5047
|
+
'\u4E0D\u53EF\u7528\u4F18\u60E0\u5238'
|
|
5048
|
+
),
|
|
5049
|
+
_react2.default.createElement(
|
|
5050
|
+
'span',
|
|
5051
|
+
{ className: 'couponTip' },
|
|
5052
|
+
'\u9009\u62E9\u5238\u540E\u3001\u4E0D\u53EF\u53E0\u52A0\u3001\u91D1\u989D\u4E0D\u6EE1\u8DB3\u7684\u5238\u4F1A\u7F6E\u7070'
|
|
5053
|
+
)
|
|
5054
|
+
),
|
|
4891
5055
|
this.isHorizontalPad && _react2.default.createElement(
|
|
4892
5056
|
'div',
|
|
4893
5057
|
{ className: 'col3' },
|
|
@@ -4904,12 +5068,18 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4904
5068
|
'div',
|
|
4905
5069
|
{ className: 'djq2' },
|
|
4906
5070
|
(0, _map3.default)(currentMode && currentMode.djqs || [], function (q, index) {
|
|
5071
|
+
if (!_this8.state.couponLight && !q.count) {
|
|
5072
|
+
return;
|
|
5073
|
+
}
|
|
5074
|
+
if (_this8.state.couponLight && q.count && q.count === 1) {
|
|
5075
|
+
return;
|
|
5076
|
+
}
|
|
4907
5077
|
return _react2.default.createElement(
|
|
4908
5078
|
'div',
|
|
4909
5079
|
{ key: index + '', className: 'djqItem' },
|
|
4910
5080
|
!q.promoMethodEnum || q.promoMethodEnum == 'CASH_COUPON' ? _react2.default.createElement(
|
|
4911
5081
|
'div',
|
|
4912
|
-
{ className: 'djqLeft djqLeftCash' },
|
|
5082
|
+
{ className: 'djqLeft ' + (q.IsEnable ? 'djqLeftCash' : 'djqLeftCashGrey') },
|
|
4913
5083
|
_react2.default.createElement(
|
|
4914
5084
|
'div',
|
|
4915
5085
|
{ className: 'amount' },
|
|
@@ -4931,7 +5101,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4931
5101
|
)
|
|
4932
5102
|
) : _react2.default.createElement(
|
|
4933
5103
|
'div',
|
|
4934
|
-
{ className: 'djqLeft
|
|
5104
|
+
{ className: 'djqLeft ' + (q.IsEnable ? 'djqLeftCash' : 'djqLeftCashGrey') },
|
|
4935
5105
|
_react2.default.createElement(
|
|
4936
5106
|
'div',
|
|
4937
5107
|
{ className: 'amount' },
|
|
@@ -4955,9 +5125,14 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4955
5125
|
_react2.default.createElement(
|
|
4956
5126
|
'div',
|
|
4957
5127
|
{ className: (0, _classnames4.default)('djqRight', { 'djqRightSelected': q.checked }), onClick: function onClick(e) {
|
|
4958
|
-
return _this8.djqChecked(q);
|
|
5128
|
+
return q.IsEnable ? _this8.djqChecked(q, _this8.props.dto) : null;
|
|
4959
5129
|
} },
|
|
4960
|
-
_react2.default.createElement(
|
|
5130
|
+
q.checked ? _react2.default.createElement(_ticon2.default, { className: 'checkIcon primary-color', type: 'xuanzhong1' }) : _react2.default.createElement('span', { className: '' + (q.IsEnable ? 'noxuanzhong' : 'noxuanzhong1') }),
|
|
5131
|
+
q.checked ? _react2.default.createElement(
|
|
5132
|
+
'div',
|
|
5133
|
+
{ className: 'name overflow-hidden-point primary-color' },
|
|
5134
|
+
q.name
|
|
5135
|
+
) : _react2.default.createElement(
|
|
4961
5136
|
'div',
|
|
4962
5137
|
{ className: 'name overflow-hidden-point' },
|
|
4963
5138
|
q.name
|
|
@@ -5256,8 +5431,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
5256
5431
|
_this8.setCurrentModeValue(e.target.value, Math.min(currentMode.maxamount, currentMode.member.exchangable));
|
|
5257
5432
|
},
|
|
5258
5433
|
defaultValue: currentMode && (0, _utils.getFixedNumber)(Math.min(currentMode.value, currentMode.maxamount, currentMode.member.exchangable)),
|
|
5259
|
-
ref: function ref(
|
|
5260
|
-
return _this8["inputJfdxAmount"] =
|
|
5434
|
+
ref: function ref(_ref30) {
|
|
5435
|
+
return _this8["inputJfdxAmount"] = _ref30;
|
|
5261
5436
|
},
|
|
5262
5437
|
onFocus: function onFocus(e) {
|
|
5263
5438
|
_this8.inputkey = "inputJfdxAmount";
|