tplus-components-touch 3.33.8 → 3.33.12
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 +6 -6
- package/dist/components/billSearch/index.js.map +1 -1
- package/dist/components/billSearch/index.less +376 -376
- package/dist/components/cloudPrint/BTPrintFormatUtil.js +17 -17
- package/dist/components/cloudPrint/BTPrintFormatUtil.js.map +1 -1
- package/dist/components/cloudPrint/api.js.map +1 -1
- package/dist/components/cloudPrint/index.js.map +1 -1
- package/dist/components/cloudPrint/printDispatch.js +7 -7
- 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 +6 -6
- 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.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 +99 -99
- 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.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 +5 -5
- 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 -156
- 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.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/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.map +1 -1
- package/dist/components/progressState/ProgressState.js +10 -10
- 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.map +1 -1
- package/dist/components/settlement/moreCzkTable/style.less +6 -6
- 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 +256 -307
- package/dist/components/settlement/settlement.js.map +1 -1
- package/dist/components/settlement/settlement.less +1686 -1686
- package/dist/components/settlement/settlementStore.js +466 -365
- 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_index.html +5248 -5248
- package/dist/components/ticon/iconfont/iconfont.css +895 -895
- package/dist/components/ticon/iconfont/iconfont.json +1549 -1549
- package/dist/components/ticon/iconfont/iconfont.svg +593 -593
- package/dist/components/ticon/index.js.map +1 -1
- package/dist/components/touchScroll/index.js +9 -9
- 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 +9 -9
- package/dist/components/touchTable/index.js.map +1 -1
- package/dist/components/touchTable/index.less +376 -376
- package/dist/components/touchTable/utils.js.map +1 -1
- package/dist/demo/PopOverDemo.js.map +1 -1
- package/dist/index.js +7 -7
- 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, _descriptor3, _descriptor4,
|
|
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
|
|
|
@@ -234,8 +234,6 @@ var SettlementStore = (_class = function () {
|
|
|
234
234
|
var promoVoucher = {};
|
|
235
235
|
_this2.paymode.clearDjqs();
|
|
236
236
|
_this2.paymode.reCalculationDjqs();
|
|
237
|
-
// promoVoucher.bizDate = dto.VoucherDate;
|
|
238
|
-
// promoVoucher.bizDate = new Date().getTime();
|
|
239
237
|
promoVoucher.coupon_code = coupon_code || "";
|
|
240
238
|
promoVoucher.boName = "Retail";
|
|
241
239
|
promoVoucher.voucherId = dto.ID;
|
|
@@ -322,11 +320,7 @@ var SettlementStore = (_class = function () {
|
|
|
322
320
|
_message2.default.error(Differentiate.COUPON + '\uFF08' + result.SN + '\uFF09\u4E0D\u53EF\u4E0E\u79EF\u5206\u4E00\u8D77\u4F7F\u7528');
|
|
323
321
|
} else {
|
|
324
322
|
var IsEnable = couponCategoryEnum === 'RIGUP' || couponCategoryEnum === 'UN_MATCH' || couponCategoryEnum === "PREPARING" || couponCategoryEnum === 'PROMO_LIMITED' || couponCategoryEnum === 'COUPON_CONFLICT' ? false : true;
|
|
325
|
-
|
|
326
|
-
var _ref2 = _mutantsUtil.platform || {},
|
|
327
|
-
isNewRetailBCPos = _ref2.isNewRetailBCPos;
|
|
328
|
-
|
|
329
|
-
_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);
|
|
323
|
+
_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);
|
|
330
324
|
}
|
|
331
325
|
});
|
|
332
326
|
if (promoVoucher.coupon_code) {
|
|
@@ -349,14 +343,14 @@ var SettlementStore = (_class = function () {
|
|
|
349
343
|
};
|
|
350
344
|
|
|
351
345
|
this.checkCoupon = function () {
|
|
352
|
-
var
|
|
353
|
-
var
|
|
346
|
+
var _ref2 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee(sn) {
|
|
347
|
+
var _ref3, isNewRetailBCPos, _enumController$getEn3, PayStyle, Differentiate;
|
|
354
348
|
|
|
355
349
|
return _regenerator2.default.wrap(function _callee$(_context) {
|
|
356
350
|
while (1) {
|
|
357
351
|
switch (_context.prev = _context.next) {
|
|
358
352
|
case 0:
|
|
359
|
-
|
|
353
|
+
_ref3 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref3.isNewRetailBCPos;
|
|
360
354
|
|
|
361
355
|
if (!isNewRetailBCPos) {
|
|
362
356
|
_context.next = 7;
|
|
@@ -424,7 +418,7 @@ var SettlementStore = (_class = function () {
|
|
|
424
418
|
}));
|
|
425
419
|
|
|
426
420
|
return function (_x) {
|
|
427
|
-
return
|
|
421
|
+
return _ref2.apply(this, arguments);
|
|
428
422
|
};
|
|
429
423
|
}();
|
|
430
424
|
|
|
@@ -437,7 +431,8 @@ var SettlementStore = (_class = function () {
|
|
|
437
431
|
zIndex: 1007,
|
|
438
432
|
content: content,
|
|
439
433
|
onOk: function () {
|
|
440
|
-
var
|
|
434
|
+
var _ref4 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2() {
|
|
435
|
+
var ret;
|
|
441
436
|
return _regenerator2.default.wrap(function _callee2$(_context2) {
|
|
442
437
|
while (1) {
|
|
443
438
|
switch (_context2.prev = _context2.next) {
|
|
@@ -446,9 +441,15 @@ var SettlementStore = (_class = function () {
|
|
|
446
441
|
return _this2.saveMember();
|
|
447
442
|
|
|
448
443
|
case 2:
|
|
449
|
-
|
|
444
|
+
ret = _context2.sent;
|
|
445
|
+
|
|
446
|
+
if (ret === false) {
|
|
447
|
+
resolve(false);
|
|
448
|
+
} else {
|
|
449
|
+
resolve(true);
|
|
450
|
+
}
|
|
450
451
|
|
|
451
|
-
case
|
|
452
|
+
case 4:
|
|
452
453
|
case 'end':
|
|
453
454
|
return _context2.stop();
|
|
454
455
|
}
|
|
@@ -457,7 +458,7 @@ var SettlementStore = (_class = function () {
|
|
|
457
458
|
}));
|
|
458
459
|
|
|
459
460
|
return function onOk() {
|
|
460
|
-
return
|
|
461
|
+
return _ref4.apply(this, arguments);
|
|
461
462
|
};
|
|
462
463
|
}(),
|
|
463
464
|
onCancel: function onCancel() {
|
|
@@ -467,8 +468,6 @@ var SettlementStore = (_class = function () {
|
|
|
467
468
|
});
|
|
468
469
|
};
|
|
469
470
|
|
|
470
|
-
_initDefineProp(this, 'setVoucherDate', _descriptor5, this);
|
|
471
|
-
|
|
472
471
|
this.checkIntegralExchangeReturn = function (id) {
|
|
473
472
|
return new _promise2.default(function (resolve, reject) {
|
|
474
473
|
(0, _tplusApi.tApi)({ param: { refVoucherId: id } }, 'chanjet.RE.NewPos.GetNewIntegralExchange', false, false, { timeout_skip: true }).then(function (resp) {
|
|
@@ -584,8 +583,8 @@ var SettlementStore = (_class = function () {
|
|
|
584
583
|
var _enumController$getEn5 = _mutantsUtil.enumController.getEnumOj(),
|
|
585
584
|
PayStyle = _enumController$getEn5.PayStyle;
|
|
586
585
|
|
|
587
|
-
var
|
|
588
|
-
isNewRetailBCPos =
|
|
586
|
+
var _ref5 = _mutantsUtil.platform || {},
|
|
587
|
+
isNewRetailBCPos = _ref5.isNewRetailBCPos;
|
|
589
588
|
|
|
590
589
|
console.log(this.dto, 'dto==========');
|
|
591
590
|
this.paymode.checkList = [];
|
|
@@ -611,19 +610,19 @@ var SettlementStore = (_class = function () {
|
|
|
611
610
|
if (themode.paymentType == PayStyle.djq) {
|
|
612
611
|
(0, _each3.default)(_this5.dto.RetailCouponDetails, function (djq) {
|
|
613
612
|
if (isNewRetailBCPos) {
|
|
614
|
-
var
|
|
615
|
-
displayText =
|
|
616
|
-
promoRuleId =
|
|
617
|
-
dateMount =
|
|
618
|
-
promoMethodEnum =
|
|
619
|
-
discountPct =
|
|
620
|
-
promoId =
|
|
621
|
-
id =
|
|
622
|
-
|
|
623
|
-
_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);
|
|
613
|
+
var _ref6 = djq || {},
|
|
614
|
+
displayText = _ref6.displayText,
|
|
615
|
+
promoRuleId = _ref6.promoRuleId,
|
|
616
|
+
dateMount = _ref6.dateMount,
|
|
617
|
+
promoMethodEnum = _ref6.promoMethodEnum,
|
|
618
|
+
discountPct = _ref6.discountPct,
|
|
619
|
+
promoId = _ref6.promoId,
|
|
620
|
+
id = _ref6.id;
|
|
621
|
+
|
|
622
|
+
_this5.addDjq(djq.CouponCode, djq.CouponTitle, true, null, djq.ReductionAmount, djq.EnableAmount, djq.LastTS, true, false, _this5.dto.Idmember, dateMount, displayText, promoMethodEnum, discountPct, promoId, promoRuleId, null, id, true);
|
|
624
623
|
return;
|
|
625
624
|
}
|
|
626
|
-
_this5.addDjq(djq.CouponCode, djq.CouponTitle, true, djq.ReductionAmount, djq.EnableAmount, djq.LastTS, true, false);
|
|
625
|
+
_this5.addDjq(djq.CouponCode, djq.CouponTitle, true, null, djq.ReductionAmount, djq.EnableAmount, djq.LastTS, true, false);
|
|
627
626
|
});
|
|
628
627
|
}
|
|
629
628
|
_this5.paymode.thePaymodes.push(newmode);
|
|
@@ -726,15 +725,15 @@ var SettlementStore = (_class = function () {
|
|
|
726
725
|
var IdStore = this.storeInfo.storeID;
|
|
727
726
|
var StoreCode = this.storeInfo.storeCode; //_find(this.storeInfo.storeInfos,(store)=>{return store.ID==IdStore;}).Code;
|
|
728
727
|
|
|
729
|
-
var
|
|
730
|
-
isNewRetailBCPos =
|
|
728
|
+
var _ref7 = _mutantsUtil.platform || {},
|
|
729
|
+
isNewRetailBCPos = _ref7.isNewRetailBCPos;
|
|
731
730
|
|
|
732
731
|
var address = '';
|
|
733
732
|
if (isNewRetailBCPos) {
|
|
734
733
|
// address = '/member/memberProfile/FindByStorageCode/'+v;
|
|
735
734
|
address = '/marketingtool/MeStorageCard/getCardInfoByCardNo/' + v + '/' + true;
|
|
736
735
|
return (0, _tplusApi.ccApi)({ code: v }, address, false, false, { method: 'get', timeout_skip: true }).then(function () {
|
|
737
|
-
var
|
|
736
|
+
var _ref8 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee3(result) {
|
|
738
737
|
var data, m;
|
|
739
738
|
return _regenerator2.default.wrap(function _callee3$(_context3) {
|
|
740
739
|
while (1) {
|
|
@@ -809,7 +808,7 @@ var SettlementStore = (_class = function () {
|
|
|
809
808
|
}));
|
|
810
809
|
|
|
811
810
|
return function (_x2) {
|
|
812
|
-
return
|
|
811
|
+
return _ref8.apply(this, arguments);
|
|
813
812
|
};
|
|
814
813
|
}()
|
|
815
814
|
// result.data.forEach((m) => {
|
|
@@ -856,12 +855,13 @@ var SettlementStore = (_class = function () {
|
|
|
856
855
|
}
|
|
857
856
|
}, {
|
|
858
857
|
key: 'addDjq',
|
|
859
|
-
value: function addDjq(promoCouponCode, name, IsEnable, amount, doorsill, LastTS, checked, IsRepelWithPoints, UMemberID, expired, displayText, promoMethodEnum, discountPct, promoId, promoRuleId, couponCategoryEnum, id, unCheck, count) {
|
|
858
|
+
value: function addDjq(promoCouponCode, name, IsEnable, nominalAmount, amount, doorsill, LastTS, checked, IsRepelWithPoints, UMemberID, expired, displayText, promoMethodEnum, discountPct, promoId, promoRuleId, couponCategoryEnum, id, unCheck, count) {
|
|
860
859
|
var djq = {
|
|
861
860
|
code: promoCouponCode,
|
|
862
861
|
promoCouponCode: promoCouponCode,
|
|
863
862
|
name: name,
|
|
864
863
|
IsEnable: IsEnable,
|
|
864
|
+
nominalAmount: nominalAmount,
|
|
865
865
|
amount: amount,
|
|
866
866
|
doorsill: doorsill, //:"无门槛"
|
|
867
867
|
LastTS: LastTS,
|
|
@@ -1079,10 +1079,10 @@ var SettlementStore = (_class = function () {
|
|
|
1079
1079
|
var _enumController$getEn12 = _mutantsUtil.enumController.getEnumOj(),
|
|
1080
1080
|
PayStyle = _enumController$getEn12.PayStyle;
|
|
1081
1081
|
|
|
1082
|
-
var hasThirdPay = this.paymode.thePaymodes.
|
|
1083
|
-
return !!v.thridPayment;
|
|
1084
|
-
});
|
|
1085
|
-
if (hasThirdPay >
|
|
1082
|
+
var hasThirdPay = this.paymode.thePaymodes.filter(function (v) {
|
|
1083
|
+
return !!v.thridPayment && v.value > 0;
|
|
1084
|
+
}) || [];
|
|
1085
|
+
if (hasThirdPay && hasThirdPay.length > 0) {
|
|
1086
1086
|
_message2.default.warn('二开支付目前仅支持单一结算。');
|
|
1087
1087
|
return;
|
|
1088
1088
|
}
|
|
@@ -1154,8 +1154,8 @@ var SettlementStore = (_class = function () {
|
|
|
1154
1154
|
}, {
|
|
1155
1155
|
key: 'commit',
|
|
1156
1156
|
value: function () {
|
|
1157
|
-
var
|
|
1158
|
-
var ret,
|
|
1157
|
+
var _ref9 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee4(bTest) {
|
|
1158
|
+
var status, paylist, ret, _ref10, _ref10$data, code, returnMsg, state, ret1, ret2;
|
|
1159
1159
|
|
|
1160
1160
|
return _regenerator2.default.wrap(function _callee4$(_context4) {
|
|
1161
1161
|
while (1) {
|
|
@@ -1171,96 +1171,116 @@ var SettlementStore = (_class = function () {
|
|
|
1171
1171
|
return _context4.abrupt('return', _promise2.default.resolve(true));
|
|
1172
1172
|
|
|
1173
1173
|
case 3:
|
|
1174
|
-
|
|
1174
|
+
status = this.type;
|
|
1175
|
+
_context4.prev = 4;
|
|
1176
|
+
paylist = this.paymode.thePaymodes.filter(function (v) {
|
|
1177
|
+
return !!v.thridPayment && v.value > 0;
|
|
1178
|
+
}) || [];
|
|
1179
|
+
|
|
1180
|
+
if (!(paylist && paylist.length > 1)) {
|
|
1181
|
+
_context4.next = 9;
|
|
1182
|
+
break;
|
|
1183
|
+
}
|
|
1175
1184
|
|
|
1176
|
-
|
|
1177
|
-
|
|
1185
|
+
_message2.default.warn('二开支付目前仅支持单一结算方式。');
|
|
1186
|
+
return _context4.abrupt('return', _promise2.default.resolve(false));
|
|
1187
|
+
|
|
1188
|
+
case 9:
|
|
1189
|
+
if (!(status == 1)) {
|
|
1190
|
+
_context4.next = 30;
|
|
1178
1191
|
break;
|
|
1179
1192
|
}
|
|
1180
1193
|
|
|
1181
|
-
_context4.next =
|
|
1194
|
+
_context4.next = 12;
|
|
1182
1195
|
return this.findStorageBillValidate();
|
|
1183
1196
|
|
|
1184
|
-
case
|
|
1197
|
+
case 12:
|
|
1185
1198
|
ret = _context4.sent;
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
code =
|
|
1199
|
+
_ref10 = ret || {}, _ref10$data = _ref10.data;
|
|
1200
|
+
_ref10$data = _ref10$data === undefined ? {} : _ref10$data;
|
|
1201
|
+
code = _ref10$data.code, returnMsg = _ref10$data.returnMsg;
|
|
1189
1202
|
|
|
1190
1203
|
if (!(code && code == 10001)) {
|
|
1191
|
-
_context4.next =
|
|
1204
|
+
_context4.next = 24;
|
|
1192
1205
|
break;
|
|
1193
1206
|
}
|
|
1194
1207
|
|
|
1195
|
-
_context4.next =
|
|
1208
|
+
_context4.next = 19;
|
|
1196
1209
|
return this.repeatStorageModal(returnMsg);
|
|
1197
1210
|
|
|
1198
|
-
case
|
|
1211
|
+
case 19:
|
|
1199
1212
|
state = _context4.sent;
|
|
1200
1213
|
|
|
1201
1214
|
if (!(state === false)) {
|
|
1202
|
-
_context4.next =
|
|
1215
|
+
_context4.next = 22;
|
|
1203
1216
|
break;
|
|
1204
1217
|
}
|
|
1205
1218
|
|
|
1206
1219
|
return _context4.abrupt('return', _promise2.default.resolve(false));
|
|
1207
1220
|
|
|
1208
|
-
case
|
|
1209
|
-
_context4.next =
|
|
1221
|
+
case 22:
|
|
1222
|
+
_context4.next = 28;
|
|
1210
1223
|
break;
|
|
1211
1224
|
|
|
1212
|
-
case
|
|
1213
|
-
_context4.next =
|
|
1225
|
+
case 24:
|
|
1226
|
+
_context4.next = 26;
|
|
1214
1227
|
return this.saveMember();
|
|
1215
1228
|
|
|
1216
|
-
case
|
|
1217
|
-
|
|
1229
|
+
case 26:
|
|
1230
|
+
ret1 = _context4.sent;
|
|
1231
|
+
|
|
1232
|
+
if (ret1 === false) {
|
|
1233
|
+
_promise2.default.resolve(false);
|
|
1234
|
+
}
|
|
1235
|
+
|
|
1236
|
+
case 28:
|
|
1237
|
+
_context4.next = 39;
|
|
1218
1238
|
break;
|
|
1219
1239
|
|
|
1220
|
-
case
|
|
1221
|
-
_context4.next =
|
|
1240
|
+
case 30:
|
|
1241
|
+
_context4.next = 32;
|
|
1222
1242
|
return _mutantsMicrofx.stores.offlineSys.generatorCode(this.dto);
|
|
1223
1243
|
|
|
1224
|
-
case
|
|
1225
|
-
_context4.next =
|
|
1244
|
+
case 32:
|
|
1245
|
+
_context4.next = 34;
|
|
1226
1246
|
return this.save();
|
|
1227
1247
|
|
|
1228
|
-
case
|
|
1229
|
-
|
|
1248
|
+
case 34:
|
|
1249
|
+
ret2 = _context4.sent;
|
|
1230
1250
|
|
|
1231
|
-
if (!(
|
|
1232
|
-
_context4.next =
|
|
1251
|
+
if (!(ret2 === false)) {
|
|
1252
|
+
_context4.next = 37;
|
|
1233
1253
|
break;
|
|
1234
1254
|
}
|
|
1235
1255
|
|
|
1236
1256
|
return _context4.abrupt('return', _promise2.default.resolve(false));
|
|
1237
1257
|
|
|
1238
|
-
case
|
|
1239
|
-
_context4.next =
|
|
1258
|
+
case 37:
|
|
1259
|
+
_context4.next = 39;
|
|
1240
1260
|
return _mutantsMicrofx.stores.offlineSys.retailSequenceUpload();
|
|
1241
1261
|
|
|
1242
|
-
case
|
|
1262
|
+
case 39:
|
|
1243
1263
|
return _context4.abrupt('return', _promise2.default.resolve(true));
|
|
1244
1264
|
|
|
1245
|
-
case
|
|
1246
|
-
_context4.prev =
|
|
1247
|
-
_context4.t0 = _context4['catch'](
|
|
1265
|
+
case 42:
|
|
1266
|
+
_context4.prev = 42;
|
|
1267
|
+
_context4.t0 = _context4['catch'](4);
|
|
1248
1268
|
|
|
1249
1269
|
console.error('settlementStore.commit失败,错误信息:' + _context4.t0);
|
|
1250
1270
|
//其他支付失败时,处理二开支付情况。
|
|
1251
|
-
this.thirdPayRefund();
|
|
1271
|
+
this.thirdPayRefund(status == 1 ? 2 : 1);
|
|
1252
1272
|
return _context4.abrupt('return', _promise2.default.resolve(_context4.t0));
|
|
1253
1273
|
|
|
1254
|
-
case
|
|
1274
|
+
case 47:
|
|
1255
1275
|
case 'end':
|
|
1256
1276
|
return _context4.stop();
|
|
1257
1277
|
}
|
|
1258
1278
|
}
|
|
1259
|
-
}, _callee4, this, [[
|
|
1279
|
+
}, _callee4, this, [[4, 42]]);
|
|
1260
1280
|
}));
|
|
1261
1281
|
|
|
1262
1282
|
function commit(_x3) {
|
|
1263
|
-
return
|
|
1283
|
+
return _ref9.apply(this, arguments);
|
|
1264
1284
|
}
|
|
1265
1285
|
|
|
1266
1286
|
return commit;
|
|
@@ -1273,59 +1293,118 @@ var SettlementStore = (_class = function () {
|
|
|
1273
1293
|
}
|
|
1274
1294
|
}, {
|
|
1275
1295
|
key: 'saveMember',
|
|
1276
|
-
value: function
|
|
1277
|
-
var
|
|
1296
|
+
value: function () {
|
|
1297
|
+
var _ref11 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee5() {
|
|
1298
|
+
var _this11 = this;
|
|
1278
1299
|
|
|
1279
|
-
|
|
1280
|
-
PayStyle = _enumController$getEn15.PayStyle;
|
|
1300
|
+
var _enumController$getEn15, PayStyle, TradeType, IPMSG, dtoParams, payList, payment, tradeType, ret, _ref12, type, data, msg, code;
|
|
1281
1301
|
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
(0, _each3.default)(thePaymodes, function (mode) {
|
|
1288
|
-
var themode = (0, _find3.default)(_this11.paymode.paymodes, { 'paymentType': mode.paymentType });
|
|
1302
|
+
return _regenerator2.default.wrap(function _callee5$(_context5) {
|
|
1303
|
+
while (1) {
|
|
1304
|
+
switch (_context5.prev = _context5.next) {
|
|
1305
|
+
case 0:
|
|
1306
|
+
_enumController$getEn15 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn15.PayStyle, TradeType = _enumController$getEn15.TradeType;
|
|
1289
1307
|
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1308
|
+
(0, _mobx.runInAction)(function () {
|
|
1309
|
+
_this11.dto.StorageMutiSettleDetails = [];
|
|
1310
|
+
var thePaymodes = _this11.newStyle ? (0, _filter3.default)(_this11.paymode.thePaymodes, function (mode) {
|
|
1311
|
+
return parseFloat(mode.value) != 0;
|
|
1312
|
+
}) : _this11.paymode.thePaymodes;
|
|
1313
|
+
(0, _each3.default)(thePaymodes, function (mode) {
|
|
1314
|
+
var themode = (0, _find3.default)(_this11.paymode.paymodes, { 'paymentType': mode.paymentType });
|
|
1315
|
+
|
|
1316
|
+
var value = parseFloat(mode.value);
|
|
1317
|
+
var giveChange = null;
|
|
1318
|
+
if (mode.paymentType == PayStyle.xianjin && _this11.paymode.receivable < 0 && value > Math.abs(_this11.paymode.receivable)) {
|
|
1319
|
+
value = Math.Add(value, _this11.paymode.receivable);
|
|
1320
|
+
giveChange = Math.abs(_this11.paymode.receivable);
|
|
1321
|
+
}
|
|
1322
|
+
_this11.dto.StorageMutiSettleDetails.push({
|
|
1323
|
+
Code: mode.paymethodId,
|
|
1324
|
+
StorageAmount: value,
|
|
1325
|
+
GiveChange: giveChange,
|
|
1326
|
+
IdsettleStyle: themode.idSettleStyle,
|
|
1327
|
+
IdbankAccount: themode.idBankAccount,
|
|
1328
|
+
PaymentCode: mode.authCode,
|
|
1329
|
+
DynamicPropertyKeys: [],
|
|
1330
|
+
DynamicPropertyValues: [],
|
|
1331
|
+
DataSource: { Id: _this11.dataSource },
|
|
1332
|
+
ThirdPaymentInfo: themode.thridPayment || null
|
|
1333
|
+
});
|
|
1334
|
+
});
|
|
1335
|
+
});
|
|
1336
|
+
// cc结算调用
|
|
1337
|
+
IPMSG = {};
|
|
1338
|
+
|
|
1339
|
+
if (!!window.localStorage.IPMSG) {
|
|
1340
|
+
IPMSG = JSON.parse(window.localStorage.IPMSG);
|
|
1341
|
+
}
|
|
1342
|
+
dtoParams = this.dto;
|
|
1343
|
+
//处理存在二开支付情况
|
|
1344
|
+
|
|
1345
|
+
payList = dtoParams.StorageMutiSettleDetails.filter(function (v) {
|
|
1346
|
+
return v.ThirdPaymentInfo;
|
|
1347
|
+
});
|
|
1348
|
+
|
|
1349
|
+
if (!(payList && payList.length > 0)) {
|
|
1350
|
+
_context5.next = 19;
|
|
1351
|
+
break;
|
|
1352
|
+
}
|
|
1353
|
+
|
|
1354
|
+
payment = payList[0];
|
|
1355
|
+
tradeType = payment && payment.StorageAmount > 0 ? TradeType.PAY : TradeType.REFUND;
|
|
1356
|
+
_context5.next = 11;
|
|
1357
|
+
return this.thirdPay(2, payment, tradeType, dtoParams);
|
|
1358
|
+
|
|
1359
|
+
case 11:
|
|
1360
|
+
ret = _context5.sent;
|
|
1361
|
+
_ref12 = ret || {}, type = _ref12.type, data = _ref12.data, msg = _ref12.msg, code = _ref12.code;
|
|
1362
|
+
|
|
1363
|
+
if (!(type === true)) {
|
|
1364
|
+
_context5.next = 17;
|
|
1365
|
+
break;
|
|
1366
|
+
}
|
|
1367
|
+
|
|
1368
|
+
dtoParams = data;
|
|
1369
|
+
_context5.next = 19;
|
|
1370
|
+
break;
|
|
1371
|
+
|
|
1372
|
+
case 17:
|
|
1373
|
+
_message2.default.warn('\u5237\u5361\u652F\u4ED8\u5931\u8D25,\u9519\u8BEF\u7801:' + code);
|
|
1374
|
+
return _context5.abrupt('return', false);
|
|
1375
|
+
|
|
1376
|
+
case 19:
|
|
1377
|
+
this.dtoParams = dtoParams;
|
|
1378
|
+
console.log('储值结算信息:', dtoParams);
|
|
1379
|
+
return _context5.abrupt('return', (0, _tplusApi.tApi)({ dto: dtoParams }, 'chanjet.ME.INewRetailMemberStorage.Save', false, false).then(function (resp) {
|
|
1380
|
+
_this11.handlePrint(resp);
|
|
1381
|
+
}));
|
|
1382
|
+
|
|
1383
|
+
case 22:
|
|
1384
|
+
case 'end':
|
|
1385
|
+
return _context5.stop();
|
|
1386
|
+
}
|
|
1295
1387
|
}
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
IdbankAccount: themode.idBankAccount,
|
|
1302
|
-
PaymentCode: mode.authCode,
|
|
1303
|
-
DynamicPropertyKeys: [],
|
|
1304
|
-
DynamicPropertyValues: [],
|
|
1305
|
-
DataSource: { Id: _this11.dataSource }
|
|
1306
|
-
});
|
|
1307
|
-
});
|
|
1308
|
-
});
|
|
1309
|
-
// cc结算调用
|
|
1310
|
-
var IPMSG = {};
|
|
1311
|
-
if (!!window.localStorage.IPMSG) {
|
|
1312
|
-
IPMSG = JSON.parse(window.localStorage.IPMSG);
|
|
1388
|
+
}, _callee5, this);
|
|
1389
|
+
}));
|
|
1390
|
+
|
|
1391
|
+
function saveMember() {
|
|
1392
|
+
return _ref11.apply(this, arguments);
|
|
1313
1393
|
}
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
}
|
|
1394
|
+
|
|
1395
|
+
return saveMember;
|
|
1396
|
+
}()
|
|
1318
1397
|
}, {
|
|
1319
1398
|
key: 'save',
|
|
1320
1399
|
value: function () {
|
|
1321
|
-
var
|
|
1400
|
+
var _ref13 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee6() {
|
|
1322
1401
|
var _this12 = this;
|
|
1323
1402
|
|
|
1324
|
-
var _enumController$getEn16, PayStyle, TradeType, IPMSG, RetailTypeEnum, dtoParams, payList,
|
|
1403
|
+
var _enumController$getEn16, PayStyle, TradeType, IPMSG, RetailTypeEnum, dtoParams, payList, payment, tradeType, ret, _ref14, type, data, msg, code;
|
|
1325
1404
|
|
|
1326
|
-
return _regenerator2.default.wrap(function
|
|
1405
|
+
return _regenerator2.default.wrap(function _callee6$(_context6) {
|
|
1327
1406
|
while (1) {
|
|
1328
|
-
switch (
|
|
1407
|
+
switch (_context6.prev = _context6.next) {
|
|
1329
1408
|
case 0:
|
|
1330
1409
|
_enumController$getEn16 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn16.PayStyle, TradeType = _enumController$getEn16.TradeType;
|
|
1331
1410
|
|
|
@@ -1420,32 +1499,32 @@ var SettlementStore = (_class = function () {
|
|
|
1420
1499
|
IPMSG = JSON.parse(window.localStorage.IPMSG);
|
|
1421
1500
|
}
|
|
1422
1501
|
RetailTypeEnum = this.dto.IdbusiType == 36 ? "INTEGRAL_EXCHANGE" : "NORMAL";
|
|
1423
|
-
|
|
1502
|
+
_context6.t1 = this.dto.IdbusiType == 37;
|
|
1424
1503
|
|
|
1425
|
-
if (!
|
|
1426
|
-
|
|
1504
|
+
if (!_context6.t1) {
|
|
1505
|
+
_context6.next = 11;
|
|
1427
1506
|
break;
|
|
1428
1507
|
}
|
|
1429
1508
|
|
|
1430
|
-
|
|
1509
|
+
_context6.next = 10;
|
|
1431
1510
|
return this.checkIntegralExchangeReturn(this.dto.RetailDetails[0].ReturnSourceId);
|
|
1432
1511
|
|
|
1433
1512
|
case 10:
|
|
1434
|
-
|
|
1513
|
+
_context6.t1 = _context6.sent;
|
|
1435
1514
|
|
|
1436
1515
|
case 11:
|
|
1437
|
-
|
|
1516
|
+
_context6.t0 = _context6.t1;
|
|
1438
1517
|
|
|
1439
|
-
if (
|
|
1440
|
-
|
|
1518
|
+
if (_context6.t0) {
|
|
1519
|
+
_context6.next = 14;
|
|
1441
1520
|
break;
|
|
1442
1521
|
}
|
|
1443
1522
|
|
|
1444
|
-
|
|
1523
|
+
_context6.t0 = this.dto.IdbusiType != 37;
|
|
1445
1524
|
|
|
1446
1525
|
case 14:
|
|
1447
|
-
if (!
|
|
1448
|
-
|
|
1526
|
+
if (!_context6.t0) {
|
|
1527
|
+
_context6.next = 33;
|
|
1449
1528
|
break;
|
|
1450
1529
|
}
|
|
1451
1530
|
|
|
@@ -1457,38 +1536,38 @@ var SettlementStore = (_class = function () {
|
|
|
1457
1536
|
});
|
|
1458
1537
|
|
|
1459
1538
|
if (!(payList && payList.length > 0)) {
|
|
1460
|
-
|
|
1539
|
+
_context6.next = 30;
|
|
1461
1540
|
break;
|
|
1462
1541
|
}
|
|
1463
1542
|
|
|
1464
|
-
|
|
1465
|
-
tradeType =
|
|
1466
|
-
|
|
1467
|
-
return this.thirdPay(tradeType, dtoParams);
|
|
1543
|
+
payment = payList[0];
|
|
1544
|
+
tradeType = payment && payment.Amount > 0 ? TradeType.PAY : TradeType.REFUND;
|
|
1545
|
+
_context6.next = 22;
|
|
1546
|
+
return this.thirdPay(1, payment, tradeType, dtoParams);
|
|
1468
1547
|
|
|
1469
1548
|
case 22:
|
|
1470
|
-
ret =
|
|
1471
|
-
|
|
1549
|
+
ret = _context6.sent;
|
|
1550
|
+
_ref14 = ret || {}, type = _ref14.type, data = _ref14.data, msg = _ref14.msg, code = _ref14.code;
|
|
1472
1551
|
|
|
1473
1552
|
if (!(type === true)) {
|
|
1474
|
-
|
|
1553
|
+
_context6.next = 28;
|
|
1475
1554
|
break;
|
|
1476
1555
|
}
|
|
1477
1556
|
|
|
1478
1557
|
dtoParams = data;
|
|
1479
|
-
|
|
1558
|
+
_context6.next = 30;
|
|
1480
1559
|
break;
|
|
1481
1560
|
|
|
1482
1561
|
case 28:
|
|
1483
1562
|
_message2.default.warn('\u5237\u5361\u652F\u4ED8\u5931\u8D25,\u9519\u8BEF\u7801:' + code);
|
|
1484
|
-
return
|
|
1563
|
+
return _context6.abrupt('return', false);
|
|
1485
1564
|
|
|
1486
1565
|
case 30:
|
|
1487
1566
|
this.dtoParams = dtoParams;
|
|
1488
1567
|
console.log('结算信息:', dtoParams);
|
|
1489
|
-
return
|
|
1490
|
-
var
|
|
1491
|
-
ID =
|
|
1568
|
+
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) {
|
|
1569
|
+
var _ref15 = resp || {},
|
|
1570
|
+
ID = _ref15.ID;
|
|
1492
1571
|
|
|
1493
1572
|
_this12.setDtoID(ID);
|
|
1494
1573
|
_this12.billID = ID;
|
|
@@ -1497,14 +1576,14 @@ var SettlementStore = (_class = function () {
|
|
|
1497
1576
|
|
|
1498
1577
|
case 33:
|
|
1499
1578
|
case 'end':
|
|
1500
|
-
return
|
|
1579
|
+
return _context6.stop();
|
|
1501
1580
|
}
|
|
1502
1581
|
}
|
|
1503
|
-
},
|
|
1582
|
+
}, _callee6, this);
|
|
1504
1583
|
}));
|
|
1505
1584
|
|
|
1506
1585
|
function save() {
|
|
1507
|
-
return
|
|
1586
|
+
return _ref13.apply(this, arguments);
|
|
1508
1587
|
}
|
|
1509
1588
|
|
|
1510
1589
|
return save;
|
|
@@ -1521,76 +1600,100 @@ var SettlementStore = (_class = function () {
|
|
|
1521
1600
|
return data;
|
|
1522
1601
|
}
|
|
1523
1602
|
|
|
1524
|
-
|
|
1603
|
+
/**
|
|
1604
|
+
* 二开支付
|
|
1605
|
+
* vType:1零售单、2储值单
|
|
1606
|
+
* payment:结算方式
|
|
1607
|
+
* trade:00表示结算、02表示退款
|
|
1608
|
+
* dto:结算数据集合
|
|
1609
|
+
*/
|
|
1525
1610
|
|
|
1526
1611
|
}, {
|
|
1527
1612
|
key: 'thirdPay',
|
|
1528
1613
|
value: function () {
|
|
1529
|
-
var
|
|
1530
|
-
var cto, params, ret,
|
|
1614
|
+
var _ref16 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee7(vType, payment, trade, dto) {
|
|
1615
|
+
var cto, params, ret, _ref17, Code, _Message, Result, _ref18, ThirdPaymentReturnInfo;
|
|
1531
1616
|
|
|
1532
|
-
return _regenerator2.default.wrap(function
|
|
1617
|
+
return _regenerator2.default.wrap(function _callee7$(_context7) {
|
|
1533
1618
|
while (1) {
|
|
1534
|
-
switch (
|
|
1619
|
+
switch (_context7.prev = _context7.next) {
|
|
1535
1620
|
case 0:
|
|
1621
|
+
_context7.prev = 0;
|
|
1536
1622
|
cto = this.removeThirdPayDto(dto);
|
|
1537
|
-
params = { TradeType:
|
|
1623
|
+
params = { VoucherType: vType, Payment: payment, TradeType: trade, dto: cto };
|
|
1538
1624
|
|
|
1539
1625
|
console.log('刷卡信息:', (0, _stringify2.default)(params));
|
|
1540
|
-
|
|
1626
|
+
_context7.next = 6;
|
|
1541
1627
|
return new _promise2.default(function (resolve, reject) {
|
|
1542
1628
|
_mutantsMicrofx.nativeMs.setIpcRendererMethod('ThirdPayment', (0, _extends3.default)({}, params), function (res) {
|
|
1543
1629
|
return resolve(res);
|
|
1544
1630
|
});
|
|
1545
1631
|
});
|
|
1546
1632
|
|
|
1547
|
-
case
|
|
1548
|
-
ret =
|
|
1633
|
+
case 6:
|
|
1634
|
+
ret = _context7.sent;
|
|
1549
1635
|
|
|
1550
1636
|
console.log('刷卡返回信息:', ret);
|
|
1551
1637
|
ret = JSON.parse(ret);
|
|
1552
|
-
|
|
1638
|
+
_ref17 = ret || {}, Code = _ref17.Code, _Message = _ref17.Message, Result = _ref17.Result;
|
|
1553
1639
|
|
|
1554
1640
|
if (!(Code > 0)) {
|
|
1555
|
-
|
|
1641
|
+
_context7.next = 14;
|
|
1556
1642
|
break;
|
|
1557
1643
|
}
|
|
1558
1644
|
|
|
1559
|
-
return
|
|
1645
|
+
return _context7.abrupt('return', { type: false, data: null, msg: _Message, code: Code });
|
|
1560
1646
|
|
|
1561
|
-
case
|
|
1647
|
+
case 14:
|
|
1562
1648
|
if (!(status == '00')) {
|
|
1563
|
-
|
|
1649
|
+
_context7.next = 20;
|
|
1564
1650
|
break;
|
|
1565
1651
|
}
|
|
1566
1652
|
|
|
1567
|
-
|
|
1653
|
+
_ref18 = Result || {}, ThirdPaymentReturnInfo = _ref18.ThirdPaymentReturnInfo;
|
|
1568
1654
|
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
v.
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1655
|
+
if (vType == 1) {
|
|
1656
|
+
dto.RetailPaymentDetails.forEach(function (v) {
|
|
1657
|
+
if (v.ThirdPaymentInfo != null) {
|
|
1658
|
+
v.ThirdPaymentReturnInfo = ThirdPaymentReturnInfo;
|
|
1659
|
+
}
|
|
1660
|
+
});
|
|
1661
|
+
} else if (vType == 2) {
|
|
1662
|
+
dto.StorageMutiSettleDetails.forEach(function (v) {
|
|
1663
|
+
if (v.ThirdPaymentInfo != null) {
|
|
1664
|
+
v.ThirdPaymentReturnInfo = ThirdPaymentReturnInfo;
|
|
1665
|
+
}
|
|
1666
|
+
});
|
|
1667
|
+
}
|
|
1668
|
+
return _context7.abrupt('return', { type: true, data: dto, msg: _Message, code: Code });
|
|
1575
1669
|
|
|
1576
|
-
case
|
|
1670
|
+
case 20:
|
|
1577
1671
|
if (!(status == '02')) {
|
|
1578
|
-
|
|
1672
|
+
_context7.next = 22;
|
|
1579
1673
|
break;
|
|
1580
1674
|
}
|
|
1581
1675
|
|
|
1582
|
-
return
|
|
1676
|
+
return _context7.abrupt('return', { type: true, data: dto, msg: _Message, code: Code });
|
|
1677
|
+
|
|
1678
|
+
case 22:
|
|
1679
|
+
_context7.next = 27;
|
|
1680
|
+
break;
|
|
1681
|
+
|
|
1682
|
+
case 24:
|
|
1683
|
+
_context7.prev = 24;
|
|
1684
|
+
_context7.t0 = _context7['catch'](0);
|
|
1685
|
+
return _context7.abrupt('return', { type: false, data: null, msg: _context7.t0 });
|
|
1583
1686
|
|
|
1584
|
-
case
|
|
1687
|
+
case 27:
|
|
1585
1688
|
case 'end':
|
|
1586
|
-
return
|
|
1689
|
+
return _context7.stop();
|
|
1587
1690
|
}
|
|
1588
1691
|
}
|
|
1589
|
-
},
|
|
1692
|
+
}, _callee7, this, [[0, 24]]);
|
|
1590
1693
|
}));
|
|
1591
1694
|
|
|
1592
|
-
function thirdPay(_x4, _x5) {
|
|
1593
|
-
return
|
|
1695
|
+
function thirdPay(_x4, _x5, _x6, _x7) {
|
|
1696
|
+
return _ref16.apply(this, arguments);
|
|
1594
1697
|
}
|
|
1595
1698
|
|
|
1596
1699
|
return thirdPay;
|
|
@@ -1601,17 +1704,17 @@ var SettlementStore = (_class = function () {
|
|
|
1601
1704
|
}, {
|
|
1602
1705
|
key: 'thirdPayRefund',
|
|
1603
1706
|
value: function () {
|
|
1604
|
-
var
|
|
1707
|
+
var _ref19 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee9(type) {
|
|
1605
1708
|
var _this13 = this;
|
|
1606
1709
|
|
|
1607
|
-
var dto, pay, _enumController$getEn17, TradeType;
|
|
1710
|
+
var dto, pay, payment, _enumController$getEn17, TradeType;
|
|
1608
1711
|
|
|
1609
|
-
return _regenerator2.default.wrap(function
|
|
1712
|
+
return _regenerator2.default.wrap(function _callee9$(_context9) {
|
|
1610
1713
|
while (1) {
|
|
1611
|
-
switch (
|
|
1714
|
+
switch (_context9.prev = _context9.next) {
|
|
1612
1715
|
case 0:
|
|
1613
|
-
dto = this.dtoParams;
|
|
1614
|
-
pay = dto && dto.
|
|
1716
|
+
dto = type == 1 ? this.dtoParams.RetailPaymentDetails : this.dtoParams.StorageMutiSettleDetails;
|
|
1717
|
+
pay = dto && dto.filter(function (v) {
|
|
1615
1718
|
return v.ThirdPaymentInfo;
|
|
1616
1719
|
});
|
|
1617
1720
|
|
|
@@ -1619,43 +1722,44 @@ var SettlementStore = (_class = function () {
|
|
|
1619
1722
|
setTimeout(function () {
|
|
1620
1723
|
_message2.default.warn("支付出现异常,将发起刷卡退款。", { duration: 4.5 });
|
|
1621
1724
|
}, 1000);
|
|
1725
|
+
payment = pay[0];
|
|
1622
1726
|
_enumController$getEn17 = _mutantsUtil.enumController.getEnumOj(), TradeType = _enumController$getEn17.TradeType;
|
|
1623
1727
|
|
|
1624
|
-
setTimeout((0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function
|
|
1625
|
-
var ret,
|
|
1728
|
+
setTimeout((0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee8() {
|
|
1729
|
+
var ret, _ref21, msg;
|
|
1626
1730
|
|
|
1627
|
-
return _regenerator2.default.wrap(function
|
|
1731
|
+
return _regenerator2.default.wrap(function _callee8$(_context8) {
|
|
1628
1732
|
while (1) {
|
|
1629
|
-
switch (
|
|
1733
|
+
switch (_context8.prev = _context8.next) {
|
|
1630
1734
|
case 0:
|
|
1631
|
-
|
|
1632
|
-
return _this13.thirdPay(TradeType.REFUND, dto);
|
|
1735
|
+
_context8.next = 2;
|
|
1736
|
+
return _this13.thirdPay(type, payment, TradeType.REFUND, dto);
|
|
1633
1737
|
|
|
1634
1738
|
case 2:
|
|
1635
|
-
ret =
|
|
1636
|
-
|
|
1739
|
+
ret = _context8.sent;
|
|
1740
|
+
_ref21 = ret || {}, msg = _ref21.msg;
|
|
1637
1741
|
|
|
1638
1742
|
console.log('\u5237\u5361\u652F\u4ED8\u9000\u6B3E:' + msg);
|
|
1639
1743
|
|
|
1640
1744
|
case 5:
|
|
1641
1745
|
case 'end':
|
|
1642
|
-
return
|
|
1746
|
+
return _context8.stop();
|
|
1643
1747
|
}
|
|
1644
1748
|
}
|
|
1645
|
-
},
|
|
1749
|
+
}, _callee8, _this13);
|
|
1646
1750
|
})), 4500);
|
|
1647
1751
|
}
|
|
1648
1752
|
|
|
1649
1753
|
case 3:
|
|
1650
1754
|
case 'end':
|
|
1651
|
-
return
|
|
1755
|
+
return _context9.stop();
|
|
1652
1756
|
}
|
|
1653
1757
|
}
|
|
1654
|
-
},
|
|
1758
|
+
}, _callee9, this);
|
|
1655
1759
|
}));
|
|
1656
1760
|
|
|
1657
|
-
function thirdPayRefund() {
|
|
1658
|
-
return
|
|
1761
|
+
function thirdPayRefund(_x8) {
|
|
1762
|
+
return _ref19.apply(this, arguments);
|
|
1659
1763
|
}
|
|
1660
1764
|
|
|
1661
1765
|
return thirdPayRefund;
|
|
@@ -1668,35 +1772,35 @@ var SettlementStore = (_class = function () {
|
|
|
1668
1772
|
}, {
|
|
1669
1773
|
key: 'querySettleResult',
|
|
1670
1774
|
value: function () {
|
|
1671
|
-
var
|
|
1672
|
-
return _regenerator2.default.wrap(function
|
|
1775
|
+
var _ref22 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee10() {
|
|
1776
|
+
return _regenerator2.default.wrap(function _callee10$(_context10) {
|
|
1673
1777
|
while (1) {
|
|
1674
|
-
switch (
|
|
1778
|
+
switch (_context10.prev = _context10.next) {
|
|
1675
1779
|
case 0:
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1780
|
+
_context10.prev = 0;
|
|
1781
|
+
_context10.t0 = _promise2.default;
|
|
1782
|
+
_context10.next = 4;
|
|
1679
1783
|
return (0, _tplusApi.tApi)({ RetailCode: this.dto.Code }, 'chanjet.RE.newRetail.QuerySettleResult', false, false, { timeout_skip: true });
|
|
1680
1784
|
|
|
1681
1785
|
case 4:
|
|
1682
|
-
|
|
1683
|
-
return
|
|
1786
|
+
_context10.t1 = _context10.sent;
|
|
1787
|
+
return _context10.abrupt('return', _context10.t0.resolve.call(_context10.t0, _context10.t1));
|
|
1684
1788
|
|
|
1685
1789
|
case 8:
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
return
|
|
1790
|
+
_context10.prev = 8;
|
|
1791
|
+
_context10.t2 = _context10['catch'](0);
|
|
1792
|
+
return _context10.abrupt('return', _promise2.default.resolve({ Flag: "1" }));
|
|
1689
1793
|
|
|
1690
1794
|
case 11:
|
|
1691
1795
|
case 'end':
|
|
1692
|
-
return
|
|
1796
|
+
return _context10.stop();
|
|
1693
1797
|
}
|
|
1694
1798
|
}
|
|
1695
|
-
},
|
|
1799
|
+
}, _callee10, this, [[0, 8]]);
|
|
1696
1800
|
}));
|
|
1697
1801
|
|
|
1698
1802
|
function querySettleResult() {
|
|
1699
|
-
return
|
|
1803
|
+
return _ref22.apply(this, arguments);
|
|
1700
1804
|
}
|
|
1701
1805
|
|
|
1702
1806
|
return querySettleResult;
|
|
@@ -1722,18 +1826,18 @@ var SettlementStore = (_class = function () {
|
|
|
1722
1826
|
}, {
|
|
1723
1827
|
key: 'validePwd',
|
|
1724
1828
|
value: function () {
|
|
1725
|
-
var
|
|
1726
|
-
var
|
|
1829
|
+
var _ref23 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee11(value) {
|
|
1830
|
+
var _ref24, isNewRetailBCPos, cook1, cook2, message, memberStorageId, _paymode$currentMode, cardTypeEnum, memberId, meStorageCardId, cardStatusEnum, result, count, _result;
|
|
1727
1831
|
|
|
1728
|
-
return _regenerator2.default.wrap(function
|
|
1832
|
+
return _regenerator2.default.wrap(function _callee11$(_context11) {
|
|
1729
1833
|
while (1) {
|
|
1730
|
-
switch (
|
|
1834
|
+
switch (_context11.prev = _context11.next) {
|
|
1731
1835
|
case 0:
|
|
1732
|
-
|
|
1733
|
-
|
|
1836
|
+
_ref24 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref24.isNewRetailBCPos;
|
|
1837
|
+
_context11.prev = 1;
|
|
1734
1838
|
|
|
1735
1839
|
if (!isNewRetailBCPos) {
|
|
1736
|
-
|
|
1840
|
+
_context11.next = 33;
|
|
1737
1841
|
break;
|
|
1738
1842
|
}
|
|
1739
1843
|
|
|
@@ -1743,60 +1847,60 @@ var SettlementStore = (_class = function () {
|
|
|
1743
1847
|
memberStorageId = this.paymode.currentMode.meStorageCardId;
|
|
1744
1848
|
|
|
1745
1849
|
if (!cook2) {
|
|
1746
|
-
|
|
1850
|
+
_context11.next = 12;
|
|
1747
1851
|
break;
|
|
1748
1852
|
}
|
|
1749
1853
|
|
|
1750
1854
|
if (!cook2.hasOwnProperty(memberStorageId + "")) {
|
|
1751
|
-
|
|
1855
|
+
_context11.next = 12;
|
|
1752
1856
|
break;
|
|
1753
1857
|
}
|
|
1754
1858
|
|
|
1755
1859
|
if (!(cook2[memberStorageId] > 3)) {
|
|
1756
|
-
|
|
1860
|
+
_context11.next = 12;
|
|
1757
1861
|
break;
|
|
1758
1862
|
}
|
|
1759
1863
|
|
|
1760
1864
|
message = '今日密码错误已达上限,不可使用储值消费,请明日再试,如忘记请重置密码或修改密码。';
|
|
1761
|
-
return
|
|
1865
|
+
return _context11.abrupt('return', _promise2.default.resolve(message));
|
|
1762
1866
|
|
|
1763
1867
|
case 12:
|
|
1764
1868
|
_paymode$currentMode = this.paymode.currentMode, cardTypeEnum = _paymode$currentMode.cardTypeEnum, memberId = _paymode$currentMode.memberId, meStorageCardId = _paymode$currentMode.meStorageCardId, cardStatusEnum = _paymode$currentMode.cardStatusEnum;
|
|
1765
1869
|
result = null;
|
|
1766
1870
|
|
|
1767
1871
|
if (!(cardTypeEnum === 'BALANCE_CARD')) {
|
|
1768
|
-
|
|
1872
|
+
_context11.next = 20;
|
|
1769
1873
|
break;
|
|
1770
1874
|
}
|
|
1771
1875
|
|
|
1772
|
-
|
|
1876
|
+
_context11.next = 17;
|
|
1773
1877
|
return (0, _tplusApi.ccApi)({ md5Password: _tplusApi.User.pwdEncrypt(value.pwd), cardType: cardTypeEnum }, '/member/MeMemberWallet/checkPaymentPassword/' + memberId, false, false);
|
|
1774
1878
|
|
|
1775
1879
|
case 17:
|
|
1776
|
-
result =
|
|
1777
|
-
|
|
1880
|
+
result = _context11.sent;
|
|
1881
|
+
_context11.next = 29;
|
|
1778
1882
|
break;
|
|
1779
1883
|
|
|
1780
1884
|
case 20:
|
|
1781
1885
|
if (!(cardStatusEnum === 'BINDING' && this.member && this.member.ID === memberId)) {
|
|
1782
|
-
|
|
1886
|
+
_context11.next = 26;
|
|
1783
1887
|
break;
|
|
1784
1888
|
}
|
|
1785
1889
|
|
|
1786
|
-
|
|
1890
|
+
_context11.next = 23;
|
|
1787
1891
|
return (0, _tplusApi.ccApi)({ md5Password: _tplusApi.User.pwdEncrypt(value.pwd), password: value.pwd, cardType: cardTypeEnum }, '/member/MeMemberWallet/checkPaymentPassword/' + meStorageCardId, false, false);
|
|
1788
1892
|
|
|
1789
1893
|
case 23:
|
|
1790
|
-
result =
|
|
1791
|
-
|
|
1894
|
+
result = _context11.sent;
|
|
1895
|
+
_context11.next = 29;
|
|
1792
1896
|
break;
|
|
1793
1897
|
|
|
1794
1898
|
case 26:
|
|
1795
|
-
|
|
1899
|
+
_context11.next = 28;
|
|
1796
1900
|
return (0, _tplusApi.ccApi)({ password: value.pwd, cardType: cardTypeEnum }, '/member/MeMemberWallet/checkPaymentPassword/' + meStorageCardId, false, false);
|
|
1797
1901
|
|
|
1798
1902
|
case 28:
|
|
1799
|
-
result =
|
|
1903
|
+
result = _context11.sent;
|
|
1800
1904
|
|
|
1801
1905
|
case 29:
|
|
1802
1906
|
if (!result.data) {
|
|
@@ -1815,38 +1919,38 @@ var SettlementStore = (_class = function () {
|
|
|
1815
1919
|
this.setCookie('errorPwd', '', -1);
|
|
1816
1920
|
this.setCookie('errorPwd', (0, _stringify2.default)(cook2));
|
|
1817
1921
|
}
|
|
1818
|
-
return
|
|
1922
|
+
return _context11.abrupt('return', _promise2.default.resolve(result.data ? "" : message));
|
|
1819
1923
|
|
|
1820
1924
|
case 33:
|
|
1821
|
-
|
|
1925
|
+
_context11.next = 35;
|
|
1822
1926
|
return (0, _tplusApi.tApi)({ "CheckoutParams": {
|
|
1823
1927
|
"Idmember": value.id,
|
|
1824
1928
|
"Password": value.pwd
|
|
1825
1929
|
} }, 'AA.DR.newRetailMember.CheckoutMemberPassword', false, false);
|
|
1826
1930
|
|
|
1827
1931
|
case 35:
|
|
1828
|
-
_result =
|
|
1829
|
-
return
|
|
1932
|
+
_result = _context11.sent;
|
|
1933
|
+
return _context11.abrupt('return', _promise2.default.resolve(_result.Success ? "" : _result.Message));
|
|
1830
1934
|
|
|
1831
1935
|
case 37:
|
|
1832
|
-
|
|
1936
|
+
_context11.next = 42;
|
|
1833
1937
|
break;
|
|
1834
1938
|
|
|
1835
1939
|
case 39:
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
return
|
|
1940
|
+
_context11.prev = 39;
|
|
1941
|
+
_context11.t0 = _context11['catch'](1);
|
|
1942
|
+
return _context11.abrupt('return', "failed");
|
|
1839
1943
|
|
|
1840
1944
|
case 42:
|
|
1841
1945
|
case 'end':
|
|
1842
|
-
return
|
|
1946
|
+
return _context11.stop();
|
|
1843
1947
|
}
|
|
1844
1948
|
}
|
|
1845
|
-
},
|
|
1949
|
+
}, _callee11, this, [[1, 39]]);
|
|
1846
1950
|
}));
|
|
1847
1951
|
|
|
1848
|
-
function validePwd(
|
|
1849
|
-
return
|
|
1952
|
+
function validePwd(_x9) {
|
|
1953
|
+
return _ref23.apply(this, arguments);
|
|
1850
1954
|
}
|
|
1851
1955
|
|
|
1852
1956
|
return validePwd;
|
|
@@ -1885,34 +1989,34 @@ var SettlementStore = (_class = function () {
|
|
|
1885
1989
|
var _this15 = this;
|
|
1886
1990
|
|
|
1887
1991
|
return function () {
|
|
1888
|
-
var
|
|
1992
|
+
var _ref25 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee12(_this) {
|
|
1889
1993
|
var _getLoginInfo, IdStore, StoreCode, resp;
|
|
1890
1994
|
|
|
1891
|
-
return _regenerator2.default.wrap(function
|
|
1995
|
+
return _regenerator2.default.wrap(function _callee12$(_context12) {
|
|
1892
1996
|
while (1) {
|
|
1893
|
-
switch (
|
|
1997
|
+
switch (_context12.prev = _context12.next) {
|
|
1894
1998
|
case 0:
|
|
1895
1999
|
_getLoginInfo = _this15.getLoginInfo(), IdStore = _getLoginInfo.IdStore, StoreCode = _getLoginInfo.StoreCode;
|
|
1896
|
-
|
|
2000
|
+
_context12.next = 3;
|
|
1897
2001
|
return (0, _tplusApi.tApi)({ Idmember: _this15.member.ID, IdStore: IdStore, StoreCode: StoreCode }, 'chanjet.AA.DR.INewRetailMember.GetUmemberDTO', false, false);
|
|
1898
2002
|
|
|
1899
2003
|
case 3:
|
|
1900
|
-
resp =
|
|
2004
|
+
resp = _context12.sent;
|
|
1901
2005
|
|
|
1902
2006
|
_this.member = resp;
|
|
1903
2007
|
_this.paymode.updateMemberStorageCardNo(resp.StorageCardNo, resp.WalletEnabled);
|
|
1904
|
-
return
|
|
2008
|
+
return _context12.abrupt('return', _promise2.default.resolve(resp));
|
|
1905
2009
|
|
|
1906
2010
|
case 7:
|
|
1907
2011
|
case 'end':
|
|
1908
|
-
return
|
|
2012
|
+
return _context12.stop();
|
|
1909
2013
|
}
|
|
1910
2014
|
}
|
|
1911
|
-
},
|
|
2015
|
+
}, _callee12, _this15);
|
|
1912
2016
|
}));
|
|
1913
2017
|
|
|
1914
|
-
return function (
|
|
1915
|
-
return
|
|
2018
|
+
return function (_x10) {
|
|
2019
|
+
return _ref25.apply(this, arguments);
|
|
1916
2020
|
};
|
|
1917
2021
|
}();
|
|
1918
2022
|
}
|
|
@@ -1922,62 +2026,62 @@ var SettlementStore = (_class = function () {
|
|
|
1922
2026
|
var _this16 = this;
|
|
1923
2027
|
|
|
1924
2028
|
return function () {
|
|
1925
|
-
var
|
|
2029
|
+
var _ref26 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee13(memberId) {
|
|
1926
2030
|
var result;
|
|
1927
|
-
return _regenerator2.default.wrap(function
|
|
2031
|
+
return _regenerator2.default.wrap(function _callee13$(_context13) {
|
|
1928
2032
|
while (1) {
|
|
1929
|
-
switch (
|
|
2033
|
+
switch (_context13.prev = _context13.next) {
|
|
1930
2034
|
case 0:
|
|
1931
|
-
|
|
2035
|
+
_context13.next = 2;
|
|
1932
2036
|
return (0, _tplusApi.ccApi)({}, '/marketingtool/MeStorageCard/getCardInfoByMemberId/' + memberId + '/' + true, false, false, { method: 'get' });
|
|
1933
2037
|
|
|
1934
2038
|
case 2:
|
|
1935
|
-
result =
|
|
2039
|
+
result = _context13.sent;
|
|
1936
2040
|
|
|
1937
2041
|
if (!(result && result.data.length)) {
|
|
1938
|
-
|
|
2042
|
+
_context13.next = 20;
|
|
1939
2043
|
break;
|
|
1940
2044
|
}
|
|
1941
2045
|
|
|
1942
2046
|
if (!(result.data.length === 1)) {
|
|
1943
|
-
|
|
2047
|
+
_context13.next = 9;
|
|
1944
2048
|
break;
|
|
1945
2049
|
}
|
|
1946
2050
|
|
|
1947
2051
|
_this16.paymode.updateCardInfo(result.data[0]);
|
|
1948
|
-
return
|
|
2052
|
+
return _context13.abrupt('return', result.data);
|
|
1949
2053
|
|
|
1950
2054
|
case 9:
|
|
1951
2055
|
if (!(result.data && result.data.length === 1)) {
|
|
1952
|
-
|
|
2056
|
+
_context13.next = 14;
|
|
1953
2057
|
break;
|
|
1954
2058
|
}
|
|
1955
2059
|
|
|
1956
2060
|
_this16.paymode.updateCardInfo(result.data[0]);
|
|
1957
|
-
return
|
|
2061
|
+
return _context13.abrupt('return', result.data);
|
|
1958
2062
|
|
|
1959
2063
|
case 14:
|
|
1960
2064
|
if (!(result.data && result.data.length > 1)) {
|
|
1961
|
-
|
|
2065
|
+
_context13.next = 18;
|
|
1962
2066
|
break;
|
|
1963
2067
|
}
|
|
1964
2068
|
|
|
1965
|
-
return
|
|
2069
|
+
return _context13.abrupt('return', result.data);
|
|
1966
2070
|
|
|
1967
2071
|
case 18:
|
|
1968
2072
|
_message2.default.warn('没有可用储值卡!');
|
|
1969
|
-
return
|
|
2073
|
+
return _context13.abrupt('return', false);
|
|
1970
2074
|
|
|
1971
2075
|
case 20:
|
|
1972
2076
|
case 'end':
|
|
1973
|
-
return
|
|
2077
|
+
return _context13.stop();
|
|
1974
2078
|
}
|
|
1975
2079
|
}
|
|
1976
|
-
},
|
|
2080
|
+
}, _callee13, _this16);
|
|
1977
2081
|
}));
|
|
1978
2082
|
|
|
1979
|
-
return function (
|
|
1980
|
-
return
|
|
2083
|
+
return function (_x11) {
|
|
2084
|
+
return _ref26.apply(this, arguments);
|
|
1981
2085
|
};
|
|
1982
2086
|
}();
|
|
1983
2087
|
}
|
|
@@ -1986,39 +2090,30 @@ var SettlementStore = (_class = function () {
|
|
|
1986
2090
|
initializer: function initializer() {
|
|
1987
2091
|
var _this17 = this;
|
|
1988
2092
|
|
|
1989
|
-
return (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function
|
|
2093
|
+
return (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee14() {
|
|
1990
2094
|
var address, result;
|
|
1991
|
-
return _regenerator2.default.wrap(function
|
|
2095
|
+
return _regenerator2.default.wrap(function _callee14$(_context14) {
|
|
1992
2096
|
while (1) {
|
|
1993
|
-
switch (
|
|
2097
|
+
switch (_context14.prev = _context14.next) {
|
|
1994
2098
|
case 0:
|
|
1995
2099
|
address = '/marketingtool/MeStorageCard/getCardInfoByCardNo/' + _this17.paymode.currentMode.storageCardNo;
|
|
1996
|
-
|
|
2100
|
+
_context14.next = 3;
|
|
1997
2101
|
return (0, _tplusApi.ccApi)({}, address, false, false, { method: 'get', timeout_skip: true });
|
|
1998
2102
|
|
|
1999
2103
|
case 3:
|
|
2000
|
-
result =
|
|
2104
|
+
result = _context14.sent;
|
|
2001
2105
|
|
|
2002
2106
|
_this17.paymode.updateCardInfo(result.data);
|
|
2003
2107
|
|
|
2004
2108
|
case 5:
|
|
2005
2109
|
case 'end':
|
|
2006
|
-
return
|
|
2110
|
+
return _context14.stop();
|
|
2007
2111
|
}
|
|
2008
2112
|
}
|
|
2009
|
-
},
|
|
2113
|
+
}, _callee14, _this17);
|
|
2010
2114
|
}));
|
|
2011
2115
|
}
|
|
2012
|
-
}), _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),
|
|
2013
|
-
enumerable: true,
|
|
2014
|
-
initializer: function initializer() {
|
|
2015
|
-
var _this18 = this;
|
|
2016
|
-
|
|
2017
|
-
return function () {
|
|
2018
|
-
_this18.dto.VoucherDate = new Date();
|
|
2019
|
-
};
|
|
2020
|
-
}
|
|
2021
|
-
}), _applyDecoratedDescriptor(_class.prototype, 'setDtoID', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'setDtoID'), _class.prototype)), _class);
|
|
2116
|
+
}), _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);
|
|
2022
2117
|
exports.default = SettlementStore;
|
|
2023
2118
|
var PayMode = exports.PayMode = (_class3 = function () {
|
|
2024
2119
|
//应收
|
|
@@ -2032,19 +2127,19 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
2032
2127
|
this.onlineamount = 0;
|
|
2033
2128
|
this.maxamount = 0;
|
|
2034
2129
|
|
|
2035
|
-
_initDefineProp(this, 'currentFocus',
|
|
2130
|
+
_initDefineProp(this, 'currentFocus', _descriptor5, this);
|
|
2036
2131
|
|
|
2037
|
-
_initDefineProp(this, 'received',
|
|
2132
|
+
_initDefineProp(this, 'received', _descriptor6, this);
|
|
2038
2133
|
|
|
2039
|
-
_initDefineProp(this, 'receivable',
|
|
2134
|
+
_initDefineProp(this, 'receivable', _descriptor7, this);
|
|
2040
2135
|
|
|
2041
|
-
_initDefineProp(this, 'paymodes',
|
|
2136
|
+
_initDefineProp(this, 'paymodes', _descriptor8, this);
|
|
2042
2137
|
|
|
2043
|
-
_initDefineProp(this, 'thePaymodes',
|
|
2138
|
+
_initDefineProp(this, 'thePaymodes', _descriptor9, this);
|
|
2044
2139
|
|
|
2045
|
-
_initDefineProp(this, 'storageCardNo',
|
|
2140
|
+
_initDefineProp(this, 'storageCardNo', _descriptor10, this);
|
|
2046
2141
|
|
|
2047
|
-
_initDefineProp(this, 'balance',
|
|
2142
|
+
_initDefineProp(this, 'balance', _descriptor11, this);
|
|
2048
2143
|
|
|
2049
2144
|
this.currentMode = null;
|
|
2050
2145
|
this.checkList = [];
|
|
@@ -2053,11 +2148,11 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
2053
2148
|
hotKey: "Ctrl+M"
|
|
2054
2149
|
};
|
|
2055
2150
|
|
|
2056
|
-
_initDefineProp(this, 'calcCheckList',
|
|
2151
|
+
_initDefineProp(this, 'calcCheckList', _descriptor12, this);
|
|
2057
2152
|
|
|
2058
|
-
_initDefineProp(this, 'setCouponNum',
|
|
2153
|
+
_initDefineProp(this, 'setCouponNum', _descriptor13, this);
|
|
2059
2154
|
|
|
2060
|
-
_initDefineProp(this, 'addDjqs',
|
|
2155
|
+
_initDefineProp(this, 'addDjqs', _descriptor14, this);
|
|
2061
2156
|
}
|
|
2062
2157
|
// @observable store = null;
|
|
2063
2158
|
|
|
@@ -2116,7 +2211,7 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
2116
2211
|
}, {
|
|
2117
2212
|
key: 'calcDjqCheckValue',
|
|
2118
2213
|
value: function calcDjqCheckValue(q1, dto, params) {
|
|
2119
|
-
var
|
|
2214
|
+
var _this18 = this;
|
|
2120
2215
|
|
|
2121
2216
|
var useLimitPerOrder = (0, _tplusPoslogin.PosInitData)('UseLimitPerOrder');
|
|
2122
2217
|
var qList = (0, _filter3.default)(this.currentMode.djqs, function (djq) {
|
|
@@ -2130,8 +2225,8 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
2130
2225
|
this.checkList = [];
|
|
2131
2226
|
}
|
|
2132
2227
|
|
|
2133
|
-
var
|
|
2134
|
-
isNewRetailBCPos =
|
|
2228
|
+
var _ref28 = _mutantsUtil.platform || {},
|
|
2229
|
+
isNewRetailBCPos = _ref28.isNewRetailBCPos;
|
|
2135
2230
|
|
|
2136
2231
|
var _enumController$getEn18 = _mutantsUtil.enumController.getEnumOj(),
|
|
2137
2232
|
PayStyle = _enumController$getEn18.PayStyle,
|
|
@@ -2163,7 +2258,7 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
2163
2258
|
if (!q1.checked) {
|
|
2164
2259
|
this.checkList.forEach(function (ele, i) {
|
|
2165
2260
|
if (ele.id === q1.id) {
|
|
2166
|
-
|
|
2261
|
+
_this18.checkList.splice(i, 1);
|
|
2167
2262
|
}
|
|
2168
2263
|
});
|
|
2169
2264
|
} else {
|
|
@@ -2235,24 +2330,24 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
2235
2330
|
if (result && result.length != 0) {
|
|
2236
2331
|
result.forEach(function (element, index) {
|
|
2237
2332
|
var djq1 = false;
|
|
2238
|
-
|
|
2333
|
+
_this18.currentMode.djqs.forEach(function (djq) {
|
|
2239
2334
|
if (element.id === djq.id) {
|
|
2240
2335
|
djq1 = true;
|
|
2241
2336
|
}
|
|
2242
2337
|
});
|
|
2243
2338
|
|
|
2244
|
-
var
|
|
2245
|
-
couponCode =
|
|
2246
|
-
name =
|
|
2247
|
-
tieredAmountResult =
|
|
2248
|
-
fromDate =
|
|
2249
|
-
dateMount =
|
|
2250
|
-
promoMethodEnum =
|
|
2251
|
-
discountPct =
|
|
2252
|
-
nominalAmount =
|
|
2253
|
-
promoId =
|
|
2254
|
-
id =
|
|
2255
|
-
doorsill =
|
|
2339
|
+
var _ref29 = element || {},
|
|
2340
|
+
couponCode = _ref29.couponCode,
|
|
2341
|
+
name = _ref29.name,
|
|
2342
|
+
tieredAmountResult = _ref29.tieredAmountResult,
|
|
2343
|
+
fromDate = _ref29.fromDate,
|
|
2344
|
+
dateMount = _ref29.dateMount,
|
|
2345
|
+
promoMethodEnum = _ref29.promoMethodEnum,
|
|
2346
|
+
discountPct = _ref29.discountPct,
|
|
2347
|
+
nominalAmount = _ref29.nominalAmount,
|
|
2348
|
+
promoId = _ref29.promoId,
|
|
2349
|
+
id = _ref29.id,
|
|
2350
|
+
doorsill = _ref29.doorsill;
|
|
2256
2351
|
|
|
2257
2352
|
var condValue = tieredAmountResult.condValue,
|
|
2258
2353
|
promoDiscount = tieredAmountResult.promoDiscount,
|
|
@@ -2280,10 +2375,10 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
2280
2375
|
// couponCategoryEnum: tieredAmountResult.couponCategoryEnum,
|
|
2281
2376
|
// id
|
|
2282
2377
|
// })
|
|
2283
|
-
|
|
2378
|
+
_this18.addDjqs(couponCode, name, true, nominalAmount, promoDiscount, doorsill, element.LastTS, false, true, dto.Idmember, dateMount, displayText, promoMethodEnum, discountPct, promoId, promoRuleId, tieredAmountResult.couponCategoryEnum, id);
|
|
2284
2379
|
djq1 = false;
|
|
2285
2380
|
} else {
|
|
2286
|
-
|
|
2381
|
+
_this18.setCouponNum(element.id, couponCategoryEnum, promoMethodEnum, nominalAmount, promoDiscount);
|
|
2287
2382
|
// this.currentMode.djqs[0].couponCategoryEnum = 'couponCategoryEnum';
|
|
2288
2383
|
// djq1.couponCategoryEnum = element.tieredAmountResult.couponCategoryEnum
|
|
2289
2384
|
}
|
|
@@ -2296,8 +2391,8 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
2296
2391
|
}, {
|
|
2297
2392
|
key: 'calcDjqValue',
|
|
2298
2393
|
value: function calcDjqValue(q1) {
|
|
2299
|
-
var
|
|
2300
|
-
isNewRetailBCPos =
|
|
2394
|
+
var _ref30 = _mutantsUtil.platform || {},
|
|
2395
|
+
isNewRetailBCPos = _ref30.isNewRetailBCPos;
|
|
2301
2396
|
|
|
2302
2397
|
var _enumController$getEn19 = _mutantsUtil.enumController.getEnumOj(),
|
|
2303
2398
|
Differentiate = _enumController$getEn19.Differentiate;
|
|
@@ -2387,24 +2482,28 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
2387
2482
|
}, {
|
|
2388
2483
|
key: 'setPaymodes',
|
|
2389
2484
|
value: function () {
|
|
2390
|
-
var
|
|
2391
|
-
var
|
|
2485
|
+
var _ref31 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee15(type, isIntegralExchange) {
|
|
2486
|
+
var _this19 = this;
|
|
2392
2487
|
|
|
2393
|
-
var _enumController$getEn21, settleStyleType, PayStyle, memberStoreCode, settlementCode, param, modes;
|
|
2488
|
+
var _ref32, isHorizontalPad, isHorizontalSunMi, _enumController$getEn21, settleStyleType, PayStyle, memberStoreCode, settlementCode, param, modes;
|
|
2394
2489
|
|
|
2395
|
-
return _regenerator2.default.wrap(function
|
|
2490
|
+
return _regenerator2.default.wrap(function _callee15$(_context15) {
|
|
2396
2491
|
while (1) {
|
|
2397
|
-
switch (
|
|
2492
|
+
switch (_context15.prev = _context15.next) {
|
|
2398
2493
|
case 0:
|
|
2494
|
+
_ref32 = _mutantsUtil.platform || {}, isHorizontalPad = _ref32.isHorizontalPad, isHorizontalSunMi = _ref32.isHorizontalSunMi;
|
|
2399
2495
|
_enumController$getEn21 = _mutantsUtil.enumController.getEnumOj(), settleStyleType = _enumController$getEn21.settleStyleType, PayStyle = _enumController$getEn21.PayStyle;
|
|
2400
2496
|
memberStoreCode = settleStyleType.memberStoreCode, settlementCode = settleStyleType.settlementCode;
|
|
2401
2497
|
param = { 'settleStyleType': type == 1 ? memberStoreCode : settlementCode, isIntegralExchange: isIntegralExchange };
|
|
2402
|
-
|
|
2498
|
+
_context15.next = 6;
|
|
2403
2499
|
return (0, _tplusApi.tApi)({ param: param }, 'chanjet.RE.NewPos.GetNewStoreSettleStyles', false, false);
|
|
2404
2500
|
|
|
2405
|
-
case
|
|
2406
|
-
modes =
|
|
2501
|
+
case 6:
|
|
2502
|
+
modes = _context15.sent;
|
|
2407
2503
|
|
|
2504
|
+
modes = !(!!isHorizontalPad || !!isHorizontalSunMi) ? modes : modes.filter(function (v) {
|
|
2505
|
+
return !!v.ThirdPaymentInfo;
|
|
2506
|
+
});
|
|
2408
2507
|
if (modes) {
|
|
2409
2508
|
(0, _mobx.runInAction)(function () {
|
|
2410
2509
|
var paymodes = [];
|
|
@@ -2428,20 +2527,20 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
2428
2527
|
thridPayment: mode.ThirdPaymentInfo
|
|
2429
2528
|
});
|
|
2430
2529
|
});
|
|
2431
|
-
|
|
2530
|
+
_this19.paymodes = paymodes;
|
|
2432
2531
|
});
|
|
2433
2532
|
}
|
|
2434
2533
|
|
|
2435
|
-
case
|
|
2534
|
+
case 9:
|
|
2436
2535
|
case 'end':
|
|
2437
|
-
return
|
|
2536
|
+
return _context15.stop();
|
|
2438
2537
|
}
|
|
2439
2538
|
}
|
|
2440
|
-
},
|
|
2539
|
+
}, _callee15, this);
|
|
2441
2540
|
}));
|
|
2442
2541
|
|
|
2443
|
-
function setPaymodes(
|
|
2444
|
-
return
|
|
2542
|
+
function setPaymodes(_x12, _x13) {
|
|
2543
|
+
return _ref31.apply(this, arguments);
|
|
2445
2544
|
}
|
|
2446
2545
|
|
|
2447
2546
|
return setPaymodes;
|
|
@@ -2458,59 +2557,60 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
2458
2557
|
}
|
|
2459
2558
|
}]);
|
|
2460
2559
|
return PayMode;
|
|
2461
|
-
}(), (
|
|
2560
|
+
}(), (_descriptor5 = _applyDecoratedDescriptor(_class3.prototype, 'currentFocus', [_mobx.observable], {
|
|
2462
2561
|
enumerable: true,
|
|
2463
2562
|
initializer: function initializer() {
|
|
2464
2563
|
return "";
|
|
2465
2564
|
}
|
|
2466
|
-
}),
|
|
2565
|
+
}), _descriptor6 = _applyDecoratedDescriptor(_class3.prototype, 'received', [_mobx.observable], {
|
|
2467
2566
|
enumerable: true,
|
|
2468
2567
|
initializer: function initializer() {
|
|
2469
2568
|
return 0;
|
|
2470
2569
|
}
|
|
2471
|
-
}),
|
|
2570
|
+
}), _descriptor7 = _applyDecoratedDescriptor(_class3.prototype, 'receivable', [_mobx.observable], {
|
|
2472
2571
|
enumerable: true,
|
|
2473
2572
|
initializer: function initializer() {
|
|
2474
2573
|
return 0;
|
|
2475
2574
|
}
|
|
2476
|
-
}),
|
|
2575
|
+
}), _descriptor8 = _applyDecoratedDescriptor(_class3.prototype, 'paymodes', [_mobx.observable], {
|
|
2477
2576
|
enumerable: true,
|
|
2478
2577
|
initializer: function initializer() {
|
|
2479
2578
|
return [];
|
|
2480
2579
|
}
|
|
2481
|
-
}),
|
|
2580
|
+
}), _descriptor9 = _applyDecoratedDescriptor(_class3.prototype, 'thePaymodes', [_mobx.observable], {
|
|
2482
2581
|
enumerable: true,
|
|
2483
2582
|
initializer: function initializer() {
|
|
2484
2583
|
return [];
|
|
2485
2584
|
}
|
|
2486
|
-
}),
|
|
2585
|
+
}), _descriptor10 = _applyDecoratedDescriptor(_class3.prototype, 'storageCardNo', [_mobx.observable], {
|
|
2487
2586
|
enumerable: true,
|
|
2488
2587
|
initializer: function initializer() {
|
|
2489
2588
|
return null;
|
|
2490
2589
|
}
|
|
2491
|
-
}),
|
|
2590
|
+
}), _descriptor11 = _applyDecoratedDescriptor(_class3.prototype, 'balance', [_mobx.observable], {
|
|
2492
2591
|
enumerable: true,
|
|
2493
2592
|
initializer: function initializer() {
|
|
2494
2593
|
return null;
|
|
2495
2594
|
}
|
|
2496
|
-
}), _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),
|
|
2595
|
+
}), _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], {
|
|
2497
2596
|
enumerable: true,
|
|
2498
2597
|
initializer: function initializer() {
|
|
2499
|
-
var
|
|
2598
|
+
var _this20 = this;
|
|
2500
2599
|
|
|
2501
2600
|
return function () {
|
|
2502
|
-
|
|
2601
|
+
_this20.checkList = [];
|
|
2503
2602
|
};
|
|
2504
2603
|
}
|
|
2505
|
-
}), _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),
|
|
2604
|
+
}), _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], {
|
|
2506
2605
|
enumerable: true,
|
|
2507
2606
|
initializer: function initializer() {
|
|
2508
|
-
var
|
|
2607
|
+
var _this21 = this;
|
|
2509
2608
|
|
|
2510
2609
|
return function (id, couponNum, promoMethodEnum, nominalAmount, promoDiscount) {
|
|
2511
|
-
|
|
2610
|
+
_this21.currentMode.djqs.forEach(function (ele) {
|
|
2512
2611
|
if (ele.id === id) {
|
|
2513
|
-
|
|
2612
|
+
ele.amount = promoDiscount;
|
|
2613
|
+
promoMethodEnum == "CASH_COUPON" && (ele.nominalAmount = nominalAmount);
|
|
2514
2614
|
ele.couponCategoryEnum = couponNum;
|
|
2515
2615
|
var IsEnable = ele.couponCategoryEnum === 'RIGUP' || ele.couponCategoryEnum === 'UN_MATCH' || ele.couponCategoryEnum === "PREPARING" || ele.couponCategoryEnum === 'PROMO_LIMITED' || ele.couponCategoryEnum === 'COUPON_CONFLICT' ? false : true;
|
|
2516
2616
|
ele.IsEnable = IsEnable;
|
|
@@ -2518,16 +2618,17 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
2518
2618
|
});
|
|
2519
2619
|
};
|
|
2520
2620
|
}
|
|
2521
|
-
}),
|
|
2621
|
+
}), _descriptor14 = _applyDecoratedDescriptor(_class3.prototype, 'addDjqs', [_mobx.action], {
|
|
2522
2622
|
enumerable: true,
|
|
2523
2623
|
initializer: function initializer() {
|
|
2524
|
-
var
|
|
2624
|
+
var _this22 = this;
|
|
2525
2625
|
|
|
2526
|
-
return function (promoCouponCode, name, IsEnable, amount, doorsill, LastTS, checked, IsRepelWithPoints, UMemberID, expired, displayText, promoMethodEnum, discountPct, promoId, promoRuleId, couponCategoryEnum, id) {
|
|
2626
|
+
return function (promoCouponCode, name, IsEnable, nominalAmount, amount, doorsill, LastTS, checked, IsRepelWithPoints, UMemberID, expired, displayText, promoMethodEnum, discountPct, promoId, promoRuleId, couponCategoryEnum, id) {
|
|
2527
2627
|
var djq = {
|
|
2528
2628
|
promoCouponCode: promoCouponCode,
|
|
2529
2629
|
name: name,
|
|
2530
2630
|
IsEnable: IsEnable,
|
|
2631
|
+
nominalAmount: nominalAmount,
|
|
2531
2632
|
amount: amount,
|
|
2532
2633
|
doorsill: doorsill,
|
|
2533
2634
|
LastTS: LastTS,
|
|
@@ -2543,25 +2644,25 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
2543
2644
|
couponCategoryEnum: couponCategoryEnum,
|
|
2544
2645
|
id: id
|
|
2545
2646
|
};
|
|
2546
|
-
|
|
2647
|
+
_this22.currentMode.djqs.push(djq);
|
|
2547
2648
|
};
|
|
2548
2649
|
}
|
|
2549
2650
|
}), _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);
|
|
2550
2651
|
var Member = exports.Member = (_class5 = function () {
|
|
2551
2652
|
function Member(m) {
|
|
2552
|
-
var
|
|
2653
|
+
var _this23 = this;
|
|
2553
2654
|
|
|
2554
2655
|
(0, _classCallCheck3.default)(this, Member);
|
|
2555
2656
|
|
|
2556
|
-
_initDefineProp(this, 'cardNo',
|
|
2657
|
+
_initDefineProp(this, 'cardNo', _descriptor15, this);
|
|
2557
2658
|
|
|
2558
|
-
_initDefineProp(this, 'balance',
|
|
2659
|
+
_initDefineProp(this, 'balance', _descriptor16, this);
|
|
2559
2660
|
|
|
2560
|
-
_initDefineProp(this, 'exchangable',
|
|
2661
|
+
_initDefineProp(this, 'exchangable', _descriptor17, this);
|
|
2561
2662
|
|
|
2562
|
-
_initDefineProp(this, 'meStorageCardId',
|
|
2663
|
+
_initDefineProp(this, 'meStorageCardId', _descriptor18, this);
|
|
2563
2664
|
|
|
2564
|
-
_initDefineProp(this, 'storageCardNo',
|
|
2665
|
+
_initDefineProp(this, 'storageCardNo', _descriptor19, this);
|
|
2565
2666
|
|
|
2566
2667
|
if (m) {
|
|
2567
2668
|
this.id = m.ID;
|
|
@@ -2572,15 +2673,15 @@ var Member = exports.Member = (_class5 = function () {
|
|
|
2572
2673
|
return key == 'canusedbalancestorage';
|
|
2573
2674
|
});
|
|
2574
2675
|
|
|
2575
|
-
var
|
|
2576
|
-
isNewRetailBCPos =
|
|
2676
|
+
var _ref33 = _mutantsUtil.platform || {},
|
|
2677
|
+
isNewRetailBCPos = _ref33.isNewRetailBCPos;
|
|
2577
2678
|
|
|
2578
2679
|
(0, _mobx.runInAction)(function () {
|
|
2579
|
-
|
|
2680
|
+
_this23.cardNo = m.CardCode;
|
|
2580
2681
|
if (index >= 0) {
|
|
2581
|
-
|
|
2682
|
+
_this23.balance = parseFloat(m.DynamicPropertyValues[index]);
|
|
2582
2683
|
} else {
|
|
2583
|
-
|
|
2684
|
+
_this23.balance = _this23.rawbalance;
|
|
2584
2685
|
}
|
|
2585
2686
|
});
|
|
2586
2687
|
this.needPwd = m.MemberType ? m.MemberType.IsNeedPwd : false;
|
|
@@ -2602,19 +2703,19 @@ var Member = exports.Member = (_class5 = function () {
|
|
|
2602
2703
|
}
|
|
2603
2704
|
}]);
|
|
2604
2705
|
return Member;
|
|
2605
|
-
}(), (
|
|
2706
|
+
}(), (_descriptor15 = _applyDecoratedDescriptor(_class5.prototype, 'cardNo', [_mobx.observable], {
|
|
2606
2707
|
enumerable: true,
|
|
2607
2708
|
initializer: null
|
|
2608
|
-
}),
|
|
2709
|
+
}), _descriptor16 = _applyDecoratedDescriptor(_class5.prototype, 'balance', [_mobx.observable], {
|
|
2609
2710
|
enumerable: true,
|
|
2610
2711
|
initializer: null
|
|
2611
|
-
}),
|
|
2712
|
+
}), _descriptor17 = _applyDecoratedDescriptor(_class5.prototype, 'exchangable', [_mobx.observable], {
|
|
2612
2713
|
enumerable: true,
|
|
2613
2714
|
initializer: null
|
|
2614
|
-
}),
|
|
2715
|
+
}), _descriptor18 = _applyDecoratedDescriptor(_class5.prototype, 'meStorageCardId', [_mobx.observable], {
|
|
2615
2716
|
enumerable: true,
|
|
2616
2717
|
initializer: null
|
|
2617
|
-
}),
|
|
2718
|
+
}), _descriptor19 = _applyDecoratedDescriptor(_class5.prototype, 'storageCardNo', [_mobx.observable], {
|
|
2618
2719
|
enumerable: true,
|
|
2619
2720
|
initializer: null
|
|
2620
2721
|
}), _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);
|