tplus-components-touch 3.22.6 → 3.22.10
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/cloudPrint/index.js +77 -93
- package/dist/components/cloudPrint/index.js.map +1 -1
- package/dist/components/settlement/settlement.js +90 -56
- package/dist/components/settlement/settlement.js.map +1 -1
- package/dist/components/settlement/settlement.less +4 -4
- package/dist/components/settlement/settlementStore.js +99 -86
- package/dist/components/settlement/settlementStore.js.map +1 -1
- package/package.json +1 -1
|
@@ -251,7 +251,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
251
251
|
discountPrototypeTotalAmount: null,
|
|
252
252
|
bquick: false,
|
|
253
253
|
currentKey: null,
|
|
254
|
-
couponLight: true
|
|
254
|
+
couponLight: true,
|
|
255
|
+
storageValue: '0.00' };
|
|
255
256
|
_this2.compoundHotkeysList = (window.$.operationControl[5] ? window.$.operationControl[5].control || [] : []).map(function (key) {
|
|
256
257
|
return key.toLocaleUpperCase();
|
|
257
258
|
});
|
|
@@ -1180,6 +1181,40 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1180
1181
|
};
|
|
1181
1182
|
|
|
1182
1183
|
_this2.setCurrentModeValue = function (val, max) {
|
|
1184
|
+
var _enumController$getEn13 = _mutantsUtil.enumController.getEnumOj(),
|
|
1185
|
+
PayStyle = _enumController$getEn13.PayStyle;
|
|
1186
|
+
|
|
1187
|
+
var reg = /^[\d.]+$/g;
|
|
1188
|
+
if (_this2.store.paymode.currentMode.paymentType === PayStyle.hyczk) {
|
|
1189
|
+
if (!val) {
|
|
1190
|
+
_this2.setState({
|
|
1191
|
+
storageValue: val
|
|
1192
|
+
});
|
|
1193
|
+
} else {
|
|
1194
|
+
if (!reg.test(val)) {
|
|
1195
|
+
return;
|
|
1196
|
+
} else {
|
|
1197
|
+
var value1 = val.split('.');
|
|
1198
|
+
if (value1.length > 1) {
|
|
1199
|
+
if (value1[1].length < 3) {
|
|
1200
|
+
_this2.setState({
|
|
1201
|
+
storageValue: val
|
|
1202
|
+
});
|
|
1203
|
+
} else {
|
|
1204
|
+
return;
|
|
1205
|
+
}
|
|
1206
|
+
} else {
|
|
1207
|
+
if (val.length > 9) {
|
|
1208
|
+
return;
|
|
1209
|
+
} else {
|
|
1210
|
+
_this2.setState({
|
|
1211
|
+
storageValue: val
|
|
1212
|
+
});
|
|
1213
|
+
}
|
|
1214
|
+
}
|
|
1215
|
+
}
|
|
1216
|
+
}
|
|
1217
|
+
}
|
|
1183
1218
|
// let bjfdx=this.store.paymode.currentMode.paymentType==PayStyle.jfdx;
|
|
1184
1219
|
var value = val;
|
|
1185
1220
|
var amountMaxLength = parseInt(_this2.props.initData["AmountMaxLength"] || 10);
|
|
@@ -1222,8 +1257,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1222
1257
|
};
|
|
1223
1258
|
|
|
1224
1259
|
_this2.appendCzkmode = function (boriginReturn, params) {
|
|
1225
|
-
var _enumController$
|
|
1226
|
-
PayStyle = _enumController$
|
|
1260
|
+
var _enumController$getEn14 = _mutantsUtil.enumController.getEnumOj(),
|
|
1261
|
+
PayStyle = _enumController$getEn14.PayStyle;
|
|
1227
1262
|
|
|
1228
1263
|
if (boriginReturn) {
|
|
1229
1264
|
_message2.default.info('原单退货时不可以使用非原单的储值卡结算方式。');
|
|
@@ -1244,8 +1279,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1244
1279
|
};
|
|
1245
1280
|
|
|
1246
1281
|
_this2.djqChecked = function (q, dto) {
|
|
1247
|
-
var _enumController$
|
|
1248
|
-
Differentiate = _enumController$
|
|
1282
|
+
var _enumController$getEn15 = _mutantsUtil.enumController.getEnumOj(),
|
|
1283
|
+
Differentiate = _enumController$getEn15.Differentiate;
|
|
1249
1284
|
|
|
1250
1285
|
if (_this2.store.paymode.currentMode.boriginReturn) {
|
|
1251
1286
|
_message2.default.info('\u539F\u5355\u9000\u8D27\u65F6' + Differentiate.COUPON + '\u4E0D\u53EF\u4EE5\u53D6\u6D88\u3002');
|
|
@@ -1326,8 +1361,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1326
1361
|
};
|
|
1327
1362
|
|
|
1328
1363
|
_this2.onHotKeyClickModal = function (mode, index, boriginReturn) {
|
|
1329
|
-
var _enumController$
|
|
1330
|
-
PayStyle = _enumController$
|
|
1364
|
+
var _enumController$getEn16 = _mutantsUtil.enumController.getEnumOj(),
|
|
1365
|
+
PayStyle = _enumController$getEn16.PayStyle;
|
|
1331
1366
|
|
|
1332
1367
|
var brefund = _this2.store.brefund;
|
|
1333
1368
|
|
|
@@ -1412,8 +1447,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1412
1447
|
};
|
|
1413
1448
|
|
|
1414
1449
|
_this2.setFocusAndSelectionMode = function (thePaymodes, currentIndex) {
|
|
1415
|
-
var _enumController$
|
|
1416
|
-
PayStyle = _enumController$
|
|
1450
|
+
var _enumController$getEn17 = _mutantsUtil.enumController.getEnumOj(),
|
|
1451
|
+
PayStyle = _enumController$getEn17.PayStyle;
|
|
1417
1452
|
|
|
1418
1453
|
var displayPayModeList = [].concat((0, _toConsumableArray3.default)(thePaymodes));
|
|
1419
1454
|
// 复制支付方式列表
|
|
@@ -1436,8 +1471,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1436
1471
|
};
|
|
1437
1472
|
|
|
1438
1473
|
_this2.findModlePayBySplice = function (thePaymodes, currenIndex, symbol) {
|
|
1439
|
-
var _enumController$
|
|
1440
|
-
PayStyle = _enumController$
|
|
1474
|
+
var _enumController$getEn18 = _mutantsUtil.enumController.getEnumOj(),
|
|
1475
|
+
PayStyle = _enumController$getEn18.PayStyle;
|
|
1441
1476
|
|
|
1442
1477
|
var findIndex = currenIndex;
|
|
1443
1478
|
var endCurrentMode = thePaymodes.find(function (mode, index) {
|
|
@@ -1574,14 +1609,14 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1574
1609
|
};
|
|
1575
1610
|
|
|
1576
1611
|
_this2.settleSuccess = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee5() {
|
|
1577
|
-
var _enumController$
|
|
1612
|
+
var _enumController$getEn19, PayStyle, _this2$store$paymode, amount, received, thePaymodes, IdbusiType, charge, openCashBox, _this, showTwoScreen, getSettleGift, type, resp1;
|
|
1578
1613
|
|
|
1579
1614
|
return _regenerator2.default.wrap(function _callee5$(_context5) {
|
|
1580
1615
|
while (1) {
|
|
1581
1616
|
switch (_context5.prev = _context5.next) {
|
|
1582
1617
|
case 0:
|
|
1583
1618
|
//提示成功
|
|
1584
|
-
_enumController$
|
|
1619
|
+
_enumController$getEn19 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn19.PayStyle;
|
|
1585
1620
|
_this2$store$paymode = _this2.store.paymode, amount = _this2$store$paymode.amount, received = _this2$store$paymode.received, thePaymodes = _this2$store$paymode.thePaymodes;
|
|
1586
1621
|
IdbusiType = _this2.store.dto.IdbusiType;
|
|
1587
1622
|
charge = _this2.store.paymode.charge;
|
|
@@ -1840,7 +1875,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1840
1875
|
};
|
|
1841
1876
|
}();
|
|
1842
1877
|
|
|
1843
|
-
var _enumController$
|
|
1878
|
+
var _enumController$getEn20, PayStyle, _this2$store6, paymode, brefund, boriginReturn, newStyle, isQuickPay, that, status, zeromode, promises, thePaymodes, quickmode, commit;
|
|
1844
1879
|
|
|
1845
1880
|
return _regenerator2.default.wrap(function _callee8$(_context8) {
|
|
1846
1881
|
while (1) {
|
|
@@ -1860,7 +1895,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1860
1895
|
// }
|
|
1861
1896
|
//
|
|
1862
1897
|
// testAsync(p);
|
|
1863
|
-
_enumController$
|
|
1898
|
+
_enumController$getEn20 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn20.PayStyle;
|
|
1864
1899
|
_this2$store6 = _this2.store, paymode = _this2$store6.paymode, brefund = _this2$store6.brefund, boriginReturn = _this2$store6.boriginReturn, newStyle = _this2$store6.newStyle;
|
|
1865
1900
|
isQuickPay = args === 'quickPay';
|
|
1866
1901
|
that = _this2;
|
|
@@ -2135,7 +2170,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2135
2170
|
};
|
|
2136
2171
|
}();
|
|
2137
2172
|
|
|
2138
|
-
var that, curmode, promises, _ref17, isNewRetailBCPos, _enumController$
|
|
2173
|
+
var that, curmode, promises, _ref17, isNewRetailBCPos, _enumController$getEn21, PayStyle, isNeedPasswordForStoragePay, commit;
|
|
2139
2174
|
|
|
2140
2175
|
return _regenerator2.default.wrap(function _callee11$(_context11) {
|
|
2141
2176
|
while (1) {
|
|
@@ -2148,7 +2183,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2148
2183
|
|
|
2149
2184
|
if (isNewRetailBCPos) {
|
|
2150
2185
|
if (curmode.value > 0) {
|
|
2151
|
-
_enumController$
|
|
2186
|
+
_enumController$getEn21 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn21.PayStyle;
|
|
2152
2187
|
|
|
2153
2188
|
if (curmode.paymentType === PayStyle.hyczk) {
|
|
2154
2189
|
isNeedPasswordForStoragePay = (0, _tplusPoslogin.PosInitData)('IsNeedPasswordForStoragePay');
|
|
@@ -2424,8 +2459,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2424
2459
|
bquick: bquick
|
|
2425
2460
|
});
|
|
2426
2461
|
|
|
2427
|
-
var _enumController$
|
|
2428
|
-
PayStyle = _enumController$
|
|
2462
|
+
var _enumController$getEn22 = _mutantsUtil.enumController.getEnumOj(),
|
|
2463
|
+
PayStyle = _enumController$getEn22.PayStyle;
|
|
2429
2464
|
|
|
2430
2465
|
var _this2$store7 = _this2.store,
|
|
2431
2466
|
paymode = _this2$store7.paymode,
|
|
@@ -2524,8 +2559,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2524
2559
|
};
|
|
2525
2560
|
|
|
2526
2561
|
_this2.checkCharge = function () {
|
|
2527
|
-
var _enumController$
|
|
2528
|
-
PayStyle = _enumController$
|
|
2562
|
+
var _enumController$getEn23 = _mutantsUtil.enumController.getEnumOj(),
|
|
2563
|
+
PayStyle = _enumController$getEn23.PayStyle;
|
|
2529
2564
|
|
|
2530
2565
|
var paymode = _this2.store.paymode;
|
|
2531
2566
|
|
|
@@ -2572,8 +2607,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2572
2607
|
};
|
|
2573
2608
|
|
|
2574
2609
|
_this2.getXianjinPayment = function (payType, value) {
|
|
2575
|
-
var _enumController$
|
|
2576
|
-
PayStyle = _enumController$
|
|
2610
|
+
var _enumController$getEn24 = _mutantsUtil.enumController.getEnumOj(),
|
|
2611
|
+
PayStyle = _enumController$getEn24.PayStyle;
|
|
2577
2612
|
|
|
2578
2613
|
var isManualIntoAmount = _this2.state.isManualIntoAmount;
|
|
2579
2614
|
|
|
@@ -2581,8 +2616,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2581
2616
|
};
|
|
2582
2617
|
|
|
2583
2618
|
_this2.getXianjinBalance = function (payType, value) {
|
|
2584
|
-
var _enumController$
|
|
2585
|
-
PayStyle = _enumController$
|
|
2619
|
+
var _enumController$getEn25 = _mutantsUtil.enumController.getEnumOj(),
|
|
2620
|
+
PayStyle = _enumController$getEn25.PayStyle;
|
|
2586
2621
|
//找零金额-存在权限控制
|
|
2587
2622
|
|
|
2588
2623
|
|
|
@@ -2602,9 +2637,9 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2602
2637
|
var isManualIntoAmount = void 0;
|
|
2603
2638
|
// 付款弹窗
|
|
2604
2639
|
return new _promise2.default(function (resolve, reject) {
|
|
2605
|
-
var _enumController$
|
|
2606
|
-
PayStyle = _enumController$
|
|
2607
|
-
PayIcon2 = _enumController$
|
|
2640
|
+
var _enumController$getEn26 = _mutantsUtil.enumController.getEnumOj(),
|
|
2641
|
+
PayStyle = _enumController$getEn26.PayStyle,
|
|
2642
|
+
PayIcon2 = _enumController$getEn26.PayIcon2;
|
|
2608
2643
|
|
|
2609
2644
|
var modal = (0, _asyncModal2.default)({
|
|
2610
2645
|
onPressEnter: function onPressEnter() {
|
|
@@ -2873,8 +2908,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2873
2908
|
paymode = _this2$store8.paymode,
|
|
2874
2909
|
newStyle = _this2$store8.newStyle;
|
|
2875
2910
|
|
|
2876
|
-
var _enumController$
|
|
2877
|
-
PayStyle = _enumController$
|
|
2911
|
+
var _enumController$getEn27 = _mutantsUtil.enumController.getEnumOj(),
|
|
2912
|
+
PayStyle = _enumController$getEn27.PayStyle;
|
|
2878
2913
|
|
|
2879
2914
|
var payTypeList = [PayStyle.SQBPAY, PayStyle.CSYH, PayStyle.smzf];
|
|
2880
2915
|
var payTypeFilterList = payTypeList.filter(function (filterType) {
|
|
@@ -2895,15 +2930,15 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2895
2930
|
};
|
|
2896
2931
|
|
|
2897
2932
|
_this2.checkModeDisabled = function (type, brefund, boriginReturn) {
|
|
2898
|
-
var _enumController$
|
|
2899
|
-
PayStyle = _enumController$
|
|
2933
|
+
var _enumController$getEn28 = _mutantsUtil.enumController.getEnumOj(),
|
|
2934
|
+
PayStyle = _enumController$getEn28.PayStyle;
|
|
2900
2935
|
|
|
2901
2936
|
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);
|
|
2902
2937
|
};
|
|
2903
2938
|
|
|
2904
2939
|
_this2.checkSettleDisabled = function (paymode, thePaymodes) {
|
|
2905
|
-
var _enumController$
|
|
2906
|
-
PayStyle = _enumController$
|
|
2940
|
+
var _enumController$getEn29 = _mutantsUtil.enumController.getEnumOj(),
|
|
2941
|
+
PayStyle = _enumController$getEn29.PayStyle;
|
|
2907
2942
|
|
|
2908
2943
|
console.log("settlement.checkSettleDisabled开始执行,参数:", { paymode: paymode, thePaymodes: thePaymodes });
|
|
2909
2944
|
if (paymode.amount == 0 && paymode.received == 0) {
|
|
@@ -2949,8 +2984,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2949
2984
|
};
|
|
2950
2985
|
|
|
2951
2986
|
_this2.editCzkModal = function () {
|
|
2952
|
-
var _enumController$
|
|
2953
|
-
PayStyle = _enumController$
|
|
2987
|
+
var _enumController$getEn30 = _mutantsUtil.enumController.getEnumOj(),
|
|
2988
|
+
PayStyle = _enumController$getEn30.PayStyle;
|
|
2954
2989
|
|
|
2955
2990
|
(0, _find3.default)(_this2.store.paymode.thePaymodes, function (mode) {
|
|
2956
2991
|
if (mode.paymentType == PayStyle.hyczk) {
|
|
@@ -3204,9 +3239,9 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3204
3239
|
value: function renderToolbtn(mode, index) {
|
|
3205
3240
|
var _this7 = this;
|
|
3206
3241
|
|
|
3207
|
-
var _enumController$
|
|
3208
|
-
PayIcon = _enumController$
|
|
3209
|
-
PayStyle = _enumController$
|
|
3242
|
+
var _enumController$getEn31 = _mutantsUtil.enumController.getEnumOj(),
|
|
3243
|
+
PayIcon = _enumController$getEn31.PayIcon,
|
|
3244
|
+
PayStyle = _enumController$getEn31.PayStyle;
|
|
3210
3245
|
|
|
3211
3246
|
var isReturn = this.props.isReturn;
|
|
3212
3247
|
var _store = this.store,
|
|
@@ -3278,18 +3313,19 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3278
3313
|
value: function render() {
|
|
3279
3314
|
var _this8 = this;
|
|
3280
3315
|
|
|
3281
|
-
var _enumController$
|
|
3282
|
-
PayIcon = _enumController$
|
|
3283
|
-
PayIcon2 = _enumController$
|
|
3284
|
-
PayStyle = _enumController$
|
|
3285
|
-
Differentiate = _enumController$
|
|
3316
|
+
var _enumController$getEn32 = _mutantsUtil.enumController.getEnumOj(),
|
|
3317
|
+
PayIcon = _enumController$getEn32.PayIcon,
|
|
3318
|
+
PayIcon2 = _enumController$getEn32.PayIcon2,
|
|
3319
|
+
PayStyle = _enumController$getEn32.PayStyle,
|
|
3320
|
+
Differentiate = _enumController$getEn32.Differentiate;
|
|
3286
3321
|
|
|
3287
3322
|
var _state2 = this.state,
|
|
3288
3323
|
btnDissabled = _state2.btnDissabled,
|
|
3289
3324
|
dataSource = _state2.dataSource,
|
|
3290
3325
|
discountTotalAmount = _state2.discountTotalAmount,
|
|
3291
3326
|
discountRetailTotalAount = _state2.discountRetailTotalAount,
|
|
3292
|
-
discountPrototypeTotalAmount = _state2.discountPrototypeTotalAmount
|
|
3327
|
+
discountPrototypeTotalAmount = _state2.discountPrototypeTotalAmount,
|
|
3328
|
+
storageValue = _state2.storageValue;
|
|
3293
3329
|
|
|
3294
3330
|
var _ref26 = _mutantsUtil.platform || {},
|
|
3295
3331
|
isNewRetailBCPos = _ref26.isNewRetailBCPos;
|
|
@@ -4728,19 +4764,17 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4728
4764
|
_react2.default.createElement(
|
|
4729
4765
|
'span',
|
|
4730
4766
|
null,
|
|
4731
|
-
_react2.default.createElement(
|
|
4767
|
+
_react2.default.createElement(_input2.default, {
|
|
4732
4768
|
id: 'paymentAmount',
|
|
4733
|
-
className: _index.hotKey.hotKeyNotFilter('input') + ' receivedInput',
|
|
4734
4769
|
type: 'text',
|
|
4735
|
-
|
|
4736
|
-
|
|
4737
|
-
|
|
4770
|
+
className: _index.hotKey.hotKeyNotFilter('input'),
|
|
4771
|
+
value: storageValue,
|
|
4772
|
+
onChange: function onChange(event) {
|
|
4773
|
+
_this8.setCurrentModeValue(event.target.value, Math.min(currentMode.maxamount, currentMode.member.balance));
|
|
4738
4774
|
},
|
|
4739
4775
|
defaultValue: currentMode && (0, _utils.getFixedNumber)(brefund ? currentMode.value : Math.min(currentMode.value, currentMode.maxamount, currentMode.member.balance)),
|
|
4740
|
-
|
|
4741
|
-
|
|
4742
|
-
ref: function ref(input) {
|
|
4743
|
-
return _this8.inputCzkAmount = input;
|
|
4776
|
+
ref: function ref(_ref28) {
|
|
4777
|
+
return _this8["inputCzkAmount"] = _ref28;
|
|
4744
4778
|
},
|
|
4745
4779
|
onFocus: function onFocus(e) {
|
|
4746
4780
|
_this8.inputkey = "inputCzkAmount";
|
|
@@ -5357,8 +5391,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
5357
5391
|
_this8.setCurrentModeValue(e.target.value, Math.min(currentMode.maxamount, currentMode.member.exchangable));
|
|
5358
5392
|
},
|
|
5359
5393
|
defaultValue: currentMode && (0, _utils.getFixedNumber)(Math.min(currentMode.value, currentMode.maxamount, currentMode.member.exchangable)),
|
|
5360
|
-
ref: function ref(
|
|
5361
|
-
return _this8["inputJfdxAmount"] =
|
|
5394
|
+
ref: function ref(_ref29) {
|
|
5395
|
+
return _this8["inputJfdxAmount"] = _ref29;
|
|
5362
5396
|
},
|
|
5363
5397
|
onFocus: function onFocus(e) {
|
|
5364
5398
|
_this8.inputkey = "inputJfdxAmount";
|