tplus-components-touch 3.54.5 → 3.54.8

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.
@@ -359,7 +359,6 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
359
359
  };
360
360
 
361
361
  _this2.payQuick = function () {
362
- var IdbusiType = _this2.context.viewModel.data.IdbusiType;
363
362
  var _this2$state = _this2.state,
364
363
  currentKey = _this2$state.currentKey,
365
364
  returnAmount = _this2$state.returnAmount;
@@ -367,13 +366,19 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
367
366
  var _enumController$getEn = _mutantsUtil.enumController.getEnumOj(),
368
367
  PayStyle = _enumController$getEn.PayStyle;
369
368
 
369
+ var newAmount = _this2.props.amount;
370
+ if (_this2.props.type != 1) {
371
+ var IdbusiType = _this2.context.viewModel.data.IdbusiType;
372
+
373
+ if (IdbusiType === 42) newAmount = -returnAmount;
374
+ }
370
375
  _this2.store.init({
371
376
  context: _this2.props.type == 1 ? null : _this2.context,
372
377
  amounthandler: _this2.props.onHandleAmount,
373
378
  datasource: _this2.props.dataSource.Code_02,
374
379
  storeinfo: _this2.props.storeInfo,
375
380
  bquick: true,
376
- amount: IdbusiType === 42 ? -returnAmount : _this2.props.amount,
381
+ amount: newAmount,
377
382
  type: _this2.props.type,
378
383
  data: _this2.props.dto,
379
384
  payModeKey: currentKey
@@ -438,16 +443,21 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
438
443
  };
439
444
 
440
445
  _this2.payFun = function () {
441
- var IdbusiType = _this2.context.viewModel.data.IdbusiType;
442
446
  var returnAmount = _this2.state.returnAmount;
443
447
 
448
+ var newAmount = _this2.props.amount;
449
+ if (_this2.props.type != 1) {
450
+ var IdbusiType = _this2.context.viewModel.data.IdbusiType;
451
+
452
+ if (IdbusiType === 42) newAmount = -returnAmount;
453
+ }
444
454
  _this2.store.init({
445
455
  context: _this2.props.type == 1 ? null : _this2.context,
446
456
  amounthandler: _this2.props.onHandleAmount,
447
457
  datasource: _this2.props.dataSource.Code_02,
448
458
  storeinfo: _this2.props.storeInfo,
449
459
  bquick: false,
450
- amount: IdbusiType === 42 ? -returnAmount : _this2.props.amount,
460
+ amount: newAmount,
451
461
  type: _this2.props.type,
452
462
  data: _this2.props.dto,
453
463
  creditSalesVoucher: _this2.props.creditSalesVoucher,
@@ -928,27 +938,19 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
928
938
  case 4:
929
939
  result = _context5.sent;
930
940
 
931
- if (!(result == "")) {
932
- _context5.next = 10;
933
- break;
941
+ if (result == "") {
942
+ //成功
943
+ //返回
944
+ _this2.setCurrentFocusAndAddPay(curmode.paymentType, null, curmode.paymethodId);
945
+ _promise2.default.resolve();
946
+ } else {
947
+ _this2.setState({
948
+ confirmStatus: true
949
+ });
950
+ _message2.default.info(result);
934
951
  }
935
952
 
936
- //成功
937
- //返回
938
- _this2.setCurrentFocusAndAddPay(curmode.paymentType, null, curmode.paymethodId);
939
- _promise2.default.resolve();
940
- _context5.next = 13;
941
- break;
942
-
943
- case 10:
944
- _this2.setState({
945
- confirmStatus: true
946
- });
947
- //Message.info("密码不正确");
948
- _context5.next = 13;
949
- return _promise2.default.reject(result);
950
-
951
- case 13:
953
+ case 6:
952
954
  case 'end':
953
955
  return _context5.stop();
954
956
  }
@@ -1897,7 +1899,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
1897
1899
  var _this$props = _this.props,
1898
1900
  MemberPoints = _this$props.MemberPoints,
1899
1901
  isMemberPointsReturn = _this$props.isMemberPointsReturn,
1900
- isReturn = _this$props.isReturn;
1902
+ isReturn = _this$props.isReturn,
1903
+ settlementType = _this$props.type;
1901
1904
 
1902
1905
  var message = "支付成功";
1903
1906
  if ((isReturn || isMemberPointsReturn) && Number(amount) == Number(0)) {
@@ -1907,9 +1910,12 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
1907
1910
  } else if (IdbusiType == 39 && received == 0) {
1908
1911
  message = "取货成功";
1909
1912
  }
1910
- _mutantsMicrofx.stores.drawerStore.hide();
1913
+ // 收款的时候,drawerStore才消失
1914
+ if (settlementType === 2) {
1915
+ _mutantsMicrofx.stores.drawerStore.hide();
1916
+ }
1911
1917
  if (params === 'onCreditReturn') {
1912
- _message2.default.warn('退货成功,此单无须退款!');
1918
+ _message2.default.success('退货成功,此单无须退款!');
1913
1919
  } else {
1914
1920
  window.__successModal = (0, _utils.showSuccessModal)(amount, received, charge, _this.props.onModalClose, isXianjin, message, resp1 && resp1.data, _mutantsMicrofx.stores, IdbusiType, isFull, function () {
1915
1921
  _this.handleGuestShow(5);
@@ -2312,20 +2318,21 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
2312
2318
  };
2313
2319
  }();
2314
2320
 
2315
- _this2.handleCzk = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee14() {
2316
- var curmode, promises, _enumController$getEn22, PayStyle;
2321
+ _this2.handleCzk = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee16() {
2322
+ var that, curmode, promises, _enumController$getEn22, _PayStyle, handleUserInputs, _commit;
2317
2323
 
2318
- return _regenerator2.default.wrap(function _callee14$(_context14) {
2324
+ return _regenerator2.default.wrap(function _callee16$(_context16) {
2319
2325
  while (1) {
2320
- switch (_context14.prev = _context14.next) {
2326
+ switch (_context16.prev = _context16.next) {
2321
2327
  case 0:
2328
+ that = _this2;
2322
2329
  curmode = _this2.store.paymode.currentMode;
2323
2330
  promises = [];
2324
2331
 
2325
2332
  if (curmode.value > 0) {
2326
- _enumController$getEn22 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn22.PayStyle;
2333
+ _enumController$getEn22 = _mutantsUtil.enumController.getEnumOj(), _PayStyle = _enumController$getEn22.PayStyle;
2327
2334
 
2328
- if (curmode.paymentType === PayStyle.hyczk) {
2335
+ if (curmode.paymentType === _PayStyle.hyczk) {
2329
2336
  if (curmode.cardTypeEnum === 'BALANCE_CARD') {
2330
2337
  !curmode.freePaymentPasswordStore && _this2.setState({
2331
2338
  confirmStatus: true
@@ -2338,12 +2345,173 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
2338
2345
  }
2339
2346
  }
2340
2347
 
2341
- case 3:
2348
+ if (curmode.paymentType !== PayStyle.hyczk || curmode.freePaymentPasswordStore || !curmode.isNeedPassword) {
2349
+ handleUserInputs = function () {
2350
+ var _ref18 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee15(promises) {
2351
+ var results, _iteratorNormalCompletion2, _didIteratorError2, _iteratorError2, _iterator2, _step2, p, _result2;
2352
+
2353
+ return _regenerator2.default.wrap(function _callee15$(_context15) {
2354
+ while (1) {
2355
+ switch (_context15.prev = _context15.next) {
2356
+ case 0:
2357
+ results = [];
2358
+ _context15.prev = 1;
2359
+ _iteratorNormalCompletion2 = true;
2360
+ _didIteratorError2 = false;
2361
+ _iteratorError2 = undefined;
2362
+ _context15.prev = 5;
2363
+ _iterator2 = (0, _getIterator3.default)(promises);
2364
+
2365
+ case 7:
2366
+ if (_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done) {
2367
+ _context15.next = 16;
2368
+ break;
2369
+ }
2370
+
2371
+ p = _step2.value;
2372
+ _context15.next = 11;
2373
+ return p;
2374
+
2375
+ case 11:
2376
+ _result2 = _context15.sent;
2377
+
2378
+ results.push(_result2);
2379
+
2380
+ case 13:
2381
+ _iteratorNormalCompletion2 = true;
2382
+ _context15.next = 7;
2383
+ break;
2384
+
2385
+ case 16:
2386
+ _context15.next = 22;
2387
+ break;
2388
+
2389
+ case 18:
2390
+ _context15.prev = 18;
2391
+ _context15.t0 = _context15['catch'](5);
2392
+ _didIteratorError2 = true;
2393
+ _iteratorError2 = _context15.t0;
2394
+
2395
+ case 22:
2396
+ _context15.prev = 22;
2397
+ _context15.prev = 23;
2398
+
2399
+ if (!_iteratorNormalCompletion2 && _iterator2.return) {
2400
+ _iterator2.return();
2401
+ }
2402
+
2403
+ case 25:
2404
+ _context15.prev = 25;
2405
+
2406
+ if (!_didIteratorError2) {
2407
+ _context15.next = 28;
2408
+ break;
2409
+ }
2410
+
2411
+ throw _iteratorError2;
2412
+
2413
+ case 28:
2414
+ return _context15.finish(25);
2415
+
2416
+ case 29:
2417
+ return _context15.finish(22);
2418
+
2419
+ case 30:
2420
+ _context15.next = 32;
2421
+ return _commit(results);
2422
+
2423
+ case 32:
2424
+ _context15.next = 37;
2425
+ break;
2426
+
2427
+ case 34:
2428
+ _context15.prev = 34;
2429
+ _context15.t1 = _context15['catch'](1);
2430
+
2431
+ if (_context15.t1 != "cancelpwd") {
2432
+ _message2.default.error(_context15.t1);
2433
+ setTimeout(function () {
2434
+ that.handleCzk();
2435
+ }, 500);
2436
+ }
2437
+
2438
+ case 37:
2439
+ case 'end':
2440
+ return _context15.stop();
2441
+ }
2442
+ }
2443
+ }, _callee15, this, [[1, 34], [5, 18, 22, 30], [23,, 25, 29]]);
2444
+ }));
2445
+
2446
+ return function handleUserInputs(_x9) {
2447
+ return _ref18.apply(this, arguments);
2448
+ };
2449
+ }();
2450
+
2451
+ _commit = function () {
2452
+ var _ref17 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee14(values) {
2453
+ var result;
2454
+ return _regenerator2.default.wrap(function _callee14$(_context14) {
2455
+ while (1) {
2456
+ switch (_context14.prev = _context14.next) {
2457
+ case 0:
2458
+ if (!(values.length > 0)) {
2459
+ _context14.next = 6;
2460
+ break;
2461
+ }
2462
+
2463
+ _context14.next = 3;
2464
+ return that.store.validePwd(values[0]);
2465
+
2466
+ case 3:
2467
+ _context14.t0 = _context14.sent;
2468
+ _context14.next = 7;
2469
+ break;
2470
+
2471
+ case 6:
2472
+ _context14.t0 = "";
2473
+
2474
+ case 7:
2475
+ result = _context14.t0;
2476
+
2477
+ if (!(result == "")) {
2478
+ _context14.next = 13;
2479
+ break;
2480
+ }
2481
+
2482
+ //成功
2483
+ //返回
2484
+ that.setCurrentFocusAndAddPay(curmode.paymentType, null, curmode.paymethodId);
2485
+ _promise2.default.resolve();
2486
+ _context14.next = 15;
2487
+ break;
2488
+
2489
+ case 13:
2490
+ _context14.next = 15;
2491
+ return _promise2.default.reject(result);
2492
+
2493
+ case 15:
2494
+ case 'end':
2495
+ return _context14.stop();
2496
+ }
2497
+ }
2498
+ }, _callee14, _this3);
2499
+ }));
2500
+
2501
+ return function _commit(_x8) {
2502
+ return _ref17.apply(this, arguments);
2503
+ };
2504
+ }();
2505
+
2506
+ handleUserInputs(promises);
2507
+ }
2508
+
2509
+ case 5:
2342
2510
  case 'end':
2343
- return _context14.stop();
2511
+ return _context16.stop();
2344
2512
  }
2345
2513
  }
2346
- }, _callee14, _this3);
2514
+ }, _callee16, _this3);
2347
2515
  }));
2348
2516
 
2349
2517
  _this2.fKeyboardOnOk = function (paymethodeId) {
@@ -2383,12 +2551,12 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
2383
2551
  };
2384
2552
 
2385
2553
  _this2.handleBtnDebounced = function () {
2386
- var _ref17 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee15(type, bquick) {
2554
+ var _ref19 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee17(type, bquick) {
2387
2555
  var IdbusiType, CustomerPhone, DistributionMode, Address, isEnableSerialNumber, resultObj, title, productStore, checkResult, _enumController$getEn23, PayStyle, _this2$store7, paymode, brefund, boriginReturn, newStyle, status;
2388
2556
 
2389
- return _regenerator2.default.wrap(function _callee15$(_context15) {
2557
+ return _regenerator2.default.wrap(function _callee17$(_context17) {
2390
2558
  while (1) {
2391
- switch (_context15.prev = _context15.next) {
2559
+ switch (_context17.prev = _context17.next) {
2392
2560
  case 0:
2393
2561
  IdbusiType = _this2.context && _this2.context.viewModel && _this2.context.viewModel.data && _this2.context.viewModel.data.IdbusiType;
2394
2562
  CustomerPhone = _this2.context && _this2.context.viewModel && _this2.context.viewModel.data && _this2.context.viewModel.data.CustomerPhone;
@@ -2397,7 +2565,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
2397
2565
  //预订时,若没录入买家手机号,或配送方式为快递时,弹框买家信息确认框
2398
2566
 
2399
2567
  if (!(IdbusiType == 38)) {
2400
- _context15.next = 14;
2568
+ _context17.next = 14;
2401
2569
  break;
2402
2570
  }
2403
2571
 
@@ -2408,11 +2576,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
2408
2576
  });
2409
2577
 
2410
2578
  if (!(isEnableSerialNumber && resultObj && (DistributionMode.Id == 'ELECTRONIC' || DistributionMode.Id == 'CITY_DISTRIBUTE'))) {
2411
- _context15.next = 9;
2579
+ _context17.next = 9;
2412
2580
  break;
2413
2581
  }
2414
2582
 
2415
- return _context15.abrupt('return', _message2.default.error('启用了序列号管理和批号/有效期管理的商品,不支持快递和同城配送'));
2583
+ return _context17.abrupt('return', _message2.default.error('启用了序列号管理和批号/有效期管理的商品,不支持快递和同城配送'));
2416
2584
 
2417
2585
  case 9:
2418
2586
 
@@ -2421,12 +2589,12 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
2421
2589
  }
2422
2590
 
2423
2591
  if (!(!CustomerPhone && !_this2.context.viewModel.data.Member.Mobilephone || DistributionMode.Id == 'ELECTRONIC' || DistributionMode.Id == 'CITY_DISTRIBUTE')) {
2424
- _context15.next = 14;
2592
+ _context17.next = 14;
2425
2593
  break;
2426
2594
  }
2427
2595
 
2428
2596
  title = (DistributionMode.Id == 'ELECTRONIC' || DistributionMode.Id == 'CITY_DISTRIBUTE') && Address ? '收货地址确认' : '收货人';
2429
- _context15.next = 14;
2597
+ _context17.next = 14;
2430
2598
  return _this2.props.openBuyerModal(title);
2431
2599
 
2432
2600
  case 14:
@@ -2434,18 +2602,18 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
2434
2602
  // 极速模式错误校验
2435
2603
 
2436
2604
  productStore = _mutantsMicrofx.stores.productStore;
2437
- _context15.next = 17;
2605
+ _context17.next = 17;
2438
2606
  return productStore.checkShouldSettlement();
2439
2607
 
2440
2608
  case 17:
2441
- checkResult = _context15.sent;
2609
+ checkResult = _context17.sent;
2442
2610
 
2443
2611
  if (checkResult) {
2444
- _context15.next = 20;
2612
+ _context17.next = 20;
2445
2613
  break;
2446
2614
  }
2447
2615
 
2448
- return _context15.abrupt('return', false);
2616
+ return _context17.abrupt('return', false);
2449
2617
 
2450
2618
  case 20:
2451
2619
 
@@ -2456,11 +2624,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
2456
2624
  _this2$store7 = _this2.store, paymode = _this2$store7.paymode, brefund = _this2$store7.brefund, boriginReturn = _this2$store7.boriginReturn, newStyle = _this2$store7.newStyle;
2457
2625
 
2458
2626
  if (!(bquick && !_mutantsMicrofx.stores.offlineSys.shouldSettlement(type))) {
2459
- _context15.next = 25;
2627
+ _context17.next = 25;
2460
2628
  break;
2461
2629
  }
2462
2630
 
2463
- return _context15.abrupt('return', false);
2631
+ return _context17.abrupt('return', false);
2464
2632
 
2465
2633
  case 25:
2466
2634
  status = false;
@@ -2475,11 +2643,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
2475
2643
  });
2476
2644
 
2477
2645
  if (!_this2.btndebounced) {
2478
- _context15.next = 30;
2646
+ _context17.next = 30;
2479
2647
  break;
2480
2648
  }
2481
2649
 
2482
- return _context15.abrupt('return');
2650
+ return _context17.abrupt('return');
2483
2651
 
2484
2652
  case 30:
2485
2653
  _this2.btndebounced = (0, _debounce3.default)(function () {
@@ -2500,50 +2668,48 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
2500
2668
 
2501
2669
  case 33:
2502
2670
  case 'end':
2503
- return _context15.stop();
2671
+ return _context17.stop();
2504
2672
  }
2505
2673
  }
2506
- }, _callee15, _this3);
2674
+ }, _callee17, _this3);
2507
2675
  }));
2508
2676
 
2509
- return function (_x8, _x9) {
2510
- return _ref17.apply(this, arguments);
2677
+ return function (_x10, _x11) {
2678
+ return _ref19.apply(this, arguments);
2511
2679
  };
2512
2680
  }();
2513
2681
 
2514
2682
  _this2.btnDebounced = function () {
2515
- var _ref18 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee16(type, bquick) {
2516
- var _this2$context$viewMo2, IdbusiType, _this2$context$viewMo3, TotalTaxAmount, _this2$context$viewMo4, ArrearsAmount, save, _this2$props3, settlementType, _this2$props3$creditS, creditSalesVoucher, amount, notSelectableVoucherList, returnAmount1, _result2;
2683
+ var _ref20 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee18(type, bquick) {
2684
+ var _this2$props3, settlementType, _this2$props3$creditS, creditSalesVoucher, amount, notSelectableVoucherList, _this2$context$viewMo2, IdbusiType, _this2$context$viewMo3, TotalTaxAmount, _this2$context$viewMo4, ArrearsAmount, returnAmount1, _result3;
2517
2685
 
2518
- return _regenerator2.default.wrap(function _callee16$(_context16) {
2686
+ return _regenerator2.default.wrap(function _callee18$(_context18) {
2519
2687
  while (1) {
2520
- switch (_context16.prev = _context16.next) {
2688
+ switch (_context18.prev = _context18.next) {
2521
2689
  case 0:
2522
- _this2$context$viewMo2 = _this2.context.viewModel.data, IdbusiType = _this2$context$viewMo2.IdbusiType, _this2$context$viewMo3 = _this2$context$viewMo2.TotalTaxAmount, TotalTaxAmount = _this2$context$viewMo3 === undefined ? 0 : _this2$context$viewMo3, _this2$context$viewMo4 = _this2$context$viewMo2.ArrearsAmount, ArrearsAmount = _this2$context$viewMo4 === undefined ? 0 : _this2$context$viewMo4;
2523
- save = _this2.store.save;
2524
2690
  _this2$props3 = _this2.props, settlementType = _this2$props3.type, _this2$props3$creditS = _this2$props3.creditSalesVoucher, creditSalesVoucher = _this2$props3$creditS === undefined ? [] : _this2$props3$creditS, amount = _this2$props3.amount;
2525
2691
  notSelectableVoucherList = [];
2526
2692
  //赊销-未生成零售结算单的单据不能进行收款
2527
2693
 
2528
2694
  if (!(settlementType == 2)) {
2529
- _context16.next = 11;
2695
+ _context18.next = 9;
2530
2696
  break;
2531
2697
  }
2532
2698
 
2533
2699
  if (!(Number(amount) < 0)) {
2534
- _context16.next = 7;
2700
+ _context18.next = 5;
2535
2701
  break;
2536
2702
  }
2537
2703
 
2538
- return _context16.abrupt('return', _message2.default.warn('所勾选零售单的欠款合计须大于等于0!'));
2704
+ return _context18.abrupt('return', _message2.default.warn('所勾选零售单的欠款合计须大于等于0!'));
2539
2705
 
2540
- case 7:
2706
+ case 5:
2541
2707
  notSelectableVoucherList = creditSalesVoucher.filter(function (o) {
2542
2708
  return o.SettleStatusEnum != 'SETTLED';
2543
2709
  });
2544
2710
 
2545
2711
  if (!(notSelectableVoucherList.length > 0)) {
2546
- _context16.next = 11;
2712
+ _context18.next = 9;
2547
2713
  break;
2548
2714
  }
2549
2715
 
@@ -2572,11 +2738,19 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
2572
2738
  )
2573
2739
  )
2574
2740
  });
2575
- return _context16.abrupt('return');
2741
+ return _context18.abrupt('return');
2742
+
2743
+ case 9:
2744
+ if (!(_this2.props.type != 1)) {
2745
+ _context18.next = 28;
2746
+ break;
2747
+ }
2748
+
2749
+ _this2$context$viewMo2 = _this2.context.viewModel.data, IdbusiType = _this2$context$viewMo2.IdbusiType, _this2$context$viewMo3 = _this2$context$viewMo2.TotalTaxAmount, TotalTaxAmount = _this2$context$viewMo3 === undefined ? 0 : _this2$context$viewMo3, _this2$context$viewMo4 = _this2$context$viewMo2.ArrearsAmount, ArrearsAmount = _this2$context$viewMo4 === undefined ? 0 : _this2$context$viewMo4;
2750
+ //赊销原单退货
2576
2751
 
2577
- case 11:
2578
2752
  if (!(IdbusiType === 42)) {
2579
- _context16.next = 25;
2753
+ _context18.next = 25;
2580
2754
  break;
2581
2755
  }
2582
2756
 
@@ -2589,7 +2763,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
2589
2763
  //判断欠款金额
2590
2764
 
2591
2765
  if (!(returnAmount1 > 0)) {
2592
- _context16.next = 18;
2766
+ _context18.next = 18;
2593
2767
  break;
2594
2768
  }
2595
2769
 
@@ -2602,18 +2776,18 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
2602
2776
  },
2603
2777
  onCancel: function onCancel() {}
2604
2778
  });
2605
- _context16.next = 23;
2779
+ _context18.next = 23;
2606
2780
  break;
2607
2781
 
2608
2782
  case 18:
2609
2783
  returnAmount1 = 0;
2610
- _context16.next = 21;
2611
- return _this2.store.commit(_this2.props.bTest, _this2.context.viewModel.data);
2784
+ _context18.next = 21;
2785
+ return _this2.store.commit(_this2.props.bTest, _this2.context.viewModel.data, _this2.context);
2612
2786
 
2613
2787
  case 21:
2614
- _result2 = _context16.sent;
2788
+ _result3 = _context18.sent;
2615
2789
 
2616
- if (_result2 === true) {
2790
+ if (_result3 === true) {
2617
2791
  //成功
2618
2792
  _this2.settleSuccess('onCreditReturn');
2619
2793
  _promise2.default.resolve();
@@ -2631,28 +2805,35 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
2631
2805
  }
2632
2806
 
2633
2807
  case 23:
2634
- _context16.next = 26;
2808
+ _context18.next = 26;
2635
2809
  break;
2636
2810
 
2637
2811
  case 25:
2638
2812
  _this2.handleBtnDebounced(type, bquick);
2639
2813
 
2640
2814
  case 26:
2815
+ _context18.next = 29;
2816
+ break;
2817
+
2818
+ case 28:
2819
+ _this2.handleBtnDebounced(type, bquick);
2820
+
2821
+ case 29:
2641
2822
  case 'end':
2642
- return _context16.stop();
2823
+ return _context18.stop();
2643
2824
  }
2644
2825
  }
2645
- }, _callee16, _this3);
2826
+ }, _callee18, _this3);
2646
2827
  }));
