tplus-components-touch 3.41.1 → 3.41.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 +15 -38
  2. package/dist/components/billSearch/index.js.map +1 -1
  3. package/dist/components/cloudPrint/BTPrintFormatUtil.js +2 -2
  4. package/dist/components/cloudPrint/BTPrintFormatUtil.js.map +1 -1
  5. package/dist/components/cloudPrint/index.js +891 -608
  6. package/dist/components/cloudPrint/index.js.map +1 -1
  7. package/dist/components/cloudPrint/printDispatch.js +151 -47
  8. package/dist/components/cloudPrint/printDispatch.js.map +1 -1
  9. package/dist/components/cloudPrint/printTemplate/dialy_one.json +239 -0
  10. package/dist/components/cloudPrint/printTemplate/duty_one.json +239 -0
  11. package/dist/components/cloudPrint/printTemplate/retail_one.json +208 -0
  12. package/dist/components/cloudPrint/printTemplate/retail_two.json +220 -0
  13. package/dist/components/cloudPrint/printTemplate/storage_one.json +129 -0
  14. package/dist/components/cloudPrint/printTemplate/template.js +52 -0
  15. package/dist/components/cloudPrint/printTemplate/template.js.map +1 -0
  16. package/dist/components/commonForm/formControl/index.js +1 -1
  17. package/dist/components/commonForm/formControl/index.js.map +1 -1
  18. package/dist/components/deliverySearch/index.js +5 -1
  19. package/dist/components/deliverySearch/index.js.map +1 -1
  20. package/dist/components/hardwareAPI/index.js +46 -12
  21. package/dist/components/hardwareAPI/index.js.map +1 -1
  22. package/dist/components/inventorySearch/tab.js +6 -1
  23. package/dist/components/inventorySearch/tab.js.map +1 -1
  24. package/dist/components/loading/loadingContent.js +5 -2
  25. package/dist/components/loading/loadingContent.js.map +1 -1
  26. package/dist/components/message/index.js +4 -5
  27. package/dist/components/message/index.js.map +1 -1
  28. package/dist/components/notification/index.js +11 -12
  29. package/dist/components/notification/index.js.map +1 -1
  30. package/dist/components/progressState/EmptyAndErrorView.js +5 -7
  31. package/dist/components/progressState/EmptyAndErrorView.js.map +1 -1
  32. package/dist/components/settlement/settlement.js +139 -116
  33. package/dist/components/settlement/settlement.js.map +1 -1
  34. package/dist/components/settlement/settlementStore.js +16 -26
  35. package/dist/components/settlement/settlementStore.js.map +1 -1
  36. package/dist/components/touchTable/index.js +5 -3
  37. package/dist/components/touchTable/index.js.map +1 -1
  38. package/package.json +35 -35
@@ -463,17 +463,18 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
463
463
  } else {
464
464
  item.badge = { text: '', position: '', className: '' };
465
465
  }
466
- if (!item.IsPresent) {
467
- discountRetailTotalAount += item.RetailPrice * item.Quantity;
468
- }
469
466
  if (item.PromotionDetails && item.PromotionDetails.length > 0) {
470
467
  count++;
471
468
  }
472
469
  item.InventoryName = item.Inventory.Name;
473
470
  item.Discount = (0, _utils.getRoundValue)(item.RetailPrice - item.TaxPrice, pricePrecision);
474
- discountPrototypeTotalAmount += item.DetailDiscountAmount;
471
+ if (!item.IsPresent) {
472
+ discountPrototypeTotalAmount += item.DetailDiscountAmount;
473
+ item.TotalDiscount = item.DetailDiscountAmount;
474
+ } else {
475
+ item.TotalDiscount = 0;
476
+ }
475
477
  //item.TotalDiscount = getFixedNumber(item.Discount * item.Quantity);
476
- item.TotalDiscount = item.DetailDiscountAmount;
477
478
  item.nAmount = (0, _utils.getFixedNumber)(item.TaxAmount);
478
479
  item.UnitName = item.Unit.Name;
479
480
  item.nQuantity = (0, _utils.getRoundValue)(item.Quantity, quantityPrecision);
@@ -484,7 +485,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
484
485
  dataSource: dataSource,
485
486
  discountTotalAmount: (0, _utils.getFixedNumber)(_this2.props.amount),
486
487
  discountPrototypeTotalAmount: (0, _utils.getFixedNumber)(discountPrototypeTotalAmount),
