tplus-components-touch 3.19.1 → 3.21.2

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 (35) hide show
  1. package/dist/components/cloudPrint/api.js +1 -1
  2. package/dist/components/cloudPrint/api.js.map +1 -1
  3. package/dist/components/cloudPrint/index.js +24 -48
  4. package/dist/components/cloudPrint/index.js.map +1 -1
  5. package/dist/components/inventorySearch/index.js +12 -3
  6. package/dist/components/inventorySearch/index.js.map +1 -1
  7. package/dist/components/inventorySearch/index.less +6 -2
  8. package/dist/components/keyboard/index.js +1 -1
  9. package/dist/components/keyboard/index.js.map +1 -1
  10. package/dist/components/settlement/asyncModal.js +4 -0
  11. package/dist/components/settlement/asyncModal.js.map +1 -1
  12. package/dist/components/settlement/prototypeTable/index.js +349 -0
  13. package/dist/components/settlement/prototypeTable/index.js.map +1 -0
  14. package/dist/components/settlement/prototypeTable/style.less +59 -0
  15. package/dist/components/settlement/prototypeTable/utils.js +14 -0
  16. package/dist/components/settlement/prototypeTable/utils.js.map +1 -0
  17. package/dist/components/settlement/settlement.js +505 -164
  18. package/dist/components/settlement/settlement.js.map +1 -1
  19. package/dist/components/settlement/settlement.less +110 -13
  20. package/dist/components/settlement/settlementStore.js +398 -87
  21. package/dist/components/settlement/settlementStore.js.map +1 -1
  22. package/dist/components/ticon/iconfont/demo.css +539 -539
  23. package/dist/components/ticon/iconfont/demo_index.html +417 -3
  24. package/dist/components/ticon/iconfont/iconfont.css +75 -3
  25. package/dist/components/ticon/iconfont/iconfont.js +12 -10
  26. package/dist/components/ticon/iconfont/iconfont.js.map +1 -1
  27. package/dist/components/ticon/iconfont/iconfont.json +126 -0
  28. package/dist/components/ticon/iconfont/iconfont.ttf +0 -0
  29. package/dist/components/ticon/iconfont/iconfont.woff +0 -0
  30. package/dist/components/ticon/iconfont/iconfont.woff2 +0 -0
  31. package/dist/index.js +2 -17
  32. package/dist/index.js.map +1 -1
  33. package/package.json +2 -2
  34. package/dist/components/cloudPrint/printDispatch.js +0 -223
  35. package/dist/components/cloudPrint/printDispatch.js.map +0 -1
@@ -52,6 +52,10 @@ var _asyncToGenerator2 = require('babel-runtime/helpers/asyncToGenerator');
52
52
 
53
53
  var _asyncToGenerator3 = _interopRequireDefault(_asyncToGenerator2);
54
54
 
55
+ var _assign = require('babel-runtime/core-js/object/assign');
56
+
57
+ var _assign2 = _interopRequireDefault(_assign);
58
+
55
59
  var _promise = require('babel-runtime/core-js/promise');
56
60
 
57
61
  var _promise2 = _interopRequireDefault(_promise);
@@ -130,6 +134,10 @@ var _debounce2 = require('lodash/debounce');
130
134
 
131
135
  var _debounce3 = _interopRequireDefault(_debounce2);
132
136
 
137
+ var _lodash = require('lodash');
138
+
139
+ var _lodash2 = _interopRequireDefault(_lodash);
140
+
133
141
  var _reduce2 = require('lodash/reduce');
134
142
 
135
143
  var _reduce3 = _interopRequireDefault(_reduce2);
@@ -196,6 +204,10 @@ var _index = require('../../index');
196
204
 
197
205
  var _tplusPoslogin = require('tplus-poslogin');
198
206
 
207
+ var _index2 = require('./prototypeTable/index');
208
+
209
+ var _index3 = _interopRequireDefault(_index2);
210
+
199
211
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
200
212
 
201
213
  var hasElectron = _mutantsMicrofx.env.platform === _mutantsMicrofx.env.constant.platform.electron;
@@ -217,6 +229,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
217
229
  djqVisible: false,
218
230
  jfdxVisible: false,
219
231
  showSetPwdModal: false,
232
+ prototypeVisible: false, // 优惠明细弹出框
220
233
  currentIndex: 0,
221
234
  connectCardStatus: false, //连接IC卡状态
222
235
  connectCardError: '', //连接IC卡错误后记录错误信息
@@ -229,7 +242,16 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
229
242
  noAlreadyWarn: true,
230
243
  btnDissabled: true,
231
244
  confirmPwd: '',
232
- settleDisabled: false };
245
+ settleDisabled: false,
246
+ protytypeCount: null,
247
+ isPrototypeClick: false,
248
+ dataSource: [],
249
+ discountTotalAmount: null,
250
+ discountRetailTotalAount: null,
251
+ discountPrototypeTotalAmount: null,
252
+ bquick: false,
253
+ currentKey: null,
254
+ couponLight: true };
233
255
  _this2.compoundHotkeysList = (window.$.operationControl[5] ? window.$.operationControl[5].control || [] : []).map(function (key) {
234
256
  return key.toLocaleUpperCase();
235
257
  });
@@ -294,28 +316,59 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
294
316
  }
295
317
  };
296
318
 
