tplus-components-touch 3.23.1 → 3.23.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.
- package/dist/components/addLog/AddLogProcessor.js +1 -5
- package/dist/components/addLog/AddLogProcessor.js.map +1 -1
- package/dist/components/addLog/OperationLogApi.js +6 -45
- package/dist/components/addLog/OperationLogApi.js.map +1 -1
- package/dist/components/billSearch/index.js +64 -4
- package/dist/components/billSearch/index.js.map +1 -1
- package/dist/components/billSearch/index.less +12 -2
- package/dist/components/cloudPrint/api.js +1 -1
- package/dist/components/cloudPrint/api.js.map +1 -1
- package/dist/components/cloudPrint/index.js +114 -106
- package/dist/components/cloudPrint/index.js.map +1 -1
- package/dist/components/cloudPrint/printDispatch.js +223 -0
- package/dist/components/cloudPrint/printDispatch.js.map +1 -0
- package/dist/components/commonForm/addressPicker/index.js +4 -2
- package/dist/components/commonForm/addressPicker/index.js.map +1 -1
- package/dist/components/commonForm/formControl/index.js +3 -0
- package/dist/components/commonForm/formControl/index.js.map +1 -1
- package/dist/components/hotKey/localConfig.js +14 -1
- package/dist/components/hotKey/localConfig.js.map +1 -1
- package/dist/components/keyboard/index.js +1 -1
- package/dist/components/keyboard/index.js.map +1 -1
- package/dist/components/loading/index.js +5 -0
- package/dist/components/loading/index.js.map +1 -1
- package/dist/components/loading/loadingContent.js +23 -6
- package/dist/components/loading/loadingContent.js.map +1 -1
- package/dist/components/loading/style.less +12 -2
- package/dist/components/message/index.js +11 -0
- package/dist/components/message/index.js.map +1 -1
- package/dist/components/message/index.less +16 -1
- package/dist/components/modalWraper/style.less +6 -0
- package/dist/components/settlement/settlement.js +487 -312
- package/dist/components/settlement/settlement.js.map +1 -1
- package/dist/components/settlement/settlement.less +87 -13
- package/dist/components/settlement/settlementStore.js +495 -220
- package/dist/components/settlement/settlementStore.js.map +1 -1
- package/dist/components/settlement/utils.js +1 -1
- package/dist/components/settlement/utils.js.map +1 -1
- package/dist/components/ticon/iconfont/demo_index.html +5202 -4949
- package/dist/components/ticon/iconfont/iconfont.css +887 -843
- package/dist/components/ticon/iconfont/iconfont.js +1 -1
- package/dist/components/ticon/iconfont/iconfont.js.map +1 -1
- package/dist/components/ticon/iconfont/iconfont.json +1535 -1458
- package/dist/components/ticon/iconfont/iconfont.ttf +0 -0
- package/dist/components/ticon/iconfont/iconfont.woff +0 -0
- package/dist/components/ticon/iconfont/iconfont.woff2 +0 -0
- package/dist/components/touchTable/index.js +8 -0
- package/dist/components/touchTable/index.js.map +1 -1
- package/dist/index.js +17 -2
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -41,7 +41,7 @@ var _createClass2 = require('babel-runtime/helpers/createClass');
|
|
|
41
41
|
|
|
42
42
|
var _createClass3 = _interopRequireDefault(_createClass2);
|
|
43
43
|
|
|
44
|
-
var _desc, _value, _class, _descriptor, _descriptor2, _desc2, _value2, _class3, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _desc3, _value3, _class5,
|
|
44
|
+
var _desc, _value, _class, _descriptor, _descriptor2, _desc2, _value2, _class3, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _desc3, _value3, _class5, _descriptor11, _descriptor12, _descriptor13, _descriptor14, _descriptor15;
|
|
45
45
|
|
|
46
46
|
var _mobx = require('mobx');
|
|
47
47
|
|
|
@@ -93,18 +93,22 @@ var _utils = require('./utils');
|
|
|
93
93
|
|
|
94
94
|
var _tplusApi = require('tplus-api');
|
|
95
95
|
|
|
96
|
+
var _cloneDeep = require('lodash/cloneDeep');
|
|
97
|
+
|
|
98
|
+
var _cloneDeep2 = _interopRequireDefault(_cloneDeep);
|
|
99
|
+
|
|
96
100
|
var _message = require('../message');
|
|
97
101
|
|
|
98
102
|
var _message2 = _interopRequireDefault(_message);
|
|
99
103
|
|
|
100
104
|
var _mutantsUtil = require('mutants-util');
|
|
101
105
|
|
|
106
|
+
var _tplusComponentsTouch = require('tplus-components-touch');
|
|
107
|
+
|
|
102
108
|
var _moment = require('moment');
|
|
103
109
|
|
|
104
110
|
var _moment2 = _interopRequireDefault(_moment);
|
|
105
111
|
|
|
106
|
-
var _tplusComponentsTouch = require('tplus-components-touch');
|
|
107
|
-
|
|
108
112
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
109
113
|
|
|
110
114
|
function _initDefineProp(target, property, descriptor, context) {
|
|
@@ -194,6 +198,9 @@ var SettlementStore = (_class = function () {
|
|
|
194
198
|
if (dto.OnlinePaymentAmount) {
|
|
195
199
|
onlinePaymentAmount = dto.OnlinePaymentAmount;
|
|
196
200
|
}
|
|
201
|
+
promoVoucher.promoLinks = (0, _filter3.default)(_this2.paymode.currentMode.djqs, function (djq) {
|
|
202
|
+
return djq.checked;
|
|
203
|
+
});
|
|
197
204
|
promoVoucher.totalAmountWithTax = Math.Minus(dto.TotalTaxAmount, onlinePaymentAmount);
|
|
198
205
|
promoVoucher.redBlueFlagEnum = "BLUE";
|
|
199
206
|
promoVoucher.meMemberId = dto.Idmember;
|
|
@@ -209,7 +216,7 @@ var SettlementStore = (_class = function () {
|
|
|
209
216
|
detailDTO.productSpecId = item.ProductSpecId;
|
|
210
217
|
detailDTO.isManualFreeGift = item.IsPresent;
|
|
211
218
|
detailDTO.isListPriceIncludingTax = item.TaxFlag || true;
|
|
212
|
-
|
|
219
|
+
detailDTO.IsManualChangePrice = item.IsManualChangePrice;
|
|
213
220
|
if (detailDTO.IsManualChangePrice) //如果是手工改价
|
|
214
221
|
{
|
|
215
222
|
detailDTO.listPrice = item.TaxPrice;
|
|
@@ -259,22 +266,24 @@ var SettlementStore = (_class = function () {
|
|
|
259
266
|
var condValue = tieredAmountResult.condValue,
|
|
260
267
|
promoDiscount = tieredAmountResult.promoDiscount,
|
|
261
268
|
displayText = tieredAmountResult.displayText,
|
|
262
|
-
promoRuleId = tieredAmountResult.promoRuleId
|
|
269
|
+
promoRuleId = tieredAmountResult.promoRuleId,
|
|
270
|
+
couponCategoryEnum = tieredAmountResult.couponCategoryEnum;
|
|
263
271
|
|
|
264
|
-
if ((0, _find3.default)(_this2.paymode.
|
|
265
|
-
return djq.code == couponCode;
|
|
266
|
-
})) {
|
|
267
|
-
_message2.default.info(Differentiate.COUPON + '\u5DF2\u6DFB\u52A0');
|
|
268
|
-
} else if (result.IsRepelWithPoints && (0, _find3.default)(_this2.paymode.thePaymodes, function (themode) {
|
|
272
|
+
if (result.IsRepelWithPoints && (0, _find3.default)(_this2.paymode.thePaymodes, function (themode) {
|
|
269
273
|
return themode.paymentType == PayStyle.jfdx;
|
|
270
274
|
})) {
|
|
271
275
|
_message2.default.error(Differentiate.COUPON + '\uFF08' + result.SN + '\uFF09\u4E0D\u53EF\u4E0E\u79EF\u5206\u4E00\u8D77\u4F7F\u7528');
|
|
272
276
|
} else {
|
|
273
|
-
|
|
277
|
+
var IsEnable = couponCategoryEnum === 'RIGUP' || couponCategoryEnum === 'UN_MATCH' || couponCategoryEnum === "PREPARING" || couponCategoryEnum === 'PROMO_LIMITED' || couponCategoryEnum === 'COUPON_CONFLICT' ? false : true;
|
|
278
|
+
|
|
279
|
+
var _ref2 = _mutantsUtil.platform || {},
|
|
280
|
+
isNewRetailBCPos = _ref2.isNewRetailBCPos;
|
|
281
|
+
|
|
282
|
+
_this2.addDjq(couponCode, name, IsEnable, promoMethodEnum == "CASH_COUPON" ? nominalAmount : promoDiscount, condValue, null, false, !result.IsRepelWithPoints, dto.Idmember, dateMount, displayText, promoMethodEnum, discountPct, promoId, promoRuleId, couponCategoryEnum, id, true, 1);
|
|
274
283
|
}
|
|
275
284
|
});
|
|
276
285
|
if (promoVoucher.coupon_code) {
|
|
277
|
-
_this2.paymode.
|
|
286
|
+
_this2.paymode.calcDjqCheckValue(_this2.paymode.currentMode.djqs[0], _this2.dto, 'single');
|
|
278
287
|
}
|
|
279
288
|
} else {
|
|
280
289
|
if (promoVoucher.coupon_code) {
|
|
@@ -293,14 +302,14 @@ var SettlementStore = (_class = function () {
|
|
|
293
302
|
};
|
|
294
303
|
|
|
295
304
|
this.checkCoupon = function () {
|
|
296
|
-
var
|
|
297
|
-
var
|
|
305
|
+
var _ref3 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee(sn) {
|
|
306
|
+
var _ref4, isNewRetailBCPos, _enumController$getEn3, PayStyle, Differentiate;
|
|
298
307
|
|
|
299
308
|
return _regenerator2.default.wrap(function _callee$(_context) {
|
|
300
309
|
while (1) {
|
|
301
310
|
switch (_context.prev = _context.next) {
|
|
302
311
|
case 0:
|
|
303
|
-
|
|
312
|
+
_ref4 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref4.isNewRetailBCPos;
|
|
304
313
|
|
|
305
314
|
if (!isNewRetailBCPos) {
|
|
306
315
|
_context.next = 7;
|
|
@@ -308,7 +317,7 @@ var SettlementStore = (_class = function () {
|
|
|
308
317
|
}
|
|
309
318
|
|
|
310
319
|
_context.next = 4;
|
|
311
|
-
return _this2.getCouponList(sn);
|
|
320
|
+
return _this2.getCouponList(sn, 'sinlge');
|
|
312
321
|
|
|
313
322
|
case 4:
|
|
314
323
|
return _context.abrupt('return', _context.sent);
|
|
@@ -368,7 +377,7 @@ var SettlementStore = (_class = function () {
|
|
|
368
377
|
}));
|
|
369
378
|
|
|
370
379
|
return function (_x) {
|
|
371
|
-
return
|
|
380
|
+
return _ref3.apply(this, arguments);
|
|
372
381
|
};
|
|
373
382
|
}();
|
|
374
383
|
|
|
@@ -398,7 +407,6 @@ var SettlementStore = (_class = function () {
|
|
|
398
407
|
this.paymode = new PayMode();
|
|
399
408
|
var params = _mutantsMicrofx.localStore && _mutantsMicrofx.localStore.get('cloudPrintArguments');
|
|
400
409
|
if (params) this.cloudPrintArguments = params;
|
|
401
|
-
this.printUtil = new _tplusComponentsTouch.PrintUtil();
|
|
402
410
|
this.newStyle = _mutantsMicrofx.localStore && _mutantsMicrofx.localStore.get('voucherDefaultPosMode') == 'voucher';
|
|
403
411
|
}
|
|
404
412
|
|
|
@@ -482,9 +490,11 @@ var SettlementStore = (_class = function () {
|
|
|
482
490
|
var _enumController$getEn4 = _mutantsUtil.enumController.getEnumOj(),
|
|
483
491
|
PayStyle = _enumController$getEn4.PayStyle;
|
|
484
492
|
|
|
485
|
-
var
|
|
486
|
-
isNewRetailBCPos =
|
|
493
|
+
var _ref5 = _mutantsUtil.platform || {},
|
|
494
|
+
isNewRetailBCPos = _ref5.isNewRetailBCPos;
|
|
487
495
|
|
|
496
|
+
console.log(this.dto, 'dto==========');
|
|
497
|
+
this.paymode.checkList = [];
|
|
488
498
|
(0, _each3.default)(this.dto.RetailPaymentDetails, function (detail) {
|
|
489
499
|
var themode = (0, _find3.default)(_this5.paymode.paymodes, { 'idSettleStyle': detail.IdsettleStyle });
|
|
490
500
|
if (detail.SettleStyle.Code === PayStyle.hyczk && !themode) {
|
|
@@ -506,19 +516,19 @@ var SettlementStore = (_class = function () {
|
|
|
506
516
|
if (themode.paymentType == PayStyle.djq) {
|
|
507
517
|
(0, _each3.default)(_this5.dto.RetailCouponDetails, function (djq) {
|
|
508
518
|
if (isNewRetailBCPos) {
|
|
509
|
-
var
|
|
510
|
-
displayText =
|
|
511
|
-
promoRuleId =
|
|
512
|
-
dateMount =
|
|
513
|
-
promoMethodEnum =
|
|
514
|
-
discountPct =
|
|
515
|
-
promoId =
|
|
516
|
-
id =
|
|
517
|
-
|
|
518
|
-
_this5.addDjq(djq.CouponCode, djq.CouponTitle, djq.ReductionAmount, djq.EnableAmount, djq.LastTS, true, false, _this5.dto.Idmember, dateMount, displayText, promoMethodEnum, discountPct, promoId, promoRuleId, id, true);
|
|
519
|
+
var _ref6 = djq || {},
|
|
520
|
+
displayText = _ref6.displayText,
|
|
521
|
+
promoRuleId = _ref6.promoRuleId,
|
|
522
|
+
dateMount = _ref6.dateMount,
|
|
523
|
+
promoMethodEnum = _ref6.promoMethodEnum,
|
|
524
|
+
discountPct = _ref6.discountPct,
|
|
525
|
+
promoId = _ref6.promoId,
|
|
526
|
+
id = _ref6.id;
|
|
527
|
+
|
|
528
|
+
_this5.addDjq(djq.CouponCode, djq.CouponTitle, true, djq.ReductionAmount, djq.EnableAmount, djq.LastTS, true, false, _this5.dto.Idmember, dateMount, displayText, promoMethodEnum, discountPct, promoId, promoRuleId, null, id, true);
|
|
519
529
|
return;
|
|
520
530
|
}
|
|
521
|
-
_this5.addDjq(djq.CouponCode, djq.CouponTitle, djq.ReductionAmount, djq.EnableAmount, djq.LastTS, true, false);
|
|
531
|
+
_this5.addDjq(djq.CouponCode, djq.CouponTitle, true, djq.ReductionAmount, djq.EnableAmount, djq.LastTS, true, false);
|
|
522
532
|
});
|
|
523
533
|
}
|
|
524
534
|
_this5.paymode.thePaymodes.push(newmode);
|
|
@@ -595,9 +605,9 @@ var SettlementStore = (_class = function () {
|
|
|
595
605
|
}, {
|
|
596
606
|
key: 'getLoginInfo',
|
|
597
607
|
value: function getLoginInfo() {
|
|
598
|
-
var
|
|
599
|
-
|
|
600
|
-
loginInfo =
|
|
608
|
+
var _ref7 = _mutantsMicrofx.localStore.get('user') || {},
|
|
609
|
+
_ref7$loginInfo = _ref7.loginInfo,
|
|
610
|
+
loginInfo = _ref7$loginInfo === undefined ? {} : _ref7$loginInfo;
|
|
601
611
|
|
|
602
612
|
return loginInfo;
|
|
603
613
|
}
|
|
@@ -616,61 +626,107 @@ var SettlementStore = (_class = function () {
|
|
|
616
626
|
var IdStore = this.storeInfo.storeID;
|
|
617
627
|
var StoreCode = this.storeInfo.storeCode; //_find(this.storeInfo.storeInfos,(store)=>{return store.ID==IdStore;}).Code;
|
|
618
628
|
|
|
619
|
-
var
|
|
620
|
-
isNewRetailBCPos =
|
|
629
|
+
var _ref8 = _mutantsUtil.platform || {},
|
|
630
|
+
isNewRetailBCPos = _ref8.isNewRetailBCPos;
|
|
621
631
|
|
|
622
632
|
var address = '';
|
|
623
633
|
if (isNewRetailBCPos) {
|
|
624
|
-
address = '
|
|
634
|
+
// address = '/member/memberProfile/FindByStorageCode/'+v;
|
|
635
|
+
address = '/member/MeMemberWallet/FindByStorageCode';
|
|
636
|
+
return (0, _tplusApi.ccApi)({ code: v }, address, false, false, { method: 'get', timeout_skip: true }).then(function (result) {
|
|
637
|
+
var data = result.data;
|
|
638
|
+
var m = data;
|
|
639
|
+
|
|
640
|
+
var _ref9 = _mutantsUtil.platform || {},
|
|
641
|
+
isNewRetailBCPos = _ref9.isNewRetailBCPos;
|
|
642
|
+
|
|
643
|
+
if (isNewRetailBCPos) {
|
|
644
|
+
_this7.paymode && _this7.paymode.currentMode.member.setMeStorageCardId(m.MeStorageCardId);
|
|
645
|
+
_this7.paymode && _this7.paymode.currentMode.member.setStorageCardNo(m.StorageCardNo);
|
|
646
|
+
_this7.paymode && (_this7.paymode.currentMode.MeStorageCardId = m.MeStorageCardId);
|
|
647
|
+
_this7.paymode && (_this7.paymode.currentMode.StorageCardNo = m.StorageCardNo);
|
|
648
|
+
}
|
|
649
|
+
if (!m || !m.ID) {
|
|
650
|
+
(0, _mobx.runInAction)(function () {
|
|
651
|
+
_this7.paymode.currentMode.errinfo = "无效的会员卡号";
|
|
652
|
+
});
|
|
653
|
+
} else {
|
|
654
|
+
(0, _mobx.runInAction)(function () {
|
|
655
|
+
_this7.paymode.currentMode.errinfo = "";
|
|
656
|
+
_this7.paymode.currentMode.member = new Member(m);
|
|
657
|
+
_this7.paymode.currentMode.value = (0, _utils.getFixedNumber)(_this7.brefund ? _this7.paymode.receivable : Math.max(_this7.paymode.receivable, 0));
|
|
658
|
+
_this7.updateEvent();
|
|
659
|
+
var message = '';
|
|
660
|
+
if (global.CheckMemberStorageProcessorBlock) {
|
|
661
|
+
message = CheckMemberStorageProcessorBlock.execute(m);
|
|
662
|
+
}
|
|
663
|
+
if (!String.isNullOrEmpty(message)) {
|
|
664
|
+
_this7.paymode.currentMode.errinfo = message;
|
|
665
|
+
} else if (_this7.checkReceived(_this7.paymode.currentMode, "balance")) {
|
|
666
|
+
_this7.paymode.currentMode.errinfo = "余额不足";
|
|
667
|
+
} else if (_this7.paymode.amount > 0 && _this7.paymode.currentMode.value == 0) {
|
|
668
|
+
_this7.paymode.currentMode.errinfo = "实收金额必须录入";
|
|
669
|
+
} else {
|
|
670
|
+
// 查询成功后将焦点移入下一个输入框
|
|
671
|
+
var nextInput = document.querySelector('.czk .received .input');
|
|
672
|
+
nextInput && nextInput.select();
|
|
673
|
+
}
|
|
674
|
+
});
|
|
675
|
+
}
|
|
676
|
+
});
|
|
625
677
|
} else {
|
|
626
678
|
address = 'AA.DR.newRetailMember.SearchMember';
|
|
679
|
+
return (0, _tplusApi.tApi)({ SearchParams: { Key: v, IsSingleMember: true, IdStore: IdStore, StoreCode: StoreCode } }, address, false, false).then(function (result) {
|
|
680
|
+
var data = JSON.parse(result.Data);
|
|
681
|
+
var m = data && data.length > 0 && data[0];
|
|
682
|
+
|
|
683
|
+
var _ref10 = _mutantsUtil.platform || {},
|
|
684
|
+
isNewRetailBCPos = _ref10.isNewRetailBCPos;
|
|
685
|
+
|
|
686
|
+
if (isNewRetailBCPos) {
|
|
687
|
+
_this7.paymode && _this7.paymode.currentMode.member.setMeStorageCardId(m.MeStorageCardId);
|
|
688
|
+
_this7.paymode && _this7.paymode.currentMode.member.setStorageCardNo(m.StorageCardNo);
|
|
689
|
+
_this7.paymode && (_this7.paymode.currentMode.MeStorageCardId = m.MeStorageCardId);
|
|
690
|
+
_this7.paymode && (_this7.paymode.currentMode.StorageCardNo = m.StorageCardNo);
|
|
691
|
+
}
|
|
692
|
+
if (!m || !m.ID) {
|
|
693
|
+
(0, _mobx.runInAction)(function () {
|
|
694
|
+
_this7.paymode.currentMode.errinfo = "无效的会员卡号";
|
|
695
|
+
});
|
|
696
|
+
} else {
|
|
697
|
+
(0, _mobx.runInAction)(function () {
|
|
698
|
+
_this7.paymode.currentMode.errinfo = "";
|
|
699
|
+
_this7.paymode.currentMode.member = new Member(m);
|
|
700
|
+
_this7.paymode.currentMode.value = (0, _utils.getFixedNumber)(_this7.brefund ? _this7.paymode.receivable : Math.max(_this7.paymode.receivable, 0));
|
|
701
|
+
_this7.updateEvent();
|
|
702
|
+
var message = '';
|
|
703
|
+
if (global.CheckMemberStorageProcessorBlock) {
|
|
704
|
+
message = CheckMemberStorageProcessorBlock.execute(data[0]);
|
|
705
|
+
}
|
|
706
|
+
if (!String.isNullOrEmpty(message)) {
|
|
707
|
+
_this7.paymode.currentMode.errinfo = message;
|
|
708
|
+
} else if (_this7.checkReceived(_this7.paymode.currentMode, "balance")) {
|
|
709
|
+
_this7.paymode.currentMode.errinfo = "余额不足";
|
|
710
|
+
} else if (_this7.paymode.amount > 0 && _this7.paymode.currentMode.value == 0) {
|
|
711
|
+
_this7.paymode.currentMode.errinfo = "实收金额必须录入";
|
|
712
|
+
} else {
|
|
713
|
+
// 查询成功后将焦点移入下一个输入框
|
|
714
|
+
var nextInput = document.querySelector('.czk .received .input');
|
|
715
|
+
nextInput && nextInput.focus();
|
|
716
|
+
}
|
|
717
|
+
});
|
|
718
|
+
}
|
|
719
|
+
});
|
|
627
720
|
}
|
|
628
|
-
return (0, _tplusApi.tApi)({ SearchParams: { Key: v, IsSingleMember: true, IdStore: IdStore, StoreCode: StoreCode } }, address, false, false).then(function (result) {
|
|
629
|
-
var data = JSON.parse(result.Data);
|
|
630
|
-
var m = data && data.length > 0 && data[0];
|
|
631
|
-
|
|
632
|
-
var _ref8 = _mutantsUtil.platform || {},
|
|
633
|
-
isNewRetailBCPos = _ref8.isNewRetailBCPos;
|
|
634
|
-
|
|
635
|
-
if (isNewRetailBCPos) {
|
|
636
|
-
_this7.paymode && _this7.paymode.currentMode.member.setMeStorageCardId(m.MeStorageCardId);
|
|
637
|
-
_this7.paymode && _this7.paymode.currentMode.member.setStorageCardNo(m.StorageCardNo);
|
|
638
|
-
}
|
|
639
|
-
if (!m || !m.ID) {
|
|
640
|
-
(0, _mobx.runInAction)(function () {
|
|
641
|
-
_this7.paymode.currentMode.errinfo = "无效的会员卡号";
|
|
642
|
-
});
|
|
643
|
-
} else {
|
|
644
|
-
(0, _mobx.runInAction)(function () {
|
|
645
|
-
_this7.paymode.currentMode.errinfo = "";
|
|
646
|
-
_this7.paymode.currentMode.member = new Member(m);
|
|
647
|
-
_this7.paymode.currentMode.value = (0, _utils.getFixedNumber)(_this7.brefund ? _this7.paymode.receivable : Math.max(_this7.paymode.receivable, 0));
|
|
648
|
-
_this7.updateEvent();
|
|
649
|
-
var message = '';
|
|
650
|
-
if (global.CheckMemberStorageProcessorBlock) {
|
|
651
|
-
message = CheckMemberStorageProcessorBlock.execute(data[0]);
|
|
652
|
-
}
|
|
653
|
-
if (!String.isNullOrEmpty(message)) {
|
|
654
|
-
_this7.paymode.currentMode.errinfo = message;
|
|
655
|
-
} else if (_this7.checkReceived(_this7.paymode.currentMode, "balance")) {
|
|
656
|
-
_this7.paymode.currentMode.errinfo = "余额不足";
|
|
657
|
-
} else if (_this7.paymode.amount > 0 && _this7.paymode.currentMode.value == 0) {
|
|
658
|
-
_this7.paymode.currentMode.errinfo = "实收金额必须录入";
|
|
659
|
-
} else {
|
|
660
|
-
// 查询成功后将焦点移入下一个输入框
|
|
661
|
-
var nextInput = document.querySelector('.czk .received .input');
|
|
662
|
-
nextInput && nextInput.focus();
|
|
663
|
-
}
|
|
664
|
-
});
|
|
665
|
-
}
|
|
666
|
-
});
|
|
667
721
|
}
|
|
668
722
|
}, {
|
|
669
723
|
key: 'addDjq',
|
|
670
|
-
value: function addDjq(
|
|
724
|
+
value: function addDjq(promoCouponCode, name, IsEnable, amount, doorsill, LastTS, checked, IsRepelWithPoints, UMemberID, expired, displayText, promoMethodEnum, discountPct, promoId, promoRuleId, couponCategoryEnum, id, unCheck, count) {
|
|
671
725
|
var djq = {
|
|
672
|
-
code:
|
|
726
|
+
code: promoCouponCode,
|
|
727
|
+
promoCouponCode: promoCouponCode,
|
|
673
728
|
name: name,
|
|
729
|
+
IsEnable: IsEnable,
|
|
674
730
|
amount: amount,
|
|
675
731
|
doorsill: doorsill, //:"无门槛"
|
|
676
732
|
LastTS: LastTS,
|
|
@@ -683,9 +739,12 @@ var SettlementStore = (_class = function () {
|
|
|
683
739
|
discountPct: discountPct,
|
|
684
740
|
promoId: promoId,
|
|
685
741
|
promoRuleId: promoRuleId,
|
|
686
|
-
|
|
742
|
+
couponCategoryEnum: couponCategoryEnum,
|
|
743
|
+
id: id,
|
|
744
|
+
count: count === 1 && (couponCategoryEnum === 'RIGUP' || couponCategoryEnum === 'UN_MATCH' || couponCategoryEnum === "PREPARING" || couponCategoryEnum === 'PROMO_LIMITED' || couponCategoryEnum === 'COUPON_CONFLICT') ? 1 : null
|
|
687
745
|
};
|
|
688
746
|
this.paymode.currentMode.djqs.push(djq);
|
|
747
|
+
// let copyData = _clonedeep(this.data[targetIndex]);
|
|
689
748
|
!unCheck && !this.boriginReturn && this.paymode.calcDjqValue(djq);
|
|
690
749
|
}
|
|
691
750
|
}, {
|
|
@@ -770,7 +829,7 @@ var SettlementStore = (_class = function () {
|
|
|
770
829
|
maxamount: this.paymode.amount
|
|
771
830
|
});
|
|
772
831
|
if (type == PayStyle.hyczk) {
|
|
773
|
-
if (!mode.member.id) {
|
|
832
|
+
if (!mode.member.id || !mode.member.StorageCardNo) {
|
|
774
833
|
(0, _mobx.runInAction)(function () {
|
|
775
834
|
mode.errinfo = '未录入储值卡';
|
|
776
835
|
});
|
|
@@ -904,6 +963,9 @@ var SettlementStore = (_class = function () {
|
|
|
904
963
|
}, {
|
|
905
964
|
key: 'delPay',
|
|
906
965
|
value: function delPay(index) {
|
|
966
|
+
var _enumController$getEn12 = _mutantsUtil.enumController.getEnumOj(),
|
|
967
|
+
PayStyle = _enumController$getEn12.PayStyle;
|
|
968
|
+
|
|
907
969
|
(0, _remove3.default)(this.paymode.thePaymodes, function (mode) {
|
|
908
970
|
return mode.paymethodId === index;
|
|
909
971
|
});
|
|
@@ -913,7 +975,9 @@ var SettlementStore = (_class = function () {
|
|
|
913
975
|
}, {
|
|
914
976
|
key: 'commit',
|
|
915
977
|
value: function () {
|
|
916
|
-
var
|
|
978
|
+
var _ref11 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2(bTest) {
|
|
979
|
+
var _ref12, isNewRetailBCPos;
|
|
980
|
+
|
|
917
981
|
return _regenerator2.default.wrap(function _callee2$(_context2) {
|
|
918
982
|
while (1) {
|
|
919
983
|
switch (_context2.prev = _context2.next) {
|
|
@@ -928,58 +992,80 @@ var SettlementStore = (_class = function () {
|
|
|
928
992
|
return _context2.abrupt('return', _promise2.default.resolve(true));
|
|
929
993
|
|
|
930
994
|
case 3:
|
|
931
|
-
|
|
995
|
+
_ref12 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref12.isNewRetailBCPos;
|
|
996
|
+
_context2.prev = 4;
|
|
932
997
|
|
|
933
998
|
if (!(this.type == 1)) {
|
|
934
|
-
_context2.next =
|
|
999
|
+
_context2.next = 10;
|
|
935
1000
|
break;
|
|
936
1001
|
}
|
|
937
1002
|
|
|
938
|
-
_context2.next =
|
|
1003
|
+
_context2.next = 8;
|
|
939
1004
|
return this.saveMember();
|
|
940
1005
|
|
|
941
|
-
case
|
|
942
|
-
_context2.next =
|
|
1006
|
+
case 8:
|
|
1007
|
+
_context2.next = 18;
|
|
943
1008
|
break;
|
|
944
1009
|
|
|
945
|
-
case
|
|
946
|
-
|
|
1010
|
+
case 10:
|
|
1011
|
+
if (!isNewRetailBCPos) {
|
|
1012
|
+
_context2.next = 13;
|
|
1013
|
+
break;
|
|
1014
|
+
}
|
|
1015
|
+
|
|
1016
|
+
_context2.next = 13;
|
|
1017
|
+
return _mutantsMicrofx.stores.offlineSys.generatorCode(this.dto);
|
|
1018
|
+
|
|
1019
|
+
case 13:
|
|
1020
|
+
_context2.next = 15;
|
|
947
1021
|
return this.save();
|
|
948
1022
|
|
|
949
|
-
case
|
|
1023
|
+
case 15:
|
|
1024
|
+
if (!isNewRetailBCPos) {
|
|
1025
|
+
_context2.next = 18;
|
|
1026
|
+
break;
|
|
1027
|
+
}
|
|
1028
|
+
|
|
1029
|
+
_context2.next = 18;
|
|
1030
|
+
return _mutantsMicrofx.stores.offlineSys.retailSequenceUpload();
|
|
1031
|
+
|
|
1032
|
+
case 18:
|
|
950
1033
|
return _context2.abrupt('return', _promise2.default.resolve(true));
|
|
951
1034
|
|
|
952
|
-
case
|
|
953
|
-
_context2.prev =
|
|
954
|
-
_context2.t0 = _context2['catch'](
|
|
1035
|
+
case 21:
|
|
1036
|
+
_context2.prev = 21;
|
|
1037
|
+
_context2.t0 = _context2['catch'](4);
|
|
955
1038
|
|
|
956
1039
|
console.error('settlementStore.commit失败,错误信息:' + _context2.t0);
|
|
957
1040
|
return _context2.abrupt('return', _promise2.default.resolve(_context2.t0));
|
|
958
1041
|
|
|
959
|
-
case
|
|
960
|
-
console.error('settlementStore.commit失败,错误信息:' + err);
|
|
961
|
-
|
|
962
|
-
case 19:
|
|
1042
|
+
case 25:
|
|
963
1043
|
case 'end':
|
|
964
1044
|
return _context2.stop();
|
|
965
1045
|
}
|
|
966
1046
|
}
|
|
967
|
-
}, _callee2, this, [[
|
|
1047
|
+
}, _callee2, this, [[4, 21]]);
|
|
968
1048
|
}));
|
|
969
1049
|
|
|
970
1050
|
function commit(_x2) {
|
|
971
|
-
return
|
|
1051
|
+
return _ref11.apply(this, arguments);
|
|
972
1052
|
}
|
|
973
1053
|
|
|
974
1054
|
return commit;
|
|
975
1055
|
}()
|
|
1056
|
+
}, {
|
|
1057
|
+
key: 'handlePrint',
|
|
1058
|
+
value: function handlePrint(resp) {
|
|
1059
|
+
// 储值打印
|
|
1060
|
+
return (0, _tplusComponentsTouch.printDispatch)(_tplusComponentsTouch.DoNameList.DO_STORAGE_PRINT, resp, {});
|
|
1061
|
+
}
|
|
976
1062
|
}, {
|
|
977
1063
|
key: 'saveMember',
|
|
978
1064
|
value: function saveMember() {
|
|
979
1065
|
var _this10 = this;
|
|
980
1066
|
|
|
981
|
-
var _enumController$
|
|
982
|
-
PayStyle = _enumController$
|
|
1067
|
+
var _enumController$getEn13 = _mutantsUtil.enumController.getEnumOj(),
|
|
1068
|
+
PayStyle = _enumController$getEn13.PayStyle;
|
|
983
1069
|
|
|
984
1070
|
(0, _mobx.runInAction)(function () {
|
|
985
1071
|
_this10.dto.StorageMutiSettleDetails = [];
|
|
@@ -1014,71 +1100,7 @@ var SettlementStore = (_class = function () {
|
|
|
1014
1100
|
IPMSG = JSON.parse(window.localStorage.IPMSG);
|
|
1015
1101
|
}
|
|
1016
1102
|
return (0, _tplusApi.tApi)({ dto: this.dto }, 'chanjet.ME.INewRetailMemberStorage.Save', false, false).then(function (resp) {
|
|
1017
|
-
|
|
1018
|
-
isHorizontalPad = _ref10.isHorizontalPad,
|
|
1019
|
-
isHorizontalSunMi = _ref10.isHorizontalSunMi;
|
|
1020
|
-
|
|
1021
|
-
if (isHorizontalPad === true) {
|
|
1022
|
-
// pad打印
|
|
1023
|
-
//执行移动端云打印
|
|
1024
|
-
if (_this10.cloudPrintArguments) {
|
|
1025
|
-
var _ref11 = _this10.cloudPrintArguments || {},
|
|
1026
|
-
Open = _ref11.Open,
|
|
1027
|
-
Key = _ref11.Key,
|
|
1028
|
-
Sign = _ref11.Sign,
|
|
1029
|
-
Name = _ref11.Name,
|
|
1030
|
-
Card = _ref11.Card;
|
|
1031
|
-
|
|
1032
|
-
if (!Open) {
|
|
1033
|
-
_message2.default.warn(t('云打印未启用,请设置。'));
|
|
1034
|
-
return;
|
|
1035
|
-
}
|
|
1036
|
-
_this10.printUtil.doStoragePrint({ Key: Key, Sign: Sign, Name: Name, Card: Card }, resp.ID, function (s) {
|
|
1037
|
-
var msg = s.msg,
|
|
1038
|
-
ret = s.ret;
|
|
1039
|
-
|
|
1040
|
-
if (ret === 0) {
|
|
1041
|
-
_message2.default.success(t('打印储值小票成功。'));
|
|
1042
|
-
} else if (ret === -1) {
|
|
1043
|
-
_message2.default.error(t(msg));
|
|
1044
|
-
} else {
|
|
1045
|
-
_message2.default.error(t('打印储值小票失败。'));
|
|
1046
|
-
}
|
|
1047
|
-
});
|
|
1048
|
-
} else {
|
|
1049
|
-
_message2.default.warn(t('云打印未启用,请设置。'));
|
|
1050
|
-
}
|
|
1051
|
-
return;
|
|
1052
|
-
} else if (isHorizontalSunMi === true) {
|
|
1053
|
-
_this10.printUtil.doStoragePrint({}, resp.ID, function (s) {
|
|
1054
|
-
var msg = s.msg,
|
|
1055
|
-
ret = s.ret;
|
|
1056
|
-
|
|
1057
|
-
if (ret === 0) {
|
|
1058
|
-
_message2.default.success(t('打印储值小票成功。'));
|
|
1059
|
-
} else if (ret === -1) {
|
|
1060
|
-
_message2.default.error(t(msg));
|
|
1061
|
-
} else {
|
|
1062
|
-
_message2.default.error(t('打印储值小票失败。'));
|
|
1063
|
-
}
|
|
1064
|
-
});
|
|
1065
|
-
return;
|
|
1066
|
-
} else {
|
|
1067
|
-
if (global.StoragePrintProcessBlock) {
|
|
1068
|
-
var _ref12 = _mutantsUtil.platform || {},
|
|
1069
|
-
isNewRetailBCPos = _ref12.isNewRetailBCPos;
|
|
1070
|
-
|
|
1071
|
-
if (isNewRetailBCPos) {
|
|
1072
|
-
global.StoragePrintProcessBlock.execute(resp);
|
|
1073
|
-
} else {
|
|
1074
|
-
global.StoragePrintProcessBlock.execute(resp.ID);
|
|
1075
|
-
}
|
|
1076
|
-
return;
|
|
1077
|
-
} else {
|
|
1078
|
-
_message2.default.warn(t('打印小票只能在客户端中执行'));
|
|
1079
|
-
return;
|
|
1080
|
-
}
|
|
1081
|
-
}
|
|
1103
|
+
_this10.handlePrint(resp);
|
|
1082
1104
|
});
|
|
1083
1105
|
}
|
|
1084
1106
|
}, {
|
|
@@ -1087,13 +1109,13 @@ var SettlementStore = (_class = function () {
|
|
|
1087
1109
|
var _ref13 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee3() {
|
|
1088
1110
|
var _this11 = this;
|
|
1089
1111
|
|
|
1090
|
-
var _enumController$
|
|
1112
|
+
var _enumController$getEn14, PayStyle, _ref15, isNewRetailBCPos, IPMSG, RetailTypeEnum;
|
|
1091
1113
|
|
|
1092
1114
|
return _regenerator2.default.wrap(function _callee3$(_context3) {
|
|
1093
1115
|
while (1) {
|
|
1094
1116
|
switch (_context3.prev = _context3.next) {
|
|
1095
1117
|
case 0:
|
|
1096
|
-
_enumController$
|
|
1118
|
+
_enumController$getEn14 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn14.PayStyle;
|
|
1097
1119
|
|
|
1098
1120
|
(0, _mobx.runInAction)(function () {
|
|
1099
1121
|
_this11.dto.RetailPaymentDetails = [];
|
|
@@ -1101,19 +1123,21 @@ var SettlementStore = (_class = function () {
|
|
|
1101
1123
|
_this11.dto.RetailCouponDetails = [];
|
|
1102
1124
|
var czkSum = 0;
|
|
1103
1125
|
var Idmember = _this11.dto.Idmember;
|
|
1126
|
+
var count = 0;
|
|
1104
1127
|
var thePaymodes = _this11.newStyle ? (0, _filter3.default)(_this11.paymode.thePaymodes, function (mode) {
|
|
1105
1128
|
return parseFloat(mode.value) != 0;
|
|
1106
1129
|
}) : _this11.paymode.thePaymodes;
|
|
1107
|
-
(0, _each3.default)(thePaymodes, function (mode) {
|
|
1130
|
+
(0, _each3.default)(thePaymodes, function (mode, index) {
|
|
1108
1131
|
var themode = (0, _find3.default)(_this11.paymode.paymodes, { 'paymentType': mode.paymentType });
|
|
1109
1132
|
if (mode.paymentType == PayStyle.hyczk) {
|
|
1110
1133
|
if (!Idmember) {
|
|
1111
1134
|
Idmember = mode.member.id;
|
|
1112
1135
|
}
|
|
1113
1136
|
czkSum = Math.Add(czkSum, mode.value);
|
|
1114
|
-
|
|
1137
|
+
var MeStorageCardId = mode.member.MeStorageCardId ? mode.member.MeStorageCardId : _this11.member.MeStorageCardId;
|
|
1115
1138
|
_this11.dto.RetailStorageDetails.push({
|
|
1116
1139
|
Code: mode.paymethodId,
|
|
1140
|
+
MeStorageCardId: MeStorageCardId,
|
|
1117
1141
|
StoragePaymentAmount: mode.value,
|
|
1118
1142
|
IsOrigReturn: false,
|
|
1119
1143
|
BalanceStorage: mode.balance,
|
|
@@ -1147,21 +1171,19 @@ var SettlementStore = (_class = function () {
|
|
|
1147
1171
|
DataSource: { Id: _this11.dataSource }
|
|
1148
1172
|
});
|
|
1149
1173
|
if (mode.paymentType == PayStyle.djq) {
|
|
1150
|
-
(0, _each3.default)(mode.djqs, function (djq) {
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
});
|
|
1164
|
-
}
|
|
1174
|
+
(0, _each3.default)(_this11.paymode.checkList && _this11.paymode.checkList.length ? _this11.paymode.checkList : mode.djqs, function (djq) {
|
|
1175
|
+
_this11.dto.RetailCouponDetails.push({
|
|
1176
|
+
CouponCode: djq.promoCouponCode,
|
|
1177
|
+
ReductionAmount: djq.amount,
|
|
1178
|
+
EnableAmount: djq.doorsill,
|
|
1179
|
+
CouponTitle: djq.name,
|
|
1180
|
+
IdMember: djq.UMemberID ? mode.member.id : null,
|
|
1181
|
+
LastTS: djq.LastTS,
|
|
1182
|
+
PromotionId: djq.promoId,
|
|
1183
|
+
PromotionRuleId: djq.promoRuleId,
|
|
1184
|
+
PromoCouponAllocatedId: djq.id,
|
|
1185
|
+
DataSource: { Id: _this11.dataSource }
|
|
1186
|
+
});
|
|
1165
1187
|
});
|
|
1166
1188
|
}
|
|
1167
1189
|
}
|
|
@@ -1173,9 +1195,9 @@ var SettlementStore = (_class = function () {
|
|
|
1173
1195
|
if (_this11.dto.RetailStorageDetails.length > 0) {
|
|
1174
1196
|
var themode = (0, _find3.default)(_this11.paymode.paymodes, { 'paymentType': PayStyle.hyczk });
|
|
1175
1197
|
if (isNewRetailBCPos) {
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
})
|
|
1198
|
+
// this.dto.RetailStorageDetails && this.dto.RetailStorageDetails.forEach((value, index) => {
|
|
1199
|
+
// value.MeStorageCardId = (mode.MeStorageCardId ? mode.MeStorageCardId : this.member.MeStorageCardId);
|
|
1200
|
+
// })
|
|
1179
1201
|
_this11.dto.RetailPaymentDetails.push({
|
|
1180
1202
|
Code: _this11.paymode.counter,
|
|
1181
1203
|
OrigAmount: czkSum,
|
|
@@ -1249,6 +1271,7 @@ var SettlementStore = (_class = function () {
|
|
|
1249
1271
|
|
|
1250
1272
|
return _context3.abrupt('return', (0, _tplusApi.ccApi)({ dto: (0, _extends3.default)({}, this.dto.cut(), { RetailOms: { RetailTypeEnum: RetailTypeEnum } }), cip: IPMSG.query || "" }, '/retail/RetailPos/settle', false, false, { method: 'post', timeout_skip: true }).then(function (resp) {
|
|
1251
1273
|
_this11.setDtoID(resp.ID);
|
|
1274
|
+
_this11.paymode.checkList = [];
|
|
1252
1275
|
_this11.billID = resp.ID;
|
|
1253
1276
|
}));
|
|
1254
1277
|
|
|
@@ -1502,6 +1525,7 @@ var SettlementStore = (_class = function () {
|
|
|
1502
1525
|
}), _applyDecoratedDescriptor(_class.prototype, 'addDjq', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'addDjq'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'changeFocusOnly', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'changeFocusOnly'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'changeClickFocusOnly', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'changeClickFocusOnly'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'changeValue', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'changeValue'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'addPayDirectly', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'addPayDirectly'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'addPay', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'addPay'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'delPay', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'delPay'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'setDtoID', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'setDtoID'), _class.prototype)), _class);
|
|
1503
1526
|
exports.default = SettlementStore;
|
|
1504
1527
|
var PayMode = exports.PayMode = (_class3 = function () {
|
|
1528
|
+
//应收
|
|
1505
1529
|
function PayMode() {
|
|
1506
1530
|
// this.amount=getFixedNumber(amount);
|
|
1507
1531
|
// this.calcReserved();
|
|
@@ -1523,11 +1547,19 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
1523
1547
|
_initDefineProp(this, 'thePaymodes', _descriptor7, this);
|
|
1524
1548
|
|
|
1525
1549
|
this.currentMode = null;
|
|
1550
|
+
this.checkList = [];
|
|
1526
1551
|
this.settle = {
|
|
1527
1552
|
name: "复合结算",
|
|
1528
1553
|
hotKey: "Ctrl+M"
|
|
1529
1554
|
};
|
|
1530
|
-
|
|
1555
|
+
|
|
1556
|
+
_initDefineProp(this, 'calcCheckList', _descriptor8, this);
|
|
1557
|
+
|
|
1558
|
+
_initDefineProp(this, 'setCouponNum', _descriptor9, this);
|
|
1559
|
+
|
|
1560
|
+
_initDefineProp(this, 'addDjqs', _descriptor10, this);
|
|
1561
|
+
}
|
|
1562
|
+
// @observable store = null;
|
|
1531
1563
|
|
|
1532
1564
|
|
|
1533
1565
|
(0, _createClass3.default)(PayMode, [{
|
|
@@ -1562,15 +1594,28 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
1562
1594
|
this.receivable = (0, _utils.getFixedNumber)(this.amount - sum);
|
|
1563
1595
|
}
|
|
1564
1596
|
}, {
|
|
1565
|
-
key: '
|
|
1566
|
-
value: function
|
|
1597
|
+
key: 'calcDjqCheckValue',
|
|
1598
|
+
value: function calcDjqCheckValue(q1, dto, params) {
|
|
1567
1599
|
var _this14 = this;
|
|
1568
1600
|
|
|
1601
|
+
var useLimitPerOrder = (0, _tplusPoslogin.PosInitData)('UseLimitPerOrder');
|
|
1602
|
+
var qList = (0, _filter3.default)(this.currentMode.djqs, function (djq) {
|
|
1603
|
+
return djq.checked;
|
|
1604
|
+
});
|
|
1605
|
+
if (qList.length === useLimitPerOrder && !q1.checked) {
|
|
1606
|
+
_message2.default.warn('本单最多可用' + useLimitPerOrder + '张');
|
|
1607
|
+
return;
|
|
1608
|
+
}
|
|
1609
|
+
if (params === 'single') {
|
|
1610
|
+
this.checkList = [];
|
|
1611
|
+
}
|
|
1612
|
+
|
|
1569
1613
|
var _ref20 = _mutantsUtil.platform || {},
|
|
1570
1614
|
isNewRetailBCPos = _ref20.isNewRetailBCPos;
|
|
1571
1615
|
|
|
1572
|
-
var _enumController$
|
|
1573
|
-
|
|
1616
|
+
var _enumController$getEn15 = _mutantsUtil.enumController.getEnumOj(),
|
|
1617
|
+
PayStyle = _enumController$getEn15.PayStyle,
|
|
1618
|
+
Differentiate = _enumController$getEn15.Differentiate;
|
|
1574
1619
|
|
|
1575
1620
|
if (q1) {
|
|
1576
1621
|
if (!this.currentMode.boriginReturn && parseFloat(this.currentMode.maxamount) <= 0) {
|
|
@@ -1578,22 +1623,185 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
1578
1623
|
return;
|
|
1579
1624
|
}
|
|
1580
1625
|
var q = (0, _find3.default)(this.currentMode.djqs, function (djq) {
|
|
1581
|
-
return djq.
|
|
1626
|
+
return djq.promoCouponCode == q1.promoCouponCode;
|
|
1582
1627
|
});
|
|
1583
1628
|
if (q && !q.checked && parseFloat(this.amount) < parseFloat(q.doorsill)) {
|
|
1584
1629
|
_message2.default.error("本单金额低于使用门槛,该券不可使用。");
|
|
1585
1630
|
return;
|
|
1586
1631
|
}
|
|
1587
1632
|
//判断是否是选择优惠券 //CC优惠券只能使用一个
|
|
1588
|
-
if (q1 && !q1.checked && isNewRetailBCPos) {
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1633
|
+
// if (q1 && !q1.checked && isNewRetailBCPos) {
|
|
1634
|
+
// // 检查是否有已经选定优惠券 并且去除选定的优惠券
|
|
1635
|
+
// this.currentMode.djqs.forEach((djq, index) => {
|
|
1636
|
+
// if (djq.checked) this.currentMode.djqs[index].checked = false;
|
|
1637
|
+
// })
|
|
1638
|
+
// }
|
|
1639
|
+
q && (q.checked = !q.checked);
|
|
1640
|
+
}
|
|
1641
|
+
var sum = 0;
|
|
1642
|
+
// console.log(this.store, 'stores-------');
|
|
1643
|
+
if (!q1.checked) {
|
|
1644
|
+
this.checkList.forEach(function (ele, i) {
|
|
1645
|
+
if (ele.id === q1.id) {
|
|
1646
|
+
_this14.checkList.splice(i, 1);
|
|
1647
|
+
}
|
|
1648
|
+
});
|
|
1649
|
+
} else {
|
|
1650
|
+
this.checkList.push(q1);
|
|
1651
|
+
}
|
|
1652
|
+
|
|
1653
|
+
this.checkList.forEach(function (ele) {
|
|
1654
|
+
sum = Math.Add(sum, ele.amount);
|
|
1655
|
+
});
|
|
1656
|
+
this.currentMode.value = (0, _utils.getFixedNumber)(Math.min(this.receivable, sum, this.currentMode.maxamount));
|
|
1657
|
+
console.log(this.receivable, sum, Math.min(this.receivable, sum, this.currentMode.maxamount), 'sum---------');
|
|
1658
|
+
this.currentMode.receivable = (0, _utils.getFixedNumber)(this.receivable - Math.min(this.receivable, sum, this.currentMode.maxamount));
|
|
1659
|
+
this.currentMode.overchargesAmount = (0, _utils.getFixedNumber)(sum - this.currentMode.value);
|
|
1660
|
+
if (params === 'single') {
|
|
1661
|
+
return;
|
|
1662
|
+
}
|
|
1663
|
+
var promoVoucher = {};
|
|
1664
|
+
promoVoucher.boName = "Retail";
|
|
1665
|
+
// promoVoucher.promoLinks = _filter(this.currentMode.djqs,djq=>djq.checked);
|
|
1666
|
+
promoVoucher.meMemberId = this.currentMode.member.id;
|
|
1667
|
+
promoVoucher.storeFactorId = (0, _tplusPoslogin.PosInitData)('storeID');
|
|
1668
|
+
promoVoucher.voucherDetailList = [];
|
|
1669
|
+
dto.RetailDetails.forEach(function (item) {
|
|
1670
|
+
var detailDTO = {};
|
|
1671
|
+
detailDTO.uuid = item.Code;
|
|
1672
|
+
detailDTO.detailBoName = "RetailDetail";
|
|
1673
|
+
detailDTO.voucherDetailId = item.ID;
|
|
1674
|
+
detailDTO.productId = item.Idinventory;
|
|
1675
|
+
detailDTO.uomId = item.Idunit;
|
|
1676
|
+
detailDTO.productSpecId = item.ProductSpecId;
|
|
1677
|
+
detailDTO.isManualFreeGift = item.IsPresent;
|
|
1678
|
+
detailDTO.isListPriceIncludingTax = item.TaxFlag || true;
|
|
1679
|
+
detailDTO.IsManualChangePrice = item.IsManualChangePrice;
|
|
1680
|
+
if (detailDTO.IsManualChangePrice) //如果是手工改价
|
|
1681
|
+
{
|
|
1682
|
+
detailDTO.listPrice = item.TaxPrice;
|
|
1683
|
+
detailDTO.netAmountWithTax = item.TaxAmount;
|
|
1684
|
+
} else {
|
|
1685
|
+
var bookingQuantity = 0;
|
|
1686
|
+
if (item.BookingQuantity) {
|
|
1687
|
+
bookingQuantity = item.BookingQuantity;
|
|
1688
|
+
}
|
|
1689
|
+
detailDTO.listPrice = item.MemberPrice;
|
|
1690
|
+
detailDTO.netAmountWithTax = Math.Multiply(item.MemberPrice, Math.Minus(item.Quantity, bookingQuantity)); //item.TaxAmount;
|
|
1691
|
+
}
|
|
1692
|
+
detailDTO.taxRate = item.TaxRate;
|
|
1693
|
+
detailDTO.quantity = item.Quantity;
|
|
1694
|
+
|
|
1695
|
+
detailDTO.amountWithTax = item.RetailAmount;
|
|
1696
|
+
// 促销 start
|
|
1697
|
+
if (item.PromotionDetails && item.PromotionDetails.length != 0) {
|
|
1698
|
+
var promoLinks = [];
|
|
1699
|
+
item.PromotionDetails.forEach(function (promotion) {
|
|
1700
|
+
promoLinks.push({
|
|
1701
|
+
promoId: promotion.IdSalesPromotionDTO,
|
|
1702
|
+
promoRuleId: promotion.PromotionRuleId
|
|
1703
|
+
});
|
|
1704
|
+
});
|
|
1705
|
+
if (promoLinks.length != 0) detailDTO.promoLinks = promoLinks;
|
|
1706
|
+
}
|
|
1707
|
+
// 促销 end
|
|
1708
|
+
promoVoucher.voucherDetailList.push(detailDTO);
|
|
1709
|
+
});
|
|
1710
|
+
promoVoucher.promoLinks = this.checkList;
|
|
1711
|
+
return (0, _tplusApi.ccApi)((0, _extends3.default)({}, promoVoucher), 'promotion/PromoCalculate/findUsefulCouponPromoList', false, false, { method: 'post', timeout_skip: true }).then(function (result) {
|
|
1712
|
+
if (result && result.length != 0) {
|
|
1713
|
+
result.forEach(function (element, index) {
|
|
1714
|
+
var djq1 = false;
|
|
1715
|
+
_this14.currentMode.djqs.forEach(function (djq) {
|
|
1716
|
+
if (element.id === djq.id) {
|
|
1717
|
+
djq1 = true;
|
|
1718
|
+
}
|
|
1719
|
+
});
|
|
1720
|
+
|
|
1721
|
+
var _ref21 = element || {},
|
|
1722
|
+
couponCode = _ref21.couponCode,
|
|
1723
|
+
name = _ref21.name,
|
|
1724
|
+
tieredAmountResult = _ref21.tieredAmountResult,
|
|
1725
|
+
fromDate = _ref21.fromDate,
|
|
1726
|
+
dateMount = _ref21.dateMount,
|
|
1727
|
+
promoMethodEnum = _ref21.promoMethodEnum,
|
|
1728
|
+
discountPct = _ref21.discountPct,
|
|
1729
|
+
nominalAmount = _ref21.nominalAmount,
|
|
1730
|
+
promoId = _ref21.promoId,
|
|
1731
|
+
id = _ref21.id,
|
|
1732
|
+
doorsill = _ref21.doorsill;
|
|
1733
|
+
|
|
1734
|
+
var condValue = tieredAmountResult.condValue,
|
|
1735
|
+
promoDiscount = tieredAmountResult.promoDiscount,
|
|
1736
|
+
displayText = tieredAmountResult.displayText,
|
|
1737
|
+
promoRuleId = tieredAmountResult.promoRuleId,
|
|
1738
|
+
couponCategoryEnum = tieredAmountResult.couponCategoryEnum;
|
|
1739
|
+
|
|
1740
|
+
if (!djq1) {
|
|
1741
|
+
// this.currentMode.djqs.push({
|
|
1742
|
+
// promoCouponCode: element.CouponCode,
|
|
1743
|
+
// name: element.CouponTitle,
|
|
1744
|
+
// IsEnable: true,
|
|
1745
|
+
// amount: element.ReductionAmount,
|
|
1746
|
+
// doorsill: element.EnableAmount,
|
|
1747
|
+
// LastTS: element.LastTS,
|
|
1748
|
+
// checked: false,
|
|
1749
|
+
// IsRepelWithPoints: true,
|
|
1750
|
+
// UMemberID: dto.Idmember,
|
|
1751
|
+
// expired: null,
|
|
1752
|
+
// displayText,
|
|
1753
|
+
// promoMethodEnum,
|
|
1754
|
+
// discountPct,
|
|
1755
|
+
// promoId,
|
|
1756
|
+
// promoRuleId,
|
|
1757
|
+
// couponCategoryEnum: tieredAmountResult.couponCategoryEnum,
|
|
1758
|
+
// id
|
|
1759
|
+
// })
|
|
1760
|
+
_this14.addDjqs(couponCode, name, true, nominalAmount, doorsill, element.LastTS, false, true, dto.Idmember, dateMount, displayText, promoMethodEnum, discountPct, promoId, promoRuleId, tieredAmountResult.couponCategoryEnum, id);
|
|
1761
|
+
djq1 = false;
|
|
1762
|
+
} else {
|
|
1763
|
+
_this14.setCouponNum(element.id, tieredAmountResult.couponCategoryEnum, promoMethodEnum, nominalAmount, promoDiscount);
|
|
1764
|
+
// this.currentMode.djqs[0].couponCategoryEnum = 'couponCategoryEnum';
|
|
1765
|
+
// djq1.couponCategoryEnum = element.tieredAmountResult.couponCategoryEnum
|
|
1766
|
+
}
|
|
1592
1767
|
});
|
|
1593
1768
|
}
|
|
1769
|
+
// 优惠券【6052098985043】与【6120822326451】不可叠加使用
|
|
1770
|
+
});
|
|
1771
|
+
//this.receivable = getFixedNumber(this.receivable - sum);
|
|
1772
|
+
}
|
|
1773
|
+
}, {
|
|
1774
|
+
key: 'calcDjqValue',
|
|
1775
|
+
value: function calcDjqValue(q1) {
|
|
1776
|
+
var _ref22 = _mutantsUtil.platform || {},
|
|
1777
|
+
isNewRetailBCPos = _ref22.isNewRetailBCPos;
|
|
1778
|
+
|
|
1779
|
+
var _enumController$getEn16 = _mutantsUtil.enumController.getEnumOj(),
|
|
1780
|
+
Differentiate = _enumController$getEn16.Differentiate;
|
|
1781
|
+
|
|
1782
|
+
if (q1) {
|
|
1783
|
+
if (!this.currentMode.boriginReturn && parseFloat(this.currentMode.maxamount) <= 0) {
|
|
1784
|
+
_message2.default.error('\u672C\u5355\u6CA1\u6709' + Differentiate.COUPON + '\u53EF\u7528\u91D1\u989D\uFF0C\u8BE5\u5238\u4E0D\u53EF\u4F7F\u7528\u3002');
|
|
1785
|
+
return;
|
|
1786
|
+
}
|
|
1787
|
+
var q = (0, _find3.default)(this.currentMode.djqs, function (djq) {
|
|
1788
|
+
return djq.code == q1.code;
|
|
1789
|
+
});
|
|
1790
|
+
if (q && !q.checked && parseFloat(this.amount) < parseFloat(q.doorsill)) {
|
|
1791
|
+
_message2.default.error("本单金额低于使用门槛,该券不可使用。");
|
|
1792
|
+
return;
|
|
1793
|
+
}
|
|
1794
|
+
//判断是否是选择优惠券 //CC优惠券只能使用一个
|
|
1795
|
+
// if (q1 && !q1.checked && isNewRetailBCPos) {
|
|
1796
|
+
// // 检查是否有已经选定优惠券 并且去除选定的优惠券
|
|
1797
|
+
// this.currentMode.djqs.forEach((djq, index) => {
|
|
1798
|
+
// if (djq.checked) this.currentMode.djqs[index].checked = false;
|
|
1799
|
+
// })
|
|
1800
|
+
// }
|
|
1594
1801
|
q && (q.checked = !q.checked);
|
|
1595
1802
|
}
|
|
1596
1803
|
var sum = 0;
|
|
1804
|
+
// console.log(this.store, 'stores-------');
|
|
1597
1805
|
(0, _each3.default)((0, _filter3.default)(this.currentMode.djqs, function (djq) {
|
|
1598
1806
|
return djq.checked;
|
|
1599
1807
|
}), function (q) {
|
|
@@ -1602,6 +1810,7 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
1602
1810
|
this.currentMode.value = (0, _utils.getFixedNumber)(Math.min(this.receivable, sum, this.currentMode.maxamount));
|
|
1603
1811
|
this.currentMode.receivable = (0, _utils.getFixedNumber)(this.receivable - this.currentMode.value);
|
|
1604
1812
|
this.currentMode.overchargesAmount = (0, _utils.getFixedNumber)(sum - this.currentMode.value);
|
|
1813
|
+
|
|
1605
1814
|
//this.receivable = getFixedNumber(this.receivable - sum);
|
|
1606
1815
|
}
|
|
1607
1816
|
}, {
|
|
@@ -1628,9 +1837,20 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
1628
1837
|
value: function setCurrentModeValue(v, max) {
|
|
1629
1838
|
this.currentMode.value = parseFloat(v) || 0;
|
|
1630
1839
|
this.currentMode.errinfo = '';
|
|
1840
|
+
var sum = this.amount;
|
|
1841
|
+
|
|
1842
|
+
var _enumController$getEn17 = _mutantsUtil.enumController.getEnumOj(),
|
|
1843
|
+
PayStyle = _enumController$getEn17.PayStyle;
|
|
1844
|
+
|
|
1845
|
+
this.paymodes.thePaymodes && this.paymodes.thePaymodes.forEach(function (mode) {
|
|
1846
|
+
if (mode.paymentType === PayStyle.hyczk) {
|
|
1847
|
+
sum -= mode.value;
|
|
1848
|
+
}
|
|
1849
|
+
});
|
|
1850
|
+
|
|
1631
1851
|
if (this.amount > 0 && (v === '' || v === '0.00')) {
|
|
1632
1852
|
this.currentMode.errinfo = "实收金额必须录入";
|
|
1633
|
-
} else if (Math.abs(parseFloat(v)) > Math.abs(
|
|
1853
|
+
} else if (Math.abs(parseFloat(v)) > Math.abs(sum)) {
|
|
1634
1854
|
this.currentMode.errinfo = "实收不应大于应收";
|
|
1635
1855
|
} else if (parseFloat(v) > 0 && parseFloat(v) > (max || 0)) {
|
|
1636
1856
|
this.currentMode.errinfo = "余额不足";
|
|
@@ -1644,16 +1864,16 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
1644
1864
|
}, {
|
|
1645
1865
|
key: 'setPaymodes',
|
|
1646
1866
|
value: function () {
|
|
1647
|
-
var
|
|
1867
|
+
var _ref23 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee7(type, isIntegralExchange) {
|
|
1648
1868
|
var _this15 = this;
|
|
1649
1869
|
|
|
1650
|
-
var _enumController$
|
|
1870
|
+
var _enumController$getEn18, settleStyleType, PayStyle, memberStoreCode, settlementCode, param, modes;
|
|
1651
1871
|
|
|
1652
1872
|
return _regenerator2.default.wrap(function _callee7$(_context7) {
|
|
1653
1873
|
while (1) {
|
|
1654
1874
|
switch (_context7.prev = _context7.next) {
|
|
1655
1875
|
case 0:
|
|
1656
|
-
_enumController$
|
|
1876
|
+
_enumController$getEn18 = _mutantsUtil.enumController.getEnumOj(), settleStyleType = _enumController$getEn18.settleStyleType, PayStyle = _enumController$getEn18.PayStyle;
|
|
1657
1877
|
memberStoreCode = settleStyleType.memberStoreCode, settlementCode = settleStyleType.settlementCode;
|
|
1658
1878
|
param = { 'settleStyleType': type == 1 ? memberStoreCode : settlementCode, isIntegralExchange: isIntegralExchange };
|
|
1659
1879
|
_context7.next = 5;
|
|
@@ -1677,6 +1897,7 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
1677
1897
|
isQuick: (0, _findIndex3.default)(modes.QuickSettleStyles, { 'Code': mode.Code }) >= 0,
|
|
1678
1898
|
orderBy: 1,
|
|
1679
1899
|
paymentType: mode.Code,
|
|
1900
|
+
offlineDisable: mode.offlineDisable,
|
|
1680
1901
|
idSettleStyle: mode.IdSettleStyle,
|
|
1681
1902
|
idBankAccount: mode.IdBankAccount,
|
|
1682
1903
|
exchangeRate: mode.Currency ? mode.Currency.ExchangeRate : 1,
|
|
@@ -1698,7 +1919,7 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
1698
1919
|
}));
|
|
1699
1920
|
|
|
1700
1921
|
function setPaymodes(_x5, _x6) {
|
|
1701
|
-
return
|
|
1922
|
+
return _ref23.apply(this, arguments);
|
|
1702
1923
|
}
|
|
1703
1924
|
|
|
1704
1925
|
return setPaymodes;
|
|
@@ -1740,22 +1961,75 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
1740
1961
|
initializer: function initializer() {
|
|
1741
1962
|
return [];
|
|
1742
1963
|
}
|
|
1743
|
-
}), _applyDecoratedDescriptor(_class3.prototype, 'clean', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class3.prototype, 'clean'), _class3.prototype), _applyDecoratedDescriptor(_class3.prototype, 'clear', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class3.prototype, 'clear'), _class3.prototype), _applyDecoratedDescriptor(_class3.prototype, 'calcReserved', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class3.prototype, 'calcReserved'), _class3.prototype),
|
|
1964
|
+
}), _applyDecoratedDescriptor(_class3.prototype, 'clean', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class3.prototype, 'clean'), _class3.prototype), _applyDecoratedDescriptor(_class3.prototype, 'clear', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class3.prototype, 'clear'), _class3.prototype), _applyDecoratedDescriptor(_class3.prototype, 'calcReserved', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class3.prototype, 'calcReserved'), _class3.prototype), _descriptor8 = _applyDecoratedDescriptor(_class3.prototype, 'calcCheckList', [_mobx.action], {
|
|
1965
|
+
enumerable: true,
|
|
1966
|
+
initializer: function initializer() {
|
|
1967
|
+
var _this16 = this;
|
|
1968
|
+
|
|
1969
|
+
return function () {
|
|
1970
|
+
_this16.checkList = [];
|
|
1971
|
+
};
|
|
1972
|
+
}
|
|
1973
|
+
}), _applyDecoratedDescriptor(_class3.prototype, 'calcDjqCheckValue', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class3.prototype, 'calcDjqCheckValue'), _class3.prototype), _descriptor9 = _applyDecoratedDescriptor(_class3.prototype, 'setCouponNum', [_mobx.action], {
|
|
1974
|
+
enumerable: true,
|
|
1975
|
+
initializer: function initializer() {
|
|
1976
|
+
var _this17 = this;
|
|
1977
|
+
|
|
1978
|
+
return function (id, couponNum, promoMethodEnum, nominalAmount, promoDiscount) {
|
|
1979
|
+
_this17.currentMode.djqs.forEach(function (ele) {
|
|
1980
|
+
if (ele.id === id) {
|
|
1981
|
+
promoMethodEnum == "CASH_COUPON" ? ele.amount = nominalAmount : ele.amount = promoDiscount;
|
|
1982
|
+
ele.couponCategoryEnum = couponNum;
|
|
1983
|
+
var IsEnable = ele.couponCategoryEnum === 'RIGUP' || ele.couponCategoryEnum === 'UN_MATCH' || ele.couponCategoryEnum === "PREPARING" || ele.couponCategoryEnum === 'PROMO_LIMITED' || ele.couponCategoryEnum === 'COUPON_CONFLICT' ? false : true;
|
|
1984
|
+
ele.IsEnable = IsEnable;
|
|
1985
|
+
}
|
|
1986
|
+
});
|
|
1987
|
+
};
|
|
1988
|
+
}
|
|
1989
|
+
}), _descriptor10 = _applyDecoratedDescriptor(_class3.prototype, 'addDjqs', [_mobx.action], {
|
|
1990
|
+
enumerable: true,
|
|
1991
|
+
initializer: function initializer() {
|
|
1992
|
+
var _this18 = this;
|
|
1993
|
+
|
|
1994
|
+
return function (promoCouponCode, name, IsEnable, amount, doorsill, LastTS, checked, IsRepelWithPoints, UMemberID, expired, displayText, promoMethodEnum, discountPct, promoId, promoRuleId, couponCategoryEnum, id) {
|
|
1995
|
+
var djq = {
|
|
1996
|
+
promoCouponCode: promoCouponCode,
|
|
1997
|
+
name: name,
|
|
1998
|
+
IsEnable: IsEnable,
|
|
1999
|
+
amount: amount,
|
|
2000
|
+
doorsill: doorsill,
|
|
2001
|
+
LastTS: LastTS,
|
|
2002
|
+
checked: checked,
|
|
2003
|
+
IsRepelWithPoints: IsRepelWithPoints,
|
|
2004
|
+
UMemberID: UMemberID,
|
|
2005
|
+
expired: expired,
|
|
2006
|
+
displayText: displayText,
|
|
2007
|
+
promoMethodEnum: promoMethodEnum,
|
|
2008
|
+
discountPct: discountPct,
|
|
2009
|
+
promoId: promoId,
|
|
2010
|
+
promoRuleId: promoRuleId,
|
|
2011
|
+
couponCategoryEnum: couponCategoryEnum,
|
|
2012
|
+
id: id
|
|
2013
|
+
};
|
|
2014
|
+
_this18.currentMode.djqs.push(djq);
|
|
2015
|
+
};
|
|
2016
|
+
}
|
|
2017
|
+
}), _applyDecoratedDescriptor(_class3.prototype, 'calcDjqValue', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class3.prototype, 'calcDjqValue'), _class3.prototype), _applyDecoratedDescriptor(_class3.prototype, 'reCalculationDjqs', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class3.prototype, 'reCalculationDjqs'), _class3.prototype), _applyDecoratedDescriptor(_class3.prototype, 'clearDjqs', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class3.prototype, 'clearDjqs'), _class3.prototype), _applyDecoratedDescriptor(_class3.prototype, 'setCurrentModeValue', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class3.prototype, 'setCurrentModeValue'), _class3.prototype), _applyDecoratedDescriptor(_class3.prototype, 'calcMemberBalance', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class3.prototype, 'calcMemberBalance'), _class3.prototype)), _class3);
|
|
1744
2018
|
var Member = exports.Member = (_class5 = function () {
|
|
1745
2019
|
function Member(m) {
|
|
1746
|
-
var
|
|
2020
|
+
var _this19 = this;
|
|
1747
2021
|
|
|
1748
2022
|
(0, _classCallCheck3.default)(this, Member);
|
|
1749
2023
|
|
|
1750
|
-
_initDefineProp(this, 'cardNo',
|
|
2024
|
+
_initDefineProp(this, 'cardNo', _descriptor11, this);
|
|
1751
2025
|
|
|
1752
|
-
_initDefineProp(this, 'balance',
|
|
2026
|
+
_initDefineProp(this, 'balance', _descriptor12, this);
|
|
1753
2027
|
|
|
1754
|
-
_initDefineProp(this, 'exchangable',
|
|
2028
|
+
_initDefineProp(this, 'exchangable', _descriptor13, this);
|
|
1755
2029
|
|
|
1756
|
-
_initDefineProp(this, '
|
|
2030
|
+
_initDefineProp(this, 'MeStorageCardId', _descriptor14, this);
|
|
1757
2031
|
|
|
1758
|
-
_initDefineProp(this, 'StorageCardNo',
|
|
2032
|
+
_initDefineProp(this, 'StorageCardNo', _descriptor15, this);
|
|
1759
2033
|
|
|
1760
2034
|
if (m) {
|
|
1761
2035
|
this.id = m.ID;
|
|
@@ -1766,16 +2040,17 @@ var Member = exports.Member = (_class5 = function () {
|
|
|
1766
2040
|
return key == 'canusedbalancestorage';
|
|
1767
2041
|
});
|
|
1768
2042
|
|
|
1769
|
-
var
|
|
1770
|
-
isNewRetailBCPos =
|
|
2043
|
+
var _ref24 = _mutantsUtil.platform || {},
|
|
2044
|
+
isNewRetailBCPos = _ref24.isNewRetailBCPos;
|
|
1771
2045
|
|
|
1772
2046
|
m.StorageCardNo && (this.StorageCardNo = m.StorageCardNo);
|
|
2047
|
+
m.MeStorageCardId && (this.MeStorageCardId = m.MeStorageCardId);
|
|
1773
2048
|
(0, _mobx.runInAction)(function () {
|
|
1774
|
-
|
|
2049
|
+
_this19.cardNo = m.CardCode;
|
|
1775
2050
|
if (index >= 0) {
|
|
1776
|
-
|
|
2051
|
+
_this19.balance = parseFloat(m.DynamicPropertyValues[index]);
|
|
1777
2052
|
} else {
|
|
1778
|
-
|
|
2053
|
+
_this19.balance = _this19.rawbalance;
|
|
1779
2054
|
}
|
|
1780
2055
|
});
|
|
1781
2056
|
this.needPwd = m.MemberType ? m.MemberType.IsNeedPwd : false;
|
|
@@ -1798,7 +2073,7 @@ var Member = exports.Member = (_class5 = function () {
|
|
|
1798
2073
|
}, {
|
|
1799
2074
|
key: 'setMeStorageCardId',
|
|
1800
2075
|
value: function setMeStorageCardId(v) {
|
|
1801
|
-
this.
|
|
2076
|
+
this.MeStorageCardId = v;
|
|
1802
2077
|
}
|
|
1803
2078
|
}, {
|
|
1804
2079
|
key: 'setStorageCardNo',
|
|
@@ -1807,19 +2082,19 @@ var Member = exports.Member = (_class5 = function () {
|
|
|
1807
2082
|
}
|
|
1808
2083
|
}]);
|
|
1809
2084
|
return Member;
|
|
1810
|
-
}(), (
|
|
2085
|
+
}(), (_descriptor11 = _applyDecoratedDescriptor(_class5.prototype, 'cardNo', [_mobx.observable], {
|
|
1811
2086
|
enumerable: true,
|
|
1812
2087
|
initializer: null
|
|
1813
|
-
}),
|
|
2088
|
+
}), _descriptor12 = _applyDecoratedDescriptor(_class5.prototype, 'balance', [_mobx.observable], {
|
|
1814
2089
|
enumerable: true,
|
|
1815
2090
|
initializer: null
|
|
1816
|
-
}),
|
|
2091
|
+
}), _descriptor13 = _applyDecoratedDescriptor(_class5.prototype, 'exchangable', [_mobx.observable], {
|
|
1817
2092
|
enumerable: true,
|
|
1818
2093
|
initializer: null
|
|
1819
|
-
}),
|
|
2094
|
+
}), _descriptor14 = _applyDecoratedDescriptor(_class5.prototype, 'MeStorageCardId', [_mobx.observable], {
|
|
1820
2095
|
enumerable: true,
|
|
1821
2096
|
initializer: null
|
|
1822
|
-
}),
|
|
2097
|
+
}), _descriptor15 = _applyDecoratedDescriptor(_class5.prototype, 'StorageCardNo', [_mobx.observable], {
|
|
1823
2098
|
enumerable: true,
|
|
1824
2099
|
initializer: null
|
|
1825
2100
|
}), _applyDecoratedDescriptor(_class5.prototype, 'setExchangable', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class5.prototype, 'setExchangable'), _class5.prototype), _applyDecoratedDescriptor(_class5.prototype, 'setCardNo', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class5.prototype, 'setCardNo'), _class5.prototype), _applyDecoratedDescriptor(_class5.prototype, 'setMeStorageCardId', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class5.prototype, 'setMeStorageCardId'), _class5.prototype), _applyDecoratedDescriptor(_class5.prototype, 'setStorageCardNo', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class5.prototype, 'setStorageCardNo'), _class5.prototype)), _class5);
|