tplus-components-touch 3.47.6 → 3.49.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/inventorySearch/store.js +6 -2
- package/dist/components/inventorySearch/store.js.map +1 -1
- 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 +246 -279
- package/dist/components/settlement/settlement.js.map +1 -1
- package/dist/components/settlement/settlement.less +0 -3
- package/dist/components/settlement/settlementStore.js +706 -714
- 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 +16 -21
- package/dist/components/touchTable/index.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,59 +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
|
-
|
1297
|
-
|
1298
|
-
|
1299
|
-
|
1300
|
-
|
1301
|
-
|
1302
|
-
ID = _ref12.ID;
|
1303
|
-
|
1304
|
-
_this11.setDtoID(ID);
|
1305
|
-
_this11.billID = ID;
|
1306
|
-
_this11.paymode.checkList = [];
|
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;
|
1627
|
+
|
1628
|
+
_this12.setDtoID(ID);
|
1629
|
+
_this12.billID = ID;
|
1630
|
+
_this12.paymode.checkList = [];
|
1307
1631
|
}));
|
1308
1632
|
|
1309
1633
|
case 36:
|
1310
1634
|
case 'end':
|
1311
|
-
return
|
1635
|
+
return _context6.stop();
|
1312
1636
|
}
|
1313
1637
|
}
|
1314
|
-
},
|
1638
|
+
}, _callee6, this);
|
1315
1639
|
}));
|
1316
1640
|
|
1317
1641
|
function save() {
|
1318
|
-
return
|
1642
|
+
return _ref13.apply(this, arguments);
|
1319
1643
|
}
|
1320
1644
|
|
1321
1645
|
return save;
|
@@ -1343,19 +1667,19 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
1343
1667
|
}, {
|
1344
1668
|
key: 'thirdPay',
|
1345
1669
|
value: function () {
|
1346
|
-
var
|
1347
|
-
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;
|
1348
1672
|
|
1349
|
-
return _regenerator2.default.wrap(function
|
1673
|
+
return _regenerator2.default.wrap(function _callee7$(_context7) {
|
1350
1674
|
while (1) {
|
1351
|
-
switch (
|
1675
|
+
switch (_context7.prev = _context7.next) {
|
1352
1676
|
case 0:
|
1353
|
-
|
1677
|
+
_context7.prev = 0;
|
1354
1678
|
cto = this.removeThirdPayDto(dto);
|
1355
1679
|
params = { VoucherType: vType, Payment: payment, TradeType: trade, dto: cto };
|
1356
1680
|
|
1357
1681
|
console.log('刷卡信息:', (0, _stringify2.default)(params));
|
1358
|
-
|
1682
|
+
_context7.next = 6;
|
1359
1683
|
return new _promise2.default(function (resolve, reject) {
|
1360
1684
|
_mutantsMicrofx.nativeMs.setIpcRendererMethod('ThirdPayment', (0, _extends3.default)({}, params), function (res) {
|
1361
1685
|
return resolve(res);
|
@@ -1363,26 +1687,26 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
1363
1687
|
});
|
1364
1688
|
|
1365
1689
|
case 6:
|
1366
|
-
ret =
|
1690
|
+
ret = _context7.sent;
|
1367
1691
|
|
1368
1692
|
console.log('刷卡返回信息:', ret);
|
1369
1693
|
ret = JSON.parse(ret);
|
1370
|
-
|
1694
|
+
_ref18 = ret || {}, Code = _ref18.Code, _Message = _ref18.Message, Result = _ref18.Result;
|
1371
1695
|
|
1372
1696
|
if (!(Code > 0)) {
|
1373
|
-
|
1697
|
+
_context7.next = 14;
|
1374
1698
|
break;
|
1375
1699
|
}
|
1376
1700
|
|
1377
|
-
return
|
1701
|
+
return _context7.abrupt('return', { type: false, data: null, msg: _Message, code: Code });
|
1378
1702
|
|
1379
1703
|
case 14:
|
1380
1704
|
if (!(trade == '00')) {
|
1381
|
-
|
1705
|
+
_context7.next = 20;
|
1382
1706
|
break;
|
1383
1707
|
}
|
1384
1708
|
|
1385
|
-
|
1709
|
+
_ref19 = Result || {}, ThirdPaymentReturnInfo = _ref19.ThirdPaymentReturnInfo;
|
1386
1710
|
|
1387
1711
|
if (vType == 1) {
|
1388
1712
|
dto.RetailPaymentDetails.forEach(function (v) {
|
@@ -1397,35 +1721,35 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
1397
1721
|
}
|
1398
1722
|
});
|
1399
1723
|
}
|
1400
|
-
return
|
1724
|
+
return _context7.abrupt('return', { type: true, data: dto, msg: _Message, code: Code });
|
1401
1725
|
|
1402
1726
|
case 20:
|
1403
1727
|
if (!(trade == '02')) {
|
1404
|
-
|
1728
|
+
_context7.next = 22;
|
1405
1729
|
break;
|
1406
1730
|
}
|
1407
1731
|
|
1408
|
-
return
|
1732
|
+
return _context7.abrupt('return', { type: true, data: dto, msg: _Message, code: Code });
|
1409
1733
|
|
1410
1734
|
case 22:
|
1411
|
-
|
1735
|
+
_context7.next = 27;
|
1412
1736
|
break;
|
1413
1737
|
|
1414
1738
|
case 24:
|
1415
|
-
|
1416
|
-
|
1417
|
-
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' });
|
1418
1742
|
|
1419
1743
|
case 27:
|
1420
1744
|
case 'end':
|
1421
|
-
return
|
1745
|
+
return _context7.stop();
|
1422
1746
|
}
|
1423
1747
|
}
|
1424
|
-
},
|
1748
|
+
}, _callee7, this, [[0, 24]]);
|
1425
1749
|
}));
|
1426
1750
|
|
1427
|
-
function thirdPay(
|
1428
|
-
return
|
1751
|
+
function thirdPay(_x4, _x5, _x6, _x7) {
|
1752
|
+
return _ref17.apply(this, arguments);
|
1429
1753
|
}
|
1430
1754
|
|
1431
1755
|
return thirdPay;
|
@@ -1436,14 +1760,14 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
1436
1760
|
}, {
|
1437
1761
|
key: 'thirdPayRefund',
|
1438
1762
|
value: function () {
|
1439
|
-
var
|
1440
|
-
var
|
1763
|
+
var _ref20 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee9(type) {
|
1764
|
+
var _this13 = this;
|
1441
1765
|
|
1442
|
-
var dto, pay, payment, _enumController$
|
1766
|
+
var dto, pay, payment, _enumController$getEn17, TradeType;
|
1443
1767
|
|
1444
|
-
return _regenerator2.default.wrap(function
|
1768
|
+
return _regenerator2.default.wrap(function _callee9$(_context9) {
|
1445
1769
|
while (1) {
|
1446
|
-
switch (
|
1770
|
+
switch (_context9.prev = _context9.next) {
|
1447
1771
|
case 0:
|
1448
1772
|
dto = type == 1 ? this.dtoParams.RetailPaymentDetails : this.dtoParams.StorageMutiSettleDetails;
|
1449
1773
|
pay = dto && dto.filter(function (v) {
|
@@ -1455,43 +1779,43 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
1455
1779
|
_message2.default.warn("支付出现异常,将发起刷卡退款。", { duration: 4.5 });
|
1456
1780
|
}, 1000);
|
1457
1781
|
payment = pay[0];
|
1458
|
-
_enumController$
|
1782
|
+
_enumController$getEn17 = _mutantsUtil.enumController.getEnumOj(), TradeType = _enumController$getEn17.TradeType;
|
1459
1783
|
|
1460
|
-
setTimeout((0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function
|
1461
|
-
var ret,
|
1784
|
+
setTimeout((0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee8() {
|
1785
|
+
var ret, _ref22, msg;
|
1462
1786
|
|
1463
|
-
return _regenerator2.default.wrap(function
|
1787
|
+
return _regenerator2.default.wrap(function _callee8$(_context8) {
|
1464
1788
|
while (1) {
|
1465
|
-
switch (
|
1789
|
+
switch (_context8.prev = _context8.next) {
|
1466
1790
|
case 0:
|
1467
|
-
|
1468
|
-
return
|
1791
|
+
_context8.next = 2;
|
1792
|
+
return _this13.thirdPay(type, payment, TradeType.REFUND, dto);
|
1469
1793
|
|
1470
1794
|
case 2:
|
1471
|
-
ret =
|
1472
|
-
|
1795
|
+
ret = _context8.sent;
|
1796
|
+
_ref22 = ret || {}, msg = _ref22.msg;
|
1473
1797
|
|
1474
1798
|
console.log('\u5237\u5361\u652F\u4ED8\u9000\u6B3E:' + msg);
|
1475
1799
|
|
1476
1800
|
case 5:
|
1477
1801
|
case 'end':
|
1478
|
-
return
|
1802
|
+
return _context8.stop();
|
1479
1803
|
}
|
1480
1804
|
}
|
1481
|
-
},
|
1805
|
+
}, _callee8, _this13);
|
1482
1806
|
})), 4500);
|
1483
1807
|
}
|
1484
1808
|
|
1485
1809
|
case 3:
|
1486
1810
|
case 'end':
|
1487
|
-
return
|
1811
|
+
return _context9.stop();
|
1488
1812
|
}
|
1489
1813
|
}
|
1490
|
-
},
|
1814
|
+
}, _callee9, this);
|
1491
1815
|
}));
|
1492
1816
|
|
1493
|
-
function thirdPayRefund(
|
1494
|
-
return
|
1817
|
+
function thirdPayRefund(_x8) {
|
1818
|
+
return _ref20.apply(this, arguments);
|
1495
1819
|
}
|
1496
1820
|
|
1497
1821
|
return thirdPayRefund;
|
@@ -1504,35 +1828,35 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
1504
1828
|
}, {
|
1505
1829
|
key: 'querySettleResult',
|
1506
1830
|
value: function () {
|
1507
|
-
var
|
1508
|
-
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) {
|
1509
1833
|
while (1) {
|
1510
|
-
switch (
|
1834
|
+
switch (_context10.prev = _context10.next) {
|
1511
1835
|
case 0:
|
1512
|
-
|
1513
|
-
|
1514
|
-
|
1515
|
-
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 });
|
1516
1840
|
|
1517
1841
|
case 4:
|
1518
|
-
|
1519
|
-
return
|
1842
|
+
_context10.t1 = _context10.sent;
|
1843
|
+
return _context10.abrupt('return', _context10.t0.resolve.call(_context10.t0, _context10.t1));
|
1520
1844
|
|
1521
1845
|
case 8:
|
1522
|
-
|
1523
|
-
|
1524
|
-
return
|
1846
|
+
_context10.prev = 8;
|
1847
|
+
_context10.t2 = _context10['catch'](0);
|
1848
|
+
return _context10.abrupt('return', _promise2.default.resolve({ Flag: "1" }));
|
1525
1849
|
|
1526
1850
|
case 11:
|
1527
1851
|
case 'end':
|
1528
|
-
return
|
1852
|
+
return _context10.stop();
|
1529
1853
|
}
|
1530
1854
|
}
|
1531
|
-
},
|
1855
|
+
}, _callee10, this, [[0, 8]]);
|
1532
1856
|
}));
|
1533
1857
|
|
1534
1858
|
function querySettleResult() {
|
1535
|
-
return
|
1859
|
+
return _ref23.apply(this, arguments);
|
1536
1860
|
}
|
1537
1861
|
|
1538
1862
|
return querySettleResult;
|
@@ -1558,18 +1882,18 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
1558
1882
|
}, {
|
1559
1883
|
key: 'validePwd',
|
1560
1884
|
value: function () {
|
1561
|
-
var
|
1562
|
-
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;
|
1563
1887
|
|
1564
|
-
return _regenerator2.default.wrap(function
|
1888
|
+
return _regenerator2.default.wrap(function _callee11$(_context11) {
|
1565
1889
|
while (1) {
|
1566
|
-
switch (
|
1890
|
+
switch (_context11.prev = _context11.next) {
|
1567
1891
|
case 0:
|
1568
|
-
|
1569
|
-
|
1892
|
+
_ref25 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref25.isNewRetailBCPos;
|
1893
|
+
_context11.prev = 1;
|
1570
1894
|
|
1571
1895
|
if (!isNewRetailBCPos) {
|
1572
|
-
|
1896
|
+
_context11.next = 33;
|
1573
1897
|
break;
|
1574
1898
|
}
|
1575
1899
|
|
@@ -1579,56 +1903,62 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
1579
1903
|
memberStorageId = this.paymode.currentMode.meStorageCardId;
|
1580
1904
|
|
1581
1905
|
if (!cook2) {
|
1582
|
-
|
1906
|
+
_context11.next = 12;
|
1583
1907
|
break;
|
1584
1908
|
}
|
1585
1909
|
|
1586
1910
|
if (!cook2.hasOwnProperty(memberStorageId + "")) {
|
1587
|
-
|
1911
|
+
_context11.next = 12;
|
1588
1912
|
break;
|
1589
1913
|
}
|
1590
1914
|
|
1591
1915
|
if (!(cook2[memberStorageId] > 3)) {
|
1592
|
-
|
1916
|
+
_context11.next = 12;
|
1593
1917
|
break;
|
1594
1918
|
}
|
1595
1919
|
|
1596
1920
|
message = '今日密码错误已达上限,不可使用储值消费,请明日再试,如忘记请重置密码或修改密码。';
|
1597
|
-
return
|
1921
|
+
return _context11.abrupt('return', _promise2.default.resolve(message));
|
1598
1922
|
|
1599
1923
|
case 12:
|
1600
1924
|
_paymode$currentMode = this.paymode.currentMode, cardTypeEnum = _paymode$currentMode.cardTypeEnum, memberId = _paymode$currentMode.memberId, meStorageCardId = _paymode$currentMode.meStorageCardId, cardStatusEnum = _paymode$currentMode.cardStatusEnum;
|
1601
|
-
|
1602
|
-
|
1603
|
-
|
1604
|
-
|
1605
|
-
|
1606
|
-
md5Password: _tplusApi.User.pwdEncrypt(value.pwd),
|
1607
|
-
cardType: cardTypeEnum
|
1608
|
-
};
|
1609
|
-
checkPaymentPasswordId = memberId;
|
1610
|
-
} else {
|
1611
|
-
if (cardStatusEnum === 'BINDING' && this.member && this.member.ID === memberId) {
|
1612
|
-
checkPaymentPasswordParams = {
|
1613
|
-
md5Password: _tplusApi.User.pwdEncrypt(value.pwd),
|
1614
|
-
password: value.pwd,
|
1615
|
-
cardType: cardTypeEnum
|
1616
|
-
};
|
1617
|
-
checkPaymentPasswordId = meStorageCardId;
|
1618
|
-
} else {
|
1619
|
-
checkPaymentPasswordParams = {
|
1620
|
-
password: value.pwd,
|
1621
|
-
cardType: cardTypeEnum
|
1622
|
-
};
|
1623
|
-
checkPaymentPasswordId = meStorageCardId;
|
1624
|
-
}
|
1925
|
+
result = null;
|
1926
|
+
|
1927
|
+
if (!(cardTypeEnum === 'BALANCE_CARD')) {
|
1928
|
+
_context11.next = 20;
|
1929
|
+
break;
|
1625
1930
|
}
|
1626
|
-
_context9.next = 18;
|
1627
|
-
return this.SettlementApi.checkPaymentPassword(checkPaymentPasswordParams, checkPaymentPasswordId);
|
1628
1931
|
|
1629
|
-
|
1630
|
-
|
1932
|
+
_context11.next = 17;
|
1933
|
+
return (0, _tplusApi.ccApi)({ md5Password: _tplusApi.User.pwdEncrypt(value.pwd), cardType: cardTypeEnum }, '/member/MeMemberWallet/checkPaymentPassword/' + memberId, false, false);
|
1631
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:
|
1632
1962
|
if (!result.data) {
|
1633
1963
|
if (cook2) {
|
1634
1964
|
if (cook2.hasOwnProperty(memberStorageId + "")) {
|
@@ -1645,381 +1975,45 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
1645
1975
|
this.setCookie('errorPwd', '', -1);
|
1646
1976
|
this.setCookie('errorPwd', (0, _stringify2.default)(cook2));
|
1647
1977
|
}
|
1648
|
-
return
|
1978
|
+
return _context11.abrupt('return', _promise2.default.resolve(result.data ? "" : message));
|
1649
1979
|
|
1650
|
-
case
|
1651
|
-
|
1652
|
-
return
|
1980
|
+
case 33:
|
1981
|
+
_context11.next = 35;
|
1982
|
+
return (0, _tplusApi.tApi)({ "CheckoutParams": {
|
1653
1983
|
"Idmember": value.id,
|
1654
1984
|
"Password": value.pwd
|
1655
|
-
} });
|
1985
|
+
} }, 'AA.DR.newRetailMember.CheckoutMemberPassword', false, false);
|
1656
1986
|
|
1657
|
-
case
|
1658
|
-
_result =
|
1659
|
-
return
|
1987
|
+
case 35:
|
1988
|
+
_result = _context11.sent;
|
1989
|
+
return _context11.abrupt('return', _promise2.default.resolve(_result.Success ? "" : _result.Message));
|
1660
1990
|
|
1661
|
-
case
|
1662
|
-
|
1991
|
+
case 37:
|
1992
|
+
_context11.next = 42;
|
1663
1993
|
break;
|
1664
1994
|
|
1665
|
-
case
|
1666
|
-
|
1667
|
-
|
1668
|
-
return
|
1995
|
+
case 39:
|
1996
|
+
_context11.prev = 39;
|
1997
|
+
_context11.t0 = _context11['catch'](1);
|
1998
|
+
return _context11.abrupt('return', "failed");
|
1669
1999
|
|
1670
|
-
case
|
2000
|
+
case 42:
|
1671
2001
|
case 'end':
|
1672
|
-
return
|
2002
|
+
return _context11.stop();
|
1673
2003
|
}
|
1674
2004
|
}
|
1675
|
-
},
|
2005
|
+
}, _callee11, this, [[1, 39]]);
|
1676
2006
|
}));
|
1677
2007
|
|
1678
|
-
function validePwd(
|
1679
|
-
return
|
2008
|
+
function validePwd(_x9) {
|
2009
|
+
return _ref24.apply(this, arguments);
|
1680
2010
|
}
|
1681
2011
|
|
1682
2012
|
return validePwd;
|
1683
2013
|
}()
|
1684
2014
|
}]);
|
1685
2015
|
return SettlementStore;
|
1686
|
-
}(),
|
1687
|
-
var _this13 = this;
|
1688
|
-
|
1689
|
-
this.paymode = null;
|
1690
|
-
this.dto = null;
|
1691
|
-
this.dtoParams = null;
|
1692
|
-
this.member = null;
|
1693
|
-
this.brefund = false;
|
1694
|
-
this.bquick = false;
|
1695
|
-
this.boriginReturn = false;
|
1696
|
-
|
1697
|
-
_initDefineProp(this, 'newStyle', _descriptor, this);
|
1698
|
-
|
1699
|
-
this.isFull = true;
|
1700
|
-
|
1701
|
-
_initDefineProp(this, 'setNewStyle', _descriptor2, this);
|
1702
|
-
|
1703
|
-
_initDefineProp(this, 'queryPwd', _descriptor3, this);
|
1704
|
-
|
1705
|
-
_initDefineProp(this, 'updateMemberInfo', _descriptor4, this);
|
1706
|
-
|
1707
|
-
_initDefineProp(this, 'updateCurrentMode', _descriptor5, this);
|
1708
|
-
|
1709
|
-
_initDefineProp(this, 'updateCardInfo', _descriptor6, this);
|
1710
|
-
|
1711
|
-
this.handleCzkData = function (m) {
|
1712
|
-
if (!m || !m.StorageCardNo) {
|
1713
|
-
(0, _mobx.runInAction)(function () {
|
1714
|
-
_this13.paymode.currentMode.errinfo = "无效的会员卡号";
|
1715
|
-
});
|
1716
|
-
} else {
|
1717
|
-
(0, _mobx.runInAction)(function () {
|
1718
|
-
_this13.paymode.currentMode.errinfo = "";
|
1719
|
-
_this13.paymode.currentMode.memberId = m.ID;
|
1720
|
-
_this13.paymode.currentMode.value = (0, _utils.getFixedNumber)(_this13.brefund ? _this13.paymode.receivable : Math.max(_this13.paymode.receivable, 0));
|
1721
|
-
_this13.updateEvent();
|
1722
|
-
var message = '';
|
1723
|
-
var sum = (0, _reduce3.default)(_this13.paymode.thePaymodes, function (total, cur) {
|
1724
|
-
return total + cur.value;
|
1725
|
-
}, 0);
|
1726
|
-
// 对于卡不用判断会员的一些信息
|
1727
|
-
// if (global.CheckMemberStorageProcessorBlock ) {
|
1728
|
-
// message= CheckMemberStorageProcessorBlock.execute(m);
|
1729
|
-
// }
|
1730
|
-
if (!String.isNullOrEmpty(message)) {
|
1731
|
-
_this13.paymode.currentMode.errinfo = message;
|
1732
|
-
} else if (_this13.checkReceived(_this13.paymode.currentMode, "balance")) {
|
1733
|
-
_this13.paymode.currentMode.errinfo = "余额不足";
|
1734
|
-
} else if (_this13.paymode.amount > 0 && parseFloat(_this13.paymode.amount) !== sum && _this13.paymode.currentMode.value == 0) {
|
1735
|
-
_this13.paymode.currentMode.errinfo = "实收金额必须录入";
|
1736
|
-
} else {
|
1737
|
-
// 查询成功后将焦点移入下一个输入框
|
1738
|
-
setTimeout(function () {
|
1739
|
-
var nextInput = document.querySelector('.czk .received .input');
|
1740
|
-
nextInput && nextInput.select();
|
1741
|
-
}, 300);
|
1742
|
-
}
|
1743
|
-
});
|
1744
|
-
}
|
1745
|
-
};
|
1746
|
-
|
1747
|
-
this.getCouponList = function (coupon_code) {
|
1748
|
-
var _enumController$getEn15 = _mutantsUtil.enumController.getEnumOj(),
|
1749
|
-
PayStyle = _enumController$getEn15.PayStyle,
|
1750
|
-
Differentiate = _enumController$getEn15.Differentiate;
|
1751
|
-
|
1752
|
-
var couponApplyRule = (0, _tplusPoslogin.PosInitData)('CouponApplyRule');
|
1753
|
-
|
1754
|
-
var _enumController$getEn16 = _mutantsUtil.enumController.getEnumOj(),
|
1755
|
-
CouponApplyRule = _enumController$getEn16.CouponApplyRule;
|
1756
|
-
|
1757
|
-
if (couponApplyRule == CouponApplyRule.SHOWN_BY_CUSTOMER && !!coupon_code || couponApplyRule != CouponApplyRule.SHOWN_BY_CUSTOMER) {
|
1758
|
-
var dto = _this13.dto;
|
1759
|
-
var promoVoucher = {};
|
1760
|
-
_this13.paymode.clearDjqs();
|
1761
|
-
_this13.paymode.reCalculationDjqs();
|
1762
|
-
promoVoucher.coupon_code = coupon_code || "";
|
1763
|
-
promoVoucher.boName = "Retail";
|
1764
|
-
promoVoucher.voucherId = dto.ID;
|
1765
|
-
var onlinePaymentAmount = 0;
|
1766
|
-
if (dto.OnlinePaymentAmount) {
|
1767
|
-
onlinePaymentAmount = dto.OnlinePaymentAmount;
|
1768
|
-
}
|
1769
|
-
promoVoucher.promoLinks = (0, _filter3.default)(_this13.paymode.currentMode.djqs, function (djq) {
|
1770
|
-
return djq.checked;
|
1771
|
-
});
|
1772
|
-
promoVoucher.totalAmountWithTax = Math.Minus(dto.TotalTaxAmount, onlinePaymentAmount);
|
1773
|
-
promoVoucher.redBlueFlagEnum = "BLUE";
|
1774
|
-
promoVoucher.meMemberId = dto.Idmember;
|
1775
|
-
promoVoucher.storeFactorId = dto.Idstore;
|
1776
|
-
promoVoucher.voucherDetailList = [];
|
1777
|
-
dto.RetailDetails.forEach(function (item) {
|
1778
|
-
var detailDTO = {};
|
1779
|
-
detailDTO.uuid = item.Code;
|
1780
|
-
detailDTO.detailBoName = "RetailDetail";
|
1781
|
-
detailDTO.voucherDetailId = item.ID;
|
1782
|
-
detailDTO.productId = item.Idinventory;
|
1783
|
-
detailDTO.uomId = item.Idunit;
|
1784
|
-
detailDTO.productSpecId = item.ProductSpecId;
|
1785
|
-
detailDTO.isManualFreeGift = item.IsPresent;
|
1786
|
-
detailDTO.isListPriceIncludingTax = item.TaxFlag || true;
|
1787
|
-
detailDTO.IsManualChangePrice = item.IsManualChangePrice;
|
1788
|
-
// if(detailDTO.IsManualChangePrice)//如果是手工改价
|
1789
|
-
// {
|
1790
|
-
// detailDTO.listPrice = item.TaxPrice;
|
1791
|
-
// detailDTO.netAmountWithTax = item.TaxAmount;
|
1792
|
-
// }
|
1793
|
-
// else
|
1794
|
-
// {
|
1795
|
-
var bookingQuantity = 0;
|
1796
|
-
if (item.BookingQuantity) {
|
1797
|
-
bookingQuantity = item.BookingQuantity;
|
1798
|
-
}
|
1799
|
-
detailDTO.listPrice = JSON.getCellValue(item, "listPrice");
|
1800
|
-
detailDTO.netAmountWithTax = Math.Multiply(detailDTO.listPrice, Math.Minus(item.Quantity, bookingQuantity)); //item.TaxAmount;
|
1801
|
-
//}
|
1802
|
-
detailDTO.taxRate = item.TaxRate;
|
1803
|
-
detailDTO.quantity = item.Quantity;
|
1804
|
-
|
1805
|
-
detailDTO.amountWithTax = item.RetailAmount;
|
1806
|
-
// 促销 start
|
1807
|
-
if (item.PromotionDetails && item.PromotionDetails.length != 0) {
|
1808
|
-
var promoLinks = [];
|
1809
|
-
item.PromotionDetails.forEach(function (promotion) {
|
1810
|
-
promoLinks.push({
|
1811
|
-
promoId: promotion.IdSalesPromotionDTO,
|
1812
|
-
promoRuleId: promotion.PromotionRuleId
|
1813
|
-
});
|
1814
|
-
});
|
1815
|
-
if (promoLinks.length != 0) detailDTO.promoLinks = promoLinks;
|
1816
|
-
}
|
1817
|
-
// 促销 end
|
1818
|
-
promoVoucher.voucherDetailList.push(detailDTO);
|
1819
|
-
});
|
1820
|
-
return _this13.SettlementApi.findUsefulCouponPromoList(promoVoucher).then(function (result) {
|
1821
|
-
if (result && result.length != 0) {
|
1822
|
-
result.forEach(function (element) {
|
1823
|
-
var _ref22 = element || {},
|
1824
|
-
couponCode = _ref22.couponCode,
|
1825
|
-
name = _ref22.name,
|
1826
|
-
tieredAmountResult = _ref22.tieredAmountResult,
|
1827
|
-
fromDate = _ref22.fromDate,
|
1828
|
-
dateMount = _ref22.dateMount,
|
1829
|
-
promoMethodEnum = _ref22.promoMethodEnum,
|
1830
|
-
discountPct = _ref22.discountPct,
|
1831
|
-
nominalAmount = _ref22.nominalAmount,
|
1832
|
-
promoId = _ref22.promoId,
|
1833
|
-
id = _ref22.id;
|
1834
|
-
|
1835
|
-
var condValue = tieredAmountResult.condValue,
|
1836
|
-
promoDiscount = tieredAmountResult.promoDiscount,
|
1837
|
-
displayText = tieredAmountResult.displayText,
|
1838
|
-
promoRuleId = tieredAmountResult.promoRuleId,
|
1839
|
-
couponCategoryEnum = tieredAmountResult.couponCategoryEnum;
|
1840
|
-
|
1841
|
-
if (result.IsRepelWithPoints && (0, _find3.default)(_this13.paymode.thePaymodes, function (themode) {
|
1842
|
-
return themode.paymentType == PayStyle.jfdx;
|
1843
|
-
})) {
|
1844
|
-
_message2.default.error(Differentiate.COUPON + '\uFF08' + result.SN + '\uFF09\u4E0D\u53EF\u4E0E\u79EF\u5206\u4E00\u8D77\u4F7F\u7528');
|
1845
|
-
} else {
|
1846
|
-
var IsEnable = couponCategoryEnum === 'RIGUP' || couponCategoryEnum === 'UN_MATCH' || couponCategoryEnum === "PREPARING" || couponCategoryEnum === 'PROMO_LIMITED' || couponCategoryEnum === 'COUPON_CONFLICT' ? false : true;
|
1847
|
-
_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);
|
1848
|
-
}
|
1849
|
-
});
|
1850
|
-
if (promoVoucher.coupon_code) {
|
1851
|
-
_this13.paymode.calcDjqCheckValue(_this13.paymode.currentMode.djqs[0], _this13.dto, 'single');
|
1852
|
-
}
|
1853
|
-
} else {
|
1854
|
-
if (promoVoucher.coupon_code) {
|
1855
|
-
_message2.default.info(Differentiate.COUPON + '\u53F7\u4E0D\u5B58\u5728\uFF01');
|
1856
|
-
_this13.getCouponList();
|
1857
|
-
} else {
|
1858
|
-
_message2.default.info('\u6CA1\u6709\u627E\u5230\u53EF\u4F7F\u7528\u7684' + Differentiate.COUPON + '\uFF01');
|
1859
|
-
}
|
1860
|
-
}
|
1861
|
-
});
|
1862
|
-
}
|
1863
|
-
};
|
1864
|
-
|
1865
|
-
this.getSettleGift = function () {
|
1866
|
-
return _this13.SettlementApi.executeRightsForPos(_this13.billID);
|
1867
|
-
};
|
1868
|
-
|
1869
|
-
this.getRefWareHouseList = function () {
|
1870
|
-
return _this13.SettlementApi.getRefWareHouseList();
|
1871
|
-
};
|
1872
|
-
|
1873
|
-
this.checkCoupon = function () {
|
1874
|
-
var _ref23 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee10(sn) {
|
1875
|
-
var _ref24, isNewRetailBCPos, _enumController$getEn17, PayStyle, Differentiate, params;
|
1876
|
-
|
1877
|
-
return _regenerator2.default.wrap(function _callee10$(_context10) {
|
1878
|
-
while (1) {
|
1879
|
-
switch (_context10.prev = _context10.next) {
|
1880
|
-
case 0:
|
1881
|
-
_ref24 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref24.isNewRetailBCPos;
|
1882
|
-
|
1883
|
-
if (!isNewRetailBCPos) {
|
1884
|
-
_context10.next = 7;
|
1885
|
-
break;
|
1886
|
-
}
|
1887
|
-
|
1888
|
-
_context10.next = 4;
|
1889
|
-
return _this13.getCouponList(sn, 'sinlge');
|
1890
|
-
|
1891
|
-
case 4:
|
1892
|
-
return _context10.abrupt('return', _context10.sent);
|
1893
|
-
|
1894
|
-
case 7:
|
1895
|
-
_enumController$getEn17 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn17.PayStyle, Differentiate = _enumController$getEn17.Differentiate;
|
1896
|
-
params = { request: {
|
1897
|
-
Uid: _this13.paymode.currentMode.member.uid || '',
|
1898
|
-
SN: sn,
|
1899
|
-
StoreCode: _this13.dto.Idstore,
|
1900
|
-
Inventories: (0, _map3.default)((0, _filter3.default)(_this13.dto.RetailDetails, function (d) {
|
1901
|
-
return d.Quantity > 0 && !d.IsPresent;
|
1902
|
-
}), function (detail) {
|
1903
|
-
return {
|
1904
|
-
IdInventory: detail.Inventory.ID,
|
1905
|
-
IdUnit: detail.Idunit,
|
1906
|
-
Code: detail.Inventory.Code,
|
1907
|
-
FreeItem0: JSON.getCellValue(detail, "freeitem0"),
|
1908
|
-
FreeItem1: JSON.getCellValue(detail, "freeitem1"),
|
1909
|
-
FreeItem2: JSON.getCellValue(detail, "freeitem2"),
|
1910
|
-
FreeItem3: JSON.getCellValue(detail, "freeitem3"),
|
1911
|
-
FreeItem4: JSON.getCellValue(detail, "freeitem4"),
|
1912
|
-
FreeItem5: JSON.getCellValue(detail, "freeitem5"),
|
1913
|
-
FreeItem6: JSON.getCellValue(detail, "freeitem6"),
|
1914
|
-
FreeItem7: JSON.getCellValue(detail, "freeitem7"),
|
1915
|
-
FreeItem8: JSON.getCellValue(detail, "freeitem8"),
|
1916
|
-
FreeItem9: JSON.getCellValue(detail, "freeitem9")
|
1917
|
-
};
|
1918
|
-
}),
|
1919
|
-
// inventoryCodes:_join(_map(this.dto.RetailDetails,(detail)=>{return detail.Inventory.Code;}),','),
|
1920
|
-
InventoryClassCodes: (0, _join3.default)((0, _map3.default)((0, _filter3.default)(_this13.dto.RetailDetails, function (d) {
|
1921
|
-
return d.Quantity > 0;
|
1922
|
-
}), function (detail) {
|
1923
|
-
return (detail.Inventory.InventoryClass || { Code: '' }).Code;
|
1924
|
-
}), ','),
|
1925
|
-
Amount: _this13.paymode.amount
|
1926
|
-
} };
|
1927
|
-
return _context10.abrupt('return', _this13.SettlementApi.CheckCoupon(params).then(function (result) {
|
1928
|
-
if ((0, _find3.default)(_this13.paymode.currentMode.djqs, function (djq) {
|
1929
|
-
return djq.code == result.SN;
|
1930
|
-
})) {
|
1931
|
-
_message2.default.info(Differentiate.COUPON + '\u5DF2\u6DFB\u52A0');
|
1932
|
-
} else if (result.IsRepelWithPoints && (0, _find3.default)(_this13.paymode.thePaymodes, function (themode) {
|
1933
|
-
return themode.paymentType == PayStyle.jfdx;
|
1934
|
-
})) {
|
1935
|
-
_message2.default.error(Differentiate.COUPON + '\uFF08' + result.SN + '\uFF09\u4E0D\u53EF\u4E0E\u79EF\u5206\u4E00\u8D77\u4F7F\u7528');
|
1936
|
-
} else {
|
1937
|
-
_this13.addDjq(result.SN, result.Title, result.ReduceAmount, result.StartAmount, result.LastTS, false, !result.IsRepelWithPoints, result.UMemberID);
|
1938
|
-
}
|
1939
|
-
}));
|
1940
|
-
|
1941
|
-
case 10:
|
1942
|
-
case 'end':
|
1943
|
-
return _context10.stop();
|
1944
|
-
}
|
1945
|
-
}
|
1946
|
-
}, _callee10, _this13);
|
1947
|
-
}));
|
1948
|
-
|
1949
|
-
return function (_x9) {
|
1950
|
-
return _ref23.apply(this, arguments);
|
1951
|
-
};
|
1952
|
-
}();
|
1953
|
-
|
1954
|
-
this.repeatStorageModal = function (content) {
|
1955
|
-
return new _promise2.default(function (resolve, reject) {
|
1956
|
-
_tplusComponentsTouch.ModalWraper.confirm({
|
1957
|
-
title: '',
|
1958
|
-
okText: '继续储值',
|
1959
|
-
className: 'repeat-modal',
|
1960
|
-
zIndex: 1007,
|
1961
|
-
content: content,
|
1962
|
-
onOk: function () {
|
1963
|
-
var _ref25 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee11() {
|
1964
|
-
var ret;
|
1965
|
-
return _regenerator2.default.wrap(function _callee11$(_context11) {
|
1966
|
-
while (1) {
|
1967
|
-
switch (_context11.prev = _context11.next) {
|
1968
|
-
case 0:
|
1969
|
-
_context11.next = 2;
|
1970
|
-
return _this13.saveMember();
|
1971
|
-
|
1972
|
-
case 2:
|
1973
|
-
ret = _context11.sent;
|
1974
|
-
|
1975
|
-
if (ret === false) {
|
1976
|
-
resolve(false);
|
1977
|
-
} else {
|
1978
|
-
resolve(true);
|
1979
|
-
}
|
1980
|
-
|
1981
|
-
case 4:
|
1982
|
-
case 'end':
|
1983
|
-
return _context11.stop();
|
1984
|
-
}
|
1985
|
-
}
|
1986
|
-
}, _callee11, _this13);
|
1987
|
-
}));
|
1988
|
-
|
1989
|
-
return function onOk() {
|
1990
|
-
return _ref25.apply(this, arguments);
|
1991
|
-
};
|
1992
|
-
}(),
|
1993
|
-
onCancel: function onCancel() {
|
1994
|
-
resolve(false);
|
1995
|
-
}
|
1996
|
-
});
|
1997
|
-
});
|
1998
|
-
};
|
1999
|
-
|
2000
|
-
this.checkIntegralExchangeReturn = function (id) {
|
2001
|
-
return new _promise2.default(function (resolve, reject) {
|
2002
|
-
_this13.SettlementApi.GetNewIntegralExchange({ param: { refVoucherId: id } }).then(function (resp) {
|
2003
|
-
if (resp && resp.expireIntegral > 0) {
|
2004
|
-
_tplusComponentsTouch.ModalWraper.confirm({
|
2005
|
-
className: 'tplus-confirm-modal',
|
2006
|
-
title: "温馨提示",
|
2007
|
-
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',
|
2008
|
-
cancelable: false,
|
2009
|
-
onOk: function onOk() {
|
2010
|
-
resolve(true);
|
2011
|
-
},
|
2012
|
-
onCancel: function onCancel() {
|
2013
|
-
reject(false);
|
2014
|
-
}
|
2015
|
-
});
|
2016
|
-
} else {
|
2017
|
-
resolve(true);
|
2018
|
-
}
|
2019
|
-
});
|
2020
|
-
});
|
2021
|
-
};
|
2022
|
-
}, _temp), (_descriptor = _applyDecoratedDescriptor(_class.prototype, 'newStyle', [_mobx.observable], {
|
2016
|
+
}(), (_descriptor = _applyDecoratedDescriptor(_class.prototype, 'newStyle', [_mobx.observable], {
|
2023
2017
|
enumerable: true,
|
2024
2018
|
initializer: function initializer() {
|
2025
2019
|
return true;
|
@@ -2030,8 +2024,7 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
2030
2024
|
var _this14 = this;
|
2031
2025
|
|
2032
2026
|
return function () {
|
2033
|
-
|
2034
|
-
_this14.newStyle = voucherDefaultPosMode == 'voucher';
|
2027
|
+
_this14.newStyle = _mutantsMicrofx.localStore && _mutantsMicrofx.localStore.get('voucherDefaultPosMode') == 'voucher';
|
2035
2028
|
};
|
2036
2029
|
}
|
2037
2030
|
}), _descriptor3 = _applyDecoratedDescriptor(_class.prototype, 'queryPwd', [_mobx.action], {
|
@@ -2047,13 +2040,13 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
2047
2040
|
return _message2.default.warn('您两次输入的密码不一致');
|
2048
2041
|
}
|
2049
2042
|
var idstore = (0, _tplusPoslogin.PosInitData)('storeID');
|
2050
|
-
return
|
2043
|
+
return (0, _tplusApi.ccApi)({
|
2051
2044
|
Idstore: idstore,
|
2052
2045
|
meMemberId: _this15.paymode.currentMode.memberId,
|
2053
2046
|
oldPassword: null,
|
2054
2047
|
newPassword: _tplusApi.User.pwdEncrypt(newPassConfirm),
|
2055
2048
|
dataSource: "POS"
|
2056
|
-
}).then(function (resp) {
|
2049
|
+
}, '/member/MeMemberWallet/setWalletPayPassword', false, false, { method: 'post', timeout_skip: true }).then(function (resp) {
|
2057
2050
|
if (resp.successful) {
|
2058
2051
|
return true;
|
2059
2052
|
}
|
@@ -2075,7 +2068,7 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
2075
2068
|
case 0:
|
2076
2069
|
_getLoginInfo4 = _this16.getLoginInfo(), IdStore = _getLoginInfo4.IdStore, StoreCode = _getLoginInfo4.StoreCode;
|
2077
2070
|
_context12.next = 3;
|
2078
|
-
return
|
2071
|
+
return (0, _tplusApi.tApi)({ Idmember: _this16.member.ID, IdStore: IdStore, StoreCode: StoreCode }, 'chanjet.AA.DR.INewRetailMember.GetUmemberDTO', false, false);
|
2079
2072
|
|
2080
2073
|
case 3:
|
2081
2074
|
resp = _context12.sent;
|
@@ -2110,10 +2103,9 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
2110
2103
|
switch (_context13.prev = _context13.next) {
|
2111
2104
|
case 0:
|
2112
2105
|
isOnlyEnabled = returnType ? false : true; //非原单退货为false,其他true
|
2113
|
-
// 查看会员卡信息
|
2114
2106
|
|
2115
2107
|
_context13.next = 3;
|
2116
|
-
return
|
2108
|
+
return (0, _tplusApi.ccApi)({}, '/marketingtool/MeStorageCard/getCardInfoByMemberId/' + memberId + '/' + isOnlyEnabled, false, false, { method: 'get' });
|
2117
2109
|
|
2118
2110
|
case 3:
|
2119
2111
|
result = _context13.sent;
|
@@ -2179,7 +2171,7 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
2179
2171
|
ctMode = _this18.paymode && _this18.paymode.currentMode;
|
2180
2172
|
cardNo = ctMode && ctMode.storageCardNo;
|
2181
2173
|
_context14.next = 4;
|
2182
|
-
return
|
2174
|
+
return (0, _tplusApi.ccApi)({}, '/marketingtool/MeStorageCard/getCardInfoByCardNo/' + cardNo, false, false, { method: 'get', timeout_skip: true });
|
2183
2175
|
|
2184
2176
|
case 4:
|
2185
2177
|
result = _context14.sent;
|
@@ -2422,7 +2414,7 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
2422
2414
|
promoVoucher.voucherDetailList.push(detailDTO);
|
2423
2415
|
});
|
2424
2416
|
promoVoucher.promoLinks = this.checkList;
|
2425
|
-
return
|
2417
|
+
return (0, _tplusApi.ccApi)((0, _extends3.default)({}, promoVoucher), 'promotion/PromoCalculate/findUsefulCouponPromoList', false, false, { method: 'post', timeout_skip: true }).then(function (result) {
|
2426
2418
|
if (result && result.length != 0) {
|
2427
2419
|
result.forEach(function (element, index) {
|
2428
2420
|
var djq1 = false;
|
@@ -2604,7 +2596,7 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
2604
2596
|
memberStoreCode = settleStyleType.memberStoreCode, settlementCode = settleStyleType.settlementCode;
|
2605
2597
|
param = { 'settleStyleType': type == 1 ? memberStoreCode : settlementCode, isIntegralExchange: isIntegralExchange };
|
2606
2598
|
_context15.next = 7;
|
2607
|
-
return
|
2599
|
+
return (0, _tplusApi.tApi)({ param: param }, 'chanjet.RE.NewPos.GetNewStoreSettleStyles', false, false);
|
2608
2600
|
|
2609
2601
|
case 7:
|
2610
2602
|
modes = _context15.sent;
|