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