tplus-components-touch 3.27.1 → 3.27.5

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.
Files changed (38) hide show
  1. package/dist/components/billSearch/index.js +14 -14
  2. package/dist/components/billSearch/index.js.map +1 -1
  3. package/dist/components/cloudPrint/index.js +57 -4
  4. package/dist/components/cloudPrint/index.js.map +1 -1
  5. package/dist/components/commonForm/addressPicker/index.js +16 -7
  6. package/dist/components/commonForm/addressPicker/index.js.map +1 -1
  7. package/dist/components/commonForm/index.js +9 -3
  8. package/dist/components/commonForm/index.js.map +1 -1
  9. package/dist/components/deliverySearch/index.js +12 -8
  10. package/dist/components/deliverySearch/index.js.map +1 -1
  11. package/dist/components/input/scanInput.js +98 -0
  12. package/dist/components/input/scanInput.js.map +1 -0
  13. package/dist/components/input/scanInput.less +28 -0
  14. package/dist/components/inventorySearch/store.js +31 -12
  15. package/dist/components/inventorySearch/store.js.map +1 -1
  16. package/dist/components/inventorySearch/tab.js +9 -2
  17. package/dist/components/inventorySearch/tab.js.map +1 -1
  18. package/dist/components/loading/loadingContent.js +13 -4
  19. package/dist/components/loading/loadingContent.js.map +1 -1
  20. package/dist/components/loading/style.less +13 -4
  21. package/dist/components/message/index.js +8 -5
  22. package/dist/components/message/index.js.map +1 -1
  23. package/dist/components/presale/pickup.js +3 -3
  24. package/dist/components/presale/pickup.js.map +1 -1
  25. package/dist/components/settlement/settlement.js +107 -78
  26. package/dist/components/settlement/settlement.js.map +1 -1
  27. package/dist/components/settlement/settlement.less +7 -1
  28. package/dist/components/settlement/settlementStore.js +96 -109
  29. package/dist/components/settlement/settlementStore.js.map +1 -1
  30. package/dist/components/socket/index.js +6 -5
  31. package/dist/components/socket/index.js.map +1 -1
  32. package/dist/components/touchTable/index.js +8 -3
  33. package/dist/components/touchTable/index.js.map +1 -1
  34. package/dist/index.js +6 -1
  35. package/dist/index.js.map +1 -1
  36. package/dist/util/tools.js +5 -7
  37. package/dist/util/tools.js.map +1 -1
  38. package/package.json +1 -1
@@ -24,6 +24,10 @@ var _carousel = require('antd/es/carousel');
24
24
 
25
25
  var _carousel2 = _interopRequireDefault(_carousel);
26
26
 
27
+ var _keys = require('babel-runtime/core-js/object/keys');
28
+
29
+ var _keys2 = _interopRequireDefault(_keys);
30
+
27
31
  var _button = require('antd/es/button');
28
32
 
29
33
  var _button2 = _interopRequireDefault(_button);
@@ -2493,19 +2497,48 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
2493
2497
  };
2494
2498
  }();
2495
2499
 
