tplus-components-touch 3.27.19 → 3.27.23
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.
|
@@ -996,7 +996,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
996
996
|
}
|
|
997
997
|
};
|
|
998
998
|
|
|
999
|
-
_this2.onTabsClick2 = function (paymode, brefund, themode, key) {
|
|
999
|
+
_this2.onTabsClick2 = function (paymode, brefund, themode, key, bookType) {
|
|
1000
1000
|
var _enumController$getEn7 = _mutantsUtil.enumController.getEnumOj(),
|
|
1001
1001
|
PayStyle = _enumController$getEn7.PayStyle,
|
|
1002
1002
|
Differentiate = _enumController$getEn7.Differentiate;
|
|
@@ -1025,7 +1025,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1025
1025
|
})) {
|
|
1026
1026
|
_message2.default.error('已使用了其他的付款码支付,不可以再使用微信了。');
|
|
1027
1027
|
} else {
|
|
1028
|
-
_this2.setCurrentFocusAndAddPay(key);
|
|
1028
|
+
_this2.setCurrentFocusAndAddPay(key, bookType);
|
|
1029
1029
|
}
|
|
1030
1030
|
break;
|
|
1031
1031
|
case PayStyle.zfb:
|
|
@@ -1034,7 +1034,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1034
1034
|
})) {
|
|
1035
1035
|
_message2.default.error('已使用了其他的付款码支付,不可以再使用支付宝了。');
|
|
1036
1036
|
} else {
|
|
1037
|
-
_this2.setCurrentFocusAndAddPay(key);
|
|
1037
|
+
_this2.setCurrentFocusAndAddPay(key, bookType);
|
|
1038
1038
|
}
|
|
1039
1039
|
break;
|
|
1040
1040
|
case PayStyle.smzf:
|
|
@@ -1043,11 +1043,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1043
1043
|
})) {
|
|
1044
1044
|
_message2.default.error('已使用了其他的付款码支付,不可以再使用扫码支付了。');
|
|
1045
1045
|
} else {
|
|
1046
|
-
_this2.setCurrentFocusAndAddPay(key);
|
|
1046
|
+
_this2.setCurrentFocusAndAddPay(key, bookType);
|
|
1047
1047
|
}
|
|
1048
1048
|
break;
|
|
1049
1049
|
default:
|
|
1050
|
-
_this2.setCurrentFocusAndAddPay(key);
|
|
1050
|
+
_this2.setCurrentFocusAndAddPay(key, bookType);
|
|
1051
1051
|
break;
|
|
1052
1052
|
}
|
|
1053
1053
|
};
|
|
@@ -1090,7 +1090,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1090
1090
|
return bdisabled;
|
|
1091
1091
|
};
|
|
1092
1092
|
|
|
1093
|
-
_this2.onTabsClick = function (key) {
|
|
1093
|
+
_this2.onTabsClick = function (key, bookType) {
|
|
1094
1094
|
var _enumController$getEn9 = _mutantsUtil.enumController.getEnumOj(),
|
|
1095
1095
|
PayStyle = _enumController$getEn9.PayStyle,
|
|
1096
1096
|
Differentiate = _enumController$getEn9.Differentiate;
|
|
@@ -1120,6 +1120,10 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1120
1120
|
return;
|
|
1121
1121
|
}
|
|
1122
1122
|
var themode = (0, _find3.default)(paymode.paymodes, { 'paymentType': key });
|
|
1123
|
+
//预订非全款不可使用零售抵现类支付方式
|
|
1124
|
+
if (bookType == 'bookPay' && _this2.store.paymode.isNotFullBook && themode.virtualPay) {
|
|
1125
|
+
return _message2.default.error("付订金时不可使用零售抵现类结算方式!");
|
|
1126
|
+
}
|
|
1123
1127
|
if (themode.exchangeRate != 1) {
|
|
1124
1128
|
var forign = (0, _find3.default)(paymode.thePaymodes, function (mode) {
|
|
1125
1129
|
return mode.exchangeRate != 1 && mode.paymentType != key;
|
|
@@ -1150,17 +1154,17 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1150
1154
|
that.setState({
|
|
1151
1155
|
noAlreadyWarn: false
|
|
1152
1156
|
});
|
|
1153
|
-
that.onTabsClick2(paymode, brefund, themode, key);
|
|
1157
|
+
that.onTabsClick2(paymode, brefund, themode, key, bookType);
|
|
1154
1158
|
},
|
|
1155
1159
|
onCancel: function onCancel() {}
|
|
1156
|
-
}) : that.onTabsClick2(paymode, brefund, themode, key)
|
|
1160
|
+
}) : that.onTabsClick2(paymode, brefund, themode, key, bookType);
|
|
1157
1161
|
break;
|
|
1158
1162
|
default:
|
|
1159
|
-
_this2.onTabsClick2(paymode, brefund, themode, key);
|
|
1163
|
+
_this2.onTabsClick2(paymode, brefund, themode, key, bookType);
|
|
1160
1164
|
break;
|
|
1161
1165
|
}
|
|
1162
1166
|
} else {
|
|
1163
|
-
_this2.onTabsClick2(paymode, brefund, themode, key);
|
|
1167
|
+
_this2.onTabsClick2(paymode, brefund, themode, key, bookType);
|
|
1164
1168
|
}
|
|
1165
1169
|
};
|
|
1166
1170
|
|
|
@@ -1183,8 +1187,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1183
1187
|
}
|
|
1184
1188
|
};
|
|
1185
1189
|
|
|
1186
|
-
_this2.setCurrentFocusAndAddPay = function (key) {
|
|
1187
|
-
_this2.store.changeFocusAndAddPay(key);
|
|
1190
|
+
_this2.setCurrentFocusAndAddPay = function (key, bookType) {
|
|
1191
|
+
_this2.store.changeFocusAndAddPay(key, bookType);
|
|
1188
1192
|
if (_this2.store.bquick) {
|
|
1189
1193
|
_this2.handleSettle("quickPay");
|
|
1190
1194
|
} else {
|
|
@@ -1192,24 +1196,28 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1192
1196
|
}
|
|
1193
1197
|
};
|
|
1194
1198
|
|
|
1195
|
-
_this2.onDelPay = function (index, boriginReturn, type) {
|
|
1199
|
+
_this2.onDelPay = function (index, boriginReturn, type, bookType) {
|
|
1196
1200
|
var _enumController$getEn12 = _mutantsUtil.enumController.getEnumOj(),
|
|
1197
1201
|
PayStyle = _enumController$getEn12.PayStyle;
|
|
1198
1202
|
|
|
1199
1203
|
if (boriginReturn && (type == PayStyle.hyczk || type == PayStyle.djq || type == PayStyle.jfdx)) {
|
|
1200
1204
|
_message2.default.info('原单退货时,该结算方式不可以删除。');
|
|
1201
1205
|
} else {
|
|
1202
|
-
_this2.store.delPay(index);
|
|
1206
|
+
_this2.store.delPay(index, bookType);
|
|
1203
1207
|
}
|
|
1204
1208
|
};
|
|
1205
1209
|
|
|
1206
|
-
_this2.handleChange = function (index, e) {
|
|
1210
|
+
_this2.handleChange = function (index, e, type) {
|
|
1207
1211
|
if (!_mutantsMicrofx.stores.offlineSys.shouldSettlement(_this2.store.paymode.currentFocus)) return;
|
|
1212
|
+
var mode = (0, _find3.default)(_this2.store.paymode.thePaymodes, { 'paymethodId': index });
|
|
1213
|
+
if (type == 'bookPay' && _this2.store.paymode.isNotFullBook && mode.virtualPay) {
|
|
1214
|
+
return _message2.default.error("付订金时不可使用零售抵现类结算方式!");
|
|
1215
|
+
}
|
|
1208
1216
|
var currentInput = e.target;
|
|
1209
1217
|
var amountMaxLength = parseInt(_this2.props.initData["AmountMaxLength"] || 10);
|
|
1210
1218
|
if (!isNaN(e.target.value) || e.target.value == '-') {
|
|
1211
1219
|
if (e.target.value.length <= amountMaxLength) {
|
|
1212
|
-
_this2.store.changeValue(index, e.target.value, false);
|
|
1220
|
+
_this2.store.changeValue(index, e.target.value, false, type);
|
|
1213
1221
|
}
|
|
1214
1222
|
}
|
|
1215
1223
|
};
|
|
@@ -1265,10 +1273,10 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1265
1273
|
_this2.store.paymode.setCurrentModeValue(value, max);
|
|
1266
1274
|
};
|
|
1267
1275
|
|
|
1268
|
-
_this2.onBlur = function (index, e) {
|
|
1276
|
+
_this2.onBlur = function (index, e, type) {
|
|
1269
1277
|
_this2.currentInput = null;
|
|
1270
1278
|
_this2.store.changeFocusOnly(-1);
|
|
1271
|
-
_this2.store.changeValue(index, e.target.value == '-' ? 0 : e.target.value, true);
|
|
1279
|
+
_this2.store.changeValue(index, e.target.value == '-' ? 0 : e.target.value, true, type);
|
|
1272
1280
|
};
|
|
1273
1281
|
|
|
1274
1282
|
_this2.onFocus = function (index, mode, paymode, e) {
|
|
@@ -1389,7 +1397,10 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1389
1397
|
}, 2000);
|
|
1390
1398
|
};
|
|
1391
1399
|
|
|
1392
|
-
_this2.onHotKeyClick1 = function (mode, index, boriginReturn) {
|
|
1400
|
+
_this2.onHotKeyClick1 = function (mode, index, boriginReturn, bookType) {
|
|
1401
|
+
if (bookType == 'bookPay' && _this2.store.paymode.isNotFullBook && mode.virtualPay) {
|
|
1402
|
+
return _message2.default.error("付订金时不可使用零售抵现类结算方式!");
|
|
1403
|
+
}
|
|
1393
1404
|
if (!_mutantsMicrofx.stores.offlineSys.shouldSettlement(mode.paymentType)) return false;
|
|
1394
1405
|
if (_this2.hotkeydebouncedPayMode == mode) {
|
|
1395
1406
|
return;
|
|
@@ -1429,11 +1440,14 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1429
1440
|
}
|
|
1430
1441
|
};
|
|
1431
1442
|
|
|
1432
|
-
_this2.onHotKeyClick2 = function (index, mode, paymode, e) {
|
|
1443
|
+
_this2.onHotKeyClick2 = function (index, mode, paymode, e, bookType) {
|
|
1433
1444
|
if (!_mutantsMicrofx.stores.offlineSys.shouldSettlement(mode.paymentType)) return false;
|
|
1434
1445
|
if (_this2.hotkeydebouncedPayMode == mode) {
|
|
1435
1446
|
return;
|
|
1436
1447
|
}
|
|
1448
|
+
if (bookType == 'bookPay' && _this2.store.paymode.isNotFullBook && mode.virtualPay) {
|
|
1449
|
+
return _message2.default.error("付订金时不可使用零售抵现类结算方式!");
|
|
1450
|
+
}
|
|
1437
1451
|
_this2.store.changeClickFocusOnly(mode.paymentType);
|
|
1438
1452
|
_this2.setCurrentFocusOnly(mode.paymentType);
|
|
1439
1453
|
if (_this2.hotkeydebounced) {
|
|
@@ -2682,23 +2696,20 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2682
2696
|
value = parseFloat(receivable) + parseFloat(inputTarget2.innerHTML);
|
|
2683
2697
|
}
|
|
2684
2698
|
inputTarget.value = value;
|
|
2685
|
-
|
|
2686
|
-
|
|
2687
|
-
|
|
2688
|
-
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
|
|
2693
|
-
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
|
|
2698
|
-
|
|
2699
|
-
// } else {
|
|
2700
|
-
inputTarget2.innerHTML = (0, _utils.getFixedNumber)(parseFloat(value || 0) - parseFloat(receivable));
|
|
2701
|
-
// }
|
|
2699
|
+
//预订现金快捷支付,这里修改找零计算,大于应收小于全额金额,不找零,大于全额金额找零
|
|
2700
|
+
if (_this2.store.paymode.isNotFullBook) {
|
|
2701
|
+
if (parseFloat(value || 0) > _this2.store.paymode.bookMaxValue) {
|
|
2702
|
+
inputTarget2.innerHTML = (0, _utils.getFixedNumber)(parseFloat(value || 0) - parseFloat(_this2.store.paymode.bookMaxValue));
|
|
2703
|
+
}
|
|
2704
|
+
if (parseFloat(value || 0) < parseFloat(receivable)) {
|
|
2705
|
+
inputTarget2.innerHTML = (0, _utils.getFixedNumber)(parseFloat(value || 0) - parseFloat(receivable));
|
|
2706
|
+
}
|
|
2707
|
+
if (parseFloat(receivable) <= parseFloat(value || 0) && parseFloat(value || 0) <= _this2.store.paymode.bookMaxValue) {
|
|
2708
|
+
inputTarget2.innerHTML = (0, _utils.getFixedNumber)(0);
|
|
2709
|
+
}
|
|
2710
|
+
} else {
|
|
2711
|
+
inputTarget2.innerHTML = (0, _utils.getFixedNumber)(parseFloat(value || 0) - parseFloat(receivable));
|
|
2712
|
+
}
|
|
2702
2713
|
};
|
|
2703
2714
|
|
|
2704
2715
|
_this2.changeScanProduct = function () {
|
|
@@ -2974,7 +2985,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2974
2985
|
settleDisabled: false
|
|
2975
2986
|
});
|
|
2976
2987
|
that.store.bquick && that.props.onCancelSettle && that.props.onCancelSettle();
|
|
2977
|
-
that.store.delPay(paymode.paymethodId);
|
|
2988
|
+
that.store.delPay(paymode.paymethodId, !isQuickPay ? 'bookPay' : '');
|
|
2978
2989
|
reject('\u652F\u4ED8\u65B9\u5F0F: ' + paymode.name + '\u5931\u8D25');
|
|
2979
2990
|
} },
|
|
2980
2991
|
'\u53D6\u6D88'
|
|
@@ -3004,7 +3015,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3004
3015
|
modal.destroy();
|
|
3005
3016
|
setTimeout(function () {
|
|
3006
3017
|
if (paymode.paymentType == PayStyle.xianjin) {
|
|
3007
|
-
that.store.changeValue(paymode.paymethodId, v, false);
|
|
3018
|
+
that.store.changeValue(paymode.paymethodId, v, false, 'bookPay');
|
|
3008
3019
|
} else {
|
|
3009
3020
|
paymode.authCode = v;
|
|
3010
3021
|
}
|
|
@@ -3143,6 +3154,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3143
3154
|
var CarouselTp = CarouseOut || _carousel2.default;
|
|
3144
3155
|
var newParams = CarouseOut ? {} : params;
|
|
3145
3156
|
var mapList = [];
|
|
3157
|
+
var type = _this2.props.type;
|
|
3158
|
+
|
|
3146
3159
|
paymodes.forEach(function (item, index) {
|
|
3147
3160
|
// 整除则新增轮播页面
|
|
3148
3161
|
if (index % carouselStart === 0) {
|
|
@@ -3158,7 +3171,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3158
3171
|
'div',
|
|
3159
3172
|
null,
|
|
3160
3173
|
(0, _map3.default)(modeList, function (mode, modeIndex) {
|
|
3161
|
-
return _this2.renderToolbtn(mode, index * carouselStart + modeIndex);
|
|
3174
|
+
return _this2.renderToolbtn(mode, index * carouselStart + modeIndex, type !== 1 ? 'bookPay' : '');
|
|
3162
3175
|
})
|
|
3163
3176
|
);
|
|
3164
3177
|
})
|
|
@@ -3436,7 +3449,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3436
3449
|
}
|
|
3437
3450
|
}, {
|
|
3438
3451
|
key: 'renderToolbtn',
|
|
3439
|
-
value: function renderToolbtn(mode, index) {
|
|
3452
|
+
value: function renderToolbtn(mode, index, bookType) {
|
|
3440
3453
|
var _this7 = this;
|
|
3441
3454
|
|
|
3442
3455
|
var _enumController$getEn31 = _mutantsUtil.enumController.getEnumOj(),
|
|
@@ -3474,7 +3487,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3474
3487
|
return _react2.default.createElement(
|
|
3475
3488
|
'div',
|
|
3476
3489
|
{ key: index + "", className: paymodeDisabled + ' ' + paymodeSelected + ' paymode hotkey_' + this.compoundHotkeysList[hotkeyIndex], onClick: function onClick() {
|
|
3477
|
-
_this7.onTabsClick(mode.paymentType);
|
|
3490
|
+
_this7.onTabsClick(mode.paymentType, bookType);
|
|
3478
3491
|
} },
|
|
3479
3492
|
_react2.default.createElement(
|
|
3480
3493
|
'div',
|
|
@@ -3805,7 +3818,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3805
3818
|
'div',
|
|
3806
3819
|
null,
|
|
3807
3820
|
(0, _map3.default)(paymodes, function (mode, index) {
|
|
3808
|
-
return _this8.renderToolbtn(mode, index);
|
|
3821
|
+
return _this8.renderToolbtn(mode, index, 'bookPay');
|
|
3809
3822
|
})
|
|
3810
3823
|
),
|
|
3811
3824
|
paymodes.length > carouselStart && this.paymodesCarouselList(params, paymodes, carouselStart)
|
|
@@ -3834,7 +3847,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3834
3847
|
_react2.default.createElement(
|
|
3835
3848
|
'div',
|
|
3836
3849
|
{ className: 'lefticon primary-color', onClick: function onClick() {
|
|
3837
|
-
_this8.onDelPay(index, boriginReturn && mode.boriginReturn, mode.paymentType);
|
|
3850
|
+
_this8.onDelPay(index, boriginReturn && mode.boriginReturn, mode.paymentType, 'bookPay');
|
|
3838
3851
|
} },
|
|
3839
3852
|
_react2.default.createElement(_ticon2.default, { type: 'jianqu', className: 'minus' })
|
|
3840
3853
|
),
|
|
@@ -3857,13 +3870,13 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3857
3870
|
return _this8.onHotKeyClick2(index, mode, paymode, e);
|
|
3858
3871
|
},
|
|
3859
3872
|
onBlur: function onBlur(e) {
|
|
3860
|
-
return _this8.onBlur(index, e);
|
|
3873
|
+
return _this8.onBlur(index, e, 'bookPay');
|
|
3861
3874
|
},
|
|
3862
3875
|
onFocus: function onFocus(e) {
|
|
3863
3876
|
return _this8.onFocusHack(index, mode, paymode, e);
|
|
3864
3877
|
},
|
|
3865
3878
|
onChange: function onChange(e) {
|
|
3866
|
-
return _this8.handleChange(index, e);
|
|
3879
|
+
return _this8.handleChange(index, e, 'bookPay');
|
|
3867
3880
|
}
|
|
3868
3881
|
})
|
|
3869
3882
|
),
|
|
@@ -4223,7 +4236,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4223
4236
|
// }
|
|
4224
4237
|
// }
|
|
4225
4238
|
// mode.paymentType == PayStyle.hyczk && czkinput && czkinput.value !== '0.00' ? this.editCzkModal() :
|
|
4226
|
-
_this8.onHotKeyClick1(mode, index, boriginReturn);
|
|
4239
|
+
_this8.onHotKeyClick1(mode, index, boriginReturn, 'bookPay');
|
|
4227
4240
|
},
|
|
4228
4241
|
value: mode.paymentType == PayStyle.hyczk ? (0, _utils.getFixedNumber)((0, _reduce3.default)((0, _filter3.default)(thePaymodes, function (tm) {
|
|
4229
4242
|
return tm.paymentType == PayStyle.hyczk;
|
|
@@ -4234,16 +4247,16 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4234
4247
|
disabled: _this8.checkModeDisabled(mode.paymentType, brefund, boriginReturn) || _this8.checkScanDisabled(mode.paymentType),
|
|
4235
4248
|
value: mode.exchangeRate != 1 ? mode.value2 : mode.value,
|
|
4236
4249
|
onClick: function onClick(e) {
|
|
4237
|
-
return _this8.onHotKeyClick2(index, mode, paymode, e);
|
|
4250
|
+
return _this8.onHotKeyClick2(index, mode, paymode, e, 'bookPay');
|
|
4238
4251
|
},
|
|
4239
4252
|
onBlur: function onBlur(e) {
|
|
4240
|
-
return _this8.onBlur(index, e);
|
|
4253
|
+
return _this8.onBlur(index, e, 'bookPay');
|
|
4241
4254
|
},
|
|
4242
4255
|
onFocus: function onFocus(e) {
|
|
4243
4256
|
return _this8.onFocusHack(index, mode, paymode, e);
|
|
4244
4257
|
},
|
|
4245
4258
|
onChange: function onChange(e) {
|
|
4246
|
-
return _this8.handleChange(index, e);
|
|
4259
|
+
return _this8.handleChange(index, e, 'bookPay');
|
|
4247
4260
|
}
|
|
4248
4261
|
})
|
|
4249
4262
|
)
|