tplus-components-touch 3.45.4 → 3.46.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/message/index.js +4 -3
- package/dist/components/message/index.js.map +1 -1
- package/dist/components/modalWraper/index.js +1 -16
- package/dist/components/modalWraper/index.js.map +1 -1
- package/dist/components/modalWraper/style.less +0 -6
- package/dist/components/settlement/asyncModal.js +1 -4
- package/dist/components/settlement/asyncModal.js.map +1 -1
- package/dist/components/settlement/settlement.js +216 -286
- package/dist/components/settlement/settlement.js.map +1 -1
- package/dist/components/settlement/settlement.less +0 -3
- package/dist/components/settlement/settlementStore.js +705 -708
- package/dist/components/settlement/settlementStore.js.map +1 -1
- package/dist/components/ticon/iconfont/demo_index.html +3 -3
- package/dist/components/ticon/iconfont/iconfont.css +3 -3
- package/dist/components/ticon/iconfont/iconfont.eot +0 -0
- package/dist/components/ticon/iconfont/iconfont.js +1 -2
- package/dist/components/ticon/iconfont/iconfont.js.map +1 -1
- package/dist/components/ticon/iconfont/iconfont.svg +593 -0
- package/dist/components/ticon/iconfont/iconfont.ttf +0 -0
- package/dist/components/ticon/iconfont/iconfont.woff +0 -0
- package/dist/components/ticon/iconfont/iconfont.woff2 +0 -0
- package/dist/components/touchTable/index.js +24 -35
- package/dist/components/touchTable/index.js.map +1 -1
- package/dist/components/touchTable/utils.js +0 -13
- package/dist/components/touchTable/utils.js.map +1 -1
- package/dist/index.js +3 -8
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/dist/components/settlement/settlementApi.js +0 -512
- package/dist/components/settlement/settlementApi.js.map +0 -1
@@ -45,7 +45,7 @@ var _createClass2 = require('babel-runtime/helpers/createClass');
|
|
45
45
|
|
46
46
|
var _createClass3 = _interopRequireDefault(_createClass2);
|
47
47
|
|
48
|
-
var _desc, _value, _class, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6,
|
48
|
+
var _desc, _value, _class, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _desc2, _value2, _class3, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13, _descriptor14, _descriptor15, _descriptor16, _desc3, _value3, _class5, _descriptor17, _descriptor18, _descriptor19, _descriptor20, _descriptor21;
|
49
49
|
|
50
50
|
var _mobx = require('mobx');
|
51
51
|
|
@@ -117,10 +117,6 @@ var _reduce2 = require('lodash/reduce');
|
|
117
117
|
|
118
118
|
var _reduce3 = _interopRequireDefault(_reduce2);
|
119
119
|
|
120
|
-
var _settlementApi = require('./settlementApi');
|
121
|
-
|
122
|
-
var _settlementApi2 = _interopRequireDefault(_settlementApi);
|
123
|
-
|
124
120
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
125
121
|
|
126
122
|
function _initDefineProp(target, property, descriptor, context) {
|
@@ -168,18 +164,350 @@ function _initializerWarningHelper(descriptor, context) {
|
|
168
164
|
|
169
165
|
var t = _mutantsMicrofx.i18n.getFixedT(null, 'newretail');
|
170
166
|
|
171
|
-
var SettlementStore = (_class =
|
167
|
+
var SettlementStore = (_class = function () {
|
172
168
|
// 预售都是全款;预订是否全款,在点击确认支付时计算订金和商品金额计算得出
|
173
169
|
function SettlementStore() {
|
170
|
+
var _this2 = this;
|
171
|
+
|
174
172
|
(0, _classCallCheck3.default)(this, SettlementStore);
|
173
|
+
this.paymode = null;
|
174
|
+
this.dto = null;
|
175
|
+
this.dtoParams = null;
|
176
|
+
this.member = null;
|
177
|
+
this.brefund = false;
|
178
|
+
this.bquick = false;
|
179
|
+
this.boriginReturn = false;
|
180
|
+
|
181
|
+
_initDefineProp(this, 'newStyle', _descriptor, this);
|
182
|
+
|
183
|
+
this.isFull = true;
|
184
|
+
|
185
|
+
_initDefineProp(this, 'setNewStyle', _descriptor2, this);
|
186
|
+
|
187
|
+
_initDefineProp(this, 'queryPwd', _descriptor3, this);
|
188
|
+
|
189
|
+
_initDefineProp(this, 'updateMemberInfo', _descriptor4, this);
|
190
|
+
|
191
|
+
_initDefineProp(this, 'updateCurrentMode', _descriptor5, this);
|
192
|
+
|
193
|
+
_initDefineProp(this, 'updateCardInfo', _descriptor6, this);
|
194
|
+
|
195
|
+
this.handleCzkData = function (m) {
|
196
|
+
if (!m || !m.StorageCardNo) {
|
197
|
+
(0, _mobx.runInAction)(function () {
|
198
|
+
_this2.paymode.currentMode.errinfo = "无效的会员卡号";
|
199
|
+
});
|
200
|
+
} else {
|
201
|
+
(0, _mobx.runInAction)(function () {
|
202
|
+
_this2.paymode.currentMode.errinfo = "";
|
203
|
+
_this2.paymode.currentMode.memberId = m.ID;
|
204
|
+
_this2.paymode.currentMode.value = (0, _utils.getFixedNumber)(_this2.brefund ? _this2.paymode.receivable : Math.max(_this2.paymode.receivable, 0));
|
205
|
+
_this2.updateEvent();
|
206
|
+
var message = '';
|
207
|
+
var sum = (0, _reduce3.default)(_this2.paymode.thePaymodes, function (total, cur) {
|
208
|
+
return total + cur.value;
|
209
|
+
}, 0);
|
210
|
+
// 对于卡不用判断会员的一些信息
|
211
|
+
// if (global.CheckMemberStorageProcessorBlock ) {
|
212
|
+
// message= CheckMemberStorageProcessorBlock.execute(m);
|
213
|
+
// }
|
214
|
+
if (!String.isNullOrEmpty(message)) {
|
215
|
+
_this2.paymode.currentMode.errinfo = message;
|
216
|
+
} else if (_this2.checkReceived(_this2.paymode.currentMode, "balance")) {
|
217
|
+
_this2.paymode.currentMode.errinfo = "余额不足";
|
218
|
+
} else if (_this2.paymode.amount > 0 && parseFloat(_this2.paymode.amount) !== sum && _this2.paymode.currentMode.value == 0) {
|
219
|
+
_this2.paymode.currentMode.errinfo = "实收金额必须录入";
|
220
|
+
} else {
|
221
|
+
// 查询成功后将焦点移入下一个输入框
|
222
|
+
setTimeout(function () {
|
223
|
+
var nextInput = document.querySelector('.czk .received .input');
|
224
|
+
nextInput && nextInput.select();
|
225
|
+
}, 300);
|
226
|
+
}
|
227
|
+
});
|
228
|
+
}
|
229
|
+
};
|
230
|
+
|
231
|
+
this.getCouponList = function (coupon_code) {
|
232
|
+
var _enumController$getEn = _mutantsUtil.enumController.getEnumOj(),
|
233
|
+
PayStyle = _enumController$getEn.PayStyle,
|
234
|
+
Differentiate = _enumController$getEn.Differentiate;
|
235
|
+
|
236
|
+
var couponApplyRule = (0, _tplusPoslogin.PosInitData)('CouponApplyRule');
|
237
|
+
|
238
|
+
var _enumController$getEn2 = _mutantsUtil.enumController.getEnumOj(),
|
239
|
+
CouponApplyRule = _enumController$getEn2.CouponApplyRule;
|
240
|
+
|
241
|
+
if (couponApplyRule == CouponApplyRule.SHOWN_BY_CUSTOMER && !!coupon_code || couponApplyRule != CouponApplyRule.SHOWN_BY_CUSTOMER) {
|
242
|
+
var dto = _this2.dto;
|
243
|
+
var promoVoucher = {};
|
244
|
+
_this2.paymode.clearDjqs();
|
245
|
+
_this2.paymode.reCalculationDjqs();
|
246
|
+
promoVoucher.coupon_code = coupon_code || "";
|
247
|
+
promoVoucher.boName = "Retail";
|
248
|
+
promoVoucher.voucherId = dto.ID;
|
249
|
+
var onlinePaymentAmount = 0;
|
250
|
+
if (dto.OnlinePaymentAmount) {
|
251
|
+
onlinePaymentAmount = dto.OnlinePaymentAmount;
|
252
|
+
}
|
253
|
+
promoVoucher.promoLinks = (0, _filter3.default)(_this2.paymode.currentMode.djqs, function (djq) {
|
254
|
+
return djq.checked;
|
255
|
+
});
|
256
|
+
promoVoucher.totalAmountWithTax = Math.Minus(dto.TotalTaxAmount, onlinePaymentAmount);
|
257
|
+
promoVoucher.redBlueFlagEnum = "BLUE";
|
258
|
+
promoVoucher.meMemberId = dto.Idmember;
|
259
|
+
promoVoucher.storeFactorId = dto.Idstore;
|
260
|
+
promoVoucher.voucherDetailList = [];
|
261
|
+
dto.RetailDetails.forEach(function (item) {
|
262
|
+
var detailDTO = {};
|
263
|
+
detailDTO.uuid = item.Code;
|
264
|
+
detailDTO.detailBoName = "RetailDetail";
|
265
|
+
detailDTO.voucherDetailId = item.ID;
|
266
|
+
detailDTO.productId = item.Idinventory;
|
267
|
+
detailDTO.uomId = item.Idunit;
|
268
|
+
detailDTO.productSpecId = item.ProductSpecId;
|
269
|
+
detailDTO.isManualFreeGift = item.IsPresent;
|
270
|
+
detailDTO.isListPriceIncludingTax = item.TaxFlag || true;
|
271
|
+
detailDTO.IsManualChangePrice = item.IsManualChangePrice;
|
272
|
+
// if(detailDTO.IsManualChangePrice)//如果是手工改价
|
273
|
+
// {
|
274
|
+
// detailDTO.listPrice = item.TaxPrice;
|
275
|
+
// detailDTO.netAmountWithTax = item.TaxAmount;
|
276
|
+
// }
|
277
|
+
// else
|
278
|
+
// {
|
279
|
+
var bookingQuantity = 0;
|
280
|
+
if (item.BookingQuantity) {
|
281
|
+
bookingQuantity = item.BookingQuantity;
|
282
|
+
}
|
283
|
+
detailDTO.listPrice = JSON.getCellValue(item, "listPrice");
|
284
|
+
detailDTO.netAmountWithTax = Math.Multiply(detailDTO.listPrice, Math.Minus(item.Quantity, bookingQuantity)); //item.TaxAmount;
|
285
|
+
//}
|
286
|
+
detailDTO.taxRate = item.TaxRate;
|
287
|
+
detailDTO.quantity = item.Quantity;
|
288
|
+
|
289
|
+
detailDTO.amountWithTax = item.RetailAmount;
|
290
|
+
// 促销 start
|
291
|
+
if (item.PromotionDetails && item.PromotionDetails.length != 0) {
|
292
|
+
var promoLinks = [];
|
293
|
+
item.PromotionDetails.forEach(function (promotion) {
|
294
|
+
promoLinks.push({
|
295
|
+
promoId: promotion.IdSalesPromotionDTO,
|
296
|
+
promoRuleId: promotion.PromotionRuleId
|
297
|
+
});
|
298
|
+
});
|
299
|
+
if (promoLinks.length != 0) detailDTO.promoLinks = promoLinks;
|
300
|
+
}
|
301
|
+
// 促销 end
|
302
|
+
promoVoucher.voucherDetailList.push(detailDTO);
|
303
|
+
});
|
304
|
+
|
305
|
+
return (0, _tplusApi.ccApi)((0, _extends3.default)({}, promoVoucher), 'promotion/PromoCalculate/findUsefulCouponPromoList', false, false, { method: 'post', timeout_skip: true }).then(function (result) {
|
306
|
+
if (result && result.length != 0) {
|
307
|
+
result.forEach(function (element) {
|
308
|
+
var _ref = element || {},
|
309
|
+
couponCode = _ref.couponCode,
|
310
|
+
name = _ref.name,
|
311
|
+
tieredAmountResult = _ref.tieredAmountResult,
|
312
|
+
fromDate = _ref.fromDate,
|
313
|
+
dateMount = _ref.dateMount,
|
314
|
+
promoMethodEnum = _ref.promoMethodEnum,
|
315
|
+
discountPct = _ref.discountPct,
|
316
|
+
nominalAmount = _ref.nominalAmount,
|
317
|
+
promoId = _ref.promoId,
|
318
|
+
id = _ref.id;
|
319
|
+
|
320
|
+
var condValue = tieredAmountResult.condValue,
|
321
|
+
promoDiscount = tieredAmountResult.promoDiscount,
|
322
|
+
displayText = tieredAmountResult.displayText,
|
323
|
+
promoRuleId = tieredAmountResult.promoRuleId,
|
324
|
+
couponCategoryEnum = tieredAmountResult.couponCategoryEnum;
|
325
|
+
|
326
|
+
if (result.IsRepelWithPoints && (0, _find3.default)(_this2.paymode.thePaymodes, function (themode) {
|
327
|
+
return themode.paymentType == PayStyle.jfdx;
|
328
|
+
})) {
|
329
|
+
_message2.default.error(Differentiate.COUPON + '\uFF08' + result.SN + '\uFF09\u4E0D\u53EF\u4E0E\u79EF\u5206\u4E00\u8D77\u4F7F\u7528');
|
330
|
+
} else {
|
331
|
+
var IsEnable = couponCategoryEnum === 'RIGUP' || couponCategoryEnum === 'UN_MATCH' || couponCategoryEnum === "PREPARING" || couponCategoryEnum === 'PROMO_LIMITED' || couponCategoryEnum === 'COUPON_CONFLICT' ? false : true;
|
332
|
+
_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);
|
333
|
+
}
|
334
|
+
});
|
335
|
+
if (promoVoucher.coupon_code) {
|
336
|
+
_this2.paymode.calcDjqCheckValue(_this2.paymode.currentMode.djqs[0], _this2.dto, 'single');
|
337
|
+
}
|
338
|
+
} else {
|
339
|
+
if (promoVoucher.coupon_code) {
|
340
|
+
_message2.default.info(Differentiate.COUPON + '\u53F7\u4E0D\u5B58\u5728\uFF01');
|
341
|
+
_this2.getCouponList();
|
342
|
+
} else {
|
343
|
+
_message2.default.info('\u6CA1\u6709\u627E\u5230\u53EF\u4F7F\u7528\u7684' + Differentiate.COUPON + '\uFF01');
|
344
|
+
}
|
345
|
+
}
|
346
|
+
});
|
347
|
+
}
|
348
|
+
};
|
175
349
|
|
176
|
-
|
350
|
+
this.getSettleGift = function () {
|
351
|
+
return (0, _tplusApi.ccApi)({}, '/marketingtool/paygift/executeRightsForPos/' + _this2.billID, false, false, { method: 'get', timeout_skip: true });
|
352
|
+
};
|
353
|
+
|
354
|
+
this.getRefWareHouseList = function () {
|
355
|
+
return (0, _tplusApi.ccApi)({}, '/retail/RetailPos/getRefWareHouseList', false, false);
|
356
|
+
};
|
357
|
+
|
358
|
+
this.checkCoupon = function () {
|
359
|
+
var _ref2 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee(sn) {
|
360
|
+
var _ref3, isNewRetailBCPos, _enumController$getEn3, PayStyle, Differentiate;
|
361
|
+
|
362
|
+
return _regenerator2.default.wrap(function _callee$(_context) {
|
363
|
+
while (1) {
|
364
|
+
switch (_context.prev = _context.next) {
|
365
|
+
case 0:
|
366
|
+
_ref3 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref3.isNewRetailBCPos;
|
367
|
+
|
368
|
+
if (!isNewRetailBCPos) {
|
369
|
+
_context.next = 7;
|
370
|
+
break;
|
371
|
+
}
|
372
|
+
|
373
|
+
_context.next = 4;
|
374
|
+
return _this2.getCouponList(sn, 'sinlge');
|
375
|
+
|
376
|
+
case 4:
|
377
|
+
return _context.abrupt('return', _context.sent);
|
378
|
+
|
379
|
+
case 7:
|
380
|
+
_enumController$getEn3 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn3.PayStyle, Differentiate = _enumController$getEn3.Differentiate;
|
381
|
+
return _context.abrupt('return', (0, _tplusApi.tApi)({ request: {
|
382
|
+
Uid: _this2.paymode.currentMode.member.uid || '',
|
383
|
+
SN: sn,
|
384
|
+
StoreCode: _this2.dto.Idstore,
|
385
|
+
Inventories: (0, _map3.default)((0, _filter3.default)(_this2.dto.RetailDetails, function (d) {
|
386
|
+
return d.Quantity > 0 && !d.IsPresent;
|
387
|
+
}), function (detail) {
|
388
|
+
return {
|
389
|
+
IdInventory: detail.Inventory.ID,
|
390
|
+
IdUnit: detail.Idunit,
|
391
|
+
Code: detail.Inventory.Code,
|
392
|
+
FreeItem0: JSON.getCellValue(detail, "freeitem0"),
|
393
|
+
FreeItem1: JSON.getCellValue(detail, "freeitem1"),
|
394
|
+
FreeItem2: JSON.getCellValue(detail, "freeitem2"),
|
395
|
+
FreeItem3: JSON.getCellValue(detail, "freeitem3"),
|
396
|
+
FreeItem4: JSON.getCellValue(detail, "freeitem4"),
|
397
|
+
FreeItem5: JSON.getCellValue(detail, "freeitem5"),
|
398
|
+
FreeItem6: JSON.getCellValue(detail, "freeitem6"),
|
399
|
+
FreeItem7: JSON.getCellValue(detail, "freeitem7"),
|
400
|
+
FreeItem8: JSON.getCellValue(detail, "freeitem8"),
|
401
|
+
FreeItem9: JSON.getCellValue(detail, "freeitem9")
|
402
|
+
};
|
403
|
+
}),
|
404
|
+
// inventoryCodes:_join(_map(this.dto.RetailDetails,(detail)=>{return detail.Inventory.Code;}),','),
|
405
|
+
InventoryClassCodes: (0, _join3.default)((0, _map3.default)((0, _filter3.default)(_this2.dto.RetailDetails, function (d) {
|
406
|
+
return d.Quantity > 0;
|
407
|
+
}), function (detail) {
|
408
|
+
return (detail.Inventory.InventoryClass || { Code: '' }).Code;
|
409
|
+
}), ','),
|
410
|
+
Amount: _this2.paymode.amount
|
411
|
+
} }, 'chanjet.AA.DR.coupon.CheckCoupon', false, false).then(function (result) {
|
412
|
+
if ((0, _find3.default)(_this2.paymode.currentMode.djqs, function (djq) {
|
413
|
+
return djq.code == result.SN;
|
414
|
+
})) {
|
415
|
+
_message2.default.info(Differentiate.COUPON + '\u5DF2\u6DFB\u52A0');
|
416
|
+
} else if (result.IsRepelWithPoints && (0, _find3.default)(_this2.paymode.thePaymodes, function (themode) {
|
417
|
+
return themode.paymentType == PayStyle.jfdx;
|
418
|
+
})) {
|
419
|
+
_message2.default.error(Differentiate.COUPON + '\uFF08' + result.SN + '\uFF09\u4E0D\u53EF\u4E0E\u79EF\u5206\u4E00\u8D77\u4F7F\u7528');
|
420
|
+
} else {
|
421
|
+
_this2.addDjq(result.SN, result.Title, result.ReduceAmount, result.StartAmount, result.LastTS, false, !result.IsRepelWithPoints, result.UMemberID);
|
422
|
+
}
|
423
|
+
}));
|
424
|
+
|
425
|
+
case 9:
|
426
|
+
case 'end':
|
427
|
+
return _context.stop();
|
428
|
+
}
|
429
|
+
}
|
430
|
+
}, _callee, _this2);
|
431
|
+
}));
|
432
|
+
|
433
|
+
return function (_x) {
|
434
|
+
return _ref2.apply(this, arguments);
|
435
|
+
};
|
436
|
+
}();
|
437
|
+
|
438
|
+
this.repeatStorageModal = function (content) {
|
439
|
+
return new _promise2.default(function (resolve, reject) {
|
440
|
+
_tplusComponentsTouch.ModalWraper.confirm({
|
441
|
+
title: '',
|
442
|
+
okText: '继续储值',
|
443
|
+
className: 'repeat-modal',
|
444
|
+
zIndex: 1007,
|
445
|
+
content: content,
|
446
|
+
onOk: function () {
|
447
|
+
var _ref4 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2() {
|
448
|
+
var ret;
|
449
|
+
return _regenerator2.default.wrap(function _callee2$(_context2) {
|
450
|
+
while (1) {
|
451
|
+
switch (_context2.prev = _context2.next) {
|
452
|
+
case 0:
|
453
|
+
_context2.next = 2;
|
454
|
+
return _this2.saveMember();
|
455
|
+
|
456
|
+
case 2:
|
457
|
+
ret = _context2.sent;
|
458
|
+
|
459
|
+
if (ret === false) {
|
460
|
+
resolve(false);
|
461
|
+
} else {
|
462
|
+
resolve(true);
|
463
|
+
}
|
464
|
+
|
465
|
+
case 4:
|
466
|
+
case 'end':
|
467
|
+
return _context2.stop();
|
468
|
+
}
|
469
|
+
}
|
470
|
+
}, _callee2, _this2);
|
471
|
+
}));
|
472
|
+
|
473
|
+
return function onOk() {
|
474
|
+
return _ref4.apply(this, arguments);
|
475
|
+
};
|
476
|
+
}(),
|
477
|
+
onCancel: function onCancel() {
|
478
|
+
resolve(false);
|
479
|
+
}
|
480
|
+
});
|
481
|
+
});
|
482
|
+
};
|
483
|
+
|
484
|
+
this.checkIntegralExchangeReturn = function (id) {
|
485
|
+
return new _promise2.default(function (resolve, reject) {
|
486
|
+
(0, _tplusApi.tApi)({ param: { refVoucherId: id } }, 'chanjet.RE.NewPos.GetNewIntegralExchange', false, false, { timeout_skip: true }).then(function (resp) {
|
487
|
+
if (resp && resp.expireIntegral > 0) {
|
488
|
+
_tplusComponentsTouch.ModalWraper.confirm({
|
489
|
+
className: 'tplus-confirm-modal',
|
490
|
+
title: "温馨提示",
|
491
|
+
content: '\u5B58\u5728\u5DF2\u7ECF\u8FC7\u671F\u7684\u79EF\u5206' + resp.expireIntegral + '\u9000\u8D27\u540E\u79EF\u5206\u4E0D\u4F1A\u8FD4\u8FD8\u3002\u662F\u5426\u7EE7\u7EED\u9000\u8D27\uFF1F',
|
492
|
+
cancelable: false,
|
493
|
+
onOk: function onOk() {
|
494
|
+
resolve(true);
|
495
|
+
},
|
496
|
+
onCancel: function onCancel() {
|
497
|
+
reject(false);
|
498
|
+
}
|
499
|
+
});
|
500
|
+
} else {
|
501
|
+
resolve(true);
|
502
|
+
}
|
503
|
+
});
|
504
|
+
});
|
505
|
+
};
|
177
506
|
|
178
507
|
this.paymode = new PayMode();
|
179
508
|
var params = _mutantsMicrofx.localStore && _mutantsMicrofx.localStore.get('cloudPrintArguments');
|
180
509
|
if (params) this.cloudPrintArguments = params;
|
181
510
|
this.setNewStyle();
|
182
|
-
this.SettlementApi = _settlementApi2.default;
|
183
511
|
} //type==2
|
184
512
|
|
185
513
|
|
@@ -193,7 +521,7 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
193
521
|
}, {
|
194
522
|
key: 'init',
|
195
523
|
value: function init(context, amounthandler, datasource, storeinfo, bquick, amount, type, data, payModeKey) {
|
196
|
-
var
|
524
|
+
var _this3 = this;
|
197
525
|
|
198
526
|
this.setNewStyle();
|
199
527
|
this.type = type;
|
@@ -206,17 +534,17 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
206
534
|
(0, _mobx.runInAction)(function () {
|
207
535
|
// 单品金额抹零
|
208
536
|
if (global.DealSingleRowAmountSettingProcessorBlock) {
|
209
|
-
global.DealSingleRowAmountSettingProcessorBlock.execute(
|
537
|
+
global.DealSingleRowAmountSettingProcessorBlock.execute(_this3.dto);
|
210
538
|
}
|
211
539
|
|
212
|
-
var _enumController$
|
213
|
-
PayStyle = _enumController$
|
540
|
+
var _enumController$getEn4 = _mutantsUtil.enumController.getEnumOj(),
|
541
|
+
PayStyle = _enumController$getEn4.PayStyle;
|
214
542
|
|
215
543
|
var isQuickCash = bquick && payModeKey == PayStyle.xianjin;
|
216
544
|
|
217
545
|
// 成交金额抹零
|
218
546
|
if (global.DealAmountSettingProcessorBlock) {
|
219
|
-
global.DealAmountSettingProcessorBlock.execute(
|
547
|
+
global.DealAmountSettingProcessorBlock.execute(_this3.dto, isQuickCash);
|
220
548
|
}
|
221
549
|
});
|
222
550
|
// this.member=context.stores && context.stores.memberStore && context.stores.memberStore.member;
|
@@ -231,9 +559,9 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
231
559
|
PreSellOrBook = _getLoginInfo.PreSellOrBook,
|
232
560
|
PercentageWhenBook = _getLoginInfo.PercentageWhenBook;
|
233
561
|
|
234
|
-
var
|
235
|
-
IdbusiType =
|
236
|
-
DistributionMode =
|
562
|
+
var _ref5 = this.dto || {},
|
563
|
+
IdbusiType = _ref5.IdbusiType,
|
564
|
+
DistributionMode = _ref5.DistributionMode;
|
237
565
|
|
238
566
|
if (IdbusiType == 38 && PreSellOrBook == 'BOOK' && PercentageWhenBook < 100 && (!DistributionMode.Id || DistributionMode.Id == 'ON_SITE_PICKUP')) {
|
239
567
|
this.paymode.bookMaxValue = value;
|
@@ -243,7 +571,7 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
243
571
|
}
|
244
572
|
if (IdbusiType == 38 && PreSellOrBook == 'BOOK') {
|
245
573
|
(0, _mobx.runInAction)(function () {
|
246
|
-
|
574
|
+
_this3.dto.PrepaidAmount = value;
|
247
575
|
});
|
248
576
|
}
|
249
577
|
//预订计算快递或同城配送运费
|
@@ -279,13 +607,13 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
279
607
|
}, {
|
280
608
|
key: 'setModes',
|
281
609
|
value: function setModes() {
|
282
|
-
var
|
610
|
+
var _this4 = this;
|
283
611
|
|
284
612
|
(0, _each3.default)(this.paymode.paymodes, function (p) {
|
285
|
-
if ((0, _findIndex3.default)(
|
613
|
+
if ((0, _findIndex3.default)(_this4.paymode.thePaymodes, function (mode) {
|
286
614
|
return p.paymentType == mode.paymentType;
|
287
615
|
}) == -1) {
|
288
|
-
|
616
|
+
_this4.addPay(p.paymentType);
|
289
617
|
}
|
290
618
|
});
|
291
619
|
if (!this.boriginReturn && this.paymode.thePaymodes.length > 0) {
|
@@ -302,18 +630,18 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
302
630
|
}, {
|
303
631
|
key: 'initByOriginReturn',
|
304
632
|
value: function initByOriginReturn() {
|
305
|
-
var
|
633
|
+
var _this5 = this;
|
306
634
|
|
307
|
-
var _enumController$
|
308
|
-
PayStyle = _enumController$
|
635
|
+
var _enumController$getEn5 = _mutantsUtil.enumController.getEnumOj(),
|
636
|
+
PayStyle = _enumController$getEn5.PayStyle;
|
309
637
|
|
310
|
-
var
|
311
|
-
isNewRetailBCPos =
|
638
|
+
var _ref6 = _mutantsUtil.platform || {},
|
639
|
+
isNewRetailBCPos = _ref6.isNewRetailBCPos;
|
312
640
|
|
313
641
|
console.log(this.dto, 'dto==========');
|
314
642
|
this.paymode.checkList = [];
|
315
643
|
(0, _each3.default)(this.dto.RetailPaymentDetails, function (detail) {
|
316
|
-
var themode = (0, _find3.default)(
|
644
|
+
var themode = (0, _find3.default)(_this5.paymode.paymodes, { 'idSettleStyle': detail.IdsettleStyle });
|
317
645
|
if (detail.SettleStyle.Code === PayStyle.hyczk && !themode) {
|
318
646
|
_tplusComponentsTouch.ModalWraper.info({
|
319
647
|
title: '温馨提示',
|
@@ -323,33 +651,33 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
323
651
|
});
|
324
652
|
}
|
325
653
|
if (themode && themode.paymentType && themode.paymentType != PayStyle.hyczk) {
|
326
|
-
var newmode = (0, _extends3.default)({},
|
654
|
+
var newmode = (0, _extends3.default)({}, _this5.genNewMode(themode.paymentType, false, detail.Amount), {
|
327
655
|
authCode: detail.PaymentCode,
|
328
656
|
steadCashIntegral: detail.SteadCashIntegral,
|
329
657
|
overchargesAmount: detail.OverchargesAmount,
|
330
658
|
boriginReturn: true,
|
331
659
|
thirdPaymentReturnInfo: detail.ThirdPaymentReturnInfo
|
332
660
|
});
|
333
|
-
|
661
|
+
_this5.paymode.currentMode = newmode;
|
334
662
|
if (themode.paymentType == PayStyle.djq) {
|
335
|
-
(0, _each3.default)(
|
663
|
+
(0, _each3.default)(_this5.dto.RetailCouponDetails, function (djq) {
|
336
664
|
if (isNewRetailBCPos) {
|
337
|
-
var
|
338
|
-
displayText =
|
339
|
-
promoRuleId =
|
340
|
-
dateMount =
|
341
|
-
promoMethodEnum =
|
342
|
-
discountPct =
|
343
|
-
promoId =
|
344
|
-
id =
|
345
|
-
|
346
|
-
|
665
|
+
var _ref7 = djq || {},
|
666
|
+
displayText = _ref7.displayText,
|
667
|
+
promoRuleId = _ref7.promoRuleId,
|
668
|
+
dateMount = _ref7.dateMount,
|
669
|
+
promoMethodEnum = _ref7.promoMethodEnum,
|
670
|
+
discountPct = _ref7.discountPct,
|
671
|
+
promoId = _ref7.promoId,
|
672
|
+
id = _ref7.id;
|
673
|
+
|
674
|
+
_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);
|
347
675
|
return;
|
348
676
|
}
|
349
|
-
|
677
|
+
_this5.addDjq(djq.CouponCode, djq.CouponTitle, true, null, djq.ReductionAmount, djq.EnableAmount, djq.LastTS, true, false);
|
350
678
|
});
|
351
679
|
}
|
352
|
-
|
680
|
+
_this5.paymode.thePaymodes.push(newmode);
|
353
681
|
}
|
354
682
|
});
|
355
683
|
(0, _each3.default)(this.dto.RetailStorageDetails, function (detail) {
|
@@ -363,7 +691,7 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
363
691
|
meStorageCardId = detail.DynamicPropertyValues[index].MeStorageCardId;
|
364
692
|
}
|
365
693
|
});
|
366
|
-
var newmode = (0, _extends3.default)({},
|
694
|
+
var newmode = (0, _extends3.default)({}, _this5.genNewMode(PayStyle.hyczk, false, detail.StoragePaymentAmount), {
|
367
695
|
member: new Member(detail.Member ? detail.Member : null),
|
368
696
|
authCode: detail.Password ? detail.Password : null,
|
369
697
|
balance: balanceAmount,
|
@@ -371,7 +699,7 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
371
699
|
meStorageCardId: meStorageCardId ? meStorageCardId : detail.MeStorageCardId,
|
372
700
|
storageCardNo: storageCardNo ? storageCardNo : detail.StorageCardNo
|
373
701
|
});
|
374
|
-
|
702
|
+
_this5.paymode.thePaymodes.push(newmode);
|
375
703
|
});
|
376
704
|
this.paymode.calcReserved();
|
377
705
|
}
|
@@ -393,10 +721,10 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
393
721
|
}, {
|
394
722
|
key: 'changeFocusAndAddPay',
|
395
723
|
value: function changeFocusAndAddPay(type, bookType) {
|
396
|
-
var
|
724
|
+
var _this6 = this;
|
397
725
|
|
398
|
-
var _enumController$
|
399
|
-
PayStyle = _enumController$
|
726
|
+
var _enumController$getEn6 = _mutantsUtil.enumController.getEnumOj(),
|
727
|
+
PayStyle = _enumController$getEn6.PayStyle;
|
400
728
|
|
401
729
|
this.paymode.currentFocus = type;
|
402
730
|
if (this.paymode.currentMode) {
|
@@ -412,16 +740,16 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
412
740
|
}
|
413
741
|
|
414
742
|
//抵现积分
|
415
|
-
|
743
|
+
(0, _tplusApi.tApi)({ IntegralSteadCashParams: {
|
416
744
|
Idmember: this.paymode.currentMode.memberId,
|
417
745
|
TotalTaxAmount: this.paymode.amount,
|
418
746
|
BalanceTaxAmount: this.paymode.currentMode.value
|
419
|
-
} }).then(function (result) {
|
747
|
+
} }, 'AA.DR.newRetailMember.CalculdateIntegralSteadCash', false, false).then(function (result) {
|
420
748
|
// this.paymode.currentMode.steadCashIntegral=result.Integral;
|
421
749
|
// this.paymode.currentMode.perIntegral=result.perIntegral;
|
422
750
|
// this.paymode.currentMode.cashAmount=result.cashAmount;
|
423
|
-
|
424
|
-
|
751
|
+
_this6.paymode.currentMode.integralCashOverOrderAmount = result.isIntegralCashOverOrderAmount;
|
752
|
+
_this6.paymode.currentMode.overchargesAmount = result.Amount - _this6.paymode.currentMode.value;
|
425
753
|
});
|
426
754
|
} else {
|
427
755
|
this.addPayDirectly(this.paymode.currentMode);
|
@@ -444,51 +772,52 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
444
772
|
}, {
|
445
773
|
key: 'loadCzk',
|
446
774
|
value: function loadCzk(v, returnType) {
|
447
|
-
var
|
775
|
+
var _this7 = this;
|
448
776
|
|
449
777
|
if ((0, _trim3.default)(v) === "") {
|
450
778
|
(0, _mobx.runInAction)(function () {
|
451
|
-
|
779
|
+
_this7.paymode.currentMode.errinfo = "请输入储值卡";
|
452
780
|
});
|
453
781
|
return;
|
454
782
|
}
|
455
783
|
var isOnlyEnabled = returnType ? false : true; //非原单退货为false,其他true
|
456
|
-
|
457
|
-
|
784
|
+
var address = '/marketingtool/MeStorageCard/getCardInfoByCardNo/' + v + '/' + isOnlyEnabled;
|
785
|
+
return (0, _tplusApi.ccApi)({ code: v }, address, false, false, { method: 'get', timeout_skip: true }).then(function () {
|
786
|
+
var _ref8 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee3(result) {
|
458
787
|
var data, m;
|
459
|
-
return _regenerator2.default.wrap(function
|
788
|
+
return _regenerator2.default.wrap(function _callee3$(_context3) {
|
460
789
|
while (1) {
|
461
|
-
switch (
|
790
|
+
switch (_context3.prev = _context3.next) {
|
462
791
|
case 0:
|
463
792
|
data = result.data;
|
464
793
|
m = data && data.length && data[0];
|
465
794
|
|
466
795
|
if (!(result && result.data.length)) {
|
467
|
-
|
796
|
+
_context3.next = 25;
|
468
797
|
break;
|
469
798
|
}
|
470
799
|
|
471
800
|
if (!(result.data.length === 1)) {
|
472
|
-
|
801
|
+
_context3.next = 14;
|
473
802
|
break;
|
474
803
|
}
|
475
804
|
|
476
805
|
if (!(m.CardTypeEnum === 'BALANCE_CARD')) {
|
477
|
-
|
806
|
+
_context3.next = 10;
|
478
807
|
break;
|
479
808
|
}
|
480
809
|
|
481
|
-
|
482
|
-
|
483
|
-
return
|
810
|
+
_this7.paymode.updateCardInfo(m);
|
811
|
+
_this7.handleCzkData(m);
|
812
|
+
return _context3.abrupt('return', result.data);
|
484
813
|
|
485
814
|
case 10:
|
486
|
-
|
487
|
-
return
|
815
|
+
_context3.next = 12;
|
816
|
+
return (0, _tplusApi.ccApi)({ dto: _this7.dto, meStorageCardId: m.MeStorageCardId }, '/retail/RetailPos/validateRetailStorageCard', false, false).then(function (result1) {
|
488
817
|
var data1 = result1.data ? JSON.parse(result1.data)[0] : {};
|
489
818
|
if (data1.enable) {
|
490
|
-
|
491
|
-
|
819
|
+
_this7.paymode.updateCardInfo(m);
|
820
|
+
_this7.handleCzkData(m);
|
492
821
|
return result1.data;
|
493
822
|
} else {
|
494
823
|
_message2.default.warn(data1.disableReason);
|
@@ -496,40 +825,40 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
496
825
|
});
|
497
826
|
|
498
827
|
case 12:
|
499
|
-
|
828
|
+
_context3.next = 25;
|
500
829
|
break;
|
501
830
|
|
502
831
|
case 14:
|
503
832
|
if (!(result.data && result.data.length === 1)) {
|
504
|
-
|
833
|
+
_context3.next = 19;
|
505
834
|
break;
|
506
835
|
}
|
507
836
|
|
508
|
-
|
509
|
-
return
|
837
|
+
_this7.paymode.updateCardInfo(result.data[0]);
|
838
|
+
return _context3.abrupt('return', result.data);
|
510
839
|
|
511
840
|
case 19:
|
512
841
|
if (!(result.data && result.data.length > 1)) {
|
513
|
-
|
842
|
+
_context3.next = 23;
|
514
843
|
break;
|
515
844
|
}
|
516
845
|
|
517
|
-
return
|
846
|
+
return _context3.abrupt('return', result.data);
|
518
847
|
|
519
848
|
case 23:
|
520
849
|
_message2.default.warn('没有可用储值卡!');
|
521
|
-
return
|
850
|
+
return _context3.abrupt('return', false);
|
522
851
|
|
523
852
|
case 25:
|
524
853
|
case 'end':
|
525
|
-
return
|
854
|
+
return _context3.stop();
|
526
855
|
}
|
527
856
|
}
|
528
|
-
},
|
857
|
+
}, _callee3, _this7);
|
529
858
|
}));
|
530
859
|
|
531
|
-
return function (
|
532
|
-
return
|
860
|
+
return function (_x2) {
|
861
|
+
return _ref8.apply(this, arguments);
|
533
862
|
};
|
534
863
|
}());
|
535
864
|
}
|
@@ -565,8 +894,8 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
565
894
|
}, {
|
566
895
|
key: 'setCurrentMode',
|
567
896
|
value: function setCurrentMode(id, type, append) {
|
568
|
-
var _enumController$
|
569
|
-
PayStyle = _enumController$
|
897
|
+
var _enumController$getEn7 = _mutantsUtil.enumController.getEnumOj(),
|
898
|
+
PayStyle = _enumController$getEn7.PayStyle;
|
570
899
|
|
571
900
|
var mode = (0, _find3.default)(this.paymode.thePaymodes, { paymethodId: id });
|
572
901
|
if (mode) {
|
@@ -582,10 +911,10 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
582
911
|
}, {
|
583
912
|
key: 'afterSetCurrentMode',
|
584
913
|
value: function afterSetCurrentMode(type) {
|
585
|
-
var
|
914
|
+
var _this8 = this;
|
586
915
|
|
587
|
-
var _enumController$
|
588
|
-
PayStyle = _enumController$
|
916
|
+
var _enumController$getEn8 = _mutantsUtil.enumController.getEnumOj(),
|
917
|
+
PayStyle = _enumController$getEn8.PayStyle;
|
589
918
|
|
590
919
|
if (type == PayStyle.djq) {
|
591
920
|
this.paymode.calcDjqValue();
|
@@ -617,19 +946,19 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
617
946
|
value = this.paymode.amount;
|
618
947
|
}
|
619
948
|
|
620
|
-
|
949
|
+
(0, _tplusApi.tApi)({ IntegralSteadCashParams: {
|
621
950
|
Idmember: this.paymode.currentMode.memberId,
|
622
951
|
TotalTaxAmount: value,
|
623
952
|
BalanceTaxAmount: value
|
624
|
-
} }).then(function (result) {
|
625
|
-
|
626
|
-
|
627
|
-
|
628
|
-
|
629
|
-
|
630
|
-
if (
|
953
|
+
} }, 'AA.DR.newRetailMember.CalculdateIntegralSteadCash', false, false).then(function (result) {
|
954
|
+
_this8.paymode.currentMode.member.setExchangable(result.MaxAmount);
|
955
|
+
_this8.paymode.currentMode.perIntegral = result.perIntegral;
|
956
|
+
_this8.paymode.currentMode.cashAmount = result.cashAmount;
|
957
|
+
_this8.paymode.currentMode.integralCashOverOrderAmount = result.isIntegralCashOverOrderAmount;
|
958
|
+
_this8.updateEvent();
|
959
|
+
if (_this8.checkReceived(_this8.paymode.currentMode, "exchangable")) {
|
631
960
|
(0, _mobx.runInAction)(function () {
|
632
|
-
|
961
|
+
_this8.paymode.currentMode.errinfo = '余额不足';
|
633
962
|
});
|
634
963
|
}
|
635
964
|
});
|
@@ -643,8 +972,8 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
643
972
|
}, {
|
644
973
|
key: 'genNewMode',
|
645
974
|
value: function genNewMode(type, notwithm, v, isQuick) {
|
646
|
-
var _enumController$
|
647
|
-
PayStyle = _enumController$
|
975
|
+
var _enumController$getEn9 = _mutantsUtil.enumController.getEnumOj(),
|
976
|
+
PayStyle = _enumController$getEn9.PayStyle;
|
648
977
|
|
649
978
|
var value = (0, _utils.getFixedNumber)(v || (this.brefund ? this.paymode.receivable : Math.max(this.paymode.receivable, 0)));
|
650
979
|
var themode = (0, _find3.default)(this.paymode.paymodes, { 'paymentType': type });
|
@@ -690,10 +1019,10 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
690
1019
|
}, {
|
691
1020
|
key: 'setMaxAmount',
|
692
1021
|
value: function setMaxAmount(type, mode) {
|
693
|
-
var
|
1022
|
+
var _this9 = this;
|
694
1023
|
|
695
|
-
var _enumController$
|
696
|
-
PayStyle = _enumController$
|
1024
|
+
var _enumController$getEn10 = _mutantsUtil.enumController.getEnumOj(),
|
1025
|
+
PayStyle = _enumController$getEn10.PayStyle;
|
697
1026
|
|
698
1027
|
var sum = 0;
|
699
1028
|
if (type == PayStyle.hyczk) {
|
@@ -714,16 +1043,16 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
714
1043
|
(0, _mobx.runInAction)(function () {
|
715
1044
|
|
716
1045
|
//预售储值结算应包含运费
|
717
|
-
var BuyerPayFreight =
|
718
|
-
var DistributionMode =
|
1046
|
+
var BuyerPayFreight = _this9.dto.BuyerPayFreight;
|
1047
|
+
var DistributionMode = _this9.dto.DistributionMode;
|
719
1048
|
var value = 0;
|
720
1049
|
if ((DistributionMode.Id == 'ELECTRONIC' || DistributionMode.Id == 'CITY_DISTRIBUTE') && BuyerPayFreight && BuyerPayFreight > 0 && type == PayStyle.hyczk) {
|
721
|
-
value = (0, _utils.getFixedNumber)(parseFloat(
|
1050
|
+
value = (0, _utils.getFixedNumber)(parseFloat(_this9.context.viewModel.getViewItem('Voucher').availableAmount) + parseFloat(BuyerPayFreight));
|
722
1051
|
} else {
|
723
|
-
value =
|
1052
|
+
value = _this9.context.viewModel.getViewItem('Voucher').availableAmount;
|
724
1053
|
}
|
725
1054
|
mode.maxamount = (0, _utils.getFixedNumber)(Math.Minus(value, sum));
|
726
|
-
|
1055
|
+
_this9.updateEvent();
|
727
1056
|
});
|
728
1057
|
});
|
729
1058
|
}
|
@@ -770,8 +1099,8 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
770
1099
|
}, {
|
771
1100
|
key: 'addPayDirectly',
|
772
1101
|
value: function addPayDirectly(pay) {
|
773
|
-
var _enumController$
|
774
|
-
PayStyle = _enumController$
|
1102
|
+
var _enumController$getEn11 = _mutantsUtil.enumController.getEnumOj(),
|
1103
|
+
PayStyle = _enumController$getEn11.PayStyle;
|
775
1104
|
|
776
1105
|
if (!(0, _find3.default)(this.paymode.thePaymodes, { paymethodId: pay.paymethodId })) {
|
777
1106
|
var pos = this.paymode.thePaymodes.length;
|
@@ -789,8 +1118,8 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
789
1118
|
}, {
|
790
1119
|
key: 'addPay',
|
791
1120
|
value: function addPay(type, bookType, isQuick) {
|
792
|
-
var _enumController$
|
793
|
-
PayStyle = _enumController$
|
1121
|
+
var _enumController$getEn12 = _mutantsUtil.enumController.getEnumOj(),
|
1122
|
+
PayStyle = _enumController$getEn12.PayStyle;
|
794
1123
|
|
795
1124
|
var pos = this.paymode.thePaymodes.length;
|
796
1125
|
if (type == PayStyle.hyczk) {
|
@@ -805,8 +1134,8 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
805
1134
|
}, {
|
806
1135
|
key: 'delPay',
|
807
1136
|
value: function delPay(index, bookType) {
|
808
|
-
var _enumController$
|
809
|
-
PayStyle = _enumController$
|
1137
|
+
var _enumController$getEn13 = _mutantsUtil.enumController.getEnumOj(),
|
1138
|
+
PayStyle = _enumController$getEn13.PayStyle;
|
810
1139
|
|
811
1140
|
(0, _remove3.default)(this.paymode.thePaymodes, function (mode) {
|
812
1141
|
return mode.paymethodId === index;
|
@@ -820,26 +1149,26 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
820
1149
|
}, {
|
821
1150
|
key: 'findStorageBillValidate',
|
822
1151
|
value: function findStorageBillValidate() {
|
823
|
-
var
|
1152
|
+
var _this10 = this;
|
824
1153
|
|
825
|
-
var _enumController$
|
826
|
-
PayStyle = _enumController$
|
1154
|
+
var _enumController$getEn14 = _mutantsUtil.enumController.getEnumOj(),
|
1155
|
+
PayStyle = _enumController$getEn14.PayStyle;
|
827
1156
|
|
828
1157
|
(0, _mobx.runInAction)(function () {
|
829
|
-
|
830
|
-
var thePaymodes =
|
1158
|
+
_this10.dto.StorageMutiSettleDetails = [];
|
1159
|
+
var thePaymodes = _this10.newStyle ? (0, _filter3.default)(_this10.paymode.thePaymodes, function (mode) {
|
831
1160
|
return parseFloat(mode.value) != 0;
|
832
|
-
}) :
|
1161
|
+
}) : _this10.paymode.thePaymodes;
|
833
1162
|
(0, _each3.default)(thePaymodes, function (mode) {
|
834
|
-
var themode = (0, _find3.default)(
|
1163
|
+
var themode = (0, _find3.default)(_this10.paymode.paymodes, { 'paymentType': mode.paymentType });
|
835
1164
|
|
836
1165
|
var value = parseFloat(mode.value);
|
837
1166
|
var giveChange = null;
|
838
|
-
if (mode.paymentType == PayStyle.xianjin &&
|
839
|
-
value = Math.Add(value,
|
840
|
-
giveChange = Math.abs(
|
1167
|
+
if (mode.paymentType == PayStyle.xianjin && _this10.paymode.receivable < 0 && value > Math.abs(_this10.paymode.receivable)) {
|
1168
|
+
value = Math.Add(value, _this10.paymode.receivable);
|
1169
|
+
giveChange = Math.abs(_this10.paymode.receivable);
|
841
1170
|
}
|
842
|
-
|
1171
|
+
_this10.dto.StorageMutiSettleDetails.push({
|
843
1172
|
Code: mode.paymethodId,
|
844
1173
|
StorageAmount: value,
|
845
1174
|
GiveChange: giveChange,
|
@@ -848,11 +1177,11 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
848
1177
|
PaymentCode: mode.authCode,
|
849
1178
|
DynamicPropertyKeys: [],
|
850
1179
|
DynamicPropertyValues: [],
|
851
|
-
DataSource: { Id:
|
1180
|
+
DataSource: { Id: _this10.dataSource }
|
852
1181
|
});
|
853
1182
|
});
|
854
1183
|
});
|
855
|
-
return
|
1184
|
+
return (0, _tplusApi.ccApi)((0, _extends3.default)({}, this.dto), '/marketingtool/Storage/findStorageBillValidate', false, false);
|
856
1185
|
}
|
857
1186
|
|
858
1187
|
//判断是否重复弹框
|
@@ -860,136 +1189,136 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
860
1189
|
}, {
|
861
1190
|
key: 'commit',
|
862
1191
|
value: function () {
|
863
|
-
var
|
864
|
-
var status, paylist, ret,
|
1192
|
+
var _ref9 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee4(bTest) {
|
1193
|
+
var status, paylist, ret, _ref10, _ref10$data, code, returnMsg, state, ret1, ret2;
|
865
1194
|
|
866
|
-
return _regenerator2.default.wrap(function
|
1195
|
+
return _regenerator2.default.wrap(function _callee4$(_context4) {
|
867
1196
|
while (1) {
|
868
|
-
switch (
|
1197
|
+
switch (_context4.prev = _context4.next) {
|
869
1198
|
case 0:
|
870
1199
|
console.log('settlementStore.commit开始,参数:' + bTest);
|
871
1200
|
|
872
1201
|
if (!bTest) {
|
873
|
-
|
1202
|
+
_context4.next = 3;
|
874
1203
|
break;
|
875
1204
|
}
|
876
1205
|
|
877
|
-
return
|
1206
|
+
return _context4.abrupt('return', _promise2.default.resolve(true));
|
878
1207
|
|
879
1208
|
case 3:
|
880
1209
|
status = this.type;
|
881
|
-
|
1210
|
+
_context4.prev = 4;
|
882
1211
|
paylist = this.paymode.thePaymodes.filter(function (v) {
|
883
1212
|
return !!v.thridPayment && Math.abs(v.value) > 0;
|
884
1213
|
}) || [];
|
885
1214
|
|
886
1215
|
if (!(paylist && paylist.length > 1)) {
|
887
|
-
|
1216
|
+
_context4.next = 9;
|
888
1217
|
break;
|
889
1218
|
}
|
890
1219
|
|
891
1220
|
_message2.default.warn('二开支付目前仅支持单一结算方式。');
|
892
|
-
return
|
1221
|
+
return _context4.abrupt('return', _promise2.default.resolve(false));
|
893
1222
|
|
894
1223
|
case 9:
|
895
1224
|
if (!(status == 1)) {
|
896
|
-
|
1225
|
+
_context4.next = 31;
|
897
1226
|
break;
|
898
1227
|
}
|
899
1228
|
|
900
|
-
|
1229
|
+
_context4.next = 12;
|
901
1230
|
return this.findStorageBillValidate();
|
902
1231
|
|
903
1232
|
case 12:
|
904
|
-
ret =
|
905
|
-
|
906
|
-
|
907
|
-
code =
|
1233
|
+
ret = _context4.sent;
|
1234
|
+
_ref10 = ret || {}, _ref10$data = _ref10.data;
|
1235
|
+
_ref10$data = _ref10$data === undefined ? {} : _ref10$data;
|
1236
|
+
code = _ref10$data.code, returnMsg = _ref10$data.returnMsg;
|
908
1237
|
|
909
1238
|
if (!(code && code == 10001)) {
|
910
|
-
|
1239
|
+
_context4.next = 24;
|
911
1240
|
break;
|
912
1241
|
}
|
913
1242
|
|
914
|
-
|
1243
|
+
_context4.next = 19;
|
915
1244
|
return this.repeatStorageModal(returnMsg);
|
916
1245
|
|
917
1246
|
case 19:
|
918
|
-
state =
|
1247
|
+
state = _context4.sent;
|
919
1248
|
|
920
1249
|
if (!(state === false)) {
|
921
|
-
|
1250
|
+
_context4.next = 22;
|
922
1251
|
break;
|
923
1252
|
}
|
924
1253
|
|
925
|
-
return
|
1254
|
+
return _context4.abrupt('return', _promise2.default.resolve(false));
|
926
1255
|
|
927
1256
|
case 22:
|
928
|
-
|
1257
|
+
_context4.next = 29;
|
929
1258
|
break;
|
930
1259
|
|
931
1260
|
case 24:
|
932
|
-
|
1261
|
+
_context4.next = 26;
|
933
1262
|
return this.saveMember();
|
934
1263
|
|
935
1264
|
case 26:
|
936
|
-
ret1 =
|
1265
|
+
ret1 = _context4.sent;
|
937
1266
|
|
938
1267
|
if (!(ret1 === false)) {
|
939
|
-
|
1268
|
+
_context4.next = 29;
|
940
1269
|
break;
|
941
1270
|
}
|
942
1271
|
|
943
|
-
return
|
1272
|
+
return _context4.abrupt('return', _promise2.default.resolve(false));
|
944
1273
|
|
945
1274
|
case 29:
|
946
|
-
|
1275
|
+
_context4.next = 40;
|
947
1276
|
break;
|
948
1277
|
|
949
1278
|
case 31:
|
950
|
-
|
1279
|
+
_context4.next = 33;
|
951
1280
|
return _mutantsMicrofx.stores.offlineSys.generatorCode(this.dto);
|
952
1281
|
|
953
1282
|
case 33:
|
954
|
-
|
1283
|
+
_context4.next = 35;
|
955
1284
|
return this.save();
|
956
1285
|
|
957
1286
|
case 35:
|
958
|
-
ret2 =
|
1287
|
+
ret2 = _context4.sent;
|
959
1288
|
|
960
1289
|
if (!(ret2 === false)) {
|
961
|
-
|
1290
|
+
_context4.next = 38;
|
962
1291
|
break;
|
963
1292
|
}
|
964
1293
|
|
965
|
-
return
|
1294
|
+
return _context4.abrupt('return', _promise2.default.resolve(false));
|
966
1295
|
|
967
1296
|
case 38:
|
968
|
-
|
1297
|
+
_context4.next = 40;
|
969
1298
|
return _mutantsMicrofx.stores.offlineSys.retailSequenceUpload();
|
970
1299
|
|
971
1300
|
case 40:
|
972
|
-
return
|
1301
|
+
return _context4.abrupt('return', _promise2.default.resolve(true));
|
973
1302
|
|
974
1303
|
case 43:
|
975
|
-
|
976
|
-
|
1304
|
+
_context4.prev = 43;
|
1305
|
+
_context4.t0 = _context4['catch'](4);
|
977
1306
|
|
978
|
-
console.error('settlementStore.commit失败,错误信息:' +
|
1307
|
+
console.error('settlementStore.commit失败,错误信息:' + _context4.t0);
|
979
1308
|
//其他支付失败时,处理二开支付情况。
|
980
1309
|
this.thirdPayRefund(status == 1 ? 2 : 1);
|
981
|
-
return
|
1310
|
+
return _context4.abrupt('return', _promise2.default.resolve(_context4.t0));
|
982
1311
|
|
983
1312
|
case 48:
|
984
1313
|
case 'end':
|
985
|
-
return
|
1314
|
+
return _context4.stop();
|
986
1315
|
}
|
987
1316
|
}
|
988
|
-
},
|
1317
|
+
}, _callee4, this, [[4, 43]]);
|
989
1318
|
}));
|
990
1319
|
|
991
|
-
function commit(
|
992
|
-
return
|
1320
|
+
function commit(_x3) {
|
1321
|
+
return _ref9.apply(this, arguments);
|
993
1322
|
}
|
994
1323
|
|
995
1324
|
return commit;
|
@@ -1003,32 +1332,32 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
1003
1332
|
}, {
|
1004
1333
|
key: 'saveMember',
|
1005
1334
|
value: function () {
|
1006
|
-
var
|
1007
|
-
var
|
1335
|
+
var _ref11 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee5() {
|
1336
|
+
var _this11 = this;
|
1008
1337
|
|
1009
|
-
var _enumController$
|
1338
|
+
var _enumController$getEn15, PayStyle, TradeType, IPMSG, dtoParams, payList, payment, tradeType, ret, _ref12, type, data, msg, code;
|
1010
1339
|
|
1011
|
-
return _regenerator2.default.wrap(function
|
1340
|
+
return _regenerator2.default.wrap(function _callee5$(_context5) {
|
1012
1341
|
while (1) {
|
1013
|
-
switch (
|
1342
|
+
switch (_context5.prev = _context5.next) {
|
1014
1343
|
case 0:
|
1015
|
-
_enumController$
|
1344
|
+
_enumController$getEn15 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn15.PayStyle, TradeType = _enumController$getEn15.TradeType;
|
1016
1345
|
|
1017
1346
|
(0, _mobx.runInAction)(function () {
|
1018
|
-
|
1019
|
-
var thePaymodes =
|
1347
|
+
_this11.dto.StorageMutiSettleDetails = [];
|
1348
|
+
var thePaymodes = _this11.newStyle ? (0, _filter3.default)(_this11.paymode.thePaymodes, function (mode) {
|
1020
1349
|
return parseFloat(mode.value) != 0;
|
1021
|
-
}) :
|
1350
|
+
}) : _this11.paymode.thePaymodes;
|
1022
1351
|
(0, _each3.default)(thePaymodes, function (mode) {
|
1023
|
-
var themode = (0, _find3.default)(
|
1352
|
+
var themode = (0, _find3.default)(_this11.paymode.paymodes, { 'paymentType': mode.paymentType });
|
1024
1353
|
|
1025
1354
|
var value = parseFloat(mode.value);
|
1026
1355
|
var giveChange = null;
|
1027
|
-
if (mode.paymentType == PayStyle.xianjin &&
|
1028
|
-
value = Math.Add(value,
|
1029
|
-
giveChange = Math.abs(
|
1356
|
+
if (mode.paymentType == PayStyle.xianjin && _this11.paymode.receivable < 0 && value > Math.abs(_this11.paymode.receivable)) {
|
1357
|
+
value = Math.Add(value, _this11.paymode.receivable);
|
1358
|
+
giveChange = Math.abs(_this11.paymode.receivable);
|
1030
1359
|
}
|
1031
|
-
|
1360
|
+
_this11.dto.StorageMutiSettleDetails.push({
|
1032
1361
|
Code: mode.paymethodId,
|
1033
1362
|
StorageAmount: value,
|
1034
1363
|
GiveChange: giveChange,
|
@@ -1037,7 +1366,7 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
1037
1366
|
PaymentCode: mode.authCode,
|
1038
1367
|
DynamicPropertyKeys: [],
|
1039
1368
|
DynamicPropertyValues: [],
|
1040
|
-
DataSource: { Id:
|
1369
|
+
DataSource: { Id: _this11.dataSource },
|
1041
1370
|
ThirdPaymentInfo: themode.thridPayment || null,
|
1042
1371
|
ThirdPaymentReturnInfo: mode.thirdPaymentReturnInfo || null
|
1043
1372
|
});
|
@@ -1057,49 +1386,49 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
1057
1386
|
});
|
1058
1387
|
|
1059
1388
|
if (!(payList && payList.length > 0)) {
|
1060
|
-
|
1389
|
+
_context5.next = 19;
|
1061
1390
|
break;
|
1062
1391
|
}
|
1063
1392
|
|
1064
1393
|
payment = payList[0];
|
1065
1394
|
tradeType = payment && payment.StorageAmount > 0 ? TradeType.PAY : TradeType.REFUND;
|
1066
|
-
|
1395
|
+
_context5.next = 11;
|
1067
1396
|
return this.thirdPay(2, payment, tradeType, dtoParams);
|
1068
1397
|
|
1069
1398
|
case 11:
|
1070
|
-
ret =
|
1071
|
-
|
1399
|
+
ret = _context5.sent;
|
1400
|
+
_ref12 = ret || {}, type = _ref12.type, data = _ref12.data, msg = _ref12.msg, code = _ref12.code;
|
1072
1401
|
|
1073
1402
|
if (!(type === true)) {
|
1074
|
-
|
1403
|
+
_context5.next = 17;
|
1075
1404
|
break;
|
1076
1405
|
}
|
1077
1406
|
|
1078
1407
|
dtoParams = data;
|
1079
|
-
|
1408
|
+
_context5.next = 19;
|
1080
1409
|
break;
|
1081
1410
|
|
1082
1411
|
case 17:
|
1083
1412
|
_message2.default.warn('\u5237\u5361\u652F\u4ED8\u5931\u8D25,\u9519\u8BEF\u7801:' + code);
|
1084
|
-
return
|
1413
|
+
return _context5.abrupt('return', false);
|
1085
1414
|
|
1086
1415
|
case 19:
|
1087
1416
|
this.dtoParams = dtoParams;
|
1088
1417
|
console.log('储值结算信息:', dtoParams);
|
1089
|
-
return
|
1090
|
-
|
1418
|
+
return _context5.abrupt('return', (0, _tplusApi.tApi)({ dto: dtoParams }, 'chanjet.ME.INewRetailMemberStorage.Save', false, false).then(function (resp) {
|
1419
|
+
_this11.handlePrint(resp);
|
1091
1420
|
}));
|
1092
1421
|
|
1093
1422
|
case 22:
|
1094
1423
|
case 'end':
|
1095
|
-
return
|
1424
|
+
return _context5.stop();
|
1096
1425
|
}
|
1097
1426
|
}
|
1098
|
-
},
|
1427
|
+
}, _callee5, this);
|
1099
1428
|
}));
|
1100
1429
|
|
1101
1430
|
function saveMember() {
|
1102
|
-
return
|
1431
|
+
return _ref11.apply(this, arguments);
|
1103
1432
|
}
|
1104
1433
|
|
1105
1434
|
return saveMember;
|
@@ -1107,31 +1436,31 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
1107
1436
|
}, {
|
1108
1437
|
key: 'save',
|
1109
1438
|
value: function () {
|
1110
|
-
var
|
1111
|
-
var
|
1439
|
+
var _ref13 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee6() {
|
1440
|
+
var _this12 = this;
|
1112
1441
|
|
1113
|
-
var _enumController$
|
1442
|
+
var _enumController$getEn16, PayStyle, TradeType, IPMSG, RetailTypeEnum, _getLoginInfo3, PreSellOrBook, PercentageWhenBook, _ref14, IdbusiType, DistributionMode, prepaidAmount, fullPayment, dtoParams, payList, payment, tradeType, ret, _ref15, type, data, msg, code;
|
1114
1443
|
|
1115
|
-
return _regenerator2.default.wrap(function
|
1444
|
+
return _regenerator2.default.wrap(function _callee6$(_context6) {
|
1116
1445
|
while (1) {
|
1117
|
-
switch (
|
1446
|
+
switch (_context6.prev = _context6.next) {
|
1118
1447
|
case 0:
|
1119
|
-
_enumController$
|
1448
|
+
_enumController$getEn16 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn16.PayStyle, TradeType = _enumController$getEn16.TradeType;
|
1120
1449
|
|
1121
1450
|
(0, _mobx.runInAction)(function () {
|
1122
|
-
|
1123
|
-
|
1124
|
-
|
1451
|
+
_this12.dto.RetailPaymentDetails = [];
|
1452
|
+
_this12.dto.RetailStorageDetails = [];
|
1453
|
+
_this12.dto.RetailCouponDetails = [];
|
1125
1454
|
var czkSum = 0;
|
1126
1455
|
var count = 0;
|
1127
|
-
var thePaymodes =
|
1456
|
+
var thePaymodes = _this12.newStyle ? (0, _filter3.default)(_this12.paymode.thePaymodes, function (mode) {
|
1128
1457
|
return parseFloat(mode.value) != 0;
|
1129
|
-
}) :
|
1458
|
+
}) : _this12.paymode.thePaymodes;
|
1130
1459
|
(0, _each3.default)(thePaymodes, function (mode, index) {
|
1131
|
-
var themode = (0, _find3.default)(
|
1460
|
+
var themode = (0, _find3.default)(_this12.paymode.paymodes, { 'paymentType': mode.paymentType });
|
1132
1461
|
if (mode.paymentType == PayStyle.hyczk) {
|
1133
1462
|
czkSum = Math.Add(czkSum, mode.value);
|
1134
|
-
|
1463
|
+
_this12.dto.RetailStorageDetails.push({
|
1135
1464
|
Code: mode.paymethodId,
|
1136
1465
|
MeStorageCardId: mode.meStorageCardId,
|
1137
1466
|
StoragePaymentAmount: mode.value,
|
@@ -1140,17 +1469,17 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
1140
1469
|
Idmember: mode.memberId,
|
1141
1470
|
DynamicPropertyKeys: [],
|
1142
1471
|
DynamicPropertyValues: [],
|
1143
|
-
DataSource: { Id:
|
1472
|
+
DataSource: { Id: _this12.dataSource },
|
1144
1473
|
Password: mode.authCode
|
1145
1474
|
});
|
1146
1475
|
} else {
|
1147
1476
|
var value = parseFloat(mode.value);
|
1148
1477
|
var giveChange = null;
|
1149
|
-
if (mode.paymentType == PayStyle.xianjin &&
|
1150
|
-
value = Math.Add(value,
|
1151
|
-
giveChange = Math.abs(
|
1478
|
+
if (mode.paymentType == PayStyle.xianjin && _this12.paymode.receivable < 0 && value > Math.abs(_this12.paymode.receivable)) {
|
1479
|
+
value = Math.Add(value, _this12.paymode.receivable);
|
1480
|
+
giveChange = Math.abs(_this12.paymode.receivable);
|
1152
1481
|
}
|
1153
|
-
|
1482
|
+
_this12.dto.RetailPaymentDetails.push({
|
1154
1483
|
Code: mode.paymethodId,
|
1155
1484
|
OrigAmount: mode.exchangeRate != 1 ? mode.value2 : value,
|
1156
1485
|
Amount: value,
|
@@ -1164,14 +1493,14 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
1164
1493
|
OverchargesAmount: mode.overchargesAmount,
|
1165
1494
|
DynamicPropertyKeys: [],
|
1166
1495
|
DynamicPropertyValues: [],
|
1167
|
-
DataSource: { Id:
|
1496
|
+
DataSource: { Id: _this12.dataSource },
|
1168
1497
|
ThirdPaymentInfo: themode.thridPayment || null,
|
1169
1498
|
SettleStyle: { Name: mode.name },
|
1170
1499
|
ThirdPaymentReturnInfo: mode.thirdPaymentReturnInfo || null
|
1171
1500
|
});
|
1172
1501
|
if (mode.paymentType == PayStyle.djq) {
|
1173
|
-
(0, _each3.default)(
|
1174
|
-
|
1502
|
+
(0, _each3.default)(_this12.paymode.checkList && _this12.paymode.checkList.length ? _this12.paymode.checkList : mode.djqs, function (djq) {
|
1503
|
+
_this12.dto.RetailCouponDetails.push({
|
1175
1504
|
CouponCode: djq.promoCouponCode,
|
1176
1505
|
ReductionAmount: djq.amount,
|
1177
1506
|
EnableAmount: djq.doorsill,
|
@@ -1181,24 +1510,24 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
1181
1510
|
PromotionId: djq.promoId,
|
1182
1511
|
PromotionRuleId: djq.promoRuleId,
|
1183
1512
|
PromoCouponAllocatedId: djq.id,
|
1184
|
-
DataSource: { Id:
|
1513
|
+
DataSource: { Id: _this12.dataSource }
|
1185
1514
|
});
|
1186
1515
|
});
|
1187
1516
|
}
|
1188
1517
|
}
|
1189
1518
|
});
|
1190
|
-
if (
|
1191
|
-
var themode = (0, _find3.default)(
|
1192
|
-
|
1193
|
-
Code:
|
1519
|
+
if (_this12.dto.RetailStorageDetails.length > 0) {
|
1520
|
+
var themode = (0, _find3.default)(_this12.paymode.paymodes, { 'paymentType': PayStyle.hyczk });
|
1521
|
+
_this12.dto.RetailPaymentDetails.push({
|
1522
|
+
Code: _this12.paymode.counter,
|
1194
1523
|
OrigAmount: czkSum,
|
1195
1524
|
Amount: czkSum,
|
1196
1525
|
IdsettleStyle: themode.idSettleStyle,
|
1197
1526
|
IdbankAccount: themode.idBankAccount,
|
1198
1527
|
DynamicPropertyKeys: [],
|
1199
1528
|
DynamicPropertyValues: [],
|
1200
|
-
DataSource: { Id:
|
1201
|
-
RetailStorageDetails:
|
1529
|
+
DataSource: { Id: _this12.dataSource },
|
1530
|
+
RetailStorageDetails: _this12.dto.RetailStorageDetails
|
1202
1531
|
});
|
1203
1532
|
}
|
1204
1533
|
});
|
@@ -1211,7 +1540,7 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
1211
1540
|
}
|
1212
1541
|
RetailTypeEnum = this.dto.IdbusiType == 36 ? "INTEGRAL_EXCHANGE" : "NORMAL";
|
1213
1542
|
_getLoginInfo3 = this.getLoginInfo(), PreSellOrBook = _getLoginInfo3.PreSellOrBook, PercentageWhenBook = _getLoginInfo3.PercentageWhenBook;
|
1214
|
-
|
1543
|
+
_ref14 = this.dto || {}, IdbusiType = _ref14.IdbusiType, DistributionMode = _ref14.DistributionMode;
|
1215
1544
|
|
1216
1545
|
if (IdbusiType == 38 && PreSellOrBook == 'BOOK' && PercentageWhenBook < 100 && (!DistributionMode.Id || DistributionMode.Id == 'ON_SITE_PICKUP')) {
|
1217
1546
|
prepaidAmount = (0, _utils.getFixedNumber)(this.dto.RetailPaymentDetails.reduce(function (c, item) {
|
@@ -1223,35 +1552,35 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
1223
1552
|
|
1224
1553
|
this.isFull = fullPayment == prepaidAmount; // 是否全款
|
1225
1554
|
(0, _mobx.runInAction)(function () {
|
1226
|
-
|
1555
|
+
_this12.dto.PrepaidAmount = prepaidAmount;
|
1227
1556
|
});
|
1228
1557
|
}
|
1229
|
-
|
1558
|
+
_context6.t1 = this.dto.IdbusiType == 37;
|
1230
1559
|
|
1231
|
-
if (!
|
1232
|
-
|
1560
|
+
if (!_context6.t1) {
|
1561
|
+
_context6.next = 14;
|
1233
1562
|
break;
|
1234
1563
|
}
|
1235
1564
|
|
1236
|
-
|
1565
|
+
_context6.next = 13;
|
1237
1566
|
return this.checkIntegralExchangeReturn(this.dto.RetailDetails[0].ReturnSourceId);
|
1238
1567
|
|
1239
1568
|
case 13:
|
1240
|
-
|
1569
|
+
_context6.t1 = _context6.sent;
|
1241
1570
|
|
1242
1571
|
case 14:
|
1243
|
-
|
1572
|
+
_context6.t0 = _context6.t1;
|
1244
1573
|
|
1245
|
-
if (
|
1246
|
-
|
1574
|
+
if (_context6.t0) {
|
1575
|
+
_context6.next = 17;
|
1247
1576
|
break;
|
1248
1577
|
}
|
1249
1578
|
|
1250
|
-
|
1579
|
+
_context6.t0 = this.dto.IdbusiType != 37;
|
1251
1580
|
|
1252
1581
|
case 17:
|
1253
|
-
if (!
|
1254
|
-
|
1582
|
+
if (!_context6.t0) {
|
1583
|
+
_context6.next = 36;
|
1255
1584
|
break;
|
1256
1585
|
}
|
1257
1586
|
|
@@ -1263,54 +1592,54 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
1263
1592
|
});
|
1264
1593
|
|
1265
1594
|
if (!(payList && payList.length > 0)) {
|
1266
|
-
|
1595
|
+
_context6.next = 33;
|
1267
1596
|
break;
|
1268
1597
|
}
|
1269
1598
|
|
1270
1599
|
payment = payList[0];
|
1271
1600
|
tradeType = payment && payment.Amount > 0 ? TradeType.PAY : TradeType.REFUND;
|
1272
|
-
|
1601
|
+
_context6.next = 25;
|
1273
1602
|
return this.thirdPay(1, payment, tradeType, dtoParams);
|
1274
1603
|
|
1275
1604
|
case 25:
|
1276
|
-
ret =
|
1277
|
-
|
1605
|
+
ret = _context6.sent;
|
1606
|
+
_ref15 = ret || {}, type = _ref15.type, data = _ref15.data, msg = _ref15.msg, code = _ref15.code;
|
1278
1607
|
|
1279
1608
|
if (!(type === true)) {
|
1280
|
-
|
1609
|
+
_context6.next = 31;
|
1281
1610
|
break;
|
1282
1611
|
}
|
1283
1612
|
|
1284
1613
|
dtoParams = data;
|
1285
|
-
|
1614
|
+
_context6.next = 33;
|
1286
1615
|
break;
|
1287
1616
|
|
1288
1617
|
case 31:
|
1289
1618
|
_message2.default.warn('\u5237\u5361\u652F\u4ED8\u5931\u8D25,\u9519\u8BEF\u7801:' + code);
|
1290
|
-
return
|
1619
|
+
return _context6.abrupt('return', false);
|
1291
1620
|
|
1292
1621
|
case 33:
|
1293
1622
|
this.dtoParams = dtoParams;
|
1294
1623
|
console.log('结算信息:', dtoParams);
|
1295
|
-
return
|
1296
|
-
var
|
1297
|
-
ID =
|
1624
|
+
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) {
|
1625
|
+
var _ref16 = resp || {},
|
1626
|
+
ID = _ref16.ID;
|
1298
1627
|
|
1299
|
-
|
1300
|
-
|
1301
|
-
|
1628
|
+
_this12.setDtoID(ID);
|
1629
|
+
_this12.billID = ID;
|
1630
|
+
_this12.paymode.checkList = [];
|
1302
1631
|
}));
|
1303
1632
|
|
1304
1633
|
case 36:
|
1305
1634
|
case 'end':
|
1306
|
-
return
|
1635
|
+
return _context6.stop();
|
1307
1636
|
}
|
1308
1637
|
}
|
1309
|
-
},
|
1638
|
+
}, _callee6, this);
|
1310
1639
|
}));
|
1311
1640
|
|
1312
1641
|
function save() {
|
1313
|
-
return
|
1642
|
+
return _ref13.apply(this, arguments);
|
1314
1643
|
}
|
1315
1644
|
|
1316
1645
|
return save;
|
@@ -1338,19 +1667,19 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
1338
1667
|
}, {
|
1339
1668
|
key: 'thirdPay',
|
1340
1669
|
value: function () {
|
1341
|
-
var
|
1342
|
-
var cto, params, ret,
|
1670
|
+
var _ref17 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee7(vType, payment, trade, dto) {
|
1671
|
+
var cto, params, ret, _ref18, Code, _Message, Result, _ref19, ThirdPaymentReturnInfo;
|
1343
1672
|
|
1344
|
-
return _regenerator2.default.wrap(function
|
1673
|
+
return _regenerator2.default.wrap(function _callee7$(_context7) {
|
1345
1674
|
while (1) {
|
1346
|
-
switch (
|
1675
|
+
switch (_context7.prev = _context7.next) {
|
1347
1676
|
case 0:
|
1348
|
-
|
1677
|
+
_context7.prev = 0;
|
1349
1678
|
cto = this.removeThirdPayDto(dto);
|
1350
1679
|
params = { VoucherType: vType, Payment: payment, TradeType: trade, dto: cto };
|
1351
1680
|
|
1352
1681
|
console.log('刷卡信息:', (0, _stringify2.default)(params));
|
1353
|
-
|
1682
|
+
_context7.next = 6;
|
1354
1683
|
return new _promise2.default(function (resolve, reject) {
|
1355
1684
|
_mutantsMicrofx.nativeMs.setIpcRendererMethod('ThirdPayment', (0, _extends3.default)({}, params), function (res) {
|
1356
1685
|
return resolve(res);
|
@@ -1358,26 +1687,26 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
1358
1687
|
});
|
1359
1688
|
|
1360
1689
|
case 6:
|
1361
|
-
ret =
|
1690
|
+
ret = _context7.sent;
|
1362
1691
|
|
1363
1692
|
console.log('刷卡返回信息:', ret);
|
1364
1693
|
ret = JSON.parse(ret);
|
1365
|
-
|
1694
|
+
_ref18 = ret || {}, Code = _ref18.Code, _Message = _ref18.Message, Result = _ref18.Result;
|
1366
1695
|
|
1367
1696
|
if (!(Code > 0)) {
|
1368
|
-
|
1697
|
+
_context7.next = 14;
|
1369
1698
|
break;
|
1370
1699
|
}
|
1371
1700
|
|
1372
|
-
return
|
1701
|
+
return _context7.abrupt('return', { type: false, data: null, msg: _Message, code: Code });
|
1373
1702
|
|
1374
1703
|
case 14:
|
1375
1704
|
if (!(trade == '00')) {
|
1376
|
-
|
1705
|
+
_context7.next = 20;
|
1377
1706
|
break;
|
1378
1707
|
}
|
1379
1708
|
|
1380
|
-
|
1709
|
+
_ref19 = Result || {}, ThirdPaymentReturnInfo = _ref19.ThirdPaymentReturnInfo;
|
1381
1710
|
|
1382
1711
|
if (vType == 1) {
|
1383
1712
|
dto.RetailPaymentDetails.forEach(function (v) {
|
@@ -1392,35 +1721,35 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
1392
1721
|
}
|
1393
1722
|
});
|
1394
1723
|
}
|
1395
|
-
return
|
1724
|
+
return _context7.abrupt('return', { type: true, data: dto, msg: _Message, code: Code });
|
1396
1725
|
|
1397
1726
|
case 20:
|
1398
1727
|
if (!(trade == '02')) {
|
1399
|
-
|
1728
|
+
_context7.next = 22;
|
1400
1729
|
break;
|
1401
1730
|
}
|
1402
1731
|
|
1403
|
-
return
|
1732
|
+
return _context7.abrupt('return', { type: true, data: dto, msg: _Message, code: Code });
|
1404
1733
|
|
1405
1734
|
case 22:
|
1406
|
-
|
1735
|
+
_context7.next = 27;
|
1407
1736
|
break;
|
1408
1737
|
|
1409
1738
|
case 24:
|
1410
|
-
|
1411
|
-
|
1412
|
-
return
|
1739
|
+
_context7.prev = 24;
|
1740
|
+
_context7.t0 = _context7['catch'](0);
|
1741
|
+
return _context7.abrupt('return', { type: false, data: null, msg: _context7.t0, code: '9999' });
|
1413
1742
|
|
1414
1743
|
case 27:
|
1415
1744
|
case 'end':
|
1416
|
-
return
|
1745
|
+
return _context7.stop();
|
1417
1746
|
}
|
1418
1747
|
}
|
1419
|
-
},
|
1748
|
+
}, _callee7, this, [[0, 24]]);
|
1420
1749
|
}));
|
1421
1750
|
|
1422
|
-
function thirdPay(
|
1423
|
-
return
|
1751
|
+
function thirdPay(_x4, _x5, _x6, _x7) {
|
1752
|
+
return _ref17.apply(this, arguments);
|
1424
1753
|
}
|
1425
1754
|
|
1426
1755
|
return thirdPay;
|
@@ -1431,14 +1760,14 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
1431
1760
|
}, {
|
1432
1761
|
key: 'thirdPayRefund',
|
1433
1762
|
value: function () {
|
1434
|
-
var
|
1435
|
-
var
|
1763
|
+
var _ref20 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee9(type) {
|
1764
|
+
var _this13 = this;
|
1436
1765
|
|
1437
|
-
var dto, pay, payment, _enumController$
|
1766
|
+
var dto, pay, payment, _enumController$getEn17, TradeType;
|
1438
1767
|
|
1439
|
-
return _regenerator2.default.wrap(function
|
1768
|
+
return _regenerator2.default.wrap(function _callee9$(_context9) {
|
1440
1769
|
while (1) {
|
1441
|
-
switch (
|
1770
|
+
switch (_context9.prev = _context9.next) {
|
1442
1771
|
case 0:
|
1443
1772
|
dto = type == 1 ? this.dtoParams.RetailPaymentDetails : this.dtoParams.StorageMutiSettleDetails;
|
1444
1773
|
pay = dto && dto.filter(function (v) {
|
@@ -1450,43 +1779,43 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
1450
1779
|
_message2.default.warn("支付出现异常,将发起刷卡退款。", { duration: 4.5 });
|
1451
1780
|
}, 1000);
|
1452
1781
|
payment = pay[0];
|
1453
|
-
_enumController$
|
1782
|
+
_enumController$getEn17 = _mutantsUtil.enumController.getEnumOj(), TradeType = _enumController$getEn17.TradeType;
|
1454
1783
|
|
1455
|
-
setTimeout((0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function
|
1456
|
-
var ret,
|
1784
|
+
setTimeout((0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee8() {
|
1785
|
+
var ret, _ref22, msg;
|
1457
1786
|
|
1458
|
-
return _regenerator2.default.wrap(function
|
1787
|
+
return _regenerator2.default.wrap(function _callee8$(_context8) {
|
1459
1788
|
while (1) {
|
1460
|
-
switch (
|
1789
|
+
switch (_context8.prev = _context8.next) {
|
1461
1790
|
case 0:
|
1462
|
-
|
1463
|
-
return
|
1791
|
+
_context8.next = 2;
|
1792
|
+
return _this13.thirdPay(type, payment, TradeType.REFUND, dto);
|
1464
1793
|
|
1465
1794
|
case 2:
|
1466
|
-
ret =
|
1467
|
-
|
1795
|
+
ret = _context8.sent;
|
1796
|
+
_ref22 = ret || {}, msg = _ref22.msg;
|
1468
1797
|
|
1469
1798
|
console.log('\u5237\u5361\u652F\u4ED8\u9000\u6B3E:' + msg);
|
1470
1799
|
|
1471
1800
|
case 5:
|
1472
1801
|
case 'end':
|
1473
|
-
return
|
1802
|
+
return _context8.stop();
|
1474
1803
|
}
|
1475
1804
|
}
|
1476
|
-
},
|
1805
|
+
}, _callee8, _this13);
|
1477
1806
|
})), 4500);
|
1478
1807
|
}
|
1479
1808
|
|
1480
1809
|
case 3:
|
1481
1810
|
case 'end':
|
1482
|
-
return
|
1811
|
+
return _context9.stop();
|
1483
1812
|
}
|
1484
1813
|
}
|
1485
|
-
},
|
1814
|
+
}, _callee9, this);
|
1486
1815
|
}));
|
1487
1816
|
|
1488
|
-
function thirdPayRefund(
|
1489
|
-
return
|
1817
|
+
function thirdPayRefund(_x8) {
|
1818
|
+
return _ref20.apply(this, arguments);
|
1490
1819
|
}
|
1491
1820
|
|
1492
1821
|
return thirdPayRefund;
|
@@ -1499,35 +1828,35 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
1499
1828
|
}, {
|
1500
1829
|
key: 'querySettleResult',
|
1501
1830
|
value: function () {
|
1502
|
-
var
|
1503
|
-
return _regenerator2.default.wrap(function
|
1831
|
+
var _ref23 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee10() {
|
1832
|
+
return _regenerator2.default.wrap(function _callee10$(_context10) {
|
1504
1833
|
while (1) {
|
1505
|
-
switch (
|
1834
|
+
switch (_context10.prev = _context10.next) {
|
1506
1835
|
case 0:
|
1507
|
-
|
1508
|
-
|
1509
|
-
|
1510
|
-
return
|
1836
|
+
_context10.prev = 0;
|
1837
|
+
_context10.t0 = _promise2.default;
|
1838
|
+
_context10.next = 4;
|
1839
|
+
return (0, _tplusApi.tApi)({ RetailCode: this.dto.Code }, 'chanjet.RE.newRetail.QuerySettleResult', false, false, { timeout_skip: true });
|
1511
1840
|
|
1512
1841
|
case 4:
|
1513
|
-
|
1514
|
-
return
|
1842
|
+
_context10.t1 = _context10.sent;
|
1843
|
+
return _context10.abrupt('return', _context10.t0.resolve.call(_context10.t0, _context10.t1));
|
1515
1844
|
|
1516
1845
|
case 8:
|
1517
|
-
|
1518
|
-
|
1519
|
-
return
|
1846
|
+
_context10.prev = 8;
|
1847
|
+
_context10.t2 = _context10['catch'](0);
|
1848
|
+
return _context10.abrupt('return', _promise2.default.resolve({ Flag: "1" }));
|
1520
1849
|
|
1521
1850
|
case 11:
|
1522
1851
|
case 'end':
|
1523
|
-
return
|
1852
|
+
return _context10.stop();
|
1524
1853
|
}
|
1525
1854
|
}
|
1526
|
-
},
|
1855
|
+
}, _callee10, this, [[0, 8]]);
|
1527
1856
|
}));
|
1528
1857
|
|
1529
1858
|
function querySettleResult() {
|
1530
|
-
return
|
1859
|
+
return _ref23.apply(this, arguments);
|
1531
1860
|
}
|
1532
1861
|
|
1533
1862
|
return querySettleResult;
|
@@ -1553,18 +1882,18 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
1553
1882
|
}, {
|
1554
1883
|
key: 'validePwd',
|
1555
1884
|
value: function () {
|
1556
|
-
var
|
1557
|
-
var
|
1885
|
+
var _ref24 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee11(value) {
|
1886
|
+
var _ref25, isNewRetailBCPos, cook1, cook2, message, memberStorageId, _paymode$currentMode, cardTypeEnum, memberId, meStorageCardId, cardStatusEnum, result, count, _result;
|
1558
1887
|
|
1559
|
-
return _regenerator2.default.wrap(function
|
1888
|
+
return _regenerator2.default.wrap(function _callee11$(_context11) {
|
1560
1889
|
while (1) {
|
1561
|
-
switch (
|
1890
|
+
switch (_context11.prev = _context11.next) {
|
1562
1891
|
case 0:
|
1563
|
-
|
1564
|
-
|
1892
|
+
_ref25 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref25.isNewRetailBCPos;
|
1893
|
+
_context11.prev = 1;
|
1565
1894
|
|
1566
1895
|
if (!isNewRetailBCPos) {
|
1567
|
-
|
1896
|
+
_context11.next = 33;
|
1568
1897
|
break;
|
1569
1898
|
}
|
1570
1899
|
|
@@ -1574,56 +1903,62 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
1574
1903
|
memberStorageId = this.paymode.currentMode.meStorageCardId;
|
1575
1904
|
|
1576
1905
|
if (!cook2) {
|
1577
|
-
|
1906
|
+
_context11.next = 12;
|
1578
1907
|
break;
|
1579
1908
|
}
|
1580
1909
|
|
1581
1910
|
if (!cook2.hasOwnProperty(memberStorageId + "")) {
|
1582
|
-
|
1911
|
+
_context11.next = 12;
|
1583
1912
|
break;
|
1584
1913
|
}
|
1585
1914
|
|
1586
1915
|
if (!(cook2[memberStorageId] > 3)) {
|
1587
|
-
|
1916
|
+
_context11.next = 12;
|
1588
1917
|
break;
|
1589
1918
|
}
|
1590
1919
|
|
1591
1920
|
message = '今日密码错误已达上限,不可使用储值消费,请明日再试,如忘记请重置密码或修改密码。';
|
1592
|
-
return
|
1921
|
+
return _context11.abrupt('return', _promise2.default.resolve(message));
|
1593
1922
|
|
1594
1923
|
case 12:
|
1595
1924
|
_paymode$currentMode = this.paymode.currentMode, cardTypeEnum = _paymode$currentMode.cardTypeEnum, memberId = _paymode$currentMode.memberId, meStorageCardId = _paymode$currentMode.meStorageCardId, cardStatusEnum = _paymode$currentMode.cardStatusEnum;
|
1596
|
-
|
1597
|
-
|
1598
|
-
|
1599
|
-
|
1600
|
-
|
1601
|
-
md5Password: _tplusApi.User.pwdEncrypt(value.pwd),
|
1602
|
-
cardType: cardTypeEnum
|
1603
|
-
};
|
1604
|
-
checkPaymentPasswordId = memberId;
|
1605
|
-
} else {
|
1606
|
-
if (cardStatusEnum === 'BINDING' && this.member && this.member.ID === memberId) {
|
1607
|
-
checkPaymentPasswordParams = {
|
1608
|
-
md5Password: _tplusApi.User.pwdEncrypt(value.pwd),
|
1609
|
-
password: value.pwd,
|
1610
|
-
cardType: cardTypeEnum
|
1611
|
-
};
|
1612
|
-
checkPaymentPasswordId = meStorageCardId;
|
1613
|
-
} else {
|
1614
|
-
checkPaymentPasswordParams = {
|
1615
|
-
password: value.pwd,
|
1616
|
-
cardType: cardTypeEnum
|
1617
|
-
};
|
1618
|
-
checkPaymentPasswordId = meStorageCardId;
|
1619
|
-
}
|
1925
|
+
result = null;
|
1926
|
+
|
1927
|
+
if (!(cardTypeEnum === 'BALANCE_CARD')) {
|
1928
|
+
_context11.next = 20;
|
1929
|
+
break;
|
1620
1930
|
}
|
1621
|
-
_context9.next = 18;
|
1622
|
-
return this.SettlementApi.checkPaymentPassword(checkPaymentPasswordParams, checkPaymentPasswordId);
|
1623
1931
|
|
1624
|
-
|
1625
|
-
|
1932
|
+
_context11.next = 17;
|
1933
|
+
return (0, _tplusApi.ccApi)({ md5Password: _tplusApi.User.pwdEncrypt(value.pwd), cardType: cardTypeEnum }, '/member/MeMemberWallet/checkPaymentPassword/' + memberId, false, false);
|
1626
1934
|
|
1935
|
+
case 17:
|
1936
|
+
result = _context11.sent;
|
1937
|
+
_context11.next = 29;
|
1938
|
+
break;
|
1939
|
+
|
1940
|
+
case 20:
|
1941
|
+
if (!(cardStatusEnum === 'BINDING' && this.member && this.member.ID === memberId)) {
|
1942
|
+
_context11.next = 26;
|
1943
|
+
break;
|
1944
|
+
}
|
1945
|
+
|
1946
|
+
_context11.next = 23;
|
1947
|
+
return (0, _tplusApi.ccApi)({ md5Password: _tplusApi.User.pwdEncrypt(value.pwd), password: value.pwd, cardType: cardTypeEnum }, '/member/MeMemberWallet/checkPaymentPassword/' + meStorageCardId, false, false);
|
1948
|
+
|
1949
|
+
case 23:
|
1950
|
+
result = _context11.sent;
|
1951
|
+
_context11.next = 29;
|
1952
|
+
break;
|
1953
|
+
|
1954
|
+
case 26:
|
1955
|
+
_context11.next = 28;
|
1956
|
+
return (0, _tplusApi.ccApi)({ password: value.pwd, cardType: cardTypeEnum }, '/member/MeMemberWallet/checkPaymentPassword/' + meStorageCardId, false, false);
|
1957
|
+
|
1958
|
+
case 28:
|
1959
|
+
result = _context11.sent;
|
1960
|
+
|
1961
|
+
case 29:
|
1627
1962
|
if (!result.data) {
|
1628
1963
|
if (cook2) {
|
1629
1964
|
if (cook2.hasOwnProperty(memberStorageId + "")) {
|
@@ -1640,381 +1975,45 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
1640
1975
|
this.setCookie('errorPwd', '', -1);
|
1641
1976
|
this.setCookie('errorPwd', (0, _stringify2.default)(cook2));
|
1642
1977
|
}
|
1643
|
-
return
|
1978
|
+
return _context11.abrupt('return', _promise2.default.resolve(result.data ? "" : message));
|
1644
1979
|
|
1645
|
-
case
|
1646
|
-
|
1647
|
-
return
|
1980
|
+
case 33:
|
1981
|
+
_context11.next = 35;
|
1982
|
+
return (0, _tplusApi.tApi)({ "CheckoutParams": {
|
1648
1983
|
"Idmember": value.id,
|
1649
1984
|
"Password": value.pwd
|
1650
|
-
} });
|
1985
|
+
} }, 'AA.DR.newRetailMember.CheckoutMemberPassword', false, false);
|
1651
1986
|
|
1652
|
-
case
|
1653
|
-
_result =
|
1654
|
-
return
|
1987
|
+
case 35:
|
1988
|
+
_result = _context11.sent;
|
1989
|
+
return _context11.abrupt('return', _promise2.default.resolve(_result.Success ? "" : _result.Message));
|
1655
1990
|
|
1656
|
-
case
|
1657
|
-
|
1991
|
+
case 37:
|
1992
|
+
_context11.next = 42;
|
1658
1993
|
break;
|
1659
1994
|
|
1660
|
-
case
|
1661
|
-
|
1662
|
-
|
1663
|
-
return
|
1995
|
+
case 39:
|
1996
|
+
_context11.prev = 39;
|
1997
|
+
_context11.t0 = _context11['catch'](1);
|
1998
|
+
return _context11.abrupt('return', "failed");
|
1664
1999
|
|
1665
|
-
case
|
2000
|
+
case 42:
|
1666
2001
|
case 'end':
|
1667
|
-
return
|
2002
|
+
return _context11.stop();
|
1668
2003
|
}
|
1669
2004
|
}
|
1670
|
-
},
|
2005
|
+
}, _callee11, this, [[1, 39]]);
|
1671
2006
|
}));
|
1672
2007
|
|
1673
|
-
function validePwd(
|
1674
|
-
return
|
2008
|
+
function validePwd(_x9) {
|
2009
|
+
return _ref24.apply(this, arguments);
|
1675
2010
|
}
|
1676
2011
|
|
1677
2012
|
return validePwd;
|
1678
2013
|
}()
|
1679
2014
|
}]);
|
1680
2015
|
return SettlementStore;
|
1681
|
-
}(),
|
1682
|
-
var _this13 = this;
|
1683
|
-
|
1684
|
-
this.paymode = null;
|
1685
|
-
this.dto = null;
|
1686
|
-
this.dtoParams = null;
|
1687
|
-
this.member = null;
|
1688
|
-
this.brefund = false;
|
1689
|
-
this.bquick = false;
|
1690
|
-
this.boriginReturn = false;
|
1691
|
-
|
1692
|
-
_initDefineProp(this, 'newStyle', _descriptor, this);
|
1693
|
-
|
1694
|
-
this.isFull = true;
|
1695
|
-
|
1696
|
-
_initDefineProp(this, 'setNewStyle', _descriptor2, this);
|
1697
|
-
|
1698
|
-
_initDefineProp(this, 'queryPwd', _descriptor3, this);
|
1699
|
-
|
1700
|
-
_initDefineProp(this, 'updateMemberInfo', _descriptor4, this);
|
1701
|
-
|
1702
|
-
_initDefineProp(this, 'updateCurrentMode', _descriptor5, this);
|
1703
|
-
|
1704
|
-
_initDefineProp(this, 'updateCardInfo', _descriptor6, this);
|
1705
|
-
|
1706
|
-
this.handleCzkData = function (m) {
|
1707
|
-
if (!m || !m.StorageCardNo) {
|
1708
|
-
(0, _mobx.runInAction)(function () {
|
1709
|
-
_this13.paymode.currentMode.errinfo = "无效的会员卡号";
|
1710
|
-
});
|
1711
|
-
} else {
|
1712
|
-
(0, _mobx.runInAction)(function () {
|
1713
|
-
_this13.paymode.currentMode.errinfo = "";
|
1714
|
-
_this13.paymode.currentMode.memberId = m.ID;
|
1715
|
-
_this13.paymode.currentMode.value = (0, _utils.getFixedNumber)(_this13.brefund ? _this13.paymode.receivable : Math.max(_this13.paymode.receivable, 0));
|
1716
|
-
_this13.updateEvent();
|
1717
|
-
var message = '';
|
1718
|
-
var sum = (0, _reduce3.default)(_this13.paymode.thePaymodes, function (total, cur) {
|
1719
|
-
return total + cur.value;
|
1720
|
-
}, 0);
|
1721
|
-
// 对于卡不用判断会员的一些信息
|
1722
|
-
// if (global.CheckMemberStorageProcessorBlock ) {
|
1723
|
-
// message= CheckMemberStorageProcessorBlock.execute(m);
|
1724
|
-
// }
|
1725
|
-
if (!String.isNullOrEmpty(message)) {
|
1726
|
-
_this13.paymode.currentMode.errinfo = message;
|
1727
|
-
} else if (_this13.checkReceived(_this13.paymode.currentMode, "balance")) {
|
1728
|
-
_this13.paymode.currentMode.errinfo = "余额不足";
|
1729
|
-
} else if (_this13.paymode.amount > 0 && parseFloat(_this13.paymode.amount) !== sum && _this13.paymode.currentMode.value == 0) {
|
1730
|
-
_this13.paymode.currentMode.errinfo = "实收金额必须录入";
|
1731
|
-
} else {
|
1732
|
-
// 查询成功后将焦点移入下一个输入框
|
1733
|
-
setTimeout(function () {
|
1734
|
-
var nextInput = document.querySelector('.czk .received .input');
|
1735
|
-
nextInput && nextInput.select();
|
1736
|
-
}, 300);
|
1737
|
-
}
|
1738
|
-
});
|
1739
|
-
}
|
1740
|
-
};
|
1741
|
-
|
1742
|
-
this.getCouponList = function (coupon_code) {
|
1743
|
-
var _enumController$getEn15 = _mutantsUtil.enumController.getEnumOj(),
|
1744
|
-
PayStyle = _enumController$getEn15.PayStyle,
|
1745
|
-
Differentiate = _enumController$getEn15.Differentiate;
|
1746
|
-
|
1747
|
-
var couponApplyRule = (0, _tplusPoslogin.PosInitData)('CouponApplyRule');
|
1748
|
-
|
1749
|
-
var _enumController$getEn16 = _mutantsUtil.enumController.getEnumOj(),
|
1750
|
-
CouponApplyRule = _enumController$getEn16.CouponApplyRule;
|
1751
|
-
|
1752
|
-
if (couponApplyRule == CouponApplyRule.SHOWN_BY_CUSTOMER && !!coupon_code || couponApplyRule != CouponApplyRule.SHOWN_BY_CUSTOMER) {
|
1753
|
-
var dto = _this13.dto;
|
1754
|
-
var promoVoucher = {};
|
1755
|
-
_this13.paymode.clearDjqs();
|
1756
|
-
_this13.paymode.reCalculationDjqs();
|
1757
|
-
promoVoucher.coupon_code = coupon_code || "";
|
1758
|
-
promoVoucher.boName = "Retail";
|
1759
|
-
promoVoucher.voucherId = dto.ID;
|
1760
|
-
var onlinePaymentAmount = 0;
|
1761
|
-
if (dto.OnlinePaymentAmount) {
|
1762
|
-
onlinePaymentAmount = dto.OnlinePaymentAmount;
|
1763
|
-
}
|
1764
|
-
promoVoucher.promoLinks = (0, _filter3.default)(_this13.paymode.currentMode.djqs, function (djq) {
|
1765
|
-
return djq.checked;
|
1766
|
-
});
|
1767
|
-
promoVoucher.totalAmountWithTax = Math.Minus(dto.TotalTaxAmount, onlinePaymentAmount);
|
1768
|
-
promoVoucher.redBlueFlagEnum = "BLUE";
|
1769
|
-
promoVoucher.meMemberId = dto.Idmember;
|
1770
|
-
promoVoucher.storeFactorId = dto.Idstore;
|
1771
|
-
promoVoucher.voucherDetailList = [];
|
1772
|
-
dto.RetailDetails.forEach(function (item) {
|
1773
|
-
var detailDTO = {};
|
1774
|
-
detailDTO.uuid = item.Code;
|
1775
|
-
detailDTO.detailBoName = "RetailDetail";
|
1776
|
-
detailDTO.voucherDetailId = item.ID;
|
1777
|
-
detailDTO.productId = item.Idinventory;
|
1778
|
-
detailDTO.uomId = item.Idunit;
|
1779
|
-
detailDTO.productSpecId = item.ProductSpecId;
|
1780
|
-
detailDTO.isManualFreeGift = item.IsPresent;
|
1781
|
-
detailDTO.isListPriceIncludingTax = item.TaxFlag || true;
|
1782
|
-
detailDTO.IsManualChangePrice = item.IsManualChangePrice;
|
1783
|
-
// if(detailDTO.IsManualChangePrice)//如果是手工改价
|
1784
|
-
// {
|
1785
|
-
// detailDTO.listPrice = item.TaxPrice;
|
1786
|
-
// detailDTO.netAmountWithTax = item.TaxAmount;
|
1787
|
-
// }
|
1788
|
-
// else
|
1789
|
-
// {
|
1790
|
-
var bookingQuantity = 0;
|
1791
|
-
if (item.BookingQuantity) {
|
1792
|
-
bookingQuantity = item.BookingQuantity;
|
1793
|
-
}
|
1794
|
-
detailDTO.listPrice = JSON.getCellValue(item, "listPrice");
|
1795
|
-
detailDTO.netAmountWithTax = Math.Multiply(detailDTO.listPrice, Math.Minus(item.Quantity, bookingQuantity)); //item.TaxAmount;
|
1796
|
-
//}
|
1797
|
-
detailDTO.taxRate = item.TaxRate;
|
1798
|
-
detailDTO.quantity = item.Quantity;
|
1799
|
-
|
1800
|
-
detailDTO.amountWithTax = item.RetailAmount;
|
1801
|
-
// 促销 start
|
1802
|
-
if (item.PromotionDetails && item.PromotionDetails.length != 0) {
|
1803
|
-
var promoLinks = [];
|
1804
|
-
item.PromotionDetails.forEach(function (promotion) {
|
1805
|
-
promoLinks.push({
|
1806
|
-
promoId: promotion.IdSalesPromotionDTO,
|
1807
|
-
promoRuleId: promotion.PromotionRuleId
|
1808
|
-
});
|
1809
|
-
});
|
1810
|
-
if (promoLinks.length != 0) detailDTO.promoLinks = promoLinks;
|
1811
|
-
}
|
1812
|
-
// 促销 end
|
1813
|
-
promoVoucher.voucherDetailList.push(detailDTO);
|
1814
|
-
});
|
1815
|
-
return _this13.SettlementApi.findUsefulCouponPromoList(promoVoucher).then(function (result) {
|
1816
|
-
if (result && result.length != 0) {
|
1817
|
-
result.forEach(function (element) {
|
1818
|
-
var _ref22 = element || {},
|
1819
|
-
couponCode = _ref22.couponCode,
|
1820
|
-
name = _ref22.name,
|
1821
|
-
tieredAmountResult = _ref22.tieredAmountResult,
|
1822
|
-
fromDate = _ref22.fromDate,
|
1823
|
-
dateMount = _ref22.dateMount,
|
1824
|
-
promoMethodEnum = _ref22.promoMethodEnum,
|
1825
|
-
discountPct = _ref22.discountPct,
|
1826
|
-
nominalAmount = _ref22.nominalAmount,
|
1827
|
-
promoId = _ref22.promoId,
|
1828
|
-
id = _ref22.id;
|
1829
|
-
|
1830
|
-
var condValue = tieredAmountResult.condValue,
|
1831
|
-
promoDiscount = tieredAmountResult.promoDiscount,
|
1832
|
-
displayText = tieredAmountResult.displayText,
|
1833
|
-
promoRuleId = tieredAmountResult.promoRuleId,
|
1834
|
-
couponCategoryEnum = tieredAmountResult.couponCategoryEnum;
|
1835
|
-
|
1836
|
-
if (result.IsRepelWithPoints && (0, _find3.default)(_this13.paymode.thePaymodes, function (themode) {
|
1837
|
-
return themode.paymentType == PayStyle.jfdx;
|
1838
|
-
})) {
|
1839
|
-
_message2.default.error(Differentiate.COUPON + '\uFF08' + result.SN + '\uFF09\u4E0D\u53EF\u4E0E\u79EF\u5206\u4E00\u8D77\u4F7F\u7528');
|
1840
|
-
} else {
|
1841
|
-
var IsEnable = couponCategoryEnum === 'RIGUP' || couponCategoryEnum === 'UN_MATCH' || couponCategoryEnum === "PREPARING" || couponCategoryEnum === 'PROMO_LIMITED' || couponCategoryEnum === 'COUPON_CONFLICT' ? false : true;
|
1842
|
-
_this13.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);
|
1843
|
-
}
|
1844
|
-
});
|
1845
|
-
if (promoVoucher.coupon_code) {
|
1846
|
-
_this13.paymode.calcDjqCheckValue(_this13.paymode.currentMode.djqs[0], _this13.dto, 'single');
|
1847
|
-
}
|
1848
|
-
} else {
|
1849
|
-
if (promoVoucher.coupon_code) {
|
1850
|
-
_message2.default.info(Differentiate.COUPON + '\u53F7\u4E0D\u5B58\u5728\uFF01');
|
1851
|
-
_this13.getCouponList();
|
1852
|
-
} else {
|
1853
|
-
_message2.default.info('\u6CA1\u6709\u627E\u5230\u53EF\u4F7F\u7528\u7684' + Differentiate.COUPON + '\uFF01');
|
1854
|
-
}
|
1855
|
-
}
|
1856
|
-
});
|
1857
|
-
}
|
1858
|
-
};
|
1859
|
-
|
1860
|
-
this.getSettleGift = function () {
|
1861
|
-
return _this13.SettlementApi.executeRightsForPos(_this13.billID);
|
1862
|
-
};
|
1863
|
-
|
1864
|
-
this.getRefWareHouseList = function () {
|
1865
|
-
return _this13.SettlementApi.getRefWareHouseList();
|
1866
|
-
};
|
1867
|
-
|
1868
|
-
this.checkCoupon = function () {
|
1869
|
-
var _ref23 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee10(sn) {
|
1870
|
-
var _ref24, isNewRetailBCPos, _enumController$getEn17, PayStyle, Differentiate, params;
|
1871
|
-
|
1872
|
-
return _regenerator2.default.wrap(function _callee10$(_context10) {
|
1873
|
-
while (1) {
|
1874
|
-
switch (_context10.prev = _context10.next) {
|
1875
|
-
case 0:
|
1876
|
-
_ref24 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref24.isNewRetailBCPos;
|
1877
|
-
|
1878
|
-
if (!isNewRetailBCPos) {
|
1879
|
-
_context10.next = 7;
|
1880
|
-
break;
|
1881
|
-
}
|
1882
|
-
|
1883
|
-
_context10.next = 4;
|
1884
|
-
return _this13.getCouponList(sn, 'sinlge');
|
1885
|
-
|
1886
|
-
case 4:
|
1887
|
-
return _context10.abrupt('return', _context10.sent);
|
1888
|
-
|
1889
|
-
case 7:
|
1890
|
-
_enumController$getEn17 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn17.PayStyle, Differentiate = _enumController$getEn17.Differentiate;
|
1891
|
-
params = { request: {
|
1892
|
-
Uid: _this13.paymode.currentMode.member.uid || '',
|
1893
|
-
SN: sn,
|
1894
|
-
StoreCode: _this13.dto.Idstore,
|
1895
|
-
Inventories: (0, _map3.default)((0, _filter3.default)(_this13.dto.RetailDetails, function (d) {
|
1896
|
-
return d.Quantity > 0 && !d.IsPresent;
|
1897
|
-
}), function (detail) {
|
1898
|
-
return {
|
1899
|
-
IdInventory: detail.Inventory.ID,
|
1900
|
-
IdUnit: detail.Idunit,
|
1901
|
-
Code: detail.Inventory.Code,
|
1902
|
-
FreeItem0: JSON.getCellValue(detail, "freeitem0"),
|
1903
|
-
FreeItem1: JSON.getCellValue(detail, "freeitem1"),
|
1904
|
-
FreeItem2: JSON.getCellValue(detail, "freeitem2"),
|
1905
|
-
FreeItem3: JSON.getCellValue(detail, "freeitem3"),
|
1906
|
-
FreeItem4: JSON.getCellValue(detail, "freeitem4"),
|
1907
|
-
FreeItem5: JSON.getCellValue(detail, "freeitem5"),
|
1908
|
-
FreeItem6: JSON.getCellValue(detail, "freeitem6"),
|
1909
|
-
FreeItem7: JSON.getCellValue(detail, "freeitem7"),
|
1910
|
-
FreeItem8: JSON.getCellValue(detail, "freeitem8"),
|
1911
|
-
FreeItem9: JSON.getCellValue(detail, "freeitem9")
|
1912
|
-
};
|
1913
|
-
}),
|
1914
|
-
// inventoryCodes:_join(_map(this.dto.RetailDetails,(detail)=>{return detail.Inventory.Code;}),','),
|
1915
|
-
InventoryClassCodes: (0, _join3.default)((0, _map3.default)((0, _filter3.default)(_this13.dto.RetailDetails, function (d) {
|
1916
|
-
return d.Quantity > 0;
|
1917
|
-
}), function (detail) {
|
1918
|
-
return (detail.Inventory.InventoryClass || { Code: '' }).Code;
|
1919
|
-
}), ','),
|
1920
|
-
Amount: _this13.paymode.amount
|
1921
|
-
} };
|
1922
|
-
return _context10.abrupt('return', _this13.SettlementApi.CheckCoupon(params).then(function (result) {
|
1923
|
-
if ((0, _find3.default)(_this13.paymode.currentMode.djqs, function (djq) {
|
1924
|
-
return djq.code == result.SN;
|
1925
|
-
})) {
|
1926
|
-
_message2.default.info(Differentiate.COUPON + '\u5DF2\u6DFB\u52A0');
|
1927
|
-
} else if (result.IsRepelWithPoints && (0, _find3.default)(_this13.paymode.thePaymodes, function (themode) {
|
1928
|
-
return themode.paymentType == PayStyle.jfdx;
|
1929
|
-
})) {
|
1930
|
-
_message2.default.error(Differentiate.COUPON + '\uFF08' + result.SN + '\uFF09\u4E0D\u53EF\u4E0E\u79EF\u5206\u4E00\u8D77\u4F7F\u7528');
|
1931
|
-
} else {
|
1932
|
-
_this13.addDjq(result.SN, result.Title, result.ReduceAmount, result.StartAmount, result.LastTS, false, !result.IsRepelWithPoints, result.UMemberID);
|
1933
|
-
}
|
1934
|
-
}));
|
1935
|
-
|
1936
|
-
case 10:
|
1937
|
-
case 'end':
|
1938
|
-
return _context10.stop();
|
1939
|
-
}
|
1940
|
-
}
|
1941
|
-
}, _callee10, _this13);
|
1942
|
-
}));
|
1943
|
-
|
1944
|
-
return function (_x9) {
|
1945
|
-
return _ref23.apply(this, arguments);
|
1946
|
-
};
|
1947
|
-
}();
|
1948
|
-
|
1949
|
-
this.repeatStorageModal = function (content) {
|
1950
|
-
return new _promise2.default(function (resolve, reject) {
|
1951
|
-
_tplusComponentsTouch.ModalWraper.confirm({
|
1952
|
-
title: '',
|
1953
|
-
okText: '继续储值',
|
1954
|
-
className: 'repeat-modal',
|
1955
|
-
zIndex: 1007,
|
1956
|
-
content: content,
|
1957
|
-
onOk: function () {
|
1958
|
-
var _ref25 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee11() {
|
1959
|
-
var ret;
|
1960
|
-
return _regenerator2.default.wrap(function _callee11$(_context11) {
|
1961
|
-
while (1) {
|
1962
|
-
switch (_context11.prev = _context11.next) {
|
1963
|
-
case 0:
|
1964
|
-
_context11.next = 2;
|
1965
|
-
return _this13.saveMember();
|
1966
|
-
|
1967
|
-
case 2:
|
1968
|
-
ret = _context11.sent;
|
1969
|
-
|
1970
|
-
if (ret === false) {
|
1971
|
-
resolve(false);
|
1972
|
-
} else {
|
1973
|
-
resolve(true);
|
1974
|
-
}
|
1975
|
-
|
1976
|
-
case 4:
|
1977
|
-
case 'end':
|
1978
|
-
return _context11.stop();
|
1979
|
-
}
|
1980
|
-
}
|
1981
|
-
}, _callee11, _this13);
|
1982
|
-
}));
|
1983
|
-
|
1984
|
-
return function onOk() {
|
1985
|
-
return _ref25.apply(this, arguments);
|
1986
|
-
};
|
1987
|
-
}(),
|
1988
|
-
onCancel: function onCancel() {
|
1989
|
-
resolve(false);
|
1990
|
-
}
|
1991
|
-
});
|
1992
|
-
});
|
1993
|
-
};
|
1994
|
-
|
1995
|
-
this.checkIntegralExchangeReturn = function (id) {
|
1996
|
-
return new _promise2.default(function (resolve, reject) {
|
1997
|
-
_this13.SettlementApi.GetNewIntegralExchange({ param: { refVoucherId: id } }).then(function (resp) {
|
1998
|
-
if (resp && resp.expireIntegral > 0) {
|
1999
|
-
_tplusComponentsTouch.ModalWraper.confirm({
|
2000
|
-
className: 'tplus-confirm-modal',
|
2001
|
-
title: "温馨提示",
|
2002
|
-
content: '\u5B58\u5728\u5DF2\u7ECF\u8FC7\u671F\u7684\u79EF\u5206' + resp.expireIntegral + '\u9000\u8D27\u540E\u79EF\u5206\u4E0D\u4F1A\u8FD4\u8FD8\u3002\u662F\u5426\u7EE7\u7EED\u9000\u8D27\uFF1F',
|
2003
|
-
cancelable: false,
|
2004
|
-
onOk: function onOk() {
|
2005
|
-
resolve(true);
|
2006
|
-
},
|
2007
|
-
onCancel: function onCancel() {
|
2008
|
-
reject(false);
|
2009
|
-
}
|
2010
|
-
});
|
2011
|
-
} else {
|
2012
|
-
resolve(true);
|
2013
|
-
}
|
2014
|
-
});
|
2015
|
-
});
|
2016
|
-
};
|
2017
|
-
}, _temp), (_descriptor = _applyDecoratedDescriptor(_class.prototype, 'newStyle', [_mobx.observable], {
|
2016
|
+
}(), (_descriptor = _applyDecoratedDescriptor(_class.prototype, 'newStyle', [_mobx.observable], {
|
2018
2017
|
enumerable: true,
|
2019
2018
|
initializer: function initializer() {
|
2020
2019
|
return true;
|
@@ -2025,8 +2024,7 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
2025
2024
|
var _this14 = this;
|
2026
2025
|
|
2027
2026
|
return function () {
|
2028
|
-
|
2029
|
-
_this14.newStyle = voucherDefaultPosMode == 'voucher';
|
2027
|
+
_this14.newStyle = _mutantsMicrofx.localStore && _mutantsMicrofx.localStore.get('voucherDefaultPosMode') == 'voucher';
|
2030
2028
|
};
|
2031
2029
|
}
|
2032
2030
|
}), _descriptor3 = _applyDecoratedDescriptor(_class.prototype, 'queryPwd', [_mobx.action], {
|
@@ -2042,13 +2040,13 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
2042
2040
|
return _message2.default.warn('您两次输入的密码不一致');
|
2043
2041
|
}
|
2044
2042
|
var idstore = (0, _tplusPoslogin.PosInitData)('storeID');
|
2045
|
-
return
|
2043
|
+
return (0, _tplusApi.ccApi)({
|
2046
2044
|
Idstore: idstore,
|
2047
2045
|
meMemberId: _this15.paymode.currentMode.memberId,
|
2048
2046
|
oldPassword: null,
|
2049
2047
|
newPassword: _tplusApi.User.pwdEncrypt(newPassConfirm),
|
2050
2048
|
dataSource: "POS"
|
2051
|
-
}).then(function (resp) {
|
2049
|
+
}, '/member/MeMemberWallet/setWalletPayPassword', false, false, { method: 'post', timeout_skip: true }).then(function (resp) {
|
2052
2050
|
if (resp.successful) {
|
2053
2051
|
return true;
|
2054
2052
|
}
|
@@ -2070,7 +2068,7 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
2070
2068
|
case 0:
|
2071
2069
|
_getLoginInfo4 = _this16.getLoginInfo(), IdStore = _getLoginInfo4.IdStore, StoreCode = _getLoginInfo4.StoreCode;
|
2072
2070
|
_context12.next = 3;
|
2073
|
-
return
|
2071
|
+
return (0, _tplusApi.tApi)({ Idmember: _this16.member.ID, IdStore: IdStore, StoreCode: StoreCode }, 'chanjet.AA.DR.INewRetailMember.GetUmemberDTO', false, false);
|
2074
2072
|
|
2075
2073
|
case 3:
|
2076
2074
|
resp = _context12.sent;
|
@@ -2105,10 +2103,9 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
2105
2103
|
switch (_context13.prev = _context13.next) {
|
2106
2104
|
case 0:
|
2107
2105
|
isOnlyEnabled = returnType ? false : true; //非原单退货为false,其他true
|
2108
|
-
// 查看会员卡信息
|
2109
2106
|
|
2110
2107
|
_context13.next = 3;
|
2111
|
-
return
|
2108
|
+
return (0, _tplusApi.ccApi)({}, '/marketingtool/MeStorageCard/getCardInfoByMemberId/' + memberId + '/' + isOnlyEnabled, false, false, { method: 'get' });
|
2112
2109
|
|
2113
2110
|
case 3:
|
2114
2111
|
result = _context13.sent;
|
@@ -2174,7 +2171,7 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
2174
2171
|
ctMode = _this18.paymode && _this18.paymode.currentMode;
|
2175
2172
|
cardNo = ctMode && ctMode.storageCardNo;
|
2176
2173
|
_context14.next = 4;
|
2177
|
-
return
|
2174
|
+
return (0, _tplusApi.ccApi)({}, '/marketingtool/MeStorageCard/getCardInfoByCardNo/' + cardNo, false, false, { method: 'get', timeout_skip: true });
|
2178
2175
|
|
2179
2176
|
case 4:
|
2180
2177
|
result = _context14.sent;
|
@@ -2417,7 +2414,7 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
2417
2414
|
promoVoucher.voucherDetailList.push(detailDTO);
|
2418
2415
|
});
|
2419
2416
|
promoVoucher.promoLinks = this.checkList;
|
2420
|
-
return
|
2417
|
+
return (0, _tplusApi.ccApi)((0, _extends3.default)({}, promoVoucher), 'promotion/PromoCalculate/findUsefulCouponPromoList', false, false, { method: 'post', timeout_skip: true }).then(function (result) {
|
2421
2418
|
if (result && result.length != 0) {
|
2422
2419
|
result.forEach(function (element, index) {
|
2423
2420
|
var djq1 = false;
|
@@ -2599,7 +2596,7 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
2599
2596
|
memberStoreCode = settleStyleType.memberStoreCode, settlementCode = settleStyleType.settlementCode;
|
2600
2597
|
param = { 'settleStyleType': type == 1 ? memberStoreCode : settlementCode, isIntegralExchange: isIntegralExchange };
|
2601
2598
|
_context15.next = 7;
|
2602
|
-
return
|
2599
|
+
return (0, _tplusApi.tApi)({ param: param }, 'chanjet.RE.NewPos.GetNewStoreSettleStyles', false, false);
|
2603
2600
|
|
2604
2601
|
case 7:
|
2605
2602
|
modes = _context15.sent;
|