2500
+ _this2.isNoProductTip = function (nonProductMap) {
2501
+ var _ref24 = _this2.context.viewModel.data || {},
2502
+ RetailDetails = _ref24.RetailDetails;
2503
+
2504
+ var names = [];
2505
+ var temphtml = [];
2506
+ var count = 0;
2507
+ if ((0, _keys2.default)(nonProductMap).length > 0) {
2508
+ var _loop = function _loop(key) {
2509
+ count++;
2510
+ var product = RetailDetails.find(function (o) {
2511
+ return o.Idinventory == key;
2512
+ });
2513
+ names.push('【' + product.Inventory.Name + '】');
2514
+ temphtml.push(count + '、' + nonProductMap[key]);
2515
+ };
2516
+
2517
+ for (var key in nonProductMap) {
2518
+ _loop(key);
2519
+ }
2520
+ _modalWraper2.default.warning({
2521
+ title: '不可配送商品',
2522
+ content: '\u5546\u54C1' + names.join(',') + '\u4E0D\u53EF\u914D\u9001\uFF0C\u53EF\u80FD\u539F\u56E0\u5982\u4E0B\uFF1A' + temphtml.join(';')
2523
+ });
2524
+ return true;
2525
+ }
2526
+ return false;
2527
+ };
2528
+
2496
2529
  _this2.btnDebounced = function () {
2497
- var _ref24 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee14(type, bquick) {
2498
- var _ref25, IdbusiType, CustomerPhone, DistributionMode, _this2$store7, getPerformanceDistributionValue, getPosFreight, updataFreight, dto, IPMSG, _ref26, _ref26$data, nonProductMap, freightProductDTOList, len, names, temphtml, _ref27, freight, _enumController$getEn22, PayStyle, _this2$store8, paymode, brefund, boriginReturn, newStyle, status;
2530
+ var _ref25 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee14(type, bquick) {
2531
+ var _ref26, IdbusiType, CustomerPhone, DistributionMode, _this2$store7, getPerformanceDistributionValue, getPosFreight, updataFreight, IPMSG, _ref27, nonProductMap, _ref27$freightProduct, freightProductDTOList, data, _enumController$getEn22, PayStyle, _this2$store8, paymode, brefund, boriginReturn, newStyle, status;
2499
2532
 
2500
2533
  return _regenerator2.default.wrap(function _callee14$(_context14) {
2501
2534
  while (1) {
2502
2535
  switch (_context14.prev = _context14.next) {
2503
2536
  case 0:
2504
- _ref25 = _this2.context.viewModel.data || {}, IdbusiType = _ref25.IdbusiType, CustomerPhone = _ref25.CustomerPhone, DistributionMode = _ref25.DistributionMode;
2537
+ _ref26 = _this2.context.viewModel.data || {}, IdbusiType = _ref26.IdbusiType, CustomerPhone = _ref26.CustomerPhone, DistributionMode = _ref26.DistributionMode;
2505
2538
  //预订时,若没录入买家手机号,或配送方式为快递时,弹框买家信息确认框
2506
2539
 
2507
2540
  if (!(IdbusiType == 38)) {
2508
- _context14.next = 46;
2541
+ _context14.next = 28;
2509
2542
  break;
2510
2543
  }
2511
2544
 
@@ -2519,85 +2552,58 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
2519
2552
 
2520
2553
  case 5:
2521
2554
  if (!(DistributionMode.Id == 'ELECTRONIC' || DistributionMode.Id == 'CITY_DISTRIBUTE')) {
2522
- _context14.next = 46;
2555
+ _context14.next = 28;
2523
2556
  break;
2524
2557
  }
2525
2558
 
2526
2559
  _this2$store7 = _this2.store, getPerformanceDistributionValue = _this2$store7.getPerformanceDistributionValue, getPosFreight = _this2$store7.getPosFreight, updataFreight = _this2$store7.updataFreight;
2527
- dto = _this2.context.viewModel.data.cut();
2528
-
2529
- dto.AddressLng = '116.244057';
2530
- dto.AddressLat = '40.068669';
2531
- dto.Address = '北清路68号用友产业园东区19C座';
2532
- dto.Province = '北京市';
2533
- dto.City = '北京市';
2534
- dto.District = '海淀区';
2535
- // cc结算调用
2536
2560
  IPMSG = {};
2537
2561
 
2538
2562
  if (!!window.localStorage.IPMSG) {
2539
2563
  IPMSG = JSON.parse(window.localStorage.IPMSG);
2540
2564
  }
2541
- _context14.next = 18;
2542
- return getPerformanceDistributionValue({ cip: IPMSG.query || "", dto: dto });
2543
-
2544
- case 18:
2545
- _ref26 = _context14.sent;
2546
- _ref26$data = _ref26.data;
2547
- nonProductMap = _ref26$data.nonProductMap;
2548
- freightProductDTOList = _ref26$data.freightProductDTOList;
2549
- len = nonProductMap.length;
2550
-
2551
- if (!(len > 0)) {
2552
- _context14.next = 29;
2553
- break;
2554
- }
2565
+ _context14.next = 11;
2566
+ return getPerformanceDistributionValue({ cip: IPMSG.query || "", dto: _this2.context.viewModel.data });
2555
2567
 
2556
- names = [];
2557
- temphtml = [];
2568
+ case 11:
2569
+ _ref27 = _context14.sent;
2570
+ nonProductMap = _ref27.nonProductMap;
2571
+ _ref27$freightProduct = _ref27.freightProductDTOList;
2572
+ freightProductDTOList = _ref27$freightProduct === undefined ? [] : _ref27$freightProduct;
2558
2573
 
2559
- nonProductMap.forEach(function (obj, index) {
2560
- for (var key in obj) {
2561
- names.push('【' + key + '】');
2562
- temphtml.push(index + 1 + '、' + obj[key]);
2563
- }
2564
- });
2574
+ console.log('zlfnonProductMap', nonProductMap);
2575
+ console.log('zlffreightProductDTOList', freightProductDTOList);
2576
+
2577
+ if (!_this2.isNoProductTip(nonProductMap)) {
2578
+ _context14.next = 19;
2579
+ break;
2580
+ }
2565
2581
 
2566
- _modalWraper2.default.warning({
2567
- title: '不可配送商品',
2568
- content: '\u5546\u54C1' + names.join(',') + '\u4E0D\u53EF\u914D\u9001\uFF0C\u53EF\u80FD\u539F\u56E0\u5982\u4E0B\uFF1A' + temphtml.join(';')
2569
- });
2570
2582
  return _context14.abrupt('return');
2571
2583
 
2572
- case 29:
2573
- _context14.next = 31;
2584
+ case 19:
2585
+ _context14.next = 21;
2574
2586
  return _this2.props.openWareHouseModal(freightProductDTOList);
2575
2587
 
2576
- case 31:
2588
+ case 21:
2589
+ _context14.next = 23;
2590
+ return getPosFreight({ cip: IPMSG.query || "", dto: _this2.context.viewModel.data });
2577
2591
 
2578
- dto = _this2.context.viewModel.data.cut();
2579
- dto.AddressLng = '116.244057';
2580
- dto.AddressLat = '40.068669';
2581
- dto.Address = '北清路68号用友产业园东区19C座';
2582
- dto.Province = '北京市';
2583
- dto.City = '北京市';
2584
- dto.District = '海淀区';
2592
+ case 23:
2593
+ data = _context14.sent;
2585
2594
 
2586
- _context14.next = 40;
2587
- return getPosFreight({ cip: IPMSG.query || "", dto: dto });
2588
-
2589
- case 40:
2590
- _ref27 = _context14.sent;
2591
- freight = _ref27.data.freight;
2595
+ if (!_this2.isNoProductTip(data.nonProductMap)) {
2596
+ _context14.next = 26;
2597
+ break;
2598
+ }
2592
2599
 
2593
- updataFreight(freight);
2594
- _context14.next = 45;
2595
- return _this2.props.updataFreight(freight);
2600
+ return _context14.abrupt('return');
2596
2601
 
2597
- case 45:
2598
- console.log('zlf获取运费', freight);
2602
+ case 26:
2603
+ _context14.next = 28;
2604
+ return _this2.props.updataFreight(data.freight);
2599
2605
 
2600
- case 46:
2606
+ case 28:
2601
2607
 
2602
2608
  _this2.setState({
2603
2609
  bquick: bquick
@@ -2606,13 +2612,13 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
2606
2612
  _this2$store8 = _this2.store, paymode = _this2$store8.paymode, brefund = _this2$store8.brefund, boriginReturn = _this2$store8.boriginReturn, newStyle = _this2$store8.newStyle;
2607
2613
 
2608
2614
  if (!(bquick && !_mutantsMicrofx.stores.offlineSys.shouldSettlement(type))) {
2609
- _context14.next = 51;
2615
+ _context14.next = 33;
2610
2616
  break;
2611
2617
  }
2612
2618
 
2613
2619
  return _context14.abrupt('return', false);
2614
2620
 
2615
- case 51:
2621
+ case 33:
2616
2622
  status = false;
2617
2623
 
2618
2624
  paymode.thePaymodes.forEach(function (v) {
@@ -2625,13 +2631,13 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
2625
2631
  });
2626
2632
 
2627
2633
  if (!_this2.btndebounced) {
2628
- _context14.next = 56;
2634
+ _context14.next = 38;
2629
2635
  break;
2630
2636
  }
2631
2637
 
2632
2638
  return _context14.abrupt('return');
2633
2639
 
2634
- case 56:
2640
+ case 38:
2635
2641
  _this2.btndebounced = (0, _debounce3.default)(function () {
2636
2642
  if (bquick) {
2637
2643
  _this2.quickSettle(type);
@@ -2648,7 +2654,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
2648
2654
  _this2.btndebounced = null;
2649
2655
  }, 2000);
2650
2656
 
2651
- case 59:
2657
+ case 41:
2652
2658
  case 'end':
2653
2659
  return _context14.stop();
2654
2660
  }
@@ -2657,7 +2663,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
2657
2663
  }));
2658
2664
 
2659
2665
  return function (_x8, _x9) {
2660
- return _ref24.apply(this, arguments);
2666
+ return _ref25.apply(this, arguments);
2661
2667
  };
2662
2668
  }();
2663
2669
 
@@ -2801,7 +2807,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
2801
2807
  type = _this2$props3.type;
2802
2808
 
2803
2809
  var isManualIntoAmount = void 0;
2810
+ var _this2$context$viewMo2 = _this2.context.viewModel.data,
2811
+ BuyerPayFreight = _this2$context$viewMo2.BuyerPayFreight,
2812
+ DistributionMode = _this2$context$viewMo2.DistributionMode;
2804
2813
  // 付款弹窗
2814
+
2805
2815
  return new _promise2.default(function (resolve, reject) {
2806
2816
  var _enumController$getEn26 = _mutantsUtil.enumController.getEnumOj(),
2807
2817
  PayStyle = _enumController$getEn26.PayStyle,
@@ -2890,7 +2900,14 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
2890
2900
  _react2.default.createElement(
2891
2901
  'span',
2892
2902
  { className: 'yfje' },
2893
- paymode.value
2903
+ paymode.value,
2904
+ (DistributionMode.Id == 'ELECTRONIC' || DistributionMode.Id == 'CITY_DISTRIBUTE') && BuyerPayFreight && BuyerPayFreight > 0 ? _react2.default.createElement(
2905
+ 'span',
2906
+ { className: 'freight' },
2907
+ '(\u5305\u542B',
2908
+ BuyerPayFreight,
2909
+ '\u5143\u8FD0\u8D39)'
2910
+ ) : null
2894
2911
  )
2895
2912
  ),
2896
2913
  paymode.paymentType == PayStyle.xianjin && _react2.default.createElement(
@@ -3245,14 +3262,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
3245
3262
 
3246
3263
  _this2.hasElectron = hasElectron;
3247
3264
 
3248
- var _ref29 = _mutantsMicrofx.localStore.get('user') || {},
3249
- _ref29$loginInfo = _ref29.loginInfo;
3250
-
3251
- _ref29$loginInfo = _ref29$loginInfo === undefined ? {} : _ref29$loginInfo;
3252
- var ICCardServer = _ref29$loginInfo.ICCardServer,
3253
- ICCardPassword = _ref29$loginInfo.ICCardPassword,
3254
- Book = _ref29$loginInfo.Book,
3255
- PercentageWhenBook = _ref29$loginInfo.PercentageWhenBook;
3265
+ var _ref29 = _mutantsMicrofx.stores.user.options.get('loginInfo') || {},
3266
+ ICCardServer = _ref29.ICCardServer,
3267
+ ICCardPassword = _ref29.ICCardPassword,
3268
+ Book = _ref29.Book,
3269
+ PercentageWhenBook = _ref29.PercentageWhenBook;
3256
3270
 
3257
3271
  _this2.iCCardServer = parseInt(ICCardServer); // 启用IC卡:0为禁用 1为启用
3258
3272
  _this2.iCCardPassword = ICCardPassword; //IC卡密码
@@ -3522,7 +3536,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
3522
3536
 
3523
3537
  var _ref32 = this.context && this.context.viewModel && this.context.viewModel.data,
3524
3538
  IdbusiType = _ref32.IdbusiType,
3525
- DistributionMode = _ref32.DistributionMode;
3539
+ DistributionMode = _ref32.DistributionMode,
3540
+ BuyerPayFreight = _ref32.BuyerPayFreight;
3526
3541
 
3527
3542
  if (IdbusiType == 38 && this.isBook && this.percentageWhenBook < 100 && (!DistributionMode.Id || DistributionMode.Id == 'ON_SITE_PICKUP')) {
3528
3543
  totalTaxAmount = totalTaxAmount * this.percentageWhenBook / 100;
@@ -3964,6 +3979,20 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
3964
3979
  { className: 'received' },
3965
3980
  (0, _utils.getFixedNumber)(Math.abs(paymode.receivable))
3966
3981
  )
3982
+ ),
3983
+ _react2.default.createElement(
3984
+ 'div',
3985
+ { className: 'receivable', style: { display: (DistributionMode.Id == 'ELECTRONIC' || DistributionMode.Id == 'CITY_DISTRIBUTE') && BuyerPayFreight && BuyerPayFreight > 0 ? 'block' : 'none' } },
3986
+ _react2.default.createElement(
3987
+ 'span',
3988
+ null,
3989
+ '\u8FD0\u8D39'
3990
+ ),
3991
+ _react2.default.createElement(
3992
+ 'span',
3993
+ { className: 'received' },
3994
+ (0, _utils.getFixedNumber)(Math.abs(BuyerPayFreight))
3995
+ )
3967
3996
  )
3968
3997
  ),
3969
3998
  !isReturn && _react2.default.createElement(