tplus-components-touch 3.33.15 → 3.34.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/billSearch/index.js +9 -0
- package/dist/components/billSearch/index.js.map +1 -1
- package/dist/components/billSearch/index.less +8 -0
- package/dist/components/input/scanInput.less +1 -1
- package/dist/components/keyboard/index.less +29 -23
- package/dist/components/keyboard/numKeyboard.js +4 -0
- package/dist/components/keyboard/numKeyboard.js.map +1 -1
- package/dist/components/keyboard/numkeyboardPassword.js +2 -0
- package/dist/components/keyboard/numkeyboardPassword.js.map +1 -1
- package/dist/components/keyboard/onlyLetterButton2.less +1 -1
- package/dist/components/layout/sider.js +3 -1
- package/dist/components/layout/sider.js.map +1 -1
- package/dist/components/modalWraper/index.js +1 -1
- package/dist/components/modalWraper/index.js.map +1 -1
- package/dist/components/settlement/settlement.js +78 -553
- package/dist/components/settlement/settlement.js.map +1 -1
- package/dist/components/settlement/settlement.less +4 -24
- package/dist/components/settlement/settlementCopy.js +5731 -0
- package/dist/components/settlement/settlementCopy.js.map +1 -0
- package/dist/components/settlement/settlementStore.js +357 -734
- package/dist/components/settlement/settlementStore.js.map +1 -1
- package/dist/components/touchTable/index.less +1 -1
- package/package.json +2 -2
|
@@ -168,7 +168,6 @@ var SettlementStore = (_class = function () {
|
|
|
168
168
|
(0, _classCallCheck3.default)(this, SettlementStore);
|
|
169
169
|
this.paymode = null;
|
|
170
170
|
this.dto = null;
|
|
171
|
-
this.dtoParams = null;
|
|
172
171
|
this.member = null;
|
|
173
172
|
this.brefund = false;
|
|
174
173
|
this.bquick = false;
|
|
@@ -234,6 +233,8 @@ var SettlementStore = (_class = function () {
|
|
|
234
233
|
var promoVoucher = {};
|
|
235
234
|
_this2.paymode.clearDjqs();
|
|
236
235
|
_this2.paymode.reCalculationDjqs();
|
|
236
|
+
// promoVoucher.bizDate = dto.VoucherDate;
|
|
237
|
+
// promoVoucher.bizDate = new Date().getTime();
|
|
237
238
|
promoVoucher.coupon_code = coupon_code || "";
|
|
238
239
|
promoVoucher.boName = "Retail";
|
|
239
240
|
promoVoucher.voucherId = dto.ID;
|
|
@@ -320,7 +321,11 @@ var SettlementStore = (_class = function () {
|
|
|
320
321
|
_message2.default.error(Differentiate.COUPON + '\uFF08' + result.SN + '\uFF09\u4E0D\u53EF\u4E0E\u79EF\u5206\u4E00\u8D77\u4F7F\u7528');
|
|
321
322
|
} else {
|
|
322
323
|
var IsEnable = couponCategoryEnum === 'RIGUP' || couponCategoryEnum === 'UN_MATCH' || couponCategoryEnum === "PREPARING" || couponCategoryEnum === 'PROMO_LIMITED' || couponCategoryEnum === 'COUPON_CONFLICT' ? false : true;
|
|
323
|
-
|
|
324
|
+
|
|
325
|
+
var _ref2 = _mutantsUtil.platform || {},
|
|
326
|
+
isNewRetailBCPos = _ref2.isNewRetailBCPos;
|
|
327
|
+
|
|
328
|
+
_this2.addDjq(couponCode, name, IsEnable, promoMethodEnum == "CASH_COUPON" ? nominalAmount : promoDiscount, condValue, null, false, !result.IsRepelWithPoints, dto.Idmember, dateMount, displayText, promoMethodEnum, discountPct, promoId, promoRuleId, couponCategoryEnum, id, true, 1);
|
|
324
329
|
}
|
|
325
330
|
});
|
|
326
331
|
if (promoVoucher.coupon_code) {
|
|
@@ -343,14 +348,14 @@ var SettlementStore = (_class = function () {
|
|
|
343
348
|
};
|
|
344
349
|
|
|
345
350
|
this.checkCoupon = function () {
|
|
346
|
-
var
|
|
347
|
-
var
|
|
351
|
+
var _ref3 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee(sn) {
|
|
352
|
+
var _ref4, isNewRetailBCPos, _enumController$getEn3, PayStyle, Differentiate;
|
|
348
353
|
|
|
349
354
|
return _regenerator2.default.wrap(function _callee$(_context) {
|
|
350
355
|
while (1) {
|
|
351
356
|
switch (_context.prev = _context.next) {
|
|
352
357
|
case 0:
|
|
353
|
-
|
|
358
|
+
_ref4 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref4.isNewRetailBCPos;
|
|
354
359
|
|
|
355
360
|
if (!isNewRetailBCPos) {
|
|
356
361
|
_context.next = 7;
|
|
@@ -418,56 +423,10 @@ var SettlementStore = (_class = function () {
|
|
|
418
423
|
}));
|
|
419
424
|
|
|
420
425
|
return function (_x) {
|
|
421
|
-
return
|
|
426
|
+
return _ref3.apply(this, arguments);
|
|
422
427
|
};
|
|
423
428
|
}();
|
|
424
429
|
|
|
425
|
-
this.repeatStorageModal = function (content) {
|
|
426
|
-
return new _promise2.default(function (resolve, reject) {
|
|
427
|
-
_tplusComponentsTouch.ModalWraper.confirm({
|
|
428
|
-
title: '',
|
|
429
|
-
okText: '继续储值',
|
|
430
|
-
className: 'repeat-modal',
|
|
431
|
-
zIndex: 1007,
|
|
432
|
-
content: content,
|
|
433
|
-
onOk: function () {
|
|
434
|
-
var _ref4 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2() {
|
|
435
|
-
var ret;
|
|
436
|
-
return _regenerator2.default.wrap(function _callee2$(_context2) {
|
|
437
|
-
while (1) {
|
|
438
|
-
switch (_context2.prev = _context2.next) {
|
|
439
|
-
case 0:
|
|
440
|
-
_context2.next = 2;
|
|
441
|
-
return _this2.saveMember();
|
|
442
|
-
|
|
443
|
-
case 2:
|
|
444
|
-
ret = _context2.sent;
|
|
445
|
-
|
|
446
|
-
if (ret === false) {
|
|
447
|
-
resolve(false);
|
|
448
|
-
} else {
|
|
449
|
-
resolve(true);
|
|
450
|
-
}
|
|
451
|
-
|
|
452
|
-
case 4:
|
|
453
|
-
case 'end':
|
|
454
|
-
return _context2.stop();
|
|
455
|
-
}
|
|
456
|
-
}
|
|
457
|
-
}, _callee2, _this2);
|
|
458
|
-
}));
|
|
459
|
-
|
|
460
|
-
return function onOk() {
|
|
461
|
-
return _ref4.apply(this, arguments);
|
|
462
|
-
};
|
|
463
|
-
}(),
|
|
464
|
-
onCancel: function onCancel() {
|
|
465
|
-
resolve(false);
|
|
466
|
-
}
|
|
467
|
-
});
|
|
468
|
-
});
|
|
469
|
-
};
|
|
470
|
-
|
|
471
430
|
this.checkIntegralExchangeReturn = function (id) {
|
|
472
431
|
return new _promise2.default(function (resolve, reject) {
|
|
473
432
|
(0, _tplusApi.tApi)({ param: { refVoucherId: id } }, 'chanjet.RE.NewPos.GetNewIntegralExchange', false, false, { timeout_skip: true }).then(function (resp) {
|
|
@@ -603,8 +562,7 @@ var SettlementStore = (_class = function () {
|
|
|
603
562
|
authCode: detail.PaymentCode,
|
|
604
563
|
steadCashIntegral: detail.SteadCashIntegral,
|
|
605
564
|
overchargesAmount: detail.OverchargesAmount,
|
|
606
|
-
boriginReturn: true
|
|
607
|
-
thirdPaymentReturnInfo: detail.ThirdPaymentReturnInfo
|
|
565
|
+
boriginReturn: true
|
|
608
566
|
});
|
|
609
567
|
_this5.paymode.currentMode = newmode;
|
|
610
568
|
if (themode.paymentType == PayStyle.djq) {
|
|
@@ -619,10 +577,10 @@ var SettlementStore = (_class = function () {
|
|
|
619
577
|
promoId = _ref6.promoId,
|
|
620
578
|
id = _ref6.id;
|
|
621
579
|
|
|
622
|
-
_this5.addDjq(djq.CouponCode, djq.CouponTitle, true,
|
|
580
|
+
_this5.addDjq(djq.CouponCode, djq.CouponTitle, true, djq.ReductionAmount, djq.EnableAmount, djq.LastTS, true, false, _this5.dto.Idmember, dateMount, displayText, promoMethodEnum, discountPct, promoId, promoRuleId, null, id, true);
|
|
623
581
|
return;
|
|
624
582
|
}
|
|
625
|
-
_this5.addDjq(djq.CouponCode, djq.CouponTitle, true,
|
|
583
|
+
_this5.addDjq(djq.CouponCode, djq.CouponTitle, true, djq.ReductionAmount, djq.EnableAmount, djq.LastTS, true, false);
|
|
626
584
|
});
|
|
627
585
|
}
|
|
628
586
|
_this5.paymode.thePaymodes.push(newmode);
|
|
@@ -733,36 +691,36 @@ var SettlementStore = (_class = function () {
|
|
|
733
691
|
// address = '/member/memberProfile/FindByStorageCode/'+v;
|
|
734
692
|
address = '/marketingtool/MeStorageCard/getCardInfoByCardNo/' + v + '/' + true;
|
|
735
693
|
return (0, _tplusApi.ccApi)({ code: v }, address, false, false, { method: 'get', timeout_skip: true }).then(function () {
|
|
736
|
-
var _ref8 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function
|
|
694
|
+
var _ref8 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2(result) {
|
|
737
695
|
var data, m;
|
|
738
|
-
return _regenerator2.default.wrap(function
|
|
696
|
+
return _regenerator2.default.wrap(function _callee2$(_context2) {
|
|
739
697
|
while (1) {
|
|
740
|
-
switch (
|
|
698
|
+
switch (_context2.prev = _context2.next) {
|
|
741
699
|
case 0:
|
|
742
700
|
data = result.data;
|
|
743
701
|
m = data && data.length && data[0];
|
|
744
702
|
|
|
745
703
|
if (!(result && result.data.length)) {
|
|
746
|
-
|
|
704
|
+
_context2.next = 25;
|
|
747
705
|
break;
|
|
748
706
|
}
|
|
749
707
|
|
|
750
708
|
if (!(result.data.length === 1)) {
|
|
751
|
-
|
|
709
|
+
_context2.next = 14;
|
|
752
710
|
break;
|
|
753
711
|
}
|
|
754
712
|
|
|
755
713
|
if (!(m.CardTypeEnum === 'BALANCE_CARD')) {
|
|
756
|
-
|
|
714
|
+
_context2.next = 10;
|
|
757
715
|
break;
|
|
758
716
|
}
|
|
759
717
|
|
|
760
718
|
_this7.paymode.updateCardInfo(m);
|
|
761
719
|
_this7.handleCzkData(m);
|
|
762
|
-
return
|
|
720
|
+
return _context2.abrupt('return', result.data);
|
|
763
721
|
|
|
764
722
|
case 10:
|
|
765
|
-
|
|
723
|
+
_context2.next = 12;
|
|
766
724
|
return (0, _tplusApi.ccApi)({ dto: _this7.dto, meStorageCardId: m.MeStorageCardId }, '/retail/RetailPos/validateRetailStorageCard', false, false).then(function (result1) {
|
|
767
725
|
var data1 = result1.data ? JSON.parse(result1.data)[0] : {};
|
|
768
726
|
if (data1.enable) {
|
|
@@ -775,36 +733,36 @@ var SettlementStore = (_class = function () {
|
|
|
775
733
|
});
|
|
776
734
|
|
|
777
735
|
case 12:
|
|
778
|
-
|
|
736
|
+
_context2.next = 25;
|
|
779
737
|
break;
|
|
780
738
|
|
|
781
739
|
case 14:
|
|
782
740
|
if (!(result.data && result.data.length === 1)) {
|
|
783
|
-
|
|
741
|
+
_context2.next = 19;
|
|
784
742
|
break;
|
|
785
743
|
}
|
|
786
744
|
|
|
787
745
|
_this7.paymode.updateCardInfo(result.data[0]);
|
|
788
|
-
return
|
|
746
|
+
return _context2.abrupt('return', result.data);
|
|
789
747
|
|
|
790
748
|
case 19:
|
|
791
749
|
if (!(result.data && result.data.length > 1)) {
|
|
792
|
-
|
|
750
|
+
_context2.next = 23;
|
|
793
751
|
break;
|
|
794
752
|
}
|
|
795
753
|
|
|
796
|
-
return
|
|
754
|
+
return _context2.abrupt('return', result.data);
|
|
797
755
|
|
|
798
756
|
case 23:
|
|
799
757
|
_message2.default.warn('没有可用储值卡!');
|
|
800
|
-
return
|
|
758
|
+
return _context2.abrupt('return', false);
|
|
801
759
|
|
|
802
760
|
case 25:
|
|
803
761
|
case 'end':
|
|
804
|
-
return
|
|
762
|
+
return _context2.stop();
|
|
805
763
|
}
|
|
806
764
|
}
|
|
807
|
-
},
|
|
765
|
+
}, _callee2, _this7);
|
|
808
766
|
}));
|
|
809
767
|
|
|
810
768
|
return function (_x2) {
|
|
@@ -855,13 +813,12 @@ var SettlementStore = (_class = function () {
|
|
|
855
813
|
}
|
|
856
814
|
}, {
|
|
857
815
|
key: 'addDjq',
|
|
858
|
-
value: function addDjq(promoCouponCode, name, IsEnable,
|
|
816
|
+
value: function addDjq(promoCouponCode, name, IsEnable, amount, doorsill, LastTS, checked, IsRepelWithPoints, UMemberID, expired, displayText, promoMethodEnum, discountPct, promoId, promoRuleId, couponCategoryEnum, id, unCheck, count) {
|
|
859
817
|
var djq = {
|
|
860
818
|
code: promoCouponCode,
|
|
861
819
|
promoCouponCode: promoCouponCode,
|
|
862
820
|
name: name,
|
|
863
821
|
IsEnable: IsEnable,
|
|
864
|
-
nominalAmount: nominalAmount,
|
|
865
822
|
amount: amount,
|
|
866
823
|
doorsill: doorsill, //:"无门槛"
|
|
867
824
|
LastTS: LastTS,
|
|
@@ -952,7 +909,6 @@ var SettlementStore = (_class = function () {
|
|
|
952
909
|
name: themode.name,
|
|
953
910
|
exchangeRate: themode.exchangeRate,
|
|
954
911
|
calDirection: themode.calDirection,
|
|
955
|
-
thridPayment: themode.thridPayment,
|
|
956
912
|
value: value,
|
|
957
913
|
value2: (0, _utils.getFixedNumber)(themode.calDirection == "88" ? value / themode.exchangeRate : value * themode.exchangeRate),
|
|
958
914
|
value3: value,
|
|
@@ -981,7 +937,7 @@ var SettlementStore = (_class = function () {
|
|
|
981
937
|
if (type == PayStyle.hyczk || type == PayStyle.jfdx || type == PayStyle.djq) {
|
|
982
938
|
this.setMaxAmount(type, mode);
|
|
983
939
|
}
|
|
984
|
-
console.log(
|
|
940
|
+
console.log(mode);
|
|
985
941
|
return mode;
|
|
986
942
|
}
|
|
987
943
|
}, {
|
|
@@ -1018,6 +974,15 @@ var SettlementStore = (_class = function () {
|
|
|
1018
974
|
key: 'changeFocusOnly',
|
|
1019
975
|
value: function changeFocusOnly(type) {
|
|
1020
976
|
this.paymode.currentFocus = type;
|
|
977
|
+
// 获取焦点时带入剩余的值
|
|
978
|
+
// let mode=_find(this.paymode.thePaymodes,{'paymentType':type});
|
|
979
|
+
// if(mode && this.isIntegralExchange){
|
|
980
|
+
// const shouldSetValue =getFixedNumber(parseFloat(this.paymode.receivable) + parseFloat(mode.value));
|
|
981
|
+
// mode.value = shouldSetValue;
|
|
982
|
+
// mode.value2 = getFixedNumber(mode.calDirection=="88"?shouldSetValue / mode.exchangeRate:(shouldSetValue * mode.exchangeRate));
|
|
983
|
+
// mode.value3 = shouldSetValue;
|
|
984
|
+
// this.paymode.calcReserved();
|
|
985
|
+
// }
|
|
1021
986
|
}
|
|
1022
987
|
}, {
|
|
1023
988
|
key: 'changeClickFocusOnly',
|
|
@@ -1086,6 +1051,8 @@ var SettlementStore = (_class = function () {
|
|
|
1086
1051
|
});
|
|
1087
1052
|
pos = index == -1 ? pos : index + 1;
|
|
1088
1053
|
}
|
|
1054
|
+
// this.paymode.thePaymodes.push(this.genNewMode(type) );
|
|
1055
|
+
|
|
1089
1056
|
this.paymode.thePaymodes.splice(pos, 0, this.genNewMode(type, this.newStyle && type == PayStyle.hyczk, undefined, isQuick));
|
|
1090
1057
|
this.paymode.calcReserved();
|
|
1091
1058
|
}
|
|
@@ -1101,175 +1068,79 @@ var SettlementStore = (_class = function () {
|
|
|
1101
1068
|
this.paymode.currentFocus = -1;
|
|
1102
1069
|
this.paymode.calcReserved();
|
|
1103
1070
|
}
|
|
1104
|
-
|
|
1105
|
-
// 获取储值是否重复, 在commit方法中使用
|
|
1106
|
-
|
|
1107
|
-
}, {
|
|
1108
|
-
key: 'findStorageBillValidate',
|
|
1109
|
-
value: function findStorageBillValidate() {
|
|
1110
|
-
var _this10 = this;
|
|
1111
|
-
|
|
1112
|
-
var _enumController$getEn14 = _mutantsUtil.enumController.getEnumOj(),
|
|
1113
|
-
PayStyle = _enumController$getEn14.PayStyle;
|
|
1114
|
-
|
|
1115
|
-
(0, _mobx.runInAction)(function () {
|
|
1116
|
-
_this10.dto.StorageMutiSettleDetails = [];
|
|
1117
|
-
var thePaymodes = _this10.newStyle ? (0, _filter3.default)(_this10.paymode.thePaymodes, function (mode) {
|
|
1118
|
-
return parseFloat(mode.value) != 0;
|
|
1119
|
-
}) : _this10.paymode.thePaymodes;
|
|
1120
|
-
(0, _each3.default)(thePaymodes, function (mode) {
|
|
1121
|
-
var themode = (0, _find3.default)(_this10.paymode.paymodes, { 'paymentType': mode.paymentType });
|
|
1122
|
-
|
|
1123
|
-
var value = parseFloat(mode.value);
|
|
1124
|
-
var giveChange = null;
|
|
1125
|
-
if (mode.paymentType == PayStyle.xianjin && _this10.paymode.receivable < 0 && value > Math.abs(_this10.paymode.receivable)) {
|
|
1126
|
-
value = Math.Add(value, _this10.paymode.receivable);
|
|
1127
|
-
giveChange = Math.abs(_this10.paymode.receivable);
|
|
1128
|
-
}
|
|
1129
|
-
_this10.dto.StorageMutiSettleDetails.push({
|
|
1130
|
-
Code: mode.paymethodId,
|
|
1131
|
-
StorageAmount: value,
|
|
1132
|
-
GiveChange: giveChange,
|
|
1133
|
-
IdsettleStyle: themode.idSettleStyle,
|
|
1134
|
-
IdbankAccount: themode.idBankAccount,
|
|
1135
|
-
PaymentCode: mode.authCode,
|
|
1136
|
-
DynamicPropertyKeys: [],
|
|
1137
|
-
DynamicPropertyValues: [],
|
|
1138
|
-
DataSource: { Id: _this10.dataSource }
|
|
1139
|
-
});
|
|
1140
|
-
});
|
|
1141
|
-
});
|
|
1142
|
-
return (0, _tplusApi.ccApi)((0, _extends3.default)({}, this.dto), '/marketingtool/Storage/findStorageBillValidate', false, false);
|
|
1143
|
-
}
|
|
1144
|
-
|
|
1145
|
-
//判断是否重复弹框
|
|
1146
|
-
|
|
1147
1071
|
}, {
|
|
1148
1072
|
key: 'commit',
|
|
1149
1073
|
value: function () {
|
|
1150
|
-
var _ref9 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function
|
|
1151
|
-
var
|
|
1074
|
+
var _ref9 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee3(bTest) {
|
|
1075
|
+
var _ref10, isNewRetailBCPos;
|
|
1152
1076
|
|
|
1153
|
-
return _regenerator2.default.wrap(function
|
|
1077
|
+
return _regenerator2.default.wrap(function _callee3$(_context3) {
|
|
1154
1078
|
while (1) {
|
|
1155
|
-
switch (
|
|
1079
|
+
switch (_context3.prev = _context3.next) {
|
|
1156
1080
|
case 0:
|
|
1157
1081
|
console.log('settlementStore.commit开始,参数:' + bTest);
|
|
1158
1082
|
|
|
1159
1083
|
if (!bTest) {
|
|
1160
|
-
|
|
1084
|
+
_context3.next = 3;
|
|
1161
1085
|
break;
|
|
1162
1086
|
}
|
|
1163
1087
|
|
|
1164
|
-
return
|
|
1088
|
+
return _context3.abrupt('return', _promise2.default.resolve(true));
|
|
1165
1089
|
|
|
1166
1090
|
case 3:
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
paylist = this.paymode.thePaymodes.filter(function (v) {
|
|
1170
|
-
return !!v.thridPayment && v.value > 0;
|
|
1171
|
-
}) || [];
|
|
1172
|
-
|
|
1173
|
-
if (!(paylist && paylist.length > 1)) {
|
|
1174
|
-
_context4.next = 9;
|
|
1175
|
-
break;
|
|
1176
|
-
}
|
|
1091
|
+
_ref10 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref10.isNewRetailBCPos;
|
|
1092
|
+
_context3.prev = 4;
|
|
1177
1093
|
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
case 9:
|
|
1182
|
-
if (!(status == 1)) {
|
|
1183
|
-
_context4.next = 30;
|
|
1094
|
+
if (!(this.type == 1)) {
|
|
1095
|
+
_context3.next = 10;
|
|
1184
1096
|
break;
|
|
1185
1097
|
}
|
|
1186
1098
|
|
|
1187
|
-
|
|
1188
|
-
return this.findStorageBillValidate();
|
|
1189
|
-
|
|
1190
|
-
case 12:
|
|
1191
|
-
ret = _context4.sent;
|
|
1192
|
-
_ref10 = ret || {}, _ref10$data = _ref10.data;
|
|
1193
|
-
_ref10$data = _ref10$data === undefined ? {} : _ref10$data;
|
|
1194
|
-
code = _ref10$data.code, returnMsg = _ref10$data.returnMsg;
|
|
1195
|
-
|
|
1196
|
-
if (!(code && code == 10001)) {
|
|
1197
|
-
_context4.next = 24;
|
|
1198
|
-
break;
|
|
1199
|
-
}
|
|
1200
|
-
|
|
1201
|
-
_context4.next = 19;
|
|
1202
|
-
return this.repeatStorageModal(returnMsg);
|
|
1203
|
-
|
|
1204
|
-
case 19:
|
|
1205
|
-
state = _context4.sent;
|
|
1206
|
-
|
|
1207
|
-
if (!(state === false)) {
|
|
1208
|
-
_context4.next = 22;
|
|
1209
|
-
break;
|
|
1210
|
-
}
|
|
1211
|
-
|
|
1212
|
-
return _context4.abrupt('return', _promise2.default.resolve(false));
|
|
1213
|
-
|
|
1214
|
-
case 22:
|
|
1215
|
-
_context4.next = 28;
|
|
1216
|
-
break;
|
|
1217
|
-
|
|
1218
|
-
case 24:
|
|
1219
|
-
_context4.next = 26;
|
|
1099
|
+
_context3.next = 8;
|
|
1220
1100
|
return this.saveMember();
|
|
1221
1101
|
|
|
1222
|
-
case
|
|
1223
|
-
|
|
1102
|
+
case 8:
|
|
1103
|
+
_context3.next = 18;
|
|
1104
|
+
break;
|
|
1224
1105
|
|
|
1225
|
-
|
|
1226
|
-
|
|
1106
|
+
case 10:
|
|
1107
|
+
if (!isNewRetailBCPos) {
|
|
1108
|
+
_context3.next = 13;
|
|
1109
|
+
break;
|
|
1227
1110
|
}
|
|
1228
1111
|
|
|
1229
|
-
|
|
1230
|
-
_context4.next = 39;
|
|
1231
|
-
break;
|
|
1232
|
-
|
|
1233
|
-
case 30:
|
|
1234
|
-
_context4.next = 32;
|
|
1112
|
+
_context3.next = 13;
|
|
1235
1113
|
return _mutantsMicrofx.stores.offlineSys.generatorCode(this.dto);
|
|
1236
1114
|
|
|
1237
|
-
case
|
|
1238
|
-
|
|
1115
|
+
case 13:
|
|
1116
|
+
_context3.next = 15;
|
|
1239
1117
|
return this.save();
|
|
1240
1118
|
|
|
1241
|
-
case
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
if (!(ret2 === false)) {
|
|
1245
|
-
_context4.next = 37;
|
|
1119
|
+
case 15:
|
|
1120
|
+
if (!isNewRetailBCPos) {
|
|
1121
|
+
_context3.next = 18;
|
|
1246
1122
|
break;
|
|
1247
1123
|
}
|
|
1248
1124
|
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
case 37:
|
|
1252
|
-
_context4.next = 39;
|
|
1125
|
+
_context3.next = 18;
|
|
1253
1126
|
return _mutantsMicrofx.stores.offlineSys.retailSequenceUpload();
|
|
1254
1127
|
|
|
1255
|
-
case
|
|
1256
|
-
return
|
|
1128
|
+
case 18:
|
|
1129
|
+
return _context3.abrupt('return', _promise2.default.resolve(true));
|
|
1257
1130
|
|
|
1258
|
-
case
|
|
1259
|
-
|
|
1260
|
-
|
|
1131
|
+
case 21:
|
|
1132
|
+
_context3.prev = 21;
|
|
1133
|
+
_context3.t0 = _context3['catch'](4);
|
|
1261
1134
|
|
|
1262
|
-
console.error('settlementStore.commit失败,错误信息:' +
|
|
1263
|
-
|
|
1264
|
-
this.thirdPayRefund(status == 1 ? 2 : 1);
|
|
1265
|
-
return _context4.abrupt('return', _promise2.default.resolve(_context4.t0));
|
|
1135
|
+
console.error('settlementStore.commit失败,错误信息:' + _context3.t0);
|
|
1136
|
+
return _context3.abrupt('return', _promise2.default.resolve(_context3.t0));
|
|
1266
1137
|
|
|
1267
|
-
case
|
|
1138
|
+
case 25:
|
|
1268
1139
|
case 'end':
|
|
1269
|
-
return
|
|
1140
|
+
return _context3.stop();
|
|
1270
1141
|
}
|
|
1271
1142
|
}
|
|
1272
|
-
},
|
|
1143
|
+
}, _callee3, this, [[4, 21]]);
|
|
1273
1144
|
}));
|
|
1274
1145
|
|
|
1275
1146
|
function commit(_x3) {
|
|
@@ -1286,136 +1157,76 @@ var SettlementStore = (_class = function () {
|
|
|
1286
1157
|
}
|
|
1287
1158
|
}, {
|
|
1288
1159
|
key: 'saveMember',
|
|
1289
|
-
value: function () {
|
|
1290
|
-
var
|
|
1291
|
-
var _this11 = this;
|
|
1292
|
-
|
|
1293
|
-
var _enumController$getEn15, PayStyle, TradeType, IPMSG, dtoParams, payList, payment, tradeType, ret, _ref12, type, data, msg, code;
|
|
1294
|
-
|
|
1295
|
-
return _regenerator2.default.wrap(function _callee5$(_context5) {
|
|
1296
|
-
while (1) {
|
|
1297
|
-
switch (_context5.prev = _context5.next) {
|
|
1298
|
-
case 0:
|
|
1299
|
-
_enumController$getEn15 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn15.PayStyle, TradeType = _enumController$getEn15.TradeType;
|
|
1300
|
-
|
|
1301
|
-
(0, _mobx.runInAction)(function () {
|
|
1302
|
-
_this11.dto.StorageMutiSettleDetails = [];
|
|
1303
|
-
var thePaymodes = _this11.newStyle ? (0, _filter3.default)(_this11.paymode.thePaymodes, function (mode) {
|
|
1304
|
-
return parseFloat(mode.value) != 0;
|
|
1305
|
-
}) : _this11.paymode.thePaymodes;
|
|
1306
|
-
(0, _each3.default)(thePaymodes, function (mode) {
|
|
1307
|
-
var themode = (0, _find3.default)(_this11.paymode.paymodes, { 'paymentType': mode.paymentType });
|
|
1308
|
-
|
|
1309
|
-
var value = parseFloat(mode.value);
|
|
1310
|
-
var giveChange = null;
|
|
1311
|
-
if (mode.paymentType == PayStyle.xianjin && _this11.paymode.receivable < 0 && value > Math.abs(_this11.paymode.receivable)) {
|
|
1312
|
-
value = Math.Add(value, _this11.paymode.receivable);
|
|
1313
|
-
giveChange = Math.abs(_this11.paymode.receivable);
|
|
1314
|
-
}
|
|
1315
|
-
_this11.dto.StorageMutiSettleDetails.push({
|
|
1316
|
-
Code: mode.paymethodId,
|
|
1317
|
-
StorageAmount: value,
|
|
1318
|
-
GiveChange: giveChange,
|
|
1319
|
-
IdsettleStyle: themode.idSettleStyle,
|
|
1320
|
-
IdbankAccount: themode.idBankAccount,
|
|
1321
|
-
PaymentCode: mode.authCode,
|
|
1322
|
-
DynamicPropertyKeys: [],
|
|
1323
|
-
DynamicPropertyValues: [],
|
|
1324
|
-
DataSource: { Id: _this11.dataSource },
|
|
1325
|
-
ThirdPaymentInfo: themode.thridPayment || null,
|
|
1326
|
-
ThirdPaymentReturnInfo: mode.thirdPaymentReturnInfo || null
|
|
1327
|
-
});
|
|
1328
|
-
});
|
|
1329
|
-
});
|
|
1330
|
-
// cc结算调用
|
|
1331
|
-
IPMSG = {};
|
|
1332
|
-
|
|
1333
|
-
if (!!window.localStorage.IPMSG) {
|
|
1334
|
-
IPMSG = JSON.parse(window.localStorage.IPMSG);
|
|
1335
|
-
}
|
|
1336
|
-
dtoParams = this.dto;
|
|
1337
|
-
//处理存在二开支付情况
|
|
1338
|
-
|
|
1339
|
-
payList = dtoParams.StorageMutiSettleDetails.filter(function (v) {
|
|
1340
|
-
return v.ThirdPaymentInfo;
|
|
1341
|
-
});
|
|
1342
|
-
|
|
1343
|
-
if (!(payList && payList.length > 0)) {
|
|
1344
|
-
_context5.next = 19;
|
|
1345
|
-
break;
|
|
1346
|
-
}
|
|
1347
|
-
|
|
1348
|
-
payment = payList[0];
|
|
1349
|
-
tradeType = payment && payment.StorageAmount > 0 ? TradeType.PAY : TradeType.REFUND;
|
|
1350
|
-
_context5.next = 11;
|
|
1351
|
-
return this.thirdPay(2, payment, tradeType, dtoParams);
|
|
1352
|
-
|
|
1353
|
-
case 11:
|
|
1354
|
-
ret = _context5.sent;
|
|
1355
|
-
_ref12 = ret || {}, type = _ref12.type, data = _ref12.data, msg = _ref12.msg, code = _ref12.code;
|
|
1356
|
-
|
|
1357
|
-
if (!(type === true)) {
|
|
1358
|
-
_context5.next = 17;
|
|
1359
|
-
break;
|
|
1360
|
-
}
|
|
1160
|
+
value: function saveMember() {
|
|
1161
|
+
var _this10 = this;
|
|
1361
1162
|
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
break;
|
|
1163
|
+
var _enumController$getEn14 = _mutantsUtil.enumController.getEnumOj(),
|
|
1164
|
+
PayStyle = _enumController$getEn14.PayStyle;
|
|
1365
1165
|
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
return _context5.abrupt('return', (0, _tplusApi.tApi)({ dto: dtoParams }, 'chanjet.ME.INewRetailMemberStorage.Save', false, false).then(function (resp) {
|
|
1374
|
-
_this11.handlePrint(resp);
|
|
1375
|
-
}));
|
|
1166
|
+
(0, _mobx.runInAction)(function () {
|
|
1167
|
+
_this10.dto.StorageMutiSettleDetails = [];
|
|
1168
|
+
var thePaymodes = _this10.newStyle ? (0, _filter3.default)(_this10.paymode.thePaymodes, function (mode) {
|
|
1169
|
+
return parseFloat(mode.value) != 0;
|
|
1170
|
+
}) : _this10.paymode.thePaymodes;
|
|
1171
|
+
(0, _each3.default)(thePaymodes, function (mode) {
|
|
1172
|
+
var themode = (0, _find3.default)(_this10.paymode.paymodes, { 'paymentType': mode.paymentType });
|
|
1376
1173
|
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1174
|
+
var value = parseFloat(mode.value);
|
|
1175
|
+
var giveChange = null;
|
|
1176
|
+
if (mode.paymentType == PayStyle.xianjin && _this10.paymode.receivable < 0 && value > Math.abs(_this10.paymode.receivable)) {
|
|
1177
|
+
value = Math.Add(value, _this10.paymode.receivable);
|
|
1178
|
+
giveChange = Math.abs(_this10.paymode.receivable);
|
|
1381
1179
|
}
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1180
|
+
_this10.dto.StorageMutiSettleDetails.push({
|
|
1181
|
+
Code: mode.paymethodId,
|
|
1182
|
+
StorageAmount: value,
|
|
1183
|
+
GiveChange: giveChange,
|
|
1184
|
+
IdsettleStyle: themode.idSettleStyle,
|
|
1185
|
+
IdbankAccount: themode.idBankAccount,
|
|
1186
|
+
PaymentCode: mode.authCode,
|
|
1187
|
+
DynamicPropertyKeys: [],
|
|
1188
|
+
DynamicPropertyValues: [],
|
|
1189
|
+
DataSource: { Id: _this10.dataSource }
|
|
1190
|
+
});
|
|
1191
|
+
});
|
|
1192
|
+
});
|
|
1193
|
+
// cc结算调用
|
|
1194
|
+
var IPMSG = {};
|
|
1195
|
+
if (!!window.localStorage.IPMSG) {
|
|
1196
|
+
IPMSG = JSON.parse(window.localStorage.IPMSG);
|
|
1387
1197
|
}
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1198
|
+
return (0, _tplusApi.tApi)({ dto: this.dto }, 'chanjet.ME.INewRetailMemberStorage.Save', false, false).then(function (resp) {
|
|
1199
|
+
_this10.handlePrint(resp);
|
|
1200
|
+
});
|
|
1201
|
+
}
|
|
1391
1202
|
}, {
|
|
1392
1203
|
key: 'save',
|
|
1393
1204
|
value: function () {
|
|
1394
|
-
var
|
|
1395
|
-
var
|
|
1205
|
+
var _ref11 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee4() {
|
|
1206
|
+
var _this11 = this;
|
|
1396
1207
|
|
|
1397
|
-
var _enumController$
|
|
1208
|
+
var _enumController$getEn15, PayStyle, _ref13, isNewRetailBCPos, IPMSG, RetailTypeEnum;
|
|
1398
1209
|
|
|
1399
|
-
return _regenerator2.default.wrap(function
|
|
1210
|
+
return _regenerator2.default.wrap(function _callee4$(_context4) {
|
|
1400
1211
|
while (1) {
|
|
1401
|
-
switch (
|
|
1212
|
+
switch (_context4.prev = _context4.next) {
|
|
1402
1213
|
case 0:
|
|
1403
|
-
_enumController$
|
|
1214
|
+
_enumController$getEn15 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn15.PayStyle;
|
|
1404
1215
|
|
|
1405
1216
|
(0, _mobx.runInAction)(function () {
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1217
|
+
_this11.dto.RetailPaymentDetails = [];
|
|
1218
|
+
_this11.dto.RetailStorageDetails = [];
|
|
1219
|
+
_this11.dto.RetailCouponDetails = [];
|
|
1409
1220
|
var czkSum = 0;
|
|
1410
1221
|
var count = 0;
|
|
1411
|
-
var thePaymodes =
|
|
1222
|
+
var thePaymodes = _this11.newStyle ? (0, _filter3.default)(_this11.paymode.thePaymodes, function (mode) {
|
|
1412
1223
|
return parseFloat(mode.value) != 0;
|
|
1413
|
-
}) :
|
|
1224
|
+
}) : _this11.paymode.thePaymodes;
|
|
1414
1225
|
(0, _each3.default)(thePaymodes, function (mode, index) {
|
|
1415
|
-
var themode = (0, _find3.default)(
|
|
1226
|
+
var themode = (0, _find3.default)(_this11.paymode.paymodes, { 'paymentType': mode.paymentType });
|
|
1416
1227
|
if (mode.paymentType == PayStyle.hyczk) {
|
|
1417
1228
|
czkSum = Math.Add(czkSum, mode.value);
|
|
1418
|
-
|
|
1229
|
+
_this11.dto.RetailStorageDetails.push({
|
|
1419
1230
|
Code: mode.paymethodId,
|
|
1420
1231
|
MeStorageCardId: mode.meStorageCardId,
|
|
1421
1232
|
StoragePaymentAmount: mode.value,
|
|
@@ -1424,17 +1235,17 @@ var SettlementStore = (_class = function () {
|
|
|
1424
1235
|
Idmember: mode.memberId,
|
|
1425
1236
|
DynamicPropertyKeys: [],
|
|
1426
1237
|
DynamicPropertyValues: [],
|
|
1427
|
-
DataSource: { Id:
|
|
1238
|
+
DataSource: { Id: _this11.dataSource },
|
|
1428
1239
|
Password: mode.authCode
|
|
1429
1240
|
});
|
|
1430
1241
|
} else {
|
|
1431
1242
|
var value = parseFloat(mode.value);
|
|
1432
1243
|
var giveChange = null;
|
|
1433
|
-
if (mode.paymentType == PayStyle.xianjin &&
|
|
1434
|
-
value = Math.Add(value,
|
|
1435
|
-
giveChange = Math.abs(
|
|
1244
|
+
if (mode.paymentType == PayStyle.xianjin && _this11.paymode.receivable < 0 && value > Math.abs(_this11.paymode.receivable)) {
|
|
1245
|
+
value = Math.Add(value, _this11.paymode.receivable);
|
|
1246
|
+
giveChange = Math.abs(_this11.paymode.receivable);
|
|
1436
1247
|
}
|
|
1437
|
-
|
|
1248
|
+
_this11.dto.RetailPaymentDetails.push({
|
|
1438
1249
|
Code: mode.paymethodId,
|
|
1439
1250
|
OrigAmount: mode.exchangeRate != 1 ? mode.value2 : value,
|
|
1440
1251
|
Amount: value,
|
|
@@ -1448,13 +1259,11 @@ var SettlementStore = (_class = function () {
|
|
|
1448
1259
|
OverchargesAmount: mode.overchargesAmount,
|
|
1449
1260
|
DynamicPropertyKeys: [],
|
|
1450
1261
|
DynamicPropertyValues: [],
|
|
1451
|
-
DataSource: { Id:
|
|
1452
|
-
ThirdPaymentInfo: themode.thridPayment || null,
|
|
1453
|
-
ThirdPaymentReturnInfo: mode.thirdPaymentReturnInfo || null
|
|
1262
|
+
DataSource: { Id: _this11.dataSource }
|
|
1454
1263
|
});
|
|
1455
1264
|
if (mode.paymentType == PayStyle.djq) {
|
|
1456
|
-
(0, _each3.default)(
|
|
1457
|
-
|
|
1265
|
+
(0, _each3.default)(_this11.paymode.checkList && _this11.paymode.checkList.length ? _this11.paymode.checkList : mode.djqs, function (djq) {
|
|
1266
|
+
_this11.dto.RetailCouponDetails.push({
|
|
1458
1267
|
CouponCode: djq.promoCouponCode,
|
|
1459
1268
|
ReductionAmount: djq.amount,
|
|
1460
1269
|
EnableAmount: djq.doorsill,
|
|
@@ -1464,28 +1273,53 @@ var SettlementStore = (_class = function () {
|
|
|
1464
1273
|
PromotionId: djq.promoId,
|
|
1465
1274
|
PromotionRuleId: djq.promoRuleId,
|
|
1466
1275
|
PromoCouponAllocatedId: djq.id,
|
|
1467
|
-
DataSource: { Id:
|
|
1276
|
+
DataSource: { Id: _this11.dataSource }
|
|
1468
1277
|
});
|
|
1469
1278
|
});
|
|
1470
1279
|
}
|
|
1471
1280
|
}
|
|
1472
1281
|
});
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1282
|
+
|
|
1283
|
+
var _ref12 = _mutantsUtil.platform || {},
|
|
1284
|
+
isNewRetailBCPos = _ref12.isNewRetailBCPos;
|
|
1285
|
+
|
|
1286
|
+
if (_this11.dto.RetailStorageDetails.length > 0) {
|
|
1287
|
+
var themode = (0, _find3.default)(_this11.paymode.paymodes, { 'paymentType': PayStyle.hyczk });
|
|
1288
|
+
if (isNewRetailBCPos) {
|
|
1289
|
+
_this11.dto.RetailPaymentDetails.push({
|
|
1290
|
+
Code: _this11.paymode.counter,
|
|
1291
|
+
OrigAmount: czkSum,
|
|
1292
|
+
Amount: czkSum,
|
|
1293
|
+
IdsettleStyle: themode.idSettleStyle,
|
|
1294
|
+
IdbankAccount: themode.idBankAccount,
|
|
1295
|
+
DynamicPropertyKeys: [],
|
|
1296
|
+
DynamicPropertyValues: [],
|
|
1297
|
+
DataSource: { Id: _this11.dataSource },
|
|
1298
|
+
RetailStorageDetails: _this11.dto.RetailStorageDetails
|
|
1299
|
+
});
|
|
1300
|
+
} else {
|
|
1301
|
+
_this11.dto.RetailPaymentDetails.push({
|
|
1302
|
+
Code: _this11.paymode.counter,
|
|
1303
|
+
OrigAmount: czkSum,
|
|
1304
|
+
Amount: czkSum,
|
|
1305
|
+
IdsettleStyle: themode.idSettleStyle,
|
|
1306
|
+
IdbankAccount: themode.idBankAccount,
|
|
1307
|
+
DynamicPropertyKeys: [],
|
|
1308
|
+
DynamicPropertyValues: [],
|
|
1309
|
+
DataSource: { Id: _this11.dataSource }
|
|
1310
|
+
});
|
|
1311
|
+
}
|
|
1486
1312
|
}
|
|
1487
1313
|
});
|
|
1488
|
-
|
|
1314
|
+
_ref13 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref13.isNewRetailBCPos;
|
|
1315
|
+
|
|
1316
|
+
console.log('bc_pos\u73AF\u5883:' + isNewRetailBCPos + ',\u7ED3\u7B97\u6570\u636E\uFF1A', this.dto);
|
|
1317
|
+
|
|
1318
|
+
if (!isNewRetailBCPos) {
|
|
1319
|
+
_context4.next = 20;
|
|
1320
|
+
break;
|
|
1321
|
+
}
|
|
1322
|
+
|
|
1489
1323
|
// cc结算调用
|
|
1490
1324
|
IPMSG = {};
|
|
1491
1325
|
|
|
@@ -1493,271 +1327,65 @@ var SettlementStore = (_class = function () {
|
|
|
1493
1327
|
IPMSG = JSON.parse(window.localStorage.IPMSG);
|
|
1494
1328
|
}
|
|
1495
1329
|
RetailTypeEnum = this.dto.IdbusiType == 36 ? "INTEGRAL_EXCHANGE" : "NORMAL";
|
|
1496
|
-
|
|
1330
|
+
_context4.t1 = this.dto.IdbusiType == 37;
|
|
1497
1331
|
|
|
1498
|
-
if (!
|
|
1499
|
-
|
|
1332
|
+
if (!_context4.t1) {
|
|
1333
|
+
_context4.next = 13;
|
|
1500
1334
|
break;
|
|
1501
1335
|
}
|
|
1502
1336
|
|
|
1503
|
-
|
|
1337
|
+
_context4.next = 12;
|
|
1504
1338
|
return this.checkIntegralExchangeReturn(this.dto.RetailDetails[0].ReturnSourceId);
|
|
1505
1339
|
|
|
1506
|
-
case
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
case 11:
|
|
1510
|
-
_context6.t0 = _context6.t1;
|
|
1511
|
-
|
|
1512
|
-
if (_context6.t0) {
|
|
1513
|
-
_context6.next = 14;
|
|
1514
|
-
break;
|
|
1515
|
-
}
|
|
1340
|
+
case 12:
|
|
1341
|
+
_context4.t1 = _context4.sent;
|
|
1516
1342
|
|
|
1517
|
-
|
|
1343
|
+
case 13:
|
|
1344
|
+
_context4.t0 = _context4.t1;
|
|
1518
1345
|
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
_context6.next = 33;
|
|
1346
|
+
if (_context4.t0) {
|
|
1347
|
+
_context4.next = 16;
|
|
1522
1348
|
break;
|
|
1523
1349
|
}
|
|
1524
1350
|
|
|
1525
|
-
|
|
1526
|
-
//处理存在二开支付情况
|
|
1527
|
-
|
|
1528
|
-
payList = dtoParams.RetailPaymentDetails.filter(function (v) {
|
|
1529
|
-
return v.ThirdPaymentInfo;
|
|
1530
|
-
});
|
|
1351
|
+
_context4.t0 = this.dto.IdbusiType != 37;
|
|
1531
1352
|
|
|
1532
|
-
|
|
1533
|
-
|
|
1353
|
+
case 16:
|
|
1354
|
+
if (!_context4.t0) {
|
|
1355
|
+
_context4.next = 18;
|
|
1534
1356
|
break;
|
|
1535
1357
|
}
|
|
1536
1358
|
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
case 22:
|
|
1543
|
-
ret = _context6.sent;
|
|
1544
|
-
_ref14 = ret || {}, type = _ref14.type, data = _ref14.data, msg = _ref14.msg, code = _ref14.code;
|
|
1545
|
-
|
|
1546
|
-
if (!(type === true)) {
|
|
1547
|
-
_context6.next = 28;
|
|
1548
|
-
break;
|
|
1549
|
-
}
|
|
1359
|
+
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) {
|
|
1360
|
+
_this11.setDtoID(resp.ID);
|
|
1361
|
+
_this11.paymode.checkList = [];
|
|
1362
|
+
_this11.billID = resp.ID;
|
|
1363
|
+
}));
|
|
1550
1364
|
|
|
1551
|
-
|
|
1552
|
-
|
|
1365
|
+
case 18:
|
|
1366
|
+
_context4.next = 21;
|
|
1553
1367
|
break;
|
|
1554
1368
|
|
|
1555
|
-
case
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
case 30:
|
|
1560
|
-
this.dtoParams = dtoParams;
|
|
1561
|
-
console.log('结算信息:', dtoParams);
|
|
1562
|
-
return _context6.abrupt('return', (0, _tplusApi.ccApi)({ dto: dtoParams, cip: IPMSG.query || "" }, '/retail/RetailPos/settle', false, false, { method: 'post', timeout_skip: true }).then(function (resp) {
|
|
1563
|
-
var _ref15 = resp || {},
|
|
1564
|
-
ID = _ref15.ID;
|
|
1565
|
-
|
|
1566
|
-
_this12.setDtoID(ID);
|
|
1567
|
-
_this12.billID = ID;
|
|
1568
|
-
_this12.paymode.checkList = [];
|
|
1369
|
+
case 20:
|
|
1370
|
+
return _context4.abrupt('return', (0, _tplusApi.tApi)({ dto: this.dto.cut() }, 'chanjet.RE.newRetail.Settle', false, false, { timeout_skip: true }).then(function (resp) {
|
|
1371
|
+
_this11.setDtoID(resp.ID);
|
|
1372
|
+
_this11.billID = resp.ID;
|
|
1569
1373
|
}));
|
|
1570
1374
|
|
|
1571
|
-
case
|
|
1375
|
+
case 21:
|
|
1572
1376
|
case 'end':
|
|
1573
|
-
return
|
|
1377
|
+
return _context4.stop();
|
|
1574
1378
|
}
|
|
1575
1379
|
}
|
|
1576
|
-
},
|
|
1380
|
+
}, _callee4, this);
|
|
1577
1381
|
}));
|
|
1578
1382
|
|
|
1579
1383
|
function save() {
|
|
1580
|
-
return
|
|
1384
|
+
return _ref11.apply(this, arguments);
|
|
1581
1385
|
}
|
|
1582
1386
|
|
|
1583
1387
|
return save;
|
|
1584
1388
|
}()
|
|
1585
|
-
|
|
1586
|
-
//裁剪二开支付数据
|
|
1587
|
-
|
|
1588
|
-
}, {
|
|
1589
|
-
key: 'removeThirdPayDto',
|
|
1590
|
-
value: function removeThirdPayDto(dto) {
|
|
1591
|
-
var data = (0, _extends3.default)({}, dto);
|
|
1592
|
-
delete data['DynamicPropertyKeys'];
|
|
1593
|
-
delete data['DynamicPropertyValues'];
|
|
1594
|
-
return data;
|
|
1595
|
-
}
|
|
1596
|
-
|
|
1597
|
-
/**
|
|
1598
|
-
* 二开支付
|
|
1599
|
-
* vType:1零售单、2储值单
|
|
1600
|
-
* payment:结算方式
|
|
1601
|
-
* trade:00表示结算、02表示退款
|
|
1602
|
-
* dto:结算数据集合
|
|
1603
|
-
*/
|
|
1604
|
-
|
|
1605
|
-
}, {
|
|
1606
|
-
key: 'thirdPay',
|
|
1607
|
-
value: function () {
|
|
1608
|
-
var _ref16 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee7(vType, payment, trade, dto) {
|
|
1609
|
-
var cto, params, ret, _ref17, Code, _Message, Result, _ref18, ThirdPaymentReturnInfo;
|
|
1610
|
-
|
|
1611
|
-
return _regenerator2.default.wrap(function _callee7$(_context7) {
|
|
1612
|
-
while (1) {
|
|
1613
|
-
switch (_context7.prev = _context7.next) {
|
|
1614
|
-
case 0:
|
|
1615
|
-
_context7.prev = 0;
|
|
1616
|
-
cto = this.removeThirdPayDto(dto);
|
|
1617
|
-
params = { VoucherType: vType, Payment: payment, TradeType: trade, dto: cto };
|
|
1618
|
-
|
|
1619
|
-
console.log('刷卡信息:', (0, _stringify2.default)(params));
|
|
1620
|
-
_context7.next = 6;
|
|
1621
|
-
return new _promise2.default(function (resolve, reject) {
|
|
1622
|
-
_mutantsMicrofx.nativeMs.setIpcRendererMethod('ThirdPayment', (0, _extends3.default)({}, params), function (res) {
|
|
1623
|
-
return resolve(res);
|
|
1624
|
-
});
|
|
1625
|
-
});
|
|
1626
|
-
|
|
1627
|
-
case 6:
|
|
1628
|
-
ret = _context7.sent;
|
|
1629
|
-
|
|
1630
|
-
console.log('刷卡返回信息:', ret);
|
|
1631
|
-
ret = JSON.parse(ret);
|
|
1632
|
-
_ref17 = ret || {}, Code = _ref17.Code, _Message = _ref17.Message, Result = _ref17.Result;
|
|
1633
|
-
|
|
1634
|
-
if (!(Code > 0)) {
|
|
1635
|
-
_context7.next = 14;
|
|
1636
|
-
break;
|
|
1637
|
-
}
|
|
1638
|
-
|
|
1639
|
-
return _context7.abrupt('return', { type: false, data: null, msg: _Message, code: Code });
|
|
1640
|
-
|
|
1641
|
-
case 14:
|
|
1642
|
-
if (!(trade == '00')) {
|
|
1643
|
-
_context7.next = 20;
|
|
1644
|
-
break;
|
|
1645
|
-
}
|
|
1646
|
-
|
|
1647
|
-
_ref18 = Result || {}, ThirdPaymentReturnInfo = _ref18.ThirdPaymentReturnInfo;
|
|
1648
|
-
|
|
1649
|
-
if (vType == 1) {
|
|
1650
|
-
dto.RetailPaymentDetails.forEach(function (v) {
|
|
1651
|
-
if (v.ThirdPaymentInfo != null) {
|
|
1652
|
-
v.ThirdPaymentReturnInfo = ThirdPaymentReturnInfo;
|
|
1653
|
-
}
|
|
1654
|
-
});
|
|
1655
|
-
} else if (vType == 2) {
|
|
1656
|
-
dto.StorageMutiSettleDetails.forEach(function (v) {
|
|
1657
|
-
if (v.ThirdPaymentInfo != null) {
|
|
1658
|
-
v.ThirdPaymentReturnInfo = ThirdPaymentReturnInfo;
|
|
1659
|
-
}
|
|
1660
|
-
});
|
|
1661
|
-
}
|
|
1662
|
-
return _context7.abrupt('return', { type: true, data: dto, msg: _Message, code: Code });
|
|
1663
|
-
|
|
1664
|
-
case 20:
|
|
1665
|
-
if (!(trade == '02')) {
|
|
1666
|
-
_context7.next = 22;
|
|
1667
|
-
break;
|
|
1668
|
-
}
|
|
1669
|
-
|
|
1670
|
-
return _context7.abrupt('return', { type: true, data: dto, msg: _Message, code: Code });
|
|
1671
|
-
|
|
1672
|
-
case 22:
|
|
1673
|
-
_context7.next = 27;
|
|
1674
|
-
break;
|
|
1675
|
-
|
|
1676
|
-
case 24:
|
|
1677
|
-
_context7.prev = 24;
|
|
1678
|
-
_context7.t0 = _context7['catch'](0);
|
|
1679
|
-
return _context7.abrupt('return', { type: false, data: null, msg: _context7.t0 });
|
|
1680
|
-
|
|
1681
|
-
case 27:
|
|
1682
|
-
case 'end':
|
|
1683
|
-
return _context7.stop();
|
|
1684
|
-
}
|
|
1685
|
-
}
|
|
1686
|
-
}, _callee7, this, [[0, 24]]);
|
|
1687
|
-
}));
|
|
1688
|
-
|
|
1689
|
-
function thirdPay(_x4, _x5, _x6, _x7) {
|
|
1690
|
-
return _ref16.apply(this, arguments);
|
|
1691
|
-
}
|
|
1692
|
-
|
|
1693
|
-
return thirdPay;
|
|
1694
|
-
}()
|
|
1695
|
-
|
|
1696
|
-
//二开支付强制退款情况
|
|
1697
|
-
|
|
1698
|
-
}, {
|
|
1699
|
-
key: 'thirdPayRefund',
|
|
1700
|
-
value: function () {
|
|
1701
|
-
var _ref19 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee9(type) {
|
|
1702
|
-
var _this13 = this;
|
|
1703
|
-
|
|
1704
|
-
var dto, pay, payment, _enumController$getEn17, TradeType;
|
|
1705
|
-
|
|
1706
|
-
return _regenerator2.default.wrap(function _callee9$(_context9) {
|
|
1707
|
-
while (1) {
|
|
1708
|
-
switch (_context9.prev = _context9.next) {
|
|
1709
|
-
case 0:
|
|
1710
|
-
dto = type == 1 ? this.dtoParams.RetailPaymentDetails : this.dtoParams.StorageMutiSettleDetails;
|
|
1711
|
-
pay = dto && dto.filter(function (v) {
|
|
1712
|
-
return v.ThirdPaymentInfo;
|
|
1713
|
-
});
|
|
1714
|
-
|
|
1715
|
-
if (pay && pay.length > 0) {
|
|
1716
|
-
setTimeout(function () {
|
|
1717
|
-
_message2.default.warn("支付出现异常,将发起刷卡退款。", { duration: 4.5 });
|
|
1718
|
-
}, 1000);
|
|
1719
|
-
payment = pay[0];
|
|
1720
|
-
_enumController$getEn17 = _mutantsUtil.enumController.getEnumOj(), TradeType = _enumController$getEn17.TradeType;
|
|
1721
|
-
|
|
1722
|
-
setTimeout((0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee8() {
|
|
1723
|
-
var ret, _ref21, msg;
|
|
1724
|
-
|
|
1725
|
-
return _regenerator2.default.wrap(function _callee8$(_context8) {
|
|
1726
|
-
while (1) {
|
|
1727
|
-
switch (_context8.prev = _context8.next) {
|
|
1728
|
-
case 0:
|
|
1729
|
-
_context8.next = 2;
|
|
1730
|
-
return _this13.thirdPay(type, payment, TradeType.REFUND, dto);
|
|
1731
|
-
|
|
1732
|
-
case 2:
|
|
1733
|
-
ret = _context8.sent;
|
|
1734
|
-
_ref21 = ret || {}, msg = _ref21.msg;
|
|
1735
|
-
|
|
1736
|
-
console.log('\u5237\u5361\u652F\u4ED8\u9000\u6B3E:' + msg);
|
|
1737
|
-
|
|
1738
|
-
case 5:
|
|
1739
|
-
case 'end':
|
|
1740
|
-
return _context8.stop();
|
|
1741
|
-
}
|
|
1742
|
-
}
|
|
1743
|
-
}, _callee8, _this13);
|
|
1744
|
-
})), 4500);
|
|
1745
|
-
}
|
|
1746
|
-
|
|
1747
|
-
case 3:
|
|
1748
|
-
case 'end':
|
|
1749
|
-
return _context9.stop();
|
|
1750
|
-
}
|
|
1751
|
-
}
|
|
1752
|
-
}, _callee9, this);
|
|
1753
|
-
}));
|
|
1754
|
-
|
|
1755
|
-
function thirdPayRefund(_x8) {
|
|
1756
|
-
return _ref19.apply(this, arguments);
|
|
1757
|
-
}
|
|
1758
|
-
|
|
1759
|
-
return thirdPayRefund;
|
|
1760
|
-
}()
|
|
1761
1389
|
}, {
|
|
1762
1390
|
key: 'setDtoID',
|
|
1763
1391
|
value: function setDtoID(id) {
|
|
@@ -1766,35 +1394,35 @@ var SettlementStore = (_class = function () {
|
|
|
1766
1394
|
}, {
|
|
1767
1395
|
key: 'querySettleResult',
|
|
1768
1396
|
value: function () {
|
|
1769
|
-
var
|
|
1770
|
-
return _regenerator2.default.wrap(function
|
|
1397
|
+
var _ref14 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee5() {
|
|
1398
|
+
return _regenerator2.default.wrap(function _callee5$(_context5) {
|
|
1771
1399
|
while (1) {
|
|
1772
|
-
switch (
|
|
1400
|
+
switch (_context5.prev = _context5.next) {
|
|
1773
1401
|
case 0:
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1402
|
+
_context5.prev = 0;
|
|
1403
|
+
_context5.t0 = _promise2.default;
|
|
1404
|
+
_context5.next = 4;
|
|
1777
1405
|
return (0, _tplusApi.tApi)({ RetailCode: this.dto.Code }, 'chanjet.RE.newRetail.QuerySettleResult', false, false, { timeout_skip: true });
|
|
1778
1406
|
|
|
1779
1407
|
case 4:
|
|
1780
|
-
|
|
1781
|
-
return
|
|
1408
|
+
_context5.t1 = _context5.sent;
|
|
1409
|
+
return _context5.abrupt('return', _context5.t0.resolve.call(_context5.t0, _context5.t1));
|
|
1782
1410
|
|
|
1783
1411
|
case 8:
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
return
|
|
1412
|
+
_context5.prev = 8;
|
|
1413
|
+
_context5.t2 = _context5['catch'](0);
|
|
1414
|
+
return _context5.abrupt('return', _promise2.default.resolve({ Flag: "1" }));
|
|
1787
1415
|
|
|
1788
1416
|
case 11:
|
|
1789
1417
|
case 'end':
|
|
1790
|
-
return
|
|
1418
|
+
return _context5.stop();
|
|
1791
1419
|
}
|
|
1792
1420
|
}
|
|
1793
|
-
},
|
|
1421
|
+
}, _callee5, this, [[0, 8]]);
|
|
1794
1422
|
}));
|
|
1795
1423
|
|
|
1796
1424
|
function querySettleResult() {
|
|
1797
|
-
return
|
|
1425
|
+
return _ref14.apply(this, arguments);
|
|
1798
1426
|
}
|
|
1799
1427
|
|
|
1800
1428
|
return querySettleResult;
|
|
@@ -1820,18 +1448,18 @@ var SettlementStore = (_class = function () {
|
|
|
1820
1448
|
}, {
|
|
1821
1449
|
key: 'validePwd',
|
|
1822
1450
|
value: function () {
|
|
1823
|
-
var
|
|
1824
|
-
var
|
|
1451
|
+
var _ref15 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee6(value) {
|
|
1452
|
+
var _ref16, isNewRetailBCPos, cook1, cook2, message, memberStorageId, _paymode$currentMode, cardTypeEnum, memberId, meStorageCardId, cardStatusEnum, result, count, _result;
|
|
1825
1453
|
|
|
1826
|
-
return _regenerator2.default.wrap(function
|
|
1454
|
+
return _regenerator2.default.wrap(function _callee6$(_context6) {
|
|
1827
1455
|
while (1) {
|
|
1828
|
-
switch (
|
|
1456
|
+
switch (_context6.prev = _context6.next) {
|
|
1829
1457
|
case 0:
|
|
1830
|
-
|
|
1831
|
-
|
|
1458
|
+
_ref16 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref16.isNewRetailBCPos;
|
|
1459
|
+
_context6.prev = 1;
|
|
1832
1460
|
|
|
1833
1461
|
if (!isNewRetailBCPos) {
|
|
1834
|
-
|
|
1462
|
+
_context6.next = 33;
|
|
1835
1463
|
break;
|
|
1836
1464
|
}
|
|
1837
1465
|
|
|
@@ -1841,60 +1469,60 @@ var SettlementStore = (_class = function () {
|
|
|
1841
1469
|
memberStorageId = this.paymode.currentMode.meStorageCardId;
|
|
1842
1470
|
|
|
1843
1471
|
if (!cook2) {
|
|
1844
|
-
|
|
1472
|
+
_context6.next = 12;
|
|
1845
1473
|
break;
|
|
1846
1474
|
}
|
|
1847
1475
|
|
|
1848
1476
|
if (!cook2.hasOwnProperty(memberStorageId + "")) {
|
|
1849
|
-
|
|
1477
|
+
_context6.next = 12;
|
|
1850
1478
|
break;
|
|
1851
1479
|
}
|
|
1852
1480
|
|
|
1853
1481
|
if (!(cook2[memberStorageId] > 3)) {
|
|
1854
|
-
|
|
1482
|
+
_context6.next = 12;
|
|
1855
1483
|
break;
|
|
1856
1484
|
}
|
|
1857
1485
|
|
|
1858
1486
|
message = '今日密码错误已达上限,不可使用储值消费,请明日再试,如忘记请重置密码或修改密码。';
|
|
1859
|
-
return
|
|
1487
|
+
return _context6.abrupt('return', _promise2.default.resolve(message));
|
|
1860
1488
|
|
|
1861
1489
|
case 12:
|
|
1862
1490
|
_paymode$currentMode = this.paymode.currentMode, cardTypeEnum = _paymode$currentMode.cardTypeEnum, memberId = _paymode$currentMode.memberId, meStorageCardId = _paymode$currentMode.meStorageCardId, cardStatusEnum = _paymode$currentMode.cardStatusEnum;
|
|
1863
1491
|
result = null;
|
|
1864
1492
|
|
|
1865
1493
|
if (!(cardTypeEnum === 'BALANCE_CARD')) {
|
|
1866
|
-
|
|
1494
|
+
_context6.next = 20;
|
|
1867
1495
|
break;
|
|
1868
1496
|
}
|
|
1869
1497
|
|
|
1870
|
-
|
|
1498
|
+
_context6.next = 17;
|
|
1871
1499
|
return (0, _tplusApi.ccApi)({ md5Password: _tplusApi.User.pwdEncrypt(value.pwd), cardType: cardTypeEnum }, '/member/MeMemberWallet/checkPaymentPassword/' + memberId, false, false);
|
|
1872
1500
|
|
|
1873
1501
|
case 17:
|
|
1874
|
-
result =
|
|
1875
|
-
|
|
1502
|
+
result = _context6.sent;
|
|
1503
|
+
_context6.next = 29;
|
|
1876
1504
|
break;
|
|
1877
1505
|
|
|
1878
1506
|
case 20:
|
|
1879
1507
|
if (!(cardStatusEnum === 'BINDING' && this.member && this.member.ID === memberId)) {
|
|
1880
|
-
|
|
1508
|
+
_context6.next = 26;
|
|
1881
1509
|
break;
|
|
1882
1510
|
}
|
|
1883
1511
|
|
|
1884
|
-
|
|
1512
|
+
_context6.next = 23;
|
|
1885
1513
|
return (0, _tplusApi.ccApi)({ md5Password: _tplusApi.User.pwdEncrypt(value.pwd), password: value.pwd, cardType: cardTypeEnum }, '/member/MeMemberWallet/checkPaymentPassword/' + meStorageCardId, false, false);
|
|
1886
1514
|
|
|
1887
1515
|
case 23:
|
|
1888
|
-
result =
|
|
1889
|
-
|
|
1516
|
+
result = _context6.sent;
|
|
1517
|
+
_context6.next = 29;
|
|
1890
1518
|
break;
|
|
1891
1519
|
|
|
1892
1520
|
case 26:
|
|
1893
|
-
|
|
1521
|
+
_context6.next = 28;
|
|
1894
1522
|
return (0, _tplusApi.ccApi)({ password: value.pwd, cardType: cardTypeEnum }, '/member/MeMemberWallet/checkPaymentPassword/' + meStorageCardId, false, false);
|
|
1895
1523
|
|
|
1896
1524
|
case 28:
|
|
1897
|
-
result =
|
|
1525
|
+
result = _context6.sent;
|
|
1898
1526
|
|
|
1899
1527
|
case 29:
|
|
1900
1528
|
if (!result.data) {
|
|
@@ -1913,38 +1541,38 @@ var SettlementStore = (_class = function () {
|
|
|
1913
1541
|
this.setCookie('errorPwd', '', -1);
|
|
1914
1542
|
this.setCookie('errorPwd', (0, _stringify2.default)(cook2));
|
|
1915
1543
|
}
|
|
1916
|
-
return
|
|
1544
|
+
return _context6.abrupt('return', _promise2.default.resolve(result.data ? "" : message));
|
|
1917
1545
|
|
|
1918
1546
|
case 33:
|
|
1919
|
-
|
|
1547
|
+
_context6.next = 35;
|
|
1920
1548
|
return (0, _tplusApi.tApi)({ "CheckoutParams": {
|
|
1921
1549
|
"Idmember": value.id,
|
|
1922
1550
|
"Password": value.pwd
|
|
1923
1551
|
} }, 'AA.DR.newRetailMember.CheckoutMemberPassword', false, false);
|
|
1924
1552
|
|
|
1925
1553
|
case 35:
|
|
1926
|
-
_result =
|
|
1927
|
-
return
|
|
1554
|
+
_result = _context6.sent;
|
|
1555
|
+
return _context6.abrupt('return', _promise2.default.resolve(_result.Success ? "" : _result.Message));
|
|
1928
1556
|
|
|
1929
1557
|
case 37:
|
|
1930
|
-
|
|
1558
|
+
_context6.next = 42;
|
|
1931
1559
|
break;
|
|
1932
1560
|
|
|
1933
1561
|
case 39:
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
return
|
|
1562
|
+
_context6.prev = 39;
|
|
1563
|
+
_context6.t0 = _context6['catch'](1);
|
|
1564
|
+
return _context6.abrupt('return', "failed");
|
|
1937
1565
|
|
|
1938
1566
|
case 42:
|
|
1939
1567
|
case 'end':
|
|
1940
|
-
return
|
|
1568
|
+
return _context6.stop();
|
|
1941
1569
|
}
|
|
1942
1570
|
}
|
|
1943
|
-
},
|
|
1571
|
+
}, _callee6, this, [[1, 39]]);
|
|
1944
1572
|
}));
|
|
1945
1573
|
|
|
1946
|
-
function validePwd(
|
|
1947
|
-
return
|
|
1574
|
+
function validePwd(_x4) {
|
|
1575
|
+
return _ref15.apply(this, arguments);
|
|
1948
1576
|
}
|
|
1949
1577
|
|
|
1950
1578
|
return validePwd;
|
|
@@ -1954,7 +1582,7 @@ var SettlementStore = (_class = function () {
|
|
|
1954
1582
|
}(), (_descriptor = _applyDecoratedDescriptor(_class.prototype, 'queryPwd', [_mobx.action], {
|
|
1955
1583
|
enumerable: true,
|
|
1956
1584
|
initializer: function initializer() {
|
|
1957
|
-
var
|
|
1585
|
+
var _this12 = this;
|
|
1958
1586
|
|
|
1959
1587
|
return function (newPass, newPassConfirm) {
|
|
1960
1588
|
if (!newPass || !newPassConfirm) {
|
|
@@ -1966,7 +1594,7 @@ var SettlementStore = (_class = function () {
|
|
|
1966
1594
|
var idstore = (0, _tplusPoslogin.PosInitData)('storeID');
|
|
1967
1595
|
return (0, _tplusApi.ccApi)({
|
|
1968
1596
|
Idstore: idstore,
|
|
1969
|
-
meMemberId:
|
|
1597
|
+
meMemberId: _this12.paymode.currentMode.memberId,
|
|
1970
1598
|
oldPassword: null,
|
|
1971
1599
|
newPassword: _tplusApi.User.pwdEncrypt(newPassConfirm),
|
|
1972
1600
|
dataSource: "POS"
|
|
@@ -1980,131 +1608,131 @@ var SettlementStore = (_class = function () {
|
|
|
1980
1608
|
}), _applyDecoratedDescriptor(_class.prototype, 'initByOriginReturn', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'initByOriginReturn'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'quickSettle', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'quickSettle'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'changeFocusAndAddPay', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'changeFocusAndAddPay'), _class.prototype), _descriptor2 = _applyDecoratedDescriptor(_class.prototype, 'updateMemberInfo', [_mobx.action], {
|
|
1981
1609
|
enumerable: true,
|
|
1982
1610
|
initializer: function initializer() {
|
|
1983
|
-
var
|
|
1611
|
+
var _this13 = this;
|
|
1984
1612
|
|
|
1985
1613
|
return function () {
|
|
1986
|
-
var
|
|
1614
|
+
var _ref17 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee7(_this) {
|
|
1987
1615
|
var _getLoginInfo, IdStore, StoreCode, resp;
|
|
1988
1616
|
|
|
1989
|
-
return _regenerator2.default.wrap(function
|
|
1617
|
+
return _regenerator2.default.wrap(function _callee7$(_context7) {
|
|
1990
1618
|
while (1) {
|
|
1991
|
-
switch (
|
|
1619
|
+
switch (_context7.prev = _context7.next) {
|
|
1992
1620
|
case 0:
|
|
1993
|
-
_getLoginInfo =
|
|
1994
|
-
|
|
1995
|
-
return (0, _tplusApi.tApi)({ Idmember:
|
|
1621
|
+
_getLoginInfo = _this13.getLoginInfo(), IdStore = _getLoginInfo.IdStore, StoreCode = _getLoginInfo.StoreCode;
|
|
1622
|
+
_context7.next = 3;
|
|
1623
|
+
return (0, _tplusApi.tApi)({ Idmember: _this13.member.ID, IdStore: IdStore, StoreCode: StoreCode }, 'chanjet.AA.DR.INewRetailMember.GetUmemberDTO', false, false);
|
|
1996
1624
|
|
|
1997
1625
|
case 3:
|
|
1998
|
-
resp =
|
|
1626
|
+
resp = _context7.sent;
|
|
1999
1627
|
|
|
2000
1628
|
_this.member = resp;
|
|
2001
1629
|
_this.paymode.updateMemberStorageCardNo(resp.StorageCardNo, resp.WalletEnabled);
|
|
2002
|
-
return
|
|
1630
|
+
return _context7.abrupt('return', _promise2.default.resolve(resp));
|
|
2003
1631
|
|
|
2004
1632
|
case 7:
|
|
2005
1633
|
case 'end':
|
|
2006
|
-
return
|
|
1634
|
+
return _context7.stop();
|
|
2007
1635
|
}
|
|
2008
1636
|
}
|
|
2009
|
-
},
|
|
1637
|
+
}, _callee7, _this13);
|
|
2010
1638
|
}));
|
|
2011
1639
|
|
|
2012
|
-
return function (
|
|
2013
|
-
return
|
|
1640
|
+
return function (_x5) {
|
|
1641
|
+
return _ref17.apply(this, arguments);
|
|
2014
1642
|
};
|
|
2015
1643
|
}();
|
|
2016
1644
|
}
|
|
2017
1645
|
}), _descriptor3 = _applyDecoratedDescriptor(_class.prototype, 'updateCurrentMode', [_mobx.action], {
|
|
2018
1646
|
enumerable: true,
|
|
2019
1647
|
initializer: function initializer() {
|
|
2020
|
-
var
|
|
1648
|
+
var _this14 = this;
|
|
2021
1649
|
|
|
2022
1650
|
return function () {
|
|
2023
|
-
var
|
|
1651
|
+
var _ref18 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee8(memberId) {
|
|
2024
1652
|
var result;
|
|
2025
|
-
return _regenerator2.default.wrap(function
|
|
1653
|
+
return _regenerator2.default.wrap(function _callee8$(_context8) {
|
|
2026
1654
|
while (1) {
|
|
2027
|
-
switch (
|
|
1655
|
+
switch (_context8.prev = _context8.next) {
|
|
2028
1656
|
case 0:
|
|
2029
|
-
|
|
1657
|
+
_context8.next = 2;
|
|
2030
1658
|
return (0, _tplusApi.ccApi)({}, '/marketingtool/MeStorageCard/getCardInfoByMemberId/' + memberId + '/' + true, false, false, { method: 'get' });
|
|
2031
1659
|
|
|
2032
1660
|
case 2:
|
|
2033
|
-
result =
|
|
1661
|
+
result = _context8.sent;
|
|
2034
1662
|
|
|
2035
1663
|
if (!(result && result.data.length)) {
|
|
2036
|
-
|
|
1664
|
+
_context8.next = 20;
|
|
2037
1665
|
break;
|
|
2038
1666
|
}
|
|
2039
1667
|
|
|
2040
1668
|
if (!(result.data.length === 1)) {
|
|
2041
|
-
|
|
1669
|
+
_context8.next = 9;
|
|
2042
1670
|
break;
|
|
2043
1671
|
}
|
|
2044
1672
|
|
|
2045
|
-
|
|
2046
|
-
return
|
|
1673
|
+
_this14.paymode.updateCardInfo(result.data[0]);
|
|
1674
|
+
return _context8.abrupt('return', result.data);
|
|
2047
1675
|
|
|
2048
1676
|
case 9:
|
|
2049
1677
|
if (!(result.data && result.data.length === 1)) {
|
|
2050
|
-
|
|
1678
|
+
_context8.next = 14;
|
|
2051
1679
|
break;
|
|
2052
1680
|
}
|
|
2053
1681
|
|
|
2054
|
-
|
|
2055
|
-
return
|
|
1682
|
+
_this14.paymode.updateCardInfo(result.data[0]);
|
|
1683
|
+
return _context8.abrupt('return', result.data);
|
|
2056
1684
|
|
|
2057
1685
|
case 14:
|
|
2058
1686
|
if (!(result.data && result.data.length > 1)) {
|
|
2059
|
-
|
|
1687
|
+
_context8.next = 18;
|
|
2060
1688
|
break;
|
|
2061
1689
|
}
|
|
2062
1690
|
|
|
2063
|
-
return
|
|
1691
|
+
return _context8.abrupt('return', result.data);
|
|
2064
1692
|
|
|
2065
1693
|
case 18:
|
|
2066
1694
|
_message2.default.warn('没有可用储值卡!');
|
|
2067
|
-
return
|
|
1695
|
+
return _context8.abrupt('return', false);
|
|
2068
1696
|
|
|
2069
1697
|
case 20:
|
|
2070
1698
|
case 'end':
|
|
2071
|
-
return
|
|
1699
|
+
return _context8.stop();
|
|
2072
1700
|
}
|
|
2073
1701
|
}
|
|
2074
|
-
},
|
|
1702
|
+
}, _callee8, _this14);
|
|
2075
1703
|
}));
|
|
2076
1704
|
|
|
2077
|
-
return function (
|
|
2078
|
-
return
|
|
1705
|
+
return function (_x6) {
|
|
1706
|
+
return _ref18.apply(this, arguments);
|
|
2079
1707
|
};
|
|
2080
1708
|
}();
|
|
2081
1709
|
}
|
|
2082
1710
|
}), _descriptor4 = _applyDecoratedDescriptor(_class.prototype, 'updateCardInfo', [_mobx.action], {
|
|
2083
1711
|
enumerable: true,
|
|
2084
1712
|
initializer: function initializer() {
|
|
2085
|
-
var
|
|
1713
|
+
var _this15 = this;
|
|
2086
1714
|
|
|
2087
|
-
return (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function
|
|
1715
|
+
return (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee9() {
|
|
2088
1716
|
var address, result;
|
|
2089
|
-
return _regenerator2.default.wrap(function
|
|
1717
|
+
return _regenerator2.default.wrap(function _callee9$(_context9) {
|
|
2090
1718
|
while (1) {
|
|
2091
|
-
switch (
|
|
1719
|
+
switch (_context9.prev = _context9.next) {
|
|
2092
1720
|
case 0:
|
|
2093
|
-
address = '/marketingtool/MeStorageCard/getCardInfoByCardNo/' +
|
|
2094
|
-
|
|
1721
|
+
address = '/marketingtool/MeStorageCard/getCardInfoByCardNo/' + _this15.paymode.currentMode.storageCardNo;
|
|
1722
|
+
_context9.next = 3;
|
|
2095
1723
|
return (0, _tplusApi.ccApi)({}, address, false, false, { method: 'get', timeout_skip: true });
|
|
2096
1724
|
|
|
2097
1725
|
case 3:
|
|
2098
|
-
result =
|
|
1726
|
+
result = _context9.sent;
|
|
2099
1727
|
|
|
2100
|
-
|
|
1728
|
+
_this15.paymode.updateCardInfo(result.data);
|
|
2101
1729
|
|
|
2102
1730
|
case 5:
|
|
2103
1731
|
case 'end':
|
|
2104
|
-
return
|
|
1732
|
+
return _context9.stop();
|
|
2105
1733
|
}
|
|
2106
1734
|
}
|
|
2107
|
-
},
|
|
1735
|
+
}, _callee9, _this15);
|
|
2108
1736
|
}));
|
|
2109
1737
|
}
|
|
2110
1738
|
}), _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);
|
|
@@ -2205,7 +1833,7 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
2205
1833
|
}, {
|
|
2206
1834
|
key: 'calcDjqCheckValue',
|
|
2207
1835
|
value: function calcDjqCheckValue(q1, dto, params) {
|
|
2208
|
-
var
|
|
1836
|
+
var _this16 = this;
|
|
2209
1837
|
|
|
2210
1838
|
var useLimitPerOrder = (0, _tplusPoslogin.PosInitData)('UseLimitPerOrder');
|
|
2211
1839
|
var qList = (0, _filter3.default)(this.currentMode.djqs, function (djq) {
|
|
@@ -2219,12 +1847,12 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
2219
1847
|
this.checkList = [];
|
|
2220
1848
|
}
|
|
2221
1849
|
|
|
2222
|
-
var
|
|
2223
|
-
isNewRetailBCPos =
|
|
1850
|
+
var _ref20 = _mutantsUtil.platform || {},
|
|
1851
|
+
isNewRetailBCPos = _ref20.isNewRetailBCPos;
|
|
2224
1852
|
|
|
2225
|
-
var _enumController$
|
|
2226
|
-
PayStyle = _enumController$
|
|
2227
|
-
Differentiate = _enumController$
|
|
1853
|
+
var _enumController$getEn16 = _mutantsUtil.enumController.getEnumOj(),
|
|
1854
|
+
PayStyle = _enumController$getEn16.PayStyle,
|
|
1855
|
+
Differentiate = _enumController$getEn16.Differentiate;
|
|
2228
1856
|
|
|
2229
1857
|
if (q1) {
|
|
2230
1858
|
if (!this.currentMode.boriginReturn && parseFloat(this.currentMode.maxamount) <= 0) {
|
|
@@ -2252,7 +1880,7 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
2252
1880
|
if (!q1.checked) {
|
|
2253
1881
|
this.checkList.forEach(function (ele, i) {
|
|
2254
1882
|
if (ele.id === q1.id) {
|
|
2255
|
-
|
|
1883
|
+
_this16.checkList.splice(i, 1);
|
|
2256
1884
|
}
|
|
2257
1885
|
});
|
|
2258
1886
|
} else {
|
|
@@ -2324,24 +1952,24 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
2324
1952
|
if (result && result.length != 0) {
|
|
2325
1953
|
result.forEach(function (element, index) {
|
|
2326
1954
|
var djq1 = false;
|
|
2327
|
-
|
|
1955
|
+
_this16.currentMode.djqs.forEach(function (djq) {
|
|
2328
1956
|
if (element.id === djq.id) {
|
|
2329
1957
|
djq1 = true;
|
|
2330
1958
|
}
|
|
2331
1959
|
});
|
|
2332
1960
|
|
|
2333
|
-
var
|
|
2334
|
-
couponCode =
|
|
2335
|
-
name =
|
|
2336
|
-
tieredAmountResult =
|
|
2337
|
-
fromDate =
|
|
2338
|
-
dateMount =
|
|
2339
|
-
promoMethodEnum =
|
|
2340
|
-
discountPct =
|
|
2341
|
-
nominalAmount =
|
|
2342
|
-
promoId =
|
|
2343
|
-
id =
|
|
2344
|
-
doorsill =
|
|
1961
|
+
var _ref21 = element || {},
|
|
1962
|
+
couponCode = _ref21.couponCode,
|
|
1963
|
+
name = _ref21.name,
|
|
1964
|
+
tieredAmountResult = _ref21.tieredAmountResult,
|
|
1965
|
+
fromDate = _ref21.fromDate,
|
|
1966
|
+
dateMount = _ref21.dateMount,
|
|
1967
|
+
promoMethodEnum = _ref21.promoMethodEnum,
|
|
1968
|
+
discountPct = _ref21.discountPct,
|
|
1969
|
+
nominalAmount = _ref21.nominalAmount,
|
|
1970
|
+
promoId = _ref21.promoId,
|
|
1971
|
+
id = _ref21.id,
|
|
1972
|
+
doorsill = _ref21.doorsill;
|
|
2345
1973
|
|
|
2346
1974
|
var condValue = tieredAmountResult.condValue,
|
|
2347
1975
|
promoDiscount = tieredAmountResult.promoDiscount,
|
|
@@ -2369,10 +1997,10 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
2369
1997
|
// couponCategoryEnum: tieredAmountResult.couponCategoryEnum,
|
|
2370
1998
|
// id
|
|
2371
1999
|
// })
|
|
2372
|
-
|
|
2000
|
+
_this16.addDjqs(couponCode, name, true, nominalAmount, doorsill, element.LastTS, false, true, dto.Idmember, dateMount, displayText, promoMethodEnum, discountPct, promoId, promoRuleId, tieredAmountResult.couponCategoryEnum, id);
|
|
2373
2001
|
djq1 = false;
|
|
2374
2002
|
} else {
|
|
2375
|
-
|
|
2003
|
+
_this16.setCouponNum(element.id, tieredAmountResult.couponCategoryEnum, promoMethodEnum, nominalAmount, promoDiscount);
|
|
2376
2004
|
// this.currentMode.djqs[0].couponCategoryEnum = 'couponCategoryEnum';
|
|
2377
2005
|
// djq1.couponCategoryEnum = element.tieredAmountResult.couponCategoryEnum
|
|
2378
2006
|
}
|
|
@@ -2385,11 +2013,11 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
2385
2013
|
}, {
|
|
2386
2014
|
key: 'calcDjqValue',
|
|
2387
2015
|
value: function calcDjqValue(q1) {
|
|
2388
|
-
var
|
|
2389
|
-
isNewRetailBCPos =
|
|
2016
|
+
var _ref22 = _mutantsUtil.platform || {},
|
|
2017
|
+
isNewRetailBCPos = _ref22.isNewRetailBCPos;
|
|
2390
2018
|
|
|
2391
|
-
var _enumController$
|
|
2392
|
-
Differentiate = _enumController$
|
|
2019
|
+
var _enumController$getEn17 = _mutantsUtil.enumController.getEnumOj(),
|
|
2020
|
+
Differentiate = _enumController$getEn17.Differentiate;
|
|
2393
2021
|
|
|
2394
2022
|
if (q1) {
|
|
2395
2023
|
if (!this.currentMode.boriginReturn && parseFloat(this.currentMode.maxamount) <= 0) {
|
|
@@ -2451,8 +2079,8 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
2451
2079
|
this.currentMode.errinfo = '';
|
|
2452
2080
|
var sum = this.amount;
|
|
2453
2081
|
|
|
2454
|
-
var _enumController$
|
|
2455
|
-
PayStyle = _enumController$
|
|
2082
|
+
var _enumController$getEn18 = _mutantsUtil.enumController.getEnumOj(),
|
|
2083
|
+
PayStyle = _enumController$getEn18.PayStyle;
|
|
2456
2084
|
|
|
2457
2085
|
this.thePaymodes && this.thePaymodes.forEach(function (mode) {
|
|
2458
2086
|
if (mode.paymentType === PayStyle.hyczk) {
|
|
@@ -2476,33 +2104,30 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
2476
2104
|
}, {
|
|
2477
2105
|
key: 'setPaymodes',
|
|
2478
2106
|
value: function () {
|
|
2479
|
-
var
|
|
2480
|
-
var
|
|
2107
|
+
var _ref23 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee10(type, isIntegralExchange) {
|
|
2108
|
+
var _this17 = this;
|
|
2481
2109
|
|
|
2482
|
-
var
|
|
2110
|
+
var _enumController$getEn19, settleStyleType, PayStyle, memberStoreCode, settlementCode, param, modes;
|
|
2483
2111
|
|
|
2484
|
-
return _regenerator2.default.wrap(function
|
|
2112
|
+
return _regenerator2.default.wrap(function _callee10$(_context10) {
|
|
2485
2113
|
while (1) {
|
|
2486
|
-
switch (
|
|
2114
|
+
switch (_context10.prev = _context10.next) {
|
|
2487
2115
|
case 0:
|
|
2488
|
-
|
|
2489
|
-
_enumController$getEn21 = _mutantsUtil.enumController.getEnumOj(), settleStyleType = _enumController$getEn21.settleStyleType, PayStyle = _enumController$getEn21.PayStyle;
|
|
2116
|
+
_enumController$getEn19 = _mutantsUtil.enumController.getEnumOj(), settleStyleType = _enumController$getEn19.settleStyleType, PayStyle = _enumController$getEn19.PayStyle;
|
|
2490
2117
|
memberStoreCode = settleStyleType.memberStoreCode, settlementCode = settleStyleType.settlementCode;
|
|
2491
2118
|
param = { 'settleStyleType': type == 1 ? memberStoreCode : settlementCode, isIntegralExchange: isIntegralExchange };
|
|
2492
|
-
|
|
2119
|
+
_context10.next = 5;
|
|
2493
2120
|
return (0, _tplusApi.tApi)({ param: param }, 'chanjet.RE.NewPos.GetNewStoreSettleStyles', false, false);
|
|
2494
2121
|
|
|
2495
|
-
case
|
|
2496
|
-
modes =
|
|
2122
|
+
case 5:
|
|
2123
|
+
modes = _context10.sent;
|
|
2497
2124
|
|
|
2498
|
-
modes = !(!!isHorizontalPad || !!isHorizontalSunMi) ? modes : modes.filter(function (v) {
|
|
2499
|
-
return !!v.ThirdPaymentInfo;
|
|
2500
|
-
});
|
|
2501
2125
|
if (modes) {
|
|
2502
2126
|
(0, _mobx.runInAction)(function () {
|
|
2503
2127
|
var paymodes = [];
|
|
2504
2128
|
(0, _each3.default)(modes.SettleStyles, function (mode, index) {
|
|
2505
2129
|
//产品需求确认会员储值卡结算方式前端展示统一调整为“储值卡" tuzha by 2020-07-08
|
|
2130
|
+
|
|
2506
2131
|
if (mode.Code == PayStyle.hyczk) {
|
|
2507
2132
|
mode.Name = '储值卡';
|
|
2508
2133
|
}
|
|
@@ -2517,24 +2142,24 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
2517
2142
|
idBankAccount: mode.IdBankAccount,
|
|
2518
2143
|
exchangeRate: mode.Currency ? mode.Currency.ExchangeRate : 1,
|
|
2519
2144
|
idCurrency: mode.Currency ? mode.Currency.ID : -1,
|
|
2520
|
-
calDirection: mode.Currency ? mode.Currency.CalDirection.Id : "88"
|
|
2521
|
-
thridPayment: mode.ThirdPaymentInfo
|
|
2145
|
+
calDirection: mode.Currency ? mode.Currency.CalDirection.Id : "88"
|
|
2522
2146
|
});
|
|
2523
2147
|
});
|
|
2524
|
-
|
|
2148
|
+
_this17.paymodes = paymodes;
|
|
2149
|
+
//modes.QuickSettleStyles
|
|
2525
2150
|
});
|
|
2526
2151
|
}
|
|
2527
2152
|
|
|
2528
|
-
case
|
|
2153
|
+
case 7:
|
|
2529
2154
|
case 'end':
|
|
2530
|
-
return
|
|
2155
|
+
return _context10.stop();
|
|
2531
2156
|
}
|
|
2532
2157
|
}
|
|
2533
|
-
},
|
|
2158
|
+
}, _callee10, this);
|
|
2534
2159
|
}));
|
|
2535
2160
|
|
|
2536
|
-
function setPaymodes(
|
|
2537
|
-
return
|
|
2161
|
+
function setPaymodes(_x7, _x8) {
|
|
2162
|
+
return _ref23.apply(this, arguments);
|
|
2538
2163
|
}
|
|
2539
2164
|
|
|
2540
2165
|
return setPaymodes;
|
|
@@ -2589,22 +2214,21 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
2589
2214
|
}), _applyDecoratedDescriptor(_class3.prototype, 'clean', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class3.prototype, 'clean'), _class3.prototype), _applyDecoratedDescriptor(_class3.prototype, 'clear', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class3.prototype, 'clear'), _class3.prototype), _applyDecoratedDescriptor(_class3.prototype, 'calcReserved', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class3.prototype, 'calcReserved'), _class3.prototype), _descriptor12 = _applyDecoratedDescriptor(_class3.prototype, 'calcCheckList', [_mobx.action], {
|
|
2590
2215
|
enumerable: true,
|
|
2591
2216
|
initializer: function initializer() {
|
|
2592
|
-
var
|
|
2217
|
+
var _this18 = this;
|
|
2593
2218
|
|
|
2594
2219
|
return function () {
|
|
2595
|
-
|
|
2220
|
+
_this18.checkList = [];
|
|
2596
2221
|
};
|
|
2597
2222
|
}
|
|
2598
2223
|
}), _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], {
|
|
2599
2224
|
enumerable: true,
|
|
2600
2225
|
initializer: function initializer() {
|
|
2601
|
-
var
|
|
2226
|
+
var _this19 = this;
|
|
2602
2227
|
|
|
2603
2228
|
return function (id, couponNum, promoMethodEnum, nominalAmount, promoDiscount) {
|
|
2604
|
-
|
|
2229
|
+
_this19.currentMode.djqs.forEach(function (ele) {
|
|
2605
2230
|
if (ele.id === id) {
|
|
2606
|
-
ele.amount = promoDiscount;
|
|
2607
|
-
promoMethodEnum == "CASH_COUPON" && (ele.nominalAmount = nominalAmount);
|
|
2231
|
+
promoMethodEnum == "CASH_COUPON" ? ele.amount = nominalAmount : ele.amount = promoDiscount;
|
|
2608
2232
|
ele.couponCategoryEnum = couponNum;
|
|
2609
2233
|
var IsEnable = ele.couponCategoryEnum === 'RIGUP' || ele.couponCategoryEnum === 'UN_MATCH' || ele.couponCategoryEnum === "PREPARING" || ele.couponCategoryEnum === 'PROMO_LIMITED' || ele.couponCategoryEnum === 'COUPON_CONFLICT' ? false : true;
|
|
2610
2234
|
ele.IsEnable = IsEnable;
|
|
@@ -2615,14 +2239,13 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
2615
2239
|
}), _descriptor14 = _applyDecoratedDescriptor(_class3.prototype, 'addDjqs', [_mobx.action], {
|
|
2616
2240
|
enumerable: true,
|
|
2617
2241
|
initializer: function initializer() {
|
|
2618
|
-
var
|
|
2242
|
+
var _this20 = this;
|
|
2619
2243
|
|
|
2620
|
-
return function (promoCouponCode, name, IsEnable,
|
|
2244
|
+
return function (promoCouponCode, name, IsEnable, amount, doorsill, LastTS, checked, IsRepelWithPoints, UMemberID, expired, displayText, promoMethodEnum, discountPct, promoId, promoRuleId, couponCategoryEnum, id) {
|
|
2621
2245
|
var djq = {
|
|
2622
2246
|
promoCouponCode: promoCouponCode,
|
|
2623
2247
|
name: name,
|
|
2624
2248
|
IsEnable: IsEnable,
|
|
2625
|
-
nominalAmount: nominalAmount,
|
|
2626
2249
|
amount: amount,
|
|
2627
2250
|
doorsill: doorsill,
|
|
2628
2251
|
LastTS: LastTS,
|
|
@@ -2638,13 +2261,13 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
2638
2261
|
couponCategoryEnum: couponCategoryEnum,
|
|
2639
2262
|
id: id
|
|
2640
2263
|
};
|
|
2641
|
-
|
|
2264
|
+
_this20.currentMode.djqs.push(djq);
|
|
2642
2265
|
};
|
|
2643
2266
|
}
|
|
2644
2267
|
}), _applyDecoratedDescriptor(_class3.prototype, 'calcDjqValue', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class3.prototype, 'calcDjqValue'), _class3.prototype), _applyDecoratedDescriptor(_class3.prototype, 'reCalculationDjqs', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class3.prototype, 'reCalculationDjqs'), _class3.prototype), _applyDecoratedDescriptor(_class3.prototype, 'clearDjqs', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class3.prototype, 'clearDjqs'), _class3.prototype), _applyDecoratedDescriptor(_class3.prototype, 'setCurrentModeValue', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class3.prototype, 'setCurrentModeValue'), _class3.prototype), _applyDecoratedDescriptor(_class3.prototype, 'calcMemberBalance', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class3.prototype, 'calcMemberBalance'), _class3.prototype)), _class3);
|
|
2645
2268
|
var Member = exports.Member = (_class5 = function () {
|
|
2646
2269
|
function Member(m) {
|
|
2647
|
-
var
|
|
2270
|
+
var _this21 = this;
|
|
2648
2271
|
|
|
2649
2272
|
(0, _classCallCheck3.default)(this, Member);
|
|
2650
2273
|
|
|
@@ -2667,15 +2290,15 @@ var Member = exports.Member = (_class5 = function () {
|
|
|
2667
2290
|
return key == 'canusedbalancestorage';
|
|
2668
2291
|
});
|
|
2669
2292
|
|
|
2670
|
-
var
|
|
2671
|
-
isNewRetailBCPos =
|
|
2293
|
+
var _ref24 = _mutantsUtil.platform || {},
|
|
2294
|
+
isNewRetailBCPos = _ref24.isNewRetailBCPos;
|
|
2672
2295
|
|
|
2673
2296
|
(0, _mobx.runInAction)(function () {
|
|
2674
|
-
|
|
2297
|
+
_this21.cardNo = m.CardCode;
|
|
2675
2298
|
if (index >= 0) {
|
|
2676
|
-
|
|
2299
|
+
_this21.balance = parseFloat(m.DynamicPropertyValues[index]);
|
|
2677
2300
|
} else {
|
|
2678
|
-
|
|
2301
|
+
_this21.balance = _this21.rawbalance;
|
|
2679
2302
|
}
|
|
2680
2303
|
});
|
|
2681
2304
|
this.needPwd = m.MemberType ? m.MemberType.IsNeedPwd : false;
|