tplus-components-touch 3.27.38 → 3.27.39
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 +22 -29
- package/dist/components/settlement/settlement.js.map +1 -1
- package/dist/components/settlement/settlement.less +25 -4
- package/dist/components/settlement/settlementStore.js +739 -371
- package/dist/components/settlement/settlementStore.js.map +1 -1
- package/package.json +1 -1
|
@@ -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) {
|
|
@@ -352,14 +347,14 @@ var SettlementStore = (_class = function () {
|
|
|
352
347
|
};
|
|
353
348
|
|
|
354
349
|
this.checkCoupon = function () {
|
|
355
|
-
var
|
|
356
|
-
var
|
|
350
|
+
var _ref2 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee(sn) {
|
|
351
|
+
var _ref3, isNewRetailBCPos, _enumController$getEn3, PayStyle, Differentiate;
|
|
357
352
|
|
|
358
353
|
return _regenerator2.default.wrap(function _callee$(_context) {
|
|
359
354
|
while (1) {
|
|
360
355
|
switch (_context.prev = _context.next) {
|
|
361
356
|
case 0:
|
|
362
|
-
|
|
357
|
+
_ref3 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref3.isNewRetailBCPos;
|
|
363
358
|
|
|
364
359
|
if (!isNewRetailBCPos) {
|
|
365
360
|
_context.next = 7;
|
|
@@ -427,10 +422,56 @@ var SettlementStore = (_class = function () {
|
|
|
427
422
|
}));
|
|
428
423
|
|
|
429
424
|
return function (_x) {
|
|
430
|
-
return
|
|
425
|
+
return _ref2.apply(this, arguments);
|
|
431
426
|
};
|
|
432
427
|
}();
|
|
433
428
|
|
|
429
|
+
this.repeatStorageModal = function (content) {
|
|
430
|
+
return new _promise2.default(function (resolve, reject) {
|
|
431
|
+
_tplusComponentsTouch.ModalWraper.confirm({
|
|
432
|
+
title: '',
|
|
433
|
+
okText: '继续储值',
|
|
434
|
+
className: 'repeat-modal',
|
|
435
|
+
zIndex: 1007,
|
|
436
|
+
content: content,
|
|
437
|
+
onOk: function () {
|
|
438
|
+
var _ref4 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2() {
|
|
439
|
+
var ret;
|
|
440
|
+
return _regenerator2.default.wrap(function _callee2$(_context2) {
|
|
441
|
+
while (1) {
|
|
442
|
+
switch (_context2.prev = _context2.next) {
|
|
443
|
+
case 0:
|
|
444
|
+
_context2.next = 2;
|
|
445
|
+
return _this2.saveMember();
|
|
446
|
+
|
|
447
|
+
case 2:
|
|
448
|
+
ret = _context2.sent;
|
|
449
|
+
|
|
450
|
+
if (ret === false) {
|
|
451
|
+
resolve(false);
|
|
452
|
+
} else {
|
|
453
|
+
resolve(true);
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
case 4:
|
|
457
|
+
case 'end':
|
|
458
|
+
return _context2.stop();
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
}, _callee2, _this2);
|
|
462
|
+
}));
|
|
463
|
+
|
|
464
|
+
return function onOk() {
|
|
465
|
+
return _ref4.apply(this, arguments);
|
|
466
|
+
};
|
|
467
|
+
}(),
|
|
468
|
+
onCancel: function onCancel() {
|
|
469
|
+
resolve(false);
|
|
470
|
+
}
|
|
471
|
+
});
|
|
472
|
+
});
|
|
473
|
+
};
|
|
474
|
+
|
|
434
475
|
this.checkIntegralExchangeReturn = function (id) {
|
|
435
476
|
return new _promise2.default(function (resolve, reject) {
|
|
436
477
|
(0, _tplusApi.tApi)({ param: { refVoucherId: id } }, 'chanjet.RE.NewPos.GetNewIntegralExchange', false, false, { timeout_skip: true }).then(function (resp) {
|
|
@@ -604,7 +645,8 @@ var SettlementStore = (_class = function () {
|
|
|
604
645
|
authCode: detail.PaymentCode,
|
|
605
646
|
steadCashIntegral: detail.SteadCashIntegral,
|
|
606
647
|
overchargesAmount: detail.OverchargesAmount,
|
|
607
|
-
boriginReturn: true
|
|
648
|
+
boriginReturn: true,
|
|
649
|
+
thirdPaymentReturnInfo: detail.ThirdPaymentReturnInfo
|
|
608
650
|
});
|
|
609
651
|
_this5.paymode.currentMode = newmode;
|
|
610
652
|
if (themode.paymentType == PayStyle.djq) {
|
|
@@ -619,10 +661,10 @@ var SettlementStore = (_class = function () {
|
|
|
619
661
|
promoId = _ref7.promoId,
|
|
620
662
|
id = _ref7.id;
|
|
621
663
|
|
|
622
|
-
_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);
|
|
664
|
+
_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);
|
|
623
665
|
return;
|
|
624
666
|
}
|
|
625
|
-
_this5.addDjq(djq.CouponCode, djq.CouponTitle, true, djq.ReductionAmount, djq.EnableAmount, djq.LastTS, true, false);
|
|
667
|
+
_this5.addDjq(djq.CouponCode, djq.CouponTitle, true, null, djq.ReductionAmount, djq.EnableAmount, djq.LastTS, true, false);
|
|
626
668
|
});
|
|
627
669
|
}
|
|
628
670
|
_this5.paymode.thePaymodes.push(newmode);
|
|
@@ -733,36 +775,36 @@ var SettlementStore = (_class = function () {
|
|
|
733
775
|
// address = '/member/memberProfile/FindByStorageCode/'+v;
|
|
734
776
|
address = '/marketingtool/MeStorageCard/getCardInfoByCardNo/' + v + '/' + true;
|
|
735
777
|
return (0, _tplusApi.ccApi)({ code: v }, address, false, false, { method: 'get', timeout_skip: true }).then(function () {
|
|
736
|
-
var _ref9 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function
|
|
778
|
+
var _ref9 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee3(result) {
|
|
737
779
|
var data, m;
|
|
738
|
-
return _regenerator2.default.wrap(function
|
|
780
|
+
return _regenerator2.default.wrap(function _callee3$(_context3) {
|
|
739
781
|
while (1) {
|
|
740
|
-
switch (
|
|
782
|
+
switch (_context3.prev = _context3.next) {
|
|
741
783
|
case 0:
|
|
742
784
|
data = result.data;
|
|
743
785
|
m = data && data.length && data[0];
|
|
744
786
|
|
|
745
787
|
if (!(result && result.data.length)) {
|
|
746
|
-
|
|
788
|
+
_context3.next = 25;
|
|
747
789
|
break;
|
|
748
790
|
}
|
|
749
791
|
|
|
750
792
|
if (!(result.data.length === 1)) {
|
|
751
|
-
|
|
793
|
+
_context3.next = 14;
|
|
752
794
|
break;
|
|
753
795
|
}
|
|
754
796
|
|
|
755
797
|
if (!(m.CardTypeEnum === 'BALANCE_CARD')) {
|
|
756
|
-
|
|
798
|
+
_context3.next = 10;
|
|
757
799
|
break;
|
|
758
800
|
}
|
|
759
801
|
|
|
760
802
|
_this7.paymode.updateCardInfo(m);
|
|
761
803
|
_this7.handleCzkData(m);
|
|
762
|
-
return
|
|
804
|
+
return _context3.abrupt('return', result.data);
|
|
763
805
|
|
|
764
806
|
case 10:
|
|
765
|
-
|
|
807
|
+
_context3.next = 12;
|
|
766
808
|
return (0, _tplusApi.ccApi)({ dto: _this7.dto, meStorageCardId: m.MeStorageCardId }, '/retail/RetailPos/validateRetailStorageCard', false, false).then(function (result1) {
|
|
767
809
|
var data1 = result1.data ? JSON.parse(result1.data)[0] : {};
|
|
768
810
|
if (data1.enable) {
|
|
@@ -775,36 +817,36 @@ var SettlementStore = (_class = function () {
|
|
|
775
817
|
});
|
|
776
818
|
|
|
777
819
|
case 12:
|
|
778
|
-
|
|
820
|
+
_context3.next = 25;
|
|
779
821
|
break;
|
|
780
822
|
|
|
781
823
|
case 14:
|
|
782
824
|
if (!(result.data && result.data.length === 1)) {
|
|
783
|
-
|
|
825
|
+
_context3.next = 19;
|
|
784
826
|
break;
|
|
785
827
|
}
|
|
786
828
|
|
|
787
829
|
_this7.paymode.updateCardInfo(result.data[0]);
|
|
788
|
-
return
|
|
830
|
+
return _context3.abrupt('return', result.data);
|
|
789
831
|
|
|
790
832
|
case 19:
|
|
791
833
|
if (!(result.data && result.data.length > 1)) {
|
|
792
|
-
|
|
834
|
+
_context3.next = 23;
|
|
793
835
|
break;
|
|
794
836
|
}
|
|
795
837
|
|
|
796
|
-
return
|
|
838
|
+
return _context3.abrupt('return', result.data);
|
|
797
839
|
|
|
798
840
|
case 23:
|
|
799
841
|
_message2.default.warn('没有可用储值卡!');
|
|
800
|
-
return
|
|
842
|
+
return _context3.abrupt('return', false);
|
|
801
843
|
|
|
802
844
|
case 25:
|
|
803
845
|
case 'end':
|
|
804
|
-
return
|
|
846
|
+
return _context3.stop();
|
|
805
847
|
}
|
|
806
848
|
}
|
|
807
|
-
},
|
|
849
|
+
}, _callee3, _this7);
|
|
808
850
|
}));
|
|
809
851
|
|
|
810
852
|
return function (_x2) {
|
|
@@ -855,12 +897,13 @@ var SettlementStore = (_class = function () {
|
|
|
855
897
|
}
|
|
856
898
|
}, {
|
|
857
899
|
key: 'addDjq',
|
|
858
|
-
value: function addDjq(promoCouponCode, name, IsEnable, amount, doorsill, LastTS, checked, IsRepelWithPoints, UMemberID, expired, displayText, promoMethodEnum, discountPct, promoId, promoRuleId, couponCategoryEnum, id, unCheck, count) {
|
|
900
|
+
value: function addDjq(promoCouponCode, name, IsEnable, nominalAmount, amount, doorsill, LastTS, checked, IsRepelWithPoints, UMemberID, expired, displayText, promoMethodEnum, discountPct, promoId, promoRuleId, couponCategoryEnum, id, unCheck, count) {
|
|
859
901
|
var djq = {
|
|
860
902
|
code: promoCouponCode,
|
|
861
903
|
promoCouponCode: promoCouponCode,
|
|
862
904
|
name: name,
|
|
863
905
|
IsEnable: IsEnable,
|
|
906
|
+
nominalAmount: nominalAmount,
|
|
864
907
|
amount: amount,
|
|
865
908
|
doorsill: doorsill, //:"无门槛"
|
|
866
909
|
LastTS: LastTS,
|
|
@@ -961,6 +1004,7 @@ var SettlementStore = (_class = function () {
|
|
|
961
1004
|
name: themode.name,
|
|
962
1005
|
exchangeRate: themode.exchangeRate,
|
|
963
1006
|
calDirection: themode.calDirection,
|
|
1007
|
+
thridPayment: themode.thridPayment,
|
|
964
1008
|
value: value,
|
|
965
1009
|
value2: (0, _utils.getFixedNumber)(themode.calDirection == "88" ? value / themode.exchangeRate : value * themode.exchangeRate),
|
|
966
1010
|
value3: value,
|
|
@@ -990,7 +1034,7 @@ var SettlementStore = (_class = function () {
|
|
|
990
1034
|
if (type == PayStyle.hyczk || type == PayStyle.jfdx || type == PayStyle.djq) {
|
|
991
1035
|
this.setMaxAmount(type, mode);
|
|
992
1036
|
}
|
|
993
|
-
console.log(mode);
|
|
1037
|
+
console.log('\u5F53\u524D\u64CD\u4F5C\u7ED3\u7B97\u65B9\u5F0F\u4FE1\u606F:' + mode);
|
|
994
1038
|
return mode;
|
|
995
1039
|
}
|
|
996
1040
|
}, {
|
|
@@ -1037,15 +1081,6 @@ var SettlementStore = (_class = function () {
|
|
|
1037
1081
|
key: 'changeFocusOnly',
|
|
1038
1082
|
value: function changeFocusOnly(type) {
|
|
1039
1083
|
this.paymode.currentFocus = type;
|
|
1040
|
-
// 获取焦点时带入剩余的值
|
|
1041
|
-
// let mode=_find(this.paymode.thePaymodes,{'paymentType':type});
|
|
1042
|
-
// if(mode && this.isIntegralExchange){
|
|
1043
|
-
// const shouldSetValue =getFixedNumber(parseFloat(this.paymode.receivable) + parseFloat(mode.value));
|
|
1044
|
-
// mode.value = shouldSetValue;
|
|
1045
|
-
// mode.value2 = getFixedNumber(mode.calDirection=="88"?shouldSetValue / mode.exchangeRate:(shouldSetValue * mode.exchangeRate));
|
|
1046
|
-
// mode.value3 = shouldSetValue;
|
|
1047
|
-
// this.paymode.calcReserved();
|
|
1048
|
-
// }
|
|
1049
1084
|
}
|
|
1050
1085
|
}, {
|
|
1051
1086
|
key: 'changeClickFocusOnly',
|
|
@@ -1114,8 +1149,6 @@ var SettlementStore = (_class = function () {
|
|
|
1114
1149
|
});
|
|
1115
1150
|
pos = index == -1 ? pos : index + 1;
|
|
1116
1151
|
}
|
|
1117
|
-
// this.paymode.thePaymodes.push(this.genNewMode(type) );
|
|
1118
|
-
|
|
1119
1152
|
this.paymode.thePaymodes.splice(pos, 0, this.genNewMode(type, this.newStyle && type == PayStyle.hyczk, undefined, isQuick));
|
|
1120
1153
|
this.paymode.calcReserved(bookType);
|
|
1121
1154
|
}
|
|
@@ -1131,79 +1164,175 @@ var SettlementStore = (_class = function () {
|
|
|
1131
1164
|
this.paymode.currentFocus = -1;
|
|
1132
1165
|
this.paymode.calcReserved(bookType);
|
|
1133
1166
|
}
|
|
1167
|
+
|
|
1168
|
+
// 获取储值是否重复, 在commit方法中使用
|
|
1169
|
+
|
|
1170
|
+
}, {
|
|
1171
|
+
key: 'findStorageBillValidate',
|
|
1172
|
+
value: function findStorageBillValidate() {
|
|
1173
|
+
var _this10 = this;
|
|
1174
|
+
|
|
1175
|
+
var _enumController$getEn14 = _mutantsUtil.enumController.getEnumOj(),
|
|
1176
|
+
PayStyle = _enumController$getEn14.PayStyle;
|
|
1177
|
+
|
|
1178
|
+
(0, _mobx.runInAction)(function () {
|
|
1179
|
+
_this10.dto.StorageMutiSettleDetails = [];
|
|
1180
|
+
var thePaymodes = _this10.newStyle ? (0, _filter3.default)(_this10.paymode.thePaymodes, function (mode) {
|
|
1181
|
+
return parseFloat(mode.value) != 0;
|
|
1182
|
+
}) : _this10.paymode.thePaymodes;
|
|
1183
|
+
(0, _each3.default)(thePaymodes, function (mode) {
|
|
1184
|
+
var themode = (0, _find3.default)(_this10.paymode.paymodes, { 'paymentType': mode.paymentType });
|
|
1185
|
+
|
|
1186
|
+
var value = parseFloat(mode.value);
|
|
1187
|
+
var giveChange = null;
|
|
1188
|
+
if (mode.paymentType == PayStyle.xianjin && _this10.paymode.receivable < 0 && value > Math.abs(_this10.paymode.receivable)) {
|
|
1189
|
+
value = Math.Add(value, _this10.paymode.receivable);
|
|
1190
|
+
giveChange = Math.abs(_this10.paymode.receivable);
|
|
1191
|
+
}
|
|
1192
|
+
_this10.dto.StorageMutiSettleDetails.push({
|
|
1193
|
+
Code: mode.paymethodId,
|
|
1194
|
+
StorageAmount: value,
|
|
1195
|
+
GiveChange: giveChange,
|
|
1196
|
+
IdsettleStyle: themode.idSettleStyle,
|
|
1197
|
+
IdbankAccount: themode.idBankAccount,
|
|
1198
|
+
PaymentCode: mode.authCode,
|
|
1199
|
+
DynamicPropertyKeys: [],
|
|
1200
|
+
DynamicPropertyValues: [],
|
|
1201
|
+
DataSource: { Id: _this10.dataSource }
|
|
1202
|
+
});
|
|
1203
|
+
});
|
|
1204
|
+
});
|
|
1205
|
+
return (0, _tplusApi.ccApi)((0, _extends3.default)({}, this.dto), '/marketingtool/Storage/findStorageBillValidate', false, false);
|
|
1206
|
+
}
|
|
1207
|
+
|
|
1208
|
+
//判断是否重复弹框
|
|
1209
|
+
|
|
1134
1210
|
}, {
|
|
1135
1211
|
key: 'commit',
|
|
1136
1212
|
value: function () {
|
|
1137
|
-
var _ref10 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function
|
|
1138
|
-
var _ref11,
|
|
1213
|
+
var _ref10 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee4(bTest) {
|
|
1214
|
+
var status, paylist, ret, _ref11, _ref11$data, code, returnMsg, state, ret1, ret2;
|
|
1139
1215
|
|
|
1140
|
-
return _regenerator2.default.wrap(function
|
|
1216
|
+
return _regenerator2.default.wrap(function _callee4$(_context4) {
|
|
1141
1217
|
while (1) {
|
|
1142
|
-
switch (
|
|
1218
|
+
switch (_context4.prev = _context4.next) {
|
|
1143
1219
|
case 0:
|
|
1144
1220
|
console.log('settlementStore.commit开始,参数:' + bTest);
|
|
1145
1221
|
|
|
1146
1222
|
if (!bTest) {
|
|
1147
|
-
|
|
1223
|
+
_context4.next = 3;
|
|
1148
1224
|
break;
|
|
1149
1225
|
}
|
|
1150
1226
|
|
|
1151
|
-
return
|
|
1227
|
+
return _context4.abrupt('return', _promise2.default.resolve(true));
|
|
1152
1228
|
|
|
1153
1229
|
case 3:
|
|
1154
|
-
|
|
1155
|
-
|
|
1230
|
+
status = this.type;
|
|
1231
|
+
_context4.prev = 4;
|
|
1232
|
+
paylist = this.paymode.thePaymodes.filter(function (v) {
|
|
1233
|
+
return !!v.thridPayment && Math.abs(v.value) > 0;
|
|
1234
|
+
}) || [];
|
|
1235
|
+
|
|
1236
|
+
if (!(paylist && paylist.length > 1)) {
|
|
1237
|
+
_context4.next = 9;
|
|
1238
|
+
break;
|
|
1239
|
+
}
|
|
1240
|
+
|
|
1241
|
+
_message2.default.warn('二开支付目前仅支持单一结算方式。');
|
|
1242
|
+
return _context4.abrupt('return', _promise2.default.resolve(false));
|
|
1156
1243
|
|
|
1157
|
-
|
|
1158
|
-
|
|
1244
|
+
case 9:
|
|
1245
|
+
if (!(status == 1)) {
|
|
1246
|
+
_context4.next = 30;
|
|
1159
1247
|
break;
|
|
1160
1248
|
}
|
|
1161
1249
|
|
|
1162
|
-
|
|
1163
|
-
return this.
|
|
1250
|
+
_context4.next = 12;
|
|
1251
|
+
return this.findStorageBillValidate();
|
|
1164
1252
|
|
|
1165
|
-
case
|
|
1166
|
-
|
|
1167
|
-
|
|
1253
|
+
case 12:
|
|
1254
|
+
ret = _context4.sent;
|
|
1255
|
+
_ref11 = ret || {}, _ref11$data = _ref11.data;
|
|
1256
|
+
_ref11$data = _ref11$data === undefined ? {} : _ref11$data;
|
|
1257
|
+
code = _ref11$data.code, returnMsg = _ref11$data.returnMsg;
|
|
1168
1258
|
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
_context3.next = 13;
|
|
1259
|
+
if (!(code && code == 10001)) {
|
|
1260
|
+
_context4.next = 24;
|
|
1172
1261
|
break;
|
|
1173
1262
|
}
|
|
1174
1263
|
|
|
1175
|
-
|
|
1264
|
+
_context4.next = 19;
|
|
1265
|
+
return this.repeatStorageModal(returnMsg);
|
|
1266
|
+
|
|
1267
|
+
case 19:
|
|
1268
|
+
state = _context4.sent;
|
|
1269
|
+
|
|
1270
|
+
if (!(state === false)) {
|
|
1271
|
+
_context4.next = 22;
|
|
1272
|
+
break;
|
|
1273
|
+
}
|
|
1274
|
+
|
|
1275
|
+
return _context4.abrupt('return', _promise2.default.resolve(false));
|
|
1276
|
+
|
|
1277
|
+
case 22:
|
|
1278
|
+
_context4.next = 28;
|
|
1279
|
+
break;
|
|
1280
|
+
|
|
1281
|
+
case 24:
|
|
1282
|
+
_context4.next = 26;
|
|
1283
|
+
return this.saveMember();
|
|
1284
|
+
|
|
1285
|
+
case 26:
|
|
1286
|
+
ret1 = _context4.sent;
|
|
1287
|
+
|
|
1288
|
+
if (ret1 === false) {
|
|
1289
|
+
_promise2.default.resolve(false);
|
|
1290
|
+
}
|
|
1291
|
+
|
|
1292
|
+
case 28:
|
|
1293
|
+
_context4.next = 39;
|
|
1294
|
+
break;
|
|
1295
|
+
|
|
1296
|
+
case 30:
|
|
1297
|
+
_context4.next = 32;
|
|
1176
1298
|
return _mutantsMicrofx.stores.offlineSys.generatorCode(this.dto);
|
|
1177
1299
|
|
|
1178
|
-
case
|
|
1179
|
-
|
|
1300
|
+
case 32:
|
|
1301
|
+
_context4.next = 34;
|
|
1180
1302
|
return this.save();
|
|
1181
1303
|
|
|
1182
|
-
case
|
|
1183
|
-
|
|
1184
|
-
|
|
1304
|
+
case 34:
|
|
1305
|
+
ret2 = _context4.sent;
|
|
1306
|
+
|
|
1307
|
+
if (!(ret2 === false)) {
|
|
1308
|
+
_context4.next = 37;
|
|
1185
1309
|
break;
|
|
1186
1310
|
}
|
|
1187
1311
|
|
|
1188
|
-
|
|
1312
|
+
return _context4.abrupt('return', _promise2.default.resolve(false));
|
|
1313
|
+
|
|
1314
|
+
case 37:
|
|
1315
|
+
_context4.next = 39;
|
|
1189
1316
|
return _mutantsMicrofx.stores.offlineSys.retailSequenceUpload();
|
|
1190
1317
|
|
|
1191
|
-
case
|
|
1192
|
-
return
|
|
1318
|
+
case 39:
|
|
1319
|
+
return _context4.abrupt('return', _promise2.default.resolve(true));
|
|
1193
1320
|
|
|
1194
|
-
case
|
|
1195
|
-
|
|
1196
|
-
|
|
1321
|
+
case 42:
|
|
1322
|
+
_context4.prev = 42;
|
|
1323
|
+
_context4.t0 = _context4['catch'](4);
|
|
1197
1324
|
|
|
1198
|
-
console.error('settlementStore.commit失败,错误信息:' +
|
|
1199
|
-
|
|
1325
|
+
console.error('settlementStore.commit失败,错误信息:' + _context4.t0);
|
|
1326
|
+
//其他支付失败时,处理二开支付情况。
|
|
1327
|
+
this.thirdPayRefund(status == 1 ? 2 : 1);
|
|
1328
|
+
return _context4.abrupt('return', _promise2.default.resolve(_context4.t0));
|
|
1200
1329
|
|
|
1201
|
-
case
|
|
1330
|
+
case 47:
|
|
1202
1331
|
case 'end':
|
|
1203
|
-
return
|
|
1332
|
+
return _context4.stop();
|
|
1204
1333
|
}
|
|
1205
1334
|
}
|
|
1206
|
-
},
|
|
1335
|
+
}, _callee4, this, [[4, 42]]);
|
|
1207
1336
|
}));
|
|
1208
1337
|
|
|
1209
1338
|
function commit(_x3) {
|
|
@@ -1220,76 +1349,136 @@ var SettlementStore = (_class = function () {
|
|
|
1220
1349
|
}
|
|
1221
1350
|
}, {
|
|
1222
1351
|
key: 'saveMember',
|
|
1223
|
-
value: function
|
|
1224
|
-
var
|
|
1352
|
+
value: function () {
|
|
1353
|
+
var _ref12 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee5() {
|
|
1354
|
+
var _this11 = this;
|
|
1225
1355
|
|
|
1226
|
-
|
|
1227
|
-
PayStyle = _enumController$getEn14.PayStyle;
|
|
1356
|
+
var _enumController$getEn15, PayStyle, TradeType, IPMSG, dtoParams, payList, payment, tradeType, ret, _ref13, type, data, msg, code;
|
|
1228
1357
|
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
(0, _each3.default)(thePaymodes, function (mode) {
|
|
1235
|
-
var themode = (0, _find3.default)(_this10.paymode.paymodes, { 'paymentType': mode.paymentType });
|
|
1358
|
+
return _regenerator2.default.wrap(function _callee5$(_context5) {
|
|
1359
|
+
while (1) {
|
|
1360
|
+
switch (_context5.prev = _context5.next) {
|
|
1361
|
+
case 0:
|
|
1362
|
+
_enumController$getEn15 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn15.PayStyle, TradeType = _enumController$getEn15.TradeType;
|
|
1236
1363
|
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1364
|
+
(0, _mobx.runInAction)(function () {
|
|
1365
|
+
_this11.dto.StorageMutiSettleDetails = [];
|
|
1366
|
+
var thePaymodes = _this11.newStyle ? (0, _filter3.default)(_this11.paymode.thePaymodes, function (mode) {
|
|
1367
|
+
return parseFloat(mode.value) != 0;
|
|
1368
|
+
}) : _this11.paymode.thePaymodes;
|
|
1369
|
+
(0, _each3.default)(thePaymodes, function (mode) {
|
|
1370
|
+
var themode = (0, _find3.default)(_this11.paymode.paymodes, { 'paymentType': mode.paymentType });
|
|
1371
|
+
|
|
1372
|
+
var value = parseFloat(mode.value);
|
|
1373
|
+
var giveChange = null;
|
|
1374
|
+
if (mode.paymentType == PayStyle.xianjin && _this11.paymode.receivable < 0 && value > Math.abs(_this11.paymode.receivable)) {
|
|
1375
|
+
value = Math.Add(value, _this11.paymode.receivable);
|
|
1376
|
+
giveChange = Math.abs(_this11.paymode.receivable);
|
|
1377
|
+
}
|
|
1378
|
+
_this11.dto.StorageMutiSettleDetails.push({
|
|
1379
|
+
Code: mode.paymethodId,
|
|
1380
|
+
StorageAmount: value,
|
|
1381
|
+
GiveChange: giveChange,
|
|
1382
|
+
IdsettleStyle: themode.idSettleStyle,
|
|
1383
|
+
IdbankAccount: themode.idBankAccount,
|
|
1384
|
+
PaymentCode: mode.authCode,
|
|
1385
|
+
DynamicPropertyKeys: [],
|
|
1386
|
+
DynamicPropertyValues: [],
|
|
1387
|
+
DataSource: { Id: _this11.dataSource },
|
|
1388
|
+
ThirdPaymentInfo: themode.thridPayment || null,
|
|
1389
|
+
ThirdPaymentReturnInfo: mode.thirdPaymentReturnInfo || null
|
|
1390
|
+
});
|
|
1391
|
+
});
|
|
1392
|
+
});
|
|
1393
|
+
// cc结算调用
|
|
1394
|
+
IPMSG = {};
|
|
1395
|
+
|
|
1396
|
+
if (!!window.localStorage.IPMSG) {
|
|
1397
|
+
IPMSG = JSON.parse(window.localStorage.IPMSG);
|
|
1398
|
+
}
|
|
1399
|
+
dtoParams = this.dto;
|
|
1400
|
+
//处理存在二开支付情况
|
|
1401
|
+
|
|
1402
|
+
payList = dtoParams.StorageMutiSettleDetails.filter(function (v) {
|
|
1403
|
+
return v.ThirdPaymentInfo;
|
|
1404
|
+
});
|
|
1405
|
+
|
|
1406
|
+
if (!(payList && payList.length > 0)) {
|
|
1407
|
+
_context5.next = 19;
|
|
1408
|
+
break;
|
|
1409
|
+
}
|
|
1410
|
+
|
|
1411
|
+
payment = payList[0];
|
|
1412
|
+
tradeType = payment && payment.StorageAmount > 0 ? TradeType.PAY : TradeType.REFUND;
|
|
1413
|
+
_context5.next = 11;
|
|
1414
|
+
return this.thirdPay(2, payment, tradeType, dtoParams);
|
|
1415
|
+
|
|
1416
|
+
case 11:
|
|
1417
|
+
ret = _context5.sent;
|
|
1418
|
+
_ref13 = ret || {}, type = _ref13.type, data = _ref13.data, msg = _ref13.msg, code = _ref13.code;
|
|
1419
|
+
|
|
1420
|
+
if (!(type === true)) {
|
|
1421
|
+
_context5.next = 17;
|
|
1422
|
+
break;
|
|
1423
|
+
}
|
|
1424
|
+
|
|
1425
|
+
dtoParams = data;
|
|
1426
|
+
_context5.next = 19;
|
|
1427
|
+
break;
|
|
1428
|
+
|
|
1429
|
+
case 17:
|
|
1430
|
+
_message2.default.warn('\u5237\u5361\u652F\u4ED8\u5931\u8D25,\u9519\u8BEF\u7801:' + code);
|
|
1431
|
+
return _context5.abrupt('return', false);
|
|
1432
|
+
|
|
1433
|
+
case 19:
|
|
1434
|
+
this.dtoParams = dtoParams;
|
|
1435
|
+
console.log('储值结算信息:', dtoParams);
|
|
1436
|
+
return _context5.abrupt('return', (0, _tplusApi.tApi)({ dto: dtoParams }, 'chanjet.ME.INewRetailMemberStorage.Save', false, false).then(function (resp) {
|
|
1437
|
+
_this11.handlePrint(resp);
|
|
1438
|
+
}));
|
|
1439
|
+
|
|
1440
|
+
case 22:
|
|
1441
|
+
case 'end':
|
|
1442
|
+
return _context5.stop();
|
|
1443
|
+
}
|
|
1242
1444
|
}
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
IdbankAccount: themode.idBankAccount,
|
|
1249
|
-
PaymentCode: mode.authCode,
|
|
1250
|
-
DynamicPropertyKeys: [],
|
|
1251
|
-
DynamicPropertyValues: [],
|
|
1252
|
-
DataSource: { Id: _this10.dataSource }
|
|
1253
|
-
});
|
|
1254
|
-
});
|
|
1255
|
-
});
|
|
1256
|
-
// cc结算调用
|
|
1257
|
-
var IPMSG = {};
|
|
1258
|
-
if (!!window.localStorage.IPMSG) {
|
|
1259
|
-
IPMSG = JSON.parse(window.localStorage.IPMSG);
|
|
1445
|
+
}, _callee5, this);
|
|
1446
|
+
}));
|
|
1447
|
+
|
|
1448
|
+
function saveMember() {
|
|
1449
|
+
return _ref12.apply(this, arguments);
|
|
1260
1450
|
}
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
}
|
|
1451
|
+
|
|
1452
|
+
return saveMember;
|
|
1453
|
+
}()
|
|
1265
1454
|
}, {
|
|
1266
1455
|
key: 'save',
|
|
1267
1456
|
value: function () {
|
|
1268
|
-
var
|
|
1269
|
-
var
|
|
1457
|
+
var _ref14 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee6() {
|
|
1458
|
+
var _this12 = this;
|
|
1270
1459
|
|
|
1271
|
-
var _enumController$
|
|
1460
|
+
var _enumController$getEn16, PayStyle, TradeType, IPMSG, RetailTypeEnum, dtoParams, payList, payment, tradeType, ret, _ref15, type, data, msg, code;
|
|
1272
1461
|
|
|
1273
|
-
return _regenerator2.default.wrap(function
|
|
1462
|
+
return _regenerator2.default.wrap(function _callee6$(_context6) {
|
|
1274
1463
|
while (1) {
|
|
1275
|
-
switch (
|
|
1464
|
+
switch (_context6.prev = _context6.next) {
|
|
1276
1465
|
case 0:
|
|
1277
|
-
_enumController$
|
|
1466
|
+
_enumController$getEn16 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn16.PayStyle, TradeType = _enumController$getEn16.TradeType;
|
|
1278
1467
|
|
|
1279
1468
|
(0, _mobx.runInAction)(function () {
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1469
|
+
_this12.dto.RetailPaymentDetails = [];
|
|
1470
|
+
_this12.dto.RetailStorageDetails = [];
|
|
1471
|
+
_this12.dto.RetailCouponDetails = [];
|
|
1283
1472
|
var czkSum = 0;
|
|
1284
1473
|
var count = 0;
|
|
1285
|
-
var thePaymodes =
|
|
1474
|
+
var thePaymodes = _this12.newStyle ? (0, _filter3.default)(_this12.paymode.thePaymodes, function (mode) {
|
|
1286
1475
|
return parseFloat(mode.value) != 0;
|
|
1287
|
-
}) :
|
|
1476
|
+
}) : _this12.paymode.thePaymodes;
|
|
1288
1477
|
(0, _each3.default)(thePaymodes, function (mode, index) {
|
|
1289
|
-
var themode = (0, _find3.default)(
|
|
1478
|
+
var themode = (0, _find3.default)(_this12.paymode.paymodes, { 'paymentType': mode.paymentType });
|
|
1290
1479
|
if (mode.paymentType == PayStyle.hyczk) {
|
|
1291
1480
|
czkSum = Math.Add(czkSum, mode.value);
|
|
1292
|
-
|
|
1481
|
+
_this12.dto.RetailStorageDetails.push({
|
|
1293
1482
|
Code: mode.paymethodId,
|
|
1294
1483
|
MeStorageCardId: mode.meStorageCardId,
|
|
1295
1484
|
StoragePaymentAmount: mode.value,
|
|
@@ -1298,17 +1487,17 @@ var SettlementStore = (_class = function () {
|
|
|
1298
1487
|
Idmember: mode.memberId,
|
|
1299
1488
|
DynamicPropertyKeys: [],
|
|
1300
1489
|
DynamicPropertyValues: [],
|
|
1301
|
-
DataSource: { Id:
|
|
1490
|
+
DataSource: { Id: _this12.dataSource },
|
|
1302
1491
|
Password: mode.authCode
|
|
1303
1492
|
});
|
|
1304
1493
|
} else {
|
|
1305
1494
|
var value = parseFloat(mode.value);
|
|
1306
1495
|
var giveChange = null;
|
|
1307
|
-
if (mode.paymentType == PayStyle.xianjin &&
|
|
1308
|
-
value = Math.Add(value,
|
|
1309
|
-
giveChange = Math.abs(
|
|
1496
|
+
if (mode.paymentType == PayStyle.xianjin && _this12.paymode.receivable < 0 && value > Math.abs(_this12.paymode.receivable)) {
|
|
1497
|
+
value = Math.Add(value, _this12.paymode.receivable);
|
|
1498
|
+
giveChange = Math.abs(_this12.paymode.receivable);
|
|
1310
1499
|
}
|
|
1311
|
-
|
|
1500
|
+
_this12.dto.RetailPaymentDetails.push({
|
|
1312
1501
|
Code: mode.paymethodId,
|
|
1313
1502
|
OrigAmount: mode.exchangeRate != 1 ? mode.value2 : value,
|
|
1314
1503
|
Amount: value,
|
|
@@ -1322,11 +1511,13 @@ var SettlementStore = (_class = function () {
|
|
|
1322
1511
|
OverchargesAmount: mode.overchargesAmount,
|
|
1323
1512
|
DynamicPropertyKeys: [],
|
|
1324
1513
|
DynamicPropertyValues: [],
|
|
1325
|
-
DataSource: { Id:
|
|
1514
|
+
DataSource: { Id: _this12.dataSource },
|
|
1515
|
+
ThirdPaymentInfo: themode.thridPayment || null,
|
|
1516
|
+
ThirdPaymentReturnInfo: mode.thirdPaymentReturnInfo || null
|
|
1326
1517
|
});
|
|
1327
1518
|
if (mode.paymentType == PayStyle.djq) {
|
|
1328
|
-
(0, _each3.default)(
|
|
1329
|
-
|
|
1519
|
+
(0, _each3.default)(_this12.paymode.checkList && _this12.paymode.checkList.length ? _this12.paymode.checkList : mode.djqs, function (djq) {
|
|
1520
|
+
_this12.dto.RetailCouponDetails.push({
|
|
1330
1521
|
CouponCode: djq.promoCouponCode,
|
|
1331
1522
|
ReductionAmount: djq.amount,
|
|
1332
1523
|
EnableAmount: djq.doorsill,
|
|
@@ -1336,53 +1527,28 @@ var SettlementStore = (_class = function () {
|
|
|
1336
1527
|
PromotionId: djq.promoId,
|
|
1337
1528
|
PromotionRuleId: djq.promoRuleId,
|
|
1338
1529
|
PromoCouponAllocatedId: djq.id,
|
|
1339
|
-
DataSource: { Id:
|
|
1530
|
+
DataSource: { Id: _this12.dataSource }
|
|
1340
1531
|
});
|
|
1341
1532
|
});
|
|
1342
1533
|
}
|
|
1343
1534
|
}
|
|
1344
1535
|
});
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
DynamicPropertyKeys: [],
|
|
1359
|
-
DynamicPropertyValues: [],
|
|
1360
|
-
DataSource: { Id: _this11.dataSource },
|
|
1361
|
-
RetailStorageDetails: _this11.dto.RetailStorageDetails
|
|
1362
|
-
});
|
|
1363
|
-
} else {
|
|
1364
|
-
_this11.dto.RetailPaymentDetails.push({
|
|
1365
|
-
Code: _this11.paymode.counter,
|
|
1366
|
-
OrigAmount: czkSum,
|
|
1367
|
-
Amount: czkSum,
|
|
1368
|
-
IdsettleStyle: themode.idSettleStyle,
|
|
1369
|
-
IdbankAccount: themode.idBankAccount,
|
|
1370
|
-
DynamicPropertyKeys: [],
|
|
1371
|
-
DynamicPropertyValues: [],
|
|
1372
|
-
DataSource: { Id: _this11.dataSource }
|
|
1373
|
-
});
|
|
1374
|
-
}
|
|
1536
|
+
if (_this12.dto.RetailStorageDetails.length > 0) {
|
|
1537
|
+
var themode = (0, _find3.default)(_this12.paymode.paymodes, { 'paymentType': PayStyle.hyczk });
|
|
1538
|
+
_this12.dto.RetailPaymentDetails.push({
|
|
1539
|
+
Code: _this12.paymode.counter,
|
|
1540
|
+
OrigAmount: czkSum,
|
|
1541
|
+
Amount: czkSum,
|
|
1542
|
+
IdsettleStyle: themode.idSettleStyle,
|
|
1543
|
+
IdbankAccount: themode.idBankAccount,
|
|
1544
|
+
DynamicPropertyKeys: [],
|
|
1545
|
+
DynamicPropertyValues: [],
|
|
1546
|
+
DataSource: { Id: _this12.dataSource },
|
|
1547
|
+
RetailStorageDetails: _this12.dto.RetailStorageDetails
|
|
1548
|
+
});
|
|
1375
1549
|
}
|
|
1376
1550
|
});
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
console.log('bc_pos\u73AF\u5883:' + isNewRetailBCPos + ',\u7ED3\u7B97\u6570\u636E\uFF1A', this.dto);
|
|
1380
|
-
|
|
1381
|
-
if (!isNewRetailBCPos) {
|
|
1382
|
-
_context4.next = 23;
|
|
1383
|
-
break;
|
|
1384
|
-
}
|
|
1385
|
-
|
|
1551
|
+
console.log('\u7ED3\u7B97\u6570\u636E\uFF1A', this.dto);
|
|
1386
1552
|
// cc结算调用
|
|
1387
1553
|
IPMSG = {};
|
|
1388
1554
|
|
|
@@ -1390,77 +1556,271 @@ var SettlementStore = (_class = function () {
|
|
|
1390
1556
|
IPMSG = JSON.parse(window.localStorage.IPMSG);
|
|
1391
1557
|
}
|
|
1392
1558
|
RetailTypeEnum = this.dto.IdbusiType == 36 ? "INTEGRAL_EXCHANGE" : "NORMAL";
|
|
1393
|
-
|
|
1394
|
-
_ref15 = this.dto || {}, IdbusiType = _ref15.IdbusiType, DistributionMode = _ref15.DistributionMode;
|
|
1559
|
+
_context6.t1 = this.dto.IdbusiType == 37;
|
|
1395
1560
|
|
|
1396
|
-
if (
|
|
1397
|
-
|
|
1398
|
-
return c + (item.Amount || 0);
|
|
1399
|
-
}, 0));
|
|
1400
|
-
|
|
1401
|
-
(0, _mobx.runInAction)(function () {
|
|
1402
|
-
_this11.dto.PrepaidAmount = prepaidAmount;
|
|
1403
|
-
});
|
|
1404
|
-
}
|
|
1405
|
-
_context4.t1 = this.dto.IdbusiType == 37;
|
|
1406
|
-
|
|
1407
|
-
if (!_context4.t1) {
|
|
1408
|
-
_context4.next = 16;
|
|
1561
|
+
if (!_context6.t1) {
|
|
1562
|
+
_context6.next = 11;
|
|
1409
1563
|
break;
|
|
1410
1564
|
}
|
|
1411
1565
|
|
|
1412
|
-
|
|
1566
|
+
_context6.next = 10;
|
|
1413
1567
|
return this.checkIntegralExchangeReturn(this.dto.RetailDetails[0].ReturnSourceId);
|
|
1414
1568
|
|
|
1415
|
-
case
|
|
1416
|
-
|
|
1569
|
+
case 10:
|
|
1570
|
+
_context6.t1 = _context6.sent;
|
|
1417
1571
|
|
|
1418
|
-
case
|
|
1419
|
-
|
|
1572
|
+
case 11:
|
|
1573
|
+
_context6.t0 = _context6.t1;
|
|
1420
1574
|
|
|
1421
|
-
if (
|
|
1422
|
-
|
|
1575
|
+
if (_context6.t0) {
|
|
1576
|
+
_context6.next = 14;
|
|
1423
1577
|
break;
|
|
1424
1578
|
}
|
|
1425
1579
|
|
|
1426
|
-
|
|
1580
|
+
_context6.t0 = this.dto.IdbusiType != 37;
|
|
1427
1581
|
|
|
1428
|
-
case
|
|
1429
|
-
if (!
|
|
1430
|
-
|
|
1582
|
+
case 14:
|
|
1583
|
+
if (!_context6.t0) {
|
|
1584
|
+
_context6.next = 33;
|
|
1431
1585
|
break;
|
|
1432
1586
|
}
|
|
1433
1587
|
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1588
|
+
dtoParams = (0, _extends3.default)({}, this.dto.cut(), { RetailOms: { RetailTypeEnum: RetailTypeEnum } });
|
|
1589
|
+
//处理存在二开支付情况
|
|
1590
|
+
|
|
1591
|
+
payList = dtoParams.RetailPaymentDetails.filter(function (v) {
|
|
1592
|
+
return v.ThirdPaymentInfo;
|
|
1593
|
+
});
|
|
1594
|
+
|
|
1595
|
+
if (!(payList && payList.length > 0)) {
|
|
1596
|
+
_context6.next = 30;
|
|
1597
|
+
break;
|
|
1598
|
+
}
|
|
1599
|
+
|
|
1600
|
+
payment = payList[0];
|
|
1601
|
+
tradeType = payment && payment.Amount > 0 ? TradeType.PAY : TradeType.REFUND;
|
|
1602
|
+
_context6.next = 22;
|
|
1603
|
+
return this.thirdPay(1, payment, tradeType, dtoParams);
|
|
1604
|
+
|
|
1605
|
+
case 22:
|
|
1606
|
+
ret = _context6.sent;
|
|
1607
|
+
_ref15 = ret || {}, type = _ref15.type, data = _ref15.data, msg = _ref15.msg, code = _ref15.code;
|
|
1608
|
+
|
|
1609
|
+
if (!(type === true)) {
|
|
1610
|
+
_context6.next = 28;
|
|
1611
|
+
break;
|
|
1612
|
+
}
|
|
1439
1613
|
|
|
1440
|
-
|
|
1441
|
-
|
|
1614
|
+
dtoParams = data;
|
|
1615
|
+
_context6.next = 30;
|
|
1442
1616
|
break;
|
|
1443
1617
|
|
|
1444
|
-
case
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1618
|
+
case 28:
|
|
1619
|
+
_message2.default.warn('\u5237\u5361\u652F\u4ED8\u5931\u8D25,\u9519\u8BEF\u7801:' + code);
|
|
1620
|
+
return _context6.abrupt('return', false);
|
|
1621
|
+
|
|
1622
|
+
case 30:
|
|
1623
|
+
this.dtoParams = dtoParams;
|
|
1624
|
+
console.log('结算信息:', dtoParams);
|
|
1625
|
+
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) {
|
|
1626
|
+
var _ref16 = resp || {},
|
|
1627
|
+
ID = _ref16.ID;
|
|
1628
|
+
|
|
1629
|
+
_this12.setDtoID(ID);
|
|
1630
|
+
_this12.billID = ID;
|
|
1631
|
+
_this12.paymode.checkList = [];
|
|
1448
1632
|
}));
|
|
1449
1633
|
|
|
1450
|
-
case
|
|
1634
|
+
case 33:
|
|
1451
1635
|
case 'end':
|
|
1452
|
-
return
|
|
1636
|
+
return _context6.stop();
|
|
1453
1637
|
}
|
|
1454
1638
|
}
|
|
1455
|
-
},
|
|
1639
|
+
}, _callee6, this);
|
|
1456
1640
|
}));
|
|
1457
1641
|
|
|
1458
1642
|
function save() {
|
|
1459
|
-
return
|
|
1643
|
+
return _ref14.apply(this, arguments);
|
|
1460
1644
|
}
|
|
1461
1645
|
|
|
1462
1646
|
return save;
|
|
1463
1647
|
}()
|
|
1648
|
+
|
|
1649
|
+
//裁剪二开支付数据
|
|
1650
|
+
|
|
1651
|
+
}, {
|
|
1652
|
+
key: 'removeThirdPayDto',
|
|
1653
|
+
value: function removeThirdPayDto(dto) {
|
|
1654
|
+
var data = (0, _extends3.default)({}, dto);
|
|
1655
|
+
delete data['DynamicPropertyKeys'];
|
|
1656
|
+
delete data['DynamicPropertyValues'];
|
|
1657
|
+
return data;
|
|
1658
|
+
}
|
|
1659
|
+
|
|
1660
|
+
/**
|
|
1661
|
+
* 二开支付
|
|
1662
|
+
* vType:1零售单、2储值单
|
|
1663
|
+
* payment:结算方式
|
|
1664
|
+
* trade:00表示结算、02表示退款
|
|
1665
|
+
* dto:结算数据集合
|
|
1666
|
+
*/
|
|
1667
|
+
|
|
1668
|
+
}, {
|
|
1669
|
+
key: 'thirdPay',
|
|
1670
|
+
value: function () {
|
|
1671
|
+
var _ref17 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee7(vType, payment, trade, dto) {
|
|
1672
|
+
var cto, params, ret, _ref18, Code, _Message, Result, _ref19, ThirdPaymentReturnInfo;
|
|
1673
|
+
|
|
1674
|
+
return _regenerator2.default.wrap(function _callee7$(_context7) {
|
|
1675
|
+
while (1) {
|
|
1676
|
+
switch (_context7.prev = _context7.next) {
|
|
1677
|
+
case 0:
|
|
1678
|
+
_context7.prev = 0;
|
|
1679
|
+
cto = this.removeThirdPayDto(dto);
|
|
1680
|
+
params = { VoucherType: vType, Payment: payment, TradeType: trade, dto: cto };
|
|
1681
|
+
|
|
1682
|
+
console.log('刷卡信息:', (0, _stringify2.default)(params));
|
|
1683
|
+
_context7.next = 6;
|
|
1684
|
+
return new _promise2.default(function (resolve, reject) {
|
|
1685
|
+
_mutantsMicrofx.nativeMs.setIpcRendererMethod('ThirdPayment', (0, _extends3.default)({}, params), function (res) {
|
|
1686
|
+
return resolve(res);
|
|
1687
|
+
});
|
|
1688
|
+
});
|
|
1689
|
+
|
|
1690
|
+
case 6:
|
|
1691
|
+
ret = _context7.sent;
|
|
1692
|
+
|
|
1693
|
+
console.log('刷卡返回信息:', ret);
|
|
1694
|
+
ret = JSON.parse(ret);
|
|
1695
|
+
_ref18 = ret || {}, Code = _ref18.Code, _Message = _ref18.Message, Result = _ref18.Result;
|
|
1696
|
+
|
|
1697
|
+
if (!(Code > 0)) {
|
|
1698
|
+
_context7.next = 14;
|
|
1699
|
+
break;
|
|
1700
|
+
}
|
|
1701
|
+
|
|
1702
|
+
return _context7.abrupt('return', { type: false, data: null, msg: _Message, code: Code });
|
|
1703
|
+
|
|
1704
|
+
case 14:
|
|
1705
|
+
if (!(trade == '00')) {
|
|
1706
|
+
_context7.next = 20;
|
|
1707
|
+
break;
|
|
1708
|
+
}
|
|
1709
|
+
|
|
1710
|
+
_ref19 = Result || {}, ThirdPaymentReturnInfo = _ref19.ThirdPaymentReturnInfo;
|
|
1711
|
+
|
|
1712
|
+
if (vType == 1) {
|
|
1713
|
+
dto.RetailPaymentDetails.forEach(function (v) {
|
|
1714
|
+
if (v.ThirdPaymentInfo != null && Math.abs(v.Amount) > 0) {
|
|
1715
|
+
v.ThirdPaymentReturnInfo = ThirdPaymentReturnInfo;
|
|
1716
|
+
}
|
|
1717
|
+
});
|
|
1718
|
+
} else if (vType == 2) {
|
|
1719
|
+
dto.StorageMutiSettleDetails.forEach(function (v) {
|
|
1720
|
+
if (v.ThirdPaymentInfo != null && Math.abs(v.StorageAmount) > 0) {
|
|
1721
|
+
v.ThirdPaymentReturnInfo = ThirdPaymentReturnInfo;
|
|
1722
|
+
}
|
|
1723
|
+
});
|
|
1724
|
+
}
|
|
1725
|
+
return _context7.abrupt('return', { type: true, data: dto, msg: _Message, code: Code });
|
|
1726
|
+
|
|
1727
|
+
case 20:
|
|
1728
|
+
if (!(trade == '02')) {
|
|
1729
|
+
_context7.next = 22;
|
|
1730
|
+
break;
|
|
1731
|
+
}
|
|
1732
|
+
|
|
1733
|
+
return _context7.abrupt('return', { type: true, data: dto, msg: _Message, code: Code });
|
|
1734
|
+
|
|
1735
|
+
case 22:
|
|
1736
|
+
_context7.next = 27;
|
|
1737
|
+
break;
|
|
1738
|
+
|
|
1739
|
+
case 24:
|
|
1740
|
+
_context7.prev = 24;
|
|
1741
|
+
_context7.t0 = _context7['catch'](0);
|
|
1742
|
+
return _context7.abrupt('return', { type: false, data: null, msg: _context7.t0, code: '9999' });
|
|
1743
|
+
|
|
1744
|
+
case 27:
|
|
1745
|
+
case 'end':
|
|
1746
|
+
return _context7.stop();
|
|
1747
|
+
}
|
|
1748
|
+
}
|
|
1749
|
+
}, _callee7, this, [[0, 24]]);
|
|
1750
|
+
}));
|
|
1751
|
+
|
|
1752
|
+
function thirdPay(_x4, _x5, _x6, _x7) {
|
|
1753
|
+
return _ref17.apply(this, arguments);
|
|
1754
|
+
}
|
|
1755
|
+
|
|
1756
|
+
return thirdPay;
|
|
1757
|
+
}()
|
|
1758
|
+
|
|
1759
|
+
//二开支付强制退款情况
|
|
1760
|
+
|
|
1761
|
+
}, {
|
|
1762
|
+
key: 'thirdPayRefund',
|
|
1763
|
+
value: function () {
|
|
1764
|
+
var _ref20 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee9(type) {
|
|
1765
|
+
var _this13 = this;
|
|
1766
|
+
|
|
1767
|
+
var dto, pay, payment, _enumController$getEn17, TradeType;
|
|
1768
|
+
|
|
1769
|
+
return _regenerator2.default.wrap(function _callee9$(_context9) {
|
|
1770
|
+
while (1) {
|
|
1771
|
+
switch (_context9.prev = _context9.next) {
|
|
1772
|
+
case 0:
|
|
1773
|
+
dto = type == 1 ? this.dtoParams.RetailPaymentDetails : this.dtoParams.StorageMutiSettleDetails;
|
|
1774
|
+
pay = dto && dto.filter(function (v) {
|
|
1775
|
+
return v.ThirdPaymentInfo;
|
|
1776
|
+
});
|
|
1777
|
+
|
|
1778
|
+
if (pay && pay.length > 0) {
|
|
1779
|
+
setTimeout(function () {
|
|
1780
|
+
_message2.default.warn("支付出现异常,将发起刷卡退款。", { duration: 4.5 });
|
|
1781
|
+
}, 1000);
|
|
1782
|
+
payment = pay[0];
|
|
1783
|
+
_enumController$getEn17 = _mutantsUtil.enumController.getEnumOj(), TradeType = _enumController$getEn17.TradeType;
|
|
1784
|
+
|
|
1785
|
+
setTimeout((0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee8() {
|
|
1786
|
+
var ret, _ref22, msg;
|
|
1787
|
+
|
|
1788
|
+
return _regenerator2.default.wrap(function _callee8$(_context8) {
|
|
1789
|
+
while (1) {
|
|
1790
|
+
switch (_context8.prev = _context8.next) {
|
|
1791
|
+
case 0:
|
|
1792
|
+
_context8.next = 2;
|
|
1793
|
+
return _this13.thirdPay(type, payment, TradeType.REFUND, dto);
|
|
1794
|
+
|
|
1795
|
+
case 2:
|
|
1796
|
+
ret = _context8.sent;
|
|
1797
|
+
_ref22 = ret || {}, msg = _ref22.msg;
|
|
1798
|
+
|
|
1799
|
+
console.log('\u5237\u5361\u652F\u4ED8\u9000\u6B3E:' + msg);
|
|
1800
|
+
|
|
1801
|
+
case 5:
|
|
1802
|
+
case 'end':
|
|
1803
|
+
return _context8.stop();
|
|
1804
|
+
}
|
|
1805
|
+
}
|
|
1806
|
+
}, _callee8, _this13);
|
|
1807
|
+
})), 4500);
|
|
1808
|
+
}
|
|
1809
|
+
|
|
1810
|
+
case 3:
|
|
1811
|
+
case 'end':
|
|
1812
|
+
return _context9.stop();
|
|
1813
|
+
}
|
|
1814
|
+
}
|
|
1815
|
+
}, _callee9, this);
|
|
1816
|
+
}));
|
|
1817
|
+
|
|
1818
|
+
function thirdPayRefund(_x8) {
|
|
1819
|
+
return _ref20.apply(this, arguments);
|
|
1820
|
+
}
|
|
1821
|
+
|
|
1822
|
+
return thirdPayRefund;
|
|
1823
|
+
}()
|
|
1464
1824
|
}, {
|
|
1465
1825
|
key: 'setDtoID',
|
|
1466
1826
|
value: function setDtoID(id) {
|
|
@@ -1469,35 +1829,35 @@ var SettlementStore = (_class = function () {
|
|
|
1469
1829
|
}, {
|
|
1470
1830
|
key: 'querySettleResult',
|
|
1471
1831
|
value: function () {
|
|
1472
|
-
var
|
|
1473
|
-
return _regenerator2.default.wrap(function
|
|
1832
|
+
var _ref23 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee10() {
|
|
1833
|
+
return _regenerator2.default.wrap(function _callee10$(_context10) {
|
|
1474
1834
|
while (1) {
|
|
1475
|
-
switch (
|
|
1835
|
+
switch (_context10.prev = _context10.next) {
|
|
1476
1836
|
case 0:
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1837
|
+
_context10.prev = 0;
|
|
1838
|
+
_context10.t0 = _promise2.default;
|
|
1839
|
+
_context10.next = 4;
|
|
1480
1840
|
return (0, _tplusApi.tApi)({ RetailCode: this.dto.Code }, 'chanjet.RE.newRetail.QuerySettleResult', false, false, { timeout_skip: true });
|
|
1481
1841
|
|
|
1482
1842
|
case 4:
|
|
1483
|
-
|
|
1484
|
-
return
|
|
1843
|
+
_context10.t1 = _context10.sent;
|
|
1844
|
+
return _context10.abrupt('return', _context10.t0.resolve.call(_context10.t0, _context10.t1));
|
|
1485
1845
|
|
|
1486
1846
|
case 8:
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
return
|
|
1847
|
+
_context10.prev = 8;
|
|
1848
|
+
_context10.t2 = _context10['catch'](0);
|
|
1849
|
+
return _context10.abrupt('return', _promise2.default.resolve({ Flag: "1" }));
|
|
1490
1850
|
|
|
1491
1851
|
case 11:
|
|
1492
1852
|
case 'end':
|
|
1493
|
-
return
|
|
1853
|
+
return _context10.stop();
|
|
1494
1854
|
}
|
|
1495
1855
|
}
|
|
1496
|
-
},
|
|
1856
|
+
}, _callee10, this, [[0, 8]]);
|
|
1497
1857
|
}));
|
|
1498
1858
|
|
|
1499
1859
|
function querySettleResult() {
|
|
1500
|
-
return
|
|
1860
|
+
return _ref23.apply(this, arguments);
|
|
1501
1861
|
}
|
|
1502
1862
|
|
|
1503
1863
|
return querySettleResult;
|
|
@@ -1523,18 +1883,18 @@ var SettlementStore = (_class = function () {
|
|
|
1523
1883
|
}, {
|
|
1524
1884
|
key: 'validePwd',
|
|
1525
1885
|
value: function () {
|
|
1526
|
-
var
|
|
1527
|
-
var
|
|
1886
|
+
var _ref24 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee11(value) {
|
|
1887
|
+
var _ref25, isNewRetailBCPos, cook1, cook2, message, memberStorageId, _paymode$currentMode, cardTypeEnum, memberId, meStorageCardId, cardStatusEnum, result, count, _result;
|
|
1528
1888
|
|
|
1529
|
-
return _regenerator2.default.wrap(function
|
|
1889
|
+
return _regenerator2.default.wrap(function _callee11$(_context11) {
|
|
1530
1890
|
while (1) {
|
|
1531
|
-
switch (
|
|
1891
|
+
switch (_context11.prev = _context11.next) {
|
|
1532
1892
|
case 0:
|
|
1533
|
-
|
|
1534
|
-
|
|
1893
|
+
_ref25 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref25.isNewRetailBCPos;
|
|
1894
|
+
_context11.prev = 1;
|
|
1535
1895
|
|
|
1536
1896
|
if (!isNewRetailBCPos) {
|
|
1537
|
-
|
|
1897
|
+
_context11.next = 33;
|
|
1538
1898
|
break;
|
|
1539
1899
|
}
|
|
1540
1900
|
|
|
@@ -1544,60 +1904,60 @@ var SettlementStore = (_class = function () {
|
|
|
1544
1904
|
memberStorageId = this.paymode.currentMode.meStorageCardId;
|
|
1545
1905
|
|
|
1546
1906
|
if (!cook2) {
|
|
1547
|
-
|
|
1907
|
+
_context11.next = 12;
|
|
1548
1908
|
break;
|
|
1549
1909
|
}
|
|
1550
1910
|
|
|
1551
1911
|
if (!cook2.hasOwnProperty(memberStorageId + "")) {
|
|
1552
|
-
|
|
1912
|
+
_context11.next = 12;
|
|
1553
1913
|
break;
|
|
1554
1914
|
}
|
|
1555
1915
|
|
|
1556
1916
|
if (!(cook2[memberStorageId] > 3)) {
|
|
1557
|
-
|
|
1917
|
+
_context11.next = 12;
|
|
1558
1918
|
break;
|
|
1559
1919
|
}
|
|
1560
1920
|
|
|
1561
1921
|
message = '今日密码错误已达上限,不可使用储值消费,请明日再试,如忘记请重置密码或修改密码。';
|
|
1562
|
-
return
|
|
1922
|
+
return _context11.abrupt('return', _promise2.default.resolve(message));
|
|
1563
1923
|
|
|
1564
1924
|
case 12:
|
|
1565
1925
|
_paymode$currentMode = this.paymode.currentMode, cardTypeEnum = _paymode$currentMode.cardTypeEnum, memberId = _paymode$currentMode.memberId, meStorageCardId = _paymode$currentMode.meStorageCardId, cardStatusEnum = _paymode$currentMode.cardStatusEnum;
|
|
1566
1926
|
result = null;
|
|
1567
1927
|
|
|
1568
1928
|
if (!(cardTypeEnum === 'BALANCE_CARD')) {
|
|
1569
|
-
|
|
1929
|
+
_context11.next = 20;
|
|
1570
1930
|
break;
|
|
1571
1931
|
}
|
|
1572
1932
|
|
|
1573
|
-
|
|
1933
|
+
_context11.next = 17;
|
|
1574
1934
|
return (0, _tplusApi.ccApi)({ md5Password: _tplusApi.User.pwdEncrypt(value.pwd), cardType: cardTypeEnum }, '/member/MeMemberWallet/checkPaymentPassword/' + memberId, false, false);
|
|
1575
1935
|
|
|
1576
1936
|
case 17:
|
|
1577
|
-
result =
|
|
1578
|
-
|
|
1937
|
+
result = _context11.sent;
|
|
1938
|
+
_context11.next = 29;
|
|
1579
1939
|
break;
|
|
1580
1940
|
|
|
1581
1941
|
case 20:
|
|
1582
1942
|
if (!(cardStatusEnum === 'BINDING' && this.member && this.member.ID === memberId)) {
|
|
1583
|
-
|
|
1943
|
+
_context11.next = 26;
|
|
1584
1944
|
break;
|
|
1585
1945
|
}
|
|
1586
1946
|
|
|
1587
|
-
|
|
1947
|
+
_context11.next = 23;
|
|
1588
1948
|
return (0, _tplusApi.ccApi)({ md5Password: _tplusApi.User.pwdEncrypt(value.pwd), password: value.pwd, cardType: cardTypeEnum }, '/member/MeMemberWallet/checkPaymentPassword/' + meStorageCardId, false, false);
|
|
1589
1949
|
|
|
1590
1950
|
case 23:
|
|
1591
|
-
result =
|
|
1592
|
-
|
|
1951
|
+
result = _context11.sent;
|
|
1952
|
+
_context11.next = 29;
|
|
1593
1953
|
break;
|
|
1594
1954
|
|
|
1595
1955
|
case 26:
|
|
1596
|
-
|
|
1956
|
+
_context11.next = 28;
|
|
1597
1957
|
return (0, _tplusApi.ccApi)({ password: value.pwd, cardType: cardTypeEnum }, '/member/MeMemberWallet/checkPaymentPassword/' + meStorageCardId, false, false);
|
|
1598
1958
|
|
|
1599
1959
|
case 28:
|
|
1600
|
-
result =
|
|
1960
|
+
result = _context11.sent;
|
|
1601
1961
|
|
|
1602
1962
|
case 29:
|
|
1603
1963
|
if (!result.data) {
|
|
@@ -1616,38 +1976,38 @@ var SettlementStore = (_class = function () {
|
|
|
1616
1976
|
this.setCookie('errorPwd', '', -1);
|
|
1617
1977
|
this.setCookie('errorPwd', (0, _stringify2.default)(cook2));
|
|
1618
1978
|
}
|
|
1619
|
-
return
|
|
1979
|
+
return _context11.abrupt('return', _promise2.default.resolve(result.data ? "" : message));
|
|
1620
1980
|
|
|
1621
1981
|
case 33:
|
|
1622
|
-
|
|
1982
|
+
_context11.next = 35;
|
|
1623
1983
|
return (0, _tplusApi.tApi)({ "CheckoutParams": {
|
|
1624
1984
|
"Idmember": value.id,
|
|
1625
1985
|
"Password": value.pwd
|
|
1626
1986
|
} }, 'AA.DR.newRetailMember.CheckoutMemberPassword', false, false);
|
|
1627
1987
|
|
|
1628
1988
|
case 35:
|
|
1629
|
-
_result =
|
|
1630
|
-
return
|
|
1989
|
+
_result = _context11.sent;
|
|
1990
|
+
return _context11.abrupt('return', _promise2.default.resolve(_result.Success ? "" : _result.Message));
|
|
1631
1991
|
|
|
1632
1992
|
case 37:
|
|
1633
|
-
|
|
1993
|
+
_context11.next = 42;
|
|
1634
1994
|
break;
|
|
1635
1995
|
|
|
1636
1996
|
case 39:
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
return
|
|
1997
|
+
_context11.prev = 39;
|
|
1998
|
+
_context11.t0 = _context11['catch'](1);
|
|
1999
|
+
return _context11.abrupt('return', "failed");
|
|
1640
2000
|
|
|
1641
2001
|
case 42:
|
|
1642
2002
|
case 'end':
|
|
1643
|
-
return
|
|
2003
|
+
return _context11.stop();
|
|
1644
2004
|
}
|
|
1645
2005
|
}
|
|
1646
|
-
},
|
|
2006
|
+
}, _callee11, this, [[1, 39]]);
|
|
1647
2007
|
}));
|
|
1648
2008
|
|
|
1649
|
-
function validePwd(
|
|
1650
|
-
return
|
|
2009
|
+
function validePwd(_x9) {
|
|
2010
|
+
return _ref24.apply(this, arguments);
|
|
1651
2011
|
}
|
|
1652
2012
|
|
|
1653
2013
|
return validePwd;
|
|
@@ -1657,7 +2017,7 @@ var SettlementStore = (_class = function () {
|
|
|
1657
2017
|
}(), (_descriptor = _applyDecoratedDescriptor(_class.prototype, 'queryPwd', [_mobx.action], {
|
|
1658
2018
|
enumerable: true,
|
|
1659
2019
|
initializer: function initializer() {
|
|
1660
|
-
var
|
|
2020
|
+
var _this14 = this;
|
|
1661
2021
|
|
|
1662
2022
|
return function (newPass, newPassConfirm) {
|
|
1663
2023
|
if (!newPass || !newPassConfirm) {
|
|
@@ -1669,7 +2029,7 @@ var SettlementStore = (_class = function () {
|
|
|
1669
2029
|
var idstore = (0, _tplusPoslogin.PosInitData)('storeID');
|
|
1670
2030
|
return (0, _tplusApi.ccApi)({
|
|
1671
2031
|
Idstore: idstore,
|
|
1672
|
-
meMemberId:
|
|
2032
|
+
meMemberId: _this14.paymode.currentMode.memberId,
|
|
1673
2033
|
oldPassword: null,
|
|
1674
2034
|
newPassword: _tplusApi.User.pwdEncrypt(newPassConfirm),
|
|
1675
2035
|
dataSource: "POS"
|
|
@@ -1683,131 +2043,131 @@ var SettlementStore = (_class = function () {
|
|
|
1683
2043
|
}), _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], {
|
|
1684
2044
|
enumerable: true,
|
|
1685
2045
|
initializer: function initializer() {
|
|
1686
|
-
var
|
|
2046
|
+
var _this15 = this;
|
|
1687
2047
|
|
|
1688
2048
|
return function () {
|
|
1689
|
-
var
|
|
1690
|
-
var
|
|
2049
|
+
var _ref26 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee12(_this) {
|
|
2050
|
+
var _getLoginInfo2, IdStore, StoreCode, resp;
|
|
1691
2051
|
|
|
1692
|
-
return _regenerator2.default.wrap(function
|
|
2052
|
+
return _regenerator2.default.wrap(function _callee12$(_context12) {
|
|
1693
2053
|
while (1) {
|
|
1694
|
-
switch (
|
|
2054
|
+
switch (_context12.prev = _context12.next) {
|
|
1695
2055
|
case 0:
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
return (0, _tplusApi.tApi)({ Idmember:
|
|
2056
|
+
_getLoginInfo2 = _this15.getLoginInfo(), IdStore = _getLoginInfo2.IdStore, StoreCode = _getLoginInfo2.StoreCode;
|
|
2057
|
+
_context12.next = 3;
|
|
2058
|
+
return (0, _tplusApi.tApi)({ Idmember: _this15.member.ID, IdStore: IdStore, StoreCode: StoreCode }, 'chanjet.AA.DR.INewRetailMember.GetUmemberDTO', false, false);
|
|
1699
2059
|
|
|
1700
2060
|
case 3:
|
|
1701
|
-
resp =
|
|
2061
|
+
resp = _context12.sent;
|
|
1702
2062
|
|
|
1703
2063
|
_this.member = resp;
|
|
1704
2064
|
_this.paymode.updateMemberStorageCardNo(resp.StorageCardNo, resp.WalletEnabled);
|
|
1705
|
-
return
|
|
2065
|
+
return _context12.abrupt('return', _promise2.default.resolve(resp));
|
|
1706
2066
|
|
|
1707
2067
|
case 7:
|
|
1708
2068
|
case 'end':
|
|
1709
|
-
return
|
|
2069
|
+
return _context12.stop();
|
|
1710
2070
|
}
|
|
1711
2071
|
}
|
|
1712
|
-
},
|
|
2072
|
+
}, _callee12, _this15);
|
|
1713
2073
|
}));
|
|
1714
2074
|
|
|
1715
|
-
return function (
|
|
1716
|
-
return
|
|
2075
|
+
return function (_x10) {
|
|
2076
|
+
return _ref26.apply(this, arguments);
|
|
1717
2077
|
};
|
|
1718
2078
|
}();
|
|
1719
2079
|
}
|
|
1720
2080
|
}), _descriptor3 = _applyDecoratedDescriptor(_class.prototype, 'updateCurrentMode', [_mobx.action], {
|
|
1721
2081
|
enumerable: true,
|
|
1722
2082
|
initializer: function initializer() {
|
|
1723
|
-
var
|
|
2083
|
+
var _this16 = this;
|
|
1724
2084
|
|
|
1725
2085
|
return function () {
|
|
1726
|
-
var
|
|
2086
|
+
var _ref27 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee13(memberId) {
|
|
1727
2087
|
var result;
|
|
1728
|
-
return _regenerator2.default.wrap(function
|
|
2088
|
+
return _regenerator2.default.wrap(function _callee13$(_context13) {
|
|
1729
2089
|
while (1) {
|
|
1730
|
-
switch (
|
|
2090
|
+
switch (_context13.prev = _context13.next) {
|
|
1731
2091
|
case 0:
|
|
1732
|
-
|
|
2092
|
+
_context13.next = 2;
|
|
1733
2093
|
return (0, _tplusApi.ccApi)({}, '/marketingtool/MeStorageCard/getCardInfoByMemberId/' + memberId + '/' + true, false, false, { method: 'get' });
|
|
1734
2094
|
|
|
1735
2095
|
case 2:
|
|
1736
|
-
result =
|
|
2096
|
+
result = _context13.sent;
|
|
1737
2097
|
|
|
1738
2098
|
if (!(result && result.data.length)) {
|
|
1739
|
-
|
|
2099
|
+
_context13.next = 20;
|
|
1740
2100
|
break;
|
|
1741
2101
|
}
|
|
1742
2102
|
|
|
1743
2103
|
if (!(result.data.length === 1)) {
|
|
1744
|
-
|
|
2104
|
+
_context13.next = 9;
|
|
1745
2105
|
break;
|
|
1746
2106
|
}
|
|
1747
2107
|
|
|
1748
|
-
|
|
1749
|
-
return
|
|
2108
|
+
_this16.paymode.updateCardInfo(result.data[0]);
|
|
2109
|
+
return _context13.abrupt('return', result.data);
|
|
1750
2110
|
|
|
1751
2111
|
case 9:
|
|
1752
2112
|
if (!(result.data && result.data.length === 1)) {
|
|
1753
|
-
|
|
2113
|
+
_context13.next = 14;
|
|
1754
2114
|
break;
|
|
1755
2115
|
}
|
|
1756
2116
|
|
|
1757
|
-
|
|
1758
|
-
return
|
|
2117
|
+
_this16.paymode.updateCardInfo(result.data[0]);
|
|
2118
|
+
return _context13.abrupt('return', result.data);
|
|
1759
2119
|
|
|
1760
2120
|
case 14:
|
|
1761
2121
|
if (!(result.data && result.data.length > 1)) {
|
|
1762
|
-
|
|
2122
|
+
_context13.next = 18;
|
|
1763
2123
|
break;
|
|
1764
2124
|
}
|
|
1765
2125
|
|
|
1766
|
-
return
|
|
2126
|
+
return _context13.abrupt('return', result.data);
|
|
1767
2127
|
|
|
1768
2128
|
case 18:
|
|
1769
2129
|
_message2.default.warn('没有可用储值卡!');
|
|
1770
|
-
return
|
|
2130
|
+
return _context13.abrupt('return', false);
|
|
1771
2131
|
|
|
1772
2132
|
case 20:
|
|
1773
2133
|
case 'end':
|
|
1774
|
-
return
|
|
2134
|
+
return _context13.stop();
|
|
1775
2135
|
}
|
|
1776
2136
|
}
|
|
1777
|
-
},
|
|
2137
|
+
}, _callee13, _this16);
|
|
1778
2138
|
}));
|
|
1779
2139
|
|
|
1780
|
-
return function (
|
|
1781
|
-
return
|
|
2140
|
+
return function (_x11) {
|
|
2141
|
+
return _ref27.apply(this, arguments);
|
|
1782
2142
|
};
|
|
1783
2143
|
}();
|
|
1784
2144
|
}
|
|
1785
2145
|
}), _descriptor4 = _applyDecoratedDescriptor(_class.prototype, 'updateCardInfo', [_mobx.action], {
|
|
1786
2146
|
enumerable: true,
|
|
1787
2147
|
initializer: function initializer() {
|
|
1788
|
-
var
|
|
2148
|
+
var _this17 = this;
|
|
1789
2149
|
|
|
1790
|
-
return (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function
|
|
2150
|
+
return (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee14() {
|
|
1791
2151
|
var address, result;
|
|
1792
|
-
return _regenerator2.default.wrap(function
|
|
2152
|
+
return _regenerator2.default.wrap(function _callee14$(_context14) {
|
|
1793
2153
|
while (1) {
|
|
1794
|
-
switch (
|
|
2154
|
+
switch (_context14.prev = _context14.next) {
|
|
1795
2155
|
case 0:
|
|
1796
|
-
address = '/marketingtool/MeStorageCard/getCardInfoByCardNo/' +
|
|
1797
|
-
|
|
2156
|
+
address = '/marketingtool/MeStorageCard/getCardInfoByCardNo/' + _this17.paymode.currentMode.storageCardNo;
|
|
2157
|
+
_context14.next = 3;
|
|
1798
2158
|
return (0, _tplusApi.ccApi)({}, address, false, false, { method: 'get', timeout_skip: true });
|
|
1799
2159
|
|
|
1800
2160
|
case 3:
|
|
1801
|
-
result =
|
|
2161
|
+
result = _context14.sent;
|
|
1802
2162
|
|
|
1803
|
-
|
|
2163
|
+
_this17.paymode.updateCardInfo(result.data);
|
|
1804
2164
|
|
|
1805
2165
|
case 5:
|
|
1806
2166
|
case 'end':
|
|
1807
|
-
return
|
|
2167
|
+
return _context14.stop();
|
|
1808
2168
|
}
|
|
1809
2169
|
}
|
|
1810
|
-
},
|
|
2170
|
+
}, _callee14, _this17);
|
|
1811
2171
|
}));
|
|
1812
2172
|
}
|
|
1813
2173
|
}), _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);
|
|
@@ -1926,7 +2286,7 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
1926
2286
|
}, {
|
|
1927
2287
|
key: 'calcDjqCheckValue',
|
|
1928
2288
|
value: function calcDjqCheckValue(q1, dto, params) {
|
|
1929
|
-
var
|
|
2289
|
+
var _this18 = this;
|
|
1930
2290
|
|
|
1931
2291
|
var useLimitPerOrder = (0, _tplusPoslogin.PosInitData)('UseLimitPerOrder');
|
|
1932
2292
|
var qList = (0, _filter3.default)(this.currentMode.djqs, function (djq) {
|
|
@@ -1940,12 +2300,12 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
1940
2300
|
this.checkList = [];
|
|
1941
2301
|
}
|
|
1942
2302
|
|
|
1943
|
-
var
|
|
1944
|
-
isNewRetailBCPos =
|
|
2303
|
+
var _ref29 = _mutantsUtil.platform || {},
|
|
2304
|
+
isNewRetailBCPos = _ref29.isNewRetailBCPos;
|
|
1945
2305
|
|
|
1946
|
-
var _enumController$
|
|
1947
|
-
PayStyle = _enumController$
|
|
1948
|
-
Differentiate = _enumController$
|
|
2306
|
+
var _enumController$getEn18 = _mutantsUtil.enumController.getEnumOj(),
|
|
2307
|
+
PayStyle = _enumController$getEn18.PayStyle,
|
|
2308
|
+
Differentiate = _enumController$getEn18.Differentiate;
|
|
1949
2309
|
|
|
1950
2310
|
if (q1) {
|
|
1951
2311
|
if (!this.currentMode.boriginReturn && parseFloat(this.currentMode.maxamount) <= 0) {
|
|
@@ -1973,7 +2333,7 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
1973
2333
|
if (!q1.checked) {
|
|
1974
2334
|
this.checkList.forEach(function (ele, i) {
|
|
1975
2335
|
if (ele.id === q1.id) {
|
|
1976
|
-
|
|
2336
|
+
_this18.checkList.splice(i, 1);
|
|
1977
2337
|
}
|
|
1978
2338
|
});
|
|
1979
2339
|
} else {
|
|
@@ -2045,24 +2405,24 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
2045
2405
|
if (result && result.length != 0) {
|
|
2046
2406
|
result.forEach(function (element, index) {
|
|
2047
2407
|
var djq1 = false;
|
|
2048
|
-
|
|
2408
|
+
_this18.currentMode.djqs.forEach(function (djq) {
|
|
2049
2409
|
if (element.id === djq.id) {
|
|
2050
2410
|
djq1 = true;
|
|
2051
2411
|
}
|
|
2052
2412
|
});
|
|
2053
2413
|
|
|
2054
|
-
var
|
|
2055
|
-
couponCode =
|
|
2056
|
-
name =
|
|
2057
|
-
tieredAmountResult =
|
|
2058
|
-
fromDate =
|
|
2059
|
-
dateMount =
|
|
2060
|
-
promoMethodEnum =
|
|
2061
|
-
discountPct =
|
|
2062
|
-
nominalAmount =
|
|
2063
|
-
promoId =
|
|
2064
|
-
id =
|
|
2065
|
-
doorsill =
|
|
2414
|
+
var _ref30 = element || {},
|
|
2415
|
+
couponCode = _ref30.couponCode,
|
|
2416
|
+
name = _ref30.name,
|
|
2417
|
+
tieredAmountResult = _ref30.tieredAmountResult,
|
|
2418
|
+
fromDate = _ref30.fromDate,
|
|
2419
|
+
dateMount = _ref30.dateMount,
|
|
2420
|
+
promoMethodEnum = _ref30.promoMethodEnum,
|
|
2421
|
+
discountPct = _ref30.discountPct,
|
|
2422
|
+
nominalAmount = _ref30.nominalAmount,
|
|
2423
|
+
promoId = _ref30.promoId,
|
|
2424
|
+
id = _ref30.id,
|
|
2425
|
+
doorsill = _ref30.doorsill;
|
|
2066
2426
|
|
|
2067
2427
|
var condValue = tieredAmountResult.condValue,
|
|
2068
2428
|
promoDiscount = tieredAmountResult.promoDiscount,
|
|
@@ -2090,10 +2450,10 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
2090
2450
|
// couponCategoryEnum: tieredAmountResult.couponCategoryEnum,
|
|
2091
2451
|
// id
|
|
2092
2452
|
// })
|
|
2093
|
-
|
|
2453
|
+
_this18.addDjqs(couponCode, name, true, nominalAmount, promoDiscount, doorsill, element.LastTS, false, true, dto.Idmember, dateMount, displayText, promoMethodEnum, discountPct, promoId, promoRuleId, tieredAmountResult.couponCategoryEnum, id);
|
|
2094
2454
|
djq1 = false;
|
|
2095
2455
|
} else {
|
|
2096
|
-
|
|
2456
|
+
_this18.setCouponNum(element.id, couponCategoryEnum, promoMethodEnum, nominalAmount, promoDiscount);
|
|
2097
2457
|
// this.currentMode.djqs[0].couponCategoryEnum = 'couponCategoryEnum';
|
|
2098
2458
|
// djq1.couponCategoryEnum = element.tieredAmountResult.couponCategoryEnum
|
|
2099
2459
|
}
|
|
@@ -2106,11 +2466,11 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
2106
2466
|
}, {
|
|
2107
2467
|
key: 'calcDjqValue',
|
|
2108
2468
|
value: function calcDjqValue(q1) {
|
|
2109
|
-
var
|
|
2110
|
-
isNewRetailBCPos =
|
|
2469
|
+
var _ref31 = _mutantsUtil.platform || {},
|
|
2470
|
+
isNewRetailBCPos = _ref31.isNewRetailBCPos;
|
|
2111
2471
|
|
|
2112
|
-
var _enumController$
|
|
2113
|
-
Differentiate = _enumController$
|
|
2472
|
+
var _enumController$getEn19 = _mutantsUtil.enumController.getEnumOj(),
|
|
2473
|
+
Differentiate = _enumController$getEn19.Differentiate;
|
|
2114
2474
|
|
|
2115
2475
|
if (q1) {
|
|
2116
2476
|
if (!this.currentMode.boriginReturn && parseFloat(this.currentMode.maxamount) <= 0) {
|
|
@@ -2172,8 +2532,8 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
2172
2532
|
this.currentMode.errinfo = '';
|
|
2173
2533
|
var sum = this.amount;
|
|
2174
2534
|
|
|
2175
|
-
var _enumController$
|
|
2176
|
-
PayStyle = _enumController$
|
|
2535
|
+
var _enumController$getEn20 = _mutantsUtil.enumController.getEnumOj(),
|
|
2536
|
+
PayStyle = _enumController$getEn20.PayStyle;
|
|
2177
2537
|
|
|
2178
2538
|
this.thePaymodes && this.thePaymodes.forEach(function (mode) {
|
|
2179
2539
|
if (mode.paymentType === PayStyle.hyczk) {
|
|
@@ -2197,30 +2557,36 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
2197
2557
|
}, {
|
|
2198
2558
|
key: 'setPaymodes',
|
|
2199
2559
|
value: function () {
|
|
2200
|
-
var
|
|
2201
|
-
var
|
|
2560
|
+
var _ref32 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee15(type, isIntegralExchange) {
|
|
2561
|
+
var _this19 = this;
|
|
2202
2562
|
|
|
2203
|
-
var _enumController$
|
|
2563
|
+
var _ref33, isHorizontalPad, isHorizontalSunMi, isMobileEnvironment, _enumController$getEn21, settleStyleType, PayStyle, memberStoreCode, settlementCode, param, modes;
|
|
2204
2564
|
|
|
2205
|
-
return _regenerator2.default.wrap(function
|
|
2565
|
+
return _regenerator2.default.wrap(function _callee15$(_context15) {
|
|
2206
2566
|
while (1) {
|
|
2207
|
-
switch (
|
|
2567
|
+
switch (_context15.prev = _context15.next) {
|
|
2208
2568
|
case 0:
|
|
2209
|
-
|
|
2569
|
+
// 是否移动端判断
|
|
2570
|
+
_ref33 = _mutantsUtil.platform || {}, isHorizontalPad = _ref33.isHorizontalPad, isHorizontalSunMi = _ref33.isHorizontalSunMi;
|
|
2571
|
+
isMobileEnvironment = !!isHorizontalPad || !!isHorizontalSunMi;
|
|
2572
|
+
_enumController$getEn21 = _mutantsUtil.enumController.getEnumOj(), settleStyleType = _enumController$getEn21.settleStyleType, PayStyle = _enumController$getEn21.PayStyle;
|
|
2210
2573
|
memberStoreCode = settleStyleType.memberStoreCode, settlementCode = settleStyleType.settlementCode;
|
|
2211
2574
|
param = { 'settleStyleType': type == 1 ? memberStoreCode : settlementCode, isIntegralExchange: isIntegralExchange };
|
|
2212
|
-
|
|
2575
|
+
_context15.next = 7;
|
|
2213
2576
|
return (0, _tplusApi.tApi)({ param: param }, 'chanjet.RE.NewPos.GetNewStoreSettleStyles', false, false);
|
|
2214
2577
|
|
|
2215
|
-
case
|
|
2216
|
-
modes =
|
|
2578
|
+
case 7:
|
|
2579
|
+
modes = _context15.sent;
|
|
2217
2580
|
|
|
2218
2581
|
if (modes) {
|
|
2219
2582
|
(0, _mobx.runInAction)(function () {
|
|
2220
2583
|
var paymodes = [];
|
|
2221
|
-
|
|
2584
|
+
var settleLists = modes.SettleStyles;
|
|
2585
|
+
settleLists = isMobileEnvironment ? settleLists.filter(function (v) {
|
|
2586
|
+
return !v.ThirdPaymentInfo;
|
|
2587
|
+
}) : settleLists;
|
|
2588
|
+
(0, _each3.default)(settleLists, function (mode, index) {
|
|
2222
2589
|
//产品需求确认会员储值卡结算方式前端展示统一调整为“储值卡" tuzha by 2020-07-08
|
|
2223
|
-
|
|
2224
2590
|
if (mode.Code == PayStyle.hyczk) {
|
|
2225
2591
|
mode.Name = '储值卡';
|
|
2226
2592
|
}
|
|
@@ -2236,24 +2602,24 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
2236
2602
|
exchangeRate: mode.Currency ? mode.Currency.ExchangeRate : 1,
|
|
2237
2603
|
idCurrency: mode.Currency ? mode.Currency.ID : -1,
|
|
2238
2604
|
calDirection: mode.Currency ? mode.Currency.CalDirection.Id : "88",
|
|
2239
|
-
virtualPay: mode.VirtualPay
|
|
2605
|
+
virtualPay: mode.VirtualPay,
|
|
2606
|
+
thridPayment: mode.ThirdPaymentInfo
|
|
2240
2607
|
});
|
|
2241
2608
|
});
|
|
2242
|
-
|
|
2243
|
-
//modes.QuickSettleStyles
|
|
2609
|
+
_this19.paymodes = paymodes;
|
|
2244
2610
|
});
|
|
2245
2611
|
}
|
|
2246
2612
|
|
|
2247
|
-
case
|
|
2613
|
+
case 9:
|
|
2248
2614
|
case 'end':
|
|
2249
|
-
return
|
|
2615
|
+
return _context15.stop();
|
|
2250
2616
|
}
|
|
2251
2617
|
}
|
|
2252
|
-
},
|
|
2618
|
+
}, _callee15, this);
|
|
2253
2619
|
}));
|
|
2254
2620
|
|
|
2255
|
-
function setPaymodes(
|
|
2256
|
-
return
|
|
2621
|
+
function setPaymodes(_x12, _x13) {
|
|
2622
|
+
return _ref32.apply(this, arguments);
|
|
2257
2623
|
}
|
|
2258
2624
|
|
|
2259
2625
|
return setPaymodes;
|
|
@@ -2308,21 +2674,22 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
2308
2674
|
}), _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], {
|
|
2309
2675
|
enumerable: true,
|
|
2310
2676
|
initializer: function initializer() {
|
|
2311
|
-
var
|
|
2677
|
+
var _this20 = this;
|
|
2312
2678
|
|
|
2313
2679
|
return function () {
|
|
2314
|
-
|
|
2680
|
+
_this20.checkList = [];
|
|
2315
2681
|
};
|
|
2316
2682
|
}
|
|
2317
2683
|
}), _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], {
|
|
2318
2684
|
enumerable: true,
|
|
2319
2685
|
initializer: function initializer() {
|
|
2320
|
-
var
|
|
2686
|
+
var _this21 = this;
|
|
2321
2687
|
|
|
2322
2688
|
return function (id, couponNum, promoMethodEnum, nominalAmount, promoDiscount) {
|
|
2323
|
-
|
|
2689
|
+
_this21.currentMode.djqs.forEach(function (ele) {
|
|
2324
2690
|
if (ele.id === id) {
|
|
2325
|
-
|
|
2691
|
+
ele.amount = promoDiscount;
|
|
2692
|
+
promoMethodEnum == "CASH_COUPON" && (ele.nominalAmount = nominalAmount);
|
|
2326
2693
|
ele.couponCategoryEnum = couponNum;
|
|
2327
2694
|
var IsEnable = ele.couponCategoryEnum === 'RIGUP' || ele.couponCategoryEnum === 'UN_MATCH' || ele.couponCategoryEnum === "PREPARING" || ele.couponCategoryEnum === 'PROMO_LIMITED' || ele.couponCategoryEnum === 'COUPON_CONFLICT' ? false : true;
|
|
2328
2695
|
ele.IsEnable = IsEnable;
|
|
@@ -2333,13 +2700,14 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
2333
2700
|
}), _descriptor14 = _applyDecoratedDescriptor(_class3.prototype, 'addDjqs', [_mobx.action], {
|
|
2334
2701
|
enumerable: true,
|
|
2335
2702
|
initializer: function initializer() {
|
|
2336
|
-
var
|
|
2703
|
+
var _this22 = this;
|
|
2337
2704
|
|
|
2338
|
-
return function (promoCouponCode, name, IsEnable, amount, doorsill, LastTS, checked, IsRepelWithPoints, UMemberID, expired, displayText, promoMethodEnum, discountPct, promoId, promoRuleId, couponCategoryEnum, id) {
|
|
2705
|
+
return function (promoCouponCode, name, IsEnable, nominalAmount, amount, doorsill, LastTS, checked, IsRepelWithPoints, UMemberID, expired, displayText, promoMethodEnum, discountPct, promoId, promoRuleId, couponCategoryEnum, id) {
|
|
2339
2706
|
var djq = {
|
|
2340
2707
|
promoCouponCode: promoCouponCode,
|
|
2341
2708
|
name: name,
|
|
2342
2709
|
IsEnable: IsEnable,
|
|
2710
|
+
nominalAmount: nominalAmount,
|
|
2343
2711
|
amount: amount,
|
|
2344
2712
|
doorsill: doorsill,
|
|
2345
2713
|
LastTS: LastTS,
|
|
@@ -2355,13 +2723,13 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
2355
2723
|
couponCategoryEnum: couponCategoryEnum,
|
|
2356
2724
|
id: id
|
|
2357
2725
|
};
|
|
2358
|
-
|
|
2726
|
+
_this22.currentMode.djqs.push(djq);
|
|
2359
2727
|
};
|
|
2360
2728
|
}
|
|
2361
2729
|
}), _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);
|
|
2362
2730
|
var Member = exports.Member = (_class5 = function () {
|
|
2363
2731
|
function Member(m) {
|
|
2364
|
-
var
|
|
2732
|
+
var _this23 = this;
|
|
2365
2733
|
|
|
2366
2734
|
(0, _classCallCheck3.default)(this, Member);
|
|
2367
2735
|
|
|
@@ -2384,15 +2752,15 @@ var Member = exports.Member = (_class5 = function () {
|
|
|
2384
2752
|
return key == 'canusedbalancestorage';
|
|
2385
2753
|
});
|
|
2386
2754
|
|
|
2387
|
-
var
|
|
2388
|
-
isNewRetailBCPos =
|
|
2755
|
+
var _ref34 = _mutantsUtil.platform || {},
|
|
2756
|
+
isNewRetailBCPos = _ref34.isNewRetailBCPos;
|
|
2389
2757
|
|
|
2390
2758
|
(0, _mobx.runInAction)(function () {
|
|
2391
|
-
|
|
2759
|
+
_this23.cardNo = m.CardCode;
|
|
2392
2760
|
if (index >= 0) {
|
|
2393
|
-
|
|
2761
|
+
_this23.balance = parseFloat(m.DynamicPropertyValues[index]);
|
|
2394
2762
|
} else {
|
|
2395
|
-
|
|
2763
|
+
_this23.balance = _this23.rawbalance;
|
|
2396
2764
|
}
|
|
2397
2765
|
});
|
|
2398
2766
|
this.needPwd = m.MemberType ? m.MemberType.IsNeedPwd : false;
|