tplus-components-touch 3.25.7 → 3.27.1

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 (47) hide show
  1. package/dist/components/billSearch/api.js +74 -13
  2. package/dist/components/billSearch/api.js.map +1 -1
  3. package/dist/components/billSearch/index.js +14 -14
  4. package/dist/components/billSearch/index.js.map +1 -1
  5. package/dist/components/cloudPrint/index.js +4 -57
  6. package/dist/components/cloudPrint/index.js.map +1 -1
  7. package/dist/components/deliverySearch/index.js +8 -12
  8. package/dist/components/deliverySearch/index.js.map +1 -1
  9. package/dist/components/hotKey/localConfig.js +52 -0
  10. package/dist/components/hotKey/localConfig.js.map +1 -1
  11. package/dist/components/inventorySearch/store.js +12 -31
  12. package/dist/components/inventorySearch/store.js.map +1 -1
  13. package/dist/components/inventorySearch/tab.js +2 -9
  14. package/dist/components/inventorySearch/tab.js.map +1 -1
  15. package/dist/components/loading/loadingContent.js +4 -12
  16. package/dist/components/loading/loadingContent.js.map +1 -1
  17. package/dist/components/loading/style.less +5 -14
  18. package/dist/components/message/index.js +5 -8
  19. package/dist/components/message/index.js.map +1 -1
  20. package/dist/components/presale/pickup.js +419 -0
  21. package/dist/components/presale/pickup.js.map +1 -0
  22. package/dist/components/presale/style.less +48 -0
  23. package/dist/components/settlement/settlement.js +207 -65
  24. package/dist/components/settlement/settlement.js.map +1 -1
  25. package/dist/components/settlement/settlementStore.js +157 -107
  26. package/dist/components/settlement/settlementStore.js.map +1 -1
  27. package/dist/components/socket/index.js +5 -6
  28. package/dist/components/socket/index.js.map +1 -1
  29. package/dist/components/ticon/iconfont/demo.css +539 -539
  30. package/dist/components/ticon/iconfont/demo_index.html +5225 -5202
  31. package/dist/components/ticon/iconfont/iconfont.css +891 -887
  32. package/dist/components/ticon/iconfont/iconfont.js +1 -1
  33. package/dist/components/ticon/iconfont/iconfont.js.map +1 -1
  34. package/dist/components/ticon/iconfont/iconfont.json +1542 -1535
  35. package/dist/components/ticon/iconfont/iconfont.ttf +0 -0
  36. package/dist/components/ticon/iconfont/iconfont.woff +0 -0
  37. package/dist/components/ticon/iconfont/iconfont.woff2 +0 -0
  38. package/dist/components/touchTable/index.js +4 -0
  39. package/dist/components/touchTable/index.js.map +1 -1
  40. package/dist/index.js +8 -8
  41. package/dist/index.js.map +1 -1
  42. package/dist/util/tools.js +7 -5
  43. package/dist/util/tools.js.map +1 -1
  44. package/package.json +35 -35
  45. package/dist/components/input/scanInput.js +0 -98
  46. package/dist/components/input/scanInput.js.map +0 -1
  47. package/dist/components/input/scanInput.less +0 -28
@@ -591,10 +591,10 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
591
591
  // czkVisible: true
592
592
  // })
593
593
  // }
594
- // }
594
+ // }
595
595
  // // else {
596
596
  // // Message.warn('请先录入会员');
597
- // // }
597
+ // // }
598
598
  // // this.setState({
599
599
  // // czkVisible: true,
600
600
  // // });
@@ -2493,57 +2493,178 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
2493
2493
  };
2494
2494
  }();
2495
2495
 
