tplus-components-touch 3.21.1 → 3.21.2
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.
|
@@ -41,7 +41,7 @@ var _createClass2 = require('babel-runtime/helpers/createClass');
|
|
|
41
41
|
|
|
42
42
|
var _createClass3 = _interopRequireDefault(_createClass2);
|
|
43
43
|
|
|
44
|
-
var _desc, _value, _class, _descriptor, _descriptor2, _desc2, _value2, _class3, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _desc3, _value3, _class5,
|
|
44
|
+
var _desc, _value, _class, _descriptor, _descriptor2, _desc2, _value2, _class3, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _desc3, _value3, _class5, _descriptor11, _descriptor12, _descriptor13, _descriptor14, _descriptor15;
|
|
45
45
|
|
|
46
46
|
var _mobx = require('mobx');
|
|
47
47
|
|
|
@@ -216,7 +216,7 @@ var SettlementStore = (_class = function () {
|
|
|
216
216
|
detailDTO.productSpecId = item.ProductSpecId;
|
|
217
217
|
detailDTO.isManualFreeGift = item.IsPresent;
|
|
218
218
|
detailDTO.isListPriceIncludingTax = item.TaxFlag || true;
|
|
219
|
-
|
|
219
|
+
detailDTO.IsManualChangePrice = item.IsManualChangePrice;
|
|
220
220
|
if (detailDTO.IsManualChangePrice) //如果是手工改价
|
|
221
221
|
{
|
|
222
222
|
detailDTO.listPrice = item.TaxPrice;
|
|
@@ -279,7 +279,11 @@ var SettlementStore = (_class = function () {
|
|
|
279
279
|
_message2.default.error(Differentiate.COUPON + '\uFF08' + result.SN + '\uFF09\u4E0D\u53EF\u4E0E\u79EF\u5206\u4E00\u8D77\u4F7F\u7528');
|
|
280
280
|
} else {
|
|
281
281
|
var IsEnable = couponCategoryEnum === 'RIGUP' || couponCategoryEnum === 'UN_MATCH' || couponCategoryEnum === "PREPARING" || couponCategoryEnum === 'PROMO_LIMITED' || couponCategoryEnum === 'COUPON_CONFLICT' ? false : true;
|
|
282
|
-
|
|
282
|
+
|
|
283
|
+
var _ref2 = _mutantsUtil.platform || {},
|
|
284
|
+
isNewRetailBCPos = _ref2.isNewRetailBCPos;
|
|
285
|
+
|
|
286
|
+
_this2.addDjq(couponCode, name, IsEnable, promoMethodEnum == "CASH_COUPON" ? nominalAmount : isNewRetailBCPos && discountPct > 0 ? 0 : promoDiscount, condValue, null, false, !result.IsRepelWithPoints, dto.Idmember, dateMount, displayText, promoMethodEnum, discountPct, promoId, promoRuleId, couponCategoryEnum, id, true, 1);
|
|
283
287
|
}
|
|
284
288
|
});
|
|
285
289
|
if (promoVoucher.coupon_code) {
|
|
@@ -302,14 +306,14 @@ var SettlementStore = (_class = function () {
|
|
|
302
306
|
};
|
|
303
307
|
|
|
304
308
|
this.checkCoupon = function () {
|
|
305
|
-
var
|
|
306
|
-
var
|
|
309
|
+
var _ref3 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee(sn) {
|
|
310
|
+
var _ref4, isNewRetailBCPos, _enumController$getEn3, PayStyle, Differentiate;
|
|
307
311
|
|
|
308
312
|
return _regenerator2.default.wrap(function _callee$(_context) {
|
|
309
313
|
while (1) {
|
|
310
314
|
switch (_context.prev = _context.next) {
|
|
311
315
|
case 0:
|
|
312
|
-
|
|
316
|
+
_ref4 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref4.isNewRetailBCPos;
|
|
313
317
|
|
|
314
318
|
if (!isNewRetailBCPos) {
|
|
315
319
|
_context.next = 7;
|
|
@@ -377,7 +381,7 @@ var SettlementStore = (_class = function () {
|
|
|
377
381
|
}));
|
|
378
382
|
|
|
379
383
|
return function (_x) {
|
|
380
|
-
return
|
|
384
|
+
return _ref3.apply(this, arguments);
|
|
381
385
|
};
|
|
382
386
|
}();
|
|
383
387
|
|
|
@@ -491,8 +495,8 @@ var SettlementStore = (_class = function () {
|
|
|
491
495
|
var _enumController$getEn4 = _mutantsUtil.enumController.getEnumOj(),
|
|
492
496
|
PayStyle = _enumController$getEn4.PayStyle;
|
|
493
497
|
|
|
494
|
-
var
|
|
495
|
-
isNewRetailBCPos =
|
|
498
|
+
var _ref5 = _mutantsUtil.platform || {},
|
|
499
|
+
isNewRetailBCPos = _ref5.isNewRetailBCPos;
|
|
496
500
|
|
|
497
501
|
(0, _each3.default)(this.dto.RetailPaymentDetails, function (detail) {
|
|
498
502
|
var themode = (0, _find3.default)(_this5.paymode.paymodes, { 'idSettleStyle': detail.IdsettleStyle });
|
|
@@ -515,14 +519,14 @@ var SettlementStore = (_class = function () {
|
|
|
515
519
|
if (themode.paymentType == PayStyle.djq) {
|
|
516
520
|
(0, _each3.default)(_this5.dto.RetailCouponDetails, function (djq) {
|
|
517
521
|
if (isNewRetailBCPos) {
|
|
518
|
-
var
|
|
519
|
-
displayText =
|
|
520
|
-
promoRuleId =
|
|
521
|
-
dateMount =
|
|
522
|
-
promoMethodEnum =
|
|
523
|
-
discountPct =
|
|
524
|
-
promoId =
|
|
525
|
-
id =
|
|
522
|
+
var _ref6 = djq || {},
|
|
523
|
+
displayText = _ref6.displayText,
|
|
524
|
+
promoRuleId = _ref6.promoRuleId,
|
|
525
|
+
dateMount = _ref6.dateMount,
|
|
526
|
+
promoMethodEnum = _ref6.promoMethodEnum,
|
|
527
|
+
discountPct = _ref6.discountPct,
|
|
528
|
+
promoId = _ref6.promoId,
|
|
529
|
+
id = _ref6.id;
|
|
526
530
|
|
|
527
531
|
_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);
|
|
528
532
|
return;
|
|
@@ -604,9 +608,9 @@ var SettlementStore = (_class = function () {
|
|
|
604
608
|
}, {
|
|
605
609
|
key: 'getLoginInfo',
|
|
606
610
|
value: function getLoginInfo() {
|
|
607
|
-
var
|
|
608
|
-
|
|
609
|
-
loginInfo =
|
|
611
|
+
var _ref7 = _mutantsMicrofx.localStore.get('user') || {},
|
|
612
|
+
_ref7$loginInfo = _ref7.loginInfo,
|
|
613
|
+
loginInfo = _ref7$loginInfo === undefined ? {} : _ref7$loginInfo;
|
|
610
614
|
|
|
611
615
|
return loginInfo;
|
|
612
616
|
}
|
|
@@ -625,8 +629,8 @@ var SettlementStore = (_class = function () {
|
|
|
625
629
|
var IdStore = this.storeInfo.storeID;
|
|
626
630
|
var StoreCode = this.storeInfo.storeCode; //_find(this.storeInfo.storeInfos,(store)=>{return store.ID==IdStore;}).Code;
|
|
627
631
|
|
|
628
|
-
var
|
|
629
|
-
isNewRetailBCPos =
|
|
632
|
+
var _ref8 = _mutantsUtil.platform || {},
|
|
633
|
+
isNewRetailBCPos = _ref8.isNewRetailBCPos;
|
|
630
634
|
|
|
631
635
|
var address = '';
|
|
632
636
|
if (isNewRetailBCPos) {
|
|
@@ -638,8 +642,8 @@ var SettlementStore = (_class = function () {
|
|
|
638
642
|
var data = JSON.parse(result.Data);
|
|
639
643
|
var m = data && data.length > 0 && data[0];
|
|
640
644
|
|
|
641
|
-
var
|
|
642
|
-
isNewRetailBCPos =
|
|
645
|
+
var _ref9 = _mutantsUtil.platform || {},
|
|
646
|
+
isNewRetailBCPos = _ref9.isNewRetailBCPos;
|
|
643
647
|
|
|
644
648
|
if (isNewRetailBCPos) {
|
|
645
649
|
_this7.paymode && _this7.paymode.currentMode.member.setMeStorageCardId(m.MeStorageCardId);
|
|
@@ -927,7 +931,7 @@ var SettlementStore = (_class = function () {
|
|
|
927
931
|
}, {
|
|
928
932
|
key: 'commit',
|
|
929
933
|
value: function () {
|
|
930
|
-
var
|
|
934
|
+
var _ref10 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2(bTest) {
|
|
931
935
|
return _regenerator2.default.wrap(function _callee2$(_context2) {
|
|
932
936
|
while (1) {
|
|
933
937
|
switch (_context2.prev = _context2.next) {
|
|
@@ -982,7 +986,7 @@ var SettlementStore = (_class = function () {
|
|
|
982
986
|
}));
|
|
983
987
|
|
|
984
988
|
function commit(_x2) {
|
|
985
|
-
return
|
|
989
|
+
return _ref10.apply(this, arguments);
|
|
986
990
|
}
|
|
987
991
|
|
|
988
992
|
return commit;
|
|
@@ -1028,20 +1032,20 @@ var SettlementStore = (_class = function () {
|
|
|
1028
1032
|
IPMSG = JSON.parse(window.localStorage.IPMSG);
|
|
1029
1033
|
}
|
|
1030
1034
|
return (0, _tplusApi.tApi)({ dto: this.dto }, 'chanjet.ME.INewRetailMemberStorage.Save', false, false).then(function (resp) {
|
|
1031
|
-
var
|
|
1032
|
-
isHorizontalPad =
|
|
1033
|
-
isHorizontalSunMi =
|
|
1035
|
+
var _ref11 = _mutantsUtil.platform || {},
|
|
1036
|
+
isHorizontalPad = _ref11.isHorizontalPad,
|
|
1037
|
+
isHorizontalSunMi = _ref11.isHorizontalSunMi;
|
|
1034
1038
|
|
|
1035
1039
|
if (isHorizontalPad === true) {
|
|
1036
1040
|
// pad打印
|
|
1037
1041
|
//执行移动端云打印
|
|
1038
1042
|
if (_this10.cloudPrintArguments) {
|
|
1039
|
-
var
|
|
1040
|
-
Open =
|
|
1041
|
-
Key =
|
|
1042
|
-
Sign =
|
|
1043
|
-
Name =
|
|
1044
|
-
Card =
|
|
1043
|
+
var _ref12 = _this10.cloudPrintArguments || {},
|
|
1044
|
+
Open = _ref12.Open,
|
|
1045
|
+
Key = _ref12.Key,
|
|
1046
|
+
Sign = _ref12.Sign,
|
|
1047
|
+
Name = _ref12.Name,
|
|
1048
|
+
Card = _ref12.Card;
|
|
1045
1049
|
|
|
1046
1050
|
if (!Open) {
|
|
1047
1051
|
_message2.default.warn(t('云打印未启用,请设置。'));
|
|
@@ -1079,8 +1083,8 @@ var SettlementStore = (_class = function () {
|
|
|
1079
1083
|
return;
|
|
1080
1084
|
} else {
|
|
1081
1085
|
if (global.StoragePrintProcessBlock) {
|
|
1082
|
-
var
|
|
1083
|
-
isNewRetailBCPos =
|
|
1086
|
+
var _ref13 = _mutantsUtil.platform || {},
|
|
1087
|
+
isNewRetailBCPos = _ref13.isNewRetailBCPos;
|
|
1084
1088
|
|
|
1085
1089
|
if (isNewRetailBCPos) {
|
|
1086
1090
|
global.StoragePrintProcessBlock.execute(resp);
|
|
@@ -1098,10 +1102,10 @@ var SettlementStore = (_class = function () {
|
|
|
1098
1102
|
}, {
|
|
1099
1103
|
key: 'save',
|
|
1100
1104
|
value: function () {
|
|
1101
|
-
var
|
|
1105
|
+
var _ref14 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee3() {
|
|
1102
1106
|
var _this11 = this;
|
|
1103
1107
|
|
|
1104
|
-
var _enumController$getEn13, PayStyle,
|
|
1108
|
+
var _enumController$getEn13, PayStyle, _ref16, isNewRetailBCPos, IPMSG, RetailTypeEnum;
|
|
1105
1109
|
|
|
1106
1110
|
return _regenerator2.default.wrap(function _callee3$(_context3) {
|
|
1107
1111
|
while (1) {
|
|
@@ -1181,8 +1185,8 @@ var SettlementStore = (_class = function () {
|
|
|
1181
1185
|
}
|
|
1182
1186
|
});
|
|
1183
1187
|
|
|
1184
|
-
var
|
|
1185
|
-
isNewRetailBCPos =
|
|
1188
|
+
var _ref15 = _mutantsUtil.platform || {},
|
|
1189
|
+
isNewRetailBCPos = _ref15.isNewRetailBCPos;
|
|
1186
1190
|
|
|
1187
1191
|
if (_this11.dto.RetailStorageDetails.length > 0) {
|
|
1188
1192
|
var themode = (0, _find3.default)(_this11.paymode.paymodes, { 'paymentType': PayStyle.hyczk });
|
|
@@ -1216,7 +1220,7 @@ var SettlementStore = (_class = function () {
|
|
|
1216
1220
|
_this11.dto.Idmember = Idmember;
|
|
1217
1221
|
}
|
|
1218
1222
|
});
|
|
1219
|
-
|
|
1223
|
+
_ref16 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref16.isNewRetailBCPos;
|
|
1220
1224
|
|
|
1221
1225
|
console.log('bc_pos\u73AF\u5883:' + isNewRetailBCPos + ',\u7ED3\u7B97\u6570\u636E\uFF1A', this.dto);
|
|
1222
1226
|
|
|
@@ -1285,7 +1289,7 @@ var SettlementStore = (_class = function () {
|
|
|
1285
1289
|
}));
|
|
1286
1290
|
|
|
1287
1291
|
function save() {
|
|
1288
|
-
return
|
|
1292
|
+
return _ref14.apply(this, arguments);
|
|
1289
1293
|
}
|
|
1290
1294
|
|
|
1291
1295
|
return save;
|
|
@@ -1298,7 +1302,7 @@ var SettlementStore = (_class = function () {
|
|
|
1298
1302
|
}, {
|
|
1299
1303
|
key: 'querySettleResult',
|
|
1300
1304
|
value: function () {
|
|
1301
|
-
var
|
|
1305
|
+
var _ref17 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee4() {
|
|
1302
1306
|
return _regenerator2.default.wrap(function _callee4$(_context4) {
|
|
1303
1307
|
while (1) {
|
|
1304
1308
|
switch (_context4.prev = _context4.next) {
|
|
@@ -1326,7 +1330,7 @@ var SettlementStore = (_class = function () {
|
|
|
1326
1330
|
}));
|
|
1327
1331
|
|
|
1328
1332
|
function querySettleResult() {
|
|
1329
|
-
return
|
|
1333
|
+
return _ref17.apply(this, arguments);
|
|
1330
1334
|
}
|
|
1331
1335
|
|
|
1332
1336
|
return querySettleResult;
|
|
@@ -1352,14 +1356,14 @@ var SettlementStore = (_class = function () {
|
|
|
1352
1356
|
}, {
|
|
1353
1357
|
key: 'validePwd',
|
|
1354
1358
|
value: function () {
|
|
1355
|
-
var
|
|
1356
|
-
var
|
|
1359
|
+
var _ref18 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee5(value) {
|
|
1360
|
+
var _ref19, isNewRetailBCPos, cook1, cook2, message, result, count, _result;
|
|
1357
1361
|
|
|
1358
1362
|
return _regenerator2.default.wrap(function _callee5$(_context5) {
|
|
1359
1363
|
while (1) {
|
|
1360
1364
|
switch (_context5.prev = _context5.next) {
|
|
1361
1365
|
case 0:
|
|
1362
|
-
|
|
1366
|
+
_ref19 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref19.isNewRetailBCPos;
|
|
1363
1367
|
_context5.prev = 1;
|
|
1364
1368
|
|
|
1365
1369
|
if (!isNewRetailBCPos) {
|
|
@@ -1443,7 +1447,7 @@ var SettlementStore = (_class = function () {
|
|
|
1443
1447
|
}));
|
|
1444
1448
|
|
|
1445
1449
|
function validePwd(_x3) {
|
|
1446
|
-
return
|
|
1450
|
+
return _ref18.apply(this, arguments);
|
|
1447
1451
|
}
|
|
1448
1452
|
|
|
1449
1453
|
return validePwd;
|
|
@@ -1482,7 +1486,7 @@ var SettlementStore = (_class = function () {
|
|
|
1482
1486
|
var _this13 = this;
|
|
1483
1487
|
|
|
1484
1488
|
return function () {
|
|
1485
|
-
var
|
|
1489
|
+
var _ref20 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee6(_this) {
|
|
1486
1490
|
var _getLoginInfo, IdStore, StoreCode, resp;
|
|
1487
1491
|
|
|
1488
1492
|
return _regenerator2.default.wrap(function _callee6$(_context6) {
|
|
@@ -1509,14 +1513,14 @@ var SettlementStore = (_class = function () {
|
|
|
1509
1513
|
}));
|
|
1510
1514
|
|
|
1511
1515
|
return function (_x4) {
|
|
1512
|
-
return
|
|
1516
|
+
return _ref20.apply(this, arguments);
|
|
1513
1517
|
};
|
|
1514
1518
|
}();
|
|
1515
1519
|
}
|
|
1516
1520
|
}), _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);
|
|
1517
1521
|
exports.default = SettlementStore;
|
|
1518
1522
|
var PayMode = exports.PayMode = (_class3 = function () {
|
|
1519
|
-
|
|
1523
|
+
//应收
|
|
1520
1524
|
function PayMode() {
|
|
1521
1525
|
// this.amount=getFixedNumber(amount);
|
|
1522
1526
|
// this.calcReserved();
|
|
@@ -1538,15 +1542,19 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
1538
1542
|
_initDefineProp(this, 'thePaymodes', _descriptor7, this);
|
|
1539
1543
|
|
|
1540
1544
|
this.currentMode = null;
|
|
1545
|
+
this.checkList = [];
|
|
1541
1546
|
this.settle = {
|
|
1542
1547
|
name: "复合结算",
|
|
1543
1548
|
hotKey: "Ctrl+M"
|
|
1544
1549
|
};
|
|
1545
1550
|
|
|
1546
|
-
_initDefineProp(this, '
|
|
1551
|
+
_initDefineProp(this, 'calcCheckList', _descriptor8, this);
|
|
1552
|
+
|
|
1553
|
+
_initDefineProp(this, 'setCouponNum', _descriptor9, this);
|
|
1547
1554
|
|
|
1548
|
-
_initDefineProp(this, 'addDjqs',
|
|
1549
|
-
}
|
|
1555
|
+
_initDefineProp(this, 'addDjqs', _descriptor10, this);
|
|
1556
|
+
}
|
|
1557
|
+
// @observable store = null;
|
|
1550
1558
|
|
|
1551
1559
|
|
|
1552
1560
|
(0, _createClass3.default)(PayMode, [{
|
|
@@ -1594,8 +1602,8 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
1594
1602
|
return;
|
|
1595
1603
|
}
|
|
1596
1604
|
|
|
1597
|
-
var
|
|
1598
|
-
isNewRetailBCPos =
|
|
1605
|
+
var _ref21 = _mutantsUtil.platform || {},
|
|
1606
|
+
isNewRetailBCPos = _ref21.isNewRetailBCPos;
|
|
1599
1607
|
|
|
1600
1608
|
var _enumController$getEn14 = _mutantsUtil.enumController.getEnumOj(),
|
|
1601
1609
|
PayStyle = _enumController$getEn14.PayStyle,
|
|
@@ -1627,16 +1635,30 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
1627
1635
|
(0, _each3.default)((0, _filter3.default)(this.currentMode.djqs, function (djq) {
|
|
1628
1636
|
return djq.checked;
|
|
1629
1637
|
}), function (q) {
|
|
1638
|
+
if (q.discountPct > 0) {
|
|
1639
|
+
if (q.amount === 0) {
|
|
1640
|
+
q.amount = (1 - q.discountPct) * _this14.currentMode.receivable;
|
|
1641
|
+
console.log(q.amount, _this14.currentMode.receivable, 'amount111111111');
|
|
1642
|
+
}
|
|
1643
|
+
}
|
|
1630
1644
|
sum = Math.Add(sum, q.amount);
|
|
1631
1645
|
});
|
|
1646
|
+
console.log(this.receivable, sum, this.currentMode.maxamount, 'amount3333333333');
|
|
1632
1647
|
this.currentMode.value = (0, _utils.getFixedNumber)(Math.min(this.receivable, sum, this.currentMode.maxamount));
|
|
1633
1648
|
this.currentMode.receivable = (0, _utils.getFixedNumber)(this.receivable - this.currentMode.value);
|
|
1634
1649
|
this.currentMode.overchargesAmount = (0, _utils.getFixedNumber)(sum - this.currentMode.value);
|
|
1650
|
+
if (!q1.checked) {
|
|
1651
|
+
this.checkList.forEach(function (ele, i) {
|
|
1652
|
+
if (ele.id === q1.id) {
|
|
1653
|
+
_this14.checkList.splice(i, 1);
|
|
1654
|
+
}
|
|
1655
|
+
});
|
|
1656
|
+
return;
|
|
1657
|
+
}
|
|
1635
1658
|
var promoVoucher = {};
|
|
1636
1659
|
promoVoucher.boName = "Retail";
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
});
|
|
1660
|
+
this.checkList.push(q1);
|
|
1661
|
+
// promoVoucher.promoLinks = _filter(this.currentMode.djqs,djq=>djq.checked);
|
|
1640
1662
|
promoVoucher.meMemberId = this.currentMode.member.id;
|
|
1641
1663
|
promoVoucher.storeFactorId = (0, _tplusPoslogin.PosInitData)('storeID');
|
|
1642
1664
|
promoVoucher.voucherDetailList = [];
|
|
@@ -1650,7 +1672,7 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
1650
1672
|
detailDTO.productSpecId = item.ProductSpecId;
|
|
1651
1673
|
detailDTO.isManualFreeGift = item.IsPresent;
|
|
1652
1674
|
detailDTO.isListPriceIncludingTax = item.TaxFlag || true;
|
|
1653
|
-
|
|
1675
|
+
detailDTO.IsManualChangePrice = item.IsManualChangePrice;
|
|
1654
1676
|
if (detailDTO.IsManualChangePrice) //如果是手工改价
|
|
1655
1677
|
{
|
|
1656
1678
|
detailDTO.listPrice = item.TaxPrice;
|
|
@@ -1681,6 +1703,7 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
1681
1703
|
// 促销 end
|
|
1682
1704
|
promoVoucher.voucherDetailList.push(detailDTO);
|
|
1683
1705
|
});
|
|
1706
|
+
promoVoucher.promoLinks = this.checkList;
|
|
1684
1707
|
return (0, _tplusApi.ccApi)((0, _extends3.default)({}, promoVoucher), 'promotion/PromoCalculate/findUsefulCouponPromoList', false, false, { method: 'post', timeout_skip: true }).then(function (result) {
|
|
1685
1708
|
if (result && result.length != 0) {
|
|
1686
1709
|
result.forEach(function (element) {
|
|
@@ -1688,18 +1711,18 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
1688
1711
|
return djq.id === element.id;
|
|
1689
1712
|
});
|
|
1690
1713
|
|
|
1691
|
-
var
|
|
1692
|
-
couponCode =
|
|
1693
|
-
name =
|
|
1694
|
-
tieredAmountResult =
|
|
1695
|
-
fromDate =
|
|
1696
|
-
dateMount =
|
|
1697
|
-
promoMethodEnum =
|
|
1698
|
-
discountPct =
|
|
1699
|
-
nominalAmount =
|
|
1700
|
-
promoId =
|
|
1701
|
-
id =
|
|
1702
|
-
doorsill =
|
|
1714
|
+
var _ref22 = element || {},
|
|
1715
|
+
couponCode = _ref22.couponCode,
|
|
1716
|
+
name = _ref22.name,
|
|
1717
|
+
tieredAmountResult = _ref22.tieredAmountResult,
|
|
1718
|
+
fromDate = _ref22.fromDate,
|
|
1719
|
+
dateMount = _ref22.dateMount,
|
|
1720
|
+
promoMethodEnum = _ref22.promoMethodEnum,
|
|
1721
|
+
discountPct = _ref22.discountPct,
|
|
1722
|
+
nominalAmount = _ref22.nominalAmount,
|
|
1723
|
+
promoId = _ref22.promoId,
|
|
1724
|
+
id = _ref22.id,
|
|
1725
|
+
doorsill = _ref22.doorsill;
|
|
1703
1726
|
|
|
1704
1727
|
var condValue = tieredAmountResult.condValue,
|
|
1705
1728
|
promoDiscount = tieredAmountResult.promoDiscount,
|
|
@@ -1741,8 +1764,8 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
1741
1764
|
}, {
|
|
1742
1765
|
key: 'calcDjqValue',
|
|
1743
1766
|
value: function calcDjqValue(q1) {
|
|
1744
|
-
var
|
|
1745
|
-
isNewRetailBCPos =
|
|
1767
|
+
var _ref23 = _mutantsUtil.platform || {},
|
|
1768
|
+
isNewRetailBCPos = _ref23.isNewRetailBCPos;
|
|
1746
1769
|
|
|
1747
1770
|
var _enumController$getEn15 = _mutantsUtil.enumController.getEnumOj(),
|
|
1748
1771
|
Differentiate = _enumController$getEn15.Differentiate;
|
|
@@ -1821,7 +1844,7 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
1821
1844
|
}, {
|
|
1822
1845
|
key: 'setPaymodes',
|
|
1823
1846
|
value: function () {
|
|
1824
|
-
var
|
|
1847
|
+
var _ref24 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee7(type, isIntegralExchange) {
|
|
1825
1848
|
var _this15 = this;
|
|
1826
1849
|
|
|
1827
1850
|
var _enumController$getEn16, settleStyleType, PayStyle, memberStoreCode, settlementCode, param, modes;
|
|
@@ -1875,7 +1898,7 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
1875
1898
|
}));
|
|
1876
1899
|
|
|
1877
1900
|
function setPaymodes(_x5, _x6) {
|
|
1878
|
-
return
|
|
1901
|
+
return _ref24.apply(this, arguments);
|
|
1879
1902
|
}
|
|
1880
1903
|
|
|
1881
1904
|
return setPaymodes;
|
|
@@ -1917,13 +1940,22 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
1917
1940
|
initializer: function initializer() {
|
|
1918
1941
|
return [];
|
|
1919
1942
|
}
|
|
1920
|
-
}), _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),
|
|
1943
|
+
}), _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), _descriptor8 = _applyDecoratedDescriptor(_class3.prototype, 'calcCheckList', [_mobx.action], {
|
|
1921
1944
|
enumerable: true,
|
|
1922
1945
|
initializer: function initializer() {
|
|
1923
1946
|
var _this16 = this;
|
|
1924
1947
|
|
|
1948
|
+
return function () {
|
|
1949
|
+
_this16.checkList = [];
|
|
1950
|
+
};
|
|
1951
|
+
}
|
|
1952
|
+
}), _applyDecoratedDescriptor(_class3.prototype, 'calcDjqCheckValue', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class3.prototype, 'calcDjqCheckValue'), _class3.prototype), _descriptor9 = _applyDecoratedDescriptor(_class3.prototype, 'setCouponNum', [_mobx.action], {
|
|
1953
|
+
enumerable: true,
|
|
1954
|
+
initializer: function initializer() {
|
|
1955
|
+
var _this17 = this;
|
|
1956
|
+
|
|
1925
1957
|
return function (id, couponNum, code) {
|
|
1926
|
-
|
|
1958
|
+
_this17.currentMode.djqs.forEach(function (ele) {
|
|
1927
1959
|
if (ele.id === id) {
|
|
1928
1960
|
ele.couponCategoryEnum = couponNum;
|
|
1929
1961
|
var IsEnable = ele.couponCategoryEnum === 'RIGUP' || ele.couponCategoryEnum === 'UN_MATCH' || ele.couponCategoryEnum === "PREPARING" || ele.couponCategoryEnum === 'PROMO_LIMITED' || ele.couponCategoryEnum === 'COUPON_CONFLICT' ? false : true;
|
|
@@ -1932,10 +1964,10 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
1932
1964
|
});
|
|
1933
1965
|
};
|
|
1934
1966
|
}
|
|
1935
|
-
}),
|
|
1967
|
+
}), _descriptor10 = _applyDecoratedDescriptor(_class3.prototype, 'addDjqs', [_mobx.action], {
|
|
1936
1968
|
enumerable: true,
|
|
1937
1969
|
initializer: function initializer() {
|
|
1938
|
-
var
|
|
1970
|
+
var _this18 = this;
|
|
1939
1971
|
|
|
1940
1972
|
return function (promoCouponCode, name, IsEnable, amount, doorsill, LastTS, checked, IsRepelWithPoints, UMemberID, expired, displayText, promoMethodEnum, discountPct, promoId, promoRuleId, couponCategoryEnum, id) {
|
|
1941
1973
|
var djq = {
|
|
@@ -1957,25 +1989,25 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
1957
1989
|
couponCategoryEnum: couponCategoryEnum,
|
|
1958
1990
|
id: id
|
|
1959
1991
|
};
|
|
1960
|
-
|
|
1992
|
+
_this18.currentMode.djqs.push(djq);
|
|
1961
1993
|
};
|
|
1962
1994
|
}
|
|
1963
1995
|
}), _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);
|
|
1964
1996
|
var Member = exports.Member = (_class5 = function () {
|
|
1965
1997
|
function Member(m) {
|
|
1966
|
-
var
|
|
1998
|
+
var _this19 = this;
|
|
1967
1999
|
|
|
1968
2000
|
(0, _classCallCheck3.default)(this, Member);
|
|
1969
2001
|
|
|
1970
|
-
_initDefineProp(this, 'cardNo',
|
|
2002
|
+
_initDefineProp(this, 'cardNo', _descriptor11, this);
|
|
1971
2003
|
|
|
1972
|
-
_initDefineProp(this, 'balance',
|
|
2004
|
+
_initDefineProp(this, 'balance', _descriptor12, this);
|
|
1973
2005
|
|
|
1974
|
-
_initDefineProp(this, 'exchangable',
|
|
2006
|
+
_initDefineProp(this, 'exchangable', _descriptor13, this);
|
|
1975
2007
|
|
|
1976
|
-
_initDefineProp(this, 'meStorageCardId',
|
|
2008
|
+
_initDefineProp(this, 'meStorageCardId', _descriptor14, this);
|
|
1977
2009
|
|
|
1978
|
-
_initDefineProp(this, 'StorageCardNo',
|
|
2010
|
+
_initDefineProp(this, 'StorageCardNo', _descriptor15, this);
|
|
1979
2011
|
|
|
1980
2012
|
if (m) {
|
|
1981
2013
|
this.id = m.ID;
|
|
@@ -1986,16 +2018,16 @@ var Member = exports.Member = (_class5 = function () {
|
|
|
1986
2018
|
return key == 'canusedbalancestorage';
|
|
1987
2019
|
});
|
|
1988
2020
|
|
|
1989
|
-
var
|
|
1990
|
-
isNewRetailBCPos =
|
|
2021
|
+
var _ref25 = _mutantsUtil.platform || {},
|
|
2022
|
+
isNewRetailBCPos = _ref25.isNewRetailBCPos;
|
|
1991
2023
|
|
|
1992
2024
|
m.StorageCardNo && (this.StorageCardNo = m.StorageCardNo);
|
|
1993
2025
|
(0, _mobx.runInAction)(function () {
|
|
1994
|
-
|
|
2026
|
+
_this19.cardNo = m.CardCode;
|
|
1995
2027
|
if (index >= 0) {
|
|
1996
|
-
|
|
2028
|
+
_this19.balance = parseFloat(m.DynamicPropertyValues[index]);
|
|
1997
2029
|
} else {
|
|
1998
|
-
|
|
2030
|
+
_this19.balance = _this19.rawbalance;
|
|
1999
2031
|
}
|
|
2000
2032
|
});
|
|
2001
2033
|
this.needPwd = m.MemberType ? m.MemberType.IsNeedPwd : false;
|
|
@@ -2027,19 +2059,19 @@ var Member = exports.Member = (_class5 = function () {
|
|
|
2027
2059
|
}
|
|
2028
2060
|
}]);
|
|
2029
2061
|
return Member;
|
|
2030
|
-
}(), (
|
|
2062
|
+
}(), (_descriptor11 = _applyDecoratedDescriptor(_class5.prototype, 'cardNo', [_mobx.observable], {
|
|
2031
2063
|
enumerable: true,
|
|
2032
2064
|
initializer: null
|
|
2033
|
-
}),
|
|
2065
|
+
}), _descriptor12 = _applyDecoratedDescriptor(_class5.prototype, 'balance', [_mobx.observable], {
|
|
2034
2066
|
enumerable: true,
|
|
2035
2067
|
initializer: null
|
|
2036
|
-
}),
|
|
2068
|
+
}), _descriptor13 = _applyDecoratedDescriptor(_class5.prototype, 'exchangable', [_mobx.observable], {
|
|
2037
2069
|
enumerable: true,
|
|
2038
2070
|
initializer: null
|
|
2039
|
-
}),
|
|
2071
|
+
}), _descriptor14 = _applyDecoratedDescriptor(_class5.prototype, 'meStorageCardId', [_mobx.observable], {
|
|
2040
2072
|
enumerable: true,
|
|
2041
2073
|
initializer: null
|
|
2042
|
-
}),
|
|
2074
|
+
}), _descriptor15 = _applyDecoratedDescriptor(_class5.prototype, 'StorageCardNo', [_mobx.observable], {
|
|
2043
2075
|
enumerable: true,
|
|
2044
2076
|
initializer: null
|
|
2045
2077
|
}), _applyDecoratedDescriptor(_class5.prototype, 'setExchangable', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class5.prototype, 'setExchangable'), _class5.prototype), _applyDecoratedDescriptor(_class5.prototype, 'setCardNo', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class5.prototype, 'setCardNo'), _class5.prototype), _applyDecoratedDescriptor(_class5.prototype, 'setMeStorageCardId', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class5.prototype, 'setMeStorageCardId'), _class5.prototype), _applyDecoratedDescriptor(_class5.prototype, 'setStorageCardNo', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class5.prototype, 'setStorageCardNo'), _class5.prototype)), _class5);
|