297
- _this2.quickSettle = function (key) {
319
+ _this2.payQuick = function () {
320
+ var currentKey = _this2.state.currentKey;
321
+
298
322
  var _enumController$getEn = _mutantsUtil.enumController.getEnumOj(),
299
323
  PayStyle = _enumController$getEn.PayStyle;
300
324
 
325
+ _this2.store.init(_this2.props.type == 1 ? null : _this2.context, _this2.props.onHandleAmount, _this2.props.dataSource.Code_02, _this2.props.storeInfo, true, _this2.props.amount, _this2.props.type, _this2.props.dto);
326
+ var amount = _this2.store.paymode.amount;
327
+ if (amount == 0) {
328
+ _this2.settleZero();
329
+ return;
330
+ }
331
+ if (currentKey == PayStyle.hyczk) {
332
+ var isProhibitMeStorageCard = _this2.props.isProhibitMeStorageCard;
333
+
334
+ if (isProhibitMeStorageCard) {
335
+ _message2.default.warn('储值卡不可键盘录入,请刷卡!');
336
+ return;
337
+ }
338
+ _this2.showCzkModal();
339
+ } else {
340
+ _this2.store.quickSettle(currentKey);
341
+ _this2.handleSettle("quickPay");
342
+ }
343
+ _this2.handleGuestShow(amount < 0 ? 2 : 3, amount);
344
+ };
345
+
346
+ _this2.quickSettle = function (key) {
347
+ var isAutoShowCouponWhenCash = (0, _tplusPoslogin.PosInitData)('IsAutoShowCouponWhenCash');
348
+ _this2.setState({
349
+ currentKey: key
350
+ });
351
+ var _this2$props = _this2.props,
352
+ isReturn = _this2$props.isReturn,
353
+ type = _this2$props.type;
354
+
301
355
  _promise2.default.resolve(!_this2.props.onValidate || _this2.props.onValidate()).then(function (result) {
302
356
  if (result) {
303
357
  _this2.setState({
304
358
  settleDisabled: false
305
359
  });
306
- _this2.store.init(_this2.props.type == 1 ? null : _this2.context, _this2.props.onHandleAmount, _this2.props.dataSource.Code_02, _this2.props.storeInfo, true, _this2.props.amount, _this2.props.type, _this2.props.dto);
307
- var amount = _this2.store.paymode.amount;
308
- if (amount == 0) {
309
- _this2.settleZero();
310
- return;
311
- }
312
- if (key == PayStyle.hyczk) {
313
- _this2.showCzkModal();
360
+ if (type !== 1) {
361
+ var count = _this2.handleShowPrototype();
362
+ if (!isReturn && isAutoShowCouponWhenCash && count > 0) {
363
+ _this2.setState({
364
+ prototypeVisible: true
365
+ });
366
+ } else {
367
+ _this2.payQuick();
368
+ }
314
369
  } else {
315
- _this2.store.quickSettle(key);
316
- _this2.handleSettle("quickPay");
370
+ _this2.payQuick();
317
371
  }
318
- _this2.handleGuestShow(amount < 0 ? 2 : 3, amount);
319
372
  }
320
373
  });
321
374
  };
@@ -326,36 +379,113 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
326
379
  return IdbusiType === 37 || IdbusiType === 36;
327
380
  };
328
381
 
382
+ _this2.payFun = function () {
383
+ _this2.store.init(_this2.props.type == 1 ? null : _this2.context, _this2.props.onHandleAmount, _this2.props.dataSource.Code_02, _this2.props.storeInfo, false, _this2.props.amount, _this2.props.type, _this2.props.dto);
384
+ var amount = _this2.store.paymode.amount;
385
+ if (amount == 0) {
386
+ _this2.settleZero();
387
+ return;
388
+ }
389
+ _this2.setState({ visible: true });
390
+ _this2.handleGuestShow(amount < 0 ? 2 : 3, amount);
391
+ setTimeout(function () {
392
+ _this2.handleDefault();
393
+ // // 单据模式 临时性获取第一个结算方式焦点
394
+ // // document.querySelector('.modeItem:nth-child(1) .content input').focus()
395
+ var _this2$store = _this2.store,
396
+ paymode = _this2$store.paymode,
397
+ brefund = _this2$store.brefund,
398
+ newStyle = _this2$store.newStyle;
399
+
400
+ var boriginReturn = _this2.context && _this2.context.viewModel && _this2.context.viewModel.data && JSON.getCellValue(_this2.context.viewModel.data, "IsOriginalReturn");
401
+ var thePaymodes = newStyle ? (0, _filter3.default)(paymode.thePaymodes, function (m) {
402
+ return !(_this2.checkModeDisabled(m.paymentType, brefund, boriginReturn) && parseFloat(m.value) == 0);
403
+ }) : paymode.thePaymodes;
404
+ _this2.setFocusAndSelectionMode(thePaymodes, -1);
405
+ }, 100);
406
+ };
407
+
408
+ _this2.handleShowPrototype = function () {
409
+ var pricePrecision = (0, _tplusPoslogin.PosInitData)("PricePrecision");
410
+ var quantityPrecision = (0, _tplusPoslogin.PosInitData)('QuantityPrecision');
411
+ var _this2$context$viewMo = _this2.context.viewModel.data,
412
+ RetailDetails = _this2$context$viewMo.RetailDetails,
413
+ TotalTaxAmount = _this2$context$viewMo.TotalTaxAmount;
414
+
415
+ var dataSource = RetailDetails.map(function (o) {
416
+ return (0, _assign2.default)({}, o);
417
+ });
418
+ var discountRetailTotalAount = null;
419
+ var count = 0;
420
+ dataSource && dataSource.forEach(function (item) {
421
+ var count1 = 0;
422
+ item.ShowFreeItem = false;
423
+ for (var i in item) {
424
+ if (/FreeItem/.test(i)) {
425
+ if (item[i] && item[i].Name) {
426
+ count1++;
427
+ item.ShowFreeItem = true;
428
+ count1 === 1 ? item.FreeItem = item[i].Name : item.FreeItem += '/' + item[i].Name;
429
+ }
430
+ }
431
+ }
432
+ //有赠品的情况,不在考虑是否促销
433
+ if (item.IsPresent) {
434
+ item.badge = { text: '赠', position: 'leftTop', className: '' };
435
+ } else if (item.PromotionDetails && item.PromotionDetails.length > 0) {
436
+ item.badge = { text: '促', position: 'leftTop', className: '' };
437
+ } else {
438
+ item.badge = { text: '', position: '', className: '' };
439
+ }
440
+ if (!item.IsPresent) {
441
+ discountRetailTotalAount += item.RetailPrice * item.Quantity;
442
+ }
443
+ if (item.PromotionDetails && item.PromotionDetails.length > 0) {
444
+ count++;
445
+ }
446
+ item.InventoryName = item.Inventory.Name;
447
+ item.Discount = (0, _utils.getRoundValue)(item.RetailPrice - item.TaxPrice, pricePrecision);
448
+ item.TotalDiscount = (0, _utils.getFixedNumber)(item.Discount * item.Quantity);
449
+ item.nAmount = (0, _utils.getFixedNumber)(item.TaxAmount);
450
+ item.UnitName = item.Unit.Name;
451
+ item.nQuantity = (0, _utils.getRoundValue)(item.Quantity, quantityPrecision);
452
+ item.nTaxPrice = (0, _utils.getRoundValue)(item.TaxPrice, pricePrecision);
453
+ item.nRetailPrice = (0, _utils.getRoundValue)(item.RetailPrice, pricePrecision);
454
+ });
455
+ _this2.setState({
456
+ dataSource: dataSource,
457
+ discountTotalAmount: (0, _utils.getFixedNumber)(TotalTaxAmount),
458
+ discountRetailTotalAount: (0, _utils.getFixedNumber)(discountRetailTotalAount),
459
+ discountPrototypeTotalAmount: (0, _utils.getFixedNumber)(discountRetailTotalAount - TotalTaxAmount)
460
+ });
461
+ console.log(RetailDetails, 'RetailDetails-----');
462
+ return count;
463
+ };
464
+
329
465
  _this2.showModal = function () {
466
+ var _this2$props2 = _this2.props,
467
+ isReturn = _this2$props2.isReturn,
468
+ type = _this2$props2.type;
469
+
470
+ var isAutoShowCouponWhenCash = (0, _tplusPoslogin.PosInitData)('IsAutoShowCouponWhenCash');
330
471
  // 支持异步验证过程
331
472
  _promise2.default.resolve(!_this2.props.onValidate || _this2.props.onValidate()).then(function (result) {
332
473
  if (result) {
333
474
  _this2.setState({
334
475
  settleDisabled: false
335
476
  });
336
- _this2.store.init(_this2.props.type == 1 ? null : _this2.context, _this2.props.onHandleAmount, _this2.props.dataSource.Code_02, _this2.props.storeInfo, false, _this2.props.amount, _this2.props.type, _this2.props.dto);
337
- var amount = _this2.store.paymode.amount;
338
- if (amount == 0) {
339
- _this2.settleZero();
340
- return;
477
+ if (type !== 1) {
478
+ var count = _this2.handleShowPrototype();
479
+ if (!isReturn && isAutoShowCouponWhenCash && count > 0) {
480
+ _this2.setState({
481
+ prototypeVisible: true
482
+ });
483
+ } else {
484
+ _this2.payFun();
485
+ }
486
+ } else {
487
+ _this2.payFun();
341
488
  }
342
- _this2.setState({ visible: true });
343
- _this2.handleGuestShow(amount < 0 ? 2 : 3, amount);
344
- setTimeout(function () {
345
- _this2.handleDefault();
346
- // // 单据模式 临时性获取第一个结算方式焦点
347
- // // document.querySelector('.modeItem:nth-child(1) .content input').focus()
348
- var _this2$store = _this2.store,
349
- paymode = _this2$store.paymode,
350
- brefund = _this2$store.brefund,
351
- newStyle = _this2$store.newStyle;
352
-
353
- var boriginReturn = _this2.context && _this2.context.viewModel && _this2.context.viewModel.data && JSON.getCellValue(_this2.context.viewModel.data, "IsOriginalReturn");
354
- var thePaymodes = newStyle ? (0, _filter3.default)(paymode.thePaymodes, function (m) {
355
- return !(_this2.checkModeDisabled(m.paymentType, brefund, boriginReturn) && parseFloat(m.value) == 0);
356
- }) : paymode.thePaymodes;
357
- _this2.setFocusAndSelectionMode(thePaymodes, -1);
358
- }, 100);
359
489
  }
360
490
  });
361
491
  };
@@ -448,6 +578,10 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
448
578
  showSetPwdModal: true
449
579
  });
450
580
  } else {
581
+ if (!sMember.StorageCardEnable) {
582
+ _message2.default.warn("该储值卡已停用");
583
+ return;
584
+ }
451
585
  _this2.setState({
452
586
  showSetPwdModal: false,
453
587
  czkVisible: true
@@ -477,13 +611,13 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
477
611
  _this2.inputCzkAmount.input.setSelectionRange(0, _this2.inputCzkAmount.input.value.length);
478
612
  }
479
613
  }
480
- }, 350);
614
+ }, 500);
481
615
  _this2.connectRfCard();
482
616
  };
483
617
 