2496
- _this2.btnDebounced = function (type, bquick) {
2497
- _this2.setState({
2498
- bquick: bquick
2499
- });
2496
+ _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;
2500
2499
 
2501
- var _enumController$getEn22 = _mutantsUtil.enumController.getEnumOj(),
2502
- PayStyle = _enumController$getEn22.PayStyle;
2500
+ return _regenerator2.default.wrap(function _callee14$(_context14) {
2501
+ while (1) {
2502
+ switch (_context14.prev = _context14.next) {
2503
+ case 0:
2504
+ _ref25 = _this2.context.viewModel.data || {}, IdbusiType = _ref25.IdbusiType, CustomerPhone = _ref25.CustomerPhone, DistributionMode = _ref25.DistributionMode;
2505
+ //预订时,若没录入买家手机号,或配送方式为快递时,弹框买家信息确认框
2503
2506
 
2504
- var _this2$store7 = _this2.store,
2505
- paymode = _this2$store7.paymode,
2506
- brefund = _this2$store7.brefund,
2507
- boriginReturn = _this2$store7.boriginReturn,
2508
- newStyle = _this2$store7.newStyle;
2507
+ if (!(IdbusiType == 38)) {
2508
+ _context14.next = 46;
2509
+ break;
2510
+ }
2509
2511
 
2512
+ if (!(!CustomerPhone || DistributionMode.Id == 'ELECTRONIC' || DistributionMode.Id == 'CITY_DISTRIBUTE')) {
2513
+ _context14.next = 5;
2514
+ break;
2515
+ }
2510
2516
 
2511
- if (bquick && !_mutantsMicrofx.stores.offlineSys.shouldSettlement(type)) return false;
2517
+ _context14.next = 5;
2518
+ return _this2.props.openBuyerModal();
2512
2519
 
2513
- var status = false;
2514
- paymode.thePaymodes.forEach(function (v) {
2515
- if (v.paymentType === PayStyle.xianjin && v.value !== '0.00') {
2516
- status = true;
2517
- }
2518
- });
2519
- _this2.setState({
2520
- isXianjin: status ? true : false
2521
- });
2520
+ case 5:
2521
+ if (!(DistributionMode.Id == 'ELECTRONIC' || DistributionMode.Id == 'CITY_DISTRIBUTE')) {
2522
+ _context14.next = 46;
2523
+ break;
2524
+ }
2522
2525
 
2523
- if (_this2.btndebounced) {
2524
- return;
2525
- }
2526
- _this2.btndebounced = (0, _debounce3.default)(function () {
2527
- if (bquick) {
2528
- _this2.quickSettle(type);
2529
- } else {
2530
- _this2.showModal();
2531
- }
2532
- }, 1000, {
2533
- 'leading': true,
2534
- 'trailing': false
2535
- });
2536
- _this2.btndebounced();
2537
- setTimeout(function () {
2538
- _this2.btndebounced.cancel();
2539
- _this2.btndebounced = null;
2540
- }, 2000);
2541
- };
2526
+ _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
+ IPMSG = {};
2537
+
2538
+ if (!!window.localStorage.IPMSG) {
2539
+ IPMSG = JSON.parse(window.localStorage.IPMSG);
2540
+ }
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
+ }
2555
+
2556
+ names = [];
2557
+ temphtml = [];
2558
+
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
+ });
2565
+
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
+ return _context14.abrupt('return');
2571
+
2572
+ case 29:
2573
+ _context14.next = 31;
2574
+ return _this2.props.openWareHouseModal(freightProductDTOList);
2575
+
2576
+ case 31:
2577
+
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 = '海淀区';
2585
+
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;
2592
+
2593
+ updataFreight(freight);
2594
+ _context14.next = 45;
2595
+ return _this2.props.updataFreight(freight);
2596
+
2597
+ case 45:
2598
+ console.log('zlf获取运费', freight);
2599
+
2600
+ case 46:
2601
+
2602
+ _this2.setState({
2603
+ bquick: bquick
2604
+ });
2605
+ _enumController$getEn22 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn22.PayStyle;
2606
+ _this2$store8 = _this2.store, paymode = _this2$store8.paymode, brefund = _this2$store8.brefund, boriginReturn = _this2$store8.boriginReturn, newStyle = _this2$store8.newStyle;
2607
+
2608
+ if (!(bquick && !_mutantsMicrofx.stores.offlineSys.shouldSettlement(type))) {
2609
+ _context14.next = 51;
2610
+ break;
2611
+ }
2612
+
2613
+ return _context14.abrupt('return', false);
2614
+
2615
+ case 51:
2616
+ status = false;
2617
+
2618
+ paymode.thePaymodes.forEach(function (v) {
2619
+ if (v.paymentType === PayStyle.xianjin && v.value !== '0.00') {
2620
+ status = true;
2621
+ }
2622
+ });
2623
+ _this2.setState({
2624
+ isXianjin: status ? true : false
2625
+ });
2626
+
2627
+ if (!_this2.btndebounced) {
2628
+ _context14.next = 56;
2629
+ break;
2630
+ }
2631
+
2632
+ return _context14.abrupt('return');
2633
+
2634
+ case 56:
2635
+ _this2.btndebounced = (0, _debounce3.default)(function () {
2636
+ if (bquick) {
2637
+ _this2.quickSettle(type);
2638
+ } else {
2639
+ _this2.showModal();
2640
+ }
2641
+ }, 1000, {
2642
+ 'leading': true,
2643
+ 'trailing': false
2644
+ });
2645
+ _this2.btndebounced();
2646
+ setTimeout(function () {
2647
+ _this2.btndebounced.cancel();
2648
+ _this2.btndebounced = null;
2649
+ }, 2000);
2650
+
2651
+ case 59:
2652
+ case 'end':
2653
+ return _context14.stop();
2654
+ }
2655
+ }
2656
+ }, _callee14, _this3);
2657
+ }));
2658
+
2659
+ return function (_x8, _x9) {
2660
+ return _ref24.apply(this, arguments);
2661
+ };
2662
+ }();
2542
2663
 