2647
2828
 
2648
- return function (_x10, _x11) {
2649
- return _ref18.apply(this, arguments);
2829
+ return function (_x12, _x13) {
2830
+ return _ref20.apply(this, arguments);
2650
2831
  };
2651
2832
  }();
2652
2833
 
2653
2834
  _this2.onCzkChange = function (v) {
2654
- var _ref19 = _mutantsUtil.platform || {},
2655
- isNewRetailBCPos = _ref19.isNewRetailBCPos;
2835
+ var _ref21 = _mutantsUtil.platform || {},
2836
+ isNewRetailBCPos = _ref21.isNewRetailBCPos;
2656
2837
 
2657
2838
  if (!isNewRetailBCPos) {
2658
2839
  _this2.store.paymode.currentMode.member.setCardNo(v);
@@ -3119,9 +3300,9 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
3119
3300
  return false;
3120
3301
  }
3121
3302
  if (_this2.store.brefund) {
3122
- var _result3 = !(paymode.receivable == 0 && thePaymodes.length > 0);
3123
- console.log("settlement.checkSettleDisabled返回结果:", _result3);
3124
- return _result3;
3303
+ var _result4 = !(paymode.receivable == 0 && thePaymodes.length > 0);
3304
+ console.log("settlement.checkSettleDisabled返回结果:", _result4);
3305
+ return _result4;
3125
3306
  }
3126
3307
  var xj = (0, _find3.default)(thePaymodes, function (mode) {
3127
3308
  return mode.paymentType == PayStyle.xianjin;
@@ -3258,12 +3439,12 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
3258
3439
 
3259
3440
  _this2.hasElectron = hasElectron;
3260
3441
 
3261
- var _ref20 = _mutantsMicrofx.stores.user.options.get('loginInfo') || {},
3262
- MemberMeStorageCardInputByKeyBoard = _ref20.MemberMeStorageCardInputByKeyBoard,
3263
- ICCardServer = _ref20.ICCardServer,
3264
- ICCardPassword = _ref20.ICCardPassword,
3265
- PreSellOrBook = _ref20.PreSellOrBook,
3266
- PercentageWhenBook = _ref20.PercentageWhenBook;
3442
+ var _ref22 = _mutantsMicrofx.stores.user.options.get('loginInfo') || {},
3443
+ MemberMeStorageCardInputByKeyBoard = _ref22.MemberMeStorageCardInputByKeyBoard,
3444
+ ICCardServer = _ref22.ICCardServer,
3445
+ ICCardPassword = _ref22.ICCardPassword,
3446
+ PreSellOrBook = _ref22.PreSellOrBook,
3447
+ PercentageWhenBook = _ref22.PercentageWhenBook;
3267
3448
 
3268
3449
  _this2.isStorageCardInputType = MemberMeStorageCardInputByKeyBoard; // 仅储值卡是否禁用键盘输入,'0'为不禁用 '1'为禁用
3269
3450
  _this2.iCCardServer = parseInt(ICCardServer); // 启用IC卡:0为禁用 1为启用
@@ -3272,9 +3453,9 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
3272
3453
  _this2.percentageWhenBook = PercentageWhenBook;
3273
3454
  //移动端环境下,没有读取IC卡的方式。
3274
3455
 
3275
- var _ref21 = _mutantsUtil.platform || {},
3276
- isHorizontalPad = _ref21.isHorizontalPad,
3277
- isHorizontalSunMi = _ref21.isHorizontalSunMi;
3456
+ var _ref23 = _mutantsUtil.platform || {},
3457
+ isHorizontalPad = _ref23.isHorizontalPad,
3458
+ isHorizontalSunMi = _ref23.isHorizontalSunMi;
3278
3459
 
3279
3460
  _this2.isHorizontalPad = !!isHorizontalPad;
3280
3461
  _this2.isHorizontalSunMi = !!isHorizontalSunMi;
@@ -3423,8 +3604,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
3423
3604
  }, {
3424
3605
  key: 'isNoProductTip',
3425
3606
  value: function isNoProductTip(nonProductMap) {
3426
- var _ref22 = this.context.viewModel.data || {},
3427
- RetailDetails = _ref22.RetailDetails;
3607
+ var _ref24 = this.context.viewModel.data || {},
3608
+ RetailDetails = _ref24.RetailDetails;
3428
3609
 
3429
3610
  var temphtml = [];
3430
3611
  if ((0, _keys2.default)(nonProductMap).length > 0) {
@@ -3697,11 +3878,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
3697
3878
  quantity4 = 0;
3698
3879
  var sumQuantity = 0; //数量总和的值,包括称重的。
3699
3880
 
3700
- var _ref23 = quantityDetail || {},
3701
- _ref23$buyQuantity = _ref23.buyQuantity,
3702
- buyQuantity = _ref23$buyQuantity === undefined ? 0 : _ref23$buyQuantity,
3703
- _ref23$returnQuantity = _ref23.returnQuantity,
3704
- returnQuantity = _ref23$returnQuantity === undefined ? 0 : _ref23$returnQuantity;
3881
+ var _ref25 = quantityDetail || {},
3882
+ _ref25$buyQuantity = _ref25.buyQuantity,
3883
+ buyQuantity = _ref25$buyQuantity === undefined ? 0 : _ref25$buyQuantity,
3884
+ _ref25$returnQuantity = _ref25.returnQuantity,
3885
+ returnQuantity = _ref25$returnQuantity === undefined ? 0 : _ref25$returnQuantity;
3705
3886
 
3706
3887
  var quantityPrecision = (0, _tplusPoslogin.PosInitData)("QuantityPrecision");
3707
3888
  quantityPrecision = quantityPrecision ? parseInt(quantityPrecision) : '';
@@ -4589,22 +4770,22 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
4589
4770
  return _this8.czkInput = input;
4590
4771
  },
4591
4772
  onKeyDown: function () {
4592
- var _ref24 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee17(e) {
4773
+ var _ref26 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee19(e) {
4593
4774
  var time, _paymode;
4594
4775
 
4595
- return _regenerator2.default.wrap(function _callee17$(_context17) {
4776
+ return _regenerator2.default.wrap(function _callee19$(_context19) {
4596
4777
  while (1) {
4597
- switch (_context17.prev = _context17.next) {
4778
+ switch (_context19.prev = _context19.next) {
4598
4779
  case 0:
4599
4780
  if (!(e.keyCode == 13)) {
4600
- _context17.next = 14;
4781
+ _context19.next = 14;
4601
4782
  break;
4602
4783
  }
4603
4784
 
4604
4785
  time = Date.parse(new Date());
4605
4786
 
4606
4787
  if (!(_this8.isStorageCardInputType && time - _this8.keypressStime > 350)) {
4607
- _context17.next = 7;
4788
+ _context19.next = 7;
4608
4789
  break;
4609
4790
  }
4610
4791
 
@@ -4613,11 +4794,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
4613
4794
  _this8.setState({
4614
4795
  czkValue: null
4615
4796
  });
4616
- return _context17.abrupt('return');
4797
+ return _context19.abrupt('return');
4617
4798
 
4618
4799
  case 7:
4619
4800
  _this8.keypressStime = null;
4620
- _context17.next = 10;
4801
+ _context19.next = 10;
4621
4802
  return _this8.loadCzk(e.target.value);
4622
4803
 
4623
4804
  case 10:
@@ -4628,7 +4809,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
4628
4809
  czkvalue: null
4629
4810
  });
4630
4811
  }
4631
- _context17.next = 15;
4812
+ _context19.next = 15;
4632
4813
  break;
4633
4814
 
4634
4815
  case 14:
@@ -4638,14 +4819,14 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
4638
4819
 
4639
4820
  case 15:
4640
4821
  case 'end':
4641
- return _context17.stop();
4822
+ return _context19.stop();
4642
4823
  }
4643
4824
  }
4644
- }, _callee17, _this8);
4825
+ }, _callee19, _this8);
4645
4826
  }));
4646
4827
 
4647
- return function (_x13) {
4648
- return _ref24.apply(this, arguments);
4828
+ return function (_x15) {
4829
+ return _ref26.apply(this, arguments);
4649
4830
  };
4650
4831
  }(),
4651
4832
  onFocus: function onFocus(e) {
@@ -4702,8 +4883,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
4702
4883
  _this8.setCurrentModeValue(event.target.value, Math.min(currentMode.maxamount, currentMode.balance));
4703
4884
  },
4704
4885
  defaultValue: currentMode && (0, _utils.getFixedNumber)(brefund ? currentMode.value : Math.min(currentMode.value, currentMode.maxamount, currentMode.balance)),
4705
- ref: function ref(_ref25) {
4706
- return _this8["inputCzkAmount"] = _ref25;
4886
+ ref: function ref(_ref27) {
4887
+ return _this8["inputCzkAmount"] = _ref27;
4707
4888
  },
4708
4889
  onFocus: function onFocus(e) {
4709
4890
  _this8.inputkey = "inputCzkAmount";
@@ -4797,7 +4978,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
4797
4978
  _react2.default.createElement(
4798
4979
  _modal2.default,
4799
4980
  (0, _defineProperty3.default)({
4800
- wrapClassName: 'djq ' + (this.voucherRunningFast ? 'no-zoom' : '') + ' ' + (this.isHorizontalPad ? 'extraHeight' : '') + ' modify-password',
4981
+ wrapClassName: 'djq ' + _index.hotKey.hotKeyBindClass('5', 'modify-password') + ' ' + (this.voucherRunningFast ? 'no-zoom' : '') + ' ' + (this.isHorizontalPad ? 'extraHeight' : ''),
4801
4982
  width: '400px',
4802
4983
  visible: this.state.showSetPwdModal,
4803
4984
  backdropClosable: false,
@@ -4822,14 +5003,14 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
4822
5003
  '\u786E\u5B9A'
4823
5004
  )
4824
5005
  )),
4825
- _react2.default.createElement(_ModifyPass2.default, { changeBtnDisabled: this.changeBtnDisabled, passwordTitle: '\u8BBE\u7F6E\u5BC6\u7801', ref: function ref(_ref26) {
4826
- return _this8.modifyPass = _ref26;
5006
+ _react2.default.createElement(_ModifyPass2.default, { changeBtnDisabled: this.changeBtnDisabled, passwordTitle: '\u8BBE\u7F6E\u5BC6\u7801', ref: function ref(_ref28) {
5007
+ return _this8.modifyPass = _ref28;
4827
5008
  }, cardList: this.store.paymode.currentMode, cancelModal: this.handleSetPwdCancel })
4828
5009
  ),
4829
5010
  _react2.default.createElement(
4830
5011
  _modal2.default,
4831
5012
  (0, _defineProperty3.default)({
4832
- wrapClassName: 'djq ' + (this.isHorizontalPad ? 'extraHeight' : '') + ' confirmPwdWraper',
5013
+ wrapClassName: 'djq ' + _index.hotKey.hotKeyBindClass('5', 'confirmPwdWraper') + ' ' + (this.isHorizontalPad ? 'extraHeight' : ''),
4833
5014
  width: '400px',
4834
5015
  visible: this.state.confirmStatus,
4835
5016
  backdropClosable: false,
@@ -4859,6 +5040,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
4859
5040
  placeholder: '',
4860
5041
  maxLength: 6,
4861
5042
  labelName: '\u50A8\u503C\u4F59\u989D\u5BC6\u7801',
5043
+ ok: this.handleConfirmPwdModal,
4862
5044
  getConfirmPwd: this.getConfirmPwd,
4863
5045
  params: 'pay',
4864
5046
  amount: this.store.paymode.currentMode && (0, _utils.getFixedNumber)(this.store.paymode.currentMode.value)
@@ -5346,8 +5528,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
5346
5528
  _this8.setCurrentModeValue(e.target.value, Math.min(currentMode.maxamount, currentMode.member.exchangable));
5347
5529
  },
5348
5530
  defaultValue: currentMode && currentMode.member && (0, _utils.getFixedNumber)(Math.min(currentMode.value, currentMode.maxamount, currentMode.member.exchangable)),
5349
- ref: function ref(_ref27) {
5350
- return _this8["inputJfdxAmount"] = _ref27;
5531
+ ref: function ref(_ref29) {
5532
+ return _this8["inputJfdxAmount"] = _ref29;
5351
5533
  },
5352
5534
  onFocus: function onFocus(e) {
5353
5535
  _this8.inputkey = "inputJfdxAmount";