tplus-components-touch 3.27.28 → 3.27.32
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/README.md +16 -16
- package/dist/components/acCitySelect/CitySelect.js +18 -18
- package/dist/components/acCitySelect/CitySelect.js.map +1 -1
- package/dist/components/acCitySelect/CitySelect.less +9 -9
- package/dist/components/acCitySelect/citys.js.map +1 -1
- package/dist/components/acCitySelect/index.js.map +1 -1
- package/dist/components/acCitySelect/provinceData.js +7 -7
- package/dist/components/acCitySelect/provinceData.js.map +1 -1
- package/dist/components/addLog/AddLogProcessor.js +6 -6
- package/dist/components/addLog/AddLogProcessor.js.map +1 -1
- package/dist/components/addLog/OperationLogApi.js +3 -3
- package/dist/components/addLog/OperationLogApi.js.map +1 -1
- package/dist/components/autoComplete/index.js +14 -14
- package/dist/components/autoComplete/index.js.map +1 -1
- package/dist/components/autoComplete/index.less +89 -89
- package/dist/components/autoComplete/option.js.map +1 -1
- package/dist/components/autoCompleteWithKeyboard/index.js +14 -14
- package/dist/components/autoCompleteWithKeyboard/index.js.map +1 -1
- package/dist/components/autoCompleteWithKeyboard/index.less +7 -7
- package/dist/components/billSearch/api.js +29 -29
- package/dist/components/billSearch/api.js.map +1 -1
- package/dist/components/billSearch/index.js +169 -26
- package/dist/components/billSearch/index.js.map +1 -1
- package/dist/components/billSearch/index.less +376 -373
- package/dist/components/cloudPrint/BTPrintFormatUtil.js +17 -17
- package/dist/components/cloudPrint/BTPrintFormatUtil.js.map +1 -1
- package/dist/components/cloudPrint/api.js +85 -43
- package/dist/components/cloudPrint/api.js.map +1 -1
- package/dist/components/cloudPrint/index.js.map +1 -1
- package/dist/components/cloudPrint/printDispatch.js +211 -108
- package/dist/components/cloudPrint/printDispatch.js.map +1 -1
- package/dist/components/commonForm/addressPicker/index.js +7 -7
- package/dist/components/commonForm/addressPicker/index.js.map +1 -1
- package/dist/components/commonForm/addressPicker/style.less +10 -10
- package/dist/components/commonForm/autoComplete/index.js.map +1 -1
- package/dist/components/commonForm/autoComplete/style.less +2 -2
- package/dist/components/commonForm/datePicker/index.js.map +1 -1
- package/dist/components/commonForm/datePicker/style.less +4 -4
- package/dist/components/commonForm/formControl/index.js.map +1 -1
- package/dist/components/commonForm/index.js +4 -4
- package/dist/components/commonForm/index.js.map +1 -1
- package/dist/components/commonForm/inputNumber/index.js.map +1 -1
- package/dist/components/commonForm/inputNumber/style.less +10 -10
- package/dist/components/commonForm/radio/index.js.map +1 -1
- package/dist/components/commonForm/style.less +1 -1
- package/dist/components/deliverySearch/api.js +21 -21
- package/dist/components/deliverySearch/api.js.map +1 -1
- package/dist/components/deliverySearch/index.js +7 -7
- package/dist/components/deliverySearch/index.js.map +1 -1
- package/dist/components/deliverySearch/index.less +553 -553
- package/dist/components/form/index.js.map +1 -1
- package/dist/components/hardwareAPI/index.js.map +1 -1
- package/dist/components/hotKey/config.js +23 -23
- package/dist/components/hotKey/config.js.map +1 -1
- package/dist/components/hotKey/hotKeyModal.js.map +1 -1
- package/dist/components/hotKey/index.js +26 -26
- package/dist/components/hotKey/index.js.map +1 -1
- package/dist/components/hotKey/localConfig.js +133 -14
- package/dist/components/hotKey/localConfig.js.map +1 -1
- package/dist/components/hotKey/style.less +96 -96
- package/dist/components/hotKey/utils.js.map +1 -1
- package/dist/components/input/index.js +6 -6
- package/dist/components/input/index.js.map +1 -1
- package/dist/components/input/scanInput.js.map +1 -1
- package/dist/components/input/scanInput.less +27 -27
- package/dist/components/input/style.less +106 -106
- package/dist/components/input/tplusInput/index.js +30 -30
- package/dist/components/input/tplusInput/index.js.map +1 -1
- package/dist/components/input/tplusInput/inputContent.js.map +1 -1
- package/dist/components/input/tplusInput/inputs.js.map +1 -1
- package/dist/components/input/tplusInput/style.less +132 -132
- package/dist/components/input/utils/index.js.map +1 -1
- package/dist/components/inventorySearch/api.js +58 -58
- package/dist/components/inventorySearch/api.js.map +1 -1
- package/dist/components/inventorySearch/index.js +3 -3
- package/dist/components/inventorySearch/index.js.map +1 -1
- package/dist/components/inventorySearch/index.less +119 -119
- package/dist/components/inventorySearch/store.js.map +1 -1
- package/dist/components/inventorySearch/tab.js +77 -67
- package/dist/components/inventorySearch/tab.js.map +1 -1
- package/dist/components/keyboard/index.js.map +1 -1
- package/dist/components/keyboard/index.less +469 -469
- package/dist/components/keyboard/letterKeyboard.js +2 -2
- package/dist/components/keyboard/letterKeyboard.js.map +1 -1
- package/dist/components/keyboard/numKeyboard.js +4 -4
- package/dist/components/keyboard/numKeyboard.js.map +1 -1
- package/dist/components/keyboard/numKeyboardScan.js.map +1 -1
- package/dist/components/keyboard/numberButton_input.js +9 -7
- package/dist/components/keyboard/numberButton_input.js.map +1 -1
- package/dist/components/keyboard/numkeyboardPassword.js +4 -4
- package/dist/components/keyboard/numkeyboardPassword.js.map +1 -1
- package/dist/components/keyboard/onlyKeyboard.js +7 -7
- package/dist/components/keyboard/onlyKeyboard.js.map +1 -1
- package/dist/components/keyboard/onlyLetterButton.js +2 -2
- package/dist/components/keyboard/onlyLetterButton.js.map +1 -1
- package/dist/components/keyboard/onlyLetterButton2.js +2 -2
- package/dist/components/keyboard/onlyLetterButton2.js.map +1 -1
- package/dist/components/keyboard/onlyLetterButton2.less +156 -161
- package/dist/components/keyboard/onlyNumberButton.js +2 -2
- package/dist/components/keyboard/onlyNumberButton.js.map +1 -1
- package/dist/components/keyboard/onlyNumberButton2.js +3 -3
- package/dist/components/keyboard/onlyNumberButton2.js.map +1 -1
- package/dist/components/keyboard/textKeyboard.js.map +1 -1
- package/dist/components/layout/hamburger.js.map +1 -1
- package/dist/components/layout/index.js +10 -10
- package/dist/components/layout/index.js.map +1 -1
- package/dist/components/layout/layout.js.map +1 -1
- package/dist/components/layout/sider.js +12 -12
- package/dist/components/layout/sider.js.map +1 -1
- package/dist/components/layout/style.less +82 -82
- package/dist/components/loading/index.js +15 -15
- package/dist/components/loading/index.js.map +1 -1
- package/dist/components/loading/loadingContent.js +1 -1
- package/dist/components/loading/loadingContent.js.map +1 -1
- package/dist/components/loading/style.less +72 -72
- package/dist/components/loading/utils.js.map +1 -1
- package/dist/components/message/index.js +8 -8
- package/dist/components/message/index.js.map +1 -1
- package/dist/components/message/index.less +101 -101
- package/dist/components/modal/index.js.map +1 -1
- package/dist/components/modal/index.less +19 -19
- package/dist/components/modalVertical/index.js +7 -7
- package/dist/components/modalVertical/index.js.map +1 -1
- package/dist/components/modalVertical/style.less +60 -60
- package/dist/components/modalWraper/index.js +15 -15
- package/dist/components/modalWraper/index.js.map +1 -1
- package/dist/components/modalWraper/style.less +257 -257
- package/dist/components/modalWraper/utils.js.map +1 -1
- package/dist/components/notification/index.js +4 -4
- package/dist/components/notification/index.js.map +1 -1
- package/dist/components/notification/index.less +51 -51
- package/dist/components/overflowTip/index.js +15 -15
- package/dist/components/overflowTip/index.js.map +1 -1
- package/dist/components/overflowTip/style.less +66 -66
- package/dist/components/page/index.js.map +1 -1
- package/dist/components/page/index.less +21 -21
- package/dist/components/presale/pickup.js.map +1 -1
- package/dist/components/presale/style.less +58 -58
- package/dist/components/product/detail.js +7 -7
- package/dist/components/product/detail.js.map +1 -1
- package/dist/components/product/getCard.js +5 -5
- package/dist/components/product/getCard.js.map +1 -1
- package/dist/components/product/index.less +128 -128
- package/dist/components/progressState/EmptyAndErrorView.js +4 -3
- package/dist/components/progressState/EmptyAndErrorView.js.map +1 -1
- package/dist/components/progressState/ProgressState.js +12 -11
- package/dist/components/progressState/ProgressState.js.map +1 -1
- package/dist/components/progressState/index.js.map +1 -1
- package/dist/components/progressState/style.less +65 -65
- package/dist/components/scan/index.js.map +1 -1
- package/dist/components/scan/index.less +33 -33
- package/dist/components/select/index.js.map +1 -1
- package/dist/components/select/index.less +11 -11
- package/dist/components/settlement/asyncModal.js.map +1 -1
- package/dist/components/settlement/index.js.map +1 -1
- package/dist/components/settlement/moreCzkTable/index.js +156 -0
- package/dist/components/settlement/moreCzkTable/index.js.map +1 -0
- package/dist/components/settlement/moreCzkTable/style.less +7 -0
- package/dist/components/settlement/prototypeTable/index.js.map +1 -1
- package/dist/components/settlement/prototypeTable/style.less +58 -58
- package/dist/components/settlement/prototypeTable/utils.js.map +1 -1
- package/dist/components/settlement/settlement.js +769 -515
- package/dist/components/settlement/settlement.js.map +1 -1
- package/dist/components/settlement/settlement.less +1680 -1610
- package/dist/components/settlement/settlementStore.js +566 -318
- package/dist/components/settlement/settlementStore.js.map +1 -1
- package/dist/components/settlement/utils.js.map +1 -1
- package/dist/components/socket/index.js +11 -11
- package/dist/components/socket/index.js.map +1 -1
- package/dist/components/spin/index.js +6 -6
- package/dist/components/spin/index.js.map +1 -1
- package/dist/components/spin/spin-style.less +436 -436
- package/dist/components/test/index.js +3 -3
- package/dist/components/test/index.js.map +1 -1
- package/dist/components/ticon/iconfont/demo.css +539 -539
- package/dist/components/ticon/iconfont/demo_index.html +5248 -5225
- package/dist/components/ticon/iconfont/iconfont.css +895 -891
- 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 +1549 -1542
- package/dist/components/ticon/iconfont/iconfont.svg +593 -593
- 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/ticon/index.js.map +1 -1
- package/dist/components/touchScroll/index.js +15 -11
- package/dist/components/touchScroll/index.js.map +1 -1
- package/dist/components/touchTable/AuthProcess.js.map +1 -1
- package/dist/components/touchTable/generateWater.js.map +1 -1
- package/dist/components/touchTable/index.js +16 -14
- package/dist/components/touchTable/index.js.map +1 -1
- package/dist/components/touchTable/index.less +376 -369
- package/dist/components/touchTable/utils.js.map +1 -1
- package/dist/demo/PopOverDemo.js.map +1 -1
- package/dist/index.js +20 -8
- package/dist/index.js.map +1 -1
- package/dist/util/tools.js.map +1 -1
- package/locales/zh/tplus-components-touch.json +1 -1
- package/locales/zh-CN/tplus-components-touch.json +1 -1
- package/mocks/memberInfo.json +79 -79
- package/package.json +35 -35
- package/tsconfig.json +26 -26
|
@@ -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, _descriptor3, _descriptor4, _desc2, _value2, _class3, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13, _descriptor14, _desc3, _value3, _class5, _descriptor15, _descriptor16, _descriptor17, _descriptor18, _descriptor19;
|
|
45
45
|
|
|
46
46
|
var _mobx = require('mobx');
|
|
47
47
|
|
|
@@ -178,6 +178,46 @@ var SettlementStore = (_class = function () {
|
|
|
178
178
|
|
|
179
179
|
_initDefineProp(this, 'updateMemberInfo', _descriptor2, this);
|
|
180
180
|
|
|
181
|
+
_initDefineProp(this, 'updateCurrentMode', _descriptor3, this);
|
|
182
|
+
|
|
183
|
+
_initDefineProp(this, 'updateCardInfo', _descriptor4, this);
|
|
184
|
+
|
|
185
|
+
this.handleCzkData = function (m) {
|
|
186
|
+
if (!m || !m.StorageCardNo) {
|
|
187
|
+
(0, _mobx.runInAction)(function () {
|
|
188
|
+
_this2.paymode.currentMode.errinfo = "无效的会员卡号";
|
|
189
|
+
});
|
|
190
|
+
} else {
|
|
191
|
+
(0, _mobx.runInAction)(function () {
|
|
192
|
+
_this2.paymode.currentMode.errinfo = "";
|
|
193
|
+
_this2.paymode.currentMode.memberId = m.ID;
|
|
194
|
+
_this2.paymode.currentMode.value = (0, _utils.getFixedNumber)(_this2.brefund ? _this2.paymode.receivable : Math.max(_this2.paymode.receivable, 0));
|
|
195
|
+
_this2.updateEvent();
|
|
196
|
+
var message = '';
|
|
197
|
+
var sum = (0, _reduce3.default)(_this2.paymode.thePaymodes, function (total, cur) {
|
|
198
|
+
return total + cur.value;
|
|
199
|
+
}, 0);
|
|
200
|
+
// 对于卡不用判断会员的一些信息
|
|
201
|
+
// if (global.CheckMemberStorageProcessorBlock ) {
|
|
202
|
+
// message= CheckMemberStorageProcessorBlock.execute(m);
|
|
203
|
+
// }
|
|
204
|
+
if (!String.isNullOrEmpty(message)) {
|
|
205
|
+
_this2.paymode.currentMode.errinfo = message;
|
|
206
|
+
} else if (_this2.checkReceived(_this2.paymode.currentMode, "balance")) {
|
|
207
|
+
_this2.paymode.currentMode.errinfo = "余额不足";
|
|
208
|
+
} else if (_this2.paymode.amount > 0 && parseFloat(_this2.paymode.amount) !== sum && _this2.paymode.currentMode.value == 0) {
|
|
209
|
+
_this2.paymode.currentMode.errinfo = "实收金额必须录入";
|
|
210
|
+
} else {
|
|
211
|
+
// 查询成功后将焦点移入下一个输入框
|
|
212
|
+
setTimeout(function () {
|
|
213
|
+
var nextInput = document.querySelector('.czk .received .input');
|
|
214
|
+
nextInput && nextInput.select();
|
|
215
|
+
}, 300);
|
|
216
|
+
}
|
|
217
|
+
});
|
|
218
|
+
}
|
|
219
|
+
};
|
|
220
|
+
|
|
181
221
|
this.getCouponList = function (coupon_code) {
|
|
182
222
|
var _enumController$getEn = _mutantsUtil.enumController.getEnumOj(),
|
|
183
223
|
PayStyle = _enumController$getEn.PayStyle,
|
|
@@ -429,7 +469,7 @@ var SettlementStore = (_class = function () {
|
|
|
429
469
|
}
|
|
430
470
|
}, {
|
|
431
471
|
key: 'init',
|
|
432
|
-
value: function init(context, amounthandler, datasource, storeinfo, bquick, amount, type, data) {
|
|
472
|
+
value: function init(context, amounthandler, datasource, storeinfo, bquick, amount, type, data, payModeKey) {
|
|
433
473
|
var _this3 = this;
|
|
434
474
|
|
|
435
475
|
this.newStyle = _mutantsMicrofx.localStore && _mutantsMicrofx.localStore.get('voucherDefaultPosMode') == 'voucher';
|
|
@@ -445,16 +485,22 @@ var SettlementStore = (_class = function () {
|
|
|
445
485
|
if (global.DealSingleRowAmountSettingProcessorBlock) {
|
|
446
486
|
global.DealSingleRowAmountSettingProcessorBlock.execute(_this3.dto);
|
|
447
487
|
}
|
|
488
|
+
|
|
489
|
+
var _enumController$getEn4 = _mutantsUtil.enumController.getEnumOj(),
|
|
490
|
+
PayStyle = _enumController$getEn4.PayStyle;
|
|
491
|
+
|
|
492
|
+
var isQuickCash = bquick && payModeKey == PayStyle.xianjin;
|
|
493
|
+
|
|
448
494
|
// 成交金额抹零
|
|
449
495
|
if (global.DealAmountSettingProcessorBlock) {
|
|
450
|
-
global.DealAmountSettingProcessorBlock.execute(_this3.dto);
|
|
496
|
+
global.DealAmountSettingProcessorBlock.execute(_this3.dto, isQuickCash);
|
|
451
497
|
}
|
|
452
498
|
});
|
|
453
499
|
// this.member=context.stores && context.stores.memberStore && context.stores.memberStore.member;
|
|
454
500
|
this.member = this.dto.Member; //stores.selectMemberStore.selectMemberInfo;
|
|
455
501
|
|
|
456
|
-
// this.paymode.bookMaxValue = 0;
|
|
457
502
|
this.paymode.isNotFullBook = false;
|
|
503
|
+
this.paymode.isNotFullOnlyBook = false;
|
|
458
504
|
//预订按比例收取订金处理
|
|
459
505
|
var value = this.dto.TotalTaxAmount;
|
|
460
506
|
|
|
@@ -469,6 +515,7 @@ var SettlementStore = (_class = function () {
|
|
|
469
515
|
if (IdbusiType == 38 && PreSellOrBook == 'BOOK' && PercentageWhenBook < 100 && (!DistributionMode.Id || DistributionMode.Id == 'ON_SITE_PICKUP')) {
|
|
470
516
|
this.paymode.bookMaxValue = value;
|
|
471
517
|
this.paymode.isNotFullBook = true;
|
|
518
|
+
this.paymode.isNotFullOnlyBook = true;
|
|
472
519
|
value = value * PercentageWhenBook / 100;
|
|
473
520
|
}
|
|
474
521
|
if (IdbusiType == 38 && PreSellOrBook == 'BOOK') {
|
|
@@ -483,6 +530,10 @@ var SettlementStore = (_class = function () {
|
|
|
483
530
|
//预订取货应补款金额
|
|
484
531
|
if (IdbusiType == 39) {
|
|
485
532
|
value = _mutantsMicrofx.stores.drawerStore.thisWaitPaidAmount;
|
|
533
|
+
if (_mutantsMicrofx.stores.drawerStore.totalWaitPaidAmount > 0) {
|
|
534
|
+
this.paymode.isNotFullBook = true;
|
|
535
|
+
this.paymode.bookMaxValue = _mutantsMicrofx.stores.drawerStore.totalWaitPaidAmount;
|
|
536
|
+
}
|
|
486
537
|
}
|
|
487
538
|
|
|
488
539
|
this.brefund = this.paymode.setAmount(value, this.dto.OnlinePaymentAmount);
|
|
@@ -530,8 +581,8 @@ var SettlementStore = (_class = function () {
|
|
|
530
581
|
value: function initByOriginReturn() {
|
|
531
582
|
var _this5 = this;
|
|
532
583
|
|
|
533
|
-
var _enumController$
|
|
534
|
-
PayStyle = _enumController$
|
|
584
|
+
var _enumController$getEn5 = _mutantsUtil.enumController.getEnumOj(),
|
|
585
|
+
PayStyle = _enumController$getEn5.PayStyle;
|
|
535
586
|
|
|
536
587
|
var _ref6 = _mutantsUtil.platform || {},
|
|
537
588
|
isNewRetailBCPos = _ref6.isNewRetailBCPos;
|
|
@@ -578,13 +629,23 @@ var SettlementStore = (_class = function () {
|
|
|
578
629
|
}
|
|
579
630
|
});
|
|
580
631
|
(0, _each3.default)(this.dto.RetailStorageDetails, function (detail) {
|
|
581
|
-
var balanceAmount =
|
|
582
|
-
|
|
632
|
+
var balanceAmount = null;
|
|
633
|
+
var storageCardNo = null;
|
|
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
|
+
});
|
|
583
642
|
var newmode = (0, _extends3.default)({}, _this5.genNewMode(PayStyle.hyczk, false, detail.StoragePaymentAmount), {
|
|
584
|
-
member: new Member(detail.Member),
|
|
585
|
-
authCode: detail.Password,
|
|
643
|
+
member: new Member(detail.Member ? detail.Member : null),
|
|
644
|
+
authCode: detail.Password ? detail.Password : null,
|
|
586
645
|
balance: balanceAmount,
|
|
587
|
-
boriginReturn: true
|
|
646
|
+
boriginReturn: true,
|
|
647
|
+
meStorageCardId: meStorageCardId ? meStorageCardId : detail.MeStorageCardId,
|
|
648
|
+
storageCardNo: storageCardNo ? storageCardNo : detail.StorageCardNo
|
|
588
649
|
});
|
|
589
650
|
_this5.paymode.thePaymodes.push(newmode);
|
|
590
651
|
});
|
|
@@ -599,7 +660,7 @@ var SettlementStore = (_class = function () {
|
|
|
599
660
|
}, {
|
|
600
661
|
key: 'quickSettle',
|
|
601
662
|
value: function quickSettle(key) {
|
|
602
|
-
this.addPay(key);
|
|
663
|
+
this.addPay(key, null, true);
|
|
603
664
|
}
|
|
604
665
|
|
|
605
666
|
//outer call
|
|
@@ -610,8 +671,8 @@ var SettlementStore = (_class = function () {
|
|
|
610
671
|
value: function changeFocusAndAddPay(type, bookType) {
|
|
611
672
|
var _this6 = this;
|
|
612
673
|
|
|
613
|
-
var _enumController$
|
|
614
|
-
PayStyle = _enumController$
|
|
674
|
+
var _enumController$getEn6 = _mutantsUtil.enumController.getEnumOj(),
|
|
675
|
+
PayStyle = _enumController$getEn6.PayStyle;
|
|
615
676
|
|
|
616
677
|
this.paymode.currentFocus = type;
|
|
617
678
|
if (this.paymode.currentMode) {
|
|
@@ -628,7 +689,7 @@ var SettlementStore = (_class = function () {
|
|
|
628
689
|
|
|
629
690
|
//抵现积分
|
|
630
691
|
(0, _tplusApi.tApi)({ IntegralSteadCashParams: {
|
|
631
|
-
Idmember: this.paymode.currentMode.
|
|
692
|
+
Idmember: this.paymode.currentMode.memberId,
|
|
632
693
|
TotalTaxAmount: this.paymode.amount,
|
|
633
694
|
BalanceTaxAmount: this.paymode.currentMode.value
|
|
634
695
|
} }, 'AA.DR.newRetailMember.CalculdateIntegralSteadCash', false, false).then(function (result) {
|
|
@@ -657,7 +718,6 @@ var SettlementStore = (_class = function () {
|
|
|
657
718
|
|
|
658
719
|
if ((0, _trim3.default)(v) === "") {
|
|
659
720
|
(0, _mobx.runInAction)(function () {
|
|
660
|
-
_this7.paymode.currentMode.member = new Member(null);
|
|
661
721
|
_this7.paymode.currentMode.errinfo = "请输入储值卡";
|
|
662
722
|
});
|
|
663
723
|
return;
|
|
@@ -671,66 +731,98 @@ var SettlementStore = (_class = function () {
|
|
|
671
731
|
var address = '';
|
|
672
732
|
if (isNewRetailBCPos) {
|
|
673
733
|
// address = '/member/memberProfile/FindByStorageCode/'+v;
|
|
674
|
-
address = '/
|
|
675
|
-
return (0, _tplusApi.ccApi)({ code: v }, address, false, false, { method: 'get', timeout_skip: true }).then(function (
|
|
676
|
-
var
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
734
|
+
address = '/marketingtool/MeStorageCard/getCardInfoByCardNo/' + v + '/' + true;
|
|
735
|
+
return (0, _tplusApi.ccApi)({ code: v }, address, false, false, { method: 'get', timeout_skip: true }).then(function () {
|
|
736
|
+
var _ref9 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2(result) {
|
|
737
|
+
var data, m;
|
|
738
|
+
return _regenerator2.default.wrap(function _callee2$(_context2) {
|
|
739
|
+
while (1) {
|
|
740
|
+
switch (_context2.prev = _context2.next) {
|
|
741
|
+
case 0:
|
|
742
|
+
data = result.data;
|
|
743
|
+
m = data && data.length && data[0];
|
|
744
|
+
|
|
745
|
+
if (!(result && result.data.length)) {
|
|
746
|
+
_context2.next = 25;
|
|
747
|
+
break;
|
|
748
|
+
}
|
|
749
|
+
|
|
750
|
+
if (!(result.data.length === 1)) {
|
|
751
|
+
_context2.next = 14;
|
|
752
|
+
break;
|
|
753
|
+
}
|
|
754
|
+
|
|
755
|
+
if (!(m.CardTypeEnum === 'BALANCE_CARD')) {
|
|
756
|
+
_context2.next = 10;
|
|
757
|
+
break;
|
|
758
|
+
}
|
|
759
|
+
|
|
760
|
+
_this7.paymode.updateCardInfo(m);
|
|
761
|
+
_this7.handleCzkData(m);
|
|
762
|
+
return _context2.abrupt('return', result.data);
|
|
763
|
+
|
|
764
|
+
case 10:
|
|
765
|
+
_context2.next = 12;
|
|
766
|
+
return (0, _tplusApi.ccApi)({ dto: _this7.dto, meStorageCardId: m.MeStorageCardId }, '/retail/RetailPos/validateRetailStorageCard', false, false).then(function (result1) {
|
|
767
|
+
var data1 = result1.data ? JSON.parse(result1.data)[0] : {};
|
|
768
|
+
if (data1.enable) {
|
|
769
|
+
_this7.paymode.updateCardInfo(m);
|
|
770
|
+
_this7.handleCzkData(m);
|
|
771
|
+
return result1.data;
|
|
772
|
+
} else {
|
|
773
|
+
_message2.default.warn(data1.disableReason);
|
|
774
|
+
}
|
|
775
|
+
});
|
|
776
|
+
|
|
777
|
+
case 12:
|
|
778
|
+
_context2.next = 25;
|
|
779
|
+
break;
|
|
780
|
+
|
|
781
|
+
case 14:
|
|
782
|
+
if (!(result.data && result.data.length === 1)) {
|
|
783
|
+
_context2.next = 19;
|
|
784
|
+
break;
|
|
785
|
+
}
|
|
786
|
+
|
|
787
|
+
_this7.paymode.updateCardInfo(result.data[0]);
|
|
788
|
+
return _context2.abrupt('return', result.data);
|
|
789
|
+
|
|
790
|
+
case 19:
|
|
791
|
+
if (!(result.data && result.data.length > 1)) {
|
|
792
|
+
_context2.next = 23;
|
|
793
|
+
break;
|
|
794
|
+
}
|
|
795
|
+
|
|
796
|
+
return _context2.abrupt('return', result.data);
|
|
797
|
+
|
|
798
|
+
case 23:
|
|
799
|
+
_message2.default.warn('没有可用储值卡!');
|
|
800
|
+
return _context2.abrupt('return', false);
|
|
801
|
+
|
|
802
|
+
case 25:
|
|
803
|
+
case 'end':
|
|
804
|
+
return _context2.stop();
|
|
805
|
+
}
|
|
715
806
|
}
|
|
716
|
-
});
|
|
717
|
-
}
|
|
718
|
-
|
|
807
|
+
}, _callee2, _this7);
|
|
808
|
+
}));
|
|
809
|
+
|
|
810
|
+
return function (_x2) {
|
|
811
|
+
return _ref9.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
|
+
);
|
|
719
821
|
} else {
|
|
720
822
|
address = 'AA.DR.newRetailMember.SearchMember';
|
|
721
823
|
return (0, _tplusApi.tApi)({ SearchParams: { Key: v, IsSingleMember: true, IdStore: IdStore, StoreCode: StoreCode } }, address, false, false).then(function (result) {
|
|
722
824
|
var data = JSON.parse(result.Data);
|
|
723
825
|
var m = data && data.length > 0 && data[0];
|
|
724
|
-
|
|
725
|
-
var _ref10 = _mutantsUtil.platform || {},
|
|
726
|
-
isNewRetailBCPos = _ref10.isNewRetailBCPos;
|
|
727
|
-
|
|
728
|
-
if (isNewRetailBCPos) {
|
|
729
|
-
_this7.paymode && _this7.paymode.currentMode.member.setMeStorageCardId(m.MeStorageCardId);
|
|
730
|
-
_this7.paymode && _this7.paymode.currentMode.member.setStorageCardNo(m.StorageCardNo);
|
|
731
|
-
_this7.paymode && (_this7.paymode.currentMode.MeStorageCardId = m.MeStorageCardId);
|
|
732
|
-
_this7.paymode && (_this7.paymode.currentMode.StorageCardNo = m.StorageCardNo);
|
|
733
|
-
}
|
|
734
826
|
if (!m || !m.ID) {
|
|
735
827
|
(0, _mobx.runInAction)(function () {
|
|
736
828
|
_this7.paymode.currentMode.errinfo = "无效的会员卡号";
|
|
@@ -792,8 +884,8 @@ var SettlementStore = (_class = function () {
|
|
|
792
884
|
}, {
|
|
793
885
|
key: 'setCurrentMode',
|
|
794
886
|
value: function setCurrentMode(id, type, append) {
|
|
795
|
-
var _enumController$
|
|
796
|
-
PayStyle = _enumController$
|
|
887
|
+
var _enumController$getEn7 = _mutantsUtil.enumController.getEnumOj(),
|
|
888
|
+
PayStyle = _enumController$getEn7.PayStyle;
|
|
797
889
|
|
|
798
890
|
var mode = (0, _find3.default)(this.paymode.thePaymodes, { paymethodId: id });
|
|
799
891
|
if (mode) {
|
|
@@ -811,8 +903,8 @@ var SettlementStore = (_class = function () {
|
|
|
811
903
|
value: function afterSetCurrentMode(type) {
|
|
812
904
|
var _this8 = this;
|
|
813
905
|
|
|
814
|
-
var _enumController$
|
|
815
|
-
PayStyle = _enumController$
|
|
906
|
+
var _enumController$getEn8 = _mutantsUtil.enumController.getEnumOj(),
|
|
907
|
+
PayStyle = _enumController$getEn8.PayStyle;
|
|
816
908
|
|
|
817
909
|
if (type == PayStyle.djq) {
|
|
818
910
|
this.paymode.calcDjqValue();
|
|
@@ -826,7 +918,7 @@ var SettlementStore = (_class = function () {
|
|
|
826
918
|
}
|
|
827
919
|
|
|
828
920
|
(0, _tplusApi.tApi)({ IntegralSteadCashParams: {
|
|
829
|
-
Idmember: this.paymode.currentMode.
|
|
921
|
+
Idmember: this.paymode.currentMode.memberId,
|
|
830
922
|
TotalTaxAmount: this.paymode.amount,
|
|
831
923
|
BalanceTaxAmount: this.paymode.amount
|
|
832
924
|
} }, 'AA.DR.newRetailMember.CalculdateIntegralSteadCash', false, false).then(function (result) {
|
|
@@ -847,12 +939,13 @@ var SettlementStore = (_class = function () {
|
|
|
847
939
|
}
|
|
848
940
|
}, {
|
|
849
941
|
key: 'genNewMode',
|
|
850
|
-
value: function genNewMode(type, notwithm, v) {
|
|
851
|
-
var _enumController$
|
|
852
|
-
PayStyle = _enumController$
|
|
942
|
+
value: function genNewMode(type, notwithm, v, isQuick) {
|
|
943
|
+
var _enumController$getEn9 = _mutantsUtil.enumController.getEnumOj(),
|
|
944
|
+
PayStyle = _enumController$getEn9.PayStyle;
|
|
853
945
|
|
|
854
946
|
var value = (0, _utils.getFixedNumber)(v || (this.brefund ? this.paymode.receivable : Math.max(this.paymode.receivable, 0)));
|
|
855
947
|
var themode = (0, _find3.default)(this.paymode.paymodes, { 'paymentType': type });
|
|
948
|
+
var memberId = this.member && this.member.ID ? this.member.ID : null;
|
|
856
949
|
var mode = (0, _mobx.observable)({
|
|
857
950
|
paymethodId: this.paymode.counter,
|
|
858
951
|
name: themode.name,
|
|
@@ -864,6 +957,8 @@ var SettlementStore = (_class = function () {
|
|
|
864
957
|
order: this.paymode.thePaymodes.length + 1,
|
|
865
958
|
paymentType: type,
|
|
866
959
|
djqs: [],
|
|
960
|
+
card: null,
|
|
961
|
+
memberId: !notwithm ? memberId : null,
|
|
867
962
|
member: new Member(!notwithm ? this.member : null),
|
|
868
963
|
authCode: '',
|
|
869
964
|
steadCashIntegral: null,
|
|
@@ -872,9 +967,9 @@ var SettlementStore = (_class = function () {
|
|
|
872
967
|
virtualPay: themode.virtualPay
|
|
873
968
|
});
|
|
874
969
|
if (type == PayStyle.hyczk) {
|
|
875
|
-
if (!mode.
|
|
970
|
+
if (!mode.storageCardNo) {
|
|
876
971
|
(0, _mobx.runInAction)(function () {
|
|
877
|
-
mode.errinfo = '
|
|
972
|
+
mode.errinfo = '未录入手机号或储值卡号';
|
|
878
973
|
});
|
|
879
974
|
} else if (this.checkReceived(mode, "balance")) {
|
|
880
975
|
(0, _mobx.runInAction)(function () {
|
|
@@ -893,8 +988,8 @@ var SettlementStore = (_class = function () {
|
|
|
893
988
|
value: function setMaxAmount(type, mode) {
|
|
894
989
|
var _this9 = this;
|
|
895
990
|
|
|
896
|
-
var _enumController$
|
|
897
|
-
PayStyle = _enumController$
|
|
991
|
+
var _enumController$getEn10 = _mutantsUtil.enumController.getEnumOj(),
|
|
992
|
+
PayStyle = _enumController$getEn10.PayStyle;
|
|
898
993
|
|
|
899
994
|
var sum = 0;
|
|
900
995
|
if (type == PayStyle.hyczk) {
|
|
@@ -913,7 +1008,17 @@ var SettlementStore = (_class = function () {
|
|
|
913
1008
|
|
|
914
1009
|
this.amountHandler && this.amountHandler(type).then(function () {
|
|
915
1010
|
(0, _mobx.runInAction)(function () {
|
|
916
|
-
|
|
1011
|
+
|
|
1012
|
+
//预售储值结算应包含运费
|
|
1013
|
+
var BuyerPayFreight = _this9.dto.BuyerPayFreight;
|
|
1014
|
+
var DistributionMode = _this9.dto.DistributionMode;
|
|
1015
|
+
var value = 0;
|
|
1016
|
+
if ((DistributionMode.Id == 'ELECTRONIC' || DistributionMode.Id == 'CITY_DISTRIBUTE') && BuyerPayFreight && BuyerPayFreight > 0) {
|
|
1017
|
+
value = (0, _utils.getFixedNumber)(parseFloat(_this9.context.viewModel.getViewItem('Voucher').availableAmount) + parseFloat(BuyerPayFreight));
|
|
1018
|
+
} else {
|
|
1019
|
+
value = _this9.context.viewModel.getViewItem('Voucher').availableAmount;
|
|
1020
|
+
}
|
|
1021
|
+
mode.maxamount = (0, _utils.getFixedNumber)(Math.Minus(value, sum));
|
|
917
1022
|
_this9.updateEvent();
|
|
918
1023
|
});
|
|
919
1024
|
});
|
|
@@ -970,8 +1075,8 @@ var SettlementStore = (_class = function () {
|
|
|
970
1075
|
}, {
|
|
971
1076
|
key: 'addPayDirectly',
|
|
972
1077
|
value: function addPayDirectly(pay) {
|
|
973
|
-
var _enumController$
|
|
974
|
-
PayStyle = _enumController$
|
|
1078
|
+
var _enumController$getEn11 = _mutantsUtil.enumController.getEnumOj(),
|
|
1079
|
+
PayStyle = _enumController$getEn11.PayStyle;
|
|
975
1080
|
|
|
976
1081
|
if (!(0, _find3.default)(this.paymode.thePaymodes, { paymethodId: pay.paymethodId })) {
|
|
977
1082
|
var pos = this.paymode.thePaymodes.length;
|
|
@@ -988,9 +1093,9 @@ var SettlementStore = (_class = function () {
|
|
|
988
1093
|
}
|
|
989
1094
|
}, {
|
|
990
1095
|
key: 'addPay',
|
|
991
|
-
value: function addPay(type, bookType) {
|
|
992
|
-
var _enumController$
|
|
993
|
-
PayStyle = _enumController$
|
|
1096
|
+
value: function addPay(type, bookType, isQuick) {
|
|
1097
|
+
var _enumController$getEn12 = _mutantsUtil.enumController.getEnumOj(),
|
|
1098
|
+
PayStyle = _enumController$getEn12.PayStyle;
|
|
994
1099
|
|
|
995
1100
|
var pos = this.paymode.thePaymodes.length;
|
|
996
1101
|
if (type == PayStyle.hyczk) {
|
|
@@ -1000,14 +1105,15 @@ var SettlementStore = (_class = function () {
|
|
|
1000
1105
|
pos = index == -1 ? pos : index + 1;
|
|
1001
1106
|
}
|
|
1002
1107
|
// this.paymode.thePaymodes.push(this.genNewMode(type) );
|
|
1003
|
-
|
|
1108
|
+
|
|
1109
|
+
this.paymode.thePaymodes.splice(pos, 0, this.genNewMode(type, this.newStyle && type == PayStyle.hyczk, undefined, isQuick));
|
|
1004
1110
|
this.paymode.calcReserved(bookType);
|
|
1005
1111
|
}
|
|
1006
1112
|
}, {
|
|
1007
1113
|
key: 'delPay',
|
|
1008
1114
|
value: function delPay(index, bookType) {
|
|
1009
|
-
var _enumController$
|
|
1010
|
-
PayStyle = _enumController$
|
|
1115
|
+
var _enumController$getEn13 = _mutantsUtil.enumController.getEnumOj(),
|
|
1116
|
+
PayStyle = _enumController$getEn13.PayStyle;
|
|
1011
1117
|
|
|
1012
1118
|
(0, _remove3.default)(this.paymode.thePaymodes, function (mode) {
|
|
1013
1119
|
return mode.paymethodId === index;
|
|
@@ -1018,80 +1124,80 @@ var SettlementStore = (_class = function () {
|
|
|
1018
1124
|
}, {
|
|
1019
1125
|
key: 'commit',
|
|
1020
1126
|
value: function () {
|
|
1021
|
-
var
|
|
1022
|
-
var
|
|
1127
|
+
var _ref10 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee3(bTest) {
|
|
1128
|
+
var _ref11, isNewRetailBCPos;
|
|
1023
1129
|
|
|
1024
|
-
return _regenerator2.default.wrap(function
|
|
1130
|
+
return _regenerator2.default.wrap(function _callee3$(_context3) {
|
|
1025
1131
|
while (1) {
|
|
1026
|
-
switch (
|
|
1132
|
+
switch (_context3.prev = _context3.next) {
|
|
1027
1133
|
case 0:
|
|
1028
1134
|
console.log('settlementStore.commit开始,参数:' + bTest);
|
|
1029
1135
|
|
|
1030
1136
|
if (!bTest) {
|
|
1031
|
-
|
|
1137
|
+
_context3.next = 3;
|
|
1032
1138
|
break;
|
|
1033
1139
|
}
|
|
1034
1140
|
|
|
1035
|
-
return
|
|
1141
|
+
return _context3.abrupt('return', _promise2.default.resolve(true));
|
|
1036
1142
|
|
|
1037
1143
|
case 3:
|
|
1038
|
-
|
|
1039
|
-
|
|
1144
|
+
_ref11 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref11.isNewRetailBCPos;
|
|
1145
|
+
_context3.prev = 4;
|
|
1040
1146
|
|
|
1041
1147
|
if (!(this.type == 1)) {
|
|
1042
|
-
|
|
1148
|
+
_context3.next = 10;
|
|
1043
1149
|
break;
|
|
1044
1150
|
}
|
|
1045
1151
|
|
|
1046
|
-
|
|
1152
|
+
_context3.next = 8;
|
|
1047
1153
|
return this.saveMember();
|
|
1048
1154
|
|
|
1049
1155
|
case 8:
|
|
1050
|
-
|
|
1156
|
+
_context3.next = 18;
|
|
1051
1157
|
break;
|
|
1052
1158
|
|
|
1053
1159
|
case 10:
|
|
1054
1160
|
if (!isNewRetailBCPos) {
|
|
1055
|
-
|
|
1161
|
+
_context3.next = 13;
|
|
1056
1162
|
break;
|
|
1057
1163
|
}
|
|
1058
1164
|
|
|
1059
|
-
|
|
1165
|
+
_context3.next = 13;
|
|
1060
1166
|
return _mutantsMicrofx.stores.offlineSys.generatorCode(this.dto);
|
|
1061
1167
|
|
|
1062
1168
|
case 13:
|
|
1063
|
-
|
|
1169
|
+
_context3.next = 15;
|
|
1064
1170
|
return this.save();
|
|
1065
1171
|
|
|
1066
1172
|
case 15:
|
|
1067
1173
|
if (!isNewRetailBCPos) {
|
|
1068
|
-
|
|
1174
|
+
_context3.next = 18;
|
|
1069
1175
|
break;
|
|
1070
1176
|
}
|
|
1071
1177
|
|
|
1072
|
-
|
|
1178
|
+
_context3.next = 18;
|
|
1073
1179
|
return _mutantsMicrofx.stores.offlineSys.retailSequenceUpload();
|
|
1074
1180
|
|
|
1075
1181
|
case 18:
|
|
1076
|
-
return
|
|
1182
|
+
return _context3.abrupt('return', _promise2.default.resolve(true));
|
|
1077
1183
|
|
|
1078
1184
|
case 21:
|
|
1079
|
-
|
|
1080
|
-
|
|
1185
|
+
_context3.prev = 21;
|
|
1186
|
+
_context3.t0 = _context3['catch'](4);
|
|
1081
1187
|
|
|
1082
|
-
console.error('settlementStore.commit失败,错误信息:' +
|
|
1083
|
-
return
|
|
1188
|
+
console.error('settlementStore.commit失败,错误信息:' + _context3.t0);
|
|
1189
|
+
return _context3.abrupt('return', _promise2.default.resolve(_context3.t0));
|
|
1084
1190
|
|
|
1085
1191
|
case 25:
|
|
1086
1192
|
case 'end':
|
|
1087
|
-
return
|
|
1193
|
+
return _context3.stop();
|
|
1088
1194
|
}
|
|
1089
1195
|
}
|
|
1090
|
-
},
|
|
1196
|
+
}, _callee3, this, [[4, 21]]);
|
|
1091
1197
|
}));
|
|
1092
1198
|
|
|
1093
|
-
function commit(
|
|
1094
|
-
return
|
|
1199
|
+
function commit(_x3) {
|
|
1200
|
+
return _ref10.apply(this, arguments);
|
|
1095
1201
|
}
|
|
1096
1202
|
|
|
1097
1203
|
return commit;
|
|
@@ -1107,8 +1213,8 @@ var SettlementStore = (_class = function () {
|
|
|
1107
1213
|
value: function saveMember() {
|
|
1108
1214
|
var _this10 = this;
|
|
1109
1215
|
|
|
1110
|
-
var _enumController$
|
|
1111
|
-
PayStyle = _enumController$
|
|
1216
|
+
var _enumController$getEn14 = _mutantsUtil.enumController.getEnumOj(),
|
|
1217
|
+
PayStyle = _enumController$getEn14.PayStyle;
|
|
1112
1218
|
|
|
1113
1219
|
(0, _mobx.runInAction)(function () {
|
|
1114
1220
|
_this10.dto.StorageMutiSettleDetails = [];
|
|
@@ -1149,23 +1255,22 @@ var SettlementStore = (_class = function () {
|
|
|
1149
1255
|
}, {
|
|
1150
1256
|
key: 'save',
|
|
1151
1257
|
value: function () {
|
|
1152
|
-
var
|
|
1258
|
+
var _ref12 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee4() {
|
|
1153
1259
|
var _this11 = this;
|
|
1154
1260
|
|
|
1155
|
-
var _enumController$
|
|
1261
|
+
var _enumController$getEn15, PayStyle, _ref14, isNewRetailBCPos, IPMSG, RetailTypeEnum, _getLoginInfo2, PreSellOrBook, PercentageWhenBook, _ref15, IdbusiType, DistributionMode, prepaidAmount;
|
|
1156
1262
|
|
|
1157
|
-
return _regenerator2.default.wrap(function
|
|
1263
|
+
return _regenerator2.default.wrap(function _callee4$(_context4) {
|
|
1158
1264
|
while (1) {
|
|
1159
|
-
switch (
|
|
1265
|
+
switch (_context4.prev = _context4.next) {
|
|
1160
1266
|
case 0:
|
|
1161
|
-
_enumController$
|
|
1267
|
+
_enumController$getEn15 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn15.PayStyle;
|
|
1162
1268
|
|
|
1163
1269
|
(0, _mobx.runInAction)(function () {
|
|
1164
1270
|
_this11.dto.RetailPaymentDetails = [];
|
|
1165
1271
|
_this11.dto.RetailStorageDetails = [];
|
|
1166
1272
|
_this11.dto.RetailCouponDetails = [];
|
|
1167
1273
|
var czkSum = 0;
|
|
1168
|
-
var Idmember = _this11.dto.Idmember;
|
|
1169
1274
|
var count = 0;
|
|
1170
1275
|
var thePaymodes = _this11.newStyle ? (0, _filter3.default)(_this11.paymode.thePaymodes, function (mode) {
|
|
1171
1276
|
return parseFloat(mode.value) != 0;
|
|
@@ -1173,18 +1278,14 @@ var SettlementStore = (_class = function () {
|
|
|
1173
1278
|
(0, _each3.default)(thePaymodes, function (mode, index) {
|
|
1174
1279
|
var themode = (0, _find3.default)(_this11.paymode.paymodes, { 'paymentType': mode.paymentType });
|
|
1175
1280
|
if (mode.paymentType == PayStyle.hyczk) {
|
|
1176
|
-
if (!Idmember) {
|
|
1177
|
-
Idmember = mode.member.id;
|
|
1178
|
-
}
|
|
1179
1281
|
czkSum = Math.Add(czkSum, mode.value);
|
|
1180
|
-
var MeStorageCardId = mode.member.MeStorageCardId ? mode.member.MeStorageCardId : _this11.member.MeStorageCardId;
|
|
1181
1282
|
_this11.dto.RetailStorageDetails.push({
|
|
1182
1283
|
Code: mode.paymethodId,
|
|
1183
|
-
MeStorageCardId:
|
|
1284
|
+
MeStorageCardId: mode.meStorageCardId,
|
|
1184
1285
|
StoragePaymentAmount: mode.value,
|
|
1185
1286
|
IsOrigReturn: false,
|
|
1186
1287
|
BalanceStorage: mode.balance,
|
|
1187
|
-
Idmember: mode.
|
|
1288
|
+
Idmember: mode.memberId,
|
|
1188
1289
|
DynamicPropertyKeys: [],
|
|
1189
1290
|
DynamicPropertyValues: [],
|
|
1190
1291
|
DataSource: { Id: _this11.dataSource },
|
|
@@ -1220,7 +1321,7 @@ var SettlementStore = (_class = function () {
|
|
|
1220
1321
|
ReductionAmount: djq.amount,
|
|
1221
1322
|
EnableAmount: djq.doorsill,
|
|
1222
1323
|
CouponTitle: djq.name,
|
|
1223
|
-
IdMember: djq.UMemberID ? mode.
|
|
1324
|
+
IdMember: djq.UMemberID ? mode.memberId : null,
|
|
1224
1325
|
LastTS: djq.LastTS,
|
|
1225
1326
|
PromotionId: djq.promoId,
|
|
1226
1327
|
PromotionRuleId: djq.promoRuleId,
|
|
@@ -1232,15 +1333,12 @@ var SettlementStore = (_class = function () {
|
|
|
1232
1333
|
}
|
|
1233
1334
|
});
|
|
1234
1335
|
|
|
1235
|
-
var
|
|
1236
|
-
isNewRetailBCPos =
|
|
1336
|
+
var _ref13 = _mutantsUtil.platform || {},
|
|
1337
|
+
isNewRetailBCPos = _ref13.isNewRetailBCPos;
|
|
1237
1338
|
|
|
1238
1339
|
if (_this11.dto.RetailStorageDetails.length > 0) {
|
|
1239
1340
|
var themode = (0, _find3.default)(_this11.paymode.paymodes, { 'paymentType': PayStyle.hyczk });
|
|
1240
1341
|
if (isNewRetailBCPos) {
|
|
1241
|
-
// this.dto.RetailStorageDetails && this.dto.RetailStorageDetails.forEach((value, index) => {
|
|
1242
|
-
// value.MeStorageCardId = (mode.MeStorageCardId ? mode.MeStorageCardId : this.member.MeStorageCardId);
|
|
1243
|
-
// })
|
|
1244
1342
|
_this11.dto.RetailPaymentDetails.push({
|
|
1245
1343
|
Code: _this11.paymode.counter,
|
|
1246
1344
|
OrigAmount: czkSum,
|
|
@@ -1264,15 +1362,14 @@ var SettlementStore = (_class = function () {
|
|
|
1264
1362
|
DataSource: { Id: _this11.dataSource }
|
|
1265
1363
|
});
|
|
1266
1364
|
}
|
|
1267
|
-
_this11.dto.Idmember = Idmember;
|
|
1268
1365
|
}
|
|
1269
1366
|
});
|
|
1270
|
-
|
|
1367
|
+
_ref14 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref14.isNewRetailBCPos;
|
|
1271
1368
|
|
|
1272
1369
|
console.log('bc_pos\u73AF\u5883:' + isNewRetailBCPos + ',\u7ED3\u7B97\u6570\u636E\uFF1A', this.dto);
|
|
1273
1370
|
|
|
1274
1371
|
if (!isNewRetailBCPos) {
|
|
1275
|
-
|
|
1372
|
+
_context4.next = 23;
|
|
1276
1373
|
break;
|
|
1277
1374
|
}
|
|
1278
1375
|
|
|
@@ -1284,7 +1381,7 @@ var SettlementStore = (_class = function () {
|
|
|
1284
1381
|
}
|
|
1285
1382
|
RetailTypeEnum = this.dto.IdbusiType == 36 ? "INTEGRAL_EXCHANGE" : "NORMAL";
|
|
1286
1383
|
_getLoginInfo2 = this.getLoginInfo(), PreSellOrBook = _getLoginInfo2.PreSellOrBook, PercentageWhenBook = _getLoginInfo2.PercentageWhenBook;
|
|
1287
|
-
|
|
1384
|
+
_ref15 = this.dto || {}, IdbusiType = _ref15.IdbusiType, DistributionMode = _ref15.DistributionMode;
|
|
1288
1385
|
|
|
1289
1386
|
if (IdbusiType == 38 && PreSellOrBook == 'BOOK' && PercentageWhenBook < 100 && (!DistributionMode.Id || DistributionMode.Id == 'ON_SITE_PICKUP')) {
|
|
1290
1387
|
prepaidAmount = this.dto.RetailPaymentDetails.reduce(function (c, item) {
|
|
@@ -1295,61 +1392,61 @@ var SettlementStore = (_class = function () {
|
|
|
1295
1392
|
_this11.dto.PrepaidAmount = prepaidAmount;
|
|
1296
1393
|
});
|
|
1297
1394
|
}
|
|
1298
|
-
|
|
1395
|
+
_context4.t1 = this.dto.IdbusiType == 37;
|
|
1299
1396
|
|
|
1300
|
-
if (!
|
|
1301
|
-
|
|
1397
|
+
if (!_context4.t1) {
|
|
1398
|
+
_context4.next = 16;
|
|
1302
1399
|
break;
|
|
1303
1400
|
}
|
|
1304
1401
|
|
|
1305
|
-
|
|
1402
|
+
_context4.next = 15;
|
|
1306
1403
|
return this.checkIntegralExchangeReturn(this.dto.RetailDetails[0].ReturnSourceId);
|
|
1307
1404
|
|
|
1308
1405
|
case 15:
|
|
1309
|
-
|
|
1406
|
+
_context4.t1 = _context4.sent;
|
|
1310
1407
|
|
|
1311
1408
|
case 16:
|
|
1312
|
-
|
|
1409
|
+
_context4.t0 = _context4.t1;
|
|
1313
1410
|
|
|
1314
|
-
if (
|
|
1315
|
-
|
|
1411
|
+
if (_context4.t0) {
|
|
1412
|
+
_context4.next = 19;
|
|
1316
1413
|
break;
|
|
1317
1414
|
}
|
|
1318
1415
|
|
|
1319
|
-
|
|
1416
|
+
_context4.t0 = this.dto.IdbusiType != 37;
|
|
1320
1417
|
|
|
1321
1418
|
case 19:
|
|
1322
|
-
if (!
|
|
1323
|
-
|
|
1419
|
+
if (!_context4.t0) {
|
|
1420
|
+
_context4.next = 21;
|
|
1324
1421
|
break;
|
|
1325
1422
|
}
|
|
1326
1423
|
|
|
1327
|
-
return
|
|
1424
|
+
return _context4.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) {
|
|
1328
1425
|
_this11.setDtoID(resp.ID);
|
|
1329
1426
|
_this11.paymode.checkList = [];
|
|
1330
1427
|
_this11.billID = resp.ID;
|
|
1331
1428
|
}));
|
|
1332
1429
|
|
|
1333
1430
|
case 21:
|
|
1334
|
-
|
|
1431
|
+
_context4.next = 24;
|
|
1335
1432
|
break;
|
|
1336
1433
|
|
|
1337
1434
|
case 23:
|
|
1338
|
-
return
|
|
1435
|
+
return _context4.abrupt('return', (0, _tplusApi.tApi)({ dto: this.dto.cut() }, 'chanjet.RE.newRetail.Settle', false, false, { timeout_skip: true }).then(function (resp) {
|
|
1339
1436
|
_this11.setDtoID(resp.ID);
|
|
1340
1437
|
_this11.billID = resp.ID;
|
|
1341
1438
|
}));
|
|
1342
1439
|
|
|
1343
1440
|
case 24:
|
|
1344
1441
|
case 'end':
|
|
1345
|
-
return
|
|
1442
|
+
return _context4.stop();
|
|
1346
1443
|
}
|
|
1347
1444
|
}
|
|
1348
|
-
},
|
|
1445
|
+
}, _callee4, this);
|
|
1349
1446
|
}));
|
|
1350
1447
|
|
|
1351
1448
|
function save() {
|
|
1352
|
-
return
|
|
1449
|
+
return _ref12.apply(this, arguments);
|
|
1353
1450
|
}
|
|
1354
1451
|
|
|
1355
1452
|
return save;
|
|
@@ -1362,35 +1459,35 @@ var SettlementStore = (_class = function () {
|
|
|
1362
1459
|
}, {
|
|
1363
1460
|
key: 'querySettleResult',
|
|
1364
1461
|
value: function () {
|
|
1365
|
-
var
|
|
1366
|
-
return _regenerator2.default.wrap(function
|
|
1462
|
+
var _ref16 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee5() {
|
|
1463
|
+
return _regenerator2.default.wrap(function _callee5$(_context5) {
|
|
1367
1464
|
while (1) {
|
|
1368
|
-
switch (
|
|
1465
|
+
switch (_context5.prev = _context5.next) {
|
|
1369
1466
|
case 0:
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1467
|
+
_context5.prev = 0;
|
|
1468
|
+
_context5.t0 = _promise2.default;
|
|
1469
|
+
_context5.next = 4;
|
|
1373
1470
|
return (0, _tplusApi.tApi)({ RetailCode: this.dto.Code }, 'chanjet.RE.newRetail.QuerySettleResult', false, false, { timeout_skip: true });
|
|
1374
1471
|
|
|
1375
1472
|
case 4:
|
|
1376
|
-
|
|
1377
|
-
return
|
|
1473
|
+
_context5.t1 = _context5.sent;
|
|
1474
|
+
return _context5.abrupt('return', _context5.t0.resolve.call(_context5.t0, _context5.t1));
|
|
1378
1475
|
|
|
1379
1476
|
case 8:
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
return
|
|
1477
|
+
_context5.prev = 8;
|
|
1478
|
+
_context5.t2 = _context5['catch'](0);
|
|
1479
|
+
return _context5.abrupt('return', _promise2.default.resolve({ Flag: "1" }));
|
|
1383
1480
|
|
|
1384
1481
|
case 11:
|
|
1385
1482
|
case 'end':
|
|
1386
|
-
return
|
|
1483
|
+
return _context5.stop();
|
|
1387
1484
|
}
|
|
1388
1485
|
}
|
|
1389
|
-
},
|
|
1486
|
+
}, _callee5, this, [[0, 8]]);
|
|
1390
1487
|
}));
|
|
1391
1488
|
|
|
1392
1489
|
function querySettleResult() {
|
|
1393
|
-
return
|
|
1490
|
+
return _ref16.apply(this, arguments);
|
|
1394
1491
|
}
|
|
1395
1492
|
|
|
1396
1493
|
return querySettleResult;
|
|
@@ -1416,99 +1513,131 @@ var SettlementStore = (_class = function () {
|
|
|
1416
1513
|
}, {
|
|
1417
1514
|
key: 'validePwd',
|
|
1418
1515
|
value: function () {
|
|
1419
|
-
var
|
|
1420
|
-
var
|
|
1516
|
+
var _ref17 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee6(value) {
|
|
1517
|
+
var _ref18, isNewRetailBCPos, cook1, cook2, message, memberStorageId, _paymode$currentMode, cardTypeEnum, memberId, meStorageCardId, cardStatusEnum, result, count, _result;
|
|
1421
1518
|
|
|
1422
|
-
return _regenerator2.default.wrap(function
|
|
1519
|
+
return _regenerator2.default.wrap(function _callee6$(_context6) {
|
|
1423
1520
|
while (1) {
|
|
1424
|
-
switch (
|
|
1521
|
+
switch (_context6.prev = _context6.next) {
|
|
1425
1522
|
case 0:
|
|
1426
|
-
|
|
1427
|
-
|
|
1523
|
+
_ref18 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref18.isNewRetailBCPos;
|
|
1524
|
+
_context6.prev = 1;
|
|
1428
1525
|
|
|
1429
1526
|
if (!isNewRetailBCPos) {
|
|
1430
|
-
|
|
1527
|
+
_context6.next = 33;
|
|
1431
1528
|
break;
|
|
1432
1529
|
}
|
|
1433
1530
|
|
|
1434
1531
|
cook1 = this.getAllCookies()['errorPwd'];
|
|
1435
1532
|
cook2 = cook1 && JSON.parse(cook1);
|
|
1436
1533
|
message = '密码输入错误';
|
|
1437
|
-
|
|
1534
|
+
memberStorageId = this.paymode.currentMode.meStorageCardId;
|
|
1438
1535
|
|
|
1439
1536
|
if (!cook2) {
|
|
1440
|
-
|
|
1537
|
+
_context6.next = 12;
|
|
1441
1538
|
break;
|
|
1442
1539
|
}
|
|
1443
1540
|
|
|
1444
|
-
if (!cook2.hasOwnProperty(
|
|
1445
|
-
|
|
1541
|
+
if (!cook2.hasOwnProperty(memberStorageId + "")) {
|
|
1542
|
+
_context6.next = 12;
|
|
1446
1543
|
break;
|
|
1447
1544
|
}
|
|
1448
1545
|
|
|
1449
|
-
if (!(cook2[
|
|
1450
|
-
|
|
1546
|
+
if (!(cook2[memberStorageId] > 3)) {
|
|
1547
|
+
_context6.next = 12;
|
|
1451
1548
|
break;
|
|
1452
1549
|
}
|
|
1453
1550
|
|
|
1454
1551
|
message = '今日密码错误已达上限,不可使用储值消费,请明日再试,如忘记请重置密码或修改密码。';
|
|
1455
|
-
return
|
|
1552
|
+
return _context6.abrupt('return', _promise2.default.resolve(message));
|
|
1456
1553
|
|
|
1457
1554
|
case 12:
|
|
1458
|
-
|
|
1459
|
-
|
|
1555
|
+
_paymode$currentMode = this.paymode.currentMode, cardTypeEnum = _paymode$currentMode.cardTypeEnum, memberId = _paymode$currentMode.memberId, meStorageCardId = _paymode$currentMode.meStorageCardId, cardStatusEnum = _paymode$currentMode.cardStatusEnum;
|
|
1556
|
+
result = null;
|
|
1460
1557
|
|
|
1461
|
-
|
|
1462
|
-
|
|
1558
|
+
if (!(cardTypeEnum === 'BALANCE_CARD')) {
|
|
1559
|
+
_context6.next = 20;
|
|
1560
|
+
break;
|
|
1561
|
+
}
|
|
1562
|
+
|
|
1563
|
+
_context6.next = 17;
|
|
1564
|
+
return (0, _tplusApi.ccApi)({ md5Password: _tplusApi.User.pwdEncrypt(value.pwd), cardType: cardTypeEnum }, '/member/MeMemberWallet/checkPaymentPassword/' + memberId, false, false);
|
|
1565
|
+
|
|
1566
|
+
case 17:
|
|
1567
|
+
result = _context6.sent;
|
|
1568
|
+
_context6.next = 29;
|
|
1569
|
+
break;
|
|
1570
|
+
|
|
1571
|
+
case 20:
|
|
1572
|
+
if (!(cardStatusEnum === 'BINDING' && this.member && this.member.ID === memberId)) {
|
|
1573
|
+
_context6.next = 26;
|
|
1574
|
+
break;
|
|
1575
|
+
}
|
|
1576
|
+
|
|
1577
|
+
_context6.next = 23;
|
|
1578
|
+
return (0, _tplusApi.ccApi)({ md5Password: _tplusApi.User.pwdEncrypt(value.pwd), password: value.pwd, cardType: cardTypeEnum }, '/member/MeMemberWallet/checkPaymentPassword/' + meStorageCardId, false, false);
|
|
1579
|
+
|
|
1580
|
+
case 23:
|
|
1581
|
+
result = _context6.sent;
|
|
1582
|
+
_context6.next = 29;
|
|
1583
|
+
break;
|
|
1584
|
+
|
|
1585
|
+
case 26:
|
|
1586
|
+
_context6.next = 28;
|
|
1587
|
+
return (0, _tplusApi.ccApi)({ password: value.pwd, cardType: cardTypeEnum }, '/member/MeMemberWallet/checkPaymentPassword/' + meStorageCardId, false, false);
|
|
1588
|
+
|
|
1589
|
+
case 28:
|
|
1590
|
+
result = _context6.sent;
|
|
1463
1591
|
|
|
1592
|
+
case 29:
|
|
1464
1593
|
if (!result.data) {
|
|
1465
1594
|
if (cook2) {
|
|
1466
|
-
if (cook2.hasOwnProperty(
|
|
1467
|
-
count = cook2[
|
|
1595
|
+
if (cook2.hasOwnProperty(memberStorageId + "")) {
|
|
1596
|
+
count = cook2[memberStorageId];
|
|
1468
1597
|
|
|
1469
|
-
cook2[
|
|
1598
|
+
cook2[memberStorageId] = count + 1;
|
|
1470
1599
|
} else {
|
|
1471
|
-
cook2[
|
|
1600
|
+
cook2[memberStorageId] = 1;
|
|
1472
1601
|
}
|
|
1473
1602
|
} else {
|
|
1474
1603
|
cook2 = {};
|
|
1475
|
-
cook2[
|
|
1604
|
+
cook2[memberStorageId] = 1;
|
|
1476
1605
|
}
|
|
1477
1606
|
this.setCookie('errorPwd', '', -1);
|
|
1478
1607
|
this.setCookie('errorPwd', (0, _stringify2.default)(cook2));
|
|
1479
1608
|
}
|
|
1480
|
-
return
|
|
1609
|
+
return _context6.abrupt('return', _promise2.default.resolve(result.data ? "" : message));
|
|
1481
1610
|
|
|
1482
|
-
case
|
|
1483
|
-
|
|
1611
|
+
case 33:
|
|
1612
|
+
_context6.next = 35;
|
|
1484
1613
|
return (0, _tplusApi.tApi)({ "CheckoutParams": {
|
|
1485
1614
|
"Idmember": value.id,
|
|
1486
1615
|
"Password": value.pwd
|
|
1487
1616
|
} }, 'AA.DR.newRetailMember.CheckoutMemberPassword', false, false);
|
|
1488
1617
|
|
|
1489
|
-
case
|
|
1490
|
-
_result =
|
|
1491
|
-
return
|
|
1618
|
+
case 35:
|
|
1619
|
+
_result = _context6.sent;
|
|
1620
|
+
return _context6.abrupt('return', _promise2.default.resolve(_result.Success ? "" : _result.Message));
|
|
1492
1621
|
|
|
1493
|
-
case
|
|
1494
|
-
|
|
1622
|
+
case 37:
|
|
1623
|
+
_context6.next = 42;
|
|
1495
1624
|
break;
|
|
1496
1625
|
|
|
1497
|
-
case
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
return
|
|
1626
|
+
case 39:
|
|
1627
|
+
_context6.prev = 39;
|
|
1628
|
+
_context6.t0 = _context6['catch'](1);
|
|
1629
|
+
return _context6.abrupt('return', "failed");
|
|
1501
1630
|
|
|
1502
|
-
case
|
|
1631
|
+
case 42:
|
|
1503
1632
|
case 'end':
|
|
1504
|
-
return
|
|
1633
|
+
return _context6.stop();
|
|
1505
1634
|
}
|
|
1506
1635
|
}
|
|
1507
|
-
},
|
|
1636
|
+
}, _callee6, this, [[1, 39]]);
|
|
1508
1637
|
}));
|
|
1509
1638
|
|
|
1510
|
-
function validePwd(
|
|
1511
|
-
return
|
|
1639
|
+
function validePwd(_x4) {
|
|
1640
|
+
return _ref17.apply(this, arguments);
|
|
1512
1641
|
}
|
|
1513
1642
|
|
|
1514
1643
|
return validePwd;
|
|
@@ -1530,7 +1659,7 @@ var SettlementStore = (_class = function () {
|
|
|
1530
1659
|
var idstore = (0, _tplusPoslogin.PosInitData)('storeID');
|
|
1531
1660
|
return (0, _tplusApi.ccApi)({
|
|
1532
1661
|
Idstore: idstore,
|
|
1533
|
-
meMemberId: _this12.
|
|
1662
|
+
meMemberId: _this12.paymode.currentMode.memberId,
|
|
1534
1663
|
oldPassword: null,
|
|
1535
1664
|
newPassword: _tplusApi.User.pwdEncrypt(newPassConfirm),
|
|
1536
1665
|
dataSource: "POS"
|
|
@@ -1547,41 +1676,134 @@ var SettlementStore = (_class = function () {
|
|
|
1547
1676
|
var _this13 = this;
|
|
1548
1677
|
|
|
1549
1678
|
return function () {
|
|
1550
|
-
var
|
|
1679
|
+
var _ref19 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee7(_this) {
|
|
1551
1680
|
var _getLoginInfo3, IdStore, StoreCode, resp;
|
|
1552
1681
|
|
|
1553
|
-
return _regenerator2.default.wrap(function
|
|
1682
|
+
return _regenerator2.default.wrap(function _callee7$(_context7) {
|
|
1554
1683
|
while (1) {
|
|
1555
|
-
switch (
|
|
1684
|
+
switch (_context7.prev = _context7.next) {
|
|
1556
1685
|
case 0:
|
|
1557
1686
|
_getLoginInfo3 = _this13.getLoginInfo(), IdStore = _getLoginInfo3.IdStore, StoreCode = _getLoginInfo3.StoreCode;
|
|
1558
|
-
|
|
1687
|
+
_context7.next = 3;
|
|
1559
1688
|
return (0, _tplusApi.tApi)({ Idmember: _this13.member.ID, IdStore: IdStore, StoreCode: StoreCode }, 'chanjet.AA.DR.INewRetailMember.GetUmemberDTO', false, false);
|
|
1560
1689
|
|
|
1561
1690
|
case 3:
|
|
1562
|
-
resp =
|
|
1691
|
+
resp = _context7.sent;
|
|
1563
1692
|
|
|
1564
1693
|
_this.member = resp;
|
|
1565
|
-
_this.paymode.
|
|
1566
|
-
return
|
|
1694
|
+
_this.paymode.updateMemberStorageCardNo(resp.StorageCardNo, resp.WalletEnabled);
|
|
1695
|
+
return _context7.abrupt('return', _promise2.default.resolve(resp));
|
|
1567
1696
|
|
|
1568
1697
|
case 7:
|
|
1569
1698
|
case 'end':
|
|
1570
|
-
return
|
|
1699
|
+
return _context7.stop();
|
|
1700
|
+
}
|
|
1701
|
+
}
|
|
1702
|
+
}, _callee7, _this13);
|
|
1703
|
+
}));
|
|
1704
|
+
|
|
1705
|
+
return function (_x5) {
|
|
1706
|
+
return _ref19.apply(this, arguments);
|
|
1707
|
+
};
|
|
1708
|
+
}();
|
|
1709
|
+
}
|
|
1710
|
+
}), _descriptor3 = _applyDecoratedDescriptor(_class.prototype, 'updateCurrentMode', [_mobx.action], {
|
|
1711
|
+
enumerable: true,
|
|
1712
|
+
initializer: function initializer() {
|
|
1713
|
+
var _this14 = this;
|
|
1714
|
+
|
|
1715
|
+
return function () {
|
|
1716
|
+
var _ref20 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee8(memberId) {
|
|
1717
|
+
var result;
|
|
1718
|
+
return _regenerator2.default.wrap(function _callee8$(_context8) {
|
|
1719
|
+
while (1) {
|
|
1720
|
+
switch (_context8.prev = _context8.next) {
|
|
1721
|
+
case 0:
|
|
1722
|
+
_context8.next = 2;
|
|
1723
|
+
return (0, _tplusApi.ccApi)({}, '/marketingtool/MeStorageCard/getCardInfoByMemberId/' + memberId + '/' + true, false, false, { method: 'get' });
|
|
1724
|
+
|
|
1725
|
+
case 2:
|
|
1726
|
+
result = _context8.sent;
|
|
1727
|
+
|
|
1728
|
+
if (!(result && result.data.length)) {
|
|
1729
|
+
_context8.next = 20;
|
|
1730
|
+
break;
|
|
1731
|
+
}
|
|
1732
|
+
|
|
1733
|
+
if (!(result.data.length === 1)) {
|
|
1734
|
+
_context8.next = 9;
|
|
1735
|
+
break;
|
|
1736
|
+
}
|
|
1737
|
+
|
|
1738
|
+
_this14.paymode.updateCardInfo(result.data[0]);
|
|
1739
|
+
return _context8.abrupt('return', result.data);
|
|
1740
|
+
|
|
1741
|
+
case 9:
|
|
1742
|
+
if (!(result.data && result.data.length === 1)) {
|
|
1743
|
+
_context8.next = 14;
|
|
1744
|
+
break;
|
|
1745
|
+
}
|
|
1746
|
+
|
|
1747
|
+
_this14.paymode.updateCardInfo(result.data[0]);
|
|
1748
|
+
return _context8.abrupt('return', result.data);
|
|
1749
|
+
|
|
1750
|
+
case 14:
|
|
1751
|
+
if (!(result.data && result.data.length > 1)) {
|
|
1752
|
+
_context8.next = 18;
|
|
1753
|
+
break;
|
|
1754
|
+
}
|
|
1755
|
+
|
|
1756
|
+
return _context8.abrupt('return', result.data);
|
|
1757
|
+
|
|
1758
|
+
case 18:
|
|
1759
|
+
_message2.default.warn('没有可用储值卡!');
|
|
1760
|
+
return _context8.abrupt('return', false);
|
|
1761
|
+
|
|
1762
|
+
case 20:
|
|
1763
|
+
case 'end':
|
|
1764
|
+
return _context8.stop();
|
|
1571
1765
|
}
|
|
1572
1766
|
}
|
|
1573
|
-
},
|
|
1767
|
+
}, _callee8, _this14);
|
|
1574
1768
|
}));
|
|
1575
1769
|
|
|
1576
|
-
return function (
|
|
1770
|
+
return function (_x6) {
|
|
1577
1771
|
return _ref20.apply(this, arguments);
|
|
1578
1772
|
};
|
|
1579
1773
|
}();
|
|
1580
1774
|
}
|
|
1775
|
+
}), _descriptor4 = _applyDecoratedDescriptor(_class.prototype, 'updateCardInfo', [_mobx.action], {
|
|
1776
|
+
enumerable: true,
|
|
1777
|
+
initializer: function initializer() {
|
|
1778
|
+
var _this15 = this;
|
|
1779
|
+
|
|
1780
|
+
return (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee9() {
|
|
1781
|
+
var address, result;
|
|
1782
|
+
return _regenerator2.default.wrap(function _callee9$(_context9) {
|
|
1783
|
+
while (1) {
|
|
1784
|
+
switch (_context9.prev = _context9.next) {
|
|
1785
|
+
case 0:
|
|
1786
|
+
address = '/marketingtool/MeStorageCard/getCardInfoByCardNo/' + _this15.paymode.currentMode.storageCardNo;
|
|
1787
|
+
_context9.next = 3;
|
|
1788
|
+
return (0, _tplusApi.ccApi)({}, address, false, false, { method: 'get', timeout_skip: true });
|
|
1789
|
+
|
|
1790
|
+
case 3:
|
|
1791
|
+
result = _context9.sent;
|
|
1792
|
+
|
|
1793
|
+
_this15.paymode.updateCardInfo(result.data);
|
|
1794
|
+
|
|
1795
|
+
case 5:
|
|
1796
|
+
case 'end':
|
|
1797
|
+
return _context9.stop();
|
|
1798
|
+
}
|
|
1799
|
+
}
|
|
1800
|
+
}, _callee9, _this15);
|
|
1801
|
+
}));
|
|
1802
|
+
}
|
|
1581
1803
|
}), _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);
|
|
1582
1804
|
exports.default = SettlementStore;
|
|
1583
1805
|
var PayMode = exports.PayMode = (_class3 = function () {
|
|
1584
|
-
|
|
1806
|
+
//预订非全款 or 取货最大补款数大于0时 为 true
|
|
1585
1807
|
function PayMode() {
|
|
1586
1808
|
// this.amount=getFixedNumber(amount);
|
|
1587
1809
|
// this.calcReserved();
|
|
@@ -1592,18 +1814,24 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
1592
1814
|
this.onlineamount = 0;
|
|
1593
1815
|
this.maxamount = 0;
|
|
1594
1816
|
|
|
1595
|
-
_initDefineProp(this, 'currentFocus',
|
|
1817
|
+
_initDefineProp(this, 'currentFocus', _descriptor5, this);
|
|
1596
1818
|
|
|
1597
|
-
_initDefineProp(this, 'received',
|
|
1819
|
+
_initDefineProp(this, 'received', _descriptor6, this);
|
|
1598
1820
|
|
|
1599
|
-
_initDefineProp(this, 'receivable',
|
|
1821
|
+
_initDefineProp(this, 'receivable', _descriptor7, this);
|
|
1600
1822
|
|
|
1601
|
-
_initDefineProp(this, 'paymodes',
|
|
1823
|
+
_initDefineProp(this, 'paymodes', _descriptor8, this);
|
|
1602
1824
|
|
|
1603
|
-
_initDefineProp(this, 'thePaymodes',
|
|
1825
|
+
_initDefineProp(this, 'thePaymodes', _descriptor9, this);
|
|
1604
1826
|
|
|
1605
1827
|
this.bookMaxValue = 0;
|
|
1606
1828
|
this.isNotFullBook = false;
|
|
1829
|
+
this.isNotFullOnlyBook = false;
|
|
1830
|
+
|
|
1831
|
+
_initDefineProp(this, 'storageCardNo', _descriptor10, this);
|
|
1832
|
+
|
|
1833
|
+
_initDefineProp(this, 'balance', _descriptor11, this);
|
|
1834
|
+
|
|
1607
1835
|
this.currentMode = null;
|
|
1608
1836
|
this.checkList = [];
|
|
1609
1837
|
this.settle = {
|
|
@@ -1611,13 +1839,15 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
1611
1839
|
hotKey: "Ctrl+M"
|
|
1612
1840
|
};
|
|
1613
1841
|
|
|
1614
|
-
_initDefineProp(this, 'calcCheckList',
|
|
1842
|
+
_initDefineProp(this, 'calcCheckList', _descriptor12, this);
|
|
1615
1843
|
|
|
1616
|
-
_initDefineProp(this, 'setCouponNum',
|
|
1844
|
+
_initDefineProp(this, 'setCouponNum', _descriptor13, this);
|
|
1617
1845
|
|
|
1618
|
-
_initDefineProp(this, 'addDjqs',
|
|
1619
|
-
}
|
|
1846
|
+
_initDefineProp(this, 'addDjqs', _descriptor14, this);
|
|
1847
|
+
}
|
|
1620
1848
|
// @observable store = null;
|
|
1849
|
+
//只是预订非全款时为true
|
|
1850
|
+
//应收
|
|
1621
1851
|
|
|
1622
1852
|
|
|
1623
1853
|
(0, _createClass3.default)(PayMode, [{
|
|
@@ -1663,10 +1893,30 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
1663
1893
|
this.receivable = (0, _utils.getFixedNumber)(this.amount - sum);
|
|
1664
1894
|
}
|
|
1665
1895
|
}
|
|
1896
|
+
}, {
|
|
1897
|
+
key: 'updateMemberStorageCardNo',
|
|
1898
|
+
value: function updateMemberStorageCardNo(storageCardNo, walletEnabled) {
|
|
1899
|
+
this.currentMode.storageCardNo = storageCardNo;
|
|
1900
|
+
this.currentMode.walletEnabled = walletEnabled;
|
|
1901
|
+
}
|
|
1902
|
+
}, {
|
|
1903
|
+
key: 'updateCardInfo',
|
|
1904
|
+
value: function updateCardInfo(m) {
|
|
1905
|
+
this.currentMode.cardStatusEnum = m.CardStatusEnum;
|
|
1906
|
+
this.currentMode.isNeedPassword = m.IsNeedPassword;
|
|
1907
|
+
this.currentMode.meStorageCardId = m.MeStorageCardId;
|
|
1908
|
+
this.currentMode.storageCardNo = m.StorageCardNo;
|
|
1909
|
+
this.currentMode.balance = m.BalanceStorage;
|
|
1910
|
+
this.currentMode.rawbalance = m.BalanceStorage;
|
|
1911
|
+
this.currentMode.cardTypeEnum = m.CardTypeEnum;
|
|
1912
|
+
this.currentMode.walletEnabled = m.WalletEnabled;
|
|
1913
|
+
this.currentMode.memberId = m.ID;
|
|
1914
|
+
this.currentMode.freePaymentPasswordStore = m.FreePaymentPasswordStore;
|
|
1915
|
+
}
|
|
1666
1916
|
}, {
|
|
1667
1917
|
key: 'calcDjqCheckValue',
|
|
1668
1918
|
value: function calcDjqCheckValue(q1, dto, params) {
|
|
1669
|
-
var
|
|
1919
|
+
var _this16 = this;
|
|
1670
1920
|
|
|
1671
1921
|
var useLimitPerOrder = (0, _tplusPoslogin.PosInitData)('UseLimitPerOrder');
|
|
1672
1922
|
var qList = (0, _filter3.default)(this.currentMode.djqs, function (djq) {
|
|
@@ -1680,12 +1930,12 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
1680
1930
|
this.checkList = [];
|
|
1681
1931
|
}
|
|
1682
1932
|
|
|
1683
|
-
var
|
|
1684
|
-
isNewRetailBCPos =
|
|
1933
|
+
var _ref22 = _mutantsUtil.platform || {},
|
|
1934
|
+
isNewRetailBCPos = _ref22.isNewRetailBCPos;
|
|
1685
1935
|
|
|
1686
|
-
var _enumController$
|
|
1687
|
-
PayStyle = _enumController$
|
|
1688
|
-
Differentiate = _enumController$
|
|
1936
|
+
var _enumController$getEn16 = _mutantsUtil.enumController.getEnumOj(),
|
|
1937
|
+
PayStyle = _enumController$getEn16.PayStyle,
|
|
1938
|
+
Differentiate = _enumController$getEn16.Differentiate;
|
|
1689
1939
|
|
|
1690
1940
|
if (q1) {
|
|
1691
1941
|
if (!this.currentMode.boriginReturn && parseFloat(this.currentMode.maxamount) <= 0) {
|
|
@@ -1713,7 +1963,7 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
1713
1963
|
if (!q1.checked) {
|
|
1714
1964
|
this.checkList.forEach(function (ele, i) {
|
|
1715
1965
|
if (ele.id === q1.id) {
|
|
1716
|
-
|
|
1966
|
+
_this16.checkList.splice(i, 1);
|
|
1717
1967
|
}
|
|
1718
1968
|
});
|
|
1719
1969
|
} else {
|
|
@@ -1785,24 +2035,24 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
1785
2035
|
if (result && result.length != 0) {
|
|
1786
2036
|
result.forEach(function (element, index) {
|
|
1787
2037
|
var djq1 = false;
|
|
1788
|
-
|
|
2038
|
+
_this16.currentMode.djqs.forEach(function (djq) {
|
|
1789
2039
|
if (element.id === djq.id) {
|
|
1790
2040
|
djq1 = true;
|
|
1791
2041
|
}
|
|
1792
2042
|
});
|
|
1793
2043
|
|
|
1794
|
-
var
|
|
1795
|
-
couponCode =
|
|
1796
|
-
name =
|
|
1797
|
-
tieredAmountResult =
|
|
1798
|
-
fromDate =
|
|
1799
|
-
dateMount =
|
|
1800
|
-
promoMethodEnum =
|
|
1801
|
-
discountPct =
|
|
1802
|
-
nominalAmount =
|
|
1803
|
-
promoId =
|
|
1804
|
-
id =
|
|
1805
|
-
doorsill =
|
|
2044
|
+
var _ref23 = element || {},
|
|
2045
|
+
couponCode = _ref23.couponCode,
|
|
2046
|
+
name = _ref23.name,
|
|
2047
|
+
tieredAmountResult = _ref23.tieredAmountResult,
|
|
2048
|
+
fromDate = _ref23.fromDate,
|
|
2049
|
+
dateMount = _ref23.dateMount,
|
|
2050
|
+
promoMethodEnum = _ref23.promoMethodEnum,
|
|
2051
|
+
discountPct = _ref23.discountPct,
|
|
2052
|
+
nominalAmount = _ref23.nominalAmount,
|
|
2053
|
+
promoId = _ref23.promoId,
|
|
2054
|
+
id = _ref23.id,
|
|
2055
|
+
doorsill = _ref23.doorsill;
|
|
1806
2056
|
|
|
1807
2057
|
var condValue = tieredAmountResult.condValue,
|
|
1808
2058
|
promoDiscount = tieredAmountResult.promoDiscount,
|
|
@@ -1830,10 +2080,10 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
1830
2080
|
// couponCategoryEnum: tieredAmountResult.couponCategoryEnum,
|
|
1831
2081
|
// id
|
|
1832
2082
|
// })
|
|
1833
|
-
|
|
2083
|
+
_this16.addDjqs(couponCode, name, true, nominalAmount, doorsill, element.LastTS, false, true, dto.Idmember, dateMount, displayText, promoMethodEnum, discountPct, promoId, promoRuleId, tieredAmountResult.couponCategoryEnum, id);
|
|
1834
2084
|
djq1 = false;
|
|
1835
2085
|
} else {
|
|
1836
|
-
|
|
2086
|
+
_this16.setCouponNum(element.id, tieredAmountResult.couponCategoryEnum, promoMethodEnum, nominalAmount, promoDiscount);
|
|
1837
2087
|
// this.currentMode.djqs[0].couponCategoryEnum = 'couponCategoryEnum';
|
|
1838
2088
|
// djq1.couponCategoryEnum = element.tieredAmountResult.couponCategoryEnum
|
|
1839
2089
|
}
|
|
@@ -1846,11 +2096,11 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
1846
2096
|
}, {
|
|
1847
2097
|
key: 'calcDjqValue',
|
|
1848
2098
|
value: function calcDjqValue(q1) {
|
|
1849
|
-
var
|
|
1850
|
-
isNewRetailBCPos =
|
|
2099
|
+
var _ref24 = _mutantsUtil.platform || {},
|
|
2100
|
+
isNewRetailBCPos = _ref24.isNewRetailBCPos;
|
|
1851
2101
|
|
|
1852
|
-
var _enumController$
|
|
1853
|
-
Differentiate = _enumController$
|
|
2102
|
+
var _enumController$getEn17 = _mutantsUtil.enumController.getEnumOj(),
|
|
2103
|
+
Differentiate = _enumController$getEn17.Differentiate;
|
|
1854
2104
|
|
|
1855
2105
|
if (q1) {
|
|
1856
2106
|
if (!this.currentMode.boriginReturn && parseFloat(this.currentMode.maxamount) <= 0) {
|
|
@@ -1912,8 +2162,8 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
1912
2162
|
this.currentMode.errinfo = '';
|
|
1913
2163
|
var sum = this.amount;
|
|
1914
2164
|
|
|
1915
|
-
var _enumController$
|
|
1916
|
-
PayStyle = _enumController$
|
|
2165
|
+
var _enumController$getEn18 = _mutantsUtil.enumController.getEnumOj(),
|
|
2166
|
+
PayStyle = _enumController$getEn18.PayStyle;
|
|
1917
2167
|
|
|
1918
2168
|
this.thePaymodes && this.thePaymodes.forEach(function (mode) {
|
|
1919
2169
|
if (mode.paymentType === PayStyle.hyczk) {
|
|
@@ -1932,28 +2182,28 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
1932
2182
|
}, {
|
|
1933
2183
|
key: 'calcMemberBalance',
|
|
1934
2184
|
value: function calcMemberBalance() {
|
|
1935
|
-
this.currentMode.balance = this.currentMode.
|
|
2185
|
+
this.currentMode.balance = this.currentMode.rawbalance - this.currentMode.value;
|
|
1936
2186
|
}
|
|
1937
2187
|
}, {
|
|
1938
2188
|
key: 'setPaymodes',
|
|
1939
2189
|
value: function () {
|
|
1940
|
-
var
|
|
1941
|
-
var
|
|
2190
|
+
var _ref25 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee10(type, isIntegralExchange) {
|
|
2191
|
+
var _this17 = this;
|
|
1942
2192
|
|
|
1943
|
-
var _enumController$
|
|
2193
|
+
var _enumController$getEn19, settleStyleType, PayStyle, memberStoreCode, settlementCode, param, modes;
|
|
1944
2194
|
|
|
1945
|
-
return _regenerator2.default.wrap(function
|
|
2195
|
+
return _regenerator2.default.wrap(function _callee10$(_context10) {
|
|
1946
2196
|
while (1) {
|
|
1947
|
-
switch (
|
|
2197
|
+
switch (_context10.prev = _context10.next) {
|
|
1948
2198
|
case 0:
|
|
1949
|
-
_enumController$
|
|
2199
|
+
_enumController$getEn19 = _mutantsUtil.enumController.getEnumOj(), settleStyleType = _enumController$getEn19.settleStyleType, PayStyle = _enumController$getEn19.PayStyle;
|
|
1950
2200
|
memberStoreCode = settleStyleType.memberStoreCode, settlementCode = settleStyleType.settlementCode;
|
|
1951
2201
|
param = { 'settleStyleType': type == 1 ? memberStoreCode : settlementCode, isIntegralExchange: isIntegralExchange };
|
|
1952
|
-
|
|
2202
|
+
_context10.next = 5;
|
|
1953
2203
|
return (0, _tplusApi.tApi)({ param: param }, 'chanjet.RE.NewPos.GetNewStoreSettleStyles', false, false);
|
|
1954
2204
|
|
|
1955
2205
|
case 5:
|
|
1956
|
-
modes =
|
|
2206
|
+
modes = _context10.sent;
|
|
1957
2207
|
|
|
1958
2208
|
if (modes) {
|
|
1959
2209
|
(0, _mobx.runInAction)(function () {
|
|
@@ -1962,7 +2212,7 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
1962
2212
|
//产品需求确认会员储值卡结算方式前端展示统一调整为“储值卡" tuzha by 2020-07-08
|
|
1963
2213
|
|
|
1964
2214
|
if (mode.Code == PayStyle.hyczk) {
|
|
1965
|
-
mode.Name = '
|
|
2215
|
+
mode.Name = '储值卡';
|
|
1966
2216
|
}
|
|
1967
2217
|
paymodes.push({
|
|
1968
2218
|
name: mode.Name,
|
|
@@ -1979,21 +2229,21 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
1979
2229
|
virtualPay: mode.VirtualPay
|
|
1980
2230
|
});
|
|
1981
2231
|
});
|
|
1982
|
-
|
|
2232
|
+
_this17.paymodes = paymodes;
|
|
1983
2233
|
//modes.QuickSettleStyles
|
|
1984
2234
|
});
|
|
1985
2235
|
}
|
|
1986
2236
|
|
|
1987
2237
|
case 7:
|
|
1988
2238
|
case 'end':
|
|
1989
|
-
return
|
|
2239
|
+
return _context10.stop();
|
|
1990
2240
|
}
|
|
1991
2241
|
}
|
|
1992
|
-
},
|
|
2242
|
+
}, _callee10, this);
|
|
1993
2243
|
}));
|
|
1994
2244
|
|
|
1995
|
-
function setPaymodes(
|
|
1996
|
-
return
|
|
2245
|
+
function setPaymodes(_x7, _x8) {
|
|
2246
|
+
return _ref25.apply(this, arguments);
|
|
1997
2247
|
}
|
|
1998
2248
|
|
|
1999
2249
|
return setPaymodes;
|
|
@@ -2010,47 +2260,57 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
2010
2260
|
}
|
|
2011
2261
|
}]);
|
|
2012
2262
|
return PayMode;
|
|
2013
|
-
}(), (
|
|
2263
|
+
}(), (_descriptor5 = _applyDecoratedDescriptor(_class3.prototype, 'currentFocus', [_mobx.observable], {
|
|
2014
2264
|
enumerable: true,
|
|
2015
2265
|
initializer: function initializer() {
|
|
2016
2266
|
return "";
|
|
2017
2267
|
}
|
|
2018
|
-
}),
|
|
2268
|
+
}), _descriptor6 = _applyDecoratedDescriptor(_class3.prototype, 'received', [_mobx.observable], {
|
|
2019
2269
|
enumerable: true,
|
|
2020
2270
|
initializer: function initializer() {
|
|
2021
2271
|
return 0;
|
|
2022
2272
|
}
|
|
2023
|
-
}),
|
|
2273
|
+
}), _descriptor7 = _applyDecoratedDescriptor(_class3.prototype, 'receivable', [_mobx.observable], {
|
|
2024
2274
|
enumerable: true,
|
|
2025
2275
|
initializer: function initializer() {
|
|
2026
2276
|
return 0;
|
|
2027
2277
|
}
|
|
2028
|
-
}),
|
|
2278
|
+
}), _descriptor8 = _applyDecoratedDescriptor(_class3.prototype, 'paymodes', [_mobx.observable], {
|
|
2029
2279
|
enumerable: true,
|
|
2030
2280
|
initializer: function initializer() {
|
|
2031
2281
|
return [];
|
|
2032
2282
|
}
|
|
2033
|
-
}),
|
|
2283
|
+
}), _descriptor9 = _applyDecoratedDescriptor(_class3.prototype, 'thePaymodes', [_mobx.observable], {
|
|
2034
2284
|
enumerable: true,
|
|
2035
2285
|
initializer: function initializer() {
|
|
2036
2286
|
return [];
|
|
2037
2287
|
}
|
|
2038
|
-
}),
|
|
2288
|
+
}), _descriptor10 = _applyDecoratedDescriptor(_class3.prototype, 'storageCardNo', [_mobx.observable], {
|
|
2039
2289
|
enumerable: true,
|
|
2040
2290
|
initializer: function initializer() {
|
|
2041
|
-
|
|
2291
|
+
return null;
|
|
2292
|
+
}
|
|
2293
|
+
}), _descriptor11 = _applyDecoratedDescriptor(_class3.prototype, 'balance', [_mobx.observable], {
|
|
2294
|
+
enumerable: true,
|
|
2295
|
+
initializer: function initializer() {
|
|
2296
|
+
return null;
|
|
2297
|
+
}
|
|
2298
|
+
}), _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], {
|
|
2299
|
+
enumerable: true,
|
|
2300
|
+
initializer: function initializer() {
|
|
2301
|
+
var _this18 = this;
|
|
2042
2302
|
|
|
2043
2303
|
return function () {
|
|
2044
|
-
|
|
2304
|
+
_this18.checkList = [];
|
|
2045
2305
|
};
|
|
2046
2306
|
}
|
|
2047
|
-
}), _applyDecoratedDescriptor(_class3.prototype, 'calcDjqCheckValue', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class3.prototype, 'calcDjqCheckValue'), _class3.prototype),
|
|
2307
|
+
}), _applyDecoratedDescriptor(_class3.prototype, 'updateMemberStorageCardNo', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class3.prototype, 'updateMemberStorageCardNo'), _class3.prototype), _applyDecoratedDescriptor(_class3.prototype, 'updateCardInfo', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class3.prototype, 'updateCardInfo'), _class3.prototype), _applyDecoratedDescriptor(_class3.prototype, 'calcDjqCheckValue', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class3.prototype, 'calcDjqCheckValue'), _class3.prototype), _descriptor13 = _applyDecoratedDescriptor(_class3.prototype, 'setCouponNum', [_mobx.action], {
|
|
2048
2308
|
enumerable: true,
|
|
2049
2309
|
initializer: function initializer() {
|
|
2050
|
-
var
|
|
2310
|
+
var _this19 = this;
|
|
2051
2311
|
|
|
2052
2312
|
return function (id, couponNum, promoMethodEnum, nominalAmount, promoDiscount) {
|
|
2053
|
-
|
|
2313
|
+
_this19.currentMode.djqs.forEach(function (ele) {
|
|
2054
2314
|
if (ele.id === id) {
|
|
2055
2315
|
promoMethodEnum == "CASH_COUPON" ? ele.amount = nominalAmount : ele.amount = promoDiscount;
|
|
2056
2316
|
ele.couponCategoryEnum = couponNum;
|
|
@@ -2060,10 +2320,10 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
2060
2320
|
});
|
|
2061
2321
|
};
|
|
2062
2322
|
}
|
|
2063
|
-
}),
|
|
2323
|
+
}), _descriptor14 = _applyDecoratedDescriptor(_class3.prototype, 'addDjqs', [_mobx.action], {
|
|
2064
2324
|
enumerable: true,
|
|
2065
2325
|
initializer: function initializer() {
|
|
2066
|
-
var
|
|
2326
|
+
var _this20 = this;
|
|
2067
2327
|
|
|
2068
2328
|
return function (promoCouponCode, name, IsEnable, amount, doorsill, LastTS, checked, IsRepelWithPoints, UMemberID, expired, displayText, promoMethodEnum, discountPct, promoId, promoRuleId, couponCategoryEnum, id) {
|
|
2069
2329
|
var djq = {
|
|
@@ -2085,25 +2345,25 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
2085
2345
|
couponCategoryEnum: couponCategoryEnum,
|
|
2086
2346
|
id: id
|
|
2087
2347
|
};
|
|
2088
|
-
|
|
2348
|
+
_this20.currentMode.djqs.push(djq);
|
|
2089
2349
|
};
|
|
2090
2350
|
}
|
|
2091
2351
|
}), _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);
|
|
2092
2352
|
var Member = exports.Member = (_class5 = function () {
|
|
2093
2353
|
function Member(m) {
|
|
2094
|
-
var
|
|
2354
|
+
var _this21 = this;
|
|
2095
2355
|
|
|
2096
2356
|
(0, _classCallCheck3.default)(this, Member);
|
|
2097
2357
|
|
|
2098
|
-
_initDefineProp(this, 'cardNo',
|
|
2358
|
+
_initDefineProp(this, 'cardNo', _descriptor15, this);
|
|
2099
2359
|
|
|
2100
|
-
_initDefineProp(this, 'balance',
|
|
2360
|
+
_initDefineProp(this, 'balance', _descriptor16, this);
|
|
2101
2361
|
|
|
2102
|
-
_initDefineProp(this, 'exchangable',
|
|
2362
|
+
_initDefineProp(this, 'exchangable', _descriptor17, this);
|
|
2103
2363
|
|
|
2104
|
-
_initDefineProp(this, '
|
|
2364
|
+
_initDefineProp(this, 'meStorageCardId', _descriptor18, this);
|
|
2105
2365
|
|
|
2106
|
-
_initDefineProp(this, '
|
|
2366
|
+
_initDefineProp(this, 'storageCardNo', _descriptor19, this);
|
|
2107
2367
|
|
|
2108
2368
|
if (m) {
|
|
2109
2369
|
this.id = m.ID;
|
|
@@ -2114,17 +2374,15 @@ var Member = exports.Member = (_class5 = function () {
|
|
|
2114
2374
|
return key == 'canusedbalancestorage';
|
|
2115
2375
|
});
|
|
2116
2376
|
|
|
2117
|
-
var
|
|
2118
|
-
isNewRetailBCPos =
|
|
2377
|
+
var _ref26 = _mutantsUtil.platform || {},
|
|
2378
|
+
isNewRetailBCPos = _ref26.isNewRetailBCPos;
|
|
2119
2379
|
|
|
2120
|
-
m.StorageCardNo && (this.StorageCardNo = m.StorageCardNo);
|
|
2121
|
-
m.MeStorageCardId && (this.MeStorageCardId = m.MeStorageCardId);
|
|
2122
2380
|
(0, _mobx.runInAction)(function () {
|
|
2123
|
-
|
|
2381
|
+
_this21.cardNo = m.CardCode;
|
|
2124
2382
|
if (index >= 0) {
|
|
2125
|
-
|
|
2383
|
+
_this21.balance = parseFloat(m.DynamicPropertyValues[index]);
|
|
2126
2384
|
} else {
|
|
2127
|
-
|
|
2385
|
+
_this21.balance = _this21.rawbalance;
|
|
2128
2386
|
}
|
|
2129
2387
|
});
|
|
2130
2388
|
this.needPwd = m.MemberType ? m.MemberType.IsNeedPwd : false;
|
|
@@ -2144,32 +2402,22 @@ var Member = exports.Member = (_class5 = function () {
|
|
|
2144
2402
|
this.cardNo = v;
|
|
2145
2403
|
this.id = null;
|
|
2146
2404
|
}
|
|
2147
|
-
}, {
|
|
2148
|
-
key: 'setMeStorageCardId',
|
|
2149
|
-
value: function setMeStorageCardId(v) {
|
|
2150
|
-
this.MeStorageCardId = v;
|
|
2151
|
-
}
|
|
2152
|
-
}, {
|
|
2153
|
-
key: 'setStorageCardNo',
|
|
2154
|
-
value: function setStorageCardNo(v) {
|
|
2155
|
-
this.StorageCardNo = v;
|
|
2156
|
-
}
|
|
2157
2405
|
}]);
|
|
2158
2406
|
return Member;
|
|
2159
|
-
}(), (
|
|
2407
|
+
}(), (_descriptor15 = _applyDecoratedDescriptor(_class5.prototype, 'cardNo', [_mobx.observable], {
|
|
2160
2408
|
enumerable: true,
|
|
2161
2409
|
initializer: null
|
|
2162
|
-
}),
|
|
2410
|
+
}), _descriptor16 = _applyDecoratedDescriptor(_class5.prototype, 'balance', [_mobx.observable], {
|
|
2163
2411
|
enumerable: true,
|
|
2164
2412
|
initializer: null
|
|
2165
|
-
}),
|
|
2413
|
+
}), _descriptor17 = _applyDecoratedDescriptor(_class5.prototype, 'exchangable', [_mobx.observable], {
|
|
2166
2414
|
enumerable: true,
|
|
2167
2415
|
initializer: null
|
|
2168
|
-
}),
|
|
2416
|
+
}), _descriptor18 = _applyDecoratedDescriptor(_class5.prototype, 'meStorageCardId', [_mobx.observable], {
|
|
2169
2417
|
enumerable: true,
|
|
2170
2418
|
initializer: null
|
|
2171
|
-
}),
|
|
2419
|
+
}), _descriptor19 = _applyDecoratedDescriptor(_class5.prototype, 'storageCardNo', [_mobx.observable], {
|
|
2172
2420
|
enumerable: true,
|
|
2173
2421
|
initializer: null
|
|
2174
|
-
}), _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)
|
|
2422
|
+
}), _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);
|
|
2175
2423
|
//# sourceMappingURL=settlementStore.js.map
|