487
- discountRetailTotalAount: (0, _utils.getFixedNumber)(_this2.props.amount + discountPrototypeTotalAmount)
488
+ discountRetailTotalAount: (0, _utils.getFixedNumber)(_this2.props.amount + parseFloat(discountPrototypeTotalAmount))
488
489
  });
489
490
  return count;
490
491
  };
@@ -522,6 +523,12 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
522
523
 
523
524
  _this2.settleZero = function () {
524
525
  var that = _this2;
526
+ //预售取货无需支付时省略弹框确认这一步
527
+ var IdbusiType = _this2.context && _this2.context.viewModel && _this2.context.viewModel.data && _this2.context.viewModel.data.IdbusiType;
528
+ if (IdbusiType == 39) {
529
+ that.handleSettle("zero");
530
+ return;
531
+ }
525
532
  _modalWraper2.default.confirm({
526
533
  className: 'tplus-confirm-modal',
527
534
  title: '结算',
@@ -1001,11 +1008,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
1001
1008
  }, 200);
1002
1009
 
1003
1010
  // TODO: 测试优惠券支付
1004
-
1005
- var _ref10 = _mutantsUtil.platform || {},
1006
- isNewRetailBCPos = _ref10.isNewRetailBCPos;
1007
-
1008
- if (isNewRetailBCPos && !_this2.store.paymode.currentMode.boriginReturn) {
1011
+ if (!_this2.store.paymode.currentMode.boriginReturn) {
1009
1012
  _this2.store.getCouponList();
1010
1013
  }
1011
1014
  };
@@ -1087,8 +1090,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
1087
1090
  };
1088
1091
 
1089
1092
  _this2.checkOfflineEnable = function (paymode, key) {
1090
- var _ref11 = paymode || {},
1091
- paymodes = _ref11.paymodes;
1093
+ var _ref10 = paymode || {},
1094
+ paymodes = _ref10.paymodes;
1092
1095
 
1093
1096
  var isOffline = _mutantsMicrofx.stores.offlineSys.isOffline;
1094
1097
 
@@ -1210,6 +1213,14 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
1210
1213
  };
1211
1214
 
1212
1215
  _this2.onTabsClick = function (key, bookType) {
1216
+ if (!_this2.isDjqValidated(key)) {
1217
+ return;
1218
+ };
1219
+ var _this2$store3 = _this2.store,
1220
+ paymode = _this2$store3.paymode,
1221
+ brefund = _this2$store3.brefund,
1222
+ boriginReturn = _this2$store3.boriginReturn;
1223
+
1213
1224
  var _enumController$getEn9 = _mutantsUtil.enumController.getEnumOj(),
1214
1225
  PayStyle = _enumController$getEn9.PayStyle,
1215
1226
  Differentiate = _enumController$getEn9.Differentiate;
@@ -1226,10 +1237,6 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
1226
1237
  var _enumController$getEn10 = _mutantsUtil.enumController.getEnumOj(),
1227
1238
  MultiPay = _enumController$getEn10.MultiPay;
1228
1239
 
1229
- var _this2$store3 = _this2.store,
1230
- paymode = _this2$store3.paymode,
1231
- brefund = _this2$store3.brefund,
1232
- boriginReturn = _this2$store3.boriginReturn;
1233
1240
  var noAlreadyWarn = _this2.state.noAlreadyWarn;
1234
1241
 
1235
1242
  if (!_mutantsMicrofx.stores.offlineSys.shouldSettlement(key)) return false;
@@ -1435,15 +1442,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
1435
1442
  _message2.default.info('\u539F\u5355\u9000\u8D27\u65F6' + Differentiate.COUPON + '\u4E0D\u53EF\u4EE5\u53D6\u6D88\u3002');
1436
1443
  return;
1437
1444
  }
1438
-
1439
- var _ref12 = _mutantsUtil.platform || {},
1440
- isNewRetailBCPos = _ref12.isNewRetailBCPos;
1441
-
1442
- if (isNewRetailBCPos) {
1443
- _this2.store.paymode.calcDjqCheckValue(q, _this2.store.dto);
1444
- } else {
1445
- _this2.store.paymode.calcDjqValue(q);
1446
- }
1445
+ _this2.store.paymode.calcDjqCheckValue(q, _this2.store.dto);
1447
1446
  // this.props.onGetCouponList && this.props.onGetCouponList(this.store.dto, _filter(this.store.paymode.currentMode.djqs,(djq)=>{return djq.couponCategoryEnum !== 'RIGHT'}));
