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