tplus-components-touch 3.27.11 → 3.27.15

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.
@@ -24,6 +24,10 @@ var _carousel = require('antd/es/carousel');
24
24
 
25
25
  var _carousel2 = _interopRequireDefault(_carousel);
26
26
 
27
+ var _table = require('antd/es/table');
28
+
29
+ var _table2 = _interopRequireDefault(_table);
30
+
27
31
  var _keys = require('babel-runtime/core-js/object/keys');
28
32
 
29
33
  var _keys2 = _interopRequireDefault(_keys);
@@ -94,6 +98,8 @@ require('antd/es/drawer/style');
94
98
 
95
99
  require('antd/es/carousel/style');
96
100
 
101
+ require('antd/es/table/style');
102
+
97
103
  require('antd/es/button/style');
98
104
 
99
105
  var _react = require('react');
@@ -2501,25 +2507,65 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
2501
2507
  var _ref24 = _this2.context.viewModel.data || {},
2502
2508
  RetailDetails = _ref24.RetailDetails;
2503
2509
 
2504
- var names = [];
2505
2510
  var temphtml = [];
2506
- var count = 0;
2507
2511
  if ((0, _keys2.default)(nonProductMap).length > 0) {
2512
+ var columns = [{
2513
+ title: '商品名称',
2514
+ dataIndex: 'name',
2515
+ key: 'name',
2516
+ ellipsis: true
2517
+ }, {
2518
+ title: '原因',
2519
+ dataIndex: 'reason',
2520
+ key: 'reason',
2521
+ ellipsis: true
2522
+ }];
2523
+
2508
2524
  var _loop = function _loop(key) {
2509
- count++;
2510
2525
  var product = RetailDetails.find(function (o) {
2511
2526
  return o.Idinventory == key;
2512
2527
  });
2513
- names.push('【' + product.Inventory.Name + '】');
2514
- temphtml.push(count + '、' + nonProductMap[key]);
2528
+ temphtml.push({ name: product.Inventory.Name, reason: nonProductMap[key] });
2515
2529
  };
2516
2530
 
2517
2531
  for (var key in nonProductMap) {
2518
2532
  _loop(key);
2519
2533
  }
2520
- _modalWraper2.default.warning({
2534
+ var modal = (0, _asyncModal2.default)({
2535
+ onPressEnter: function onPressEnter() {
2536
+ modal.destroy();
2537
+ },
2538
+ maskClosable: false,
2539
+ keyboard: false,
2540
+ closable: true,
2521
2541
  title: '不可配送商品',
2522
- content: '\u5546\u54C1' + names.join(',') + '\u4E0D\u53EF\u914D\u9001\uFF0C\u53EF\u80FD\u539F\u56E0\u5982\u4E0B\uFF1A' + temphtml.join(';')
2542
+ width: 600,
2543
+ className: '',
2544
+ content: _react2.default.createElement(
2545
+ 'div',
2546
+ { className: 'not-distribution-tip' },
2547
+ _react2.default.createElement(
2548
+ 'div',
2549
+ { className: 'tip-content' },
2550
+ _react2.default.createElement(_table2.default, {
2551
+ columns: columns,
2552
+ dataSource: temphtml,
2553
+ scroll: { y: 240 },
2554
+ pagination: false,
2555
+ size: 'middle' })
2556
+ ),
2557
+ _react2.default.createElement(
2558
+ 'div',
2559
+ { className: 'not-distribution-btn' },
2560
+ _react2.default.createElement(
2561
+ _button2.default,
2562
+ { type: 'primary', onClick: function onClick() {
2563
+ modal.destroy();
2564
+ } },
2565
+ '\u77E5\u9053\u4E86'
2566
+ )
2567
+ )
2568
+ )
2523
2569
  });
2524
2570
  return true;
2525
2571
  }
@@ -2528,7 +2574,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
2528
2574
 
2529
2575
  _this2.btnDebounced = function () {
2530
2576
  var _ref25 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee14(type, bquick) {
2531
- var IdbusiType, CustomerPhone, DistributionMode, _this2$store7, getPerformanceDistributionValue, getPosFreight, updataFreight, IPMSG, _ref26, nonProductMap, _ref26$freightProduct, freightProductDTOList, data, _enumController$getEn22, PayStyle, _this2$store8, paymode, brefund, boriginReturn, newStyle, status;
2577
+ var IdbusiType, CustomerPhone, DistributionMode, Address, title, _this2$store7, getPerformanceDistributionValue, getPosFreight, updataFreight, IPMSG, _ref26, nonProductMap, _ref26$freightProduct, freightProductDTOList, data, _enumController$getEn22, PayStyle, _this2$store8, paymode, brefund, boriginReturn, newStyle, status;
2532
2578
 
2533
2579
  return _regenerator2.default.wrap(function _callee14$(_context14) {
2534
2580
  while (1) {
@@ -2537,24 +2583,26 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
2537
2583
  IdbusiType = _this2.context && _this2.context.viewModel && _this2.context.viewModel.data && _this2.context.viewModel.data.IdbusiType;
2538
2584
  CustomerPhone = _this2.context && _this2.context.viewModel && _this2.context.viewModel.data && _this2.context.viewModel.data.CustomerPhone;
2539
2585
  DistributionMode = _this2.context && _this2.context.viewModel && _this2.context.viewModel.data && _this2.context.viewModel.data.DistributionMode;
2586
+ Address = _this2.context && _this2.context.viewModel && _this2.context.viewModel.data && _this2.context.viewModel.data.Address;
2540
2587
  //预订时,若没录入买家手机号,或配送方式为快递时,弹框买家信息确认框
2541
2588
 
2542
2589
  if (!(IdbusiType == 38)) {
2543
- _context14.next = 28;
2590
+ _context14.next = 30;
2544
2591
  break;
2545
2592
  }
2546
2593
 
2547
2594
  if (!(!CustomerPhone || DistributionMode.Id == 'ELECTRONIC' || DistributionMode.Id == 'CITY_DISTRIBUTE')) {
2548
- _context14.next = 7;
2595
+ _context14.next = 9;
2549
2596
  break;
2550
2597
  }
2551
2598
 
2552
- _context14.next = 7;
2553
- return _this2.props.openBuyerModal();
2599
+ title = (DistributionMode.Id == 'ELECTRONIC' || DistributionMode.Id == 'CITY_DISTRIBUTE') && Address ? '收货地址确认' : '收货人';
2600
+ _context14.next = 9;
2601
+ return _this2.props.openBuyerModal(title);
2554
2602
 
2555
- case 7:
2603
+ case 9:
2556
2604
  if (!(DistributionMode.Id == 'ELECTRONIC' || DistributionMode.Id == 'CITY_DISTRIBUTE')) {
2557
- _context14.next = 28;
2605
+ _context14.next = 30;
2558
2606
  break;
2559
2607
  }
2560
2608
 
@@ -2564,45 +2612,45 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
2564
2612
  if (!!window.localStorage.IPMSG) {
2565
2613
  IPMSG = JSON.parse(window.localStorage.IPMSG);
2566
2614
  }
2567
- _context14.next = 13;
2615
+ _context14.next = 15;
2568
2616
  return getPerformanceDistributionValue({ cip: IPMSG.query || "", dto: _this2.context.viewModel.data });
2569
2617
 
2570
- case 13:
2618
+ case 15:
2571
2619
  _ref26 = _context14.sent;
2572
2620
  nonProductMap = _ref26.nonProductMap;
2573
2621
  _ref26$freightProduct = _ref26.freightProductDTOList;
2574
2622
  freightProductDTOList = _ref26$freightProduct === undefined ? [] : _ref26$freightProduct;
2575
2623
 
2576
2624
  if (!_this2.isNoProductTip(nonProductMap)) {
2577
- _context14.next = 19;
2625
+ _context14.next = 21;
2578
2626
  break;
2579
2627
  }
2580
2628
 
2581
2629
  return _context14.abrupt('return');
2582
2630
 
2583
- case 19:
2584
- _context14.next = 21;
2585
- return _this2.props.openWareHouseModal(freightProductDTOList);
2586
-
2587
2631
  case 21:
2588
2632
  _context14.next = 23;
2589
- return getPosFreight({ cip: IPMSG.query || "", dto: _this2.context.viewModel.data });
2633
+ return _this2.props.openWareHouseModal(freightProductDTOList);
2590
2634
 
2591
2635
  case 23:
2636
+ _context14.next = 25;
2637
+ return getPosFreight({ cip: IPMSG.query || "", dto: _this2.context.viewModel.data });
2638
+
2639
+ case 25:
2592
2640
  data = _context14.sent;
2593
2641
 
2594
2642
  if (!_this2.isNoProductTip(data.nonProductMap)) {
2595
- _context14.next = 26;
2643
+ _context14.next = 28;
2596
2644
  break;
2597
2645
  }
2598
2646
 
2599
2647
  return _context14.abrupt('return');
2600
2648
 
2601
- case 26:
2602
- _context14.next = 28;
2649
+ case 28:
2650
+ _context14.next = 30;
2603
2651
  return _this2.props.updataFreight(data.freight);
2604
2652
 
2605
- case 28:
2653
+ case 30:
2606
2654
 
2607
2655
  _this2.setState({
2608
2656
  bquick: bquick
@@ -2611,13 +2659,13 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
2611
2659
  _this2$store8 = _this2.store, paymode = _this2$store8.paymode, brefund = _this2$store8.brefund, boriginReturn = _this2$store8.boriginReturn, newStyle = _this2$store8.newStyle;
2612
2660
 
2613
2661
  if (!(bquick && !_mutantsMicrofx.stores.offlineSys.shouldSettlement(type))) {
2614
- _context14.next = 33;
2662
+ _context14.next = 35;
2615
2663
  break;
2616
2664
  }
2617
2665
 
2618
2666
  return _context14.abrupt('return', false);
2619
2667
 
2620
- case 33:
2668
+ case 35:
2621
2669
  status = false;
2622
2670
 
2623
2671
  paymode.thePaymodes.forEach(function (v) {
@@ -2630,13 +2678,13 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
2630
2678
  });
2631
2679
 
2632
2680
  if (!_this2.btndebounced) {
2633
- _context14.next = 38;
2681
+ _context14.next = 40;
2634
2682
  break;
2635
2683
  }
2636
2684
 
2637
2685
  return _context14.abrupt('return');
2638
2686
 
2639
- case 38:
2687
+ case 40:
2640
2688
  _this2.btndebounced = (0, _debounce3.default)(function () {
2641
2689
  if (bquick) {
2642
2690
  _this2.quickSettle(type);
@@ -2653,7 +2701,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
2653
2701
  _this2.btndebounced = null;
2654
2702
  }, 2000);
2655
2703
 
2656
- case 41:
2704
+ case 43:
2657
2705
  case 'end':
2658
2706
  return _context14.stop();
2659
2707
  }
@@ -2749,6 +2797,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
2749
2797
  value = parseFloat(receivable) + parseFloat(inputTarget2.innerHTML);
2750
2798
  }
2751
2799
  inputTarget.value = value;
2800
+ //TODO 这里修改找零计算,应减去取货时最大支付金额,或者预订时,找零计算应该是小于应收,按现有计算找零,大于应收小于最大比例金额,不找零,大于最大比例金额找零
2752
2801
  inputTarget2.innerHTML = (0, _utils.getFixedNumber)(parseFloat(value || 0) - parseFloat(receivable));
2753
2802
  };
2754
2803