1448
1447
  // this.props.onGetCouponList && this.props.onGetCouponList(this.store.dto, _filter(this.store.paymode.currentMode.djqs,(djq)=>{return djq.checked}), this.store.paymode.currentMode.djqs);
1449
1448
  };
@@ -1516,6 +1515,9 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
1516
1515
  };
1517
1516
 
1518
1517
  _this2.onHotKeyClick1 = function (mode, index, boriginReturn, bookType) {
1518
+ if (!_this2.isDjqValidated(mode.paymentType)) {
1519
+ return;
1520
+ };
1519
1521
  // if (bookType == 'bookPay' && this.store.paymode.isNotFullOnlyBook && mode.virtualPay){
1520
1522
  // return Message.error("付订金时不可使用零售抵现类结算方式!");
1521
1523
  // }
@@ -1716,6 +1718,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
1716
1718
 
1717
1719
  _modalWraper2.default.confirm({
1718
1720
  className: 'tplus-confirm-modal',
1721
+ zIndex: 1007,
1719
1722
  content: _react2.default.createElement(
1720
1723
  'div',
1721
1724
  { className: 'unReturn' },
@@ -1910,6 +1913,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
1910
1913
  message = "退货成功";
1911
1914
  } else if (MemberPoints && Number(amount) == Number(0)) {
1912
1915
  message = "兑换成功";
1916
+ } else if (IdbusiType == 39 && received == 0) {
1917
+ message = "取货成功";
1913
1918
  }
1914
1919
  window.__successModal = (0, _utils.showSuccessModal)(amount, received, charge, _this.props.onModalClose, isXianjin, message, resp1 && resp1.data, _mutantsMicrofx.stores, IdbusiType, isFull, function () {
1915
1920
  _this.handleGuestShow(5);
@@ -1930,13 +1935,13 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
1930
1935
  if (_this2.hasElectron === false) return;
1931
1936
  var dt = _mutantsMicrofx.localStore.get('portsetting_hardSet') || [];
1932
1937
 
1933
- var _ref16 = dt || {},
1934
- guestshow_enable = _ref16.guestshow_enable,
1935
- guestshow_clear = _ref16.guestshow_clear,
1936
- guestshow_welcome = _ref16.guestshow_welcome,
1937
- guestshow_collect = _ref16.guestshow_collect,
1938
- guestshow_refund = _ref16.guestshow_refund,
1939
- guestshow_change = _ref16.guestshow_change;
1938
+ var _ref14 = dt || {},
1939
+ guestshow_enable = _ref14.guestshow_enable,
1940
+ guestshow_clear = _ref14.guestshow_clear,
1941
+ guestshow_welcome = _ref14.guestshow_welcome,
1942
+ guestshow_collect = _ref14.guestshow_collect,
1943
+ guestshow_refund = _ref14.guestshow_refund,
1944
+ guestshow_change = _ref14.guestshow_change;
1940
1945
 
1941
1946
  var hasSuccess = _mutantsMicrofx.localStore && _mutantsMicrofx.localStore.get('portsetting_hardSet_isSuccess');
1942
1947
  if (!guestshow_enable || !!guestshow_enable && hasSuccess == '0') return;
@@ -1971,9 +1976,9 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
1971
1976
  };
1972
1977
 
1973
1978
  _this2.handleSettle = function () {
1974
- var _ref17 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee11(args) {
1979
+ var _ref15 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee11(args) {
1975
1980
  var handleUserInputs = function () {
1976
- var _ref19 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee10(promises) {
1981
+ var _ref17 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee10(promises) {
1977
1982
  var results, _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, p, _result;
1978
1983
 
1979
1984
  return _regenerator2.default.wrap(function _callee10$(_context10) {
@@ -2064,7 +2069,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
2064
2069
  }));
2065
2070
 
2066
2071
  return function handleUserInputs(_x6) {
2067
- return _ref19.apply(this, arguments);
2072
+ return _ref17.apply(this, arguments);
2068
2073
  };
2069
2074
  }();
2070
2075
 
@@ -2157,7 +2162,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
2157
2162
  });
2158
2163
 
2159
2164
  commit = function () {
2160
- var _ref18 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee9(values) {
2165
+ var _ref16 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee9(values) {
2161
2166
  var result;
2162
2167
  return _regenerator2.default.wrap(function _callee9$(_context9) {
2163
2168
  while (1) {
@@ -2231,7 +2236,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
2231
2236
  }));
2232
2237
 
2233
2238
  return function commit(_x5) {
2234
- return _ref18.apply(this, arguments);
2239
+ return _ref16.apply(this, arguments);
2235
2240
  };
2236
2241
  }();
2237
2242
 
@@ -2246,13 +2251,13 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
2246
2251
  }));
2247
2252
 
2248
2253
  return function (_x4) {
2249
- return _ref17.apply(this, arguments);
2254
+ return _ref15.apply(this, arguments);
2250
2255
  };
2251
2256
  }();
2252
2257
 
2253
2258
  _this2.handleCzk = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee14() {
2254
2259
  var handleUserInputs = function () {
2255
- var _ref23 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee13(promises) {
2260
+ var _ref20 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee13(promises) {
2256
2261
  var results, _iteratorNormalCompletion2, _didIteratorError2, _iteratorError2, _iterator2, _step2, p, _result2;
2257
2262
 
2258
2263
  return _regenerator2.default.wrap(function _callee13$(_context13) {
@@ -2349,11 +2354,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
2349
2354
  }));
2350
2355
 
2351
2356
  return function handleUserInputs(_x8) {
2352
- return _ref23.apply(this, arguments);
2357
+ return _ref20.apply(this, arguments);
2353
2358
  };
2354
2359
  }();
2355
2360
 
2356
- var that, curmode, promises, _ref21, isNewRetailBCPos, _enumController$getEn22, PayStyle, commit;
2361
+ var that, curmode, promises, _enumController$getEn22, PayStyle, commit;
2357
2362
 
2358
2363
  return _regenerator2.default.wrap(function _callee14$(_context14) {
2359
2364
  while (1) {
@@ -2362,28 +2367,21 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
2362
2367
  that = _this2;
2363
2368
  curmode = _this2.store.paymode.currentMode;
2364
2369
  promises = [];
2365
- _ref21 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref21.isNewRetailBCPos;
2366
2370
 
2367
- if (isNewRetailBCPos) {
2368
- if (curmode.value > 0) {
2369
- _enumController$getEn22 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn22.PayStyle;
2371
+ if (curmode.value > 0) {
2372
+ _enumController$getEn22 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn22.PayStyle;
2370
2373
 
2371
- if (curmode.paymentType === PayStyle.hyczk) {
2372
- if (curmode.cardTypeEnum === 'BALANCE_CARD') {
2373
- !curmode.freePaymentPasswordStore && promises.push(that.inputPwd(curmode));
2374
- } else {
2375
- curmode.isNeedPassword && promises.push(that.inputPwd(curmode));
2376
- }
2374
+ if (curmode.paymentType === PayStyle.hyczk) {
2375
+ if (curmode.cardTypeEnum === 'BALANCE_CARD') {
2376
+ !curmode.freePaymentPasswordStore && promises.push(that.inputPwd(curmode));
2377
+ } else {
2378
+ curmode.isNeedPassword && promises.push(that.inputPwd(curmode));
2377
2379
  }
2378
2380
  }
2379
- } else {
2380
- if (curmode.member.needPwd && curmode.value > 0) {
2381
- promises.push(that.inputPwd(curmode));
2382
- }
2383
2381
  }
2384
2382
 
2385
2383
  commit = function () {
2386
- var _ref22 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee12(values) {
2384
+ var _ref19 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee12(values) {
2387
2385
  var result;
2388
2386
  return _regenerator2.default.wrap(function _callee12$(_context12) {
2389
2387
  while (1) {
@@ -2433,13 +2431,13 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
2433
2431
  }));
2434
2432
 
2435
2433
  return function commit(_x7) {
2436
- return _ref22.apply(this, arguments);
2434
+ return _ref19.apply(this, arguments);
2437
2435
  };
2438
2436
  }();
2439
2437
 
2440
2438
  handleUserInputs(promises);
2441
2439
 
2442
- case 7:
2440
+ case 6:
2443
2441
  case 'end':
2444
2442
  return _context14.stop();
2445
2443
  }
@@ -2484,7 +2482,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
2484
2482
  };
2485
2483
 
2486
2484
  _this2.inputPwd = function () {
2487
- var _ref24 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee15(paymode) {
2485
+ var _ref21 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee15(paymode) {
2488
2486
  var that, confirmPwd;
2489
2487
  return _regenerator2.default.wrap(function _callee15$(_context15) {
2490
2488
  while (1) {
@@ -2500,8 +2498,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
2500
2498
  // if (v !== '') {
2501
2499
  modal.destroy();
2502
2500
 
2503
- var _ref25 = that.state || {},
2504
- confirmPwd = _ref25.confirmPwd;
2501
+ var _ref22 = that.state || {},
2502
+ confirmPwd = _ref22.confirmPwd;
2505
2503
 
2506
2504
  setTimeout(function () {
2507
2505
  paymode.authCode = v;
@@ -2592,8 +2590,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
2592
2590
  type: 'primary', size: 'large', onClick: function onClick() {
2593
2591
  var v = (0, _trim3.default)(that['inputAmount']['input']['value']);
2594
2592
 
2595
- var _ref26 = that.state || {},
2596
- confirmPwd = _ref26.confirmPwd;
2593
+ var _ref23 = that.state || {},
2594
+ confirmPwd = _ref23.confirmPwd;
2597
2595
  // if (v !== '') {
2598
2596
 
2599
2597
 
@@ -2634,13 +2632,13 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
2634
2632
  }));
2635
2633
 
2636
2634
  return function (_x9) {
2637
- return _ref24.apply(this, arguments);
2635
+ return _ref21.apply(this, arguments);
2638
2636
  };
2639
2637
  }();
2640
2638
 
2641
2639
  _this2.btnDebounced = function () {
2642
- var _ref27 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee16(type, bquick) {
2643
- var IdbusiType, CustomerPhone, DistributionMode, Address, title, _enumController$getEn23, PayStyle, _this2$store8, paymode, brefund, boriginReturn, newStyle, status;
2640
+ var _ref24 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee16(type, bquick) {
2641
+ var IdbusiType, CustomerPhone, DistributionMode, Address, isEnableSerialNumber, resultObj, title, _enumController$getEn23, PayStyle, _this2$store8, paymode, brefund, boriginReturn, newStyle, status;
2644
2642
 
2645
2643
  return _regenerator2.default.wrap(function _callee16$(_context16) {
2646
2644
  while (1) {
@@ -2653,24 +2651,39 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
2653
2651
  //预订时,若没录入买家手机号,或配送方式为快递时,弹框买家信息确认框
2654
2652
 
2655
2653
  if (!(IdbusiType == 38)) {
2656
- _context16.next = 10;
2654
+ _context16.next = 14;
2655
+ break;
2656
+ }
2657
+
2658
+ //预售下单时,启用了序列号管理和批号/有效期管理的商品,不支持快递和同城配送
2659
+ isEnableSerialNumber = (0, _tplusPoslogin.PosInitData)("IsEnableSerialNumber");
2660
+ resultObj = _this2.context.viewModel.data.RetailDetails.find(function (o) {
2661
+ return o.Inventory.IsSerialNumber && (o.Inventory.IsBatch || o.Inventory.IsQualityPeriod);
2662
+ });
2663
+
2664
+ if (!(isEnableSerialNumber && resultObj && (DistributionMode.Id == 'ELECTRONIC' || DistributionMode.Id == 'CITY_DISTRIBUTE'))) {
2665
+ _context16.next = 9;
2657
2666
  break;
2658
2667
  }
2659
2668
 
2669
+ return _context16.abrupt('return', _message2.default.error('启用了序列号管理和批号/有效期管理的商品,不支持快递和同城配送'));
2670
+
2671
+ case 9:
2672
+
2660
2673
  if (DistributionMode.Id == 'ON_SITE_PICKUP' && !CustomerPhone && _this2.context.viewModel.data.Member.Mobilephone) {
2661
2674
  _this2.props.syncMemberInfoProcessor();
2662
2675
  }
2663
2676
 
2664
2677
  if (!(!CustomerPhone && !_this2.context.viewModel.data.Member.Mobilephone || DistributionMode.Id == 'ELECTRONIC' || DistributionMode.Id == 'CITY_DISTRIBUTE')) {
2665
- _context16.next = 10;
2678
+ _context16.next = 14;
2666
2679
  break;
2667
2680
  }
2668
2681
 
2669
2682
  title = (DistributionMode.Id == 'ELECTRONIC' || DistributionMode.Id == 'CITY_DISTRIBUTE') && Address ? '收货地址确认' : '收货人';
2670
- _context16.next = 10;
2683
+ _context16.next = 14;
2671
2684
  return _this2.props.openBuyerModal(title);
2672
2685
 
2673
- case 10:
2686
+ case 14:
2674
2687
 
2675
2688
  _this2.setState({
2676
2689
  bquick: bquick,
@@ -2680,13 +2693,13 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
2680
2693
  _this2$store8 = _this2.store, paymode = _this2$store8.paymode, brefund = _this2$store8.brefund, boriginReturn = _this2$store8.boriginReturn, newStyle = _this2$store8.newStyle;
2681
2694
 
2682
2695
  if (!(bquick && !_mutantsMicrofx.stores.offlineSys.shouldSettlement(type))) {
2683
- _context16.next = 15;
2696
+ _context16.next = 19;
2684
2697
  break;
2685
2698
  }
2686
2699
 
2687
2700
  return _context16.abrupt('return', false);
2688
2701
 
2689
- case 15:
2702
+ case 19:
2690
2703
  status = false;
2691
2704
 
2692
2705
  paymode.thePaymodes.forEach(function (v) {
@@ -2699,13 +2712,13 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
2699
2712
  });
2700
2713
 
2701
2714
  if (!_this2.btndebounced) {
2702
- _context16.next = 20;
2715
+ _context16.next = 24;
2703
2716
  break;
2704
2717
  }
2705
2718
 
2706
2719
  return _context16.abrupt('return');
2707
2720
 
2708
- case 20:
2721
+ case 24:
2709
2722
  _this2.btndebounced = (0, _debounce3.default)(function () {
2710
2723
  if (bquick) {
2711
2724
  _this2.quickSettle(type);
@@ -2722,7 +2735,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
2722
2735
  _this2.btndebounced = null;
2723
2736
  }, 2000);
2724
2737
 
2725
- case 23:
2738
+ case 27:
2726
2739
  case 'end':
2727
2740
  return _context16.stop();
2728
2741
  }
@@ -2731,14 +2744,14 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
2731
2744
  }));
2732
2745
 
2733
2746
  return function (_x10, _x11) {
2734
- return _ref27.apply(this, arguments);
2747
+ return _ref24.apply(this, arguments);
2735
2748
  };
2736
2749
  }();
2737
2750
 
2738
2751
  _this2.onCzkChange = function (v) {
2739
2752
  // console.log("czk change:"+new Date().toLocaleTimeString())
2740
- var _ref28 = _mutantsUtil.platform || {},
2741
- isNewRetailBCPos = _ref28.isNewRetailBCPos;
2753
+ var _ref25 = _mutantsUtil.platform || {},
2754
+ isNewRetailBCPos = _ref25.isNewRetailBCPos;
2742
2755
 
2743
2756
  if (!isNewRetailBCPos) {
2744
2757
  _this2.store.paymode.currentMode.member.setCardNo(v);
@@ -3347,12 +3360,12 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
3347
3360
 
3348
3361
  _this2.hasElectron = hasElectron;
3349
3362
 
3350
- var _ref29 = _mutantsMicrofx.stores.user.options.get('loginInfo') || {},
3351
- MemberMeStorageCardInputByKeyBoard = _ref29.MemberMeStorageCardInputByKeyBoard,
3352
- ICCardServer = _ref29.ICCardServer,
3353
- ICCardPassword = _ref29.ICCardPassword,
3354
- PreSellOrBook = _ref29.PreSellOrBook,
3355
- PercentageWhenBook = _ref29.PercentageWhenBook;
3363
+ var _ref26 = _mutantsMicrofx.stores.user.options.get('loginInfo') || {},
3364
+ MemberMeStorageCardInputByKeyBoard = _ref26.MemberMeStorageCardInputByKeyBoard,
3365
+ ICCardServer = _ref26.ICCardServer,
3366
+ ICCardPassword = _ref26.ICCardPassword,
3367
+ PreSellOrBook = _ref26.PreSellOrBook,
3368
+ PercentageWhenBook = _ref26.PercentageWhenBook;
3356
3369
 
3357
3370
  _this2.isStorageCardInputType = MemberMeStorageCardInputByKeyBoard; // 仅储值卡是否禁用键盘输入,'0'为不禁用 '1'为禁用
3358
3371
  _this2.iCCardServer = parseInt(ICCardServer); // 启用IC卡:0为禁用 1为启用
@@ -3361,9 +3374,9 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
3361
3374
  _this2.percentageWhenBook = PercentageWhenBook;
3362
3375
  //移动端环境下,没有读取IC卡的方式。
3363
3376
 
3364
- var _ref30 = _mutantsUtil.platform || {},
3365
- isHorizontalPad = _ref30.isHorizontalPad,
3366
- isHorizontalSunMi = _ref30.isHorizontalSunMi;
3377
+ var _ref27 = _mutantsUtil.platform || {},
3378
+ isHorizontalPad = _ref27.isHorizontalPad,
3379
+ isHorizontalSunMi = _ref27.isHorizontalSunMi;
3367
3380
 
3368
3381
  _this2.isHorizontalPad = !!isHorizontalPad;
3369
3382
  _this2.isHorizontalSunMi = !!isHorizontalSunMi;
@@ -3480,6 +3493,20 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
3480
3493
 
3481
3494
  //jfdx
3482
3495
 
3496
+ }, {
3497
+ key: 'isDjqValidated',
3498
+ value: function isDjqValidated(key) {
3499
+ var paymode = this.store.paymode;
3500
+
3501
+ var _enumController$getEn32 = _mutantsUtil.enumController.getEnumOj(),
3502
+ PayStyle = _enumController$getEn32.PayStyle;
3503
+
3504
+ if (key === PayStyle.djq && Math.Minus(paymode.received, paymode.amount) > 0) {
3505
+ _message2.default.warn('实收金额已大于应收金额,不允许使用优惠券');
3506
+ return false;
3507
+ }
3508
+ return true;
3509
+ }
3483
3510
 
3484
3511
  /**
3485
3512
  *
@@ -3495,8 +3522,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
3495
3522
  }, {
3496
3523
  key: 'isNoProductTip',
3497
3524
  value: function isNoProductTip(nonProductMap) {
3498
- var _ref31 = this.context.viewModel.data || {},
3499
- RetailDetails = _ref31.RetailDetails;
3525
+ var _ref28 = this.context.viewModel.data || {},
3526
+ RetailDetails = _ref28.RetailDetails;
3500
3527
 
3501
3528
  var temphtml = [];
3502
3529
  if ((0, _keys2.default)(nonProductMap).length > 0) {
@@ -3570,8 +3597,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
3570
3597
  }, {
3571
3598
  key: 'onKeyboardChange',
3572
3599
  value: function onKeyboardChange(key) {
3573
- var _enumController$getEn32 = _mutantsUtil.enumController.getEnumOj(),
3574
- PayStyle = _enumController$getEn32.PayStyle;
3600
+ var _enumController$getEn33 = _mutantsUtil.enumController.getEnumOj(),
3601
+ PayStyle = _enumController$getEn33.PayStyle;
3575
3602
 
3576
3603
  if (this.currentInput) {
3577
3604
  if (this.store.paymode.currentMode) {
@@ -3592,9 +3619,9 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
3592
3619
  value: function renderToolbtn(mode, index, bookType) {
3593
3620
  var _this7 = this;
3594
3621
 
3595
- var _enumController$getEn33 = _mutantsUtil.enumController.getEnumOj(),
3596
- PayIcon = _enumController$getEn33.PayIcon,
3597
- PayStyle = _enumController$getEn33.PayStyle;
3622
+ var _enumController$getEn34 = _mutantsUtil.enumController.getEnumOj(),
3623
+ PayIcon = _enumController$getEn34.PayIcon,
3624
+ PayStyle = _enumController$getEn34.PayStyle;
3598
3625
 
3599
3626
  var isReturn = this.props.isReturn;
3600
3627
  var _store = this.store,
@@ -3666,11 +3693,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
3666
3693
  value: function render() {
3667
3694
  var _this8 = this;
3668
3695
 
3669
- var _enumController$getEn34 = _mutantsUtil.enumController.getEnumOj(),
3670
- PayIcon = _enumController$getEn34.PayIcon,
3671
- PayIcon2 = _enumController$getEn34.PayIcon2,
3672
- PayStyle = _enumController$getEn34.PayStyle,
3673
- Differentiate = _enumController$getEn34.Differentiate;
3696
+ var _enumController$getEn35 = _mutantsUtil.enumController.getEnumOj(),
3697
+ PayIcon = _enumController$getEn35.PayIcon,
3698
+ PayIcon2 = _enumController$getEn35.PayIcon2,
3699
+ PayStyle = _enumController$getEn35.PayStyle,
3700
+ Differentiate = _enumController$getEn35.Differentiate;
3674
3701
 
3675
3702
  var _state2 = this.state,
3676
3703
  btnDissabled = _state2.btnDissabled,
@@ -3683,10 +3710,6 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
3683
3710
  newPassConfirm = _state2.newPassConfirm,
3684
3711
  newPass = _state2.newPass,
3685
3712
  isNotAutoFocus = _state2.isNotAutoFocus;
3686
-
3687
- var _ref32 = _mutantsUtil.platform || {},
3688
- isNewRetailBCPos = _ref32.isNewRetailBCPos;
3689
-
3690
3713
  var _store2 = this.store,
3691
3714
  paymode = _store2.paymode,
3692
3715
  brefund = _store2.brefund,
@@ -3771,11 +3794,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
3771
3794
  quantity4 = 0;
3772
3795
  var sumQuantity = 0; //数量总和的值,包括称重的。
3773
3796
 
3774
- var _ref33 = quantityDetail || {},
3775
- _ref33$buyQuantity = _ref33.buyQuantity,
3776
- buyQuantity = _ref33$buyQuantity === undefined ? 0 : _ref33$buyQuantity,
3777
- _ref33$returnQuantity = _ref33.returnQuantity,
3778
- returnQuantity = _ref33$returnQuantity === undefined ? 0 : _ref33$returnQuantity;
3797
+ var _ref29 = quantityDetail || {},
3798
+ _ref29$buyQuantity = _ref29.buyQuantity,
3799
+ buyQuantity = _ref29$buyQuantity === undefined ? 0 : _ref29$buyQuantity,
3800
+ _ref29$returnQuantity = _ref29.returnQuantity,
3801
+ returnQuantity = _ref29$returnQuantity === undefined ? 0 : _ref29$returnQuantity;
3779
3802
 
3780
3803
  var quantityPrecision = (0, _tplusPoslogin.PosInitData)("QuantityPrecision");
3781
3804
  quantityPrecision = quantityPrecision ? parseInt(quantityPrecision) : '';
@@ -3953,7 +3976,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
3953
3976
  { key: 'settle', className: (0, _classnames4.default)({ "settle": true, "settle2": type == 1, "settleStorage": true, 'primary-btn': true }), onClick: function onClick() {
3954
3977
  _this8.btnDebounced();
3955
3978
  }, disabled: productsIsEmpty },
3956
- this.props.isMemberPoints ? '立即兑换' : this.props.isMemberPointsReturn ? '退货' : settle.name
3979
+ this.props.isMemberPoints ? '立即兑换' : this.props.isMemberPointsReturn ? '退货' : IdbusiType == 39 && _mutantsMicrofx.stores.drawerStore.thisWaitPaidAmount == 0 ? '取货' : settle.name
3957
3980
  )
3958
3981
  ),
3959
3982
  !newStyle && _react2.default.createElement(
@@ -4660,7 +4683,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
4660
4683
  return _this8.czkInput = input;
4661
4684
  },
4662
4685
  onKeyDown: function () {
4663
- var _ref34 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee17(e) {
4686
+ var _ref30 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee17(e) {
4664
4687
  var time, _paymode;
4665
4688
 
4666
4689
  return _regenerator2.default.wrap(function _callee17$(_context17) {
@@ -4716,7 +4739,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
4716
4739
  }));
4717
4740
 
4718
4741
  return function (_x13) {
4719
- return _ref34.apply(this, arguments);
4742
+ return _ref30.apply(this, arguments);
4720
4743
  };
4721
4744
  }(),
4722
4745
  onFocus: function onFocus(e) {
@@ -4773,8 +4796,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
4773
4796
  _this8.setCurrentModeValue(event.target.value, Math.min(currentMode.maxamount, currentMode.balance));
4774
4797
  },
4775
4798
  defaultValue: currentMode && (0, _utils.getFixedNumber)(brefund ? currentMode.value : Math.min(currentMode.value, currentMode.maxamount, currentMode.balance)),
4776
- ref: function ref(_ref35) {
4777
- return _this8["inputCzkAmount"] = _ref35;
4799
+ ref: function ref(_ref31) {
4800
+ return _this8["inputCzkAmount"] = _ref31;
4778
4801
  },
4779
4802
  onFocus: function onFocus(e) {
4780
4803
  _this8.inputkey = "inputCzkAmount";
@@ -5444,8 +5467,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
5444
5467
  _this8.setCurrentModeValue(e.target.value, Math.min(currentMode.maxamount, currentMode.member.exchangable));
5445
5468
  },
5446
5469
  defaultValue: currentMode && currentMode.member && (0, _utils.getFixedNumber)(Math.min(currentMode.value, currentMode.maxamount, currentMode.member.exchangable)),
5447
- ref: function ref(_ref36) {
5448
- return _this8["inputJfdxAmount"] = _ref36;
5470
+ ref: function ref(_ref32) {
5471
+ return _this8["inputJfdxAmount"] = _ref32;
5449
5472
  },
5450
5473
  onFocus: function onFocus(e) {
5451
5474
  _this8.inputkey = "inputJfdxAmount";