tplus-components-touch 3.33.15 → 3.36.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/billSearch/index.js +19 -157
- package/dist/components/billSearch/index.js.map +1 -1
- package/dist/components/billSearch/index.less +3 -6
- package/dist/components/cloudPrint/api.js +43 -85
- package/dist/components/cloudPrint/api.js.map +1 -1
- package/dist/components/cloudPrint/printDispatch.js +108 -211
- package/dist/components/cloudPrint/printDispatch.js.map +1 -1
- package/dist/components/deliverySearch/index.js +1 -1
- package/dist/components/deliverySearch/index.js.map +1 -1
- package/dist/components/hotKey/localConfig.js +14 -133
- package/dist/components/hotKey/localConfig.js.map +1 -1
- package/dist/components/inventorySearch/tab.js +67 -77
- package/dist/components/inventorySearch/tab.js.map +1 -1
- package/dist/components/keyboard/numberButton_input.js +2 -4
- package/dist/components/keyboard/numberButton_input.js.map +1 -1
- package/dist/components/keyboard/onlyLetterButton2.less +40 -35
- package/dist/components/loading/loadingContent.js +1 -1
- package/dist/components/loading/loadingContent.js.map +1 -1
- package/dist/components/loading/style.less +7 -7
- package/dist/components/modalWraper/index.js +1 -1
- package/dist/components/modalWraper/index.js.map +1 -1
- package/dist/components/progressState/EmptyAndErrorView.js +3 -4
- package/dist/components/progressState/EmptyAndErrorView.js.map +1 -1
- package/dist/components/progressState/ProgressState.js +1 -2
- package/dist/components/progressState/ProgressState.js.map +1 -1
- package/dist/components/settlement/settlement.js +494 -750
- package/dist/components/settlement/settlement.js.map +1 -1
- package/dist/components/settlement/settlement.less +10 -101
- package/dist/components/settlement/settlementStore.js +462 -1068
- package/dist/components/settlement/settlementStore.js.map +1 -1
- package/dist/components/ticon/iconfont/demo.css +539 -539
- package/dist/components/ticon/iconfont/demo_index.html +3 -49
- package/dist/components/ticon/iconfont/iconfont.css +3 -11
- package/dist/components/ticon/iconfont/iconfont.js +6 -6
- package/dist/components/ticon/iconfont/iconfont.js.map +1 -1
- package/dist/components/ticon/iconfont/iconfont.json +0 -14
- 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/touchScroll/index.js +2 -6
- package/dist/components/touchScroll/index.js.map +1 -1
- package/dist/components/touchTable/index.js +4 -5
- package/dist/components/touchTable/index.js.map +1 -1
- package/dist/components/touchTable/index.less +13 -20
- package/dist/index.js +2 -14
- package/dist/index.js.map +1 -1
- package/package.json +35 -35
- package/dist/components/settlement/moreCzkTable/index.js +0 -156
- package/dist/components/settlement/moreCzkTable/index.js.map +0 -1
- package/dist/components/settlement/moreCzkTable/style.less +0 -7
|
@@ -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,
|
|
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
|
|
|
@@ -168,7 +168,6 @@ var SettlementStore = (_class = function () {
|
|
|
168
168
|
(0, _classCallCheck3.default)(this, SettlementStore);
|
|
169
169
|
this.paymode = null;
|
|
170
170
|
this.dto = null;
|
|
171
|
-
this.dtoParams = null;
|
|
172
171
|
this.member = null;
|
|
173
172
|
this.brefund = false;
|
|
174
173
|
this.bquick = false;
|
|
@@ -179,46 +178,6 @@ var SettlementStore = (_class = function () {
|
|
|
179
178
|
|
|
180
179
|
_initDefineProp(this, 'updateMemberInfo', _descriptor2, this);
|
|
181
180
|
|
|
182
|
-
_initDefineProp(this, 'updateCurrentMode', _descriptor3, this);
|
|
183
|
-
|
|
184
|
-
_initDefineProp(this, 'updateCardInfo', _descriptor4, this);
|
|
185
|
-
|
|
186
|
-
this.handleCzkData = function (m) {
|
|
187
|
-
if (!m || !m.StorageCardNo) {
|
|
188
|
-
(0, _mobx.runInAction)(function () {
|
|
189
|
-
_this2.paymode.currentMode.errinfo = "无效的会员卡号";
|
|
190
|
-
});
|
|
191
|
-
} else {
|
|
192
|
-
(0, _mobx.runInAction)(function () {
|
|
193
|
-
_this2.paymode.currentMode.errinfo = "";
|
|
194
|
-
_this2.paymode.currentMode.memberId = m.ID;
|
|
195
|
-
_this2.paymode.currentMode.value = (0, _utils.getFixedNumber)(_this2.brefund ? _this2.paymode.receivable : Math.max(_this2.paymode.receivable, 0));
|
|
196
|
-
_this2.updateEvent();
|
|
197
|
-
var message = '';
|
|
198
|
-
var sum = (0, _reduce3.default)(_this2.paymode.thePaymodes, function (total, cur) {
|
|
199
|
-
return total + cur.value;
|
|
200
|
-
}, 0);
|
|
201
|
-
// 对于卡不用判断会员的一些信息
|
|
202
|
-
// if (global.CheckMemberStorageProcessorBlock ) {
|
|
203
|
-
// message= CheckMemberStorageProcessorBlock.execute(m);
|
|
204
|
-
// }
|
|
205
|
-
if (!String.isNullOrEmpty(message)) {
|
|
206
|
-
_this2.paymode.currentMode.errinfo = message;
|
|
207
|
-
} else if (_this2.checkReceived(_this2.paymode.currentMode, "balance")) {
|
|
208
|
-
_this2.paymode.currentMode.errinfo = "余额不足";
|
|
209
|
-
} else if (_this2.paymode.amount > 0 && parseFloat(_this2.paymode.amount) !== sum && _this2.paymode.currentMode.value == 0) {
|
|
210
|
-
_this2.paymode.currentMode.errinfo = "实收金额必须录入";
|
|
211
|
-
} else {
|
|
212
|
-
// 查询成功后将焦点移入下一个输入框
|
|
213
|
-
setTimeout(function () {
|
|
214
|
-
var nextInput = document.querySelector('.czk .received .input');
|
|
215
|
-
nextInput && nextInput.select();
|
|
216
|
-
}, 300);
|
|
217
|
-
}
|
|
218
|
-
});
|
|
219
|
-
}
|
|
220
|
-
};
|
|
221
|
-
|
|
222
181
|
this.getCouponList = function (coupon_code) {
|
|
223
182
|
var _enumController$getEn = _mutantsUtil.enumController.getEnumOj(),
|
|
224
183
|
PayStyle = _enumController$getEn.PayStyle,
|
|
@@ -234,6 +193,8 @@ var SettlementStore = (_class = function () {
|
|
|
234
193
|
var promoVoucher = {};
|
|
235
194
|
_this2.paymode.clearDjqs();
|
|
236
195
|
_this2.paymode.reCalculationDjqs();
|
|
196
|
+
// promoVoucher.bizDate = dto.VoucherDate;
|
|
197
|
+
// promoVoucher.bizDate = new Date().getTime();
|
|
237
198
|
promoVoucher.coupon_code = coupon_code || "";
|
|
238
199
|
promoVoucher.boName = "Retail";
|
|
239
200
|
promoVoucher.voucherId = dto.ID;
|
|
@@ -320,7 +281,11 @@ var SettlementStore = (_class = function () {
|
|
|
320
281
|
_message2.default.error(Differentiate.COUPON + '\uFF08' + result.SN + '\uFF09\u4E0D\u53EF\u4E0E\u79EF\u5206\u4E00\u8D77\u4F7F\u7528');
|
|
321
282
|
} else {
|
|
322
283
|
var IsEnable = couponCategoryEnum === 'RIGUP' || couponCategoryEnum === 'UN_MATCH' || couponCategoryEnum === "PREPARING" || couponCategoryEnum === 'PROMO_LIMITED' || couponCategoryEnum === 'COUPON_CONFLICT' ? false : true;
|
|
323
|
-
|
|
284
|
+
|
|
285
|
+
var _ref2 = _mutantsUtil.platform || {},
|
|
286
|
+
isNewRetailBCPos = _ref2.isNewRetailBCPos;
|
|
287
|
+
|
|
288
|
+
_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);
|
|
324
289
|
}
|
|
325
290
|
});
|
|
326
291
|
if (promoVoucher.coupon_code) {
|
|
@@ -343,14 +308,14 @@ var SettlementStore = (_class = function () {
|
|
|
343
308
|
};
|
|
344
309
|
|
|
345
310
|
this.checkCoupon = function () {
|
|
346
|
-
var
|
|
347
|
-
var
|
|
311
|
+
var _ref3 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee(sn) {
|
|
312
|
+
var _ref4, isNewRetailBCPos, _enumController$getEn3, PayStyle, Differentiate;
|
|
348
313
|
|
|
349
314
|
return _regenerator2.default.wrap(function _callee$(_context) {
|
|
350
315
|
while (1) {
|
|
351
316
|
switch (_context.prev = _context.next) {
|
|
352
317
|
case 0:
|
|
353
|
-
|
|
318
|
+
_ref4 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref4.isNewRetailBCPos;
|
|
354
319
|
|
|
355
320
|
if (!isNewRetailBCPos) {
|
|
356
321
|
_context.next = 7;
|
|
@@ -418,56 +383,10 @@ var SettlementStore = (_class = function () {
|
|
|
418
383
|
}));
|
|
419
384
|
|
|
420
385
|
return function (_x) {
|
|
421
|
-
return
|
|
386
|
+
return _ref3.apply(this, arguments);
|
|
422
387
|
};
|
|
423
388
|
}();
|
|
424
389
|
|
|
425
|
-
this.repeatStorageModal = function (content) {
|
|
426
|
-
return new _promise2.default(function (resolve, reject) {
|
|
427
|
-
_tplusComponentsTouch.ModalWraper.confirm({
|
|
428
|
-
title: '',
|
|
429
|
-
okText: '继续储值',
|
|
430
|
-
className: 'repeat-modal',
|
|
431
|
-
zIndex: 1007,
|
|
432
|
-
content: content,
|
|
433
|
-
onOk: function () {
|
|
434
|
-
var _ref4 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2() {
|
|
435
|
-
var ret;
|
|
436
|
-
return _regenerator2.default.wrap(function _callee2$(_context2) {
|
|
437
|
-
while (1) {
|
|
438
|
-
switch (_context2.prev = _context2.next) {
|
|
439
|
-
case 0:
|
|
440
|
-
_context2.next = 2;
|
|
441
|
-
return _this2.saveMember();
|
|
442
|
-
|
|
443
|
-
case 2:
|
|
444
|
-
ret = _context2.sent;
|
|
445
|
-
|
|
446
|
-
if (ret === false) {
|
|
447
|
-
resolve(false);
|
|
448
|
-
} else {
|
|
449
|
-
resolve(true);
|
|
450
|
-
}
|
|
451
|
-
|
|
452
|
-
case 4:
|
|
453
|
-
case 'end':
|
|
454
|
-
return _context2.stop();
|
|
455
|
-
}
|
|
456
|
-
}
|
|
457
|
-
}, _callee2, _this2);
|
|
458
|
-
}));
|
|
459
|
-
|
|
460
|
-
return function onOk() {
|
|
461
|
-
return _ref4.apply(this, arguments);
|
|
462
|
-
};
|
|
463
|
-
}(),
|
|
464
|
-
onCancel: function onCancel() {
|
|
465
|
-
resolve(false);
|
|
466
|
-
}
|
|
467
|
-
});
|
|
468
|
-
});
|
|
469
|
-
};
|
|
470
|
-
|
|
471
390
|
this.checkIntegralExchangeReturn = function (id) {
|
|
472
391
|
return new _promise2.default(function (resolve, reject) {
|
|
473
392
|
(0, _tplusApi.tApi)({ param: { refVoucherId: id } }, 'chanjet.RE.NewPos.GetNewIntegralExchange', false, false, { timeout_skip: true }).then(function (resp) {
|
|
@@ -506,7 +425,7 @@ var SettlementStore = (_class = function () {
|
|
|
506
425
|
}
|
|
507
426
|
}, {
|
|
508
427
|
key: 'init',
|
|
509
|
-
value: function init(context, amounthandler, datasource, storeinfo, bquick, amount, type, data
|
|
428
|
+
value: function init(context, amounthandler, datasource, storeinfo, bquick, amount, type, data) {
|
|
510
429
|
var _this3 = this;
|
|
511
430
|
|
|
512
431
|
this.newStyle = _mutantsMicrofx.localStore && _mutantsMicrofx.localStore.get('voucherDefaultPosMode') == 'voucher';
|
|
@@ -522,15 +441,9 @@ var SettlementStore = (_class = function () {
|
|
|
522
441
|
if (global.DealSingleRowAmountSettingProcessorBlock) {
|
|
523
442
|
global.DealSingleRowAmountSettingProcessorBlock.execute(_this3.dto);
|
|
524
443
|
}
|
|
525
|
-
|
|
526
|
-
var _enumController$getEn4 = _mutantsUtil.enumController.getEnumOj(),
|
|
527
|
-
PayStyle = _enumController$getEn4.PayStyle;
|
|
528
|
-
|
|
529
|
-
var isQuickCash = bquick && payModeKey == PayStyle.xianjin;
|
|
530
|
-
|
|
531
444
|
// 成交金额抹零
|
|
532
445
|
if (global.DealAmountSettingProcessorBlock) {
|
|
533
|
-
global.DealAmountSettingProcessorBlock.execute(_this3.dto
|
|
446
|
+
global.DealAmountSettingProcessorBlock.execute(_this3.dto);
|
|
534
447
|
}
|
|
535
448
|
});
|
|
536
449
|
// this.member=context.stores && context.stores.memberStore && context.stores.memberStore.member;
|
|
@@ -580,8 +493,8 @@ var SettlementStore = (_class = function () {
|
|
|
580
493
|
value: function initByOriginReturn() {
|
|
581
494
|
var _this5 = this;
|
|
582
495
|
|
|
583
|
-
var _enumController$
|
|
584
|
-
PayStyle = _enumController$
|
|
496
|
+
var _enumController$getEn4 = _mutantsUtil.enumController.getEnumOj(),
|
|
497
|
+
PayStyle = _enumController$getEn4.PayStyle;
|
|
585
498
|
|
|
586
499
|
var _ref5 = _mutantsUtil.platform || {},
|
|
587
500
|
isNewRetailBCPos = _ref5.isNewRetailBCPos;
|
|
@@ -603,8 +516,7 @@ var SettlementStore = (_class = function () {
|
|
|
603
516
|
authCode: detail.PaymentCode,
|
|
604
517
|
steadCashIntegral: detail.SteadCashIntegral,
|
|
605
518
|
overchargesAmount: detail.OverchargesAmount,
|
|
606
|
-
boriginReturn: true
|
|
607
|
-
thirdPaymentReturnInfo: detail.ThirdPaymentReturnInfo
|
|
519
|
+
boriginReturn: true
|
|
608
520
|
});
|
|
609
521
|
_this5.paymode.currentMode = newmode;
|
|
610
522
|
if (themode.paymentType == PayStyle.djq) {
|
|
@@ -619,33 +531,23 @@ var SettlementStore = (_class = function () {
|
|
|
619
531
|
promoId = _ref6.promoId,
|
|
620
532
|
id = _ref6.id;
|
|
621
533
|
|
|
622
|
-
_this5.addDjq(djq.CouponCode, djq.CouponTitle, true,
|
|
534
|
+
_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);
|
|
623
535
|
return;
|
|
624
536
|
}
|
|
625
|
-
_this5.addDjq(djq.CouponCode, djq.CouponTitle, true,
|
|
537
|
+
_this5.addDjq(djq.CouponCode, djq.CouponTitle, true, djq.ReductionAmount, djq.EnableAmount, djq.LastTS, true, false);
|
|
626
538
|
});
|
|
627
539
|
}
|
|
628
540
|
_this5.paymode.thePaymodes.push(newmode);
|
|
629
541
|
}
|
|
630
542
|
});
|
|
631
543
|
(0, _each3.default)(this.dto.RetailStorageDetails, function (detail) {
|
|
632
|
-
var balanceAmount =
|
|
633
|
-
|
|
634
|
-
var meStorageCardId = null;
|
|
635
|
-
detail.DynamicPropertyKeys.forEach(function (ele, index) {
|
|
636
|
-
if (ele === "mestoragecard") {
|
|
637
|
-
balanceAmount = detail.DynamicPropertyValues[index].BalanceStorage - detail.StoragePaymentAmount;
|
|
638
|
-
storageCardNo = detail.DynamicPropertyValues[index].StorageCardNo;
|
|
639
|
-
meStorageCardId = detail.DynamicPropertyValues[index].MeStorageCardId;
|
|
640
|
-
}
|
|
641
|
-
});
|
|
544
|
+
var balanceAmount = detail.Member.BalanceStorage;
|
|
545
|
+
balanceAmount = balanceAmount - detail.StoragePaymentAmount;
|
|
642
546
|
var newmode = (0, _extends3.default)({}, _this5.genNewMode(PayStyle.hyczk, false, detail.StoragePaymentAmount), {
|
|
643
|
-
member: new Member(detail.Member
|
|
644
|
-
authCode: detail.Password
|
|
547
|
+
member: new Member(detail.Member),
|
|
548
|
+
authCode: detail.Password,
|
|
645
549
|
balance: balanceAmount,
|
|
646
|
-
boriginReturn: true
|
|
647
|
-
meStorageCardId: meStorageCardId ? meStorageCardId : detail.MeStorageCardId,
|
|
648
|
-
storageCardNo: storageCardNo ? storageCardNo : detail.StorageCardNo
|
|
550
|
+
boriginReturn: true
|
|
649
551
|
});
|
|
650
552
|
_this5.paymode.thePaymodes.push(newmode);
|
|
651
553
|
});
|
|
@@ -660,7 +562,7 @@ var SettlementStore = (_class = function () {
|
|
|
660
562
|
}, {
|
|
661
563
|
key: 'quickSettle',
|
|
662
564
|
value: function quickSettle(key) {
|
|
663
|
-
this.addPay(key
|
|
565
|
+
this.addPay(key);
|
|
664
566
|
}
|
|
665
567
|
|
|
666
568
|
//outer call
|
|
@@ -671,8 +573,8 @@ var SettlementStore = (_class = function () {
|
|
|
671
573
|
value: function changeFocusAndAddPay(type) {
|
|
672
574
|
var _this6 = this;
|
|
673
575
|
|
|
674
|
-
var _enumController$
|
|
675
|
-
PayStyle = _enumController$
|
|
576
|
+
var _enumController$getEn5 = _mutantsUtil.enumController.getEnumOj(),
|
|
577
|
+
PayStyle = _enumController$getEn5.PayStyle;
|
|
676
578
|
|
|
677
579
|
this.paymode.currentFocus = type;
|
|
678
580
|
if (this.paymode.currentMode) {
|
|
@@ -689,7 +591,7 @@ var SettlementStore = (_class = function () {
|
|
|
689
591
|
|
|
690
592
|
//抵现积分
|
|
691
593
|
(0, _tplusApi.tApi)({ IntegralSteadCashParams: {
|
|
692
|
-
Idmember: this.paymode.currentMode.
|
|
594
|
+
Idmember: this.paymode.currentMode.member.id,
|
|
693
595
|
TotalTaxAmount: this.paymode.amount,
|
|
694
596
|
BalanceTaxAmount: this.paymode.currentMode.value
|
|
695
597
|
} }, 'AA.DR.newRetailMember.CalculdateIntegralSteadCash', false, false).then(function (result) {
|
|
@@ -718,6 +620,7 @@ var SettlementStore = (_class = function () {
|
|
|
718
620
|
|
|
719
621
|
if ((0, _trim3.default)(v) === "") {
|
|
720
622
|
(0, _mobx.runInAction)(function () {
|
|
623
|
+
_this7.paymode.currentMode.member = new Member(null);
|
|
721
624
|
_this7.paymode.currentMode.errinfo = "请输入储值卡";
|
|
722
625
|
});
|
|
723
626
|
return;
|
|
@@ -731,98 +634,66 @@ var SettlementStore = (_class = function () {
|
|
|
731
634
|
var address = '';
|
|
732
635
|
if (isNewRetailBCPos) {
|
|
733
636
|
// address = '/member/memberProfile/FindByStorageCode/'+v;
|
|
734
|
-
address = '/
|
|
735
|
-
return (0, _tplusApi.ccApi)({ code: v }, address, false, false, { method: 'get', timeout_skip: true }).then(function () {
|
|
736
|
-
var
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
});
|
|
776
|
-
|
|
777
|
-
case 12:
|
|
778
|
-
_context3.next = 25;
|
|
779
|
-
break;
|
|
780
|
-
|
|
781
|
-
case 14:
|
|
782
|
-
if (!(result.data && result.data.length === 1)) {
|
|
783
|
-
_context3.next = 19;
|
|
784
|
-
break;
|
|
785
|
-
}
|
|
786
|
-
|
|
787
|
-
_this7.paymode.updateCardInfo(result.data[0]);
|
|
788
|
-
return _context3.abrupt('return', result.data);
|
|
789
|
-
|
|
790
|
-
case 19:
|
|
791
|
-
if (!(result.data && result.data.length > 1)) {
|
|
792
|
-
_context3.next = 23;
|
|
793
|
-
break;
|
|
794
|
-
}
|
|
795
|
-
|
|
796
|
-
return _context3.abrupt('return', result.data);
|
|
797
|
-
|
|
798
|
-
case 23:
|
|
799
|
-
_message2.default.warn('没有可用储值卡!');
|
|
800
|
-
return _context3.abrupt('return', false);
|
|
801
|
-
|
|
802
|
-
case 25:
|
|
803
|
-
case 'end':
|
|
804
|
-
return _context3.stop();
|
|
805
|
-
}
|
|
637
|
+
address = '/member/MeMemberWallet/FindByStorageCode';
|
|
638
|
+
return (0, _tplusApi.ccApi)({ code: v }, address, false, false, { method: 'get', timeout_skip: true }).then(function (result) {
|
|
639
|
+
var data = result.data;
|
|
640
|
+
var m = data;
|
|
641
|
+
|
|
642
|
+
var _ref8 = _mutantsUtil.platform || {},
|
|
643
|
+
isNewRetailBCPos = _ref8.isNewRetailBCPos;
|
|
644
|
+
|
|
645
|
+
if (isNewRetailBCPos) {
|
|
646
|
+
_this7.paymode && _this7.paymode.currentMode.member.setMeStorageCardId(m.MeStorageCardId);
|
|
647
|
+
_this7.paymode && _this7.paymode.currentMode.member.setStorageCardNo(m.StorageCardNo);
|
|
648
|
+
_this7.paymode && (_this7.paymode.currentMode.MeStorageCardId = m.MeStorageCardId);
|
|
649
|
+
_this7.paymode && (_this7.paymode.currentMode.StorageCardNo = m.StorageCardNo);
|
|
650
|
+
}
|
|
651
|
+
if (!m || !m.ID) {
|
|
652
|
+
(0, _mobx.runInAction)(function () {
|
|
653
|
+
_this7.paymode.currentMode.errinfo = "无效的会员卡号";
|
|
654
|
+
});
|
|
655
|
+
} else {
|
|
656
|
+
(0, _mobx.runInAction)(function () {
|
|
657
|
+
_this7.paymode.currentMode.errinfo = "";
|
|
658
|
+
_this7.paymode.currentMode.member = new Member(m);
|
|
659
|
+
_this7.paymode.currentMode.value = (0, _utils.getFixedNumber)(_this7.brefund ? _this7.paymode.receivable : Math.max(_this7.paymode.receivable, 0));
|
|
660
|
+
_this7.updateEvent();
|
|
661
|
+
var message = '';
|
|
662
|
+
var sum = (0, _reduce3.default)(_this7.paymode.thePaymodes, function (total, cur) {
|
|
663
|
+
return total + cur.value;
|
|
664
|
+
}, 0);
|
|
665
|
+
if (global.CheckMemberStorageProcessorBlock) {
|
|
666
|
+
message = CheckMemberStorageProcessorBlock.execute(m);
|
|
667
|
+
}
|
|
668
|
+
if (!String.isNullOrEmpty(message)) {
|
|
669
|
+
_this7.paymode.currentMode.errinfo = message;
|
|
670
|
+
} else if (_this7.checkReceived(_this7.paymode.currentMode, "balance")) {
|
|
671
|
+
_this7.paymode.currentMode.errinfo = "余额不足";
|
|
672
|
+
} else if (_this7.paymode.amount > 0 && parseFloat(_this7.paymode.amount) !== sum && _this7.paymode.currentMode.value == 0) {
|
|
673
|
+
_this7.paymode.currentMode.errinfo = "实收金额必须录入";
|
|
674
|
+
} else {
|
|
675
|
+
// 查询成功后将焦点移入下一个输入框
|
|
676
|
+
var nextInput = document.querySelector('.czk .received .input');
|
|
677
|
+
nextInput && nextInput.select();
|
|
806
678
|
}
|
|
807
|
-
}
|
|
808
|
-
}
|
|
809
|
-
|
|
810
|
-
return function (_x2) {
|
|
811
|
-
return _ref8.apply(this, arguments);
|
|
812
|
-
};
|
|
813
|
-
}()
|
|
814
|
-
// result.data.forEach((m) => {
|
|
815
|
-
// if (m.CardTypeEnum === 'BALANCE_CARD') {
|
|
816
|
-
// // 会员概念改为卡,把这些字段都放开
|
|
817
|
-
// this.paymode.updateCardInfo(m);
|
|
818
|
-
// }
|
|
819
|
-
// })
|
|
820
|
-
);
|
|
679
|
+
});
|
|
680
|
+
}
|
|
681
|
+
});
|
|
821
682
|
} else {
|
|
822
683
|
address = 'AA.DR.newRetailMember.SearchMember';
|
|
823
684
|
return (0, _tplusApi.tApi)({ SearchParams: { Key: v, IsSingleMember: true, IdStore: IdStore, StoreCode: StoreCode } }, address, false, false).then(function (result) {
|
|
824
685
|
var data = JSON.parse(result.Data);
|
|
825
686
|
var m = data && data.length > 0 && data[0];
|
|
687
|
+
|
|
688
|
+
var _ref9 = _mutantsUtil.platform || {},
|
|
689
|
+
isNewRetailBCPos = _ref9.isNewRetailBCPos;
|
|
690
|
+
|
|
691
|
+
if (isNewRetailBCPos) {
|
|
692
|
+
_this7.paymode && _this7.paymode.currentMode.member.setMeStorageCardId(m.MeStorageCardId);
|
|
693
|
+
_this7.paymode && _this7.paymode.currentMode.member.setStorageCardNo(m.StorageCardNo);
|
|
694
|
+
_this7.paymode && (_this7.paymode.currentMode.MeStorageCardId = m.MeStorageCardId);
|
|
695
|
+
_this7.paymode && (_this7.paymode.currentMode.StorageCardNo = m.StorageCardNo);
|
|
696
|
+
}
|
|
826
697
|
if (!m || !m.ID) {
|
|
827
698
|
(0, _mobx.runInAction)(function () {
|
|
828
699
|
_this7.paymode.currentMode.errinfo = "无效的会员卡号";
|
|
@@ -855,13 +726,12 @@ var SettlementStore = (_class = function () {
|
|
|
855
726
|
}
|
|
856
727
|
}, {
|
|
857
728
|
key: 'addDjq',
|
|
858
|
-
value: function addDjq(promoCouponCode, name, IsEnable,
|
|
729
|
+
value: function addDjq(promoCouponCode, name, IsEnable, amount, doorsill, LastTS, checked, IsRepelWithPoints, UMemberID, expired, displayText, promoMethodEnum, discountPct, promoId, promoRuleId, couponCategoryEnum, id, unCheck, count) {
|
|
859
730
|
var djq = {
|
|
860
731
|
code: promoCouponCode,
|
|
861
732
|
promoCouponCode: promoCouponCode,
|
|
862
733
|
name: name,
|
|
863
734
|
IsEnable: IsEnable,
|
|
864
|
-
nominalAmount: nominalAmount,
|
|
865
735
|
amount: amount,
|
|
866
736
|
doorsill: doorsill, //:"无门槛"
|
|
867
737
|
LastTS: LastTS,
|
|
@@ -885,8 +755,8 @@ var SettlementStore = (_class = function () {
|
|
|
885
755
|
}, {
|
|
886
756
|
key: 'setCurrentMode',
|
|
887
757
|
value: function setCurrentMode(id, type, append) {
|
|
888
|
-
var _enumController$
|
|
889
|
-
PayStyle = _enumController$
|
|
758
|
+
var _enumController$getEn6 = _mutantsUtil.enumController.getEnumOj(),
|
|
759
|
+
PayStyle = _enumController$getEn6.PayStyle;
|
|
890
760
|
|
|
891
761
|
var mode = (0, _find3.default)(this.paymode.thePaymodes, { paymethodId: id });
|
|
892
762
|
if (mode) {
|
|
@@ -904,8 +774,8 @@ var SettlementStore = (_class = function () {
|
|
|
904
774
|
value: function afterSetCurrentMode(type) {
|
|
905
775
|
var _this8 = this;
|
|
906
776
|
|
|
907
|
-
var _enumController$
|
|
908
|
-
PayStyle = _enumController$
|
|
777
|
+
var _enumController$getEn7 = _mutantsUtil.enumController.getEnumOj(),
|
|
778
|
+
PayStyle = _enumController$getEn7.PayStyle;
|
|
909
779
|
|
|
910
780
|
if (type == PayStyle.djq) {
|
|
911
781
|
this.paymode.calcDjqValue();
|
|
@@ -919,7 +789,7 @@ var SettlementStore = (_class = function () {
|
|
|
919
789
|
}
|
|
920
790
|
|
|
921
791
|
(0, _tplusApi.tApi)({ IntegralSteadCashParams: {
|
|
922
|
-
Idmember: this.paymode.currentMode.
|
|
792
|
+
Idmember: this.paymode.currentMode.member.id,
|
|
923
793
|
TotalTaxAmount: this.paymode.amount,
|
|
924
794
|
BalanceTaxAmount: this.paymode.amount
|
|
925
795
|
} }, 'AA.DR.newRetailMember.CalculdateIntegralSteadCash', false, false).then(function (result) {
|
|
@@ -940,27 +810,23 @@ var SettlementStore = (_class = function () {
|
|
|
940
810
|
}
|
|
941
811
|
}, {
|
|
942
812
|
key: 'genNewMode',
|
|
943
|
-
value: function genNewMode(type, notwithm, v
|
|
944
|
-
var _enumController$
|
|
945
|
-
PayStyle = _enumController$
|
|
813
|
+
value: function genNewMode(type, notwithm, v) {
|
|
814
|
+
var _enumController$getEn8 = _mutantsUtil.enumController.getEnumOj(),
|
|
815
|
+
PayStyle = _enumController$getEn8.PayStyle;
|
|
946
816
|
|
|
947
817
|
var value = (0, _utils.getFixedNumber)(v || (this.brefund ? this.paymode.receivable : Math.max(this.paymode.receivable, 0)));
|
|
948
818
|
var themode = (0, _find3.default)(this.paymode.paymodes, { 'paymentType': type });
|
|
949
|
-
var memberId = this.member && this.member.ID ? this.member.ID : null;
|
|
950
819
|
var mode = (0, _mobx.observable)({
|
|
951
820
|
paymethodId: this.paymode.counter,
|
|
952
821
|
name: themode.name,
|
|
953
822
|
exchangeRate: themode.exchangeRate,
|
|
954
823
|
calDirection: themode.calDirection,
|
|
955
|
-
thridPayment: themode.thridPayment,
|
|
956
824
|
value: value,
|
|
957
825
|
value2: (0, _utils.getFixedNumber)(themode.calDirection == "88" ? value / themode.exchangeRate : value * themode.exchangeRate),
|
|
958
826
|
value3: value,
|
|
959
827
|
order: this.paymode.thePaymodes.length + 1,
|
|
960
828
|
paymentType: type,
|
|
961
829
|
djqs: [],
|
|
962
|
-
card: null,
|
|
963
|
-
memberId: !notwithm ? memberId : null,
|
|
964
830
|
member: new Member(!notwithm ? this.member : null),
|
|
965
831
|
authCode: '',
|
|
966
832
|
steadCashIntegral: null,
|
|
@@ -968,9 +834,9 @@ var SettlementStore = (_class = function () {
|
|
|
968
834
|
maxamount: this.paymode.amount
|
|
969
835
|
});
|
|
970
836
|
if (type == PayStyle.hyczk) {
|
|
971
|
-
if (!mode.
|
|
837
|
+
if (!mode.member.id || !mode.member.StorageCardNo) {
|
|
972
838
|
(0, _mobx.runInAction)(function () {
|
|
973
|
-
mode.errinfo = '
|
|
839
|
+
mode.errinfo = '未录入储值卡';
|
|
974
840
|
});
|
|
975
841
|
} else if (this.checkReceived(mode, "balance")) {
|
|
976
842
|
(0, _mobx.runInAction)(function () {
|
|
@@ -981,7 +847,7 @@ var SettlementStore = (_class = function () {
|
|
|
981
847
|
if (type == PayStyle.hyczk || type == PayStyle.jfdx || type == PayStyle.djq) {
|
|
982
848
|
this.setMaxAmount(type, mode);
|
|
983
849
|
}
|
|
984
|
-
console.log(
|
|
850
|
+
console.log(mode);
|
|
985
851
|
return mode;
|
|
986
852
|
}
|
|
987
853
|
}, {
|
|
@@ -989,8 +855,8 @@ var SettlementStore = (_class = function () {
|
|
|
989
855
|
value: function setMaxAmount(type, mode) {
|
|
990
856
|
var _this9 = this;
|
|
991
857
|
|
|
992
|
-
var _enumController$
|
|
993
|
-
PayStyle = _enumController$
|
|
858
|
+
var _enumController$getEn9 = _mutantsUtil.enumController.getEnumOj(),
|
|
859
|
+
PayStyle = _enumController$getEn9.PayStyle;
|
|
994
860
|
|
|
995
861
|
var sum = 0;
|
|
996
862
|
if (type == PayStyle.hyczk) {
|
|
@@ -1018,6 +884,15 @@ var SettlementStore = (_class = function () {
|
|
|
1018
884
|
key: 'changeFocusOnly',
|
|
1019
885
|
value: function changeFocusOnly(type) {
|
|
1020
886
|
this.paymode.currentFocus = type;
|
|
887
|
+
// 获取焦点时带入剩余的值
|
|
888
|
+
// let mode=_find(this.paymode.thePaymodes,{'paymentType':type});
|
|
889
|
+
// if(mode && this.isIntegralExchange){
|
|
890
|
+
// const shouldSetValue =getFixedNumber(parseFloat(this.paymode.receivable) + parseFloat(mode.value));
|
|
891
|
+
// mode.value = shouldSetValue;
|
|
892
|
+
// mode.value2 = getFixedNumber(mode.calDirection=="88"?shouldSetValue / mode.exchangeRate:(shouldSetValue * mode.exchangeRate));
|
|
893
|
+
// mode.value3 = shouldSetValue;
|
|
894
|
+
// this.paymode.calcReserved();
|
|
895
|
+
// }
|
|
1021
896
|
}
|
|
1022
897
|
}, {
|
|
1023
898
|
key: 'changeClickFocusOnly',
|
|
@@ -1057,8 +932,8 @@ var SettlementStore = (_class = function () {
|
|
|
1057
932
|
}, {
|
|
1058
933
|
key: 'addPayDirectly',
|
|
1059
934
|
value: function addPayDirectly(pay) {
|
|
1060
|
-
var _enumController$
|
|
1061
|
-
PayStyle = _enumController$
|
|
935
|
+
var _enumController$getEn10 = _mutantsUtil.enumController.getEnumOj(),
|
|
936
|
+
PayStyle = _enumController$getEn10.PayStyle;
|
|
1062
937
|
|
|
1063
938
|
if (!(0, _find3.default)(this.paymode.thePaymodes, { paymethodId: pay.paymethodId })) {
|
|
1064
939
|
var pos = this.paymode.thePaymodes.length;
|
|
@@ -1075,9 +950,9 @@ var SettlementStore = (_class = function () {
|
|
|
1075
950
|
}
|
|
1076
951
|
}, {
|
|
1077
952
|
key: 'addPay',
|
|
1078
|
-
value: function addPay(type
|
|
1079
|
-
var _enumController$
|
|
1080
|
-
PayStyle = _enumController$
|
|
953
|
+
value: function addPay(type) {
|
|
954
|
+
var _enumController$getEn11 = _mutantsUtil.enumController.getEnumOj(),
|
|
955
|
+
PayStyle = _enumController$getEn11.PayStyle;
|
|
1081
956
|
|
|
1082
957
|
var pos = this.paymode.thePaymodes.length;
|
|
1083
958
|
if (type == PayStyle.hyczk) {
|
|
@@ -1086,14 +961,15 @@ var SettlementStore = (_class = function () {
|
|
|
1086
961
|
});
|
|
1087
962
|
pos = index == -1 ? pos : index + 1;
|
|
1088
963
|
}
|
|
1089
|
-
this.paymode.thePaymodes.
|
|
964
|
+
// this.paymode.thePaymodes.push(this.genNewMode(type) );
|
|
965
|
+
this.paymode.thePaymodes.splice(pos, 0, this.genNewMode(type, this.newStyle && type == PayStyle.hyczk));
|
|
1090
966
|
this.paymode.calcReserved();
|
|
1091
967
|
}
|
|
1092
968
|
}, {
|
|
1093
969
|
key: 'delPay',
|
|
1094
970
|
value: function delPay(index) {
|
|
1095
|
-
var _enumController$
|
|
1096
|
-
PayStyle = _enumController$
|
|
971
|
+
var _enumController$getEn12 = _mutantsUtil.enumController.getEnumOj(),
|
|
972
|
+
PayStyle = _enumController$getEn12.PayStyle;
|
|
1097
973
|
|
|
1098
974
|
(0, _remove3.default)(this.paymode.thePaymodes, function (mode) {
|
|
1099
975
|
return mode.paymethodId === index;
|
|
@@ -1101,179 +977,83 @@ var SettlementStore = (_class = function () {
|
|
|
1101
977
|
this.paymode.currentFocus = -1;
|
|
1102
978
|
this.paymode.calcReserved();
|
|
1103
979
|
}
|
|
1104
|
-
|
|
1105
|
-
// 获取储值是否重复, 在commit方法中使用
|
|
1106
|
-
|
|
1107
|
-
}, {
|
|
1108
|
-
key: 'findStorageBillValidate',
|
|
1109
|
-
value: function findStorageBillValidate() {
|
|
1110
|
-
var _this10 = this;
|
|
1111
|
-
|
|
1112
|
-
var _enumController$getEn14 = _mutantsUtil.enumController.getEnumOj(),
|
|
1113
|
-
PayStyle = _enumController$getEn14.PayStyle;
|
|
1114
|
-
|
|
1115
|
-
(0, _mobx.runInAction)(function () {
|
|
1116
|
-
_this10.dto.StorageMutiSettleDetails = [];
|
|
1117
|
-
var thePaymodes = _this10.newStyle ? (0, _filter3.default)(_this10.paymode.thePaymodes, function (mode) {
|
|
1118
|
-
return parseFloat(mode.value) != 0;
|
|
1119
|
-
}) : _this10.paymode.thePaymodes;
|
|
1120
|
-
(0, _each3.default)(thePaymodes, function (mode) {
|
|
1121
|
-
var themode = (0, _find3.default)(_this10.paymode.paymodes, { 'paymentType': mode.paymentType });
|
|
1122
|
-
|
|
1123
|
-
var value = parseFloat(mode.value);
|
|
1124
|
-
var giveChange = null;
|
|
1125
|
-
if (mode.paymentType == PayStyle.xianjin && _this10.paymode.receivable < 0 && value > Math.abs(_this10.paymode.receivable)) {
|
|
1126
|
-
value = Math.Add(value, _this10.paymode.receivable);
|
|
1127
|
-
giveChange = Math.abs(_this10.paymode.receivable);
|
|
1128
|
-
}
|
|
1129
|
-
_this10.dto.StorageMutiSettleDetails.push({
|
|
1130
|
-
Code: mode.paymethodId,
|
|
1131
|
-
StorageAmount: value,
|
|
1132
|
-
GiveChange: giveChange,
|
|
1133
|
-
IdsettleStyle: themode.idSettleStyle,
|
|
1134
|
-
IdbankAccount: themode.idBankAccount,
|
|
1135
|
-
PaymentCode: mode.authCode,
|
|
1136
|
-
DynamicPropertyKeys: [],
|
|
1137
|
-
DynamicPropertyValues: [],
|
|
1138
|
-
DataSource: { Id: _this10.dataSource }
|
|
1139
|
-
});
|
|
1140
|
-
});
|
|
1141
|
-
});
|
|
1142
|
-
return (0, _tplusApi.ccApi)((0, _extends3.default)({}, this.dto), '/marketingtool/Storage/findStorageBillValidate', false, false);
|
|
1143
|
-
}
|
|
1144
|
-
|
|
1145
|
-
//判断是否重复弹框
|
|
1146
|
-
|
|
1147
980
|
}, {
|
|
1148
981
|
key: 'commit',
|
|
1149
982
|
value: function () {
|
|
1150
|
-
var
|
|
1151
|
-
var
|
|
983
|
+
var _ref10 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2(bTest) {
|
|
984
|
+
var _ref11, isNewRetailBCPos;
|
|
1152
985
|
|
|
1153
|
-
return _regenerator2.default.wrap(function
|
|
986
|
+
return _regenerator2.default.wrap(function _callee2$(_context2) {
|
|
1154
987
|
while (1) {
|
|
1155
|
-
switch (
|
|
988
|
+
switch (_context2.prev = _context2.next) {
|
|
1156
989
|
case 0:
|
|
1157
990
|
console.log('settlementStore.commit开始,参数:' + bTest);
|
|
1158
991
|
|
|
1159
992
|
if (!bTest) {
|
|
1160
|
-
|
|
993
|
+
_context2.next = 3;
|
|
1161
994
|
break;
|
|
1162
995
|
}
|
|
1163
996
|
|
|
1164
|
-
return
|
|
997
|
+
return _context2.abrupt('return', _promise2.default.resolve(true));
|
|
1165
998
|
|
|
1166
999
|
case 3:
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
paylist = this.paymode.thePaymodes.filter(function (v) {
|
|
1170
|
-
return !!v.thridPayment && v.value > 0;
|
|
1171
|
-
}) || [];
|
|
1172
|
-
|
|
1173
|
-
if (!(paylist && paylist.length > 1)) {
|
|
1174
|
-
_context4.next = 9;
|
|
1175
|
-
break;
|
|
1176
|
-
}
|
|
1177
|
-
|
|
1178
|
-
_message2.default.warn('二开支付目前仅支持单一结算方式。');
|
|
1179
|
-
return _context4.abrupt('return', _promise2.default.resolve(false));
|
|
1000
|
+
_ref11 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref11.isNewRetailBCPos;
|
|
1001
|
+
_context2.prev = 4;
|
|
1180
1002
|
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
_context4.next = 30;
|
|
1184
|
-
break;
|
|
1185
|
-
}
|
|
1186
|
-
|
|
1187
|
-
_context4.next = 12;
|
|
1188
|
-
return this.findStorageBillValidate();
|
|
1189
|
-
|
|
1190
|
-
case 12:
|
|
1191
|
-
ret = _context4.sent;
|
|
1192
|
-
_ref10 = ret || {}, _ref10$data = _ref10.data;
|
|
1193
|
-
_ref10$data = _ref10$data === undefined ? {} : _ref10$data;
|
|
1194
|
-
code = _ref10$data.code, returnMsg = _ref10$data.returnMsg;
|
|
1195
|
-
|
|
1196
|
-
if (!(code && code == 10001)) {
|
|
1197
|
-
_context4.next = 24;
|
|
1003
|
+
if (!(this.type == 1)) {
|
|
1004
|
+
_context2.next = 10;
|
|
1198
1005
|
break;
|
|
1199
1006
|
}
|
|
1200
1007
|
|
|
1201
|
-
|
|
1202
|
-
return this.repeatStorageModal(returnMsg);
|
|
1203
|
-
|
|
1204
|
-
case 19:
|
|
1205
|
-
state = _context4.sent;
|
|
1206
|
-
|
|
1207
|
-
if (!(state === false)) {
|
|
1208
|
-
_context4.next = 22;
|
|
1209
|
-
break;
|
|
1210
|
-
}
|
|
1211
|
-
|
|
1212
|
-
return _context4.abrupt('return', _promise2.default.resolve(false));
|
|
1213
|
-
|
|
1214
|
-
case 22:
|
|
1215
|
-
_context4.next = 28;
|
|
1216
|
-
break;
|
|
1217
|
-
|
|
1218
|
-
case 24:
|
|
1219
|
-
_context4.next = 26;
|
|
1008
|
+
_context2.next = 8;
|
|
1220
1009
|
return this.saveMember();
|
|
1221
1010
|
|
|
1222
|
-
case
|
|
1223
|
-
|
|
1011
|
+
case 8:
|
|
1012
|
+
_context2.next = 18;
|
|
1013
|
+
break;
|
|
1224
1014
|
|
|
1225
|
-
|
|
1226
|
-
|
|
1015
|
+
case 10:
|
|
1016
|
+
if (!isNewRetailBCPos) {
|
|
1017
|
+
_context2.next = 13;
|
|
1018
|
+
break;
|
|
1227
1019
|
}
|
|
1228
1020
|
|
|
1229
|
-
|
|
1230
|
-
_context4.next = 39;
|
|
1231
|
-
break;
|
|
1232
|
-
|
|
1233
|
-
case 30:
|
|
1234
|
-
_context4.next = 32;
|
|
1021
|
+
_context2.next = 13;
|
|
1235
1022
|
return _mutantsMicrofx.stores.offlineSys.generatorCode(this.dto);
|
|
1236
1023
|
|
|
1237
|
-
case
|
|
1238
|
-
|
|
1024
|
+
case 13:
|
|
1025
|
+
_context2.next = 15;
|
|
1239
1026
|
return this.save();
|
|
1240
1027
|
|
|
1241
|
-
case
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
if (!(ret2 === false)) {
|
|
1245
|
-
_context4.next = 37;
|
|
1028
|
+
case 15:
|
|
1029
|
+
if (!isNewRetailBCPos) {
|
|
1030
|
+
_context2.next = 18;
|
|
1246
1031
|
break;
|
|
1247
1032
|
}
|
|
1248
1033
|
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
case 37:
|
|
1252
|
-
_context4.next = 39;
|
|
1034
|
+
_context2.next = 18;
|
|
1253
1035
|
return _mutantsMicrofx.stores.offlineSys.retailSequenceUpload();
|
|
1254
1036
|
|
|
1255
|
-
case
|
|
1256
|
-
return
|
|
1037
|
+
case 18:
|
|
1038
|
+
return _context2.abrupt('return', _promise2.default.resolve(true));
|
|
1257
1039
|
|
|
1258
|
-
case
|
|
1259
|
-
|
|
1260
|
-
|
|
1040
|
+
case 21:
|
|
1041
|
+
_context2.prev = 21;
|
|
1042
|
+
_context2.t0 = _context2['catch'](4);
|
|
1261
1043
|
|
|
1262
|
-
console.error('settlementStore.commit失败,错误信息:' +
|
|
1263
|
-
|
|
1264
|
-
this.thirdPayRefund(status == 1 ? 2 : 1);
|
|
1265
|
-
return _context4.abrupt('return', _promise2.default.resolve(_context4.t0));
|
|
1044
|
+
console.error('settlementStore.commit失败,错误信息:' + _context2.t0);
|
|
1045
|
+
return _context2.abrupt('return', _promise2.default.resolve(_context2.t0));
|
|
1266
1046
|
|
|
1267
|
-
case
|
|
1047
|
+
case 25:
|
|
1268
1048
|
case 'end':
|
|
1269
|
-
return
|
|
1049
|
+
return _context2.stop();
|
|
1270
1050
|
}
|
|
1271
1051
|
}
|
|
1272
|
-
},
|
|
1052
|
+
}, _callee2, this, [[4, 21]]);
|
|
1273
1053
|
}));
|
|
1274
1054
|
|
|
1275
|
-
function commit(
|
|
1276
|
-
return
|
|
1055
|
+
function commit(_x2) {
|
|
1056
|
+
return _ref10.apply(this, arguments);
|
|
1277
1057
|
}
|
|
1278
1058
|
|
|
1279
1059
|
return commit;
|
|
@@ -1286,155 +1066,100 @@ var SettlementStore = (_class = function () {
|
|
|
1286
1066
|
}
|
|
1287
1067
|
}, {
|
|
1288
1068
|
key: 'saveMember',
|
|
1289
|
-
value: function () {
|
|
1290
|
-
var
|
|
1291
|
-
var _this11 = this;
|
|
1292
|
-
|
|
1293
|
-
var _enumController$getEn15, PayStyle, TradeType, IPMSG, dtoParams, payList, payment, tradeType, ret, _ref12, type, data, msg, code;
|
|
1294
|
-
|
|
1295
|
-
return _regenerator2.default.wrap(function _callee5$(_context5) {
|
|
1296
|
-
while (1) {
|
|
1297
|
-
switch (_context5.prev = _context5.next) {
|
|
1298
|
-
case 0:
|
|
1299
|
-
_enumController$getEn15 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn15.PayStyle, TradeType = _enumController$getEn15.TradeType;
|
|
1300
|
-
|
|
1301
|
-
(0, _mobx.runInAction)(function () {
|
|
1302
|
-
_this11.dto.StorageMutiSettleDetails = [];
|
|
1303
|
-
var thePaymodes = _this11.newStyle ? (0, _filter3.default)(_this11.paymode.thePaymodes, function (mode) {
|
|
1304
|
-
return parseFloat(mode.value) != 0;
|
|
1305
|
-
}) : _this11.paymode.thePaymodes;
|
|
1306
|
-
(0, _each3.default)(thePaymodes, function (mode) {
|
|
1307
|
-
var themode = (0, _find3.default)(_this11.paymode.paymodes, { 'paymentType': mode.paymentType });
|
|
1308
|
-
|
|
1309
|
-
var value = parseFloat(mode.value);
|
|
1310
|
-
var giveChange = null;
|
|
1311
|
-
if (mode.paymentType == PayStyle.xianjin && _this11.paymode.receivable < 0 && value > Math.abs(_this11.paymode.receivable)) {
|
|
1312
|
-
value = Math.Add(value, _this11.paymode.receivable);
|
|
1313
|
-
giveChange = Math.abs(_this11.paymode.receivable);
|
|
1314
|
-
}
|
|
1315
|
-
_this11.dto.StorageMutiSettleDetails.push({
|
|
1316
|
-
Code: mode.paymethodId,
|
|
1317
|
-
StorageAmount: value,
|
|
1318
|
-
GiveChange: giveChange,
|
|
1319
|
-
IdsettleStyle: themode.idSettleStyle,
|
|
1320
|
-
IdbankAccount: themode.idBankAccount,
|
|
1321
|
-
PaymentCode: mode.authCode,
|
|
1322
|
-
DynamicPropertyKeys: [],
|
|
1323
|
-
DynamicPropertyValues: [],
|
|
1324
|
-
DataSource: { Id: _this11.dataSource },
|
|
1325
|
-
ThirdPaymentInfo: themode.thridPayment || null,
|
|
1326
|
-
ThirdPaymentReturnInfo: mode.thirdPaymentReturnInfo || null
|
|
1327
|
-
});
|
|
1328
|
-
});
|
|
1329
|
-
});
|
|
1330
|
-
// cc结算调用
|
|
1331
|
-
IPMSG = {};
|
|
1332
|
-
|
|
1333
|
-
if (!!window.localStorage.IPMSG) {
|
|
1334
|
-
IPMSG = JSON.parse(window.localStorage.IPMSG);
|
|
1335
|
-
}
|
|
1336
|
-
dtoParams = this.dto;
|
|
1337
|
-
//处理存在二开支付情况
|
|
1338
|
-
|
|
1339
|
-
payList = dtoParams.StorageMutiSettleDetails.filter(function (v) {
|
|
1340
|
-
return v.ThirdPaymentInfo;
|
|
1341
|
-
});
|
|
1342
|
-
|
|
1343
|
-
if (!(payList && payList.length > 0)) {
|
|
1344
|
-
_context5.next = 19;
|
|
1345
|
-
break;
|
|
1346
|
-
}
|
|
1347
|
-
|
|
1348
|
-
payment = payList[0];
|
|
1349
|
-
tradeType = payment && payment.StorageAmount > 0 ? TradeType.PAY : TradeType.REFUND;
|
|
1350
|
-
_context5.next = 11;
|
|
1351
|
-
return this.thirdPay(2, payment, tradeType, dtoParams);
|
|
1352
|
-
|
|
1353
|
-
case 11:
|
|
1354
|
-
ret = _context5.sent;
|
|
1355
|
-
_ref12 = ret || {}, type = _ref12.type, data = _ref12.data, msg = _ref12.msg, code = _ref12.code;
|
|
1356
|
-
|
|
1357
|
-
if (!(type === true)) {
|
|
1358
|
-
_context5.next = 17;
|
|
1359
|
-
break;
|
|
1360
|
-
}
|
|
1361
|
-
|
|
1362
|
-
dtoParams = data;
|
|
1363
|
-
_context5.next = 19;
|
|
1364
|
-
break;
|
|
1069
|
+
value: function saveMember() {
|
|
1070
|
+
var _this10 = this;
|
|
1365
1071
|
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
return _context5.abrupt('return', false);
|
|
1072
|
+
var _enumController$getEn13 = _mutantsUtil.enumController.getEnumOj(),
|
|
1073
|
+
PayStyle = _enumController$getEn13.PayStyle;
|
|
1369
1074
|
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1075
|
+
(0, _mobx.runInAction)(function () {
|
|
1076
|
+
_this10.dto.StorageMutiSettleDetails = [];
|
|
1077
|
+
var thePaymodes = _this10.newStyle ? (0, _filter3.default)(_this10.paymode.thePaymodes, function (mode) {
|
|
1078
|
+
return parseFloat(mode.value) != 0;
|
|
1079
|
+
}) : _this10.paymode.thePaymodes;
|
|
1080
|
+
(0, _each3.default)(thePaymodes, function (mode) {
|
|
1081
|
+
var themode = (0, _find3.default)(_this10.paymode.paymodes, { 'paymentType': mode.paymentType });
|
|
1376
1082
|
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1083
|
+
var value = parseFloat(mode.value);
|
|
1084
|
+
var giveChange = null;
|
|
1085
|
+
if (mode.paymentType == PayStyle.xianjin && _this10.paymode.receivable < 0 && value > Math.abs(_this10.paymode.receivable)) {
|
|
1086
|
+
value = Math.Add(value, _this10.paymode.receivable);
|
|
1087
|
+
giveChange = Math.abs(_this10.paymode.receivable);
|
|
1381
1088
|
}
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1089
|
+
_this10.dto.StorageMutiSettleDetails.push({
|
|
1090
|
+
Code: mode.paymethodId,
|
|
1091
|
+
StorageAmount: value,
|
|
1092
|
+
GiveChange: giveChange,
|
|
1093
|
+
IdsettleStyle: themode.idSettleStyle,
|
|
1094
|
+
IdbankAccount: themode.idBankAccount,
|
|
1095
|
+
PaymentCode: mode.authCode,
|
|
1096
|
+
DynamicPropertyKeys: [],
|
|
1097
|
+
DynamicPropertyValues: [],
|
|
1098
|
+
DataSource: { Id: _this10.dataSource }
|
|
1099
|
+
});
|
|
1100
|
+
});
|
|
1101
|
+
});
|
|
1102
|
+
// cc结算调用
|
|
1103
|
+
var IPMSG = {};
|
|
1104
|
+
if (!!window.localStorage.IPMSG) {
|
|
1105
|
+
IPMSG = JSON.parse(window.localStorage.IPMSG);
|
|
1387
1106
|
}
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1107
|
+
return (0, _tplusApi.tApi)({ dto: this.dto }, 'chanjet.ME.INewRetailMemberStorage.Save', false, false).then(function (resp) {
|
|
1108
|
+
_this10.handlePrint(resp);
|
|
1109
|
+
});
|
|
1110
|
+
}
|
|
1391
1111
|
}, {
|
|
1392
1112
|
key: 'save',
|
|
1393
1113
|
value: function () {
|
|
1394
|
-
var
|
|
1395
|
-
var
|
|
1114
|
+
var _ref12 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee3() {
|
|
1115
|
+
var _this11 = this;
|
|
1396
1116
|
|
|
1397
|
-
var _enumController$
|
|
1117
|
+
var _enumController$getEn14, PayStyle, _ref14, isNewRetailBCPos, IPMSG, RetailTypeEnum;
|
|
1398
1118
|
|
|
1399
|
-
return _regenerator2.default.wrap(function
|
|
1119
|
+
return _regenerator2.default.wrap(function _callee3$(_context3) {
|
|
1400
1120
|
while (1) {
|
|
1401
|
-
switch (
|
|
1121
|
+
switch (_context3.prev = _context3.next) {
|
|
1402
1122
|
case 0:
|
|
1403
|
-
_enumController$
|
|
1123
|
+
_enumController$getEn14 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn14.PayStyle;
|
|
1404
1124
|
|
|
1405
1125
|
(0, _mobx.runInAction)(function () {
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1126
|
+
_this11.dto.RetailPaymentDetails = [];
|
|
1127
|
+
_this11.dto.RetailStorageDetails = [];
|
|
1128
|
+
_this11.dto.RetailCouponDetails = [];
|
|
1409
1129
|
var czkSum = 0;
|
|
1130
|
+
var Idmember = _this11.dto.Idmember;
|
|
1410
1131
|
var count = 0;
|
|
1411
|
-
var thePaymodes =
|
|
1132
|
+
var thePaymodes = _this11.newStyle ? (0, _filter3.default)(_this11.paymode.thePaymodes, function (mode) {
|
|
1412
1133
|
return parseFloat(mode.value) != 0;
|
|
1413
|
-
}) :
|
|
1134
|
+
}) : _this11.paymode.thePaymodes;
|
|
1414
1135
|
(0, _each3.default)(thePaymodes, function (mode, index) {
|
|
1415
|
-
var themode = (0, _find3.default)(
|
|
1136
|
+
var themode = (0, _find3.default)(_this11.paymode.paymodes, { 'paymentType': mode.paymentType });
|
|
1416
1137
|
if (mode.paymentType == PayStyle.hyczk) {
|
|
1138
|
+
if (!Idmember) {
|
|
1139
|
+
Idmember = mode.member.id;
|
|
1140
|
+
}
|
|
1417
1141
|
czkSum = Math.Add(czkSum, mode.value);
|
|
1418
|
-
|
|
1142
|
+
var MeStorageCardId = mode.member.MeStorageCardId ? mode.member.MeStorageCardId : _this11.member.MeStorageCardId;
|
|
1143
|
+
_this11.dto.RetailStorageDetails.push({
|
|
1419
1144
|
Code: mode.paymethodId,
|
|
1420
|
-
MeStorageCardId:
|
|
1145
|
+
MeStorageCardId: MeStorageCardId,
|
|
1421
1146
|
StoragePaymentAmount: mode.value,
|
|
1422
1147
|
IsOrigReturn: false,
|
|
1423
1148
|
BalanceStorage: mode.balance,
|
|
1424
|
-
Idmember: mode.
|
|
1149
|
+
Idmember: mode.member.id,
|
|
1425
1150
|
DynamicPropertyKeys: [],
|
|
1426
1151
|
DynamicPropertyValues: [],
|
|
1427
|
-
DataSource: { Id:
|
|
1152
|
+
DataSource: { Id: _this11.dataSource },
|
|
1428
1153
|
Password: mode.authCode
|
|
1429
1154
|
});
|
|
1430
1155
|
} else {
|
|
1431
1156
|
var value = parseFloat(mode.value);
|
|
1432
1157
|
var giveChange = null;
|
|
1433
|
-
if (mode.paymentType == PayStyle.xianjin &&
|
|
1434
|
-
value = Math.Add(value,
|
|
1435
|
-
giveChange = Math.abs(
|
|
1158
|
+
if (mode.paymentType == PayStyle.xianjin && _this11.paymode.receivable < 0 && value > Math.abs(_this11.paymode.receivable)) {
|
|
1159
|
+
value = Math.Add(value, _this11.paymode.receivable);
|
|
1160
|
+
giveChange = Math.abs(_this11.paymode.receivable);
|
|
1436
1161
|
}
|
|
1437
|
-
|
|
1162
|
+
_this11.dto.RetailPaymentDetails.push({
|
|
1438
1163
|
Code: mode.paymethodId,
|
|
1439
1164
|
OrigAmount: mode.exchangeRate != 1 ? mode.value2 : value,
|
|
1440
1165
|
Amount: value,
|
|
@@ -1448,44 +1173,71 @@ var SettlementStore = (_class = function () {
|
|
|
1448
1173
|
OverchargesAmount: mode.overchargesAmount,
|
|
1449
1174
|
DynamicPropertyKeys: [],
|
|
1450
1175
|
DynamicPropertyValues: [],
|
|
1451
|
-
DataSource: { Id:
|
|
1452
|
-
ThirdPaymentInfo: themode.thridPayment || null,
|
|
1453
|
-
ThirdPaymentReturnInfo: mode.thirdPaymentReturnInfo || null
|
|
1176
|
+
DataSource: { Id: _this11.dataSource }
|
|
1454
1177
|
});
|
|
1455
1178
|
if (mode.paymentType == PayStyle.djq) {
|
|
1456
|
-
(0, _each3.default)(
|
|
1457
|
-
|
|
1179
|
+
(0, _each3.default)(_this11.paymode.checkList && _this11.paymode.checkList.length ? _this11.paymode.checkList : mode.djqs, function (djq) {
|
|
1180
|
+
_this11.dto.RetailCouponDetails.push({
|
|
1458
1181
|
CouponCode: djq.promoCouponCode,
|
|
1459
1182
|
ReductionAmount: djq.amount,
|
|
1460
1183
|
EnableAmount: djq.doorsill,
|
|
1461
1184
|
CouponTitle: djq.name,
|
|
1462
|
-
IdMember: djq.UMemberID ? mode.
|
|
1185
|
+
IdMember: djq.UMemberID ? mode.member.id : null,
|
|
1463
1186
|
LastTS: djq.LastTS,
|
|
1464
1187
|
PromotionId: djq.promoId,
|
|
1465
1188
|
PromotionRuleId: djq.promoRuleId,
|
|
1466
1189
|
PromoCouponAllocatedId: djq.id,
|
|
1467
|
-
DataSource: { Id:
|
|
1190
|
+
DataSource: { Id: _this11.dataSource }
|
|
1468
1191
|
});
|
|
1469
1192
|
});
|
|
1470
1193
|
}
|
|
1471
1194
|
}
|
|
1472
1195
|
});
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1196
|
+
|
|
1197
|
+
var _ref13 = _mutantsUtil.platform || {},
|
|
1198
|
+
isNewRetailBCPos = _ref13.isNewRetailBCPos;
|
|
1199
|
+
|
|
1200
|
+
if (_this11.dto.RetailStorageDetails.length > 0) {
|
|
1201
|
+
var themode = (0, _find3.default)(_this11.paymode.paymodes, { 'paymentType': PayStyle.hyczk });
|
|
1202
|
+
if (isNewRetailBCPos) {
|
|
1203
|
+
// this.dto.RetailStorageDetails && this.dto.RetailStorageDetails.forEach((value, index) => {
|
|
1204
|
+
// value.MeStorageCardId = (mode.MeStorageCardId ? mode.MeStorageCardId : this.member.MeStorageCardId);
|
|
1205
|
+
// })
|
|
1206
|
+
_this11.dto.RetailPaymentDetails.push({
|
|
1207
|
+
Code: _this11.paymode.counter,
|
|
1208
|
+
OrigAmount: czkSum,
|
|
1209
|
+
Amount: czkSum,
|
|
1210
|
+
IdsettleStyle: themode.idSettleStyle,
|
|
1211
|
+
IdbankAccount: themode.idBankAccount,
|
|
1212
|
+
DynamicPropertyKeys: [],
|
|
1213
|
+
DynamicPropertyValues: [],
|
|
1214
|
+
DataSource: { Id: _this11.dataSource },
|
|
1215
|
+
RetailStorageDetails: _this11.dto.RetailStorageDetails
|
|
1216
|
+
});
|
|
1217
|
+
} else {
|
|
1218
|
+
_this11.dto.RetailPaymentDetails.push({
|
|
1219
|
+
Code: _this11.paymode.counter,
|
|
1220
|
+
OrigAmount: czkSum,
|
|
1221
|
+
Amount: czkSum,
|
|
1222
|
+
IdsettleStyle: themode.idSettleStyle,
|
|
1223
|
+
IdbankAccount: themode.idBankAccount,
|
|
1224
|
+
DynamicPropertyKeys: [],
|
|
1225
|
+
DynamicPropertyValues: [],
|
|
1226
|
+
DataSource: { Id: _this11.dataSource }
|
|
1227
|
+
});
|
|
1228
|
+
}
|
|
1229
|
+
_this11.dto.Idmember = Idmember;
|
|
1486
1230
|
}
|
|
1487
1231
|
});
|
|
1488
|
-
|
|
1232
|
+
_ref14 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref14.isNewRetailBCPos;
|
|
1233
|
+
|
|
1234
|
+
console.log('bc_pos\u73AF\u5883:' + isNewRetailBCPos + ',\u7ED3\u7B97\u6570\u636E\uFF1A', this.dto);
|
|
1235
|
+
|
|
1236
|
+
if (!isNewRetailBCPos) {
|
|
1237
|
+
_context3.next = 20;
|
|
1238
|
+
break;
|
|
1239
|
+
}
|
|
1240
|
+
|
|
1489
1241
|
// cc结算调用
|
|
1490
1242
|
IPMSG = {};
|
|
1491
1243
|
|
|
@@ -1493,271 +1245,65 @@ var SettlementStore = (_class = function () {
|
|
|
1493
1245
|
IPMSG = JSON.parse(window.localStorage.IPMSG);
|
|
1494
1246
|
}
|
|
1495
1247
|
RetailTypeEnum = this.dto.IdbusiType == 36 ? "INTEGRAL_EXCHANGE" : "NORMAL";
|
|
1496
|
-
|
|
1248
|
+
_context3.t1 = this.dto.IdbusiType == 37;
|
|
1497
1249
|
|
|
1498
|
-
if (!
|
|
1499
|
-
|
|
1250
|
+
if (!_context3.t1) {
|
|
1251
|
+
_context3.next = 13;
|
|
1500
1252
|
break;
|
|
1501
1253
|
}
|
|
1502
1254
|
|
|
1503
|
-
|
|
1255
|
+
_context3.next = 12;
|
|
1504
1256
|
return this.checkIntegralExchangeReturn(this.dto.RetailDetails[0].ReturnSourceId);
|
|
1505
1257
|
|
|
1506
|
-
case
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
case 11:
|
|
1510
|
-
_context6.t0 = _context6.t1;
|
|
1511
|
-
|
|
1512
|
-
if (_context6.t0) {
|
|
1513
|
-
_context6.next = 14;
|
|
1514
|
-
break;
|
|
1515
|
-
}
|
|
1258
|
+
case 12:
|
|
1259
|
+
_context3.t1 = _context3.sent;
|
|
1516
1260
|
|
|
1517
|
-
|
|
1261
|
+
case 13:
|
|
1262
|
+
_context3.t0 = _context3.t1;
|
|
1518
1263
|
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
_context6.next = 33;
|
|
1264
|
+
if (_context3.t0) {
|
|
1265
|
+
_context3.next = 16;
|
|
1522
1266
|
break;
|
|
1523
1267
|
}
|
|
1524
1268
|
|
|
1525
|
-
|
|
1526
|
-
//处理存在二开支付情况
|
|
1527
|
-
|
|
1528
|
-
payList = dtoParams.RetailPaymentDetails.filter(function (v) {
|
|
1529
|
-
return v.ThirdPaymentInfo;
|
|
1530
|
-
});
|
|
1269
|
+
_context3.t0 = this.dto.IdbusiType != 37;
|
|
1531
1270
|
|
|
1532
|
-
|
|
1533
|
-
|
|
1271
|
+
case 16:
|
|
1272
|
+
if (!_context3.t0) {
|
|
1273
|
+
_context3.next = 18;
|
|
1534
1274
|
break;
|
|
1535
1275
|
}
|
|
1536
1276
|
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
case 22:
|
|
1543
|
-
ret = _context6.sent;
|
|
1544
|
-
_ref14 = ret || {}, type = _ref14.type, data = _ref14.data, msg = _ref14.msg, code = _ref14.code;
|
|
1545
|
-
|
|
1546
|
-
if (!(type === true)) {
|
|
1547
|
-
_context6.next = 28;
|
|
1548
|
-
break;
|
|
1549
|
-
}
|
|
1277
|
+
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) {
|
|
1278
|
+
_this11.setDtoID(resp.ID);
|
|
1279
|
+
_this11.paymode.checkList = [];
|
|
1280
|
+
_this11.billID = resp.ID;
|
|
1281
|
+
}));
|
|
1550
1282
|
|
|
1551
|
-
|
|
1552
|
-
|
|
1283
|
+
case 18:
|
|
1284
|
+
_context3.next = 21;
|
|
1553
1285
|
break;
|
|
1554
1286
|
|
|
1555
|
-
case
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
case 30:
|
|
1560
|
-
this.dtoParams = dtoParams;
|
|
1561
|
-
console.log('结算信息:', dtoParams);
|
|
1562
|
-
return _context6.abrupt('return', (0, _tplusApi.ccApi)({ dto: dtoParams, cip: IPMSG.query || "" }, '/retail/RetailPos/settle', false, false, { method: 'post', timeout_skip: true }).then(function (resp) {
|
|
1563
|
-
var _ref15 = resp || {},
|
|
1564
|
-
ID = _ref15.ID;
|
|
1565
|
-
|
|
1566
|
-
_this12.setDtoID(ID);
|
|
1567
|
-
_this12.billID = ID;
|
|
1568
|
-
_this12.paymode.checkList = [];
|
|
1287
|
+
case 20:
|
|
1288
|
+
return _context3.abrupt('return', (0, _tplusApi.tApi)({ dto: this.dto.cut() }, 'chanjet.RE.newRetail.Settle', false, false, { timeout_skip: true }).then(function (resp) {
|
|
1289
|
+
_this11.setDtoID(resp.ID);
|
|
1290
|
+
_this11.billID = resp.ID;
|
|
1569
1291
|
}));
|
|
1570
1292
|
|
|
1571
|
-
case
|
|
1293
|
+
case 21:
|
|
1572
1294
|
case 'end':
|
|
1573
|
-
return
|
|
1295
|
+
return _context3.stop();
|
|
1574
1296
|
}
|
|
1575
1297
|
}
|
|
1576
|
-
},
|
|
1298
|
+
}, _callee3, this);
|
|
1577
1299
|
}));
|
|
1578
1300
|
|
|
1579
1301
|
function save() {
|
|
1580
|
-
return
|
|
1302
|
+
return _ref12.apply(this, arguments);
|
|
1581
1303
|
}
|
|
1582
1304
|
|
|
1583
1305
|
return save;
|
|
1584
1306
|
}()
|
|
1585
|
-
|
|
1586
|
-
//裁剪二开支付数据
|
|
1587
|
-
|
|
1588
|
-
}, {
|
|
1589
|
-
key: 'removeThirdPayDto',
|
|
1590
|
-
value: function removeThirdPayDto(dto) {
|
|
1591
|
-
var data = (0, _extends3.default)({}, dto);
|
|
1592
|
-
delete data['DynamicPropertyKeys'];
|
|
1593
|
-
delete data['DynamicPropertyValues'];
|
|
1594
|
-
return data;
|
|
1595
|
-
}
|
|
1596
|
-
|
|
1597
|
-
/**
|
|
1598
|
-
* 二开支付
|
|
1599
|
-
* vType:1零售单、2储值单
|
|
1600
|
-
* payment:结算方式
|
|
1601
|
-
* trade:00表示结算、02表示退款
|
|
1602
|
-
* dto:结算数据集合
|
|
1603
|
-
*/
|
|
1604
|
-
|
|
1605
|
-
}, {
|
|
1606
|
-
key: 'thirdPay',
|
|
1607
|
-
value: function () {
|
|
1608
|
-
var _ref16 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee7(vType, payment, trade, dto) {
|
|
1609
|
-
var cto, params, ret, _ref17, Code, _Message, Result, _ref18, ThirdPaymentReturnInfo;
|
|
1610
|
-
|
|
1611
|
-
return _regenerator2.default.wrap(function _callee7$(_context7) {
|
|
1612
|
-
while (1) {
|
|
1613
|
-
switch (_context7.prev = _context7.next) {
|
|
1614
|
-
case 0:
|
|
1615
|
-
_context7.prev = 0;
|
|
1616
|
-
cto = this.removeThirdPayDto(dto);
|
|
1617
|
-
params = { VoucherType: vType, Payment: payment, TradeType: trade, dto: cto };
|
|
1618
|
-
|
|
1619
|
-
console.log('刷卡信息:', (0, _stringify2.default)(params));
|
|
1620
|
-
_context7.next = 6;
|
|
1621
|
-
return new _promise2.default(function (resolve, reject) {
|
|
1622
|
-
_mutantsMicrofx.nativeMs.setIpcRendererMethod('ThirdPayment', (0, _extends3.default)({}, params), function (res) {
|
|
1623
|
-
return resolve(res);
|
|
1624
|
-
});
|
|
1625
|
-
});
|
|
1626
|
-
|
|
1627
|
-
case 6:
|
|
1628
|
-
ret = _context7.sent;
|
|
1629
|
-
|
|
1630
|
-
console.log('刷卡返回信息:', ret);
|
|
1631
|
-
ret = JSON.parse(ret);
|
|
1632
|
-
_ref17 = ret || {}, Code = _ref17.Code, _Message = _ref17.Message, Result = _ref17.Result;
|
|
1633
|
-
|
|
1634
|
-
if (!(Code > 0)) {
|
|
1635
|
-
_context7.next = 14;
|
|
1636
|
-
break;
|
|
1637
|
-
}
|
|
1638
|
-
|
|
1639
|
-
return _context7.abrupt('return', { type: false, data: null, msg: _Message, code: Code });
|
|
1640
|
-
|
|
1641
|
-
case 14:
|
|
1642
|
-
if (!(trade == '00')) {
|
|
1643
|
-
_context7.next = 20;
|
|
1644
|
-
break;
|
|
1645
|
-
}
|
|
1646
|
-
|
|
1647
|
-
_ref18 = Result || {}, ThirdPaymentReturnInfo = _ref18.ThirdPaymentReturnInfo;
|
|
1648
|
-
|
|
1649
|
-
if (vType == 1) {
|
|
1650
|
-
dto.RetailPaymentDetails.forEach(function (v) {
|
|
1651
|
-
if (v.ThirdPaymentInfo != null) {
|
|
1652
|
-
v.ThirdPaymentReturnInfo = ThirdPaymentReturnInfo;
|
|
1653
|
-
}
|
|
1654
|
-
});
|
|
1655
|
-
} else if (vType == 2) {
|
|
1656
|
-
dto.StorageMutiSettleDetails.forEach(function (v) {
|
|
1657
|
-
if (v.ThirdPaymentInfo != null) {
|
|
1658
|
-
v.ThirdPaymentReturnInfo = ThirdPaymentReturnInfo;
|
|
1659
|
-
}
|
|
1660
|
-
});
|
|
1661
|
-
}
|
|
1662
|
-
return _context7.abrupt('return', { type: true, data: dto, msg: _Message, code: Code });
|
|
1663
|
-
|
|
1664
|
-
case 20:
|
|
1665
|
-
if (!(trade == '02')) {
|
|
1666
|
-
_context7.next = 22;
|
|
1667
|
-
break;
|
|
1668
|
-
}
|
|
1669
|
-
|
|
1670
|
-
return _context7.abrupt('return', { type: true, data: dto, msg: _Message, code: Code });
|
|
1671
|
-
|
|
1672
|
-
case 22:
|
|
1673
|
-
_context7.next = 27;
|
|
1674
|
-
break;
|
|
1675
|
-
|
|
1676
|
-
case 24:
|
|
1677
|
-
_context7.prev = 24;
|
|
1678
|
-
_context7.t0 = _context7['catch'](0);
|
|
1679
|
-
return _context7.abrupt('return', { type: false, data: null, msg: _context7.t0 });
|
|
1680
|
-
|
|
1681
|
-
case 27:
|
|
1682
|
-
case 'end':
|
|
1683
|
-
return _context7.stop();
|
|
1684
|
-
}
|
|
1685
|
-
}
|
|
1686
|
-
}, _callee7, this, [[0, 24]]);
|
|
1687
|
-
}));
|
|
1688
|
-
|
|
1689
|
-
function thirdPay(_x4, _x5, _x6, _x7) {
|
|
1690
|
-
return _ref16.apply(this, arguments);
|
|
1691
|
-
}
|
|
1692
|
-
|
|
1693
|
-
return thirdPay;
|
|
1694
|
-
}()
|
|
1695
|
-
|
|
1696
|
-
//二开支付强制退款情况
|
|
1697
|
-
|
|
1698
|
-
}, {
|
|
1699
|
-
key: 'thirdPayRefund',
|
|
1700
|
-
value: function () {
|
|
1701
|
-
var _ref19 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee9(type) {
|
|
1702
|
-
var _this13 = this;
|
|
1703
|
-
|
|
1704
|
-
var dto, pay, payment, _enumController$getEn17, TradeType;
|
|
1705
|
-
|
|
1706
|
-
return _regenerator2.default.wrap(function _callee9$(_context9) {
|
|
1707
|
-
while (1) {
|
|
1708
|
-
switch (_context9.prev = _context9.next) {
|
|
1709
|
-
case 0:
|
|
1710
|
-
dto = type == 1 ? this.dtoParams.RetailPaymentDetails : this.dtoParams.StorageMutiSettleDetails;
|
|
1711
|
-
pay = dto && dto.filter(function (v) {
|
|
1712
|
-
return v.ThirdPaymentInfo;
|
|
1713
|
-
});
|
|
1714
|
-
|
|
1715
|
-
if (pay && pay.length > 0) {
|
|
1716
|
-
setTimeout(function () {
|
|
1717
|
-
_message2.default.warn("支付出现异常,将发起刷卡退款。", { duration: 4.5 });
|
|
1718
|
-
}, 1000);
|
|
1719
|
-
payment = pay[0];
|
|
1720
|
-
_enumController$getEn17 = _mutantsUtil.enumController.getEnumOj(), TradeType = _enumController$getEn17.TradeType;
|
|
1721
|
-
|
|
1722
|
-
setTimeout((0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee8() {
|
|
1723
|
-
var ret, _ref21, msg;
|
|
1724
|
-
|
|
1725
|
-
return _regenerator2.default.wrap(function _callee8$(_context8) {
|
|
1726
|
-
while (1) {
|
|
1727
|
-
switch (_context8.prev = _context8.next) {
|
|
1728
|
-
case 0:
|
|
1729
|
-
_context8.next = 2;
|
|
1730
|
-
return _this13.thirdPay(type, payment, TradeType.REFUND, dto);
|
|
1731
|
-
|
|
1732
|
-
case 2:
|
|
1733
|
-
ret = _context8.sent;
|
|
1734
|
-
_ref21 = ret || {}, msg = _ref21.msg;
|
|
1735
|
-
|
|
1736
|
-
console.log('\u5237\u5361\u652F\u4ED8\u9000\u6B3E:' + msg);
|
|
1737
|
-
|
|
1738
|
-
case 5:
|
|
1739
|
-
case 'end':
|
|
1740
|
-
return _context8.stop();
|
|
1741
|
-
}
|
|
1742
|
-
}
|
|
1743
|
-
}, _callee8, _this13);
|
|
1744
|
-
})), 4500);
|
|
1745
|
-
}
|
|
1746
|
-
|
|
1747
|
-
case 3:
|
|
1748
|
-
case 'end':
|
|
1749
|
-
return _context9.stop();
|
|
1750
|
-
}
|
|
1751
|
-
}
|
|
1752
|
-
}, _callee9, this);
|
|
1753
|
-
}));
|
|
1754
|
-
|
|
1755
|
-
function thirdPayRefund(_x8) {
|
|
1756
|
-
return _ref19.apply(this, arguments);
|
|
1757
|
-
}
|
|
1758
|
-
|
|
1759
|
-
return thirdPayRefund;
|
|
1760
|
-
}()
|
|
1761
1307
|
}, {
|
|
1762
1308
|
key: 'setDtoID',
|
|
1763
1309
|
value: function setDtoID(id) {
|
|
@@ -1766,35 +1312,35 @@ var SettlementStore = (_class = function () {
|
|
|
1766
1312
|
}, {
|
|
1767
1313
|
key: 'querySettleResult',
|
|
1768
1314
|
value: function () {
|
|
1769
|
-
var
|
|
1770
|
-
return _regenerator2.default.wrap(function
|
|
1315
|
+
var _ref15 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee4() {
|
|
1316
|
+
return _regenerator2.default.wrap(function _callee4$(_context4) {
|
|
1771
1317
|
while (1) {
|
|
1772
|
-
switch (
|
|
1318
|
+
switch (_context4.prev = _context4.next) {
|
|
1773
1319
|
case 0:
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1320
|
+
_context4.prev = 0;
|
|
1321
|
+
_context4.t0 = _promise2.default;
|
|
1322
|
+
_context4.next = 4;
|
|
1777
1323
|
return (0, _tplusApi.tApi)({ RetailCode: this.dto.Code }, 'chanjet.RE.newRetail.QuerySettleResult', false, false, { timeout_skip: true });
|
|
1778
1324
|
|
|
1779
1325
|
case 4:
|
|
1780
|
-
|
|
1781
|
-
return
|
|
1326
|
+
_context4.t1 = _context4.sent;
|
|
1327
|
+
return _context4.abrupt('return', _context4.t0.resolve.call(_context4.t0, _context4.t1));
|
|
1782
1328
|
|
|
1783
1329
|
case 8:
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
return
|
|
1330
|
+
_context4.prev = 8;
|
|
1331
|
+
_context4.t2 = _context4['catch'](0);
|
|
1332
|
+
return _context4.abrupt('return', _promise2.default.resolve({ Flag: "1" }));
|
|
1787
1333
|
|
|
1788
1334
|
case 11:
|
|
1789
1335
|
case 'end':
|
|
1790
|
-
return
|
|
1336
|
+
return _context4.stop();
|
|
1791
1337
|
}
|
|
1792
1338
|
}
|
|
1793
|
-
},
|
|
1339
|
+
}, _callee4, this, [[0, 8]]);
|
|
1794
1340
|
}));
|
|
1795
1341
|
|
|
1796
1342
|
function querySettleResult() {
|
|
1797
|
-
return
|
|
1343
|
+
return _ref15.apply(this, arguments);
|
|
1798
1344
|
}
|
|
1799
1345
|
|
|
1800
1346
|
return querySettleResult;
|
|
@@ -1820,131 +1366,99 @@ var SettlementStore = (_class = function () {
|
|
|
1820
1366
|
}, {
|
|
1821
1367
|
key: 'validePwd',
|
|
1822
1368
|
value: function () {
|
|
1823
|
-
var
|
|
1824
|
-
var
|
|
1369
|
+
var _ref16 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee5(value) {
|
|
1370
|
+
var _ref17, isNewRetailBCPos, cook1, cook2, message, memberId, result, count, _result;
|
|
1825
1371
|
|
|
1826
|
-
return _regenerator2.default.wrap(function
|
|
1372
|
+
return _regenerator2.default.wrap(function _callee5$(_context5) {
|
|
1827
1373
|
while (1) {
|
|
1828
|
-
switch (
|
|
1374
|
+
switch (_context5.prev = _context5.next) {
|
|
1829
1375
|
case 0:
|
|
1830
|
-
|
|
1831
|
-
|
|
1376
|
+
_ref17 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref17.isNewRetailBCPos;
|
|
1377
|
+
_context5.prev = 1;
|
|
1832
1378
|
|
|
1833
1379
|
if (!isNewRetailBCPos) {
|
|
1834
|
-
|
|
1380
|
+
_context5.next = 19;
|
|
1835
1381
|
break;
|
|
1836
1382
|
}
|
|
1837
1383
|
|
|
1838
1384
|
cook1 = this.getAllCookies()['errorPwd'];
|
|
1839
1385
|
cook2 = cook1 && JSON.parse(cook1);
|
|
1840
1386
|
message = '密码输入错误';
|
|
1841
|
-
|
|
1387
|
+
memberId = this.paymode.currentMode.member.MeStorageCardId;
|
|
1842
1388
|
|
|
1843
1389
|
if (!cook2) {
|
|
1844
|
-
|
|
1390
|
+
_context5.next = 12;
|
|
1845
1391
|
break;
|
|
1846
1392
|
}
|
|
1847
1393
|
|
|
1848
|
-
if (!cook2.hasOwnProperty(
|
|
1849
|
-
|
|
1394
|
+
if (!cook2.hasOwnProperty(memberId + "")) {
|
|
1395
|
+
_context5.next = 12;
|
|
1850
1396
|
break;
|
|
1851
1397
|
}
|
|
1852
1398
|
|
|
1853
|
-
if (!(cook2[
|
|
1854
|
-
|
|
1399
|
+
if (!(cook2[memberId] > 3)) {
|
|
1400
|
+
_context5.next = 12;
|
|
1855
1401
|
break;
|
|
1856
1402
|
}
|
|
1857
1403
|
|
|
1858
1404
|
message = '今日密码错误已达上限,不可使用储值消费,请明日再试,如忘记请重置密码或修改密码。';
|
|
1859
|
-
return
|
|
1405
|
+
return _context5.abrupt('return', _promise2.default.resolve(message));
|
|
1860
1406
|
|
|
1861
1407
|
case 12:
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
if (!(cardTypeEnum === 'BALANCE_CARD')) {
|
|
1866
|
-
_context11.next = 20;
|
|
1867
|
-
break;
|
|
1868
|
-
}
|
|
1869
|
-
|
|
1870
|
-
_context11.next = 17;
|
|
1871
|
-
return (0, _tplusApi.ccApi)({ md5Password: _tplusApi.User.pwdEncrypt(value.pwd), cardType: cardTypeEnum }, '/member/MeMemberWallet/checkPaymentPassword/' + memberId, false, false);
|
|
1872
|
-
|
|
1873
|
-
case 17:
|
|
1874
|
-
result = _context11.sent;
|
|
1875
|
-
_context11.next = 29;
|
|
1876
|
-
break;
|
|
1877
|
-
|
|
1878
|
-
case 20:
|
|
1879
|
-
if (!(cardStatusEnum === 'BINDING' && this.member && this.member.ID === memberId)) {
|
|
1880
|
-
_context11.next = 26;
|
|
1881
|
-
break;
|
|
1882
|
-
}
|
|
1883
|
-
|
|
1884
|
-
_context11.next = 23;
|
|
1885
|
-
return (0, _tplusApi.ccApi)({ md5Password: _tplusApi.User.pwdEncrypt(value.pwd), password: value.pwd, cardType: cardTypeEnum }, '/member/MeMemberWallet/checkPaymentPassword/' + meStorageCardId, false, false);
|
|
1886
|
-
|
|
1887
|
-
case 23:
|
|
1888
|
-
result = _context11.sent;
|
|
1889
|
-
_context11.next = 29;
|
|
1890
|
-
break;
|
|
1408
|
+
_context5.next = 14;
|
|
1409
|
+
return (0, _tplusApi.ccApi)({ password: _tplusApi.User.pwdEncrypt(value.pwd) }, '/member/MeMemberWallet/checkPaymentPassword/' + value.id, false, false);
|
|
1891
1410
|
|
|
1892
|
-
case
|
|
1893
|
-
|
|
1894
|
-
return (0, _tplusApi.ccApi)({ password: value.pwd, cardType: cardTypeEnum }, '/member/MeMemberWallet/checkPaymentPassword/' + meStorageCardId, false, false);
|
|
1895
|
-
|
|
1896
|
-
case 28:
|
|
1897
|
-
result = _context11.sent;
|
|
1411
|
+
case 14:
|
|
1412
|
+
result = _context5.sent;
|
|
1898
1413
|
|
|
1899
|
-
case 29:
|
|
1900
1414
|
if (!result.data) {
|
|
1901
1415
|
if (cook2) {
|
|
1902
|
-
if (cook2.hasOwnProperty(
|
|
1903
|
-
count = cook2[
|
|
1416
|
+
if (cook2.hasOwnProperty(memberId + "")) {
|
|
1417
|
+
count = cook2[memberId];
|
|
1904
1418
|
|
|
1905
|
-
cook2[
|
|
1419
|
+
cook2[memberId] = count + 1;
|
|
1906
1420
|
} else {
|
|
1907
|
-
cook2[
|
|
1421
|
+
cook2[memberId] = 1;
|
|
1908
1422
|
}
|
|
1909
1423
|
} else {
|
|
1910
1424
|
cook2 = {};
|
|
1911
|
-
cook2[
|
|
1425
|
+
cook2[memberId] = 1;
|
|
1912
1426
|
}
|
|
1913
1427
|
this.setCookie('errorPwd', '', -1);
|
|
1914
1428
|
this.setCookie('errorPwd', (0, _stringify2.default)(cook2));
|
|
1915
1429
|
}
|
|
1916
|
-
return
|
|
1430
|
+
return _context5.abrupt('return', _promise2.default.resolve(result.data ? "" : message));
|
|
1917
1431
|
|
|
1918
|
-
case
|
|
1919
|
-
|
|
1432
|
+
case 19:
|
|
1433
|
+
_context5.next = 21;
|
|
1920
1434
|
return (0, _tplusApi.tApi)({ "CheckoutParams": {
|
|
1921
1435
|
"Idmember": value.id,
|
|
1922
1436
|
"Password": value.pwd
|
|
1923
1437
|
} }, 'AA.DR.newRetailMember.CheckoutMemberPassword', false, false);
|
|
1924
1438
|
|
|
1925
|
-
case
|
|
1926
|
-
_result =
|
|
1927
|
-
return
|
|
1439
|
+
case 21:
|
|
1440
|
+
_result = _context5.sent;
|
|
1441
|
+
return _context5.abrupt('return', _promise2.default.resolve(_result.Success ? "" : _result.Message));
|
|
1928
1442
|
|
|
1929
|
-
case
|
|
1930
|
-
|
|
1443
|
+
case 23:
|
|
1444
|
+
_context5.next = 28;
|
|
1931
1445
|
break;
|
|
1932
1446
|
|
|
1933
|
-
case
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
return
|
|
1447
|
+
case 25:
|
|
1448
|
+
_context5.prev = 25;
|
|
1449
|
+
_context5.t0 = _context5['catch'](1);
|
|
1450
|
+
return _context5.abrupt('return', "failed");
|
|
1937
1451
|
|
|
1938
|
-
case
|
|
1452
|
+
case 28:
|
|
1939
1453
|
case 'end':
|
|
1940
|
-
return
|
|
1454
|
+
return _context5.stop();
|
|
1941
1455
|
}
|
|
1942
1456
|
}
|
|
1943
|
-
},
|
|
1457
|
+
}, _callee5, this, [[1, 25]]);
|
|
1944
1458
|
}));
|
|
1945
1459
|
|
|
1946
|
-
function validePwd(
|
|
1947
|
-
return
|
|
1460
|
+
function validePwd(_x3) {
|
|
1461
|
+
return _ref16.apply(this, arguments);
|
|
1948
1462
|
}
|
|
1949
1463
|
|
|
1950
1464
|
return validePwd;
|
|
@@ -1954,7 +1468,7 @@ var SettlementStore = (_class = function () {
|
|
|
1954
1468
|
}(), (_descriptor = _applyDecoratedDescriptor(_class.prototype, 'queryPwd', [_mobx.action], {
|
|
1955
1469
|
enumerable: true,
|
|
1956
1470
|
initializer: function initializer() {
|
|
1957
|
-
var
|
|
1471
|
+
var _this12 = this;
|
|
1958
1472
|
|
|
1959
1473
|
return function (newPass, newPassConfirm) {
|
|
1960
1474
|
if (!newPass || !newPassConfirm) {
|
|
@@ -1966,7 +1480,7 @@ var SettlementStore = (_class = function () {
|
|
|
1966
1480
|
var idstore = (0, _tplusPoslogin.PosInitData)('storeID');
|
|
1967
1481
|
return (0, _tplusApi.ccApi)({
|
|
1968
1482
|
Idstore: idstore,
|
|
1969
|
-
meMemberId:
|
|
1483
|
+
meMemberId: _this12.member.ID,
|
|
1970
1484
|
oldPassword: null,
|
|
1971
1485
|
newPassword: _tplusApi.User.pwdEncrypt(newPassConfirm),
|
|
1972
1486
|
dataSource: "POS"
|
|
@@ -1980,133 +1494,40 @@ var SettlementStore = (_class = function () {
|
|
|
1980
1494
|
}), _applyDecoratedDescriptor(_class.prototype, 'initByOriginReturn', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'initByOriginReturn'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'quickSettle', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'quickSettle'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'changeFocusAndAddPay', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'changeFocusAndAddPay'), _class.prototype), _descriptor2 = _applyDecoratedDescriptor(_class.prototype, 'updateMemberInfo', [_mobx.action], {
|
|
1981
1495
|
enumerable: true,
|
|
1982
1496
|
initializer: function initializer() {
|
|
1983
|
-
var
|
|
1497
|
+
var _this13 = this;
|
|
1984
1498
|
|
|
1985
1499
|
return function () {
|
|
1986
|
-
var
|
|
1500
|
+
var _ref18 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee6(_this) {
|
|
1987
1501
|
var _getLoginInfo, IdStore, StoreCode, resp;
|
|
1988
1502
|
|
|
1989
|
-
return _regenerator2.default.wrap(function
|
|
1503
|
+
return _regenerator2.default.wrap(function _callee6$(_context6) {
|
|
1990
1504
|
while (1) {
|
|
1991
|
-
switch (
|
|
1505
|
+
switch (_context6.prev = _context6.next) {
|
|
1992
1506
|
case 0:
|
|
1993
|
-
_getLoginInfo =
|
|
1994
|
-
|
|
1995
|
-
return (0, _tplusApi.tApi)({ Idmember:
|
|
1507
|
+
_getLoginInfo = _this13.getLoginInfo(), IdStore = _getLoginInfo.IdStore, StoreCode = _getLoginInfo.StoreCode;
|
|
1508
|
+
_context6.next = 3;
|
|
1509
|
+
return (0, _tplusApi.tApi)({ Idmember: _this13.member.ID, IdStore: IdStore, StoreCode: StoreCode }, 'chanjet.AA.DR.INewRetailMember.GetUmemberDTO', false, false);
|
|
1996
1510
|
|
|
1997
1511
|
case 3:
|
|
1998
|
-
resp =
|
|
1512
|
+
resp = _context6.sent;
|
|
1999
1513
|
|
|
2000
1514
|
_this.member = resp;
|
|
2001
|
-
_this.paymode.
|
|
2002
|
-
return
|
|
1515
|
+
_this.paymode.currentMode.member.setStorageCardNo(resp.StorageCardNo);
|
|
1516
|
+
return _context6.abrupt('return', _promise2.default.resolve(resp));
|
|
2003
1517
|
|
|
2004
1518
|
case 7:
|
|
2005
1519
|
case 'end':
|
|
2006
|
-
return
|
|
2007
|
-
}
|
|
2008
|
-
}
|
|
2009
|
-
}, _callee12, _this15);
|
|
2010
|
-
}));
|
|
2011
|
-
|
|
2012
|
-
return function (_x10) {
|
|
2013
|
-
return _ref25.apply(this, arguments);
|
|
2014
|
-
};
|
|
2015
|
-
}();
|
|
2016
|
-
}
|
|
2017
|
-
}), _descriptor3 = _applyDecoratedDescriptor(_class.prototype, 'updateCurrentMode', [_mobx.action], {
|
|
2018
|
-
enumerable: true,
|
|
2019
|
-
initializer: function initializer() {
|
|
2020
|
-
var _this16 = this;
|
|
2021
|
-
|
|
2022
|
-
return function () {
|
|
2023
|
-
var _ref26 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee13(memberId) {
|
|
2024
|
-
var result;
|
|
2025
|
-
return _regenerator2.default.wrap(function _callee13$(_context13) {
|
|
2026
|
-
while (1) {
|
|
2027
|
-
switch (_context13.prev = _context13.next) {
|
|
2028
|
-
case 0:
|
|
2029
|
-
_context13.next = 2;
|
|
2030
|
-
return (0, _tplusApi.ccApi)({}, '/marketingtool/MeStorageCard/getCardInfoByMemberId/' + memberId + '/' + true, false, false, { method: 'get' });
|
|
2031
|
-
|
|
2032
|
-
case 2:
|
|
2033
|
-
result = _context13.sent;
|
|
2034
|
-
|
|
2035
|
-
if (!(result && result.data.length)) {
|
|
2036
|
-
_context13.next = 20;
|
|
2037
|
-
break;
|
|
2038
|
-
}
|
|
2039
|
-
|
|
2040
|
-
if (!(result.data.length === 1)) {
|
|
2041
|
-
_context13.next = 9;
|
|
2042
|
-
break;
|
|
2043
|
-
}
|
|
2044
|
-
|
|
2045
|
-
_this16.paymode.updateCardInfo(result.data[0]);
|
|
2046
|
-
return _context13.abrupt('return', result.data);
|
|
2047
|
-
|
|
2048
|
-
case 9:
|
|
2049
|
-
if (!(result.data && result.data.length === 1)) {
|
|
2050
|
-
_context13.next = 14;
|
|
2051
|
-
break;
|
|
2052
|
-
}
|
|
2053
|
-
|
|
2054
|
-
_this16.paymode.updateCardInfo(result.data[0]);
|
|
2055
|
-
return _context13.abrupt('return', result.data);
|
|
2056
|
-
|
|
2057
|
-
case 14:
|
|
2058
|
-
if (!(result.data && result.data.length > 1)) {
|
|
2059
|
-
_context13.next = 18;
|
|
2060
|
-
break;
|
|
2061
|
-
}
|
|
2062
|
-
|
|
2063
|
-
return _context13.abrupt('return', result.data);
|
|
2064
|
-
|
|
2065
|
-
case 18:
|
|
2066
|
-
_message2.default.warn('没有可用储值卡!');
|
|
2067
|
-
return _context13.abrupt('return', false);
|
|
2068
|
-
|
|
2069
|
-
case 20:
|
|
2070
|
-
case 'end':
|
|
2071
|
-
return _context13.stop();
|
|
1520
|
+
return _context6.stop();
|
|
2072
1521
|
}
|
|
2073
1522
|
}
|
|
2074
|
-
},
|
|
1523
|
+
}, _callee6, _this13);
|
|
2075
1524
|
}));
|
|
2076
1525
|
|
|
2077
|
-
return function (
|
|
2078
|
-
return
|
|
1526
|
+
return function (_x4) {
|
|
1527
|
+
return _ref18.apply(this, arguments);
|
|
2079
1528
|
};
|
|
2080
1529
|
}();
|
|
2081
1530
|
}
|
|
2082
|
-
}), _descriptor4 = _applyDecoratedDescriptor(_class.prototype, 'updateCardInfo', [_mobx.action], {
|
|
2083
|
-
enumerable: true,
|
|
2084
|
-
initializer: function initializer() {
|
|
2085
|
-
var _this17 = this;
|
|
2086
|
-
|
|
2087
|
-
return (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee14() {
|
|
2088
|
-
var address, result;
|
|
2089
|
-
return _regenerator2.default.wrap(function _callee14$(_context14) {
|
|
2090
|
-
while (1) {
|
|
2091
|
-
switch (_context14.prev = _context14.next) {
|
|
2092
|
-
case 0:
|
|
2093
|
-
address = '/marketingtool/MeStorageCard/getCardInfoByCardNo/' + _this17.paymode.currentMode.storageCardNo;
|
|
2094
|
-
_context14.next = 3;
|
|
2095
|
-
return (0, _tplusApi.ccApi)({}, address, false, false, { method: 'get', timeout_skip: true });
|
|
2096
|
-
|
|
2097
|
-
case 3:
|
|
2098
|
-
result = _context14.sent;
|
|
2099
|
-
|
|
2100
|
-
_this17.paymode.updateCardInfo(result.data);
|
|
2101
|
-
|
|
2102
|
-
case 5:
|
|
2103
|
-
case 'end':
|
|
2104
|
-
return _context14.stop();
|
|
2105
|
-
}
|
|
2106
|
-
}
|
|
2107
|
-
}, _callee14, _this17);
|
|
2108
|
-
}));
|
|
2109
|
-
}
|
|
2110
1531
|
}), _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);
|
|
2111
1532
|
exports.default = SettlementStore;
|
|
2112
1533
|
var PayMode = exports.PayMode = (_class3 = function () {
|
|
@@ -2121,19 +1542,15 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
2121
1542
|
this.onlineamount = 0;
|
|
2122
1543
|
this.maxamount = 0;
|
|
2123
1544
|
|
|
2124
|
-
_initDefineProp(this, 'currentFocus',
|
|
1545
|
+
_initDefineProp(this, 'currentFocus', _descriptor3, this);
|
|
2125
1546
|
|
|
2126
|
-
_initDefineProp(this, 'received',
|
|
1547
|
+
_initDefineProp(this, 'received', _descriptor4, this);
|
|
2127
1548
|
|
|
2128
|
-
_initDefineProp(this, 'receivable',
|
|
1549
|
+
_initDefineProp(this, 'receivable', _descriptor5, this);
|
|
2129
1550
|
|
|
2130
|
-
_initDefineProp(this, 'paymodes',
|
|
1551
|
+
_initDefineProp(this, 'paymodes', _descriptor6, this);
|
|
2131
1552
|
|
|
2132
|
-
_initDefineProp(this, 'thePaymodes',
|
|
2133
|
-
|
|
2134
|
-
_initDefineProp(this, 'storageCardNo', _descriptor10, this);
|
|
2135
|
-
|
|
2136
|
-
_initDefineProp(this, 'balance', _descriptor11, this);
|
|
1553
|
+
_initDefineProp(this, 'thePaymodes', _descriptor7, this);
|
|
2137
1554
|
|
|
2138
1555
|
this.currentMode = null;
|
|
2139
1556
|
this.checkList = [];
|
|
@@ -2142,11 +1559,11 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
2142
1559
|
hotKey: "Ctrl+M"
|
|
2143
1560
|
};
|
|
2144
1561
|
|
|
2145
|
-
_initDefineProp(this, 'calcCheckList',
|
|
1562
|
+
_initDefineProp(this, 'calcCheckList', _descriptor8, this);
|
|
2146
1563
|
|
|
2147
|
-
_initDefineProp(this, 'setCouponNum',
|
|
1564
|
+
_initDefineProp(this, 'setCouponNum', _descriptor9, this);
|
|
2148
1565
|
|
|
2149
|
-
_initDefineProp(this, 'addDjqs',
|
|
1566
|
+
_initDefineProp(this, 'addDjqs', _descriptor10, this);
|
|
2150
1567
|
}
|
|
2151
1568
|
// @observable store = null;
|
|
2152
1569
|
|
|
@@ -2182,30 +1599,10 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
2182
1599
|
this.received = (0, _utils.getFixedNumber)(sum);
|
|
2183
1600
|
this.receivable = (0, _utils.getFixedNumber)(this.amount - sum);
|
|
2184
1601
|
}
|
|
2185
|
-
}, {
|
|
2186
|
-
key: 'updateMemberStorageCardNo',
|
|
2187
|
-
value: function updateMemberStorageCardNo(storageCardNo, walletEnabled) {
|
|
2188
|
-
this.currentMode.storageCardNo = storageCardNo;
|
|
2189
|
-
this.currentMode.walletEnabled = walletEnabled;
|
|
2190
|
-
}
|
|
2191
|
-
}, {
|
|
2192
|
-
key: 'updateCardInfo',
|
|
2193
|
-
value: function updateCardInfo(m) {
|
|
2194
|
-
this.currentMode.cardStatusEnum = m.CardStatusEnum;
|
|
2195
|
-
this.currentMode.isNeedPassword = m.IsNeedPassword;
|
|
2196
|
-
this.currentMode.meStorageCardId = m.MeStorageCardId;
|
|
2197
|
-
this.currentMode.storageCardNo = m.StorageCardNo;
|
|
2198
|
-
this.currentMode.balance = m.BalanceStorage;
|
|
2199
|
-
this.currentMode.rawbalance = m.BalanceStorage;
|
|
2200
|
-
this.currentMode.cardTypeEnum = m.CardTypeEnum;
|
|
2201
|
-
this.currentMode.walletEnabled = m.WalletEnabled;
|
|
2202
|
-
this.currentMode.memberId = m.ID;
|
|
2203
|
-
this.currentMode.freePaymentPasswordStore = m.FreePaymentPasswordStore;
|
|
2204
|
-
}
|
|
2205
1602
|
}, {
|
|
2206
1603
|
key: 'calcDjqCheckValue',
|
|
2207
1604
|
value: function calcDjqCheckValue(q1, dto, params) {
|
|
2208
|
-
var
|
|
1605
|
+
var _this14 = this;
|
|
2209
1606
|
|
|
2210
1607
|
var useLimitPerOrder = (0, _tplusPoslogin.PosInitData)('UseLimitPerOrder');
|
|
2211
1608
|
var qList = (0, _filter3.default)(this.currentMode.djqs, function (djq) {
|
|
@@ -2219,12 +1616,12 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
2219
1616
|
this.checkList = [];
|
|
2220
1617
|
}
|
|
2221
1618
|
|
|
2222
|
-
var
|
|
2223
|
-
isNewRetailBCPos =
|
|
1619
|
+
var _ref19 = _mutantsUtil.platform || {},
|
|
1620
|
+
isNewRetailBCPos = _ref19.isNewRetailBCPos;
|
|
2224
1621
|
|
|
2225
|
-
var _enumController$
|
|
2226
|
-
PayStyle = _enumController$
|
|
2227
|
-
Differentiate = _enumController$
|
|
1622
|
+
var _enumController$getEn15 = _mutantsUtil.enumController.getEnumOj(),
|
|
1623
|
+
PayStyle = _enumController$getEn15.PayStyle,
|
|
1624
|
+
Differentiate = _enumController$getEn15.Differentiate;
|
|
2228
1625
|
|
|
2229
1626
|
if (q1) {
|
|
2230
1627
|
if (!this.currentMode.boriginReturn && parseFloat(this.currentMode.maxamount) <= 0) {
|
|
@@ -2252,7 +1649,7 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
2252
1649
|
if (!q1.checked) {
|
|
2253
1650
|
this.checkList.forEach(function (ele, i) {
|
|
2254
1651
|
if (ele.id === q1.id) {
|
|
2255
|
-
|
|
1652
|
+
_this14.checkList.splice(i, 1);
|
|
2256
1653
|
}
|
|
2257
1654
|
});
|
|
2258
1655
|
} else {
|
|
@@ -2324,24 +1721,24 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
2324
1721
|
if (result && result.length != 0) {
|
|
2325
1722
|
result.forEach(function (element, index) {
|
|
2326
1723
|
var djq1 = false;
|
|
2327
|
-
|
|
1724
|
+
_this14.currentMode.djqs.forEach(function (djq) {
|
|
2328
1725
|
if (element.id === djq.id) {
|
|
2329
1726
|
djq1 = true;
|
|
2330
1727
|
}
|
|
2331
1728
|
});
|
|
2332
1729
|
|
|
2333
|
-
var
|
|
2334
|
-
couponCode =
|
|
2335
|
-
name =
|
|
2336
|
-
tieredAmountResult =
|
|
2337
|
-
fromDate =
|
|
2338
|
-
dateMount =
|
|
2339
|
-
promoMethodEnum =
|
|
2340
|
-
discountPct =
|
|
2341
|
-
nominalAmount =
|
|
2342
|
-
promoId =
|
|
2343
|
-
id =
|
|
2344
|
-
doorsill =
|
|
1730
|
+
var _ref20 = element || {},
|
|
1731
|
+
couponCode = _ref20.couponCode,
|
|
1732
|
+
name = _ref20.name,
|
|
1733
|
+
tieredAmountResult = _ref20.tieredAmountResult,
|
|
1734
|
+
fromDate = _ref20.fromDate,
|
|
1735
|
+
dateMount = _ref20.dateMount,
|
|
1736
|
+
promoMethodEnum = _ref20.promoMethodEnum,
|
|
1737
|
+
discountPct = _ref20.discountPct,
|
|
1738
|
+
nominalAmount = _ref20.nominalAmount,
|
|
1739
|
+
promoId = _ref20.promoId,
|
|
1740
|
+
id = _ref20.id,
|
|
1741
|
+
doorsill = _ref20.doorsill;
|
|
2345
1742
|
|
|
2346
1743
|
var condValue = tieredAmountResult.condValue,
|
|
2347
1744
|
promoDiscount = tieredAmountResult.promoDiscount,
|
|
@@ -2369,10 +1766,10 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
2369
1766
|
// couponCategoryEnum: tieredAmountResult.couponCategoryEnum,
|
|
2370
1767
|
// id
|
|
2371
1768
|
// })
|
|
2372
|
-
|
|
1769
|
+
_this14.addDjqs(couponCode, name, true, nominalAmount, doorsill, element.LastTS, false, true, dto.Idmember, dateMount, displayText, promoMethodEnum, discountPct, promoId, promoRuleId, tieredAmountResult.couponCategoryEnum, id);
|
|
2373
1770
|
djq1 = false;
|
|
2374
1771
|
} else {
|
|
2375
|
-
|
|
1772
|
+
_this14.setCouponNum(element.id, tieredAmountResult.couponCategoryEnum, promoMethodEnum, nominalAmount, promoDiscount);
|
|
2376
1773
|
// this.currentMode.djqs[0].couponCategoryEnum = 'couponCategoryEnum';
|
|
2377
1774
|
// djq1.couponCategoryEnum = element.tieredAmountResult.couponCategoryEnum
|
|
2378
1775
|
}
|
|
@@ -2385,11 +1782,11 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
2385
1782
|
}, {
|
|
2386
1783
|
key: 'calcDjqValue',
|
|
2387
1784
|
value: function calcDjqValue(q1) {
|
|
2388
|
-
var
|
|
2389
|
-
isNewRetailBCPos =
|
|
1785
|
+
var _ref21 = _mutantsUtil.platform || {},
|
|
1786
|
+
isNewRetailBCPos = _ref21.isNewRetailBCPos;
|
|
2390
1787
|
|
|
2391
|
-
var _enumController$
|
|
2392
|
-
Differentiate = _enumController$
|
|
1788
|
+
var _enumController$getEn16 = _mutantsUtil.enumController.getEnumOj(),
|
|
1789
|
+
Differentiate = _enumController$getEn16.Differentiate;
|
|
2393
1790
|
|
|
2394
1791
|
if (q1) {
|
|
2395
1792
|
if (!this.currentMode.boriginReturn && parseFloat(this.currentMode.maxamount) <= 0) {
|
|
@@ -2451,8 +1848,8 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
2451
1848
|
this.currentMode.errinfo = '';
|
|
2452
1849
|
var sum = this.amount;
|
|
2453
1850
|
|
|
2454
|
-
var _enumController$
|
|
2455
|
-
PayStyle = _enumController$
|
|
1851
|
+
var _enumController$getEn17 = _mutantsUtil.enumController.getEnumOj(),
|
|
1852
|
+
PayStyle = _enumController$getEn17.PayStyle;
|
|
2456
1853
|
|
|
2457
1854
|
this.thePaymodes && this.thePaymodes.forEach(function (mode) {
|
|
2458
1855
|
if (mode.paymentType === PayStyle.hyczk) {
|
|
@@ -2471,40 +1868,37 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
2471
1868
|
}, {
|
|
2472
1869
|
key: 'calcMemberBalance',
|
|
2473
1870
|
value: function calcMemberBalance() {
|
|
2474
|
-
this.currentMode.balance = this.currentMode.rawbalance - this.currentMode.value;
|
|
1871
|
+
this.currentMode.balance = this.currentMode.member.rawbalance - this.currentMode.value;
|
|
2475
1872
|
}
|
|
2476
1873
|
}, {
|
|
2477
1874
|
key: 'setPaymodes',
|
|
2478
1875
|
value: function () {
|
|
2479
|
-
var
|
|
2480
|
-
var
|
|
1876
|
+
var _ref22 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee7(type, isIntegralExchange) {
|
|
1877
|
+
var _this15 = this;
|
|
2481
1878
|
|
|
2482
|
-
var
|
|
1879
|
+
var _enumController$getEn18, settleStyleType, PayStyle, memberStoreCode, settlementCode, param, modes;
|
|
2483
1880
|
|
|
2484
|
-
return _regenerator2.default.wrap(function
|
|
1881
|
+
return _regenerator2.default.wrap(function _callee7$(_context7) {
|
|
2485
1882
|
while (1) {
|
|
2486
|
-
switch (
|
|
1883
|
+
switch (_context7.prev = _context7.next) {
|
|
2487
1884
|
case 0:
|
|
2488
|
-
|
|
2489
|
-
_enumController$getEn21 = _mutantsUtil.enumController.getEnumOj(), settleStyleType = _enumController$getEn21.settleStyleType, PayStyle = _enumController$getEn21.PayStyle;
|
|
1885
|
+
_enumController$getEn18 = _mutantsUtil.enumController.getEnumOj(), settleStyleType = _enumController$getEn18.settleStyleType, PayStyle = _enumController$getEn18.PayStyle;
|
|
2490
1886
|
memberStoreCode = settleStyleType.memberStoreCode, settlementCode = settleStyleType.settlementCode;
|
|
2491
1887
|
param = { 'settleStyleType': type == 1 ? memberStoreCode : settlementCode, isIntegralExchange: isIntegralExchange };
|
|
2492
|
-
|
|
1888
|
+
_context7.next = 5;
|
|
2493
1889
|
return (0, _tplusApi.tApi)({ param: param }, 'chanjet.RE.NewPos.GetNewStoreSettleStyles', false, false);
|
|
2494
1890
|
|
|
2495
|
-
case
|
|
2496
|
-
modes =
|
|
1891
|
+
case 5:
|
|
1892
|
+
modes = _context7.sent;
|
|
2497
1893
|
|
|
2498
|
-
modes = !(!!isHorizontalPad || !!isHorizontalSunMi) ? modes : modes.filter(function (v) {
|
|
2499
|
-
return !!v.ThirdPaymentInfo;
|
|
2500
|
-
});
|
|
2501
1894
|
if (modes) {
|
|
2502
1895
|
(0, _mobx.runInAction)(function () {
|
|
2503
1896
|
var paymodes = [];
|
|
2504
1897
|
(0, _each3.default)(modes.SettleStyles, function (mode, index) {
|
|
2505
1898
|
//产品需求确认会员储值卡结算方式前端展示统一调整为“储值卡" tuzha by 2020-07-08
|
|
1899
|
+
|
|
2506
1900
|
if (mode.Code == PayStyle.hyczk) {
|
|
2507
|
-
mode.Name = '
|
|
1901
|
+
mode.Name = '储值余额';
|
|
2508
1902
|
}
|
|
2509
1903
|
paymodes.push({
|
|
2510
1904
|
name: mode.Name,
|
|
@@ -2517,24 +1911,24 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
2517
1911
|
idBankAccount: mode.IdBankAccount,
|
|
2518
1912
|
exchangeRate: mode.Currency ? mode.Currency.ExchangeRate : 1,
|
|
2519
1913
|
idCurrency: mode.Currency ? mode.Currency.ID : -1,
|
|
2520
|
-
calDirection: mode.Currency ? mode.Currency.CalDirection.Id : "88"
|
|
2521
|
-
thridPayment: mode.ThirdPaymentInfo
|
|
1914
|
+
calDirection: mode.Currency ? mode.Currency.CalDirection.Id : "88"
|
|
2522
1915
|
});
|
|
2523
1916
|
});
|
|
2524
|
-
|
|
1917
|
+
_this15.paymodes = paymodes;
|
|
1918
|
+
//modes.QuickSettleStyles
|
|
2525
1919
|
});
|
|
2526
1920
|
}
|
|
2527
1921
|
|
|
2528
|
-
case
|
|
1922
|
+
case 7:
|
|
2529
1923
|
case 'end':
|
|
2530
|
-
return
|
|
1924
|
+
return _context7.stop();
|
|
2531
1925
|
}
|
|
2532
1926
|
}
|
|
2533
|
-
},
|
|
1927
|
+
}, _callee7, this);
|
|
2534
1928
|
}));
|
|
2535
1929
|
|
|
2536
|
-
function setPaymodes(
|
|
2537
|
-
return
|
|
1930
|
+
function setPaymodes(_x5, _x6) {
|
|
1931
|
+
return _ref22.apply(this, arguments);
|
|
2538
1932
|
}
|
|
2539
1933
|
|
|
2540
1934
|
return setPaymodes;
|
|
@@ -2551,60 +1945,49 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
2551
1945
|
}
|
|
2552
1946
|
}]);
|
|
2553
1947
|
return PayMode;
|
|
2554
|
-
}(), (
|
|
1948
|
+
}(), (_descriptor3 = _applyDecoratedDescriptor(_class3.prototype, 'currentFocus', [_mobx.observable], {
|
|
2555
1949
|
enumerable: true,
|
|
2556
1950
|
initializer: function initializer() {
|
|
2557
1951
|
return "";
|
|
2558
1952
|
}
|
|
2559
|
-
}),
|
|
1953
|
+
}), _descriptor4 = _applyDecoratedDescriptor(_class3.prototype, 'received', [_mobx.observable], {
|
|
2560
1954
|
enumerable: true,
|
|
2561
1955
|
initializer: function initializer() {
|
|
2562
1956
|
return 0;
|
|
2563
1957
|
}
|
|
2564
|
-
}),
|
|
1958
|
+
}), _descriptor5 = _applyDecoratedDescriptor(_class3.prototype, 'receivable', [_mobx.observable], {
|
|
2565
1959
|
enumerable: true,
|
|
2566
1960
|
initializer: function initializer() {
|
|
2567
1961
|
return 0;
|
|
2568
1962
|
}
|
|
2569
|
-
}),
|
|
1963
|
+
}), _descriptor6 = _applyDecoratedDescriptor(_class3.prototype, 'paymodes', [_mobx.observable], {
|
|
2570
1964
|
enumerable: true,
|
|
2571
1965
|
initializer: function initializer() {
|
|
2572
1966
|
return [];
|
|
2573
1967
|
}
|
|
2574
|
-
}),
|
|
1968
|
+
}), _descriptor7 = _applyDecoratedDescriptor(_class3.prototype, 'thePaymodes', [_mobx.observable], {
|
|
2575
1969
|
enumerable: true,
|
|
2576
1970
|
initializer: function initializer() {
|
|
2577
1971
|
return [];
|
|
2578
1972
|
}
|
|
2579
|
-
}),
|
|
2580
|
-
enumerable: true,
|
|
2581
|
-
initializer: function initializer() {
|
|
2582
|
-
return null;
|
|
2583
|
-
}
|
|
2584
|
-
}), _descriptor11 = _applyDecoratedDescriptor(_class3.prototype, 'balance', [_mobx.observable], {
|
|
1973
|
+
}), _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], {
|
|
2585
1974
|
enumerable: true,
|
|
2586
1975
|
initializer: function initializer() {
|
|
2587
|
-
|
|
2588
|
-
}
|
|
2589
|
-
}), _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), _descriptor12 = _applyDecoratedDescriptor(_class3.prototype, 'calcCheckList', [_mobx.action], {
|
|
2590
|
-
enumerable: true,
|
|
2591
|
-
initializer: function initializer() {
|
|
2592
|
-
var _this20 = this;
|
|
1976
|
+
var _this16 = this;
|
|
2593
1977
|
|
|
2594
1978
|
return function () {
|
|
2595
|
-
|
|
1979
|
+
_this16.checkList = [];
|
|
2596
1980
|
};
|
|
2597
1981
|
}
|
|
2598
|
-
}), _applyDecoratedDescriptor(_class3.prototype, '
|
|
1982
|
+
}), _applyDecoratedDescriptor(_class3.prototype, 'calcDjqCheckValue', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class3.prototype, 'calcDjqCheckValue'), _class3.prototype), _descriptor9 = _applyDecoratedDescriptor(_class3.prototype, 'setCouponNum', [_mobx.action], {
|
|
2599
1983
|
enumerable: true,
|
|
2600
1984
|
initializer: function initializer() {
|
|
2601
|
-
var
|
|
1985
|
+
var _this17 = this;
|
|
2602
1986
|
|
|
2603
1987
|
return function (id, couponNum, promoMethodEnum, nominalAmount, promoDiscount) {
|
|
2604
|
-
|
|
1988
|
+
_this17.currentMode.djqs.forEach(function (ele) {
|
|
2605
1989
|
if (ele.id === id) {
|
|
2606
|
-
ele.amount = promoDiscount;
|
|
2607
|
-
promoMethodEnum == "CASH_COUPON" && (ele.nominalAmount = nominalAmount);
|
|
1990
|
+
promoMethodEnum == "CASH_COUPON" ? ele.amount = nominalAmount : ele.amount = promoDiscount;
|
|
2608
1991
|
ele.couponCategoryEnum = couponNum;
|
|
2609
1992
|
var IsEnable = ele.couponCategoryEnum === 'RIGUP' || ele.couponCategoryEnum === 'UN_MATCH' || ele.couponCategoryEnum === "PREPARING" || ele.couponCategoryEnum === 'PROMO_LIMITED' || ele.couponCategoryEnum === 'COUPON_CONFLICT' ? false : true;
|
|
2610
1993
|
ele.IsEnable = IsEnable;
|
|
@@ -2612,17 +1995,16 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
2612
1995
|
});
|
|
2613
1996
|
};
|
|
2614
1997
|
}
|
|
2615
|
-
}),
|
|
1998
|
+
}), _descriptor10 = _applyDecoratedDescriptor(_class3.prototype, 'addDjqs', [_mobx.action], {
|
|
2616
1999
|
enumerable: true,
|
|
2617
2000
|
initializer: function initializer() {
|
|
2618
|
-
var
|
|
2001
|
+
var _this18 = this;
|
|
2619
2002
|
|
|
2620
|
-
return function (promoCouponCode, name, IsEnable,
|
|
2003
|
+
return function (promoCouponCode, name, IsEnable, amount, doorsill, LastTS, checked, IsRepelWithPoints, UMemberID, expired, displayText, promoMethodEnum, discountPct, promoId, promoRuleId, couponCategoryEnum, id) {
|
|
2621
2004
|
var djq = {
|
|
2622
2005
|
promoCouponCode: promoCouponCode,
|
|
2623
2006
|
name: name,
|
|
2624
2007
|
IsEnable: IsEnable,
|
|
2625
|
-
nominalAmount: nominalAmount,
|
|
2626
2008
|
amount: amount,
|
|
2627
2009
|
doorsill: doorsill,
|
|
2628
2010
|
LastTS: LastTS,
|
|
@@ -2638,25 +2020,25 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
2638
2020
|
couponCategoryEnum: couponCategoryEnum,
|
|
2639
2021
|
id: id
|
|
2640
2022
|
};
|
|
2641
|
-
|
|
2023
|
+
_this18.currentMode.djqs.push(djq);
|
|
2642
2024
|
};
|
|
2643
2025
|
}
|
|
2644
2026
|
}), _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);
|
|
2645
2027
|
var Member = exports.Member = (_class5 = function () {
|
|
2646
2028
|
function Member(m) {
|
|
2647
|
-
var
|
|
2029
|
+
var _this19 = this;
|
|
2648
2030
|
|
|
2649
2031
|
(0, _classCallCheck3.default)(this, Member);
|
|
2650
2032
|
|
|
2651
|
-
_initDefineProp(this, 'cardNo',
|
|
2033
|
+
_initDefineProp(this, 'cardNo', _descriptor11, this);
|
|
2652
2034
|
|
|
2653
|
-
_initDefineProp(this, 'balance',
|
|
2035
|
+
_initDefineProp(this, 'balance', _descriptor12, this);
|
|
2654
2036
|
|
|
2655
|
-
_initDefineProp(this, 'exchangable',
|
|
2037
|
+
_initDefineProp(this, 'exchangable', _descriptor13, this);
|
|
2656
2038
|
|
|
2657
|
-
_initDefineProp(this, '
|
|
2039
|
+
_initDefineProp(this, 'MeStorageCardId', _descriptor14, this);
|
|
2658
2040
|
|
|
2659
|
-
_initDefineProp(this, '
|
|
2041
|
+
_initDefineProp(this, 'StorageCardNo', _descriptor15, this);
|
|
2660
2042
|
|
|
2661
2043
|
if (m) {
|
|
2662
2044
|
this.id = m.ID;
|
|
@@ -2667,15 +2049,17 @@ var Member = exports.Member = (_class5 = function () {
|
|
|
2667
2049
|
return key == 'canusedbalancestorage';
|
|
2668
2050
|
});
|
|
2669
2051
|
|
|
2670
|
-
var
|
|
2671
|
-
isNewRetailBCPos =
|
|
2052
|
+
var _ref23 = _mutantsUtil.platform || {},
|
|
2053
|
+
isNewRetailBCPos = _ref23.isNewRetailBCPos;
|
|
2672
2054
|
|
|
2055
|
+
m.StorageCardNo && (this.StorageCardNo = m.StorageCardNo);
|
|
2056
|
+
m.MeStorageCardId && (this.MeStorageCardId = m.MeStorageCardId);
|
|
2673
2057
|
(0, _mobx.runInAction)(function () {
|
|
2674
|
-
|
|
2058
|
+
_this19.cardNo = m.CardCode;
|
|
2675
2059
|
if (index >= 0) {
|
|
2676
|
-
|
|
2060
|
+
_this19.balance = parseFloat(m.DynamicPropertyValues[index]);
|
|
2677
2061
|
} else {
|
|
2678
|
-
|
|
2062
|
+
_this19.balance = _this19.rawbalance;
|
|
2679
2063
|
}
|
|
2680
2064
|
});
|
|
2681
2065
|
this.needPwd = m.MemberType ? m.MemberType.IsNeedPwd : false;
|
|
@@ -2695,22 +2079,32 @@ var Member = exports.Member = (_class5 = function () {
|
|
|
2695
2079
|
this.cardNo = v;
|
|
2696
2080
|
this.id = null;
|
|
2697
2081
|
}
|
|
2082
|
+
}, {
|
|
2083
|
+
key: 'setMeStorageCardId',
|
|
2084
|
+
value: function setMeStorageCardId(v) {
|
|
2085
|
+
this.MeStorageCardId = v;
|
|
2086
|
+
}
|
|
2087
|
+
}, {
|
|
2088
|
+
key: 'setStorageCardNo',
|
|
2089
|
+
value: function setStorageCardNo(v) {
|
|
2090
|
+
this.StorageCardNo = v;
|
|
2091
|
+
}
|
|
2698
2092
|
}]);
|
|
2699
2093
|
return Member;
|
|
2700
|
-
}(), (
|
|
2094
|
+
}(), (_descriptor11 = _applyDecoratedDescriptor(_class5.prototype, 'cardNo', [_mobx.observable], {
|
|
2701
2095
|
enumerable: true,
|
|
2702
2096
|
initializer: null
|
|
2703
|
-
}),
|
|
2097
|
+
}), _descriptor12 = _applyDecoratedDescriptor(_class5.prototype, 'balance', [_mobx.observable], {
|
|
2704
2098
|
enumerable: true,
|
|
2705
2099
|
initializer: null
|
|
2706
|
-
}),
|
|
2100
|
+
}), _descriptor13 = _applyDecoratedDescriptor(_class5.prototype, 'exchangable', [_mobx.observable], {
|
|
2707
2101
|
enumerable: true,
|
|
2708
2102
|
initializer: null
|
|
2709
|
-
}),
|
|
2103
|
+
}), _descriptor14 = _applyDecoratedDescriptor(_class5.prototype, 'MeStorageCardId', [_mobx.observable], {
|
|
2710
2104
|
enumerable: true,
|
|
2711
2105
|
initializer: null
|
|
2712
|
-
}),
|
|
2106
|
+
}), _descriptor15 = _applyDecoratedDescriptor(_class5.prototype, 'StorageCardNo', [_mobx.observable], {
|
|
2713
2107
|
enumerable: true,
|
|
2714
2108
|
initializer: null
|
|
2715
|
-
}), _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)), _class5);
|
|
2109
|
+
}), _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);
|
|
2716
2110
|
//# sourceMappingURL=settlementStore.js.map
|