tplus-components-touch 3.38.6 → 3.39.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/billSearch/api.js +74 -13
- package/dist/components/billSearch/api.js.map +1 -1
- package/dist/components/billSearch/index.js +38 -26
- package/dist/components/billSearch/index.js.map +1 -1
- package/dist/components/commonForm/addressPicker/index.js +16 -7
- package/dist/components/commonForm/addressPicker/index.js.map +1 -1
- package/dist/components/commonForm/datePicker/index.js +6 -3
- package/dist/components/commonForm/datePicker/index.js.map +1 -1
- package/dist/components/commonForm/formControl/index.js +2 -1
- package/dist/components/commonForm/formControl/index.js.map +1 -1
- package/dist/components/commonForm/index.js +9 -3
- package/dist/components/commonForm/index.js.map +1 -1
- package/dist/components/hotKey/localConfig.js +52 -0
- package/dist/components/hotKey/localConfig.js.map +1 -1
- package/dist/components/input/style.less +7 -0
- package/dist/components/keyboard/numKeyboardScan.js +5 -0
- package/dist/components/keyboard/numKeyboardScan.js.map +1 -1
- package/dist/components/presale/pickup.js +479 -0
- package/dist/components/presale/pickup.js.map +1 -0
- package/dist/components/presale/style.less +59 -0
- package/dist/components/settlement/settlement.js +347 -121
- package/dist/components/settlement/settlement.js.map +1 -1
- package/dist/components/settlement/settlement.less +20 -4
- package/dist/components/settlement/settlementStore.js +221 -111
- package/dist/components/settlement/settlementStore.js.map +1 -1
- package/dist/components/settlement/utils.js +2 -2
- package/dist/components/settlement/utils.js.map +1 -1
- package/dist/components/ticon/iconfont/demo_index.html +3 -3
- package/dist/components/ticon/iconfont/iconfont.css +3 -3
- package/dist/components/ticon/iconfont/iconfont.ttf +0 -0
- package/dist/components/ticon/iconfont/iconfont.woff +0 -0
- package/dist/components/ticon/iconfont/iconfont.woff2 +0 -0
- package/dist/components/touchTable/index.js +12 -0
- package/dist/components/touchTable/index.js.map +1 -1
- package/dist/index.js +8 -3
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
|
@@ -16,6 +16,14 @@ var _drawer = require('antd/es/drawer');
|
|
|
16
16
|
|
|
17
17
|
var _drawer2 = _interopRequireDefault(_drawer);
|
|
18
18
|
|
|
19
|
+
var _table = require('antd/es/table');
|
|
20
|
+
|
|
21
|
+
var _table2 = _interopRequireDefault(_table);
|
|
22
|
+
|
|
23
|
+
var _keys = require('babel-runtime/core-js/object/keys');
|
|
24
|
+
|
|
25
|
+
var _keys2 = _interopRequireDefault(_keys);
|
|
26
|
+
|
|
19
27
|
var _extends2 = require('babel-runtime/helpers/extends');
|
|
20
28
|
|
|
21
29
|
var _extends3 = _interopRequireDefault(_extends2);
|
|
@@ -88,6 +96,8 @@ require('antd/es/input/style');
|
|
|
88
96
|
|
|
89
97
|
require('antd/es/drawer/style');
|
|
90
98
|
|
|
99
|
+
require('antd/es/table/style');
|
|
100
|
+
|
|
91
101
|
require('antd/es/carousel/style');
|
|
92
102
|
|
|
93
103
|
require('antd/es/button/style');
|
|
@@ -362,7 +372,9 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
362
372
|
isReturn = _this2$props.isReturn,
|
|
363
373
|
type = _this2$props.type;
|
|
364
374
|
|
|
365
|
-
_promise2.default.resolve(!_this2.props.onValidate || _this2.props.onValidate({ isNotAutoFocus: true
|
|
375
|
+
_promise2.default.resolve(!_this2.props.onValidate || _this2.props.onValidate({ isNotAutoFocus: true, fn: function fn(data) {
|
|
376
|
+
return _this2.isNoProductTip(data);
|
|
377
|
+
} })).then(function (result) {
|
|
366
378
|
if (result) {
|
|
367
379
|
_this2.setState({
|
|
368
380
|
settleDisabled: false
|
|
@@ -483,7 +495,9 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
483
495
|
|
|
484
496
|
var isAutoShowCouponWhenCash = (0, _tplusPoslogin.PosInitData)('IsAutoShowCouponWhenCash');
|
|
485
497
|
// 支持异步验证过程
|
|
486
|
-
_promise2.default.resolve(!_this2.props.onValidate || _this2.props.onValidate(
|
|
498
|
+
_promise2.default.resolve(!_this2.props.onValidate || _this2.props.onValidate({ fn: function fn(data) {
|
|
499
|
+
return _this2.isNoProductTip(data);
|
|
500
|
+
} })).then(function (result) {
|
|
487
501
|
if (result) {
|
|
488
502
|
_this2.setState({
|
|
489
503
|
settleDisabled: false
|
|
@@ -1096,7 +1110,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1096
1110
|
}
|
|
1097
1111
|
};
|
|
1098
1112
|
|
|
1099
|
-
_this2.onTabsClick2 = function (paymode, brefund, themode, key) {
|
|
1113
|
+
_this2.onTabsClick2 = function (paymode, brefund, themode, key, bookType) {
|
|
1100
1114
|
var _enumController$getEn7 = _mutantsUtil.enumController.getEnumOj(),
|
|
1101
1115
|
PayStyle = _enumController$getEn7.PayStyle,
|
|
1102
1116
|
Differentiate = _enumController$getEn7.Differentiate;
|
|
@@ -1129,7 +1143,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1129
1143
|
})) {
|
|
1130
1144
|
_message2.default.error('已使用了其他的付款码支付,不可以再使用微信了。');
|
|
1131
1145
|
} else {
|
|
1132
|
-
_this2.setCurrentFocusAndAddPay(key);
|
|
1146
|
+
_this2.setCurrentFocusAndAddPay(key, bookType);
|
|
1133
1147
|
}
|
|
1134
1148
|
break;
|
|
1135
1149
|
case PayStyle.zfb:
|
|
@@ -1138,7 +1152,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1138
1152
|
})) {
|
|
1139
1153
|
_message2.default.error('已使用了其他的付款码支付,不可以再使用支付宝了。');
|
|
1140
1154
|
} else {
|
|
1141
|
-
_this2.setCurrentFocusAndAddPay(key);
|
|
1155
|
+
_this2.setCurrentFocusAndAddPay(key, bookType);
|
|
1142
1156
|
}
|
|
1143
1157
|
break;
|
|
1144
1158
|
case PayStyle.smzf:
|
|
@@ -1147,11 +1161,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1147
1161
|
})) {
|
|
1148
1162
|
_message2.default.error('已使用了其他的付款码支付,不可以再使用扫码支付了。');
|
|
1149
1163
|
} else {
|
|
1150
|
-
_this2.setCurrentFocusAndAddPay(key);
|
|
1164
|
+
_this2.setCurrentFocusAndAddPay(key, bookType);
|
|
1151
1165
|
}
|
|
1152
1166
|
break;
|
|
1153
1167
|
default:
|
|
1154
|
-
_this2.setCurrentFocusAndAddPay(key);
|
|
1168
|
+
_this2.setCurrentFocusAndAddPay(key, bookType);
|
|
1155
1169
|
break;
|
|
1156
1170
|
}
|
|
1157
1171
|
};
|
|
@@ -1194,7 +1208,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1194
1208
|
return bdisabled;
|
|
1195
1209
|
};
|
|
1196
1210
|
|
|
1197
|
-
_this2.onTabsClick = function (key) {
|
|
1211
|
+
_this2.onTabsClick = function (key, bookType) {
|
|
1198
1212
|
var _enumController$getEn9 = _mutantsUtil.enumController.getEnumOj(),
|
|
1199
1213
|
PayStyle = _enumController$getEn9.PayStyle,
|
|
1200
1214
|
Differentiate = _enumController$getEn9.Differentiate;
|
|
@@ -1223,6 +1237,10 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1223
1237
|
return;
|
|
1224
1238
|
}
|
|
1225
1239
|
var themode = (0, _find3.default)(paymode.paymodes, { 'paymentType': key });
|
|
1240
|
+
//预订非全款不可使用零售抵现类支付方式
|
|
1241
|
+
// if(bookType == 'bookPay' && this.store.paymode.isNotFullOnlyBook && themode.virtualPay){
|
|
1242
|
+
// return Message.error("付订金时不可使用零售抵现类结算方式!");
|
|
1243
|
+
// }
|
|
1226
1244
|
if (themode.exchangeRate != 1) {
|
|
1227
1245
|
var forign = (0, _find3.default)(paymode.thePaymodes, function (mode) {
|
|
1228
1246
|
return mode.exchangeRate != 1 && mode.paymentType != key;
|
|
@@ -1253,17 +1271,17 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1253
1271
|
that.setState({
|
|
1254
1272
|
noAlreadyWarn: false
|
|
1255
1273
|
});
|
|
1256
|
-
that.onTabsClick2(paymode, brefund, themode, key);
|
|
1274
|
+
that.onTabsClick2(paymode, brefund, themode, key, bookType);
|
|
1257
1275
|
},
|
|
1258
1276
|
onCancel: function onCancel() {}
|
|
1259
|
-
}) : that.onTabsClick2(paymode, brefund, themode, key)
|
|
1277
|
+
}) : that.onTabsClick2(paymode, brefund, themode, key, bookType);
|
|
1260
1278
|
break;
|
|
1261
1279
|
default:
|
|
1262
|
-
_this2.onTabsClick2(paymode, brefund, themode, key);
|
|
1280
|
+
_this2.onTabsClick2(paymode, brefund, themode, key, bookType);
|
|
1263
1281
|
break;
|
|
1264
1282
|
}
|
|
1265
1283
|
} else {
|
|
1266
|
-
_this2.onTabsClick2(paymode, brefund, themode, key);
|
|
1284
|
+
_this2.onTabsClick2(paymode, brefund, themode, key, bookType);
|
|
1267
1285
|
}
|
|
1268
1286
|
};
|
|
1269
1287
|
|
|
@@ -1286,8 +1304,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1286
1304
|
}
|
|
1287
1305
|
};
|
|
1288
1306
|
|
|
1289
|
-
_this2.setCurrentFocusAndAddPay = function (key, payId) {
|
|
1290
|
-
_this2.store.changeFocusAndAddPay(key);
|
|
1307
|
+
_this2.setCurrentFocusAndAddPay = function (key, bookType, payId) {
|
|
1308
|
+
_this2.store.changeFocusAndAddPay(key, bookType);
|
|
1291
1309
|
if (_this2.store.bquick) {
|
|
1292
1310
|
_this2.handleSettle("quickPay");
|
|
1293
1311
|
} else {
|
|
@@ -1295,7 +1313,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1295
1313
|
}
|
|
1296
1314
|
};
|
|
1297
1315
|
|
|
1298
|
-
_this2.onDelPay = function (index, boriginReturn, type) {
|
|
1316
|
+
_this2.onDelPay = function (index, boriginReturn, type, bookType) {
|
|
1299
1317
|
var _enumController$getEn12 = _mutantsUtil.enumController.getEnumOj(),
|
|
1300
1318
|
PayStyle = _enumController$getEn12.PayStyle;
|
|
1301
1319
|
|
|
@@ -1304,17 +1322,21 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1304
1322
|
if (storeType != 1 && boriginReturn && (type == PayStyle.hyczk || type == PayStyle.djq || type == PayStyle.jfdx)) {
|
|
1305
1323
|
_message2.default.info('原单退货时,该结算方式不可以删除。');
|
|
1306
1324
|
} else {
|
|
1307
|
-
_this2.store.delPay(index);
|
|
1325
|
+
_this2.store.delPay(index, bookType);
|
|
1308
1326
|
}
|
|
1309
1327
|
};
|
|
1310
1328
|
|
|
1311
|
-
_this2.handleChange = function (index, e) {
|
|
1329
|
+
_this2.handleChange = function (index, e, type) {
|
|
1312
1330
|
if (!_mutantsMicrofx.stores.offlineSys.shouldSettlement(_this2.store.paymode.currentFocus)) return;
|
|
1331
|
+
var mode = (0, _find3.default)(_this2.store.paymode.thePaymodes, { 'paymethodId': index });
|
|
1332
|
+
// if(type == 'bookPay' && this.store.paymode.isNotFullOnlyBook && mode.virtualPay){
|
|
1333
|
+
// return Message.error("付订金时不可使用零售抵现类结算方式!");
|
|
1334
|
+
// }
|
|
1313
1335
|
var currentInput = e.target;
|
|
1314
1336
|
var amountMaxLength = parseInt(_this2.props.initData["AmountMaxLength"] || 10);
|
|
1315
1337
|
if (!isNaN(e.target.value) || e.target.value == '-') {
|
|
1316
1338
|
if (e.target.value.length <= amountMaxLength) {
|
|
1317
|
-
_this2.store.changeValue(index, e.target.value, false);
|
|
1339
|
+
_this2.store.changeValue(index, e.target.value, false, type);
|
|
1318
1340
|
}
|
|
1319
1341
|
}
|
|
1320
1342
|
};
|
|
@@ -1358,10 +1380,10 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1358
1380
|
_this2.store.paymode.setCurrentModeValue(val, max);
|
|
1359
1381
|
};
|
|
1360
1382
|
|
|
1361
|
-
_this2.onBlur = function (index, e) {
|
|
1383
|
+
_this2.onBlur = function (index, e, type) {
|
|
1362
1384
|
_this2.currentInput = null;
|
|
1363
1385
|
_this2.store.changeFocusOnly(-1);
|
|
1364
|
-
_this2.store.changeValue(index, e.target.value == '-' ? 0 : e.target.value, true);
|
|
1386
|
+
_this2.store.changeValue(index, e.target.value == '-' ? 0 : e.target.value, true, type);
|
|
1365
1387
|
};
|
|
1366
1388
|
|
|
1367
1389
|
_this2.onFocus = function (index, mode, paymode, e) {
|
|
@@ -1493,7 +1515,10 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1493
1515
|
}, 2000);
|
|
1494
1516
|
};
|
|
1495
1517
|
|
|
1496
|
-
_this2.onHotKeyClick1 = function (mode, index, boriginReturn) {
|
|
1518
|
+
_this2.onHotKeyClick1 = function (mode, index, boriginReturn, bookType) {
|
|
1519
|
+
// if (bookType == 'bookPay' && this.store.paymode.isNotFullOnlyBook && mode.virtualPay){
|
|
1520
|
+
// return Message.error("付订金时不可使用零售抵现类结算方式!");
|
|
1521
|
+
// }
|
|
1497
1522
|
if (!_mutantsMicrofx.stores.offlineSys.shouldSettlement(mode.paymentType)) return false;
|
|
1498
1523
|
if (_this2.hotkeydebouncedPayMode == mode) {
|
|
1499
1524
|
return;
|
|
@@ -1533,11 +1558,14 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1533
1558
|
}
|
|
1534
1559
|
};
|
|
1535
1560
|
|
|
1536
|
-
_this2.onHotKeyClick2 = function (index, mode, paymode, e) {
|
|
1561
|
+
_this2.onHotKeyClick2 = function (index, mode, paymode, e, bookType) {
|
|
1537
1562
|
if (!_mutantsMicrofx.stores.offlineSys.shouldSettlement(mode.paymentType)) return false;
|
|
1538
1563
|
if (_this2.hotkeydebouncedPayMode == mode) {
|
|
1539
1564
|
return;
|
|
1540
1565
|
}
|
|
1566
|
+
// if (bookType == 'bookPay' && this.store.paymode.isNotFullOnlyBook && mode.virtualPay){
|
|
1567
|
+
// return Message.error("付订金时不可使用零售抵现类结算方式!");
|
|
1568
|
+
// }
|
|
1541
1569
|
_this2.store.changeClickFocusOnly(mode.paymentType);
|
|
1542
1570
|
_this2.setCurrentFocusOnly(mode.paymentType);
|
|
1543
1571
|
if (_this2.hotkeydebounced) {
|
|
@@ -1774,7 +1802,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1774
1802
|
};
|
|
1775
1803
|
|
|
1776
1804
|
_this2.settleSuccess = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee8() {
|
|
1777
|
-
var _enumController$getEn20, PayStyle, _this2$store$paymode, amount, received, thePaymodes, IdbusiType, charge, openCashBox, _this, showTwoScreen, getSettleGift, type, resp1;
|
|
1805
|
+
var _enumController$getEn20, PayStyle, _this2$store$paymode, amount, received, thePaymodes, IdbusiType, charge, openCashBox, _this, showTwoScreen, _this2$store6, getSettleGift, isFull, type, resp1;
|
|
1778
1806
|
|
|
1779
1807
|
return _regenerator2.default.wrap(function _callee8$(_context8) {
|
|
1780
1808
|
while (1) {
|
|
@@ -1834,7 +1862,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1834
1862
|
}
|
|
1835
1863
|
};
|
|
1836
1864
|
|
|
1837
|
-
|
|
1865
|
+
_this2$store6 = _this2.store, getSettleGift = _this2$store6.getSettleGift, isFull = _this2$store6.isFull;
|
|
1838
1866
|
type = _this2.props.type;
|
|
1839
1867
|
resp1 = false;
|
|
1840
1868
|
|
|
@@ -1883,7 +1911,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1883
1911
|
} else if (MemberPoints && Number(amount) == Number(0)) {
|
|
1884
1912
|
message = "兑换成功";
|
|
1885
1913
|
}
|
|
1886
|
-
window.__successModal = (0, _utils.showSuccessModal)(amount, received, charge, _this.props.onModalClose, isXianjin, message, resp1 && resp1.data, _mutantsMicrofx.stores, function () {
|
|
1914
|
+
window.__successModal = (0, _utils.showSuccessModal)(amount, received, charge, _this.props.onModalClose, isXianjin, message, resp1 && resp1.data, _mutantsMicrofx.stores, IdbusiType, isFull, function () {
|
|
1887
1915
|
_this.handleGuestShow(5);
|
|
1888
1916
|
});
|
|
1889
1917
|
_this2.setState({ isXianjin: false });
|
|
@@ -2040,7 +2068,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2040
2068
|
};
|
|
2041
2069
|
}();
|
|
2042
2070
|
|
|
2043
|
-
var _enumController$getEn21, PayStyle, _this2$
|
|
2071
|
+
var _enumController$getEn21, PayStyle, _this2$store7, paymode, brefund, boriginReturn, newStyle, isQuickPay, that, status, zeromode, promises, thePaymodes, quickmode, commit;
|
|
2044
2072
|
|
|
2045
2073
|
return _regenerator2.default.wrap(function _callee11$(_context11) {
|
|
2046
2074
|
while (1) {
|
|
@@ -2051,7 +2079,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2051
2079
|
});
|
|
2052
2080
|
console.log("settlement.handleSettle开始执行,参数:", +args);
|
|
2053
2081
|
_enumController$getEn21 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn21.PayStyle;
|
|
2054
|
-
_this2$
|
|
2082
|
+
_this2$store7 = _this2.store, paymode = _this2$store7.paymode, brefund = _this2$store7.brefund, boriginReturn = _this2$store7.boriginReturn, newStyle = _this2$store7.newStyle;
|
|
2055
2083
|
isQuickPay = args === 'quickPay';
|
|
2056
2084
|
that = _this2;
|
|
2057
2085
|
status = false;
|
|
@@ -2387,7 +2415,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2387
2415
|
|
|
2388
2416
|
//成功
|
|
2389
2417
|
//返回
|
|
2390
|
-
that.setCurrentFocusAndAddPay(curmode.paymentType, curmode.paymethodId);
|
|
2418
|
+
that.setCurrentFocusAndAddPay(curmode.paymentType, null, curmode.paymethodId);
|
|
2391
2419
|
_promise2.default.resolve();
|
|
2392
2420
|
_context12.next = 15;
|
|
2393
2421
|
break;
|
|
@@ -2610,58 +2638,107 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2610
2638
|
};
|
|
2611
2639
|
}();
|
|
2612
2640
|
|
|
2613
|
-
_this2.btnDebounced = function (
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
isInputMember: true
|
|
2617
|
-
});
|
|
2641
|
+
_this2.btnDebounced = function () {
|
|
2642
|
+
var _ref27 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee16(type, bquick) {
|
|
2643
|
+
var IdbusiType, CustomerPhone, DistributionMode, Address, title, _enumController$getEn23, PayStyle, _this2$store8, paymode, brefund, boriginReturn, newStyle, status;
|
|
2618
2644
|
|
|
2619
|
-
|
|
2620
|
-
|
|
2645
|
+
return _regenerator2.default.wrap(function _callee16$(_context16) {
|
|
2646
|
+
while (1) {
|
|
2647
|
+
switch (_context16.prev = _context16.next) {
|
|
2648
|
+
case 0:
|
|
2649
|
+
IdbusiType = _this2.context && _this2.context.viewModel && _this2.context.viewModel.data && _this2.context.viewModel.data.IdbusiType;
|
|
2650
|
+
CustomerPhone = _this2.context && _this2.context.viewModel && _this2.context.viewModel.data && _this2.context.viewModel.data.CustomerPhone;
|
|
2651
|
+
DistributionMode = _this2.context && _this2.context.viewModel && _this2.context.viewModel.data && _this2.context.viewModel.data.DistributionMode;
|
|
2652
|
+
Address = _this2.context && _this2.context.viewModel && _this2.context.viewModel.data && _this2.context.viewModel.data.Address;
|
|
2653
|
+
//预订时,若没录入买家手机号,或配送方式为快递时,弹框买家信息确认框
|
|
2654
|
+
|
|
2655
|
+
if (!(IdbusiType == 38)) {
|
|
2656
|
+
_context16.next = 10;
|
|
2657
|
+
break;
|
|
2658
|
+
}
|
|
2621
2659
|
|
|
2622
|
-
|
|
2623
|
-
|
|
2624
|
-
|
|
2625
|
-
boriginReturn = _this2$store7.boriginReturn,
|
|
2626
|
-
newStyle = _this2$store7.newStyle;
|
|
2660
|
+
if (DistributionMode.Id == 'ON_SITE_PICKUP' && !CustomerPhone && _this2.context.viewModel.data.Member.Mobilephone) {
|
|
2661
|
+
_this2.props.syncMemberInfoProcessor();
|
|
2662
|
+
}
|
|
2627
2663
|
|
|
2664
|
+
if (!(!CustomerPhone && !_this2.context.viewModel.data.Member.Mobilephone || DistributionMode.Id == 'ELECTRONIC' || DistributionMode.Id == 'CITY_DISTRIBUTE')) {
|
|
2665
|
+
_context16.next = 10;
|
|
2666
|
+
break;
|
|
2667
|
+
}
|
|
2628
2668
|
|
|
2629
|
-
|
|
2669
|
+
title = (DistributionMode.Id == 'ELECTRONIC' || DistributionMode.Id == 'CITY_DISTRIBUTE') && Address ? '收货地址确认' : '收货人';
|
|
2670
|
+
_context16.next = 10;
|
|
2671
|
+
return _this2.props.openBuyerModal(title);
|
|
2630
2672
|
|
|
2631
|
-
|
|
2632
|
-
paymode.thePaymodes.forEach(function (v) {
|
|
2633
|
-
if (v.paymentType === PayStyle.xianjin && v.value !== '0.00') {
|
|
2634
|
-
status = true;
|
|
2635
|
-
}
|
|
2636
|
-
});
|
|
2637
|
-
_this2.setState({
|
|
2638
|
-
isXianjin: status ? true : false
|
|
2639
|
-
});
|
|
2673
|
+
case 10:
|
|
2640
2674
|
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
|
|
2675
|
+
_this2.setState({
|
|
2676
|
+
bquick: bquick,
|
|
2677
|
+
isInputMember: true
|
|
2678
|
+
});
|
|
2679
|
+
_enumController$getEn23 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn23.PayStyle;
|
|
2680
|
+
_this2$store8 = _this2.store, paymode = _this2$store8.paymode, brefund = _this2$store8.brefund, boriginReturn = _this2$store8.boriginReturn, newStyle = _this2$store8.newStyle;
|
|
2681
|
+
|
|
2682
|
+
if (!(bquick && !_mutantsMicrofx.stores.offlineSys.shouldSettlement(type))) {
|
|
2683
|
+
_context16.next = 15;
|
|
2684
|
+
break;
|
|
2685
|
+
}
|
|
2686
|
+
|
|
2687
|
+
return _context16.abrupt('return', false);
|
|
2688
|
+
|
|
2689
|
+
case 15:
|
|
2690
|
+
status = false;
|
|
2691
|
+
|
|
2692
|
+
paymode.thePaymodes.forEach(function (v) {
|
|
2693
|
+
if (v.paymentType === PayStyle.xianjin && v.value !== '0.00') {
|
|
2694
|
+
status = true;
|
|
2695
|
+
}
|
|
2696
|
+
});
|
|
2697
|
+
_this2.setState({
|
|
2698
|
+
isXianjin: status ? true : false
|
|
2699
|
+
});
|
|
2700
|
+
|
|
2701
|
+
if (!_this2.btndebounced) {
|
|
2702
|
+
_context16.next = 20;
|
|
2703
|
+
break;
|
|
2704
|
+
}
|
|
2705
|
+
|
|
2706
|
+
return _context16.abrupt('return');
|
|
2707
|
+
|
|
2708
|
+
case 20:
|
|
2709
|
+
_this2.btndebounced = (0, _debounce3.default)(function () {
|
|
2710
|
+
if (bquick) {
|
|
2711
|
+
_this2.quickSettle(type);
|
|
2712
|
+
} else {
|
|
2713
|
+
_this2.showModal();
|
|
2714
|
+
}
|
|
2715
|
+
}, 1000, {
|
|
2716
|
+
'leading': true,
|
|
2717
|
+
'trailing': false
|
|
2718
|
+
});
|
|
2719
|
+
_this2.btndebounced();
|
|
2720
|
+
setTimeout(function () {
|
|
2721
|
+
_this2.btndebounced.cancel();
|
|
2722
|
+
_this2.btndebounced = null;
|
|
2723
|
+
}, 2000);
|
|
2724
|
+
|
|
2725
|
+
case 23:
|
|
2726
|
+
case 'end':
|
|
2727
|
+
return _context16.stop();
|
|
2728
|
+
}
|
|
2729
|
+
}
|
|
2730
|
+
}, _callee16, _this3);
|
|
2731
|
+
}));
|
|
2732
|
+
|
|
2733
|
+
return function (_x10, _x11) {
|
|
2734
|
+
return _ref27.apply(this, arguments);
|
|
2735
|
+
};
|
|
2736
|
+
}();
|
|
2660
2737
|
|
|
2661
2738
|
_this2.onCzkChange = function (v) {
|
|
2662
2739
|
// console.log("czk change:"+new Date().toLocaleTimeString())
|
|
2663
|
-
var
|
|
2664
|
-
isNewRetailBCPos =
|
|
2740
|
+
var _ref28 = _mutantsUtil.platform || {},
|
|
2741
|
+
isNewRetailBCPos = _ref28.isNewRetailBCPos;
|
|
2665
2742
|
|
|
2666
2743
|
if (!isNewRetailBCPos) {
|
|
2667
2744
|
_this2.store.paymode.currentMode.member.setCardNo(v);
|
|
@@ -2741,7 +2818,20 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2741
2818
|
value = parseFloat(receivable) + parseFloat(inputTarget2.innerHTML);
|
|
2742
2819
|
}
|
|
2743
2820
|
inputTarget.value = value;
|
|
2744
|
-
|
|
2821
|
+
//预订现金快捷支付,这里修改找零计算,大于应收小于全额金额,不找零,大于全额金额找零
|
|
2822
|
+
if (_this2.store.paymode.isNotFullBook) {
|
|
2823
|
+
if (parseFloat(value || 0) > _this2.store.paymode.bookMaxValue) {
|
|
2824
|
+
inputTarget2.innerHTML = (0, _utils.getFixedNumber)(parseFloat(value || 0) - parseFloat(_this2.store.paymode.bookMaxValue));
|
|
2825
|
+
}
|
|
2826
|
+
if (parseFloat(value || 0) < parseFloat(receivable)) {
|
|
2827
|
+
inputTarget2.innerHTML = (0, _utils.getFixedNumber)(parseFloat(value || 0) - parseFloat(receivable));
|
|
2828
|
+
}
|
|
2829
|
+
if (parseFloat(receivable) <= parseFloat(value || 0) && parseFloat(value || 0) <= _this2.store.paymode.bookMaxValue) {
|
|
2830
|
+
inputTarget2.innerHTML = (0, _utils.getFixedNumber)(0);
|
|
2831
|
+
}
|
|
2832
|
+
} else {
|
|
2833
|
+
inputTarget2.innerHTML = (0, _utils.getFixedNumber)(parseFloat(value || 0) - parseFloat(receivable));
|
|
2834
|
+
}
|
|
2745
2835
|
};
|
|
2746
2836
|
|
|
2747
2837
|
_this2.changeScanProduct = function () {
|
|
@@ -2798,6 +2888,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2798
2888
|
type = _this2$props3.type;
|
|
2799
2889
|
|
|
2800
2890
|
var isManualIntoAmount = void 0;
|
|
2891
|
+
var BuyerPayFreight = _this2.context && _this2.context.viewModel && _this2.context.viewModel.data && _this2.context.viewModel.data.BuyerPayFreight;
|
|
2892
|
+
var DistributionMode = _this2.context && _this2.context.viewModel && _this2.context.viewModel.data && _this2.context.viewModel.data.DistributionMode;
|
|
2801
2893
|
// 付款弹窗
|
|
2802
2894
|
return new _promise2.default(function (resolve, reject) {
|
|
2803
2895
|
var _enumController$getEn27 = _mutantsUtil.enumController.getEnumOj(),
|
|
@@ -2887,7 +2979,14 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2887
2979
|
_react2.default.createElement(
|
|
2888
2980
|
'span',
|
|
2889
2981
|
{ className: 'yfje' },
|
|
2890
|
-
paymode.value
|
|
2982
|
+
paymode.value,
|
|
2983
|
+
DistributionMode && (DistributionMode.Id == 'ELECTRONIC' || DistributionMode.Id == 'CITY_DISTRIBUTE') && BuyerPayFreight && BuyerPayFreight > 0 ? _react2.default.createElement(
|
|
2984
|
+
'span',
|
|
2985
|
+
{ className: 'freight' },
|
|
2986
|
+
'(\u5305\u542B',
|
|
2987
|
+
BuyerPayFreight,
|
|
2988
|
+
'\u5143\u8FD0\u8D39)'
|
|
2989
|
+
) : null
|
|
2891
2990
|
)
|
|
2892
2991
|
),
|
|
2893
2992
|
paymode.paymentType == PayStyle.xianjin && _react2.default.createElement(
|
|
@@ -3011,7 +3110,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3011
3110
|
settleDisabled: false
|
|
3012
3111
|
});
|
|
3013
3112
|
that.store.bquick && that.props.onCancelSettle && that.props.onCancelSettle();
|
|
3014
|
-
that.store.bquick && that.store.delPay(paymode.paymethodId);
|
|
3113
|
+
that.store.bquick && that.store.delPay(paymode.paymethodId, !isQuickPay ? 'bookPay' : '');
|
|
3015
3114
|
reject('\u652F\u4ED8\u65B9\u5F0F: ' + paymode.name + '\u5931\u8D25');
|
|
3016
3115
|
} },
|
|
3017
3116
|
'\u53D6\u6D88'
|
|
@@ -3041,7 +3140,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3041
3140
|
modal.destroy();
|
|
3042
3141
|
setTimeout(function () {
|
|
3043
3142
|
if (paymode.paymentType == PayStyle.xianjin) {
|
|
3044
|
-
that.store.changeValue(paymode.paymethodId, v, false);
|
|
3143
|
+
that.store.changeValue(paymode.paymethodId, v, false, 'bookPay');
|
|
3045
3144
|
} else {
|
|
3046
3145
|
paymode.authCode = v;
|
|
3047
3146
|
}
|
|
@@ -3070,9 +3169,9 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3070
3169
|
};
|
|
3071
3170
|
|
|
3072
3171
|
_this2.checkCurrentModeHaveMutex = function (type) {
|
|
3073
|
-
var _this2$
|
|
3074
|
-
paymode = _this2$
|
|
3075
|
-
newStyle = _this2$
|
|
3172
|
+
var _this2$store9 = _this2.store,
|
|
3173
|
+
paymode = _this2$store9.paymode,
|
|
3174
|
+
newStyle = _this2$store9.newStyle;
|
|
3076
3175
|
|
|
3077
3176
|
var _enumController$getEn28 = _mutantsUtil.enumController.getEnumOj(),
|
|
3078
3177
|
PayStyle = _enumController$getEn28.PayStyle;
|
|
@@ -3180,6 +3279,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3180
3279
|
var CarouselTp = CarouseOut || _carousel2.default;
|
|
3181
3280
|
var newParams = CarouseOut ? {} : params;
|
|
3182
3281
|
var mapList = [];
|
|
3282
|
+
var type = _this2.props.type;
|
|
3283
|
+
|
|
3183
3284
|
paymodes.forEach(function (item, index) {
|
|
3184
3285
|
// 整除则新增轮播页面
|
|
3185
3286
|
if (index % carouselStart === 0) {
|
|
@@ -3195,7 +3296,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3195
3296
|
'div',
|
|
3196
3297
|
null,
|
|
3197
3298
|
(0, _map3.default)(modeList, function (mode, modeIndex) {
|
|
3198
|
-
return _this2.renderToolbtn(mode, index * carouselStart + modeIndex);
|
|
3299
|
+
return _this2.renderToolbtn(mode, index * carouselStart + modeIndex, type !== 1 ? 'bookPay' : '');
|
|
3199
3300
|
})
|
|
3200
3301
|
);
|
|
3201
3302
|
})
|
|
@@ -3246,19 +3347,23 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3246
3347
|
|
|
3247
3348
|
_this2.hasElectron = hasElectron;
|
|
3248
3349
|
|
|
3249
|
-
var
|
|
3250
|
-
MemberMeStorageCardInputByKeyBoard =
|
|
3251
|
-
ICCardServer =
|
|
3252
|
-
ICCardPassword =
|
|
3350
|
+
var _ref29 = _mutantsMicrofx.stores.user.options.get('loginInfo') || {},
|
|
3351
|
+
MemberMeStorageCardInputByKeyBoard = _ref29.MemberMeStorageCardInputByKeyBoard,
|
|
3352
|
+
ICCardServer = _ref29.ICCardServer,
|
|
3353
|
+
ICCardPassword = _ref29.ICCardPassword,
|
|
3354
|
+
PreSellOrBook = _ref29.PreSellOrBook,
|
|
3355
|
+
PercentageWhenBook = _ref29.PercentageWhenBook;
|
|
3253
3356
|
|
|
3254
3357
|
_this2.isStorageCardInputType = MemberMeStorageCardInputByKeyBoard; // 仅储值卡是否禁用键盘输入,'0'为不禁用 '1'为禁用
|
|
3255
3358
|
_this2.iCCardServer = parseInt(ICCardServer); // 启用IC卡:0为禁用 1为启用
|
|
3256
3359
|
_this2.iCCardPassword = ICCardPassword; //IC卡密码
|
|
3360
|
+
_this2.isBook = PreSellOrBook == 'BOOK';
|
|
3361
|
+
_this2.percentageWhenBook = PercentageWhenBook;
|
|
3257
3362
|
//移动端环境下,没有读取IC卡的方式。
|
|
3258
3363
|
|
|
3259
|
-
var
|
|
3260
|
-
isHorizontalPad =
|
|
3261
|
-
isHorizontalSunMi =
|
|
3364
|
+
var _ref30 = _mutantsUtil.platform || {},
|
|
3365
|
+
isHorizontalPad = _ref30.isHorizontalPad,
|
|
3366
|
+
isHorizontalSunMi = _ref30.isHorizontalSunMi;
|
|
3262
3367
|
|
|
3263
3368
|
_this2.isHorizontalPad = !!isHorizontalPad;
|
|
3264
3369
|
_this2.isHorizontalSunMi = !!isHorizontalSunMi;
|
|
@@ -3387,6 +3492,76 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3387
3492
|
|
|
3388
3493
|
//that[`inputS${paymode.paymethodId}`]
|
|
3389
3494
|
|
|
3495
|
+
}, {
|
|
3496
|
+
key: 'isNoProductTip',
|
|
3497
|
+
value: function isNoProductTip(nonProductMap) {
|
|
3498
|
+
var _ref31 = this.context.viewModel.data || {},
|
|
3499
|
+
RetailDetails = _ref31.RetailDetails;
|
|
3500
|
+
|
|
3501
|
+
var temphtml = [];
|
|
3502
|
+
if ((0, _keys2.default)(nonProductMap).length > 0) {
|
|
3503
|
+
var columns = [{
|
|
3504
|
+
title: '商品名称',
|
|
3505
|
+
dataIndex: 'name',
|
|
3506
|
+
key: 'name',
|
|
3507
|
+
ellipsis: true
|
|
3508
|
+
}, {
|
|
3509
|
+
title: '原因',
|
|
3510
|
+
dataIndex: 'reason',
|
|
3511
|
+
key: 'reason',
|
|
3512
|
+
ellipsis: true
|
|
3513
|
+
}];
|
|
3514
|
+
|
|
3515
|
+
var _loop = function _loop(key) {
|
|
3516
|
+
var product = RetailDetails.find(function (o) {
|
|
3517
|
+
return o.Idinventory == key;
|
|
3518
|
+
});
|
|
3519
|
+
temphtml.push({ name: product.Inventory.Name, reason: nonProductMap[key] });
|
|
3520
|
+
};
|
|
3521
|
+
|
|
3522
|
+
for (var key in nonProductMap) {
|
|
3523
|
+
_loop(key);
|
|
3524
|
+
}
|
|
3525
|
+
var modal = (0, _asyncModal2.default)({
|
|
3526
|
+
onPressEnter: function onPressEnter() {
|
|
3527
|
+
modal.destroy();
|
|
3528
|
+
},
|
|
3529
|
+
maskClosable: false,
|
|
3530
|
+
keyboard: false,
|
|
3531
|
+
closable: true,
|
|
3532
|
+
title: '不可配送商品',
|
|
3533
|
+
width: 600,
|
|
3534
|
+
className: '',
|
|
3535
|
+
content: _react2.default.createElement(
|
|
3536
|
+
'div',
|
|
3537
|
+
{ className: 'not-distribution-tip' },
|
|
3538
|
+
_react2.default.createElement(
|
|
3539
|
+
'div',
|
|
3540
|
+
{ className: 'tip-content' },
|
|
3541
|
+
_react2.default.createElement(_table2.default, {
|
|
3542
|
+
columns: columns,
|
|
3543
|
+
dataSource: temphtml,
|
|
3544
|
+
scroll: { y: 240 },
|
|
3545
|
+
pagination: false,
|
|
3546
|
+
size: 'middle' })
|
|
3547
|
+
),
|
|
3548
|
+
_react2.default.createElement(
|
|
3549
|
+
'div',
|
|
3550
|
+
{ className: 'not-distribution-btn' },
|
|
3551
|
+
_react2.default.createElement(
|
|
3552
|
+
_button2.default,
|
|
3553
|
+
{ type: 'primary', onClick: function onClick() {
|
|
3554
|
+
modal.destroy();
|
|
3555
|
+
} },
|
|
3556
|
+
'\u77E5\u9053\u4E86'
|
|
3557
|
+
)
|
|
3558
|
+
)
|
|
3559
|
+
)
|
|
3560
|
+
});
|
|
3561
|
+
return true;
|
|
3562
|
+
}
|
|
3563
|
+
return false;
|
|
3564
|
+
}
|
|
3390
3565
|
}, {
|
|
3391
3566
|
key: 'checkThepaymode',
|
|
3392
3567
|
value: function checkThepaymode(key) {
|
|
@@ -3414,7 +3589,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3414
3589
|
}
|
|
3415
3590
|
}, {
|
|
3416
3591
|
key: 'renderToolbtn',
|
|
3417
|
-
value: function renderToolbtn(mode, index) {
|
|
3592
|
+
value: function renderToolbtn(mode, index, bookType) {
|
|
3418
3593
|
var _this7 = this;
|
|
3419
3594
|
|
|
3420
3595
|
var _enumController$getEn33 = _mutantsUtil.enumController.getEnumOj(),
|
|
@@ -3452,7 +3627,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3452
3627
|
return _react2.default.createElement(
|
|
3453
3628
|
'div',
|
|
3454
3629
|
{ key: index + "", className: paymodeDisabled + ' ' + paymodeSelected + ' paymode hotkey_' + this.compoundHotkeysList[hotkeyIndex], onClick: function onClick() {
|
|
3455
|
-
_this7.onTabsClick(mode.paymentType);
|
|
3630
|
+
_this7.onTabsClick(mode.paymentType, bookType);
|
|
3456
3631
|
} },
|
|
3457
3632
|
_react2.default.createElement(
|
|
3458
3633
|
'div',
|
|
@@ -3509,8 +3684,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3509
3684
|
newPass = _state2.newPass,
|
|
3510
3685
|
isNotAutoFocus = _state2.isNotAutoFocus;
|
|
3511
3686
|
|
|
3512
|
-
var
|
|
3513
|
-
isNewRetailBCPos =
|
|
3687
|
+
var _ref32 = _mutantsUtil.platform || {},
|
|
3688
|
+
isNewRetailBCPos = _ref32.isNewRetailBCPos;
|
|
3514
3689
|
|
|
3515
3690
|
var _store2 = this.store,
|
|
3516
3691
|
paymode = _store2.paymode,
|
|
@@ -3529,15 +3704,34 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3529
3704
|
|
|
3530
3705
|
var boriginReturn = this.context && this.context.viewModel && this.context.viewModel.data && JSON.getCellValue(this.context.viewModel.data, "IsOriginalReturn");
|
|
3531
3706
|
var totalTaxAmount = this.context && this.context.viewModel && this.context.viewModel.data && this.context.viewModel.data.TotalTaxAmount;
|
|
3707
|
+
|
|
3708
|
+
//收订金
|
|
3709
|
+
var IdbusiType = this.context && this.context.viewModel && this.context.viewModel.data && this.context.viewModel.data.IdbusiType;
|
|
3710
|
+
var BuyerPayFreight = this.context && this.context.viewModel && this.context.viewModel.data && this.context.viewModel.data.BuyerPayFreight;
|
|
3711
|
+
var DistributionMode = this.context && this.context.viewModel && this.context.viewModel.data && this.context.viewModel.data.DistributionMode;
|
|
3712
|
+
if (IdbusiType == 38 && this.isBook && this.percentageWhenBook < 100 && (!DistributionMode.Id || DistributionMode.Id == 'ON_SITE_PICKUP')) {
|
|
3713
|
+
totalTaxAmount = totalTaxAmount * this.percentageWhenBook / 100;
|
|
3714
|
+
}
|
|
3715
|
+
|
|
3532
3716
|
// 单据模式
|
|
3533
3717
|
var thePaymodes = newStyle ? (0, _filter3.default)(paymode.thePaymodes, function (m) {
|
|
3718
|
+
if (IdbusiType == 39) {
|
|
3719
|
+
return !(_this8.checkModeDisabled(m.paymentType, brefund, boriginReturn) && parseFloat(m.value) == 0) && m.paymentType != PayStyle.hyczk;
|
|
3720
|
+
}
|
|
3534
3721
|
return !(_this8.checkModeDisabled(m.paymentType, brefund, boriginReturn) && parseFloat(m.value) == 0);
|
|
3535
3722
|
}) : paymode.thePaymodes;
|
|
3536
3723
|
var paymodes = paymode.paymodes,
|
|
3537
3724
|
settle = paymode.settle,
|
|
3538
3725
|
currentMode = paymode.currentMode;
|
|
3539
|
-
// 积分兑换 总积分
|
|
3540
3726
|
|
|
3727
|
+
|
|
3728
|
+
if (IdbusiType == 39) {
|
|
3729
|
+
totalTaxAmount = _mutantsMicrofx.stores.drawerStore.thisWaitPaidAmount;
|
|
3730
|
+
paymodes = (0, _filter3.default)(paymodes, function (mode) {
|
|
3731
|
+
return mode.paymentType != PayStyle.hyczk;
|
|
3732
|
+
}); //取货过滤掉储值
|
|
3733
|
+
}
|
|
3734
|
+
// 积分兑换 总积分
|
|
3541
3735
|
var ExchangeIntegral = this.context && this.context.viewModel && this.context.viewModel.data.ExchangeIntegral;
|
|
3542
3736
|
|
|
3543
3737
|
var _hasSMZF = (0, _find3.default)(paymodes, function (item) {
|
|
@@ -3553,7 +3747,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3553
3747
|
}
|
|
3554
3748
|
|
|
3555
3749
|
var quickPay = boriginReturn ? [] : (0, _filter3.default)(paymodes, function (paymode) {
|
|
3556
|
-
|
|
3750
|
+
if (IdbusiType == 39) {
|
|
3751
|
+
return paymode.isQuick && paymode.paymentType != PayStyle.hyczk; //取货过滤掉储值
|
|
3752
|
+
} else {
|
|
3753
|
+
return paymode.isQuick;
|
|
3754
|
+
}
|
|
3557
3755
|
});
|
|
3558
3756
|
var productsIsEmpty = type != 1 && this.context.viewModel.data.RetailDetails.length == 0 || type == 1 && parseFloat(amount || 0) <= 0 || memberDisabled || noIsMinAmount;
|
|
3559
3757
|
var moreToolbtns = [];
|
|
@@ -3573,11 +3771,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3573
3771
|
quantity4 = 0;
|
|
3574
3772
|
var sumQuantity = 0; //数量总和的值,包括称重的。
|
|
3575
3773
|
|
|
3576
|
-
var
|
|
3577
|
-
|
|
3578
|
-
buyQuantity =
|
|
3579
|
-
|
|
3580
|
-
returnQuantity =
|
|
3774
|
+
var _ref33 = quantityDetail || {},
|
|
3775
|
+
_ref33$buyQuantity = _ref33.buyQuantity,
|
|
3776
|
+
buyQuantity = _ref33$buyQuantity === undefined ? 0 : _ref33$buyQuantity,
|
|
3777
|
+
_ref33$returnQuantity = _ref33.returnQuantity,
|
|
3778
|
+
returnQuantity = _ref33$returnQuantity === undefined ? 0 : _ref33$returnQuantity;
|
|
3581
3779
|
|
|
3582
3780
|
var quantityPrecision = (0, _tplusPoslogin.PosInitData)("QuantityPrecision");
|
|
3583
3781
|
quantityPrecision = quantityPrecision ? parseInt(quantityPrecision) : '';
|
|
@@ -3782,7 +3980,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3782
3980
|
'div',
|
|
3783
3981
|
null,
|
|
3784
3982
|
(0, _map3.default)(paymodes, function (mode, index) {
|
|
3785
|
-
return _this8.renderToolbtn(mode, index);
|
|
3983
|
+
return _this8.renderToolbtn(mode, index, 'bookPay');
|
|
3786
3984
|
})
|
|
3787
3985
|
),
|
|
3788
3986
|
paymodes.length > carouselStart && this.paymodesCarouselList(params, paymodes, carouselStart)
|
|
@@ -3827,20 +4025,20 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3827
4025
|
return _this8.onHotKeyClick2(index, mode, paymode, e);
|
|
3828
4026
|
},
|
|
3829
4027
|
onBlur: function onBlur(e) {
|
|
3830
|
-
return _this8.onBlur(index, e);
|
|
4028
|
+
return _this8.onBlur(index, e, 'bookPay');
|
|
3831
4029
|
},
|
|
3832
4030
|
onFocus: function onFocus(e) {
|
|
3833
4031
|
return _this8.onFocusHack(index, mode, paymode, e);
|
|
3834
4032
|
},
|
|
3835
4033
|
onChange: function onChange(e) {
|
|
3836
|
-
return _this8.handleChange(index, e);
|
|
4034
|
+
return _this8.handleChange(index, e, 'bookPay');
|
|
3837
4035
|
}
|
|
3838
4036
|
})
|
|
3839
4037
|
),
|
|
3840
4038
|
_react2.default.createElement(
|
|
3841
4039
|
'span',
|
|
3842
4040
|
{ className: 'minus', onClick: function onClick() {
|
|
3843
|
-
_this8.onDelPay(index, boriginReturn && mode.boriginReturn, mode.paymentType);
|
|
4041
|
+
_this8.onDelPay(index, boriginReturn && mode.boriginReturn, mode.paymentType, 'bookPay');
|
|
3844
4042
|
} },
|
|
3845
4043
|
_react2.default.createElement(_ticon2.default, { type: 'shanchu', className: 'minusIcon primary-color' })
|
|
3846
4044
|
)
|
|
@@ -3974,6 +4172,20 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3974
4172
|
{ className: 'received' },
|
|
3975
4173
|
(0, _utils.getFixedNumber)(Math.abs(paymode.receivable))
|
|
3976
4174
|
)
|
|
4175
|
+
),
|
|
4176
|
+
_react2.default.createElement(
|
|
4177
|
+
'div',
|
|
4178
|
+
{ className: 'receivable', style: { display: DistributionMode && (DistributionMode.Id == 'ELECTRONIC' || DistributionMode.Id == 'CITY_DISTRIBUTE') && BuyerPayFreight && BuyerPayFreight > 0 ? 'block' : 'none' } },
|
|
4179
|
+
_react2.default.createElement(
|
|
4180
|
+
'span',
|
|
4181
|
+
null,
|
|
4182
|
+
'\u8FD0\u8D39'
|
|
4183
|
+
),
|
|
4184
|
+
_react2.default.createElement(
|
|
4185
|
+
'span',
|
|
4186
|
+
{ className: 'received' },
|
|
4187
|
+
(0, _utils.getFixedNumber)(Math.abs(BuyerPayFreight))
|
|
4188
|
+
)
|
|
3977
4189
|
)
|
|
3978
4190
|
),
|
|
3979
4191
|
type != 1 && !isReturn && _react2.default.createElement(
|
|
@@ -4110,6 +4322,20 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4110
4322
|
{ className: 'received' },
|
|
4111
4323
|
(0, _utils.getFixedNumber)(Math.abs(paymode.receivable))
|
|
4112
4324
|
)
|
|
4325
|
+
),
|
|
4326
|
+
_react2.default.createElement(
|
|
4327
|
+
'div',
|
|
4328
|
+
{ className: 'receivable', style: { display: DistributionMode && (DistributionMode.Id == 'ELECTRONIC' || DistributionMode.Id == 'CITY_DISTRIBUTE') && BuyerPayFreight && BuyerPayFreight > 0 ? 'block' : 'none' } },
|
|
4329
|
+
_react2.default.createElement(
|
|
4330
|
+
'span',
|
|
4331
|
+
null,
|
|
4332
|
+
'\u8FD0\u8D39'
|
|
4333
|
+
),
|
|
4334
|
+
_react2.default.createElement(
|
|
4335
|
+
'span',
|
|
4336
|
+
{ className: 'received' },
|
|
4337
|
+
(0, _utils.getFixedNumber)(Math.abs(BuyerPayFreight))
|
|
4338
|
+
)
|
|
4113
4339
|
)
|
|
4114
4340
|
),
|
|
4115
4341
|
type != 1 && !isReturn && _react2.default.createElement(
|
|
@@ -4204,7 +4430,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4204
4430
|
_this8.onHotKeyClick1(mode, index, boriginReturn);
|
|
4205
4431
|
}
|
|
4206
4432
|
} else {
|
|
4207
|
-
_this8.onHotKeyClick1(mode, index, boriginReturn);
|
|
4433
|
+
_this8.onHotKeyClick1(mode, index, boriginReturn, 'bookPay');
|
|
4208
4434
|
}
|
|
4209
4435
|
},
|
|
4210
4436
|
value: mode.paymentType == PayStyle.hyczk ? (0, _utils.getFixedNumber)((0, _reduce3.default)((0, _filter3.default)(thePaymodes, function (tm) {
|
|
@@ -4216,16 +4442,16 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4216
4442
|
disabled: _this8.checkModeDisabled(mode.paymentType, brefund, boriginReturn) || _this8.checkScanDisabled(mode.paymentType),
|
|
4217
4443
|
value: mode.exchangeRate != 1 ? mode.value2 : mode.value,
|
|
4218
4444
|
onClick: function onClick(e) {
|
|
4219
|
-
return _this8.onHotKeyClick2(index, mode, paymode, e);
|
|
4445
|
+
return _this8.onHotKeyClick2(index, mode, paymode, e, 'bookPay');
|
|
4220
4446
|
},
|
|
4221
4447
|
onBlur: function onBlur(e) {
|
|
4222
|
-
return _this8.onBlur(index, e);
|
|
4448
|
+
return _this8.onBlur(index, e, 'bookPay');
|
|
4223
4449
|
},
|
|
4224
4450
|
onFocus: function onFocus(e) {
|
|
4225
4451
|
return _this8.onFocusHack(index, mode, paymode, e);
|
|
4226
4452
|
},
|
|
4227
4453
|
onChange: function onChange(e) {
|
|
4228
|
-
return _this8.handleChange(index, e);
|
|
4454
|
+
return _this8.handleChange(index, e, 'bookPay');
|
|
4229
4455
|
}
|
|
4230
4456
|
})
|
|
4231
4457
|
)
|
|
@@ -4434,22 +4660,22 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4434
4660
|
return _this8.czkInput = input;
|
|
4435
4661
|
},
|
|
4436
4662
|
onKeyDown: function () {
|
|
4437
|
-
var
|
|
4663
|
+
var _ref34 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee17(e) {
|
|
4438
4664
|
var time, _paymode;
|
|
4439
4665
|
|
|
4440
|
-
return _regenerator2.default.wrap(function
|
|
4666
|
+
return _regenerator2.default.wrap(function _callee17$(_context17) {
|
|
4441
4667
|
while (1) {
|
|
4442
|
-
switch (
|
|
4668
|
+
switch (_context17.prev = _context17.next) {
|
|
4443
4669
|
case 0:
|
|
4444
4670
|
if (!(e.keyCode == 13)) {
|
|
4445
|
-
|
|
4671
|
+
_context17.next = 14;
|
|
4446
4672
|
break;
|
|
4447
4673
|
}
|
|
4448
4674
|
|
|
4449
4675
|
time = Date.parse(new Date());
|
|
4450
4676
|
|
|
4451
4677
|
if (!(_this8.isStorageCardInputType && time - _this8.keypressStime > 350)) {
|
|
4452
|
-
|
|
4678
|
+
_context17.next = 7;
|
|
4453
4679
|
break;
|
|
4454
4680
|
}
|
|
4455
4681
|
|
|
@@ -4458,11 +4684,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4458
4684
|
_this8.setState({
|
|
4459
4685
|
czkValue: null
|
|
4460
4686
|
});
|
|
4461
|
-
return
|
|
4687
|
+
return _context17.abrupt('return');
|
|
4462
4688
|
|
|
4463
4689
|
case 7:
|
|
4464
4690
|
_this8.keypressStime = null;
|
|
4465
|
-
|
|
4691
|
+
_context17.next = 10;
|
|
4466
4692
|
return _this8.loadCzk(e.target.value);
|
|
4467
4693
|
|
|
4468
4694
|
case 10:
|
|
@@ -4473,7 +4699,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4473
4699
|
czkvalue: null
|
|
4474
4700
|
});
|
|
4475
4701
|
}
|
|
4476
|
-
|
|
4702
|
+
_context17.next = 15;
|
|
4477
4703
|
break;
|
|
4478
4704
|
|
|
4479
4705
|
case 14:
|
|
@@ -4483,14 +4709,14 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4483
4709
|
|
|
4484
4710
|
case 15:
|
|
4485
4711
|
case 'end':
|
|
4486
|
-
return
|
|
4712
|
+
return _context17.stop();
|
|
4487
4713
|
}
|
|
4488
4714
|
}
|
|
4489
|
-
},
|
|
4715
|
+
}, _callee17, _this8);
|
|
4490
4716
|
}));
|
|
4491
4717
|
|
|
4492
|
-
return function (
|
|
4493
|
-
return
|
|
4718
|
+
return function (_x13) {
|
|
4719
|
+
return _ref34.apply(this, arguments);
|
|
4494
4720
|
};
|
|
4495
4721
|
}(),
|
|
4496
4722
|
onFocus: function onFocus(e) {
|
|
@@ -4547,8 +4773,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4547
4773
|
_this8.setCurrentModeValue(event.target.value, Math.min(currentMode.maxamount, currentMode.balance));
|
|
4548
4774
|
},
|
|
4549
4775
|
defaultValue: currentMode && (0, _utils.getFixedNumber)(brefund ? currentMode.value : Math.min(currentMode.value, currentMode.maxamount, currentMode.balance)),
|
|
4550
|
-
ref: function ref(
|
|
4551
|
-
return _this8["inputCzkAmount"] =
|
|
4776
|
+
ref: function ref(_ref35) {
|
|
4777
|
+
return _this8["inputCzkAmount"] = _ref35;
|
|
4552
4778
|
},
|
|
4553
4779
|
onFocus: function onFocus(e) {
|
|
4554
4780
|
_this8.inputkey = "inputCzkAmount";
|
|
@@ -5218,8 +5444,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
5218
5444
|
_this8.setCurrentModeValue(e.target.value, Math.min(currentMode.maxamount, currentMode.member.exchangable));
|
|
5219
5445
|
},
|
|
5220
5446
|
defaultValue: currentMode && currentMode.member && (0, _utils.getFixedNumber)(Math.min(currentMode.value, currentMode.maxamount, currentMode.member.exchangable)),
|
|
5221
|
-
ref: function ref(
|
|
5222
|
-
return _this8["inputJfdxAmount"] =
|
|
5447
|
+
ref: function ref(_ref36) {
|
|
5448
|
+
return _this8["inputJfdxAmount"] = _ref36;
|
|
5223
5449
|
},
|
|
5224
5450
|
onFocus: function onFocus(e) {
|
|
5225
5451
|
_this8.inputkey = "inputJfdxAmount";
|