2543
2664
  _this2.onCzkChange = function (v) {
2544
2665
  // console.log("czk change:"+new Date().toLocaleTimeString())
2545
- var _ref24 = _mutantsUtil.platform || {},
2546
- isNewRetailBCPos = _ref24.isNewRetailBCPos;
2666
+ var _ref28 = _mutantsUtil.platform || {},
2667
+ isNewRetailBCPos = _ref28.isNewRetailBCPos;
2547
2668
 
2548
2669
  if (!isNewRetailBCPos) {
2549
2670
  _this2.store.paymode.currentMode.member.setCardNo(v);
@@ -2949,9 +3070,9 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
2949
3070
  };
2950
3071
 
2951
3072
  _this2.checkCurrentModeHaveMutex = function (type) {
2952
- var _this2$store8 = _this2.store,
2953
- paymode = _this2$store8.paymode,
2954
- newStyle = _this2$store8.newStyle;
3073
+ var _this2$store9 = _this2.store,
3074
+ paymode = _this2$store9.paymode,
3075
+ newStyle = _this2$store9.newStyle;
2955
3076
 
2956
3077
  var _enumController$getEn27 = _mutantsUtil.enumController.getEnumOj(),
2957
3078
  PayStyle = _enumController$getEn27.PayStyle;
@@ -3124,17 +3245,24 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
3124
3245
 
3125
3246
  _this2.hasElectron = hasElectron;
3126
3247
 
3127
- var _ref25 = _mutantsMicrofx.stores.user.options.get('loginInfo') || {},
3128
- ICCardServer = _ref25.ICCardServer,
3129
- ICCardPassword = _ref25.ICCardPassword;
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;
3130
3256
 
3131
3257
  _this2.iCCardServer = parseInt(ICCardServer); // 启用IC卡:0为禁用 1为启用
3132
3258
  _this2.iCCardPassword = ICCardPassword; //IC卡密码
3259
+ _this2.isBook = Book;
3260
+ _this2.percentageWhenBook = PercentageWhenBook;
3133
3261
  //移动端环境下,没有读取IC卡的方式。
3134
3262
 
3135
- var _ref26 = _mutantsUtil.platform || {},
3136
- isHorizontalPad = _ref26.isHorizontalPad,
3137
- isHorizontalSunMi = _ref26.isHorizontalSunMi;
3263
+ var _ref30 = _mutantsUtil.platform || {},
3264
+ isHorizontalPad = _ref30.isHorizontalPad,
3265
+ isHorizontalSunMi = _ref30.isHorizontalSunMi;
3138
3266
 
3139
3267
  _this2.isHorizontalPad = !!isHorizontalPad;
3140
3268
  _this2.isHorizontalSunMi = !!isHorizontalSunMi;
@@ -3369,8 +3497,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
3369
3497
  discountPrototypeTotalAmount = _state2.discountPrototypeTotalAmount,
3370
3498
  storageValue = _state2.storageValue;
3371
3499
 
3372
- var _ref27 = _mutantsUtil.platform || {},
3373
- isNewRetailBCPos = _ref27.isNewRetailBCPos;
3500
+ var _ref31 = _mutantsUtil.platform || {},
3501
+ isNewRetailBCPos = _ref31.isNewRetailBCPos;
3374
3502
 
3375
3503
  var _store2 = this.store,
3376
3504
  paymode = _store2.paymode,
@@ -3389,6 +3517,20 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
3389
3517
 
3390
3518
  var boriginReturn = this.context && this.context.viewModel && this.context.viewModel.data && JSON.getCellValue(this.context.viewModel.data, "IsOriginalReturn");
3391
3519
  var totalTaxAmount = this.context && this.context.viewModel && this.context.viewModel.data && this.context.viewModel.data.TotalTaxAmount;
3520
+
3521
+ //收订金
3522
+
3523
+ var _ref32 = this.context && this.context.viewModel && this.context.viewModel.data,
3524
+ IdbusiType = _ref32.IdbusiType,
3525
+ DistributionMode = _ref32.DistributionMode;
3526
+
3527
+ if (IdbusiType == 38 && this.isBook && this.percentageWhenBook < 100 && (!DistributionMode.Id || DistributionMode.Id == 'ON_SITE_PICKUP')) {
3528
+ totalTaxAmount = totalTaxAmount * this.percentageWhenBook / 100;
3529
+ }
3530
+ if (IdbusiType == 39) {
3531
+ totalTaxAmount = _mutantsMicrofx.stores.drawerStore.thisWaitPaidAmount;
3532
+ }
3533
+
3392
3534
  // 单据模式
3393
3535
  var thePaymodes = newStyle ? (0, _filter3.default)(paymode.thePaymodes, function (m) {
3394
3536
  return !(_this8.checkModeDisabled(m.paymentType, brefund, boriginReturn) && parseFloat(m.value) == 0);
@@ -3433,11 +3575,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
3433
3575
  quantity4 = 0;
3434
3576
  var sumQuantity = 0; //数量总和的值,包括称重的。
3435
3577
 
3436
- var _ref28 = quantityDetail || {},
3437
- _ref28$buyQuantity = _ref28.buyQuantity,
3438
- buyQuantity = _ref28$buyQuantity === undefined ? 0 : _ref28$buyQuantity,
3439
- _ref28$returnQuantity = _ref28.returnQuantity,
3440
- returnQuantity = _ref28$returnQuantity === undefined ? 0 : _ref28$returnQuantity;
3578
+ var _ref33 = quantityDetail || {},
3579
+ _ref33$buyQuantity = _ref33.buyQuantity,
3580
+ buyQuantity = _ref33$buyQuantity === undefined ? 0 : _ref33$buyQuantity,
3581
+ _ref33$returnQuantity = _ref33.returnQuantity,
3582
+ returnQuantity = _ref33$returnQuantity === undefined ? 0 : _ref33$returnQuantity;
3441
3583
 
3442
3584
  var quantityPrecision = (0, _tplusPoslogin.PosInitData)("QuantityPrecision");
3443
3585
  quantityPrecision = quantityPrecision ? parseInt(quantityPrecision) : '';
@@ -4038,7 +4180,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
4038
4180
  // return;
4039
4181
  // }
4040
4182
  // }
4041
- // mode.paymentType == PayStyle.hyczk && czkinput && czkinput.value !== '0.00' ? this.editCzkModal() :
4183
+ // mode.paymentType == PayStyle.hyczk && czkinput && czkinput.value !== '0.00' ? this.editCzkModal() :
4042
4184
  _this8.onHotKeyClick1(mode, index, boriginReturn);
4043
4185
  },
4044
4186
  value: mode.paymentType == PayStyle.hyczk ? (0, _utils.getFixedNumber)((0, _reduce3.default)((0, _filter3.default)(thePaymodes, function (tm) {
@@ -4816,8 +4958,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
4816
4958
  _this8.setCurrentModeValue(event.target.value, Math.min(currentMode.maxamount, currentMode.member.balance));
4817
4959
  },
4818
4960
  defaultValue: currentMode && (0, _utils.getFixedNumber)(brefund ? currentMode.value : Math.min(currentMode.value, currentMode.maxamount, currentMode.member.balance)),
4819
- ref: function ref(_ref29) {
4820
- return _this8["inputCzkAmount"] = _ref29;
4961
+ ref: function ref(_ref34) {
4962
+ return _this8["inputCzkAmount"] = _ref34;
4821
4963
  },
4822
4964
  onFocus: function onFocus(e) {
4823
4965
  _this8.inputkey = "inputCzkAmount";
@@ -5434,8 +5576,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
5434
5576
  _this8.setCurrentModeValue(e.target.value, Math.min(currentMode.maxamount, currentMode.member.exchangable));
5435
5577
  },
5436
5578
  defaultValue: currentMode && (0, _utils.getFixedNumber)(Math.min(currentMode.value, currentMode.maxamount, currentMode.member.exchangable)),
5437
- ref: function ref(_ref30) {
5438
- return _this8["inputJfdxAmount"] = _ref30;
5579
+ ref: function ref(_ref35) {
5580
+ return _this8["inputJfdxAmount"] = _ref35;
5439
5581
  },
5440
5582
  onFocus: function onFocus(e) {
5441
5583
  _this8.inputkey = "inputJfdxAmount";