tplus-components-touch 3.36.1 → 3.36.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -16
- package/dist/components/acCitySelect/CitySelect.js +18 -18
- package/dist/components/acCitySelect/CitySelect.js.map +1 -1
- package/dist/components/acCitySelect/CitySelect.less +9 -9
- package/dist/components/acCitySelect/citys.js.map +1 -1
- package/dist/components/acCitySelect/index.js.map +1 -1
- package/dist/components/acCitySelect/provinceData.js +7 -7
- package/dist/components/acCitySelect/provinceData.js.map +1 -1
- package/dist/components/addLog/AddLogProcessor.js +6 -6
- package/dist/components/addLog/AddLogProcessor.js.map +1 -1
- package/dist/components/addLog/OperationLogApi.js +3 -3
- package/dist/components/addLog/OperationLogApi.js.map +1 -1
- package/dist/components/autoComplete/index.js +14 -14
- package/dist/components/autoComplete/index.js.map +1 -1
- package/dist/components/autoComplete/index.less +89 -89
- package/dist/components/autoComplete/option.js.map +1 -1
- package/dist/components/autoCompleteWithKeyboard/index.js +14 -14
- package/dist/components/autoCompleteWithKeyboard/index.js.map +1 -1
- package/dist/components/autoCompleteWithKeyboard/index.less +7 -7
- package/dist/components/billSearch/api.js +29 -29
- package/dist/components/billSearch/api.js.map +1 -1
- package/dist/components/billSearch/index.js +163 -25
- package/dist/components/billSearch/index.js.map +1 -1
- package/dist/components/billSearch/index.less +376 -373
- package/dist/components/cloudPrint/BTPrintFormatUtil.js +17 -17
- package/dist/components/cloudPrint/BTPrintFormatUtil.js.map +1 -1
- package/dist/components/cloudPrint/api.js +85 -43
- package/dist/components/cloudPrint/api.js.map +1 -1
- package/dist/components/cloudPrint/index.js.map +1 -1
- package/dist/components/cloudPrint/printDispatch.js +211 -108
- package/dist/components/cloudPrint/printDispatch.js.map +1 -1
- package/dist/components/commonForm/addressPicker/index.js +7 -7
- package/dist/components/commonForm/addressPicker/index.js.map +1 -1
- package/dist/components/commonForm/addressPicker/style.less +10 -10
- package/dist/components/commonForm/autoComplete/index.js.map +1 -1
- package/dist/components/commonForm/autoComplete/style.less +2 -2
- package/dist/components/commonForm/datePicker/index.js.map +1 -1
- package/dist/components/commonForm/datePicker/style.less +4 -4
- package/dist/components/commonForm/formControl/index.js.map +1 -1
- package/dist/components/commonForm/index.js +4 -4
- package/dist/components/commonForm/index.js.map +1 -1
- package/dist/components/commonForm/inputNumber/index.js.map +1 -1
- package/dist/components/commonForm/inputNumber/style.less +10 -10
- package/dist/components/commonForm/radio/index.js.map +1 -1
- package/dist/components/commonForm/style.less +1 -1
- package/dist/components/deliverySearch/api.js +21 -21
- package/dist/components/deliverySearch/api.js.map +1 -1
- package/dist/components/deliverySearch/index.js +7 -7
- package/dist/components/deliverySearch/index.js.map +1 -1
- package/dist/components/deliverySearch/index.less +553 -553
- package/dist/components/form/index.js.map +1 -1
- package/dist/components/hardwareAPI/index.js.map +1 -1
- package/dist/components/hotKey/config.js +23 -23
- package/dist/components/hotKey/config.js.map +1 -1
- package/dist/components/hotKey/hotKeyModal.js.map +1 -1
- package/dist/components/hotKey/index.js +26 -26
- package/dist/components/hotKey/index.js.map +1 -1
- package/dist/components/hotKey/localConfig.js +133 -14
- package/dist/components/hotKey/localConfig.js.map +1 -1
- package/dist/components/hotKey/style.less +96 -96
- package/dist/components/hotKey/utils.js.map +1 -1
- package/dist/components/input/index.js +6 -6
- package/dist/components/input/index.js.map +1 -1
- package/dist/components/input/scanInput.js.map +1 -1
- package/dist/components/input/scanInput.less +27 -27
- package/dist/components/input/style.less +99 -99
- package/dist/components/input/tplusInput/index.js +30 -30
- package/dist/components/input/tplusInput/index.js.map +1 -1
- package/dist/components/input/tplusInput/inputContent.js.map +1 -1
- package/dist/components/input/tplusInput/inputs.js.map +1 -1
- package/dist/components/input/tplusInput/style.less +132 -132
- package/dist/components/input/utils/index.js.map +1 -1
- package/dist/components/inventorySearch/api.js +58 -58
- package/dist/components/inventorySearch/api.js.map +1 -1
- package/dist/components/inventorySearch/index.js +3 -3
- package/dist/components/inventorySearch/index.js.map +1 -1
- package/dist/components/inventorySearch/index.less +119 -119
- package/dist/components/inventorySearch/store.js.map +1 -1
- package/dist/components/inventorySearch/tab.js +77 -67
- package/dist/components/inventorySearch/tab.js.map +1 -1
- package/dist/components/keyboard/index.js.map +1 -1
- package/dist/components/keyboard/index.less +469 -469
- package/dist/components/keyboard/letterKeyboard.js +2 -2
- package/dist/components/keyboard/letterKeyboard.js.map +1 -1
- package/dist/components/keyboard/numKeyboard.js +4 -4
- package/dist/components/keyboard/numKeyboard.js.map +1 -1
- package/dist/components/keyboard/numKeyboardScan.js.map +1 -1
- package/dist/components/keyboard/numberButton_input.js +9 -7
- package/dist/components/keyboard/numberButton_input.js.map +1 -1
- package/dist/components/keyboard/numkeyboardPassword.js +4 -4
- package/dist/components/keyboard/numkeyboardPassword.js.map +1 -1
- package/dist/components/keyboard/onlyKeyboard.js +7 -7
- package/dist/components/keyboard/onlyKeyboard.js.map +1 -1
- package/dist/components/keyboard/onlyLetterButton.js +2 -2
- package/dist/components/keyboard/onlyLetterButton.js.map +1 -1
- package/dist/components/keyboard/onlyLetterButton2.js +2 -2
- package/dist/components/keyboard/onlyLetterButton2.js.map +1 -1
- package/dist/components/keyboard/onlyLetterButton2.less +156 -161
- package/dist/components/keyboard/onlyNumberButton.js +2 -2
- package/dist/components/keyboard/onlyNumberButton.js.map +1 -1
- package/dist/components/keyboard/onlyNumberButton2.js +3 -3
- package/dist/components/keyboard/onlyNumberButton2.js.map +1 -1
- package/dist/components/keyboard/textKeyboard.js.map +1 -1
- package/dist/components/layout/hamburger.js.map +1 -1
- package/dist/components/layout/index.js +10 -10
- package/dist/components/layout/index.js.map +1 -1
- package/dist/components/layout/layout.js.map +1 -1
- package/dist/components/layout/sider.js +12 -12
- package/dist/components/layout/sider.js.map +1 -1
- package/dist/components/layout/style.less +82 -82
- package/dist/components/loading/index.js +15 -15
- package/dist/components/loading/index.js.map +1 -1
- package/dist/components/loading/loadingContent.js +1 -1
- package/dist/components/loading/loadingContent.js.map +1 -1
- package/dist/components/loading/style.less +72 -72
- package/dist/components/loading/utils.js.map +1 -1
- package/dist/components/message/index.js +8 -8
- package/dist/components/message/index.js.map +1 -1
- package/dist/components/message/index.less +101 -101
- package/dist/components/modal/index.js.map +1 -1
- package/dist/components/modal/index.less +19 -19
- package/dist/components/modalVertical/index.js +7 -7
- package/dist/components/modalVertical/index.js.map +1 -1
- package/dist/components/modalVertical/style.less +60 -60
- package/dist/components/modalWraper/index.js +16 -16
- package/dist/components/modalWraper/index.js.map +1 -1
- package/dist/components/modalWraper/style.less +257 -257
- package/dist/components/modalWraper/utils.js.map +1 -1
- package/dist/components/notification/index.js +4 -4
- package/dist/components/notification/index.js.map +1 -1
- package/dist/components/notification/index.less +51 -51
- package/dist/components/overflowTip/index.js +15 -15
- package/dist/components/overflowTip/index.js.map +1 -1
- package/dist/components/overflowTip/style.less +66 -66
- package/dist/components/page/index.js.map +1 -1
- package/dist/components/page/index.less +21 -21
- package/dist/components/product/detail.js +7 -7
- package/dist/components/product/detail.js.map +1 -1
- package/dist/components/product/getCard.js +5 -5
- package/dist/components/product/getCard.js.map +1 -1
- package/dist/components/product/index.less +128 -128
- package/dist/components/progressState/EmptyAndErrorView.js +4 -3
- package/dist/components/progressState/EmptyAndErrorView.js.map +1 -1
- package/dist/components/progressState/ProgressState.js +12 -11
- package/dist/components/progressState/ProgressState.js.map +1 -1
- package/dist/components/progressState/index.js.map +1 -1
- package/dist/components/progressState/style.less +65 -65
- package/dist/components/scan/index.js.map +1 -1
- package/dist/components/scan/index.less +33 -33
- package/dist/components/select/index.js.map +1 -1
- package/dist/components/select/index.less +11 -11
- package/dist/components/settlement/asyncModal.js.map +1 -1
- package/dist/components/settlement/index.js +9 -0
- package/dist/components/settlement/index.js.map +1 -1
- package/dist/components/settlement/moreCzkTable/index.js +156 -0
- package/dist/components/settlement/moreCzkTable/index.js.map +1 -0
- package/dist/components/settlement/moreCzkTable/style.less +7 -0
- package/dist/components/settlement/prototypeTable/index.js +3 -1
- package/dist/components/settlement/prototypeTable/index.js.map +1 -1
- package/dist/components/settlement/prototypeTable/style.less +58 -58
- package/dist/components/settlement/prototypeTable/utils.js.map +1 -1
- package/dist/components/settlement/settlement.js +761 -514
- package/dist/components/settlement/settlement.js.map +1 -1
- package/dist/components/settlement/settlement.less +1686 -1595
- package/dist/components/settlement/settlementStore.js +1072 -463
- package/dist/components/settlement/settlementStore.js.map +1 -1
- package/dist/components/settlement/utils.js.map +1 -1
- package/dist/components/socket/index.js +11 -11
- package/dist/components/socket/index.js.map +1 -1
- package/dist/components/spin/index.js +6 -6
- package/dist/components/spin/index.js.map +1 -1
- package/dist/components/spin/spin-style.less +436 -436
- package/dist/components/test/index.js +3 -3
- package/dist/components/test/index.js.map +1 -1
- package/dist/components/ticon/iconfont/demo.css +539 -539
- package/dist/components/ticon/iconfont/demo_index.html +5248 -5202
- package/dist/components/ticon/iconfont/iconfont.css +895 -887
- package/dist/components/ticon/iconfont/iconfont.js +6 -6
- package/dist/components/ticon/iconfont/iconfont.js.map +1 -1
- package/dist/components/ticon/iconfont/iconfont.json +1549 -1535
- package/dist/components/ticon/iconfont/iconfont.svg +593 -593
- 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/ticon/index.js.map +1 -1
- package/dist/components/touchScroll/index.js +15 -11
- package/dist/components/touchScroll/index.js.map +1 -1
- package/dist/components/touchTable/AuthProcess.js.map +1 -1
- package/dist/components/touchTable/generateWater.js.map +1 -1
- package/dist/components/touchTable/index.js +14 -13
- package/dist/components/touchTable/index.js.map +1 -1
- package/dist/components/touchTable/index.less +376 -369
- package/dist/components/touchTable/utils.js.map +1 -1
- package/dist/demo/PopOverDemo.js.map +1 -1
- package/dist/index.js +20 -8
- package/dist/index.js.map +1 -1
- package/dist/util/tools.js.map +1 -1
- package/locales/zh/tplus-components-touch.json +1 -1
- package/locales/zh-CN/tplus-components-touch.json +1 -1
- package/mocks/memberInfo.json +79 -79
- package/package.json +1 -1
- package/tsconfig.json +26 -26
|
@@ -160,10 +160,6 @@ var _modalWraper2 = _interopRequireDefault(_modalWraper);
|
|
|
160
160
|
|
|
161
161
|
var _utils = require('./utils');
|
|
162
162
|
|
|
163
|
-
var _settlementStore = require('./settlementStore');
|
|
164
|
-
|
|
165
|
-
var _settlementStore2 = _interopRequireDefault(_settlementStore);
|
|
166
|
-
|
|
167
163
|
var _keyboard = require('../keyboard');
|
|
168
164
|
|
|
169
165
|
var _keyboard2 = _interopRequireDefault(_keyboard);
|
|
@@ -208,6 +204,12 @@ var _index2 = require('./prototypeTable/index');
|
|
|
208
204
|
|
|
209
205
|
var _index3 = _interopRequireDefault(_index2);
|
|
210
206
|
|
|
207
|
+
var _tplusComponentsTouch = require('tplus-components-touch');
|
|
208
|
+
|
|
209
|
+
var _moreCzkTable = require('./moreCzkTable');
|
|
210
|
+
|
|
211
|
+
var _moreCzkTable2 = _interopRequireDefault(_moreCzkTable);
|
|
212
|
+
|
|
211
213
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
212
214
|
|
|
213
215
|
var hasElectron = _mutantsMicrofx.env.platform === _mutantsMicrofx.env.constant.platform.electron;
|
|
@@ -215,7 +217,6 @@ var hasElectron = _mutantsMicrofx.env.platform === _mutantsMicrofx.env.constant.
|
|
|
215
217
|
var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_React$Component) {
|
|
216
218
|
(0, _inherits3.default)(Settlement, _React$Component);
|
|
217
219
|
|
|
218
|
-
// 复核结算方式快捷键列表
|
|
219
220
|
function Settlement(props) {
|
|
220
221
|
var _this3 = this;
|
|
221
222
|
|
|
@@ -228,6 +229,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
228
229
|
czkVisible: false,
|
|
229
230
|
djqVisible: false,
|
|
230
231
|
jfdxVisible: false,
|
|
232
|
+
moreCzkVisible: false,
|
|
231
233
|
showSetPwdModal: false,
|
|
232
234
|
prototypeVisible: false, // 优惠明细弹出框
|
|
233
235
|
currentIndex: 0,
|
|
@@ -246,6 +248,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
246
248
|
protytypeCount: null,
|
|
247
249
|
isPrototypeClick: false,
|
|
248
250
|
dataSource: [],
|
|
251
|
+
memberdata1: [],
|
|
249
252
|
discountTotalAmount: null,
|
|
250
253
|
discountRetailTotalAount: null,
|
|
251
254
|
discountPrototypeTotalAmount: null,
|
|
@@ -253,14 +256,17 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
253
256
|
currentKey: null,
|
|
254
257
|
couponLight: true,
|
|
255
258
|
storageValue: '0.00',
|
|
256
|
-
czkValue: null
|
|
259
|
+
czkValue: null,
|
|
260
|
+
isInputMember: false,
|
|
261
|
+
selectedRowIndex: 0
|
|
262
|
+
// 复核结算方式快捷键列表
|
|
263
|
+
};
|
|
257
264
|
_this2.compoundHotkeysList = (window.$.operationControl[5] ? window.$.operationControl[5].control || [] : []).map(function (key) {
|
|
258
265
|
return key.toLocaleUpperCase();
|
|
259
266
|
});
|
|
260
267
|
_this2.hotkeydebounced = null;
|
|
261
268
|
_this2.hotkeydebouncedPayMode = "";
|
|
262
269
|
_this2.currentInput = null;
|
|
263
|
-
_this2.store = new _settlementStore2.default();
|
|
264
270
|
|
|
265
271
|
_this2.resizeSettlementToolBtns = function () {
|
|
266
272
|
var newStyle = _this2.store.newStyle;
|
|
@@ -300,12 +306,12 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
300
306
|
_this2.inputkey = "inputJfdxAmount";
|
|
301
307
|
_this2["inputJfdxAmount"].input.value = currentMode && (0, _utils.getFixedNumber)(Math.min(currentMode.value, currentMode.maxamount, currentMode.member.exchangable));
|
|
302
308
|
_this2.setCurrentModeValue(_this2.inputJfdxAmount.input.value, Math.min(currentMode.maxamount, currentMode.member.exchangable));
|
|
303
|
-
} else if (_this2.state.czkVisible && currentMode && currentMode.value >= 0 && currentMode.
|
|
309
|
+
} else if (_this2.state.czkVisible && currentMode && currentMode.value >= 0 && currentMode.balance !== undefined) {
|
|
304
310
|
_this2.inputkey = "inputCzkAmount";
|
|
305
|
-
_this2["inputCzkAmount"] && _this2["inputCzkAmount"].input && (_this2["inputCzkAmount"].input.value = (0, _utils.getFixedNumber)(Math.min(currentMode.value, currentMode.maxamount, currentMode.
|
|
306
|
-
var maxamount = Math.min(currentMode.maxamount, currentMode.
|
|
311
|
+
_this2["inputCzkAmount"] && _this2["inputCzkAmount"].input && (_this2["inputCzkAmount"].input.value = (0, _utils.getFixedNumber)(Math.min(currentMode.value, currentMode.maxamount, currentMode.balance)));
|
|
312
|
+
var maxamount = Math.min(currentMode.maxamount, currentMode.balance);
|
|
307
313
|
_this2.inputCzkAmount && _this2.inputCzkAmount.input && _this2.setCurrentModeValue(_this2.inputCzkAmount.input.value, maxamount);
|
|
308
|
-
if (_this2.store.bquick && currentMode.
|
|
314
|
+
if (_this2.store.bquick && currentMode.storageCardNo && parseFloat(_this2.store.paymode.amount) > parseFloat(maxamount)) {
|
|
309
315
|
_message2.default.error("本单最大可用储值卡结算金额为:" + (0, _utils.getFixedNumber)(maxamount) + ",请使用复合结算!", {
|
|
310
316
|
duration: 4
|
|
311
317
|
});
|
|
@@ -325,7 +331,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
325
331
|
var _enumController$getEn = _mutantsUtil.enumController.getEnumOj(),
|
|
326
332
|
PayStyle = _enumController$getEn.PayStyle;
|
|
327
333
|
|
|
328
|
-
_this2.store.init(_this2.props.type == 1 ? null : _this2.context, _this2.props.onHandleAmount, _this2.props.dataSource.Code_02, _this2.props.storeInfo, true, _this2.props.amount, _this2.props.type, _this2.props.dto);
|
|
334
|
+
_this2.store.init(_this2.props.type == 1 ? null : _this2.context, _this2.props.onHandleAmount, _this2.props.dataSource.Code_02, _this2.props.storeInfo, true, _this2.props.amount, _this2.props.type, _this2.props.dto, currentKey);
|
|
329
335
|
var amount = _this2.store.paymode.amount;
|
|
330
336
|
if (amount == 0) {
|
|
331
337
|
_this2.settleZero();
|
|
@@ -355,7 +361,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
355
361
|
isReturn = _this2$props.isReturn,
|
|
356
362
|
type = _this2$props.type;
|
|
357
363
|
|
|
358
|
-
_promise2.default.resolve(!_this2.props.onValidate || _this2.props.onValidate()).then(function (result) {
|
|
364
|
+
_promise2.default.resolve(!_this2.props.onValidate || _this2.props.onValidate({ isNotAutoFocus: true })).then(function (result) {
|
|
359
365
|
if (result) {
|
|
360
366
|
_this2.setState({
|
|
361
367
|
settleDisabled: false
|
|
@@ -419,6 +425,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
419
425
|
return (0, _assign2.default)({}, o);
|
|
420
426
|
});
|
|
421
427
|
var discountRetailTotalAount = null;
|
|
428
|
+
var discountPrototypeTotalAmount = 0;
|
|
422
429
|
var count = 0;
|
|
423
430
|
dataSource && dataSource.forEach(function (item) {
|
|
424
431
|
var count1 = 0;
|
|
@@ -442,15 +449,14 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
442
449
|
} else {
|
|
443
450
|
item.badge = { text: '', position: '', className: '' };
|
|
444
451
|
}
|
|
445
|
-
if (!item.IsPresent) {
|
|
446
|
-
discountRetailTotalAount += item.RetailPrice * item.Quantity;
|
|
447
|
-
}
|
|
448
452
|
if (item.PromotionDetails && item.PromotionDetails.length > 0) {
|
|
449
453
|
count++;
|
|
450
454
|
}
|
|
451
455
|
item.InventoryName = item.Inventory.Name;
|
|
452
456
|
item.Discount = (0, _utils.getRoundValue)(item.RetailPrice - item.TaxPrice, pricePrecision);
|
|
453
|
-
|
|
457
|
+
discountPrototypeTotalAmount += item.DetailDiscountAmount;
|
|
458
|
+
//item.TotalDiscount = getFixedNumber(item.Discount * item.Quantity);
|
|
459
|
+
item.TotalDiscount = item.DetailDiscountAmount;
|
|
454
460
|
item.nAmount = (0, _utils.getFixedNumber)(item.TaxAmount);
|
|
455
461
|
item.UnitName = item.Unit.Name;
|
|
456
462
|
item.nQuantity = (0, _utils.getRoundValue)(item.Quantity, quantityPrecision);
|
|
@@ -459,11 +465,10 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
459
465
|
});
|
|
460
466
|
_this2.setState({
|
|
461
467
|
dataSource: dataSource,
|
|
462
|
-
discountTotalAmount: (0, _utils.getFixedNumber)(
|
|
463
|
-
|
|
464
|
-
|
|
468
|
+
discountTotalAmount: (0, _utils.getFixedNumber)(_this2.props.amount),
|
|
469
|
+
discountPrototypeTotalAmount: (0, _utils.getFixedNumber)(discountPrototypeTotalAmount),
|
|
470
|
+
discountRetailTotalAount: (0, _utils.getFixedNumber)(_this2.props.amount + discountPrototypeTotalAmount)
|
|
465
471
|
});
|
|
466
|
-
console.log(RetailDetails, 'RetailDetails-----');
|
|
467
472
|
return count;
|
|
468
473
|
};
|
|
469
474
|
|
|
@@ -553,68 +558,30 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
553
558
|
});
|
|
554
559
|
};
|
|
555
560
|
|
|
556
|
-
_this2.
|
|
557
|
-
var _enumController$getEn2 = _mutantsUtil.enumController.getEnumOj(),
|
|
558
|
-
PayStyle = _enumController$getEn2.PayStyle;
|
|
559
|
-
|
|
560
|
-
var _ref = _mutantsUtil.platform || {},
|
|
561
|
-
isNewRetailBCPos = _ref.isNewRetailBCPos;
|
|
562
|
-
|
|
563
|
-
_this2.store.setCurrentMode(id, PayStyle.hyczk, append);
|
|
561
|
+
_this2.handleCzkMoreData = function (params) {
|
|
564
562
|
_this2._val = _this2.store.paymode.currentMode.value;
|
|
565
563
|
var currentMode = _this2.store.paymode.currentMode;
|
|
566
564
|
|
|
567
|
-
var maxamount = Math.min(currentMode.maxamount, currentMode.
|
|
568
|
-
if (_this2.store.bquick && currentMode.
|
|
565
|
+
var maxamount = Math.min(currentMode.maxamount, currentMode.balance);
|
|
566
|
+
if (_this2.store.bquick && currentMode.storageCardNo && parseFloat(_this2.store.paymode.amount) > parseFloat(maxamount)) {
|
|
569
567
|
_message2.default.error("本单最大可用储值卡结算金额为:" + (0, _utils.getFixedNumber)(maxamount) + ",请使用复合结算!", {
|
|
570
568
|
duration: 4
|
|
571
569
|
});
|
|
572
570
|
} else {
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
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
|
-
});
|
|
571
|
+
if (params) {
|
|
572
|
+
_this2.setState({
|
|
573
|
+
czkVisible: true
|
|
574
|
+
});
|
|
575
|
+
}
|
|
609
576
|
var brefund = _this2.store.brefund;
|
|
610
577
|
|
|
611
|
-
var value11 = currentMode && (0, _utils.getFixedNumber)(brefund ? currentMode.value : Math.min(currentMode.value, currentMode.maxamount, currentMode.
|
|
578
|
+
var value11 = currentMode && (0, _utils.getFixedNumber)(brefund ? currentMode.value : Math.min(currentMode.value, currentMode.maxamount, currentMode.balance));
|
|
612
579
|
_this2.setState({
|
|
613
580
|
storageValue: value11
|
|
614
581
|
});
|
|
615
|
-
if (currentMode.
|
|
582
|
+
if (currentMode.storageCardNo) {
|
|
616
583
|
_this2.setState({
|
|
617
|
-
czkValue: currentMode.
|
|
584
|
+
czkValue: currentMode.storageCardNo
|
|
618
585
|
});
|
|
619
586
|
} else {
|
|
620
587
|
_this2.setState({
|
|
@@ -622,86 +589,68 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
622
589
|
});
|
|
623
590
|
}
|
|
624
591
|
}
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
_this2.inputCzkAmount.input
|
|
631
|
-
|
|
592
|
+
if (params) {
|
|
593
|
+
setTimeout(function () {
|
|
594
|
+
if (!currentMode.storageCardNo) {
|
|
595
|
+
_this2.czkInput && _this2.czkInput.input.focus();
|
|
596
|
+
} else {
|
|
597
|
+
if (_this2.inputCzkAmount && _this2.inputCzkAmount.input) {
|
|
598
|
+
_this2.inputCzkAmount.input.focus();
|
|
599
|
+
_this2.inputCzkAmount.input.setSelectionRange(0, _this2.inputCzkAmount.input.value.length);
|
|
600
|
+
}
|
|
632
601
|
}
|
|
633
|
-
}
|
|
634
|
-
}
|
|
635
|
-
_this2.connectRfCard();
|
|
602
|
+
}, 500);
|
|
603
|
+
}
|
|
636
604
|
};
|
|
637
605
|
|
|
638
|
-
_this2.
|
|
639
|
-
var
|
|
640
|
-
var _enumController$
|
|
606
|
+
_this2.showCzkModal = function () {
|
|
607
|
+
var _ref = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee(id, append) {
|
|
608
|
+
var _enumController$getEn2, PayStyle, _ref2, isInputMember, memberdata1;
|
|
641
609
|
|
|
642
610
|
return _regenerator2.default.wrap(function _callee$(_context) {
|
|
643
611
|
while (1) {
|
|
644
612
|
switch (_context.prev = _context.next) {
|
|
645
613
|
case 0:
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
// Message.error("本单最大可用储值卡结算金额为:"+getFixedNumber(maxamount)+",请使用复合结算!");
|
|
649
|
-
// this.setState({
|
|
650
|
-
// czkVisible: false,
|
|
651
|
-
// });
|
|
652
|
-
// return;
|
|
653
|
-
// }
|
|
654
|
-
_enumController$getEn3 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn3.PayStyle;
|
|
655
|
-
|
|
656
|
-
if (_this2.store.paymode.currentMode.member.id) {
|
|
657
|
-
_context.next = 4;
|
|
658
|
-
break;
|
|
659
|
-
}
|
|
614
|
+
_this2.connectRfCard();
|
|
615
|
+
_enumController$getEn2 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn2.PayStyle;
|
|
660
616
|
|
|
661
|
-
|
|
662
|
-
|
|
617
|
+
_this2.store.setCurrentMode(id, PayStyle.hyczk, append);
|
|
618
|
+
_ref2 = _this2.state || {}, isInputMember = _ref2.isInputMember;
|
|
619
|
+
_context.t0 = isInputMember && _this2.store.paymode.currentMode.memberId;
|
|
663
620
|
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
_context.next = 7;
|
|
621
|
+
if (!_context.t0) {
|
|
622
|
+
_context.next = 9;
|
|
667
623
|
break;
|
|
668
624
|
}
|
|
669
625
|
|
|
670
|
-
|
|
671
|
-
return
|
|
626
|
+
_context.next = 8;
|
|
627
|
+
return _this2.store.updateCurrentMode(_this2.store.paymode.currentMode.memberId);
|
|
672
628
|
|
|
673
|
-
case
|
|
674
|
-
|
|
675
|
-
return mode.paymethodId != _this2.store.paymode.currentMode.paymethodId && mode.paymentType == PayStyle.hyczk && mode.member.id == _this2.store.paymode.currentMode.member.id;
|
|
676
|
-
})) {
|
|
677
|
-
_context.next = 10;
|
|
678
|
-
break;
|
|
679
|
-
}
|
|
680
|
-
|
|
681
|
-
_message2.default.error("该储值卡已使用。");
|
|
682
|
-
return _context.abrupt('return');
|
|
629
|
+
case 8:
|
|
630
|
+
_context.t0 = _context.sent;
|
|
683
631
|
|
|
684
|
-
case
|
|
685
|
-
|
|
686
|
-
_context.next = 13;
|
|
687
|
-
break;
|
|
688
|
-
}
|
|
689
|
-
|
|
690
|
-
_message2.default.error("实收金额应等于应收金额。");
|
|
691
|
-
return _context.abrupt('return');
|
|
692
|
-
|
|
693
|
-
case 13:
|
|
632
|
+
case 9:
|
|
633
|
+
memberdata1 = _context.t0;
|
|
694
634
|
|
|
695
635
|
_this2.setState({
|
|
696
|
-
czkVisible:
|
|
697
|
-
storageValue: '0.00',
|
|
698
|
-
czkvalue: null
|
|
636
|
+
czkVisible: true
|
|
699
637
|
});
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
638
|
+
if (memberdata1 && memberdata1.length === 1) {
|
|
639
|
+
_this2.handleCzkMoreData(true);
|
|
640
|
+
_this2.store.handleCzkData(memberdata1[0]);
|
|
641
|
+
} else if (memberdata1 && memberdata1.length >= 1) {
|
|
642
|
+
_this2.setState({
|
|
643
|
+
moreCzkVisible: true,
|
|
644
|
+
memberdata1: memberdata1
|
|
645
|
+
});
|
|
646
|
+
} else {
|
|
647
|
+
_this2.setState({});
|
|
648
|
+
setTimeout(function () {
|
|
649
|
+
_this2.czkInput && _this2.czkInput.input.focus();
|
|
650
|
+
}, 300);
|
|
651
|
+
}
|
|
703
652
|
|
|
704
|
-
case
|
|
653
|
+
case 12:
|
|
705
654
|
case 'end':
|
|
706
655
|
return _context.stop();
|
|
707
656
|
}
|
|
@@ -709,8 +658,141 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
709
658
|
}, _callee, _this3);
|
|
710
659
|
}));
|
|
711
660
|
|
|
712
|
-
return function (_x) {
|
|
713
|
-
return
|
|
661
|
+
return function (_x, _x2) {
|
|
662
|
+
return _ref.apply(this, arguments);
|
|
663
|
+
};
|
|
664
|
+
}();
|
|
665
|
+
|
|
666
|
+
_this2.handleMoreCzkCancel = function () {
|
|
667
|
+
_this2.setState({
|
|
668
|
+
moreCzkVisible: false,
|
|
669
|
+
selectedRowIndex: 0
|
|
670
|
+
});
|
|
671
|
+
setTimeout(function () {
|
|
672
|
+
_this2.czkInput && _this2.czkInput.input.focus();
|
|
673
|
+
}, 300);
|
|
674
|
+
};
|
|
675
|
+
|
|
676
|
+
_this2.setMoreCzkIndex = function (index) {
|
|
677
|
+
_this2.setState({
|
|
678
|
+
selectedRowIndex: index
|
|
679
|
+
});
|
|
680
|
+
};
|
|
681
|
+
|
|
682
|
+
_this2.handleMoreCzkOk = function () {
|
|
683
|
+
var _this2$state = _this2.state,
|
|
684
|
+
memberdata1 = _this2$state.memberdata1,
|
|
685
|
+
selectedRowIndex = _this2$state.selectedRowIndex;
|
|
686
|
+
|
|
687
|
+
_this2.store.paymode.updateCardInfo(memberdata1[selectedRowIndex]);
|
|
688
|
+
_this2.handleCzkMoreData();
|
|
689
|
+
_this2.store.handleCzkData(memberdata1[selectedRowIndex]);
|
|
690
|
+
_this2.setState({
|
|
691
|
+
moreCzkVisible: false,
|
|
692
|
+
selectedRowIndex: 0
|
|
693
|
+
});
|
|
694
|
+
};
|
|
695
|
+
|
|
696
|
+
_this2.handleCzkData = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2() {
|
|
697
|
+
var _enumController$getEn3, PayStyle;
|
|
698
|
+
|
|
699
|
+
return _regenerator2.default.wrap(function _callee2$(_context2) {
|
|
700
|
+
while (1) {
|
|
701
|
+
switch (_context2.prev = _context2.next) {
|
|
702
|
+
case 0:
|
|
703
|
+
_this2.setState({
|
|
704
|
+
isInputMember: false
|
|
705
|
+
});
|
|
706
|
+
_enumController$getEn3 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn3.PayStyle;
|
|
707
|
+
|
|
708
|
+
if (_this2.store.paymode.currentMode.storageCardNo) {
|
|
709
|
+
_context2.next = 5;
|
|
710
|
+
break;
|
|
711
|
+
}
|
|
712
|
+
|
|
713
|
+
_context2.next = 5;
|
|
714
|
+
return _this2.store.loadCzk(_this2.czkInput.input.value);
|
|
715
|
+
|
|
716
|
+
case 5:
|
|
717
|
+
if (_this2.store.paymode.currentMode.storageCardNo) {
|
|
718
|
+
_context2.next = 8;
|
|
719
|
+
break;
|
|
720
|
+
}
|
|
721
|
+
|
|
722
|
+
_message2.default.error("请录入储值卡!");
|
|
723
|
+
return _context2.abrupt('return');
|
|
724
|
+
|
|
725
|
+
case 8:
|
|
726
|
+
if (!(0, _find3.default)(_this2.store.paymode.thePaymodes, function (mode) {
|
|
727
|
+
return mode.paymethodId != _this2.store.paymode.currentMode.paymethodId && mode.paymentType == PayStyle.hyczk && mode.storageCardNo == _this2.store.paymode.currentMode.storageCardNo;
|
|
728
|
+
})) {
|
|
729
|
+
_context2.next = 11;
|
|
730
|
+
break;
|
|
731
|
+
}
|
|
732
|
+
|
|
733
|
+
_message2.default.error("该储值卡已使用。");
|
|
734
|
+
return _context2.abrupt('return');
|
|
735
|
+
|
|
736
|
+
case 11:
|
|
737
|
+
if (!(_this2.store.bquick && _this2.store.paymode.amount != _this2.store.paymode.currentMode.value)) {
|
|
738
|
+
_context2.next = 14;
|
|
739
|
+
break;
|
|
740
|
+
}
|
|
741
|
+
|
|
742
|
+
_message2.default.error("实收金额应等于应收金额。");
|
|
743
|
+
return _context2.abrupt('return');
|
|
744
|
+
|
|
745
|
+
case 14:
|
|
746
|
+
|
|
747
|
+
_this2.setState({
|
|
748
|
+
czkVisible: false,
|
|
749
|
+
storageValue: '0.00',
|
|
750
|
+
czkValue: null
|
|
751
|
+
});
|
|
752
|
+
_this2.closeRfCard();
|
|
753
|
+
_this2.store.paymode.calcMemberBalance();
|
|
754
|
+
_this2.handleCzk();
|
|
755
|
+
|
|
756
|
+
case 18:
|
|
757
|
+
case 'end':
|
|
758
|
+
return _context2.stop();
|
|
759
|
+
}
|
|
760
|
+
}
|
|
761
|
+
}, _callee2, _this3);
|
|
762
|
+
}));
|
|
763
|
+
|
|
764
|
+
_this2.handleCzkOk = function () {
|
|
765
|
+
var _ref4 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee3(e) {
|
|
766
|
+
var _this2$store$paymode$, walletEnabled, cardTypeEnum, freePaymentPasswordStore, isNeedPassword;
|
|
767
|
+
|
|
768
|
+
return _regenerator2.default.wrap(function _callee3$(_context3) {
|
|
769
|
+
while (1) {
|
|
770
|
+
switch (_context3.prev = _context3.next) {
|
|
771
|
+
case 0:
|
|
772
|
+
// 判断是否有密码
|
|
773
|
+
_this2$store$paymode$ = _this2.store.paymode.currentMode, walletEnabled = _this2$store$paymode$.walletEnabled, cardTypeEnum = _this2$store$paymode$.cardTypeEnum, freePaymentPasswordStore = _this2$store$paymode$.freePaymentPasswordStore, isNeedPassword = _this2$store$paymode$.isNeedPassword;
|
|
774
|
+
|
|
775
|
+
if (cardTypeEnum === 'BALANCE_CARD' && freePaymentPasswordStore) {
|
|
776
|
+
_this2.handleCzkData();
|
|
777
|
+
} else if (cardTypeEnum === 'BALANCE_CARD' && !walletEnabled) {
|
|
778
|
+
_this2.setState({
|
|
779
|
+
showSetPwdModal: true,
|
|
780
|
+
btnDissabled: true
|
|
781
|
+
});
|
|
782
|
+
} else {
|
|
783
|
+
_this2.handleCzkData();
|
|
784
|
+
}
|
|
785
|
+
|
|
786
|
+
case 2:
|
|
787
|
+
case 'end':
|
|
788
|
+
return _context3.stop();
|
|
789
|
+
}
|
|
790
|
+
}
|
|
791
|
+
}, _callee3, _this3);
|
|
792
|
+
}));
|
|
793
|
+
|
|
794
|
+
return function (_x3) {
|
|
795
|
+
return _ref4.apply(this, arguments);
|
|
714
796
|
};
|
|
715
797
|
}();
|
|
716
798
|
|
|
@@ -722,7 +804,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
722
804
|
_this2.setState({
|
|
723
805
|
czkVisible: false,
|
|
724
806
|
storageValue: '0.00',
|
|
725
|
-
|
|
807
|
+
czkValue: null
|
|
726
808
|
});
|
|
727
809
|
_this2.closeRfCard();
|
|
728
810
|
_keyboard2.default.close();
|
|
@@ -735,23 +817,24 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
735
817
|
});
|
|
736
818
|
};
|
|
737
819
|
|
|
738
|
-
_this2.handleSetModal = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function
|
|
739
|
-
var _this2$
|
|
820
|
+
_this2.handleSetModal = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee4() {
|
|
821
|
+
var _this2$state2, newPass, newPassConfirm, isInputMember, updataMemberInfo, result, cardTypeEnum, resp;
|
|
740
822
|
|
|
741
|
-
return _regenerator2.default.wrap(function
|
|
823
|
+
return _regenerator2.default.wrap(function _callee4$(_context4) {
|
|
742
824
|
while (1) {
|
|
743
|
-
switch (
|
|
825
|
+
switch (_context4.prev = _context4.next) {
|
|
744
826
|
case 0:
|
|
745
|
-
_this2$
|
|
827
|
+
_this2$state2 = _this2.state, newPass = _this2$state2.newPass, newPassConfirm = _this2$state2.newPassConfirm, isInputMember = _this2$state2.isInputMember;
|
|
746
828
|
updataMemberInfo = _this2.props.updataMemberInfo;
|
|
747
|
-
|
|
829
|
+
_context4.next = 4;
|
|
748
830
|
return _this2.store.queryPwd(newPass, newPassConfirm);
|
|
749
831
|
|
|
750
832
|
case 4:
|
|
751
|
-
result =
|
|
833
|
+
result = _context4.sent;
|
|
834
|
+
cardTypeEnum = _this2.store.paymode.currentMode.cardTypeEnum;
|
|
752
835
|
|
|
753
836
|
if (!result) {
|
|
754
|
-
|
|
837
|
+
_context4.next = 18;
|
|
755
838
|
break;
|
|
756
839
|
}
|
|
757
840
|
|
|
@@ -762,42 +845,68 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
762
845
|
newPassConfirm: ''
|
|
763
846
|
});
|
|
764
847
|
_message2.default.warn('设置成功');
|
|
765
|
-
|
|
766
|
-
|
|
848
|
+
_this2.handleCzkData();
|
|
767
849
|
setTimeout(function () {
|
|
768
|
-
if (
|
|
769
|
-
_this2.
|
|
770
|
-
|
|
771
|
-
if (_this2.inputCzkAmount && _this2.inputCzkAmount.input) {
|
|
772
|
-
_this2.inputCzkAmount.input.focus();
|
|
773
|
-
_this2.inputCzkAmount.input.setSelectionRange(0, _this2.inputCzkAmount.input.value.length);
|
|
774
|
-
}
|
|
850
|
+
if (_this2.inputCzkAmount && _this2.inputCzkAmount.input) {
|
|
851
|
+
_this2.inputCzkAmount.input.focus();
|
|
852
|
+
_this2.inputCzkAmount.input.setSelectionRange(0, _this2.inputCzkAmount.input.value.length);
|
|
775
853
|
}
|
|
776
854
|
}, 350);
|
|
777
|
-
|
|
778
|
-
|
|
855
|
+
|
|
856
|
+
if (!(isInputMember && _this2.store.member.ID)) {
|
|
857
|
+
_context4.next = 16;
|
|
858
|
+
break;
|
|
859
|
+
}
|
|
860
|
+
|
|
861
|
+
_context4.next = 14;
|
|
779
862
|
return _this2.store.updateMemberInfo(_this2.store);
|
|
780
863
|
|
|
781
|
-
case
|
|
782
|
-
resp =
|
|
864
|
+
case 14:
|
|
865
|
+
resp = _context4.sent;
|
|
783
866
|
|
|
784
867
|
updataMemberInfo(resp);
|
|
785
868
|
|
|
786
|
-
case
|
|
869
|
+
case 16:
|
|
870
|
+
if (cardTypeEnum === 'BALANCE_CARD') {
|
|
871
|
+
_this2.store.paymode.updateCardInfo();
|
|
872
|
+
}
|
|
873
|
+
_this2.setState({
|
|
874
|
+
isInputMember: false
|
|
875
|
+
});
|
|
876
|
+
|
|
877
|
+
case 18:
|
|
787
878
|
case 'end':
|
|
788
|
-
return
|
|
879
|
+
return _context4.stop();
|
|
789
880
|
}
|
|
790
881
|
}
|
|
791
|
-
},
|
|
882
|
+
}, _callee4, _this3);
|
|
792
883
|
}));
|
|
793
884
|
|
|
885
|
+
_this2.onPressEnterCzk = function (field) {
|
|
886
|
+
var _ref6 = _this2.state || {},
|
|
887
|
+
_ref6$newPass = _ref6.newPass,
|
|
888
|
+
newPass = _ref6$newPass === undefined ? '' : _ref6$newPass,
|
|
889
|
+
_ref6$newPassConfirm = _ref6.newPassConfirm,
|
|
890
|
+
newPassConfirm = _ref6$newPassConfirm === undefined ? '' : _ref6$newPassConfirm;
|
|
891
|
+
|
|
892
|
+
if (field === 'newPass' && newPass.length === 6) {
|
|
893
|
+
_this2.inputConfirmAmount.input.focus();
|
|
894
|
+
}
|
|
895
|
+
if (field === 'newPassConfirm' && newPassConfirm.length === 6 && newPass.length === 6 && newPass === newPassConfirm) {
|
|
896
|
+
_this2.handleSetModal();
|
|
897
|
+
}
|
|
898
|
+
};
|
|
899
|
+
|
|
794
900
|
_this2.setPwdValue = function (field, value) {
|
|
901
|
+
if (!/^[0-9]*$/.test(value)) {
|
|
902
|
+
return;
|
|
903
|
+
}
|
|
795
904
|
_this2.setState((0, _defineProperty3.default)({}, field, value), function () {
|
|
796
|
-
var
|
|
797
|
-
|
|
798
|
-
newPass =
|
|
799
|
-
|
|
800
|
-
newPassConfirm =
|
|
905
|
+
var _ref7 = _this2.state || {},
|
|
906
|
+
_ref7$newPass = _ref7.newPass,
|
|
907
|
+
newPass = _ref7$newPass === undefined ? '' : _ref7$newPass,
|
|
908
|
+
_ref7$newPassConfirm = _ref7.newPassConfirm,
|
|
909
|
+
newPassConfirm = _ref7$newPassConfirm === undefined ? '' : _ref7$newPassConfirm;
|
|
801
910
|
|
|
802
911
|
if (newPassConfirm.length === 6 && newPass.length === 6 && newPass === newPassConfirm) {
|
|
803
912
|
_this2.setState({
|
|
@@ -808,15 +917,15 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
808
917
|
};
|
|
809
918
|
|
|
810
919
|
_this2.handleBlur = function (field) {
|
|
811
|
-
var
|
|
812
|
-
|
|
813
|
-
newPass =
|
|
814
|
-
|
|
815
|
-
newPassConfirm =
|
|
920
|
+
var _ref8 = _this2.state || {},
|
|
921
|
+
_ref8$newPass = _ref8.newPass,
|
|
922
|
+
newPass = _ref8$newPass === undefined ? '' : _ref8$newPass,
|
|
923
|
+
_ref8$newPassConfirm = _ref8.newPassConfirm,
|
|
924
|
+
newPassConfirm = _ref8$newPassConfirm === undefined ? '' : _ref8$newPassConfirm;
|
|
816
925
|
|
|
817
926
|
setTimeout(function () {
|
|
818
|
-
var
|
|
819
|
-
showSetPwdModal =
|
|
927
|
+
var _ref9 = _this2.state || {},
|
|
928
|
+
showSetPwdModal = _ref9.showSetPwdModal;
|
|
820
929
|
|
|
821
930
|
if (!showSetPwdModal) return;
|
|
822
931
|
if (field === 'newPass' && newPass.length < 6) {
|
|
@@ -873,8 +982,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
873
982
|
|
|
874
983
|
// TODO: 测试优惠券支付
|
|
875
984
|
|
|
876
|
-
var
|
|
877
|
-
isNewRetailBCPos =
|
|
985
|
+
var _ref10 = _mutantsUtil.platform || {},
|
|
986
|
+
isNewRetailBCPos = _ref10.isNewRetailBCPos;
|
|
878
987
|
|
|
879
988
|
if (isNewRetailBCPos && !_this2.store.paymode.currentMode.boriginReturn) {
|
|
880
989
|
_this2.store.getCouponList();
|
|
@@ -958,8 +1067,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
958
1067
|
};
|
|
959
1068
|
|
|
960
1069
|
_this2.checkOfflineEnable = function (paymode, key) {
|
|
961
|
-
var
|
|
962
|
-
paymodes =
|
|
1070
|
+
var _ref11 = paymode || {},
|
|
1071
|
+
paymodes = _ref11.paymodes;
|
|
963
1072
|
|
|
964
1073
|
var isOffline = _mutantsMicrofx.stores.offlineSys.isOffline;
|
|
965
1074
|
|
|
@@ -990,7 +1099,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
990
1099
|
paymode.currentMode = null;
|
|
991
1100
|
switch (key) {
|
|
992
1101
|
case PayStyle.hyczk:
|
|
993
|
-
_this2.
|
|
1102
|
+
_this2.setState({
|
|
1103
|
+
isInputMember: true
|
|
1104
|
+
}, function () {
|
|
1105
|
+
_this2.showCzkModal(-1);
|
|
1106
|
+
});
|
|
994
1107
|
break;
|
|
995
1108
|
case PayStyle.jfdx:
|
|
996
1109
|
_this2.showJfdxModal(-1);
|
|
@@ -1099,7 +1212,6 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1099
1212
|
boriginReturn = _this2$store3.boriginReturn;
|
|
1100
1213
|
var noAlreadyWarn = _this2.state.noAlreadyWarn;
|
|
1101
1214
|
|
|
1102
|
-
|
|
1103
1215
|
if (!_mutantsMicrofx.stores.offlineSys.shouldSettlement(key)) return false;
|
|
1104
1216
|
|
|
1105
1217
|
if (_this2.checkModeDisabled(key, brefund, boriginReturn)) {
|
|
@@ -1169,12 +1281,12 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1169
1281
|
}
|
|
1170
1282
|
};
|
|
1171
1283
|
|
|
1172
|
-
_this2.setCurrentFocusAndAddPay = function (key) {
|
|
1284
|
+
_this2.setCurrentFocusAndAddPay = function (key, payId) {
|
|
1173
1285
|
_this2.store.changeFocusAndAddPay(key);
|
|
1174
1286
|
if (_this2.store.bquick) {
|
|
1175
1287
|
_this2.handleSettle("quickPay");
|
|
1176
1288
|
} else {
|
|
1177
|
-
_this2.setFocusAndSelection(key);
|
|
1289
|
+
_this2.setFocusAndSelection(key, payId);
|
|
1178
1290
|
}
|
|
1179
1291
|
};
|
|
1180
1292
|
|
|
@@ -1205,7 +1317,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1205
1317
|
PayStyle = _enumController$getEn13.PayStyle;
|
|
1206
1318
|
|
|
1207
1319
|
var reg = /^[\d.]+$/g;
|
|
1208
|
-
if (_this2.store.paymode.currentMode.paymentType === PayStyle.hyczk) {
|
|
1320
|
+
if (_this2.store.paymode.currentMode.paymentType === PayStyle.hyczk || _this2.store.paymode.currentMode.paymentType === PayStyle.jfdx) {
|
|
1209
1321
|
if (!val) {
|
|
1210
1322
|
_this2.setState({
|
|
1211
1323
|
storageValue: val
|
|
@@ -1236,19 +1348,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1236
1348
|
}
|
|
1237
1349
|
}
|
|
1238
1350
|
// let bjfdx=this.store.paymode.currentMode.paymentType==PayStyle.jfdx;
|
|
1239
|
-
|
|
1240
|
-
var amountMaxLength = parseInt(_this2.props.initData["AmountMaxLength"] || 10);
|
|
1241
|
-
if (isNaN(val) && val !== '-') {
|
|
1242
|
-
value = _this2._val;
|
|
1243
|
-
} else if (!_this2.store.brefund && !isNaN(val) && parseFloat(val) <= 0) {
|
|
1244
|
-
value = _this2._val;
|
|
1245
|
-
} else if (value.length > amountMaxLength) {
|
|
1246
|
-
value = _this2._val;
|
|
1247
|
-
} else {
|
|
1248
|
-
_this2._val = val;
|
|
1249
|
-
}
|
|
1250
|
-
_this2[_this2.inputkey].input.value = value;
|
|
1251
|
-
_this2.store.paymode.setCurrentModeValue(value, max);
|
|
1351
|
+
_this2.store.paymode.setCurrentModeValue(val, max);
|
|
1252
1352
|
};
|
|
1253
1353
|
|
|
1254
1354
|
_this2.onBlur = function (index, e) {
|
|
@@ -1307,8 +1407,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1307
1407
|
return;
|
|
1308
1408
|
}
|
|
1309
1409
|
|
|
1310
|
-
var
|
|
1311
|
-
isNewRetailBCPos =
|
|
1410
|
+
var _ref12 = _mutantsUtil.platform || {},
|
|
1411
|
+
isNewRetailBCPos = _ref12.isNewRetailBCPos;
|
|
1312
1412
|
|
|
1313
1413
|
if (isNewRetailBCPos) {
|
|
1314
1414
|
_this2.store.paymode.calcDjqCheckValue(q, _this2.store.dto);
|
|
@@ -1343,27 +1443,38 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1343
1443
|
if (_this2.czkdebounced) {
|
|
1344
1444
|
return;
|
|
1345
1445
|
}
|
|
1346
|
-
_this2.czkdebounced = (0, _debounce3.default)((0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function
|
|
1347
|
-
|
|
1446
|
+
_this2.czkdebounced = (0, _debounce3.default)((0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee5() {
|
|
1447
|
+
var memberdata1;
|
|
1448
|
+
return _regenerator2.default.wrap(function _callee5$(_context5) {
|
|
1348
1449
|
while (1) {
|
|
1349
|
-
switch (
|
|
1450
|
+
switch (_context5.prev = _context5.next) {
|
|
1350
1451
|
case 0:
|
|
1351
|
-
|
|
1452
|
+
_context5.next = 2;
|
|
1352
1453
|
return _this2.store.loadCzk(v);
|
|
1353
1454
|
|
|
1354
1455
|
case 2:
|
|
1355
|
-
|
|
1456
|
+
memberdata1 = _context5.sent;
|
|
1457
|
+
|
|
1458
|
+
if (memberdata1 && memberdata1.length === 1) {
|
|
1459
|
+
if (_this2.store.paymode.currentMode.storageCardNo) {
|
|
1460
|
+
_this2.setState({
|
|
1461
|
+
czkValue: _this2.store.paymode.currentMode.storageCardNo
|
|
1462
|
+
});
|
|
1463
|
+
}
|
|
1464
|
+
} else if (memberdata1 && memberdata1.length >= 1) {
|
|
1356
1465
|
_this2.setState({
|
|
1357
|
-
|
|
1466
|
+
czkVisible: true,
|
|
1467
|
+
moreCzkVisible: true,
|
|
1468
|
+
memberdata1: memberdata1
|
|
1358
1469
|
});
|
|
1359
1470
|
}
|
|
1360
1471
|
|
|
1361
|
-
case
|
|
1472
|
+
case 4:
|
|
1362
1473
|
case 'end':
|
|
1363
|
-
return
|
|
1474
|
+
return _context5.stop();
|
|
1364
1475
|
}
|
|
1365
1476
|
}
|
|
1366
|
-
},
|
|
1477
|
+
}, _callee5, _this3);
|
|
1367
1478
|
})), 1000, {
|
|
1368
1479
|
'leading': true,
|
|
1369
1480
|
'trailing': false
|
|
@@ -1531,13 +1642,21 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1531
1642
|
return null;
|
|
1532
1643
|
};
|
|
1533
1644
|
|
|
1534
|
-
_this2.setFocusAndSelection = function (key) {
|
|
1645
|
+
_this2.setFocusAndSelection = function (key, payId) {
|
|
1535
1646
|
var that = _this2;
|
|
1536
1647
|
var paymode = _this2.store.paymode;
|
|
1537
1648
|
|
|
1649
|
+
var _enumController$getEn19 = _mutantsUtil.enumController.getEnumOj(),
|
|
1650
|
+
PayStyle = _enumController$getEn19.PayStyle;
|
|
1651
|
+
|
|
1538
1652
|
var themode = (0, _find3.default)(paymode.thePaymodes, function (mode) {
|
|
1539
1653
|
return mode.paymentType === key;
|
|
1540
1654
|
});
|
|
1655
|
+
if (key === PayStyle.hyczk) {
|
|
1656
|
+
themode = (0, _find3.default)(paymode.thePaymodes, function (mode) {
|
|
1657
|
+
return mode.paymethodId === payId;
|
|
1658
|
+
});
|
|
1659
|
+
}
|
|
1541
1660
|
var index = themode && themode.paymethodId || -1;
|
|
1542
1661
|
if (index !== -1) {
|
|
1543
1662
|
setTimeout(function () {
|
|
@@ -1552,11 +1671,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1552
1671
|
}
|
|
1553
1672
|
};
|
|
1554
1673
|
|
|
1555
|
-
_this2.settleUnReturn = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function
|
|
1674
|
+
_this2.settleUnReturn = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee7() {
|
|
1556
1675
|
var that;
|
|
1557
|
-
return _regenerator2.default.wrap(function
|
|
1676
|
+
return _regenerator2.default.wrap(function _callee7$(_context7) {
|
|
1558
1677
|
while (1) {
|
|
1559
|
-
switch (
|
|
1678
|
+
switch (_context7.prev = _context7.next) {
|
|
1560
1679
|
case 0:
|
|
1561
1680
|
that = _this2;
|
|
1562
1681
|
|
|
@@ -1579,18 +1698,18 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1579
1698
|
onOk: function onOk() {
|
|
1580
1699
|
var _this4 = this;
|
|
1581
1700
|
|
|
1582
|
-
return (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function
|
|
1701
|
+
return (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee6() {
|
|
1583
1702
|
var result;
|
|
1584
|
-
return _regenerator2.default.wrap(function
|
|
1703
|
+
return _regenerator2.default.wrap(function _callee6$(_context6) {
|
|
1585
1704
|
while (1) {
|
|
1586
|
-
switch (
|
|
1705
|
+
switch (_context6.prev = _context6.next) {
|
|
1587
1706
|
case 0:
|
|
1588
1707
|
window.__queryingModal = (0, _utils.openQueryingModal)();
|
|
1589
|
-
|
|
1708
|
+
_context6.next = 3;
|
|
1590
1709
|
return that.store.querySettleResult();
|
|
1591
1710
|
|
|
1592
1711
|
case 3:
|
|
1593
|
-
result =
|
|
1712
|
+
result = _context6.sent;
|
|
1594
1713
|
|
|
1595
1714
|
setTimeout(function () {
|
|
1596
1715
|
if (window.__queryingModal) {
|
|
@@ -1598,34 +1717,34 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1598
1717
|
window.__queryingModal = null;
|
|
1599
1718
|
}
|
|
1600
1719
|
}, 0);
|
|
1601
|
-
|
|
1602
|
-
|
|
1720
|
+
_context6.t0 = result.Flag;
|
|
1721
|
+
_context6.next = _context6.t0 === "0" ? 8 : _context6.t0 === "1" ? 11 : _context6.t0 === "2" ? 13 : 15;
|
|
1603
1722
|
break;
|
|
1604
1723
|
|
|
1605
1724
|
case 8:
|
|
1606
1725
|
//成功
|
|
1607
1726
|
that.store.setDtoID(result.ID);
|
|
1608
1727
|
that.settleSuccess();
|
|
1609
|
-
return
|
|
1728
|
+
return _context6.abrupt('break', 15);
|
|
1610
1729
|
|
|
1611
1730
|
case 11:
|
|
1612
1731
|
//处理中
|
|
1613
1732
|
that.settleUnReturn();
|
|
1614
1733
|
// Message.info("结算正在处理中,请稍后再次查询。");
|
|
1615
|
-
return
|
|
1734
|
+
return _context6.abrupt('break', 15);
|
|
1616
1735
|
|
|
1617
1736
|
case 13:
|
|
1618
1737
|
//失败
|
|
1619
1738
|
_message2.default.info('\u7ED3\u7B97\u5931\u8D25\uFF0C\u539F\u56E0:' + result.Message + '\u3002');
|
|
1620
1739
|
// that.settleCanceled();
|
|
1621
|
-
return
|
|
1740
|
+
return _context6.abrupt('break', 15);
|
|
1622
1741
|
|
|
1623
1742
|
case 15:
|
|
1624
1743
|
case 'end':
|
|
1625
|
-
return
|
|
1744
|
+
return _context6.stop();
|
|
1626
1745
|
}
|
|
1627
1746
|
}
|
|
1628
|
-
},
|
|
1747
|
+
}, _callee6, _this4);
|
|
1629
1748
|
}))();
|
|
1630
1749
|
},
|
|
1631
1750
|
onCancel: function onCancel() {
|
|
@@ -1635,10 +1754,10 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1635
1754
|
|
|
1636
1755
|
case 2:
|
|
1637
1756
|
case 'end':
|
|
1638
|
-
return
|
|
1757
|
+
return _context7.stop();
|
|
1639
1758
|
}
|
|
1640
1759
|
}
|
|
1641
|
-
},
|
|
1760
|
+
}, _callee7, _this3);
|
|
1642
1761
|
}));
|
|
1643
1762
|
|
|
1644
1763
|
_this2.settleCanceled = function () {
|
|
@@ -1647,15 +1766,15 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1647
1766
|
_this2.cancelState();
|
|
1648
1767
|
};
|
|
1649
1768
|
|
|
1650
|
-
_this2.settleSuccess = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function
|
|
1651
|
-
var _enumController$
|
|
1769
|
+
_this2.settleSuccess = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee8() {
|
|
1770
|
+
var _enumController$getEn20, PayStyle, _this2$store$paymode, amount, received, thePaymodes, IdbusiType, charge, openCashBox, _this, showTwoScreen, getSettleGift, type, resp1;
|
|
1652
1771
|
|
|
1653
|
-
return _regenerator2.default.wrap(function
|
|
1772
|
+
return _regenerator2.default.wrap(function _callee8$(_context8) {
|
|
1654
1773
|
while (1) {
|
|
1655
|
-
switch (
|
|
1774
|
+
switch (_context8.prev = _context8.next) {
|
|
1656
1775
|
case 0:
|
|
1657
1776
|
//提示成功
|
|
1658
|
-
_enumController$
|
|
1777
|
+
_enumController$getEn20 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn20.PayStyle;
|
|
1659
1778
|
_this2$store$paymode = _this2.store.paymode, amount = _this2$store$paymode.amount, received = _this2$store$paymode.received, thePaymodes = _this2$store$paymode.thePaymodes;
|
|
1660
1779
|
IdbusiType = _this2.store.dto.IdbusiType;
|
|
1661
1780
|
charge = _this2.store.paymode.charge;
|
|
@@ -1713,22 +1832,22 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1713
1832
|
resp1 = false;
|
|
1714
1833
|
|
|
1715
1834
|
if (!(type !== 1)) {
|
|
1716
|
-
|
|
1835
|
+
_context8.next = 20;
|
|
1717
1836
|
break;
|
|
1718
1837
|
}
|
|
1719
1838
|
|
|
1720
|
-
|
|
1721
|
-
|
|
1839
|
+
_context8.prev = 11;
|
|
1840
|
+
_context8.next = 14;
|
|
1722
1841
|
return getSettleGift();
|
|
1723
1842
|
|
|
1724
1843
|
case 14:
|
|
1725
|
-
resp1 =
|
|
1726
|
-
|
|
1844
|
+
resp1 = _context8.sent;
|
|
1845
|
+
_context8.next = 20;
|
|
1727
1846
|
break;
|
|
1728
1847
|
|
|
1729
1848
|
case 17:
|
|
1730
|
-
|
|
1731
|
-
|
|
1849
|
+
_context8.prev = 17;
|
|
1850
|
+
_context8.t0 = _context8['catch'](11);
|
|
1732
1851
|
|
|
1733
1852
|
console.log("获取支付礼包getSettleGift失败");
|
|
1734
1853
|
|
|
@@ -1766,23 +1885,23 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1766
1885
|
|
|
1767
1886
|
case 21:
|
|
1768
1887
|
case 'end':
|
|
1769
|
-
return
|
|
1888
|
+
return _context8.stop();
|
|
1770
1889
|
}
|
|
1771
1890
|
}
|
|
1772
|
-
},
|
|
1891
|
+
}, _callee8, _this3, [[11, 17]]);
|
|
1773
1892
|
}));
|
|
1774
1893
|
|
|
1775
1894
|
_this2.handleGuestShow = function (dtype, value) {
|
|
1776
1895
|
if (_this2.hasElectron === false) return;
|
|
1777
1896
|
var dt = _mutantsMicrofx.localStore.get('portsetting_hardSet') || [];
|
|
1778
1897
|
|
|
1779
|
-
var
|
|
1780
|
-
guestshow_enable =
|
|
1781
|
-
guestshow_clear =
|
|
1782
|
-
guestshow_welcome =
|
|
1783
|
-
guestshow_collect =
|
|
1784
|
-
guestshow_refund =
|
|
1785
|
-
guestshow_change =
|
|
1898
|
+
var _ref16 = dt || {},
|
|
1899
|
+
guestshow_enable = _ref16.guestshow_enable,
|
|
1900
|
+
guestshow_clear = _ref16.guestshow_clear,
|
|
1901
|
+
guestshow_welcome = _ref16.guestshow_welcome,
|
|
1902
|
+
guestshow_collect = _ref16.guestshow_collect,
|
|
1903
|
+
guestshow_refund = _ref16.guestshow_refund,
|
|
1904
|
+
guestshow_change = _ref16.guestshow_change;
|
|
1786
1905
|
|
|
1787
1906
|
var hasSuccess = _mutantsMicrofx.localStore && _mutantsMicrofx.localStore.get('portsetting_hardSet_isSuccess');
|
|
1788
1907
|
if (!guestshow_enable || !!guestshow_enable && hasSuccess == '0') return;
|
|
@@ -1817,124 +1936,114 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1817
1936
|
};
|
|
1818
1937
|
|
|
1819
1938
|
_this2.handleSettle = function () {
|
|
1820
|
-
var
|
|
1939
|
+
var _ref17 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee11(args) {
|
|
1821
1940
|
var handleUserInputs = function () {
|
|
1822
|
-
var
|
|
1941
|
+
var _ref19 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee10(promises) {
|
|
1823
1942
|
var results, _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, p, _result;
|
|
1824
1943
|
|
|
1825
|
-
return _regenerator2.default.wrap(function
|
|
1944
|
+
return _regenerator2.default.wrap(function _callee10$(_context10) {
|
|
1826
1945
|
while (1) {
|
|
1827
|
-
switch (
|
|
1946
|
+
switch (_context10.prev = _context10.next) {
|
|
1828
1947
|
case 0:
|
|
1829
1948
|
results = [];
|
|
1830
|
-
|
|
1949
|
+
_context10.prev = 1;
|
|
1831
1950
|
_iteratorNormalCompletion = true;
|
|
1832
1951
|
_didIteratorError = false;
|
|
1833
1952
|
_iteratorError = undefined;
|
|
1834
|
-
|
|
1953
|
+
_context10.prev = 5;
|
|
1835
1954
|
_iterator = (0, _getIterator3.default)(promises);
|
|
1836
1955
|
|
|
1837
1956
|
case 7:
|
|
1838
1957
|
if (_iteratorNormalCompletion = (_step = _iterator.next()).done) {
|
|
1839
|
-
|
|
1958
|
+
_context10.next = 16;
|
|
1840
1959
|
break;
|
|
1841
1960
|
}
|
|
1842
1961
|
|
|
1843
1962
|
p = _step.value;
|
|
1844
|
-
|
|
1963
|
+
_context10.next = 11;
|
|
1845
1964
|
return p;
|
|
1846
1965
|
|
|
1847
1966
|
case 11:
|
|
1848
|
-
_result =
|
|
1967
|
+
_result = _context10.sent;
|
|
1849
1968
|
|
|
1850
1969
|
results.push(_result);
|
|
1851
1970
|
|
|
1852
1971
|
case 13:
|
|
1853
1972
|
_iteratorNormalCompletion = true;
|
|
1854
|
-
|
|
1973
|
+
_context10.next = 7;
|
|
1855
1974
|
break;
|
|
1856
1975
|
|
|
1857
1976
|
case 16:
|
|
1858
|
-
|
|
1977
|
+
_context10.next = 22;
|
|
1859
1978
|
break;
|
|
1860
1979
|
|
|
1861
1980
|
case 18:
|
|
1862
|
-
|
|
1863
|
-
|
|
1981
|
+
_context10.prev = 18;
|
|
1982
|
+
_context10.t0 = _context10['catch'](5);
|
|
1864
1983
|
_didIteratorError = true;
|
|
1865
|
-
_iteratorError =
|
|
1984
|
+
_iteratorError = _context10.t0;
|
|
1866
1985
|
|
|
1867
1986
|
case 22:
|
|
1868
|
-
|
|
1869
|
-
|
|
1987
|
+
_context10.prev = 22;
|
|
1988
|
+
_context10.prev = 23;
|
|
1870
1989
|
|
|
1871
1990
|
if (!_iteratorNormalCompletion && _iterator.return) {
|
|
1872
1991
|
_iterator.return();
|
|
1873
1992
|
}
|
|
1874
1993
|
|
|
1875
1994
|
case 25:
|
|
1876
|
-
|
|
1995
|
+
_context10.prev = 25;
|
|
1877
1996
|
|
|
1878
1997
|
if (!_didIteratorError) {
|
|
1879
|
-
|
|
1998
|
+
_context10.next = 28;
|
|
1880
1999
|
break;
|
|
1881
2000
|
}
|
|
1882
2001
|
|
|
1883
2002
|
throw _iteratorError;
|
|
1884
2003
|
|
|
1885
2004
|
case 28:
|
|
1886
|
-
return
|
|
2005
|
+
return _context10.finish(25);
|
|
1887
2006
|
|
|
1888
2007
|
case 29:
|
|
1889
|
-
return
|
|
2008
|
+
return _context10.finish(22);
|
|
1890
2009
|
|
|
1891
2010
|
case 30:
|
|
1892
2011
|
window.__loadingModal = (0, _utils.openLoadingModal)();
|
|
1893
|
-
|
|
2012
|
+
_context10.next = 33;
|
|
1894
2013
|
return commit(results);
|
|
1895
2014
|
|
|
1896
2015
|
case 33:
|
|
1897
|
-
|
|
2016
|
+
_context10.next = 37;
|
|
1898
2017
|
break;
|
|
1899
2018
|
|
|
1900
2019
|
case 35:
|
|
1901
|
-
|
|
1902
|
-
|
|
2020
|
+
_context10.prev = 35;
|
|
2021
|
+
_context10.t1 = _context10['catch'](1);
|
|
1903
2022
|
|
|
1904
2023
|
case 37:
|
|
1905
2024
|
case 'end':
|
|
1906
|
-
return
|
|
2025
|
+
return _context10.stop();
|
|
1907
2026
|
}
|
|
1908
2027
|
}
|
|
1909
|
-
},
|
|
2028
|
+
}, _callee10, this, [[1, 35], [5, 18, 22, 30], [23,, 25, 29]]);
|
|
1910
2029
|
}));
|
|
1911
2030
|
|
|
1912
|
-
return function handleUserInputs(
|
|
1913
|
-
return
|
|
2031
|
+
return function handleUserInputs(_x6) {
|
|
2032
|
+
return _ref19.apply(this, arguments);
|
|
1914
2033
|
};
|
|
1915
2034
|
}();
|
|
1916
2035
|
|
|
1917
|
-
var _enumController$
|
|
2036
|
+
var _enumController$getEn21, PayStyle, _this2$store6, paymode, brefund, boriginReturn, newStyle, isQuickPay, that, status, zeromode, promises, thePaymodes, quickmode, commit;
|
|
1918
2037
|
|
|
1919
|
-
return _regenerator2.default.wrap(function
|
|
2038
|
+
return _regenerator2.default.wrap(function _callee11$(_context11) {
|
|
1920
2039
|
while (1) {
|
|
1921
|
-
switch (
|
|
2040
|
+
switch (_context11.prev = _context11.next) {
|
|
1922
2041
|
case 0:
|
|
1923
2042
|
_this2.setState({
|
|
1924
2043
|
settleDisabled: true
|
|
1925
2044
|
});
|
|
1926
2045
|
console.log("settlement.handleSettle开始执行,参数:", +args);
|
|
1927
|
-
|
|
1928
|
-
// res(args);
|
|
1929
|
-
// });
|
|
1930
|
-
//
|
|
1931
|
-
// const testAsync = async (p) => {
|
|
1932
|
-
// let result = await p;
|
|
1933
|
-
// console.log(result);
|
|
1934
|
-
// }
|
|
1935
|
-
//
|
|
1936
|
-
// testAsync(p);
|
|
1937
|
-
_enumController$getEn20 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn20.PayStyle;
|
|
2046
|
+
_enumController$getEn21 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn21.PayStyle;
|
|
1938
2047
|
_this2$store6 = _this2.store, paymode = _this2$store6.paymode, brefund = _this2$store6.brefund, boriginReturn = _this2$store6.boriginReturn, newStyle = _this2$store6.newStyle;
|
|
1939
2048
|
isQuickPay = args === 'quickPay';
|
|
1940
2049
|
that = _this2;
|
|
@@ -1950,7 +2059,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1950
2059
|
});
|
|
1951
2060
|
|
|
1952
2061
|
if (!(that.checkCharge() && Math.abs(paymode.receivable) > that.props.initData("posChangeUpperAmount"))) {
|
|
1953
|
-
|
|
2062
|
+
_context11.next = 13;
|
|
1954
2063
|
break;
|
|
1955
2064
|
}
|
|
1956
2065
|
|
|
@@ -1958,11 +2067,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1958
2067
|
_this2.setState({
|
|
1959
2068
|
settleDisabled: false
|
|
1960
2069
|
});
|
|
1961
|
-
return
|
|
2070
|
+
return _context11.abrupt('return');
|
|
1962
2071
|
|
|
1963
2072
|
case 13:
|
|
1964
2073
|
if (!(args !== "zero" && !newStyle)) {
|
|
1965
|
-
|
|
2074
|
+
_context11.next = 19;
|
|
1966
2075
|
break;
|
|
1967
2076
|
}
|
|
1968
2077
|
|
|
@@ -1971,7 +2080,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1971
2080
|
});
|
|
1972
2081
|
|
|
1973
2082
|
if (!zeromode) {
|
|
1974
|
-
|
|
2083
|
+
_context11.next = 19;
|
|
1975
2084
|
break;
|
|
1976
2085
|
}
|
|
1977
2086
|
|
|
@@ -1979,7 +2088,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1979
2088
|
settleDisabled: false
|
|
1980
2089
|
});
|
|
1981
2090
|
_message2.default.error(zeromode.name + ' 的结算金额为零,不可以结算。');
|
|
1982
|
-
return
|
|
2091
|
+
return _context11.abrupt('return');
|
|
1983
2092
|
|
|
1984
2093
|
case 19:
|
|
1985
2094
|
promises = [];
|
|
@@ -1988,14 +2097,14 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1988
2097
|
}) : paymode.thePaymodes, 'orderBy');
|
|
1989
2098
|
|
|
1990
2099
|
if (!isQuickPay) {
|
|
1991
|
-
|
|
2100
|
+
_context11.next = 27;
|
|
1992
2101
|
break;
|
|
1993
2102
|
}
|
|
1994
2103
|
|
|
1995
2104
|
quickmode = thePaymodes[0];
|
|
1996
2105
|
|
|
1997
2106
|
if (!_this2.checkModeDisabled(quickmode.paymentType, brefund, boriginReturn)) {
|
|
1998
|
-
|
|
2107
|
+
_context11.next = 27;
|
|
1999
2108
|
break;
|
|
2000
2109
|
}
|
|
2001
2110
|
|
|
@@ -2003,7 +2112,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2003
2112
|
settleDisabled: false
|
|
2004
2113
|
});
|
|
2005
2114
|
_message2.default.error('退款不能使用' + quickmode.name + '结算,请使用其他结算方式!');
|
|
2006
|
-
return
|
|
2115
|
+
return _context11.abrupt('return');
|
|
2007
2116
|
|
|
2008
2117
|
case 27:
|
|
2009
2118
|
(0, _forEach3.default)(thePaymodes, function (mode) {
|
|
@@ -2013,27 +2122,27 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2013
2122
|
});
|
|
2014
2123
|
|
|
2015
2124
|
commit = function () {
|
|
2016
|
-
var
|
|
2125
|
+
var _ref18 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee9(values) {
|
|
2017
2126
|
var result;
|
|
2018
|
-
return _regenerator2.default.wrap(function
|
|
2127
|
+
return _regenerator2.default.wrap(function _callee9$(_context9) {
|
|
2019
2128
|
while (1) {
|
|
2020
|
-
switch (
|
|
2129
|
+
switch (_context9.prev = _context9.next) {
|
|
2021
2130
|
case 0:
|
|
2022
|
-
|
|
2131
|
+
_context9.next = 2;
|
|
2023
2132
|
return _this2.store.commit(_this2.props.bTest);
|
|
2024
2133
|
|
|
2025
2134
|
case 2:
|
|
2026
|
-
result =
|
|
2135
|
+
result = _context9.sent;
|
|
2027
2136
|
|
|
2028
2137
|
if (!(result === true)) {
|
|
2029
|
-
|
|
2138
|
+
_context9.next = 8;
|
|
2030
2139
|
break;
|
|
2031
2140
|
}
|
|
2032
2141
|
|
|
2033
2142
|
//成功
|
|
2034
2143
|
that.settleSuccess();
|
|
2035
2144
|
_promise2.default.resolve();
|
|
2036
|
-
|
|
2145
|
+
_context9.next = 23;
|
|
2037
2146
|
break;
|
|
2038
2147
|
|
|
2039
2148
|
case 8:
|
|
@@ -2050,24 +2159,24 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2050
2159
|
}, 0);
|
|
2051
2160
|
|
|
2052
2161
|
if (!(result && (result.Code || result.code))) {
|
|
2053
|
-
|
|
2162
|
+
_context9.next = 20;
|
|
2054
2163
|
break;
|
|
2055
2164
|
}
|
|
2056
2165
|
|
|
2057
|
-
|
|
2058
|
-
|
|
2166
|
+
_context9.t0 = result.Code || result.code;
|
|
2167
|
+
_context9.next = _context9.t0 === 'RE_Settle_UnReturn' ? 14 : _context9.t0 === 'ECONNABORTED' ? 18 : 20;
|
|
2059
2168
|
break;
|
|
2060
2169
|
|
|
2061
2170
|
case 14:
|
|
2062
2171
|
console.log('settlement--RE_Settle_UnReturn--调用清除数据==Focus==');
|
|
2063
2172
|
_this2.props.clearVoucherData && _this2.props.clearVoucherData();
|
|
2064
2173
|
_this2.cancelState();
|
|
2065
|
-
return
|
|
2174
|
+
return _context9.abrupt('break', 20);
|
|
2066
2175
|
|
|
2067
2176
|
case 18:
|
|
2068
2177
|
//error.code === 'ECONNABORTED' && error.message.indexOf('timeout')
|
|
2069
2178
|
result.message.indexOf('timeout') > -1 && that.settleUnReturn();
|
|
2070
|
-
return
|
|
2179
|
+
return _context9.abrupt('break', 20);
|
|
2071
2180
|
|
|
2072
2181
|
case 20:
|
|
2073
2182
|
if (isQuickPay) {
|
|
@@ -2075,19 +2184,19 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2075
2184
|
that.cancelState();
|
|
2076
2185
|
}
|
|
2077
2186
|
|
|
2078
|
-
|
|
2187
|
+
_context9.next = 23;
|
|
2079
2188
|
return _promise2.default.reject();
|
|
2080
2189
|
|
|
2081
2190
|
case 23:
|
|
2082
2191
|
case 'end':
|
|
2083
|
-
return
|
|
2192
|
+
return _context9.stop();
|
|
2084
2193
|
}
|
|
2085
2194
|
}
|
|
2086
|
-
},
|
|
2195
|
+
}, _callee9, _this3);
|
|
2087
2196
|
}));
|
|
2088
2197
|
|
|
2089
|
-
return function commit(
|
|
2090
|
-
return
|
|
2198
|
+
return function commit(_x5) {
|
|
2199
|
+
return _ref18.apply(this, arguments);
|
|
2091
2200
|
};
|
|
2092
2201
|
}();
|
|
2093
2202
|
|
|
@@ -2095,102 +2204,102 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2095
2204
|
|
|
2096
2205
|
case 30:
|
|
2097
2206
|
case 'end':
|
|
2098
|
-
return
|
|
2207
|
+
return _context11.stop();
|
|
2099
2208
|
}
|
|
2100
2209
|
}
|
|
2101
|
-
},
|
|
2210
|
+
}, _callee11, _this3);
|
|
2102
2211
|
}));
|
|
2103
2212
|
|
|
2104
|
-
return function (
|
|
2105
|
-
return
|
|
2213
|
+
return function (_x4) {
|
|
2214
|
+
return _ref17.apply(this, arguments);
|
|
2106
2215
|
};
|
|
2107
2216
|
}();
|
|
2108
2217
|
|
|
2109
|
-
_this2.handleCzk = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function
|
|
2218
|
+
_this2.handleCzk = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee14() {
|
|
2110
2219
|
var handleUserInputs = function () {
|
|
2111
|
-
var
|
|
2220
|
+
var _ref23 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee13(promises) {
|
|
2112
2221
|
var results, _iteratorNormalCompletion2, _didIteratorError2, _iteratorError2, _iterator2, _step2, p, _result2;
|
|
2113
2222
|
|
|
2114
|
-
return _regenerator2.default.wrap(function
|
|
2223
|
+
return _regenerator2.default.wrap(function _callee13$(_context13) {
|
|
2115
2224
|
while (1) {
|
|
2116
|
-
switch (
|
|
2225
|
+
switch (_context13.prev = _context13.next) {
|
|
2117
2226
|
case 0:
|
|
2118
2227
|
results = [];
|
|
2119
|
-
|
|
2228
|
+
_context13.prev = 1;
|
|
2120
2229
|
_iteratorNormalCompletion2 = true;
|
|
2121
2230
|
_didIteratorError2 = false;
|
|
2122
2231
|
_iteratorError2 = undefined;
|
|
2123
|
-
|
|
2232
|
+
_context13.prev = 5;
|
|
2124
2233
|
_iterator2 = (0, _getIterator3.default)(promises);
|
|
2125
2234
|
|
|
2126
2235
|
case 7:
|
|
2127
2236
|
if (_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done) {
|
|
2128
|
-
|
|
2237
|
+
_context13.next = 16;
|
|
2129
2238
|
break;
|
|
2130
2239
|
}
|
|
2131
2240
|
|
|
2132
2241
|
p = _step2.value;
|
|
2133
|
-
|
|
2242
|
+
_context13.next = 11;
|
|
2134
2243
|
return p;
|
|
2135
2244
|
|
|
2136
2245
|
case 11:
|
|
2137
|
-
_result2 =
|
|
2246
|
+
_result2 = _context13.sent;
|
|
2138
2247
|
|
|
2139
2248
|
results.push(_result2);
|
|
2140
2249
|
|
|
2141
2250
|
case 13:
|
|
2142
2251
|
_iteratorNormalCompletion2 = true;
|
|
2143
|
-
|
|
2252
|
+
_context13.next = 7;
|
|
2144
2253
|
break;
|
|
2145
2254
|
|
|
2146
2255
|
case 16:
|
|
2147
|
-
|
|
2256
|
+
_context13.next = 22;
|
|
2148
2257
|
break;
|
|
2149
2258
|
|
|
2150
2259
|
case 18:
|
|
2151
|
-
|
|
2152
|
-
|
|
2260
|
+
_context13.prev = 18;
|
|
2261
|
+
_context13.t0 = _context13['catch'](5);
|
|
2153
2262
|
_didIteratorError2 = true;
|
|
2154
|
-
_iteratorError2 =
|
|
2263
|
+
_iteratorError2 = _context13.t0;
|
|
2155
2264
|
|
|
2156
2265
|
case 22:
|
|
2157
|
-
|
|
2158
|
-
|
|
2266
|
+
_context13.prev = 22;
|
|
2267
|
+
_context13.prev = 23;
|
|
2159
2268
|
|
|
2160
2269
|
if (!_iteratorNormalCompletion2 && _iterator2.return) {
|
|
2161
2270
|
_iterator2.return();
|
|
2162
2271
|
}
|
|
2163
2272
|
|
|
2164
2273
|
case 25:
|
|
2165
|
-
|
|
2274
|
+
_context13.prev = 25;
|
|
2166
2275
|
|
|
2167
2276
|
if (!_didIteratorError2) {
|
|
2168
|
-
|
|
2277
|
+
_context13.next = 28;
|
|
2169
2278
|
break;
|
|
2170
2279
|
}
|
|
2171
2280
|
|
|
2172
2281
|
throw _iteratorError2;
|
|
2173
2282
|
|
|
2174
2283
|
case 28:
|
|
2175
|
-
return
|
|
2284
|
+
return _context13.finish(25);
|
|
2176
2285
|
|
|
2177
2286
|
case 29:
|
|
2178
|
-
return
|
|
2287
|
+
return _context13.finish(22);
|
|
2179
2288
|
|
|
2180
2289
|
case 30:
|
|
2181
|
-
|
|
2290
|
+
_context13.next = 32;
|
|
2182
2291
|
return commit(results);
|
|
2183
2292
|
|
|
2184
2293
|
case 32:
|
|
2185
|
-
|
|
2294
|
+
_context13.next = 37;
|
|
2186
2295
|
break;
|
|
2187
2296
|
|
|
2188
2297
|
case 34:
|
|
2189
|
-
|
|
2190
|
-
|
|
2298
|
+
_context13.prev = 34;
|
|
2299
|
+
_context13.t1 = _context13['catch'](1);
|
|
2191
2300
|
|
|
2192
|
-
if (
|
|
2193
|
-
_message2.default.error(
|
|
2301
|
+
if (_context13.t1 != "cancelpwd") {
|
|
2302
|
+
_message2.default.error(_context13.t1);
|
|
2194
2303
|
setTimeout(function () {
|
|
2195
2304
|
that.handleCzk();
|
|
2196
2305
|
}, 500);
|
|
@@ -2198,37 +2307,37 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2198
2307
|
|
|
2199
2308
|
case 37:
|
|
2200
2309
|
case 'end':
|
|
2201
|
-
return
|
|
2310
|
+
return _context13.stop();
|
|
2202
2311
|
}
|
|
2203
2312
|
}
|
|
2204
|
-
},
|
|
2313
|
+
}, _callee13, this, [[1, 34], [5, 18, 22, 30], [23,, 25, 29]]);
|
|
2205
2314
|
}));
|
|
2206
2315
|
|
|
2207
|
-
return function handleUserInputs(
|
|
2208
|
-
return
|
|
2316
|
+
return function handleUserInputs(_x8) {
|
|
2317
|
+
return _ref23.apply(this, arguments);
|
|
2209
2318
|
};
|
|
2210
2319
|
}();
|
|
2211
2320
|
|
|
2212
|
-
var that, curmode, promises,
|
|
2321
|
+
var that, curmode, promises, _ref21, isNewRetailBCPos, _enumController$getEn22, PayStyle, commit;
|
|
2213
2322
|
|
|
2214
|
-
return _regenerator2.default.wrap(function
|
|
2323
|
+
return _regenerator2.default.wrap(function _callee14$(_context14) {
|
|
2215
2324
|
while (1) {
|
|
2216
|
-
switch (
|
|
2325
|
+
switch (_context14.prev = _context14.next) {
|
|
2217
2326
|
case 0:
|
|
2218
2327
|
that = _this2;
|
|
2219
2328
|
curmode = _this2.store.paymode.currentMode;
|
|
2220
2329
|
promises = [];
|
|
2221
|
-
|
|
2330
|
+
_ref21 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref21.isNewRetailBCPos;
|
|
2222
2331
|
|
|
2223
2332
|
if (isNewRetailBCPos) {
|
|
2224
2333
|
if (curmode.value > 0) {
|
|
2225
|
-
_enumController$
|
|
2334
|
+
_enumController$getEn22 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn22.PayStyle;
|
|
2226
2335
|
|
|
2227
2336
|
if (curmode.paymentType === PayStyle.hyczk) {
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
promises.push(that.inputPwd(curmode));
|
|
2337
|
+
if (curmode.cardTypeEnum === 'BALANCE_CARD') {
|
|
2338
|
+
!curmode.freePaymentPasswordStore && promises.push(that.inputPwd(curmode));
|
|
2339
|
+
} else {
|
|
2340
|
+
curmode.isNeedPassword && promises.push(that.inputPwd(curmode));
|
|
2232
2341
|
}
|
|
2233
2342
|
}
|
|
2234
2343
|
}
|
|
@@ -2239,57 +2348,57 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2239
2348
|
}
|
|
2240
2349
|
|
|
2241
2350
|
commit = function () {
|
|
2242
|
-
var
|
|
2351
|
+
var _ref22 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee12(values) {
|
|
2243
2352
|
var result;
|
|
2244
|
-
return _regenerator2.default.wrap(function
|
|
2353
|
+
return _regenerator2.default.wrap(function _callee12$(_context12) {
|
|
2245
2354
|
while (1) {
|
|
2246
|
-
switch (
|
|
2355
|
+
switch (_context12.prev = _context12.next) {
|
|
2247
2356
|
case 0:
|
|
2248
2357
|
if (!(values.length > 0)) {
|
|
2249
|
-
|
|
2358
|
+
_context12.next = 6;
|
|
2250
2359
|
break;
|
|
2251
2360
|
}
|
|
2252
2361
|
|
|
2253
|
-
|
|
2362
|
+
_context12.next = 3;
|
|
2254
2363
|
return that.store.validePwd(values[0]);
|
|
2255
2364
|
|
|
2256
2365
|
case 3:
|
|
2257
|
-
|
|
2258
|
-
|
|
2366
|
+
_context12.t0 = _context12.sent;
|
|
2367
|
+
_context12.next = 7;
|
|
2259
2368
|
break;
|
|
2260
2369
|
|
|
2261
2370
|
case 6:
|
|
2262
|
-
|
|
2371
|
+
_context12.t0 = "";
|
|
2263
2372
|
|
|
2264
2373
|
case 7:
|
|
2265
|
-
result =
|
|
2374
|
+
result = _context12.t0;
|
|
2266
2375
|
|
|
2267
2376
|
if (!(result == "")) {
|
|
2268
|
-
|
|
2377
|
+
_context12.next = 13;
|
|
2269
2378
|
break;
|
|
2270
2379
|
}
|
|
2271
2380
|
|
|
2272
2381
|
//成功
|
|
2273
2382
|
//返回
|
|
2274
|
-
that.setCurrentFocusAndAddPay(curmode.paymentType);
|
|
2383
|
+
that.setCurrentFocusAndAddPay(curmode.paymentType, curmode.paymethodId);
|
|
2275
2384
|
_promise2.default.resolve();
|
|
2276
|
-
|
|
2385
|
+
_context12.next = 15;
|
|
2277
2386
|
break;
|
|
2278
2387
|
|
|
2279
2388
|
case 13:
|
|
2280
|
-
|
|
2389
|
+
_context12.next = 15;
|
|
2281
2390
|
return _promise2.default.reject(result);
|
|
2282
2391
|
|
|
2283
2392
|
case 15:
|
|
2284
2393
|
case 'end':
|
|
2285
|
-
return
|
|
2394
|
+
return _context12.stop();
|
|
2286
2395
|
}
|
|
2287
2396
|
}
|
|
2288
|
-
},
|
|
2397
|
+
}, _callee12, _this3);
|
|
2289
2398
|
}));
|
|
2290
2399
|
|
|
2291
|
-
return function commit(
|
|
2292
|
-
return
|
|
2400
|
+
return function commit(_x7) {
|
|
2401
|
+
return _ref22.apply(this, arguments);
|
|
2293
2402
|
};
|
|
2294
2403
|
}();
|
|
2295
2404
|
|
|
@@ -2297,10 +2406,10 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2297
2406
|
|
|
2298
2407
|
case 7:
|
|
2299
2408
|
case 'end':
|
|
2300
|
-
return
|
|
2409
|
+
return _context14.stop();
|
|
2301
2410
|
}
|
|
2302
2411
|
}
|
|
2303
|
-
},
|
|
2412
|
+
}, _callee14, _this3);
|
|
2304
2413
|
}));
|
|
2305
2414
|
|
|
2306
2415
|
_this2.fKeyboardOnOk = function (paymethodeId) {
|
|
@@ -2340,15 +2449,15 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2340
2449
|
};
|
|
2341
2450
|
|
|
2342
2451
|
_this2.inputPwd = function () {
|
|
2343
|
-
var
|
|
2452
|
+
var _ref24 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee15(paymode) {
|
|
2344
2453
|
var that, confirmPwd;
|
|
2345
|
-
return _regenerator2.default.wrap(function
|
|
2454
|
+
return _regenerator2.default.wrap(function _callee15$(_context15) {
|
|
2346
2455
|
while (1) {
|
|
2347
|
-
switch (
|
|
2456
|
+
switch (_context15.prev = _context15.next) {
|
|
2348
2457
|
case 0:
|
|
2349
2458
|
that = _this2;
|
|
2350
2459
|
confirmPwd = _this2.state.confirmPwd;
|
|
2351
|
-
return
|
|
2460
|
+
return _context15.abrupt('return', new _promise2.default(function (resolve, reject) {
|
|
2352
2461
|
var modal = (0, _asyncModal2.default)({
|
|
2353
2462
|
onPressEnter: function onPressEnter() {
|
|
2354
2463
|
_keyboard2.default.close();
|
|
@@ -2356,8 +2465,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2356
2465
|
// if (v !== '') {
|
|
2357
2466
|
modal.destroy();
|
|
2358
2467
|
|
|
2359
|
-
var
|
|
2360
|
-
confirmPwd =
|
|
2468
|
+
var _ref25 = that.state || {},
|
|
2469
|
+
confirmPwd = _ref25.confirmPwd;
|
|
2361
2470
|
|
|
2362
2471
|
setTimeout(function () {
|
|
2363
2472
|
paymode.authCode = v;
|
|
@@ -2447,8 +2556,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2447
2556
|
type: 'primary', size: 'large', onClick: function onClick() {
|
|
2448
2557
|
var v = (0, _trim3.default)(that['inputAmount']['input']['value']);
|
|
2449
2558
|
|
|
2450
|
-
var
|
|
2451
|
-
confirmPwd =
|
|
2559
|
+
var _ref26 = that.state || {},
|
|
2560
|
+
confirmPwd = _ref26.confirmPwd;
|
|
2452
2561
|
// if (v !== '') {
|
|
2453
2562
|
|
|
2454
2563
|
|
|
@@ -2482,24 +2591,25 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2482
2591
|
|
|
2483
2592
|
case 3:
|
|
2484
2593
|
case 'end':
|
|
2485
|
-
return
|
|
2594
|
+
return _context15.stop();
|
|
2486
2595
|
}
|
|
2487
2596
|
}
|
|
2488
|
-
},
|
|
2597
|
+
}, _callee15, _this3);
|
|
2489
2598
|
}));
|
|
2490
2599
|
|
|
2491
|
-
return function (
|
|
2492
|
-
return
|
|
2600
|
+
return function (_x9) {
|
|
2601
|
+
return _ref24.apply(this, arguments);
|
|
2493
2602
|
};
|
|
2494
2603
|
}();
|
|
2495
2604
|
|
|
2496
2605
|
_this2.btnDebounced = function (type, bquick) {
|
|
2497
2606
|
_this2.setState({
|
|
2498
|
-
bquick: bquick
|
|
2607
|
+
bquick: bquick,
|
|
2608
|
+
isInputMember: true
|
|
2499
2609
|
});
|
|
2500
2610
|
|
|
2501
|
-
var _enumController$
|
|
2502
|
-
PayStyle = _enumController$
|
|
2611
|
+
var _enumController$getEn23 = _mutantsUtil.enumController.getEnumOj(),
|
|
2612
|
+
PayStyle = _enumController$getEn23.PayStyle;
|
|
2503
2613
|
|
|
2504
2614
|
var _this2$store7 = _this2.store,
|
|
2505
2615
|
paymode = _this2$store7.paymode,
|
|
@@ -2542,13 +2652,13 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2542
2652
|
|
|
2543
2653
|
_this2.onCzkChange = function (v) {
|
|
2544
2654
|
// console.log("czk change:"+new Date().toLocaleTimeString())
|
|
2545
|
-
var
|
|
2546
|
-
isNewRetailBCPos =
|
|
2655
|
+
var _ref27 = _mutantsUtil.platform || {},
|
|
2656
|
+
isNewRetailBCPos = _ref27.isNewRetailBCPos;
|
|
2547
2657
|
|
|
2548
2658
|
if (!isNewRetailBCPos) {
|
|
2549
2659
|
_this2.store.paymode.currentMode.member.setCardNo(v);
|
|
2550
2660
|
}
|
|
2551
|
-
if (!/^[
|
|
2661
|
+
if (!/^[A-Za-z0-9]*$/.test(v)) {
|
|
2552
2662
|
return;
|
|
2553
2663
|
}
|
|
2554
2664
|
_this2.setState({
|
|
@@ -2604,8 +2714,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2604
2714
|
};
|
|
2605
2715
|
|
|
2606
2716
|
_this2.checkCharge = function () {
|
|
2607
|
-
var _enumController$
|
|
2608
|
-
PayStyle = _enumController$
|
|
2717
|
+
var _enumController$getEn24 = _mutantsUtil.enumController.getEnumOj(),
|
|
2718
|
+
PayStyle = _enumController$getEn24.PayStyle;
|
|
2609
2719
|
|
|
2610
2720
|
var paymode = _this2.store.paymode;
|
|
2611
2721
|
|
|
@@ -2652,8 +2762,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2652
2762
|
};
|
|
2653
2763
|
|
|
2654
2764
|
_this2.getXianjinPayment = function (payType, value) {
|
|
2655
|
-
var _enumController$
|
|
2656
|
-
PayStyle = _enumController$
|
|
2765
|
+
var _enumController$getEn25 = _mutantsUtil.enumController.getEnumOj(),
|
|
2766
|
+
PayStyle = _enumController$getEn25.PayStyle;
|
|
2657
2767
|
|
|
2658
2768
|
var isManualIntoAmount = _this2.state.isManualIntoAmount;
|
|
2659
2769
|
|
|
@@ -2661,8 +2771,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2661
2771
|
};
|
|
2662
2772
|
|
|
2663
2773
|
_this2.getXianjinBalance = function (payType, value) {
|
|
2664
|
-
var _enumController$
|
|
2665
|
-
PayStyle = _enumController$
|
|
2774
|
+
var _enumController$getEn26 = _mutantsUtil.enumController.getEnumOj(),
|
|
2775
|
+
PayStyle = _enumController$getEn26.PayStyle;
|
|
2666
2776
|
//找零金额-存在权限控制
|
|
2667
2777
|
|
|
2668
2778
|
|
|
@@ -2682,9 +2792,9 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2682
2792
|
var isManualIntoAmount = void 0;
|
|
2683
2793
|
// 付款弹窗
|
|
2684
2794
|
return new _promise2.default(function (resolve, reject) {
|
|
2685
|
-
var _enumController$
|
|
2686
|
-
PayStyle = _enumController$
|
|
2687
|
-
PayIcon2 = _enumController$
|
|
2795
|
+
var _enumController$getEn27 = _mutantsUtil.enumController.getEnumOj(),
|
|
2796
|
+
PayStyle = _enumController$getEn27.PayStyle,
|
|
2797
|
+
PayIcon2 = _enumController$getEn27.PayIcon2;
|
|
2688
2798
|
|
|
2689
2799
|
var modal = (0, _asyncModal2.default)({
|
|
2690
2800
|
onPressEnter: function onPressEnter() {
|
|
@@ -2890,7 +3000,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2890
3000
|
settleDisabled: false
|
|
2891
3001
|
});
|
|
2892
3002
|
that.store.bquick && that.props.onCancelSettle && that.props.onCancelSettle();
|
|
2893
|
-
that.store.delPay(paymode.paymethodId);
|
|
3003
|
+
that.store.bquick && that.store.delPay(paymode.paymethodId);
|
|
2894
3004
|
reject('\u652F\u4ED8\u65B9\u5F0F: ' + paymode.name + '\u5931\u8D25');
|
|
2895
3005
|
} },
|
|
2896
3006
|
'\u53D6\u6D88'
|
|
@@ -2953,8 +3063,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2953
3063
|
paymode = _this2$store8.paymode,
|
|
2954
3064
|
newStyle = _this2$store8.newStyle;
|
|
2955
3065
|
|
|
2956
|
-
var _enumController$
|
|
2957
|
-
PayStyle = _enumController$
|
|
3066
|
+
var _enumController$getEn28 = _mutantsUtil.enumController.getEnumOj(),
|
|
3067
|
+
PayStyle = _enumController$getEn28.PayStyle;
|
|
2958
3068
|
|
|
2959
3069
|
var payTypeList = [PayStyle.SQBPAY, PayStyle.CSYH, PayStyle.smzf];
|
|
2960
3070
|
var payTypeFilterList = payTypeList.filter(function (filterType) {
|
|
@@ -2975,15 +3085,15 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2975
3085
|
};
|
|
2976
3086
|
|
|
2977
3087
|
_this2.checkModeDisabled = function (type, brefund, boriginReturn) {
|
|
2978
|
-
var _enumController$
|
|
2979
|
-
PayStyle = _enumController$
|
|
3088
|
+
var _enumController$getEn29 = _mutantsUtil.enumController.getEnumOj(),
|
|
3089
|
+
PayStyle = _enumController$getEn29.PayStyle;
|
|
2980
3090
|
|
|
2981
3091
|
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);
|
|
2982
3092
|
};
|
|
2983
3093
|
|
|
2984
3094
|
_this2.checkSettleDisabled = function (paymode, thePaymodes) {
|
|
2985
|
-
var _enumController$
|
|
2986
|
-
PayStyle = _enumController$
|
|
3095
|
+
var _enumController$getEn30 = _mutantsUtil.enumController.getEnumOj(),
|
|
3096
|
+
PayStyle = _enumController$getEn30.PayStyle;
|
|
2987
3097
|
|
|
2988
3098
|
console.log("settlement.checkSettleDisabled开始执行,参数:", { paymode: paymode, thePaymodes: thePaymodes });
|
|
2989
3099
|
if (paymode.amount == 0 && paymode.received == 0) {
|
|
@@ -3029,8 +3139,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3029
3139
|
};
|
|
3030
3140
|
|
|
3031
3141
|
_this2.editCzkModal = function () {
|
|
3032
|
-
var _enumController$
|
|
3033
|
-
PayStyle = _enumController$
|
|
3142
|
+
var _enumController$getEn31 = _mutantsUtil.enumController.getEnumOj(),
|
|
3143
|
+
PayStyle = _enumController$getEn31.PayStyle;
|
|
3034
3144
|
|
|
3035
3145
|
(0, _find3.default)(_this2.store.paymode.thePaymodes, function (mode) {
|
|
3036
3146
|
if (mode.paymentType == PayStyle.hyczk) {
|
|
@@ -3096,9 +3206,9 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3096
3206
|
isPrototypeClick: false
|
|
3097
3207
|
});
|
|
3098
3208
|
var that = _this2;
|
|
3099
|
-
var _this2$
|
|
3100
|
-
bquick = _this2$
|
|
3101
|
-
isPrototypeClick = _this2$
|
|
3209
|
+
var _this2$state3 = _this2.state,
|
|
3210
|
+
bquick = _this2$state3.bquick,
|
|
3211
|
+
isPrototypeClick = _this2$state3.isPrototypeClick;
|
|
3102
3212
|
|
|
3103
3213
|
if (!isPrototypeClick) {
|
|
3104
3214
|
if (bquick) {
|
|
@@ -3124,31 +3234,33 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3124
3234
|
|
|
3125
3235
|
_this2.hasElectron = hasElectron;
|
|
3126
3236
|
|
|
3127
|
-
var
|
|
3128
|
-
|
|
3129
|
-
|
|
3237
|
+
var _ref28 = _mutantsMicrofx.stores.user.options.get('loginInfo') || {},
|
|
3238
|
+
MemberMeStorageCardInputByKeyBoard = _ref28.MemberMeStorageCardInputByKeyBoard,
|
|
3239
|
+
ICCardServer = _ref28.ICCardServer,
|
|
3240
|
+
ICCardPassword = _ref28.ICCardPassword;
|
|
3130
3241
|
|
|
3242
|
+
_this2.isStorageCardInputType = MemberMeStorageCardInputByKeyBoard; // 仅储值卡是否禁用键盘输入,'0'为不禁用 '1'为禁用
|
|
3131
3243
|
_this2.iCCardServer = parseInt(ICCardServer); // 启用IC卡:0为禁用 1为启用
|
|
3132
3244
|
_this2.iCCardPassword = ICCardPassword; //IC卡密码
|
|
3133
3245
|
//移动端环境下,没有读取IC卡的方式。
|
|
3134
3246
|
|
|
3135
|
-
var
|
|
3136
|
-
isHorizontalPad =
|
|
3137
|
-
isHorizontalSunMi =
|
|
3247
|
+
var _ref29 = _mutantsUtil.platform || {},
|
|
3248
|
+
isHorizontalPad = _ref29.isHorizontalPad,
|
|
3249
|
+
isHorizontalSunMi = _ref29.isHorizontalSunMi;
|
|
3138
3250
|
|
|
3139
3251
|
_this2.isHorizontalPad = !!isHorizontalPad;
|
|
3140
3252
|
_this2.isHorizontalSunMi = !!isHorizontalSunMi;
|
|
3141
3253
|
_this2.isMobileEnvironment = !!isHorizontalPad || !!isHorizontalSunMi;
|
|
3142
3254
|
_this2.handleReadICard = _this2.handleReadICard.bind(_this2);
|
|
3143
3255
|
_this2.setTimer = null;
|
|
3256
|
+
_this2.keypressStime = null;
|
|
3257
|
+
_this2.store = !(props.type == 1) ? _mutantsMicrofx.stores.settlementVoucherStore : _mutantsMicrofx.stores.settlementMemberStore;
|
|
3144
3258
|
return _this2;
|
|
3145
3259
|
}
|
|
3146
3260
|
|
|
3147
3261
|
(0, _createClass3.default)(Settlement, [{
|
|
3148
3262
|
key: 'componentDidMount',
|
|
3149
3263
|
value: function componentDidMount() {
|
|
3150
|
-
//let retailDetails=this.context.viewModel.data.RetailDetails;//明细
|
|
3151
|
-
//let totalRetailAmount=this.context.viewModel.data.TotalRetailAmount;//零售金额合计
|
|
3152
3264
|
this.store.initPaymodes(this.updateInput, this.props.type, this.props.MemberPoints);
|
|
3153
3265
|
}
|
|
3154
3266
|
}, {
|
|
@@ -3219,8 +3331,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3219
3331
|
_this6.connectRfCard(); //读取失败后,重新连接一下。
|
|
3220
3332
|
return;
|
|
3221
3333
|
} else if (ret.status === 1) {
|
|
3222
|
-
//this.searchMember(ret.value);
|
|
3223
|
-
|
|
3334
|
+
// this.searchMember(ret.value);
|
|
3335
|
+
// this.czkInput.input["value"]=ret.value;
|
|
3336
|
+
_this6.setState({
|
|
3337
|
+
czkValue: ret.value
|
|
3338
|
+
});
|
|
3224
3339
|
_this6.loadCzk(ret.value);
|
|
3225
3340
|
}
|
|
3226
3341
|
});
|
|
@@ -3249,11 +3364,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3249
3364
|
//jfdx
|
|
3250
3365
|
|
|
3251
3366
|
|
|
3252
|
-
/**
|
|
3253
|
-
*
|
|
3254
|
-
* @param {*} thePaymodes 支付方式列表
|
|
3255
|
-
* @param {*} currenIndex 当前支付方式下标
|
|
3256
|
-
* @param {*} symbol 从当前currenIndex开始 还是从当前currenIndex截止
|
|
3367
|
+
/**
|
|
3368
|
+
*
|
|
3369
|
+
* @param {*} thePaymodes 支付方式列表
|
|
3370
|
+
* @param {*} currenIndex 当前支付方式下标
|
|
3371
|
+
* @param {*} symbol 从当前currenIndex开始 还是从当前currenIndex截止
|
|
3257
3372
|
*/
|
|
3258
3373
|
|
|
3259
3374
|
// 处理客显显示功能
|
|
@@ -3268,7 +3383,16 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3268
3383
|
}, {
|
|
3269
3384
|
key: 'onKeyboardChange',
|
|
3270
3385
|
value: function onKeyboardChange(key) {
|
|
3386
|
+
var _enumController$getEn32 = _mutantsUtil.enumController.getEnumOj(),
|
|
3387
|
+
PayStyle = _enumController$getEn32.PayStyle;
|
|
3388
|
+
|
|
3271
3389
|
if (this.currentInput) {
|
|
3390
|
+
if (this.store.paymode.currentMode) {
|
|
3391
|
+
var paymentType1 = this.store.paymode.currentMode.paymentType;
|
|
3392
|
+
if (paymentType1 === PayStyle.djq || paymentType1 === PayStyle.hyczk || paymentType1 === PayStyle.jfdx) {
|
|
3393
|
+
return;
|
|
3394
|
+
}
|
|
3395
|
+
}
|
|
3272
3396
|
var value = _keyboard2.default.getNewValue(this.currentInput, this.currentInput.value, key, true);
|
|
3273
3397
|
if (!isNaN(value) || value == '-') {
|
|
3274
3398
|
this.currentInput.value = value;
|
|
@@ -3281,9 +3405,9 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3281
3405
|
value: function renderToolbtn(mode, index) {
|
|
3282
3406
|
var _this7 = this;
|
|
3283
3407
|
|
|
3284
|
-
var _enumController$
|
|
3285
|
-
PayIcon = _enumController$
|
|
3286
|
-
PayStyle = _enumController$
|
|
3408
|
+
var _enumController$getEn33 = _mutantsUtil.enumController.getEnumOj(),
|
|
3409
|
+
PayIcon = _enumController$getEn33.PayIcon,
|
|
3410
|
+
PayStyle = _enumController$getEn33.PayStyle;
|
|
3287
3411
|
|
|
3288
3412
|
var isReturn = this.props.isReturn;
|
|
3289
3413
|
var _store = this.store,
|
|
@@ -3355,11 +3479,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3355
3479
|
value: function render() {
|
|
3356
3480
|
var _this8 = this;
|
|
3357
3481
|
|
|
3358
|
-
var _enumController$
|
|
3359
|
-
PayIcon = _enumController$
|
|
3360
|
-
PayIcon2 = _enumController$
|
|
3361
|
-
PayStyle = _enumController$
|
|
3362
|
-
Differentiate = _enumController$
|
|
3482
|
+
var _enumController$getEn34 = _mutantsUtil.enumController.getEnumOj(),
|
|
3483
|
+
PayIcon = _enumController$getEn34.PayIcon,
|
|
3484
|
+
PayIcon2 = _enumController$getEn34.PayIcon2,
|
|
3485
|
+
PayStyle = _enumController$getEn34.PayStyle,
|
|
3486
|
+
Differentiate = _enumController$getEn34.Differentiate;
|
|
3363
3487
|
|
|
3364
3488
|
var _state2 = this.state,
|
|
3365
3489
|
btnDissabled = _state2.btnDissabled,
|
|
@@ -3367,10 +3491,13 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3367
3491
|
discountTotalAmount = _state2.discountTotalAmount,
|
|
3368
3492
|
discountRetailTotalAount = _state2.discountRetailTotalAount,
|
|
3369
3493
|
discountPrototypeTotalAmount = _state2.discountPrototypeTotalAmount,
|
|
3370
|
-
storageValue = _state2.storageValue
|
|
3494
|
+
storageValue = _state2.storageValue,
|
|
3495
|
+
czkValue = _state2.czkValue,
|
|
3496
|
+
newPassConfirm = _state2.newPassConfirm,
|
|
3497
|
+
newPass = _state2.newPass;
|
|
3371
3498
|
|
|
3372
|
-
var
|
|
3373
|
-
isNewRetailBCPos =
|
|
3499
|
+
var _ref30 = _mutantsUtil.platform || {},
|
|
3500
|
+
isNewRetailBCPos = _ref30.isNewRetailBCPos;
|
|
3374
3501
|
|
|
3375
3502
|
var _store2 = this.store,
|
|
3376
3503
|
paymode = _store2.paymode,
|
|
@@ -3433,11 +3560,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3433
3560
|
quantity4 = 0;
|
|
3434
3561
|
var sumQuantity = 0; //数量总和的值,包括称重的。
|
|
3435
3562
|
|
|
3436
|
-
var
|
|
3437
|
-
|
|
3438
|
-
buyQuantity =
|
|
3439
|
-
|
|
3440
|
-
returnQuantity =
|
|
3563
|
+
var _ref31 = quantityDetail || {},
|
|
3564
|
+
_ref31$buyQuantity = _ref31.buyQuantity,
|
|
3565
|
+
buyQuantity = _ref31$buyQuantity === undefined ? 0 : _ref31$buyQuantity,
|
|
3566
|
+
_ref31$returnQuantity = _ref31.returnQuantity,
|
|
3567
|
+
returnQuantity = _ref31$returnQuantity === undefined ? 0 : _ref31$returnQuantity;
|
|
3441
3568
|
|
|
3442
3569
|
var quantityPrecision = (0, _tplusPoslogin.PosInitData)("QuantityPrecision");
|
|
3443
3570
|
quantityPrecision = quantityPrecision ? parseInt(quantityPrecision) : '';
|
|
@@ -3455,7 +3582,9 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3455
3582
|
sumQuantity = this.changeDecimalBuZero(sumQuantity, quantityPrecision);
|
|
3456
3583
|
}
|
|
3457
3584
|
|
|
3458
|
-
var
|
|
3585
|
+
var themodeHyczk = thePaymodes.filter(function (mode) {
|
|
3586
|
+
return mode.paymentType === PayStyle.hyczk && mode.value !== '0.00';
|
|
3587
|
+
});
|
|
3459
3588
|
return _react2.default.createElement(
|
|
3460
3589
|
'div',
|
|
3461
3590
|
{ className: 'billingSettlement', ref: function ref(r) {
|
|
@@ -3661,13 +3790,6 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3661
3790
|
_react2.default.createElement(
|
|
3662
3791
|
'div',
|
|
3663
3792
|
{ className: (0, _classnames4.default)({ "main": true, "focusbottom": currentIndex == index }) },
|
|
3664
|
-
_react2.default.createElement(
|
|
3665
|
-
'div',
|
|
3666
|
-
{ className: 'lefticon primary-color', onClick: function onClick() {
|
|
3667
|
-
_this8.onDelPay(index, boriginReturn && mode.boriginReturn, mode.paymentType);
|
|
3668
|
-
} },
|
|
3669
|
-
_react2.default.createElement(_ticon2.default, { type: 'jianqu', className: 'minus' })
|
|
3670
|
-
),
|
|
3671
3793
|
_react2.default.createElement(
|
|
3672
3794
|
'div',
|
|
3673
3795
|
{ className: (0, _classnames4.default)({ "name": true }) },
|
|
@@ -3697,13 +3819,12 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3697
3819
|
}
|
|
3698
3820
|
})
|
|
3699
3821
|
),
|
|
3700
|
-
|
|
3701
|
-
'
|
|
3702
|
-
{ className: '
|
|
3703
|
-
|
|
3704
|
-
_this8.appendCzkmode(boriginReturn, 'noPlaySetPwd');
|
|
3822
|
+
_react2.default.createElement(
|
|
3823
|
+
'span',
|
|
3824
|
+
{ className: 'minus', onClick: function onClick() {
|
|
3825
|
+
_this8.onDelPay(index, boriginReturn && mode.boriginReturn, mode.paymentType);
|
|
3705
3826
|
} },
|
|
3706
|
-
_react2.default.createElement(_ticon2.default, { type: '
|
|
3827
|
+
_react2.default.createElement(_ticon2.default, { type: 'shanchu', className: 'minusIcon primary-color' })
|
|
3707
3828
|
)
|
|
3708
3829
|
),
|
|
3709
3830
|
mode.paymentType == PayStyle.djq ? _react2.default.createElement(
|
|
@@ -3730,7 +3851,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3730
3851
|
_react2.default.createElement(
|
|
3731
3852
|
'span',
|
|
3732
3853
|
{ className: 'fl' },
|
|
3733
|
-
|
|
3854
|
+
mode && mode.storageCardNo
|
|
3734
3855
|
),
|
|
3735
3856
|
_react2.default.createElement('br', null),
|
|
3736
3857
|
_react2.default.createElement(
|
|
@@ -3742,6 +3863,19 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3742
3863
|
'span',
|
|
3743
3864
|
{ className: 'fl' },
|
|
3744
3865
|
(0, _utils.getFixedNumber)(mode.balance)
|
|
3866
|
+
),
|
|
3867
|
+
_react2.default.createElement('br', null),
|
|
3868
|
+
themodeHyczk && themodeHyczk.length && themodeHyczk[themodeHyczk.length - 1].paymethodId === mode.paymethodId && !isReturn && _react2.default.createElement(
|
|
3869
|
+
_button2.default,
|
|
3870
|
+
{ onClick: function onClick() {
|
|
3871
|
+
_this8.appendCzkmode(boriginReturn, 'noPlaySetPwd');
|
|
3872
|
+
}, className: 'addCard btn-border-primary' },
|
|
3873
|
+
_react2.default.createElement(_ticon2.default, { type: 'jiahao', className: 'plus b-theme-color' }),
|
|
3874
|
+
_react2.default.createElement(
|
|
3875
|
+
'span',
|
|
3876
|
+
null,
|
|
3877
|
+
'\u6DFB\u52A0\u5361'
|
|
3878
|
+
)
|
|
3745
3879
|
)
|
|
3746
3880
|
)
|
|
3747
3881
|
);
|
|
@@ -4039,7 +4173,13 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4039
4173
|
// }
|
|
4040
4174
|
// }
|
|
4041
4175
|
// mode.paymentType == PayStyle.hyczk && czkinput && czkinput.value !== '0.00' ? this.editCzkModal() :
|
|
4042
|
-
|
|
4176
|
+
if (mode.paymentType == PayStyle.hyczk) {
|
|
4177
|
+
if (themodeHyczk && themodeHyczk.length === 0) {
|
|
4178
|
+
_this8.onHotKeyClick1(mode, index, boriginReturn);
|
|
4179
|
+
}
|
|
4180
|
+
} else {
|
|
4181
|
+
_this8.onHotKeyClick1(mode, index, boriginReturn);
|
|
4182
|
+
}
|
|
4043
4183
|
},
|
|
4044
4184
|
value: mode.paymentType == PayStyle.hyczk ? (0, _utils.getFixedNumber)((0, _reduce3.default)((0, _filter3.default)(thePaymodes, function (tm) {
|
|
4045
4185
|
return tm.paymentType == PayStyle.hyczk;
|
|
@@ -4092,7 +4232,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4092
4232
|
_react2.default.createElement(
|
|
4093
4233
|
'span',
|
|
4094
4234
|
null,
|
|
4095
|
-
|
|
4235
|
+
m && m.storageCardNo
|
|
4096
4236
|
),
|
|
4097
4237
|
_react2.default.createElement(
|
|
4098
4238
|
'span',
|
|
@@ -4103,6 +4243,19 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4103
4243
|
'span',
|
|
4104
4244
|
{ className: 'balance fr' },
|
|
4105
4245
|
'\u652F\u4ED8\u91D1\u989D\uFF1A'
|
|
4246
|
+
),
|
|
4247
|
+
_react2.default.createElement('br', null),
|
|
4248
|
+
themodeHyczk && themodeHyczk.length && themodeHyczk[themodeHyczk.length - 1].paymethodId === m.paymethodId && _react2.default.createElement(
|
|
4249
|
+
_button2.default,
|
|
4250
|
+
{ onClick: function onClick() {
|
|
4251
|
+
return _this8.onHotKeyClick1(mode, index, boriginReturn);
|
|
4252
|
+
}, className: 'addCard btn-border-primary' },
|
|
4253
|
+
_react2.default.createElement(_ticon2.default, { type: 'jiahao', className: 'plus b-theme-color' }),
|
|
4254
|
+
_react2.default.createElement(
|
|
4255
|
+
'span',
|
|
4256
|
+
null,
|
|
4257
|
+
'\u6DFB\u52A0\u5361'
|
|
4258
|
+
)
|
|
4106
4259
|
)
|
|
4107
4260
|
);
|
|
4108
4261
|
})
|
|
@@ -4262,14 +4415,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4262
4415
|
{ key: index + '', className: 'modeItem' },
|
|
4263
4416
|
_react2.default.createElement(
|
|
4264
4417
|
'div',
|
|
4265
|
-
{ className: 'main ' + (currentIndex == index && 'settlement-pay-item-border') },
|
|
4266
|
-
_react2.default.createElement(
|
|
4267
|
-
'div',
|
|
4268
|
-
{ className: 'lefticon', onClick: function onClick() {
|
|
4269
|
-
_this8.onDelPay(index);
|
|
4270
|
-
} },
|
|
4271
|
-
_react2.default.createElement(_ticon2.default, { type: 'jianqu', className: 'minus' })
|
|
4272
|
-
),
|
|
4418
|
+
{ className: 'main b-theme-color ' + (currentIndex == index && 'settlement-pay-item-border') },
|
|
4273
4419
|
_react2.default.createElement(
|
|
4274
4420
|
'div',
|
|
4275
4421
|
{ className: (0, _classnames4.default)({ "name": true }) },
|
|
@@ -4294,13 +4440,12 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4294
4440
|
}
|
|
4295
4441
|
})
|
|
4296
4442
|
),
|
|
4297
|
-
|
|
4443
|
+
_react2.default.createElement(
|
|
4298
4444
|
'div',
|
|
4299
|
-
{ className: '
|
|
4300
|
-
|
|
4301
|
-
_this8.appendCzkmode('', 'noPlaySetPwd');
|
|
4445
|
+
{ className: 'minus', onClick: function onClick() {
|
|
4446
|
+
_this8.onDelPay(index);
|
|
4302
4447
|
} },
|
|
4303
|
-
_react2.default.createElement(_ticon2.default, { type: '
|
|
4448
|
+
_react2.default.createElement(_ticon2.default, { type: 'shanchu', className: 'minusIcon primary-color' })
|
|
4304
4449
|
)
|
|
4305
4450
|
),
|
|
4306
4451
|
mode.paymentType == PayStyle.djq ? _react2.default.createElement(
|
|
@@ -4327,7 +4472,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4327
4472
|
_react2.default.createElement(
|
|
4328
4473
|
'span',
|
|
4329
4474
|
{ className: 'fl' },
|
|
4330
|
-
|
|
4475
|
+
mode && mode.storageCardNo
|
|
4331
4476
|
),
|
|
4332
4477
|
_react2.default.createElement('br', null),
|
|
4333
4478
|
_react2.default.createElement(
|
|
@@ -4516,7 +4661,6 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4516
4661
|
_react2.default.createElement(
|
|
4517
4662
|
'div',
|
|
4518
4663
|
{ className: (0, _classnames4.default)({ "main": true, "focusbottom": currentIndex == index }) },
|
|
4519
|
-
_react2.default.createElement('div', { className: 'lefticon' }),
|
|
4520
4664
|
_react2.default.createElement(
|
|
4521
4665
|
'div',
|
|
4522
4666
|
{ className: (0, _classnames4.default)({ "name": true }) },
|
|
@@ -4651,7 +4795,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4651
4795
|
visible: this.state.czkVisible,
|
|
4652
4796
|
maskClosable: false,
|
|
4653
4797
|
destroyOnClose: true,
|
|
4654
|
-
title: "
|
|
4798
|
+
title: "储值结算",
|
|
4655
4799
|
onCancel: this.handleCzkCancel,
|
|
4656
4800
|
keyboard: false,
|
|
4657
4801
|
centered: !this.isHorizontalPad ? true : false,
|
|
@@ -4682,7 +4826,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4682
4826
|
_react2.default.createElement(
|
|
4683
4827
|
'div',
|
|
4684
4828
|
{ className: 'value valuetext' },
|
|
4685
|
-
currentMode && currentMode.member.type || '普通'
|
|
4829
|
+
currentMode && currentMode.member && currentMode.member.type || '普通'
|
|
4686
4830
|
),
|
|
4687
4831
|
_react2.default.createElement(
|
|
4688
4832
|
'div',
|
|
@@ -4703,7 +4847,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4703
4847
|
_react2.default.createElement(
|
|
4704
4848
|
'div',
|
|
4705
4849
|
{ className: 'value' },
|
|
4706
|
-
currentMode && (0, _utils.getFixedNumber)(currentMode.
|
|
4850
|
+
currentMode && (0, _utils.getFixedNumber)(currentMode.balance)
|
|
4707
4851
|
),
|
|
4708
4852
|
_react2.default.createElement(
|
|
4709
4853
|
'div',
|
|
@@ -4724,7 +4868,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4724
4868
|
_react2.default.createElement(
|
|
4725
4869
|
'div',
|
|
4726
4870
|
{ className: 'value' },
|
|
4727
|
-
currentMode && (0, _utils.getFixedNumber)(Math.max(0, Math.min(currentMode.maxamount, currentMode.
|
|
4871
|
+
currentMode && (0, _utils.getFixedNumber)(Math.max(0, Math.min(currentMode.maxamount, currentMode.balance)))
|
|
4728
4872
|
),
|
|
4729
4873
|
_react2.default.createElement(
|
|
4730
4874
|
'div',
|
|
@@ -4739,29 +4883,83 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4739
4883
|
_react2.default.createElement(
|
|
4740
4884
|
'span',
|
|
4741
4885
|
null,
|
|
4742
|
-
'\
|
|
4886
|
+
'\u50A8\u503C\u5361\u53F7\uFF1A'
|
|
4743
4887
|
),
|
|
4744
4888
|
_react2.default.createElement(
|
|
4745
4889
|
'span',
|
|
4746
4890
|
null,
|
|
4747
4891
|
_react2.default.createElement(_input2.default, {
|
|
4748
4892
|
type: 'text',
|
|
4749
|
-
placeholder: '\u8BF7\u626B\u63CF\u6216\u8F93\u5165\
|
|
4750
|
-
|
|
4751
|
-
, className: 'input ' + (this.hasElectron === true && this.iCCardServer === 1 || this.isHorizontalPad === true ? 'temp' : ''),
|
|
4893
|
+
placeholder: '\u8BF7\u626B\u63CF\u6216\u8F93\u5165\u624B\u673A\u53F7/\u50A8\u503C\u5361\u53F7',
|
|
4894
|
+
className: 'input ' + (this.hasElectron === true && this.iCCardServer === 1 || this.isHorizontalPad === true ? 'temp' : ''),
|
|
4752
4895
|
onChange: function onChange(e) {
|
|
4753
4896
|
return _this8.onCzkChange(e.target.value);
|
|
4754
4897
|
},
|
|
4755
|
-
defaultValue:
|
|
4756
|
-
value:
|
|
4898
|
+
defaultValue: currentMode && currentMode.storageCardNo,
|
|
4899
|
+
value: czkValue,
|
|
4757
4900
|
ref: function ref(input) {
|
|
4758
4901
|
return _this8.czkInput = input;
|
|
4759
4902
|
},
|
|
4760
|
-
onKeyDown: function
|
|
4761
|
-
|
|
4762
|
-
|
|
4763
|
-
|
|
4764
|
-
|
|
4903
|
+
onKeyDown: function () {
|
|
4904
|
+
var _ref32 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee16(e) {
|
|
4905
|
+
var time, _paymode;
|
|
4906
|
+
|
|
4907
|
+
return _regenerator2.default.wrap(function _callee16$(_context16) {
|
|
4908
|
+
while (1) {
|
|
4909
|
+
switch (_context16.prev = _context16.next) {
|
|
4910
|
+
case 0:
|
|
4911
|
+
if (!(e.keyCode == 13)) {
|
|
4912
|
+
_context16.next = 14;
|
|
4913
|
+
break;
|
|
4914
|
+
}
|
|
4915
|
+
|
|
4916
|
+
time = Date.parse(new Date());
|
|
4917
|
+
|
|
4918
|
+
if (!(_this8.isStorageCardInputType && time - _this8.keypressStime > 350)) {
|
|
4919
|
+
_context16.next = 7;
|
|
4920
|
+
break;
|
|
4921
|
+
}
|
|
4922
|
+
|
|
4923
|
+
_message2.default.warn('储值卡不可键盘录入,请刷卡!');
|
|
4924
|
+
_this8.keypressStime = null;
|
|
4925
|
+
_this8.setState({
|
|
4926
|
+
czkValue: null
|
|
4927
|
+
});
|
|
4928
|
+
return _context16.abrupt('return');
|
|
4929
|
+
|
|
4930
|
+
case 7:
|
|
4931
|
+
_this8.keypressStime = null;
|
|
4932
|
+
_context16.next = 10;
|
|
4933
|
+
return _this8.loadCzk(e.target.value);
|
|
4934
|
+
|
|
4935
|
+
case 10:
|
|
4936
|
+
_paymode = _this8.store.paymode;
|
|
4937
|
+
|
|
4938
|
+
if (!_paymode.currentMode.storageCardNo) {
|
|
4939
|
+
_this8.setState({
|
|
4940
|
+
czkvalue: null
|
|
4941
|
+
});
|
|
4942
|
+
}
|
|
4943
|
+
_context16.next = 15;
|
|
4944
|
+
break;
|
|
4945
|
+
|
|
4946
|
+
case 14:
|
|
4947
|
+
if (!_this8.keypressStime && e.keyCode !== 8) {
|
|
4948
|
+
_this8.keypressStime = Date.parse(new Date());
|
|
4949
|
+
}
|
|
4950
|
+
|
|
4951
|
+
case 15:
|
|
4952
|
+
case 'end':
|
|
4953
|
+
return _context16.stop();
|
|
4954
|
+
}
|
|
4955
|
+
}
|
|
4956
|
+
}, _callee16, _this8);
|
|
4957
|
+
}));
|
|
4958
|
+
|
|
4959
|
+
return function (_x11) {
|
|
4960
|
+
return _ref32.apply(this, arguments);
|
|
4961
|
+
};
|
|
4962
|
+
}(),
|
|
4765
4963
|
onFocus: function onFocus(e) {
|
|
4766
4964
|
_this8.inputTarget = _this8.czkInput.input;
|
|
4767
4965
|
!_this8.state.prototypeVisible && _keyboard2.default.open(function (v) {
|
|
@@ -4813,22 +5011,22 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4813
5011
|
className: _index.hotKey.hotKeyNotFilter('input'),
|
|
4814
5012
|
value: storageValue,
|
|
4815
5013
|
onChange: function onChange(event) {
|
|
4816
|
-
_this8.setCurrentModeValue(event.target.value, Math.min(currentMode.maxamount, currentMode.
|
|
5014
|
+
_this8.setCurrentModeValue(event.target.value, Math.min(currentMode.maxamount, currentMode.balance));
|
|
4817
5015
|
},
|
|
4818
|
-
defaultValue: currentMode && (0, _utils.getFixedNumber)(brefund ? currentMode.value : Math.min(currentMode.value, currentMode.maxamount, currentMode.
|
|
4819
|
-
ref: function ref(
|
|
4820
|
-
return _this8["inputCzkAmount"] =
|
|
5016
|
+
defaultValue: currentMode && (0, _utils.getFixedNumber)(brefund ? currentMode.value : Math.min(currentMode.value, currentMode.maxamount, currentMode.balance)),
|
|
5017
|
+
ref: function ref(_ref33) {
|
|
5018
|
+
return _this8["inputCzkAmount"] = _ref33;
|
|
4821
5019
|
},
|
|
4822
5020
|
onFocus: function onFocus(e) {
|
|
4823
5021
|
_this8.inputkey = "inputCzkAmount";
|
|
4824
5022
|
_keyboard2.default.open(function (v) {
|
|
4825
5023
|
var value = _keyboard2.default.getNewValue(_this8[_this8.inputkey].input, _this8[_this8.inputkey].input.value, v);
|
|
4826
|
-
_this8.setCurrentModeValue(value, Math.min(currentMode.maxamount, currentMode.
|
|
5024
|
+
_this8.setCurrentModeValue(value, Math.min(currentMode.maxamount, currentMode.balance));
|
|
4827
5025
|
}, _this8.keyboardOnOk, _this8.keyboardOnClose)();
|
|
4828
5026
|
},
|
|
4829
5027
|
onBlur: function onBlur(e) {
|
|
4830
5028
|
_keyboard2.default.close();
|
|
4831
|
-
_this8.setCurrentModeValue((0, _utils.getFixedNumber)(_this8.inputCzkAmount.input.value), Math.min(currentMode.maxamount, currentMode.
|
|
5029
|
+
_this8.setCurrentModeValue((0, _utils.getFixedNumber)(_this8.inputCzkAmount.input.value), Math.min(currentMode.maxamount, currentMode.balance));
|
|
4832
5030
|
}
|
|
4833
5031
|
})
|
|
4834
5032
|
)
|
|
@@ -4866,6 +5064,47 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4866
5064
|
)
|
|
4867
5065
|
)
|
|
4868
5066
|
),
|
|
5067
|
+
_react2.default.createElement(
|
|
5068
|
+
_modal2.default,
|
|
5069
|
+
{
|
|
5070
|
+
wrapClassName: _index.hotKey.hotKeyBindClass('5', 'moreCzkModal') + ' ' + (this.isHorizontalPad ? 'extraHeight' : ''),
|
|
5071
|
+
width: '400px',
|
|
5072
|
+
visible: this.state.moreCzkVisible,
|
|
5073
|
+
maskClosable: false,
|
|
5074
|
+
destroyOnClose: true,
|
|
5075
|
+
title: "储值结算",
|
|
5076
|
+
onCancel: this.handleMoreCzkCancel,
|
|
5077
|
+
keyboard: false,
|
|
5078
|
+
centered: !this.isHorizontalPad ? true : false,
|
|
5079
|
+
footer: _react2.default.createElement(
|
|
5080
|
+
'div',
|
|
5081
|
+
{ className: 'action' },
|
|
5082
|
+
_react2.default.createElement(
|
|
5083
|
+
'span',
|
|
5084
|
+
{ className: 'showUseCard' },
|
|
5085
|
+
'\u4EC5\u5217\u793A\u53EF\u7528\u7684\u50A8\u503C\u5361'
|
|
5086
|
+
),
|
|
5087
|
+
_react2.default.createElement(
|
|
5088
|
+
_button2.default,
|
|
5089
|
+
{ onClick: this.handleMoreCzkCancel },
|
|
5090
|
+
'\u53D6\u6D88'
|
|
5091
|
+
),
|
|
5092
|
+
_react2.default.createElement(
|
|
5093
|
+
_button2.default,
|
|
5094
|
+
{ type: 'primary', onClick: this.handleMoreCzkOk },
|
|
5095
|
+
'\u786E\u5B9A'
|
|
5096
|
+
)
|
|
5097
|
+
)
|
|
5098
|
+
},
|
|
5099
|
+
_react2.default.createElement(
|
|
5100
|
+
'div',
|
|
5101
|
+
null,
|
|
5102
|
+
_react2.default.createElement(_moreCzkTable2.default, {
|
|
5103
|
+
setMoreCzkIndex: this.setMoreCzkIndex,
|
|
5104
|
+
selectedRowIndex: this.state.selectedRowIndex,
|
|
5105
|
+
dataSource: this.state.memberdata1 })
|
|
5106
|
+
)
|
|
5107
|
+
),
|
|
4869
5108
|
_react2.default.createElement(
|
|
4870
5109
|
_modal2.default,
|
|
4871
5110
|
(0, _defineProperty3.default)({
|
|
@@ -4889,7 +5128,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4889
5128
|
),
|
|
4890
5129
|
_react2.default.createElement(
|
|
4891
5130
|
_button2.default,
|
|
4892
|
-
{ type: 'primary', disabled:
|
|
5131
|
+
{ type: 'primary', disabled: btnDissabled, onClick: this.handleSetModal },
|
|
4893
5132
|
'\u786E\u5B9A'
|
|
4894
5133
|
)
|
|
4895
5134
|
)),
|
|
@@ -4907,21 +5146,23 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4907
5146
|
_react2.default.createElement(
|
|
4908
5147
|
'div',
|
|
4909
5148
|
{ className: 'two' },
|
|
4910
|
-
_react2.default.createElement(
|
|
5149
|
+
_react2.default.createElement(_input2.default.Password, {
|
|
4911
5150
|
className: 'content',
|
|
4912
|
-
newType: 'positive',
|
|
4913
|
-
bordered: true,
|
|
4914
5151
|
placeholder: '\u8BF7\u8F93\u51656\u4F4D\u6570\u5B57\u5BC6\u7801',
|
|
4915
5152
|
style: { width: 266, height: 32 },
|
|
4916
5153
|
maxLength: 6,
|
|
5154
|
+
value: newPass,
|
|
4917
5155
|
ref: function ref(input) {
|
|
4918
5156
|
return _this8.inputNewAmount = input;
|
|
4919
5157
|
},
|
|
4920
5158
|
onChange: function onChange(value) {
|
|
4921
|
-
return _this8.setPwdValue('newPass', value);
|
|
5159
|
+
return _this8.setPwdValue('newPass', value.target.value);
|
|
4922
5160
|
},
|
|
4923
5161
|
onBlur: function onBlur(value) {
|
|
4924
5162
|
return _this8.handleBlur('newPass');
|
|
5163
|
+
},
|
|
5164
|
+
onPressEnter: function onPressEnter() {
|
|
5165
|
+
return _this8.onPressEnterCzk('newPass');
|
|
4925
5166
|
}
|
|
4926
5167
|
})
|
|
4927
5168
|
)
|
|
@@ -4937,21 +5178,23 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4937
5178
|
_react2.default.createElement(
|
|
4938
5179
|
'div',
|
|
4939
5180
|
{ className: 'two' },
|
|
4940
|
-
_react2.default.createElement(
|
|
5181
|
+
_react2.default.createElement(_input2.default.Password, {
|
|
4941
5182
|
className: 'content',
|
|
4942
|
-
newType: 'positive',
|
|
4943
|
-
bordered: true,
|
|
4944
5183
|
placeholder: '\u8BF7\u786E\u8BA46\u4F4D\u6570\u5B57\u5BC6\u7801',
|
|
4945
5184
|
style: { width: 266, height: 32 },
|
|
4946
5185
|
maxLength: 6,
|
|
5186
|
+
value: newPassConfirm,
|
|
4947
5187
|
ref: function ref(input) {
|
|
4948
5188
|
return _this8.inputConfirmAmount = input;
|
|
4949
5189
|
},
|
|
4950
5190
|
onChange: function onChange(value) {
|
|
4951
|
-
return _this8.setPwdValue('newPassConfirm', value);
|
|
5191
|
+
return _this8.setPwdValue('newPassConfirm', value.target.value);
|
|
4952
5192
|
},
|
|
4953
5193
|
onBlur: function onBlur(value) {
|
|
4954
5194
|
return _this8.handleBlur('newPassConfirm');
|
|
5195
|
+
},
|
|
5196
|
+
onPressEnter: function onPressEnter() {
|
|
5197
|
+
return _this8.onPressEnterCzk('newPassConfirm');
|
|
4955
5198
|
}
|
|
4956
5199
|
})
|
|
4957
5200
|
)
|
|
@@ -5070,7 +5313,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
5070
5313
|
_react2.default.createElement(
|
|
5071
5314
|
'div',
|
|
5072
5315
|
{ className: 'djq2' },
|
|
5073
|
-
(0, _map3.default)(currentMode
|
|
5316
|
+
currentMode && currentMode.djqs && currentMode.djqs.length > 0 ? (0, _map3.default)(currentMode.djqs || [], function (q, index) {
|
|
5074
5317
|
if (!_this8.state.couponLight && !q.count) {
|
|
5075
5318
|
return;
|
|
5076
5319
|
}
|
|
@@ -5089,7 +5332,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
5089
5332
|
_react2.default.createElement(
|
|
5090
5333
|
'span',
|
|
5091
5334
|
null,
|
|
5092
|
-
q.
|
|
5335
|
+
q.nominalAmount
|
|
5093
5336
|
),
|
|
5094
5337
|
_react2.default.createElement(
|
|
5095
5338
|
'span',
|
|
@@ -5180,7 +5423,10 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
5180
5423
|
_react2.default.createElement('div', { className: 'point_top' }),
|
|
5181
5424
|
_react2.default.createElement('div', { className: 'point_bottom' })
|
|
5182
5425
|
);
|
|
5183
|
-
})
|
|
5426
|
+
}) : _react2.default.createElement(_tplusComponentsTouch.ProgressState, {
|
|
5427
|
+
state: "empty",
|
|
5428
|
+
stateCommonStyle: { 'paddingTop': "30px", backgroundColor: 'transparent' },
|
|
5429
|
+
empty: { buttonVisible: false, imgStyle: { width: '120px', height: '120px' } } })
|
|
5184
5430
|
)
|
|
5185
5431
|
),
|
|
5186
5432
|
currentMode && !currentMode.boriginReturn && _react2.default.createElement(
|
|
@@ -5316,7 +5562,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
5316
5562
|
_react2.default.createElement(
|
|
5317
5563
|
'div',
|
|
5318
5564
|
{ className: 'value valuetext' },
|
|
5319
|
-
currentMode && currentMode.member.type || '普通'
|
|
5565
|
+
currentMode && currentMode.member && currentMode.member.type || '普通'
|
|
5320
5566
|
),
|
|
5321
5567
|
_react2.default.createElement(
|
|
5322
5568
|
'div',
|
|
@@ -5337,7 +5583,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
5337
5583
|
_react2.default.createElement(
|
|
5338
5584
|
'div',
|
|
5339
5585
|
{ className: 'value' },
|
|
5340
|
-
currentMode && currentMode.member.bonusPoints
|
|
5586
|
+
currentMode && currentMode.member && currentMode.member.bonusPoints
|
|
5341
5587
|
),
|
|
5342
5588
|
_react2.default.createElement(
|
|
5343
5589
|
'div',
|
|
@@ -5358,7 +5604,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
5358
5604
|
_react2.default.createElement(
|
|
5359
5605
|
'div',
|
|
5360
5606
|
{ className: 'value' },
|
|
5361
|
-
currentMode && (0, _utils.getFixedNumber)(currentMode.member.exchangable)
|
|
5607
|
+
currentMode && currentMode.member && (0, _utils.getFixedNumber)(currentMode.member.exchangable)
|
|
5362
5608
|
),
|
|
5363
5609
|
_react2.default.createElement(
|
|
5364
5610
|
'div',
|
|
@@ -5379,7 +5625,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
5379
5625
|
_react2.default.createElement(
|
|
5380
5626
|
'div',
|
|
5381
5627
|
{ className: 'value' },
|
|
5382
|
-
currentMode && (0, _utils.getFixedNumber)(Math.max(0, Math.min(currentMode.maxamount, currentMode.member.exchangable)))
|
|
5628
|
+
currentMode && currentMode.member && (0, _utils.getFixedNumber)(Math.max(0, Math.min(currentMode.maxamount, currentMode.member.exchangable)))
|
|
5383
5629
|
),
|
|
5384
5630
|
_react2.default.createElement(
|
|
5385
5631
|
'div',
|
|
@@ -5399,7 +5645,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
5399
5645
|
_react2.default.createElement(
|
|
5400
5646
|
'span',
|
|
5401
5647
|
{ className: 'notext' },
|
|
5402
|
-
currentMode && currentMode.member.cardNo
|
|
5648
|
+
currentMode && currentMode.member && currentMode.member.cardNo
|
|
5403
5649
|
)
|
|
5404
5650
|
),
|
|
5405
5651
|
_react2.default.createElement(
|
|
@@ -5430,12 +5676,13 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
5430
5676
|
_react2.default.createElement(_input2.default, {
|
|
5431
5677
|
className: _index.hotKey.hotKeyNotFilter('input'),
|
|
5432
5678
|
type: 'text',
|
|
5679
|
+
value: storageValue,
|
|
5433
5680
|
onChange: function onChange(e) {
|
|
5434
5681
|
_this8.setCurrentModeValue(e.target.value, Math.min(currentMode.maxamount, currentMode.member.exchangable));
|
|
5435
5682
|
},
|
|
5436
|
-
defaultValue: currentMode && (0, _utils.getFixedNumber)(Math.min(currentMode.value, currentMode.maxamount, currentMode.member.exchangable)),
|
|
5437
|
-
ref: function ref(
|
|
5438
|
-
return _this8["inputJfdxAmount"] =
|
|
5683
|
+
defaultValue: currentMode && currentMode.member && (0, _utils.getFixedNumber)(Math.min(currentMode.value, currentMode.maxamount, currentMode.member.exchangable)),
|
|
5684
|
+
ref: function ref(_ref34) {
|
|
5685
|
+
return _this8["inputJfdxAmount"] = _ref34;
|
|
5439
5686
|
},
|
|
5440
5687
|
onFocus: function onFocus(e) {
|
|
5441
5688
|
_this8.inputkey = "inputJfdxAmount";
|