484
618
  _this2.handleCzkOk = function () {
485
619
  var _ref2 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee(e) {
486
- var _enumController$getEn3, PayStyle;
620
+ var sMember, _enumController$getEn3, PayStyle;
487
621
 
488
622
  return _regenerator2.default.wrap(function _callee$(_context) {
489
623
  while (1) {
@@ -497,46 +631,57 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
497
631
  // });
498
632
  // return;
499
633
  // }
634
+ sMember = _this2.store.member;
635
+
636
+ if (sMember.StorageCardEnable) {
637
+ _context.next = 4;
638
+ break;
639
+ }
640
+
641
+ _message2.default.warn("该储值卡已停用");
642
+ return _context.abrupt('return');
643
+
644
+ case 4:
500
645
  _enumController$getEn3 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn3.PayStyle;
501
646
 
502
647
  if (_this2.store.paymode.currentMode.member.id) {
503
- _context.next = 4;
648
+ _context.next = 8;
504
649
  break;
505
650
  }
506
651
 
507
- _context.next = 4;
652
+ _context.next = 8;
508
653
  return _this2.store.loadCzk(_this2.czkInput.input.value);
509
654
 
510
- case 4:
655
+ case 8:
511
656
  if (_this2.store.paymode.currentMode.member.id) {
512
- _context.next = 7;
657
+ _context.next = 11;
513
658
  break;
514
659
  }
515
660
 
516
661
  _message2.default.error("请录入储值卡!");
517
662
  return _context.abrupt('return');
518
663
 
519
- case 7:
664
+ case 11:
520
665
  if (!(0, _find3.default)(_this2.store.paymode.thePaymodes, function (mode) {
521
666
  return mode.paymethodId != _this2.store.paymode.currentMode.paymethodId && mode.paymentType == PayStyle.hyczk && mode.member.id == _this2.store.paymode.currentMode.member.id;
522
667
  })) {
523
- _context.next = 10;
668
+ _context.next = 14;
524
669
  break;
525
670
  }
526
671
 
527
672
  _message2.default.error("该储值卡已使用。");
528
673
  return _context.abrupt('return');
529
674
 
530
- case 10:
675
+ case 14:
531
676
  if (!(_this2.store.bquick && _this2.store.paymode.amount != _this2.store.paymode.currentMode.value)) {
532
- _context.next = 13;
677
+ _context.next = 17;
533
678
  break;
534
679
  }
535
680
 
536
681
  _message2.default.error("实收金额应等于应收金额。");
537
682
  return _context.abrupt('return');
538
683
 
539
- case 13:
684
+ case 17:
540
685
 
541
686
  _this2.setState({
542
687
  czkVisible: false
@@ -545,7 +690,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
545
690
  _this2.store.paymode.calcMemberBalance();
546
691
  _this2.handleCzk();
547
692
 
548
- case 17:
693
+ case 21:
549
694
  case 'end':
550
695
  return _context.stop();
551
696
  }
@@ -705,8 +850,10 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
705
850
 
706
851
  _this2.store.setCurrentMode(id, PayStyle.djq);
707
852
  _this2.setState({
708
- djqVisible: true
853
+ djqVisible: true,
854
+ couponLight: true
709
855
  });
856
+ _this2.store.paymode.calcCheckList();
710
857
  setTimeout(function () {
711
858
  _this2.inputdjq && _this2.inputdjq.input && _this2.inputdjq.input.focus();
712
859
  }, 200);
@@ -893,7 +1040,20 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
893
1040
 
894
1041
  _this2.onTabsClick = function (key) {
895
1042
  var _enumController$getEn9 = _mutantsUtil.enumController.getEnumOj(),
896
- MultiPay = _enumController$getEn9.MultiPay;
1043
+ PayStyle = _enumController$getEn9.PayStyle,
1044
+ Differentiate = _enumController$getEn9.Differentiate;
1045
+
1046
+ if (key === PayStyle.hyczk) {
1047
+ var isProhibitMeStorageCard = _this2.props.isProhibitMeStorageCard;
1048
+
1049
+ if (isProhibitMeStorageCard) {
1050
+ _message2.default.warn('储值卡不可键盘录入,请刷卡!');
1051
+ return;
1052
+ }
1053
+ }
1054
+
1055
+ var _enumController$getEn10 = _mutantsUtil.enumController.getEnumOj(),
1056
+ MultiPay = _enumController$getEn10.MultiPay;
897
1057
 
898
1058
  var _this2$store3 = _this2.store,
899
1059
  paymode = _this2$store3.paymode,
@@ -952,8 +1112,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
952
1112
  _this2.editModal = function (id, type, boriginReturn) {
953
1113
  _this2.setState({ currentIndex: id });
954
1114
 
955
- var _enumController$getEn10 = _mutantsUtil.enumController.getEnumOj(),
956
- PayStyle = _enumController$getEn10.PayStyle;
1115
+ var _enumController$getEn11 = _mutantsUtil.enumController.getEnumOj(),
1116
+ PayStyle = _enumController$getEn11.PayStyle;
957
1117
 
958
1118
  switch (type) {
959
1119
  case PayStyle.hyczk:
@@ -978,8 +1138,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
978
1138
  };
979
1139
 
980
1140
  _this2.onDelPay = function (index, boriginReturn, type) {
981
- var _enumController$getEn11 = _mutantsUtil.enumController.getEnumOj(),
982
- PayStyle = _enumController$getEn11.PayStyle;
1141
+ var _enumController$getEn12 = _mutantsUtil.enumController.getEnumOj(),
1142
+ PayStyle = _enumController$getEn12.PayStyle;
983
1143
 
984
1144
  if (boriginReturn && (type == PayStyle.hyczk || type == PayStyle.djq || type == PayStyle.jfdx)) {
985
1145
  _message2.default.info('原单退货时,该结算方式不可以删除。');
@@ -1041,8 +1201,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
1041
1201
  };
1042
1202
 
1043
1203
  _this2.appendCzkmode = function (boriginReturn, params) {
1044
- var _enumController$getEn12 = _mutantsUtil.enumController.getEnumOj(),
1045
- PayStyle = _enumController$getEn12.PayStyle;
1204
+ var _enumController$getEn13 = _mutantsUtil.enumController.getEnumOj(),
1205
+ PayStyle = _enumController$getEn13.PayStyle;
1046
1206
 
1047
1207
  if (boriginReturn) {
1048
1208
  _message2.default.info('原单退货时不可以使用非原单的储值卡结算方式。');
@@ -1062,15 +1222,25 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
1062
1222
  _this2.showCzkModal(-1, bappend, params);
1063
1223
  };
1064
1224
 
1065
- _this2.djqChecked = function (q) {
1066
- var _enumController$getEn13 = _mutantsUtil.enumController.getEnumOj(),
1067
- Differentiate = _enumController$getEn13.Differentiate;
1225
+ _this2.djqChecked = function (q, dto) {
1226
+ var _enumController$getEn14 = _mutantsUtil.enumController.getEnumOj(),
1227
+ Differentiate = _enumController$getEn14.Differentiate;
1068
1228
 
1069
1229
  if (_this2.store.paymode.currentMode.boriginReturn) {
1070
1230
  _message2.default.info('\u539F\u5355\u9000\u8D27\u65F6' + Differentiate.COUPON + '\u4E0D\u53EF\u4EE5\u53D6\u6D88\u3002');
1071
1231
  return;
1072
1232
  }
1073
- _this2.store.paymode.calcDjqValue(q);
1233
+
1234
+ var _ref8 = _mutantsUtil.platform || {},
1235
+ isNewRetailBCPos = _ref8.isNewRetailBCPos;
1236
+
1237
+ if (isNewRetailBCPos) {
1238
+ _this2.store.paymode.calcDjqCheckValue(q, _this2.store.dto);
1239
+ } else {
1240
+ _this2.store.paymode.calcDjqValue(q);
1241
+ }
1242
+ // this.props.onGetCouponList && this.props.onGetCouponList(this.store.dto, _filter(this.store.paymode.currentMode.djqs,(djq)=>{return djq.couponCategoryEnum !== 'RIGHT'}));
1243
+ // this.props.onGetCouponList && this.props.onGetCouponList(this.store.dto, _filter(this.store.paymode.currentMode.djqs,(djq)=>{return djq.checked}), this.store.paymode.currentMode.djqs);
1074
1244
  };
1075
1245
 
1076
1246
  _this2.addDjq = function () {
@@ -1129,8 +1299,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
1129
1299
  };
1130
1300
 
1131
1301
  _this2.onHotKeyClickModal = function (mode, index, boriginReturn) {
1132
- var _enumController$getEn14 = _mutantsUtil.enumController.getEnumOj(),
1133
- PayStyle = _enumController$getEn14.PayStyle;
1302
+ var _enumController$getEn15 = _mutantsUtil.enumController.getEnumOj(),
1303
+ PayStyle = _enumController$getEn15.PayStyle;
1134
1304
 
1135
1305
  var brefund = _this2.store.brefund;
1136
1306
 
@@ -1215,8 +1385,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
1215
1385
  };
1216
1386
 
1217
1387
  _this2.setFocusAndSelectionMode = function (thePaymodes, currentIndex) {
1218
- var _enumController$getEn15 = _mutantsUtil.enumController.getEnumOj(),
1219
- PayStyle = _enumController$getEn15.PayStyle;
1388
+ var _enumController$getEn16 = _mutantsUtil.enumController.getEnumOj(),
1389
+ PayStyle = _enumController$getEn16.PayStyle;
1220
1390
 
1221
1391
  var displayPayModeList = [].concat((0, _toConsumableArray3.default)(thePaymodes));
1222
1392
  // 复制支付方式列表
@@ -1239,8 +1409,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
1239
1409
  };
1240
1410
 
1241
1411
  _this2.findModlePayBySplice = function (thePaymodes, currenIndex, symbol) {
1242
- var _enumController$getEn16 = _mutantsUtil.enumController.getEnumOj(),
1243
- PayStyle = _enumController$getEn16.PayStyle;
1412
+ var _enumController$getEn17 = _mutantsUtil.enumController.getEnumOj(),
1413
+ PayStyle = _enumController$getEn17.PayStyle;
1244
1414
 
1245
1415
  var findIndex = currenIndex;
1246
1416
  var endCurrentMode = thePaymodes.find(function (mode, index) {
@@ -1377,14 +1547,14 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
1377
1547
  };
1378
1548
 
1379
1549
  _this2.settleSuccess = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee5() {
1380
- var _enumController$getEn17, PayStyle, _this2$store$paymode, amount, received, thePaymodes, IdbusiType, charge, openCashBox, _this, showTwoScreen, getSettleGift, resp1;
1550
+ var _enumController$getEn18, PayStyle, _this2$store$paymode, amount, received, thePaymodes, IdbusiType, charge, openCashBox, _this, showTwoScreen, getSettleGift, type, resp1;
1381
1551
 
1382
1552
  return _regenerator2.default.wrap(function _callee5$(_context5) {
1383
1553
  while (1) {
1384
1554
  switch (_context5.prev = _context5.next) {
1385
1555
  case 0:
1386
1556
  //提示成功
1387
- _enumController$getEn17 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn17.PayStyle;
1557
+ _enumController$getEn18 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn18.PayStyle;
1388
1558
  _this2$store$paymode = _this2.store.paymode, amount = _this2$store$paymode.amount, received = _this2$store$paymode.received, thePaymodes = _this2$store$paymode.thePaymodes;
1389
1559
  IdbusiType = _this2.store.dto.IdbusiType;
1390
1560
  charge = _this2.store.paymode.charge;
@@ -1423,9 +1593,6 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
1423
1593
  //副屏-第二屏幕
1424
1594
  if (_this.isHorizontalSunMi) {
1425
1595
  window.sunMi_PresentationManager.sendMessageToSecondScreen(params);
1426
- setTimeout(function () {
1427
- window.sunMi_PresentationManager.sendMessageToSecondScreen({ step: 1 });
1428
- }, 3000);
1429
1596
  } else {
1430
1597
  _mutantsMicrofx.nativeMs && _mutantsMicrofx.nativeMs.setIpcRendererMethod('ReplyScreen', params);
1431
1598
  }
@@ -1438,23 +1605,30 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
1438
1605
  };
1439
1606
 
1440
1607
  getSettleGift = _this2.store.getSettleGift;
1608
+ type = _this2.props.type;
1441
1609
  resp1 = false;
1442
- _context5.prev = 9;
1443
- _context5.next = 12;
1610
+
1611
+ if (!(type !== 1)) {
1612
+ _context5.next = 20;
1613
+ break;
1614
+ }
1615
+
1616
+ _context5.prev = 11;
1617
+ _context5.next = 14;
1444
1618
  return getSettleGift();
1445
1619
 
1446
- case 12:
1620
+ case 14:
1447
1621
  resp1 = _context5.sent;
1448
- _context5.next = 18;
1622
+ _context5.next = 20;
1449
1623
  break;
1450
1624
 
1451
- case 15:
1452
- _context5.prev = 15;
1453
- _context5.t0 = _context5['catch'](9);
1625
+ case 17:
1626
+ _context5.prev = 17;
1627
+ _context5.t0 = _context5['catch'](11);
1454
1628
 
1455
1629
  console.log("获取支付礼包getSettleGift失败");
1456
1630
 
1457
- case 18:
1631
+ case 20:
1458
1632
 
1459
1633
  setTimeout(function () {
1460
1634
  if (window.__loadingModal) {
@@ -1486,25 +1660,25 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
1486
1660
  _this2.cancelState();
1487
1661
  }, 0);
1488
1662
 
1489
- case 19:
1663
+ case 21:
1490
1664
  case 'end':
1491
1665
  return _context5.stop();
1492
1666
  }
1493
1667
  }
1494
- }, _callee5, _this3, [[9, 15]]);
1668
+ }, _callee5, _this3, [[11, 17]]);
1495
1669
  }));
1496
1670
 
1497
1671
  _this2.handleGuestShow = function (dtype, value) {
1498
1672
  if (_this2.hasElectron === false) return;
1499
1673
  var dt = _mutantsMicrofx.localStore.get('portsetting_hardSet') || [];
1500
1674
 
1501
- var _ref10 = dt || {},
1502
- guestshow_enable = _ref10.guestshow_enable,
1503
- guestshow_clear = _ref10.guestshow_clear,
1504
- guestshow_welcome = _ref10.guestshow_welcome,
1505
- guestshow_collect = _ref10.guestshow_collect,
1506
- guestshow_refund = _ref10.guestshow_refund,
1507
- guestshow_change = _ref10.guestshow_change;
1675
+ var _ref11 = dt || {},
1676
+ guestshow_enable = _ref11.guestshow_enable,
1677
+ guestshow_clear = _ref11.guestshow_clear,
1678
+ guestshow_welcome = _ref11.guestshow_welcome,
1679
+ guestshow_collect = _ref11.guestshow_collect,
1680
+ guestshow_refund = _ref11.guestshow_refund,
1681
+ guestshow_change = _ref11.guestshow_change;
1508
1682
 
1509
1683
  var hasSuccess = _mutantsMicrofx.localStore && _mutantsMicrofx.localStore.get('portsetting_hardSet_isSuccess');
1510
1684
  if (!guestshow_enable || !!guestshow_enable && hasSuccess == '0') return;
@@ -1539,9 +1713,9 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
1539
1713
  };
1540
1714
 
1541
1715
  _this2.handleSettle = function () {
1542
- var _ref11 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee8(args) {
1716
+ var _ref12 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee8(args) {
1543
1717
  var handleUserInputs = function () {
1544
- var _ref13 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee7(promises) {
1718
+ var _ref14 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee7(promises) {
1545
1719
  var results, _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, p, _result;
1546
1720
 
1547
1721
  return _regenerator2.default.wrap(function _callee7$(_context7) {
@@ -1632,11 +1806,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
1632
1806
  }));
1633
1807
 
1634
1808
  return function handleUserInputs(_x4) {
1635
- return _ref13.apply(this, arguments);
1809
+ return _ref14.apply(this, arguments);
1636
1810
  };
1637
1811
  }();
1638
1812
 
1639
- var _enumController$getEn18, PayStyle, _this2$store6, paymode, brefund, boriginReturn, newStyle, isQuickPay, that, status, zeromode, promises, thePaymodes, quickmode, commit;
1813
+ var _enumController$getEn19, PayStyle, _this2$store6, paymode, brefund, boriginReturn, newStyle, isQuickPay, that, status, zeromode, promises, thePaymodes, quickmode, commit;
1640
1814
 
1641
1815
  return _regenerator2.default.wrap(function _callee8$(_context8) {
1642
1816
  while (1) {
@@ -1656,7 +1830,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
1656
1830
  // }
1657
1831
  //
1658
1832
  // testAsync(p);
1659
- _enumController$getEn18 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn18.PayStyle;
1833
+ _enumController$getEn19 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn19.PayStyle;
1660
1834
  _this2$store6 = _this2.store, paymode = _this2$store6.paymode, brefund = _this2$store6.brefund, boriginReturn = _this2$store6.boriginReturn, newStyle = _this2$store6.newStyle;
1661
1835
  isQuickPay = args === 'quickPay';
1662
1836
  that = _this2;
@@ -1735,7 +1909,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
1735
1909
  });
1736
1910
 
1737
1911
  commit = function () {
1738
- var _ref12 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee6(values) {
1912
+ var _ref13 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee6(values) {
1739
1913
  var result;
1740
1914
  return _regenerator2.default.wrap(function _callee6$(_context6) {
1741
1915
  while (1) {
@@ -1809,7 +1983,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
1809
1983
  }));
1810
1984
 
1811
1985
  return function commit(_x3) {
1812
- return _ref12.apply(this, arguments);
1986
+ return _ref13.apply(this, arguments);
1813
1987
  };
1814
1988
  }();
1815
1989
 
@@ -1824,13 +1998,13 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
1824
1998
  }));
1825
1999
 
1826
2000
  return function (_x2) {
1827
- return _ref11.apply(this, arguments);
2001
+ return _ref12.apply(this, arguments);
1828
2002
  };
1829
2003
  }();
1830
2004
 
1831
2005
  _this2.handleCzk = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee11() {
1832
2006
  var handleUserInputs = function () {
1833
- var _ref17 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee10(promises) {
2007
+ var _ref18 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee10(promises) {
1834
2008
  var results, _iteratorNormalCompletion2, _didIteratorError2, _iteratorError2, _iterator2, _step2, p, _result2;
1835
2009
 
1836
2010
  return _regenerator2.default.wrap(function _callee10$(_context10) {
@@ -1927,11 +2101,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
1927
2101
  }));
1928
2102
 
1929
2103
  return function handleUserInputs(_x6) {
1930
- return _ref17.apply(this, arguments);
2104
+ return _ref18.apply(this, arguments);
1931
2105
  };
1932
2106
  }();
1933
2107
 
1934
- var that, curmode, promises, _ref15, isNewRetailBCPos, _enumController$getEn19, PayStyle, commit;
2108
+ var that, curmode, promises, _ref16, isNewRetailBCPos, _enumController$getEn20, PayStyle, commit;
1935
2109
 
1936
2110
  return _regenerator2.default.wrap(function _callee11$(_context11) {
1937
2111
  while (1) {
@@ -1940,11 +2114,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
1940
2114
  that = _this2;
1941
2115
  curmode = _this2.store.paymode.currentMode;
1942
2116
  promises = [];
1943
- _ref15 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref15.isNewRetailBCPos;
2117
+ _ref16 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref16.isNewRetailBCPos;
1944
2118
 
1945
2119
  if (isNewRetailBCPos) {
1946
2120
  if (curmode.value > 0) {
1947
- _enumController$getEn19 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn19.PayStyle;
2121
+ _enumController$getEn20 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn20.PayStyle;
1948
2122
 
1949
2123
  if (curmode.paymentType === PayStyle.hyczk) {
1950
2124
  promises.push(that.inputPwd(curmode));
@@ -1957,7 +2131,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
1957
2131
  }
1958
2132
 
1959
2133
  commit = function () {
1960
- var _ref16 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee9(values) {
2134
+ var _ref17 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee9(values) {
1961
2135
  var result;
1962
2136
  return _regenerator2.default.wrap(function _callee9$(_context9) {
1963
2137
  while (1) {
@@ -2007,7 +2181,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
2007
2181
  }));
2008
2182
 
2009
2183
  return function commit(_x5) {
2010
- return _ref16.apply(this, arguments);
2184
+ return _ref17.apply(this, arguments);
2011
2185
  };
2012
2186
  }();
2013
2187
 
@@ -2058,7 +2232,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
2058
2232
  };
2059
2233
 
2060
2234
  _this2.inputPwd = function () {
2061
- var _ref18 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee12(paymode) {
2235
+ var _ref19 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee12(paymode) {
2062
2236
  var that, confirmPwd;
2063
2237
  return _regenerator2.default.wrap(function _callee12$(_context12) {
2064
2238
  while (1) {
@@ -2074,8 +2248,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
2074
2248
  // if (v !== '') {
2075
2249
  modal.destroy();
2076
2250
 
2077
- var _ref19 = that.state || {},
2078
- confirmPwd = _ref19.confirmPwd;
2251
+ var _ref20 = that.state || {},
2252
+ confirmPwd = _ref20.confirmPwd;
2079
2253
 
2080
2254
  setTimeout(function () {
2081
2255
  paymode.authCode = v;
@@ -2165,8 +2339,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
2165
2339
  type: 'primary', size: 'large', onClick: function onClick() {
2166
2340
  var v = (0, _trim3.default)(that['inputAmount']['input']['value']);
2167
2341
 
2168
- var _ref20 = that.state || {},
2169
- confirmPwd = _ref20.confirmPwd;
2342
+ var _ref21 = that.state || {},
2343
+ confirmPwd = _ref21.confirmPwd;
2170
2344
  // if (v !== '') {
2171
2345
 
2172
2346
 
@@ -2207,13 +2381,17 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
2207
2381
  }));
2208
2382
 
2209
2383
  return function (_x7) {
2210
- return _ref18.apply(this, arguments);
2384
+ return _ref19.apply(this, arguments);
2211
2385
  };
2212
2386
  }();
2213
2387
 
2214
2388
  _this2.btnDebounced = function (type, bquick) {
2215
- var _enumController$getEn20 = _mutantsUtil.enumController.getEnumOj(),
2216
- PayStyle = _enumController$getEn20.PayStyle;
2389
+ _this2.setState({
2390
+ bquick: bquick
2391
+ });
2392
+
2393
+ var _enumController$getEn21 = _mutantsUtil.enumController.getEnumOj(),
2394
+ PayStyle = _enumController$getEn21.PayStyle;
2217
2395
 
2218
2396
  var _this2$store7 = _this2.store,
2219
2397
  paymode = _this2$store7.paymode,
@@ -2253,8 +2431,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
2253
2431
 
2254
2432
  _this2.onCzkChange = function (v) {
2255
2433
  // console.log("czk change:"+new Date().toLocaleTimeString())
2256
- var _ref21 = _mutantsUtil.platform || {},
2257
- isNewRetailBCPos = _ref21.isNewRetailBCPos;
2434
+ var _ref22 = _mutantsUtil.platform || {},
2435
+ isNewRetailBCPos = _ref22.isNewRetailBCPos;
2258
2436
 
2259
2437
  if (!isNewRetailBCPos) {
2260
2438
  _this2.store.paymode.currentMode.member.setCardNo(v);
@@ -2309,8 +2487,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
2309
2487
  };
2310
2488
 
2311
2489
  _this2.checkCharge = function () {
2312
- var _enumController$getEn21 = _mutantsUtil.enumController.getEnumOj(),
2313
- PayStyle = _enumController$getEn21.PayStyle;
2490
+ var _enumController$getEn22 = _mutantsUtil.enumController.getEnumOj(),
2491
+ PayStyle = _enumController$getEn22.PayStyle;
2314
2492
 
2315
2493
  var paymode = _this2.store.paymode;
2316
2494
 
@@ -2357,8 +2535,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
2357
2535
  };
2358
2536
 
2359
2537
  _this2.getXianjinPayment = function (payType, value) {
2360
- var _enumController$getEn22 = _mutantsUtil.enumController.getEnumOj(),
2361
- PayStyle = _enumController$getEn22.PayStyle;
2538
+ var _enumController$getEn23 = _mutantsUtil.enumController.getEnumOj(),
2539
+ PayStyle = _enumController$getEn23.PayStyle;
2362
2540
 
2363
2541
  var isManualIntoAmount = _this2.state.isManualIntoAmount;
2364
2542
 
@@ -2366,8 +2544,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
2366
2544
  };
2367
2545
 
2368
2546
  _this2.getXianjinBalance = function (payType, value) {
2369
- var _enumController$getEn23 = _mutantsUtil.enumController.getEnumOj(),
2370
- PayStyle = _enumController$getEn23.PayStyle;
2547
+ var _enumController$getEn24 = _mutantsUtil.enumController.getEnumOj(),
2548
+ PayStyle = _enumController$getEn24.PayStyle;
2371
2549
  //找零金额-存在权限控制
2372
2550
 
2373
2551
 
@@ -2379,12 +2557,17 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
2379
2557
  _this2.inputConfirm = function (paymode, isQuickPay) {
2380
2558
  var that = _this2;
2381
2559
  var isStoredValueCard = false;
2560
+ var discountPrototypeTotalAmount = _this2.state.discountPrototypeTotalAmount;
2561
+ var _this2$props3 = _this2.props,
2562
+ isReturn = _this2$props3.isReturn,
2563
+ type = _this2$props3.type;
2564
+
2382
2565
  var isManualIntoAmount = void 0;
2383
2566
  // 付款弹窗
2384
2567
  return new _promise2.default(function (resolve, reject) {
2385
- var _enumController$getEn24 = _mutantsUtil.enumController.getEnumOj(),
2386
- PayStyle = _enumController$getEn24.PayStyle,
2387
- PayIcon2 = _enumController$getEn24.PayIcon2;
2568
+ var _enumController$getEn25 = _mutantsUtil.enumController.getEnumOj(),
2569
+ PayStyle = _enumController$getEn25.PayStyle,
2570
+ PayIcon2 = _enumController$getEn25.PayIcon2;
2388
2571
 
2389
2572
  var modal = (0, _asyncModal2.default)({
2390
2573
  onPressEnter: function onPressEnter() {
@@ -2418,6 +2601,21 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
2418
2601
  throw "error";
2419
2602
  }
2420
2603
  },
2604
+ isCancelFun: function isCancelFun() {
2605
+ var _that$state = that.state,
2606
+ prototypeVisible = _that$state.prototypeVisible,
2607
+ protytypeCount = _that$state.protytypeCount;
2608
+
2609
+ if (protytypeCount === 1) {
2610
+ that.setState({
2611
+ protytypeCount: 0
2612
+ });
2613
+ // setTimeout(() => {
2614
+ // that[`inputS${paymode.paymethodId}`].input.input.focus();
2615
+ // }, 535)
2616
+ }
2617
+ return prototypeVisible || protytypeCount;
2618
+ },
2421
2619
  onPressEsc: function onPressEsc() {
2422
2620
  _keyboard2.default.close();
2423
2621
  that.store.bquick && that.props.onCancelSettle && that.props.onCancelSettle();
@@ -2470,6 +2668,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
2470
2668
  'span',
2471
2669
  null,
2472
2670
  _react2.default.createElement(_numKeyboard2.default, {
2671
+ id: 'paymentAmount',
2473
2672
  className: 'content',
2474
2673
  type: 'text',
2475
2674
  placeholder: '\u8BF7\u8F93\u5165\u4ED8\u6B3E\u91D1\u989D',
@@ -2507,6 +2706,27 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
2507
2706
  that.getXianjinBalance(paymode.paymentType, paymode.value)
2508
2707
  )
2509
2708
  ),
2709
+ !isReturn && type !== 1 && _react2.default.createElement(
2710
+ 'div',
2711
+ { className: 'zlje prototype' },
2712
+ _react2.default.createElement(
2713
+ 'span',
2714
+ { className: 'label' },
2715
+ '\u4F18\u60E0\u660E\u7EC6\uFF1A'
2716
+ ),
2717
+ _react2.default.createElement(
2718
+ 'span',
2719
+ { className: 'yfje economize' },
2720
+ '\u7701\xA5',
2721
+ discountPrototypeTotalAmount
2722
+ ),
2723
+ _react2.default.createElement(
2724
+ 'span',
2725
+ { onClick: that.prototypeDetailedClick, className: 'prototypeDetailed primary-color' },
2726
+ '\u4F18\u60E0\u660E\u7EC6',
2727
+ _react2.default.createElement(_ticon2.default, { type: 'you2' })
2728
+ )
2729
+ ),
2510
2730
  (paymode.paymentType == PayStyle.wx || paymode.paymentType == PayStyle.zfb || paymode.paymentType == PayStyle.smzf || paymode.paymentType == PayStyle.SQBPAY || paymode.paymentType == PayStyle.CSYH) && _react2.default.createElement(
2511
2731
  'div',
2512
2732
  { className: 'contentzf' },
@@ -2607,7 +2827,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
2607
2827
  setTimeout(function () {
2608
2828
  // console.log(that[`inputS${paymode.paymethodId}`].input, '-------------------')
2609
2829
  that['inputS' + paymode.paymethodId].input.input.focus();
2610
- }, 360);
2830
+ }, 350);
2611
2831
  });
2612
2832
  };
2613
2833
 
@@ -2616,8 +2836,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
2616
2836
  paymode = _this2$store8.paymode,
2617
2837
  newStyle = _this2$store8.newStyle;
2618
2838
 
2619
- var _enumController$getEn25 = _mutantsUtil.enumController.getEnumOj(),
2620
- PayStyle = _enumController$getEn25.PayStyle;
2839
+ var _enumController$getEn26 = _mutantsUtil.enumController.getEnumOj(),
2840
+ PayStyle = _enumController$getEn26.PayStyle;
2621
2841
 
2622
2842
  var payTypeList = [PayStyle.SQBPAY, PayStyle.CSYH, PayStyle.smzf];
2623
2843
  var payTypeFilterList = payTypeList.filter(function (filterType) {
@@ -2638,15 +2858,15 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
2638
2858
  };
2639
2859
 
2640
2860
  _this2.checkModeDisabled = function (type, brefund, boriginReturn) {
2641
- var _enumController$getEn26 = _mutantsUtil.enumController.getEnumOj(),
2642
- PayStyle = _enumController$getEn26.PayStyle;
2861
+ var _enumController$getEn27 = _mutantsUtil.enumController.getEnumOj(),
2862
+ PayStyle = _enumController$getEn27.PayStyle;
2643
2863
 
2644
2864
  return (brefund && (type == PayStyle.wx || type == PayStyle.zfb || type == PayStyle.smzf || type == PayStyle.jfdx || type == PayStyle.djq || type == PayStyle.SQBPAY || type == PayStyle.CSYH) || boriginReturn && type == PayStyle.hyczk) && !(boriginReturn && (type == PayStyle.wx || type == PayStyle.zfb)) || _this2.checkCurrentModeHaveMutex(type);
2645
2865
  };
2646
2866
 
2647
2867
  _this2.checkSettleDisabled = function (paymode, thePaymodes) {
2648
- var _enumController$getEn27 = _mutantsUtil.enumController.getEnumOj(),
2649
- PayStyle = _enumController$getEn27.PayStyle;
2868
+ var _enumController$getEn28 = _mutantsUtil.enumController.getEnumOj(),
2869
+ PayStyle = _enumController$getEn28.PayStyle;
2650
2870
 
2651
2871
  console.log("settlement.checkSettleDisabled开始执行,参数:", { paymode: paymode, thePaymodes: thePaymodes });
2652
2872
  if (paymode.amount == 0 && paymode.received == 0) {
@@ -2692,8 +2912,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
2692
2912
  };
2693
2913
 
2694
2914
  _this2.editCzkModal = function () {
2695
- var _enumController$getEn28 = _mutantsUtil.enumController.getEnumOj(),
2696
- PayStyle = _enumController$getEn28.PayStyle;
2915
+ var _enumController$getEn29 = _mutantsUtil.enumController.getEnumOj(),
2916
+ PayStyle = _enumController$getEn29.PayStyle;
2697
2917
 
2698
2918
  (0, _find3.default)(_this2.store.paymode.thePaymodes, function (mode) {
2699
2919
  if (mode.paymentType == PayStyle.hyczk) {
@@ -2744,22 +2964,63 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
2744
2964
  );
2745
2965
  };
2746
2966
 
2967
+ _this2.prototypeDetailedClick = function () {
2968
+ _this2.handleShowPrototype();
2969
+ _this2.setState({
2970
+ prototypeVisible: true,
2971
+ isPrototypeClick: true
2972
+ });
2973
+ };
2974
+
2975
+ _this2.handleprototypeCancel = function () {
2976
+ _this2.setState({
2977
+ prototypeVisible: false,
2978
+ protytypeCount: 1,
2979
+ isPrototypeClick: false
2980
+ });
2981
+ var that = _this2;
2982
+ var _this2$state2 = _this2.state,
2983
+ bquick = _this2$state2.bquick,
2984
+ isPrototypeClick = _this2$state2.isPrototypeClick;
2985
+
2986
+ if (!isPrototypeClick) {
2987
+ if (bquick) {
2988
+ setTimeout(function () {
2989
+ _this2.payQuick();
2990
+ }, 100);
2991
+ } else {
2992
+ _this2.payFun();
2993
+ }
2994
+ } else {
2995
+ setTimeout(function () {
2996
+ var input = document.getElementById('paymentAmount');
2997
+ input && input.select();
2998
+ }, 700);
2999
+ }
3000
+ };
3001
+
3002
+ _this2.couponClick = function () {
3003
+ _this2.setState({
3004
+ couponLight: !_this2.state.couponLight
3005
+ });
3006
+ };
3007
+
2747
3008
  _this2.hasElectron = hasElectron;
2748
3009
 
2749
- var _ref22 = _mutantsMicrofx.localStore.get('user') || {},
2750
- _ref22$loginInfo = _ref22.loginInfo;
3010
+ var _ref23 = _mutantsMicrofx.localStore.get('user') || {},
3011
+ _ref23$loginInfo = _ref23.loginInfo;
2751
3012
 
2752
- _ref22$loginInfo = _ref22$loginInfo === undefined ? {} : _ref22$loginInfo;
2753
- var ICCardServer = _ref22$loginInfo.ICCardServer,
2754
- ICCardPassword = _ref22$loginInfo.ICCardPassword;
3013
+ _ref23$loginInfo = _ref23$loginInfo === undefined ? {} : _ref23$loginInfo;
3014
+ var ICCardServer = _ref23$loginInfo.ICCardServer,
3015
+ ICCardPassword = _ref23$loginInfo.ICCardPassword;
2755
3016
 
2756
3017
  _this2.iCCardServer = parseInt(ICCardServer); // 启用IC卡:0为禁用 1为启用
2757
3018
  _this2.iCCardPassword = ICCardPassword; //IC卡密码
2758
3019
  //移动端环境下,没有读取IC卡的方式。
2759
3020
 
2760
- var _ref23 = _mutantsUtil.platform || {},
2761
- isHorizontalPad = _ref23.isHorizontalPad,
2762
- isHorizontalSunMi = _ref23.isHorizontalSunMi;
3021
+ var _ref24 = _mutantsUtil.platform || {},
3022
+ isHorizontalPad = _ref24.isHorizontalPad,
3023
+ isHorizontalSunMi = _ref24.isHorizontalSunMi;
2763
3024
 
2764
3025
  _this2.isHorizontalPad = !!isHorizontalPad;
2765
3026
  _this2.isHorizontalSunMi = !!isHorizontalSunMi;
@@ -2906,9 +3167,9 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
2906
3167
  value: function renderToolbtn(mode, index) {
2907
3168
  var _this7 = this;
2908
3169
 
2909
- var _enumController$getEn29 = _mutantsUtil.enumController.getEnumOj(),
2910
- PayIcon = _enumController$getEn29.PayIcon,
2911
- PayStyle = _enumController$getEn29.PayStyle;
3170
+ var _enumController$getEn30 = _mutantsUtil.enumController.getEnumOj(),
3171
+ PayIcon = _enumController$getEn30.PayIcon,
3172
+ PayStyle = _enumController$getEn30.PayStyle;
2912
3173
 
2913
3174
  var isReturn = this.props.isReturn;
2914
3175
  var _store = this.store,
@@ -2980,16 +3241,21 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
2980
3241
  value: function render() {
2981
3242
  var _this8 = this;
2982
3243
 
2983
- var _enumController$getEn30 = _mutantsUtil.enumController.getEnumOj(),
2984
- PayIcon = _enumController$getEn30.PayIcon,
2985
- PayIcon2 = _enumController$getEn30.PayIcon2,
2986
- PayStyle = _enumController$getEn30.PayStyle,
2987
- Differentiate = _enumController$getEn30.Differentiate;
3244
+ var _enumController$getEn31 = _mutantsUtil.enumController.getEnumOj(),
3245
+ PayIcon = _enumController$getEn31.PayIcon,
3246
+ PayIcon2 = _enumController$getEn31.PayIcon2,
3247
+ PayStyle = _enumController$getEn31.PayStyle,
3248
+ Differentiate = _enumController$getEn31.Differentiate;
2988
3249
 
2989
- var btnDissabled = this.state.btnDissabled;
3250
+ var _state2 = this.state,
3251
+ btnDissabled = _state2.btnDissabled,
3252
+ dataSource = _state2.dataSource,
3253
+ discountTotalAmount = _state2.discountTotalAmount,
3254
+ discountRetailTotalAount = _state2.discountRetailTotalAount,
3255
+ discountPrototypeTotalAmount = _state2.discountPrototypeTotalAmount;
2990
3256
 
2991
- var _ref24 = _mutantsUtil.platform || {},
2992
- isNewRetailBCPos = _ref24.isNewRetailBCPos;
3257
+ var _ref25 = _mutantsUtil.platform || {},
3258
+ isNewRetailBCPos = _ref25.isNewRetailBCPos;
2993
3259
 
2994
3260
  var _store2 = this.store,
2995
3261
  paymode = _store2.paymode,
@@ -3052,11 +3318,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
3052
3318
  quantity4 = 0;
3053
3319
  var sumQuantity = 0; //数量总和的值,包括称重的。
3054
3320
 
3055
- var _ref25 = quantityDetail || {},
3056
- _ref25$buyQuantity = _ref25.buyQuantity,
3057
- buyQuantity = _ref25$buyQuantity === undefined ? 0 : _ref25$buyQuantity,
3058
- _ref25$returnQuantity = _ref25.returnQuantity,
3059
- returnQuantity = _ref25$returnQuantity === undefined ? 0 : _ref25$returnQuantity;
3321
+ var _ref26 = quantityDetail || {},
3322
+ _ref26$buyQuantity = _ref26.buyQuantity,
3323
+ buyQuantity = _ref26$buyQuantity === undefined ? 0 : _ref26$buyQuantity,
3324
+ _ref26$returnQuantity = _ref26.returnQuantity,
3325
+ returnQuantity = _ref26$returnQuantity === undefined ? 0 : _ref26$returnQuantity;
3060
3326
 
3061
3327
  var quantityPrecision = (0, _tplusPoslogin.PosInitData)("QuantityPrecision");
3062
3328
  quantityPrecision = quantityPrecision ? parseInt(quantityPrecision) : '';
@@ -3433,6 +3699,12 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
3433
3699
  )
3434
3700
  )
3435
3701
  ),
3702
+ !isReturn && _react2.default.createElement(
3703
+ 'div',
3704
+ { onClick: this.prototypeDetailedClick, className: 'prototypeDetailed primary-color' },
3705
+ '\u4F18\u60E0\u660E\u7EC6',
3706
+ _react2.default.createElement(_ticon2.default, { type: 'shouqi1' })
3707
+ ),
3436
3708
  _react2.default.createElement(
3437
3709
  'div',
3438
3710
  { className: this.isHorizontalPad ? 'keyboard_ios' : 'keyboard' },
@@ -3561,6 +3833,12 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
3561
3833
  (0, _utils.getFixedNumber)(Math.abs(paymode.receivable))
3562
3834
  )
3563
3835
  )
3836
+ ),
3837
+ !isReturn && _react2.default.createElement(
3838
+ 'div',
3839
+ { onClick: this.prototypeDetailedClick, className: 'prototypeDetailed primary-color' },
3840
+ '\u4F18\u60E0\u660E\u7EC6',
3841
+ _react2.default.createElement(_ticon2.default, { type: 'shouqi1' })
3564
3842
  )
3565
3843
  ),
3566
3844
  _react2.default.createElement(
@@ -3628,6 +3906,14 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
3628
3906
  disabled: _this8.checkModeDisabled(mode.paymentType, brefund, boriginReturn),
3629
3907
  onClick: function onClick() {
3630
3908
  var czkinput = document.getElementById('inputS' + index);
3909
+ if (mode.paymentType === PayStyle.hyczk) {
3910
+ var isProhibitMeStorageCard = _this8.props.isProhibitMeStorageCard;
3911
+
3912
+ if (isProhibitMeStorageCard) {
3913
+ _message2.default.warn('储值卡不可键盘录入,请刷卡!');
3914
+ return;
3915
+ }
3916
+ }
3631
3917
  mode.paymentType == PayStyle.hyczk && czkinput && czkinput.value !== '0.00' ? _this8.editCzkModal() : _this8.onHotKeyClick1(mode, index, boriginReturn);
3632
3918
  },
3633
3919
  value: mode.paymentType == PayStyle.hyczk ? (0, _utils.getFixedNumber)((0, _reduce3.default)((0, _filter3.default)(thePaymodes, function (tm) {
@@ -4345,7 +4631,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
4345
4631
  },
4346
4632
  onFocus: function onFocus(e) {
4347
4633
  _this8.inputTarget = _this8.czkInput.input;
4348
- _keyboard2.default.open(function (v) {
4634
+ !_this8.state.prototypeVisible && _keyboard2.default.open(function (v) {
4349
4635
  var value = _keyboard2.default.getNewValue(_this8.inputTarget, _this8.inputTarget.value, v);
4350
4636
  _this8.onCzkChange(value);
4351
4637
  }, _this8.czkKeyboardOnOk, _this8.czkKeyboardOnClose)();
@@ -4389,14 +4675,15 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
4389
4675
  'span',
4390
4676
  null,
4391
4677
  _react2.default.createElement(_input2.default, {
4678
+ id: 'paymentAmount',
4392
4679
  type: 'text',
4393
4680
  className: _index.hotKey.hotKeyNotFilter('input'),
4394
4681
  onChange: function onChange(event) {
4395
4682
  _this8.setCurrentModeValue(event.target.value, Math.min(currentMode.maxamount, currentMode.member.balance));
4396
4683
  },
4397
4684
  defaultValue: currentMode && (0, _utils.getFixedNumber)(brefund ? currentMode.value : Math.min(currentMode.value, currentMode.maxamount, currentMode.member.balance)),
4398
- ref: function ref(_ref26) {
4399
- return _this8["inputCzkAmount"] = _ref26;
4685
+ ref: function ref(_ref27) {
4686
+ return _this8["inputCzkAmount"] = _ref27;
4400
4687
  },
4401
4688
  onFocus: function onFocus(e) {
4402
4689
  _this8.inputkey = "inputCzkAmount";
@@ -4412,6 +4699,27 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
4412
4699
  })
4413
4700
  )
4414
4701
  ),
4702
+ !isReturn && _react2.default.createElement(
4703
+ 'div',
4704
+ { className: 'received' },
4705
+ _react2.default.createElement(
4706
+ 'span',
4707
+ { className: 'label' },
4708
+ '\u4F18\u60E0\u660E\u7EC6\uFF1A'
4709
+ ),
4710
+ _react2.default.createElement(
4711
+ 'span',
4712
+ { className: 'yfje economize' },
4713
+ '\u7701\xA5',
4714
+ discountPrototypeTotalAmount
4715
+ ),
4716
+ _react2.default.createElement(
4717
+ 'span',
4718
+ { onClick: this.prototypeDetailedClick, className: 'prototypeDetailed primary-color' },
4719
+ '\u4F18\u60E0\u660E\u7EC6',
4720
+ _react2.default.createElement(_ticon2.default, { type: 'you2' })
4721
+ )
4722
+ ),
4415
4723
  _react2.default.createElement(
4416
4724
  'div',
4417
4725
  { className: 'error' },
@@ -4592,6 +4900,25 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
4592
4900
  currentMode && currentMode.errinfo
4593
4901
  )
4594
4902
  ),
4903
+ _react2.default.createElement(
4904
+ 'div',
4905
+ { className: 'col4' },
4906
+ _react2.default.createElement(
4907
+ _button2.default,
4908
+ { className: '' + (this.state.couponLight ? "primary-color b-theme" : 'couponBorder'), onClick: this.couponClick },
4909
+ '\u53EF\u7528\u4F18\u60E0\u5238'
4910
+ ),
4911
+ _react2.default.createElement(
4912
+ _button2.default,
4913
+ { className: '' + (!this.state.couponLight ? "primary-color b-theme" : 'couponBorder'), onClick: this.couponClick },
4914
+ '\u4E0D\u53EF\u7528\u4F18\u60E0\u5238'
4915
+ ),
4916
+ _react2.default.createElement(
4917
+ 'span',
4918
+ { className: 'couponTip' },
4919
+ '\u9009\u62E9\u5238\u540E\u3001\u4E0D\u53EF\u53E0\u52A0\u3001\u91D1\u989D\u4E0D\u6EE1\u8DB3\u7684\u5238\u4F1A\u7F6E\u7070'
4920
+ )
4921
+ ),
4595
4922
  this.isHorizontalPad && _react2.default.createElement(
4596
4923
  'div',
4597
4924
  { className: 'col3' },
@@ -4608,12 +4935,18 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
4608
4935
  'div',
4609
4936
  { className: 'djq2' },
4610
4937
  (0, _map3.default)(currentMode && currentMode.djqs || [], function (q, index) {
4938
+ if (!_this8.state.couponLight && !q.count) {
4939
+ return;
4940
+ }
4941
+ if (_this8.state.couponLight && q.count && q.count === 1) {
4942
+ return;
4943
+ }
4611
4944
  return _react2.default.createElement(
4612
4945
  'div',
4613
4946
  { key: index + '', className: 'djqItem' },
4614
4947
  !q.promoMethodEnum || q.promoMethodEnum == 'CASH_COUPON' ? _react2.default.createElement(
4615
4948
  'div',
4616
- { className: 'djqLeft djqLeftCash' },
4949
+ { className: 'djqLeft ' + (q.IsEnable ? 'djqLeftCash' : 'djqLeftCashGrey') },
4617
4950
  _react2.default.createElement(
4618
4951
  'div',
4619
4952
  { className: 'amount' },
@@ -4635,7 +4968,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
4635
4968
  )
4636
4969
  ) : _react2.default.createElement(
4637
4970
  'div',
4638
- { className: 'djqLeft djqLeftDiscount' },
4971
+ { className: 'djqLeft ' + (q.IsEnable ? 'djqLeftCash' : 'djqLeftCashGrey') },
4639
4972
  _react2.default.createElement(
4640
4973
  'div',
4641
4974
  { className: 'amount' },
@@ -4659,9 +4992,14 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
4659
4992
  _react2.default.createElement(
4660
4993
  'div',
4661
4994
  { className: (0, _classnames4.default)('djqRight', { 'djqRightSelected': q.checked }), onClick: function onClick(e) {
4662
- return _this8.djqChecked(q);
4995
+ return q.IsEnable ? _this8.djqChecked(q, _this8.props.dto) : null;
4663
4996
  } },
4664
- _react2.default.createElement(
4997
+ q.checked ? _react2.default.createElement(_ticon2.default, { className: 'checkIcon primary-color', type: 'xuanzhong1' }) : _react2.default.createElement('span', { className: '' + (q.IsEnable ? 'noxuanzhong' : 'noxuanzhong1') }),
4998
+ q.checked ? _react2.default.createElement(
4999
+ 'div',
5000
+ { className: 'name overflow-hidden-point primary-color' },
5001
+ q.name
5002
+ ) : _react2.default.createElement(
4665
5003
  'div',
4666
5004
  { className: 'name overflow-hidden-point' },
4667
5005
  q.name
@@ -4960,8 +5298,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
4960
5298
  _this8.setCurrentModeValue(e.target.value, Math.min(currentMode.maxamount, currentMode.member.exchangable));
4961
5299
  },
4962
5300
  defaultValue: currentMode && (0, _utils.getFixedNumber)(Math.min(currentMode.value, currentMode.maxamount, currentMode.member.exchangable)),
4963
- ref: function ref(_ref27) {
4964
- return _this8["inputJfdxAmount"] = _ref27;
5301
+ ref: function ref(_ref28) {
5302
+ return _this8["inputJfdxAmount"] = _ref28;
4965
5303
  },
4966
5304
  onFocus: function onFocus(e) {
4967
5305
  _this8.inputkey = "inputJfdxAmount";
@@ -4983,7 +5321,10 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
4983
5321
  currentMode && currentMode.errinfo
4984
5322
  )
4985
5323
  )
4986
- )
5324
+ ),
5325
+ _react2.default.createElement(_index3.default, { discount: {
5326
+ discountTotalAmount: discountTotalAmount, discountRetailTotalAount: discountRetailTotalAount, discountPrototypeTotalAmount: discountPrototypeTotalAmount
5327
+ }, handleprototypeCancel: this.handleprototypeCancel, isHorizontalPad: this.isHorizontalPad, dataSource: dataSource, prototypeVisible: this.state.prototypeVisible })
4987
5328
  );
4988
5329
  }
4989
5330
  }]);