tplus-components-touch 3.45.3 → 3.46.1
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/billSearch/index.js +2 -2
- package/dist/components/billSearch/index.js.map +1 -1
- package/dist/components/cloudPrint/BTPrintFormatUtil.js +2 -2
- package/dist/components/cloudPrint/BTPrintFormatUtil.js.map +1 -1
- package/dist/components/cloudPrint/index.js +893 -608
- package/dist/components/cloudPrint/index.js.map +1 -1
- package/dist/components/cloudPrint/printDispatch.js +184 -48
- package/dist/components/cloudPrint/printDispatch.js.map +1 -1
- package/dist/components/cloudPrint/printTemplate/dialy_one.json +239 -0
- package/dist/components/cloudPrint/printTemplate/duty_one.json +239 -0
- package/dist/components/cloudPrint/printTemplate/retail_one.json +204 -0
- package/dist/components/cloudPrint/printTemplate/retail_two.json +220 -0
- package/dist/components/cloudPrint/printTemplate/storage_one.json +129 -0
- package/dist/components/cloudPrint/printTemplate/template.js +52 -0
- package/dist/components/cloudPrint/printTemplate/template.js.map +1 -0
- package/dist/components/hardwareAPI/index.js +46 -12
- package/dist/components/hardwareAPI/index.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 +225 -292
- package/dist/components/settlement/settlement.js.map +1 -1
- package/dist/components/settlement/settlement.less +0 -3
- package/dist/components/settlement/settlementStore.js +717 -716
- package/dist/components/settlement/settlementStore.js.map +1 -1
- package/dist/components/ticon/iconfont/demo.css +539 -539
- package/dist/components/ticon/iconfont/demo_index.html +5248 -5248
- package/dist/components/ticon/iconfont/iconfont.css +895 -895
- 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.json +1549 -1549
- 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
|
+
};
|
175
230
|
|
176
|
-
|
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
|
+
|
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,133 +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
|
-
if (ret1 === false) {
|
939
|
-
|
1267
|
+
if (!(ret1 === false)) {
|
1268
|
+
_context4.next = 29;
|
1269
|
+
break;
|
940
1270
|
}
|
941
1271
|
|
942
|
-
|
943
|
-
|
1272
|
+
return _context4.abrupt('return', _promise2.default.resolve(false));
|
1273
|
+
|
1274
|
+
case 29:
|
1275
|
+
_context4.next = 40;
|
944
1276
|
break;
|
945
1277
|
|
946
|
-
case
|
947
|
-
|
1278
|
+
case 31:
|
1279
|
+
_context4.next = 33;
|
948
1280
|
return _mutantsMicrofx.stores.offlineSys.generatorCode(this.dto);
|
949
1281
|
|
950
|
-
case
|
951
|
-
|
1282
|
+
case 33:
|
1283
|
+
_context4.next = 35;
|
952
1284
|
return this.save();
|
953
1285
|
|
954
|
-
case
|
955
|
-
ret2 =
|
1286
|
+
case 35:
|
1287
|
+
ret2 = _context4.sent;
|
956
1288
|
|
957
1289
|
if (!(ret2 === false)) {
|
958
|
-
|
1290
|
+
_context4.next = 38;
|
959
1291
|
break;
|
960
1292
|
}
|
961
1293
|
|
962
|
-
return
|
1294
|
+
return _context4.abrupt('return', _promise2.default.resolve(false));
|
963
1295
|
|
964
|
-
case
|
965
|
-
|
1296
|
+
case 38:
|
1297
|
+
_context4.next = 40;
|
966
1298
|
return _mutantsMicrofx.stores.offlineSys.retailSequenceUpload();
|
967
1299
|
|
968
|
-
case
|
969
|
-
return
|
1300
|
+
case 40:
|
1301
|
+
return _context4.abrupt('return', _promise2.default.resolve(true));
|
970
1302
|
|
971
|
-
case
|
972
|
-
|
973
|
-
|
1303
|
+
case 43:
|
1304
|
+
_context4.prev = 43;
|
1305
|
+
_context4.t0 = _context4['catch'](4);
|
974
1306
|
|
975
|
-
console.error('settlementStore.commit失败,错误信息:' +
|
1307
|
+
console.error('settlementStore.commit失败,错误信息:' + _context4.t0);
|
976
1308
|
//其他支付失败时,处理二开支付情况。
|
977
1309
|
this.thirdPayRefund(status == 1 ? 2 : 1);
|
978
|
-
return
|
1310
|
+
return _context4.abrupt('return', _promise2.default.resolve(_context4.t0));
|
979
1311
|
|
980
|
-
case
|
1312
|
+
case 48:
|
981
1313
|
case 'end':
|
982
|
-
return
|
1314
|
+
return _context4.stop();
|
983
1315
|
}
|
984
1316
|
}
|
985
|
-
},
|
1317
|
+
}, _callee4, this, [[4, 43]]);
|
986
1318
|
}));
|
987
1319
|
|
988
|
-
function commit(
|
989
|
-
return
|
1320
|
+
function commit(_x3) {
|
1321
|
+
return _ref9.apply(this, arguments);
|
990
1322
|
}
|
991
1323
|
|
992
1324
|
return commit;
|
@@ -1000,32 +1332,32 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
1000
1332
|
}, {
|
1001
1333
|
key: 'saveMember',
|
1002
1334
|
value: function () {
|
1003
|
-
var
|
1004
|
-
var
|
1335
|
+
var _ref11 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee5() {
|
1336
|
+
var _this11 = this;
|
1005
1337
|
|
1006
|
-
var _enumController$
|
1338
|
+
var _enumController$getEn15, PayStyle, TradeType, IPMSG, dtoParams, payList, payment, tradeType, ret, _ref12, type, data, msg, code;
|
1007
1339
|
|
1008
|
-
return _regenerator2.default.wrap(function
|
1340
|
+
return _regenerator2.default.wrap(function _callee5$(_context5) {
|
1009
1341
|
while (1) {
|
1010
|
-
switch (
|
1342
|
+
switch (_context5.prev = _context5.next) {
|
1011
1343
|
case 0:
|
1012
|
-
_enumController$
|
1344
|
+
_enumController$getEn15 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn15.PayStyle, TradeType = _enumController$getEn15.TradeType;
|
1013
1345
|
|
1014
1346
|
(0, _mobx.runInAction)(function () {
|
1015
|
-
|
1016
|
-
var thePaymodes =
|
1347
|
+
_this11.dto.StorageMutiSettleDetails = [];
|
1348
|
+
var thePaymodes = _this11.newStyle ? (0, _filter3.default)(_this11.paymode.thePaymodes, function (mode) {
|
1017
1349
|
return parseFloat(mode.value) != 0;
|
1018
|
-
}) :
|
1350
|
+
}) : _this11.paymode.thePaymodes;
|
1019
1351
|
(0, _each3.default)(thePaymodes, function (mode) {
|
1020
|
-
var themode = (0, _find3.default)(
|
1352
|
+
var themode = (0, _find3.default)(_this11.paymode.paymodes, { 'paymentType': mode.paymentType });
|
1021
1353
|
|
1022
1354
|
var value = parseFloat(mode.value);
|
1023
1355
|
var giveChange = null;
|
1024
|
-
if (mode.paymentType == PayStyle.xianjin &&
|
1025
|
-
value = Math.Add(value,
|
1026
|
-
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);
|
1027
1359
|
}
|
1028
|
-
|
1360
|
+
_this11.dto.StorageMutiSettleDetails.push({
|
1029
1361
|
Code: mode.paymethodId,
|
1030
1362
|
StorageAmount: value,
|
1031
1363
|
GiveChange: giveChange,
|
@@ -1034,7 +1366,7 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
1034
1366
|
PaymentCode: mode.authCode,
|
1035
1367
|
DynamicPropertyKeys: [],
|
1036
1368
|
DynamicPropertyValues: [],
|
1037
|
-
DataSource: { Id:
|
1369
|
+
DataSource: { Id: _this11.dataSource },
|
1038
1370
|
ThirdPaymentInfo: themode.thridPayment || null,
|
1039
1371
|
ThirdPaymentReturnInfo: mode.thirdPaymentReturnInfo || null
|
1040
1372
|
});
|
@@ -1054,49 +1386,49 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
1054
1386
|
});
|
1055
1387
|
|
1056
1388
|
if (!(payList && payList.length > 0)) {
|
1057
|
-
|
1389
|
+
_context5.next = 19;
|
1058
1390
|
break;
|
1059
1391
|
}
|
1060
1392
|
|
1061
1393
|
payment = payList[0];
|
1062
1394
|
tradeType = payment && payment.StorageAmount > 0 ? TradeType.PAY : TradeType.REFUND;
|
1063
|
-
|
1395
|
+
_context5.next = 11;
|
1064
1396
|
return this.thirdPay(2, payment, tradeType, dtoParams);
|
1065
1397
|
|
1066
1398
|
case 11:
|
1067
|
-
ret =
|
1068
|
-
|
1399
|
+
ret = _context5.sent;
|
1400
|
+
_ref12 = ret || {}, type = _ref12.type, data = _ref12.data, msg = _ref12.msg, code = _ref12.code;
|
1069
1401
|
|
1070
1402
|
if (!(type === true)) {
|
1071
|
-
|
1403
|
+
_context5.next = 17;
|
1072
1404
|
break;
|
1073
1405
|
}
|
1074
1406
|
|
1075
1407
|
dtoParams = data;
|
1076
|
-
|
1408
|
+
_context5.next = 19;
|
1077
1409
|
break;
|
1078
1410
|
|
1079
1411
|
case 17:
|
1080
1412
|
_message2.default.warn('\u5237\u5361\u652F\u4ED8\u5931\u8D25,\u9519\u8BEF\u7801:' + code);
|
1081
|
-
return
|
1413
|
+
return _context5.abrupt('return', false);
|
1082
1414
|
|
1083
1415
|
case 19:
|
1084
1416
|
this.dtoParams = dtoParams;
|
1085
1417
|
console.log('储值结算信息:', dtoParams);
|
1086
|
-
return
|
1087
|
-
|
1418
|
+
return _context5.abrupt('return', (0, _tplusApi.tApi)({ dto: dtoParams }, 'chanjet.ME.INewRetailMemberStorage.Save', false, false).then(function (resp) {
|
1419
|
+
_this11.handlePrint(resp);
|
1088
1420
|
}));
|
1089
1421
|
|
1090
1422
|
case 22:
|
1091
1423
|
case 'end':
|
1092
|
-
return
|
1424
|
+
return _context5.stop();
|
1093
1425
|
}
|
1094
1426
|
}
|
1095
|
-
},
|
1427
|
+
}, _callee5, this);
|
1096
1428
|
}));
|
1097
1429
|
|
1098
1430
|
function saveMember() {
|
1099
|
-
return
|
1431
|
+
return _ref11.apply(this, arguments);
|
1100
1432
|
}
|
1101
1433
|
|
1102
1434
|
return saveMember;
|
@@ -1104,31 +1436,31 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
1104
1436
|
}, {
|
1105
1437
|
key: 'save',
|
1106
1438
|
value: function () {
|
1107
|
-
var
|
1108
|
-
var
|
1439
|
+
var _ref13 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee6() {
|
1440
|
+
var _this12 = this;
|
1109
1441
|
|
1110
|
-
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;
|
1111
1443
|
|
1112
|
-
return _regenerator2.default.wrap(function
|
1444
|
+
return _regenerator2.default.wrap(function _callee6$(_context6) {
|
1113
1445
|
while (1) {
|
1114
|
-
switch (
|
1446
|
+
switch (_context6.prev = _context6.next) {
|
1115
1447
|
case 0:
|
1116
|
-
_enumController$
|
1448
|
+
_enumController$getEn16 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn16.PayStyle, TradeType = _enumController$getEn16.TradeType;
|
1117
1449
|
|
1118
1450
|
(0, _mobx.runInAction)(function () {
|
1119
|
-
|
1120
|
-
|
1121
|
-
|
1451
|
+
_this12.dto.RetailPaymentDetails = [];
|
1452
|
+
_this12.dto.RetailStorageDetails = [];
|
1453
|
+
_this12.dto.RetailCouponDetails = [];
|
1122
1454
|
var czkSum = 0;
|
1123
1455
|
var count = 0;
|
1124
|
-
var thePaymodes =
|
1456
|
+
var thePaymodes = _this12.newStyle ? (0, _filter3.default)(_this12.paymode.thePaymodes, function (mode) {
|
1125
1457
|
return parseFloat(mode.value) != 0;
|
1126
|
-
}) :
|
1458
|
+
}) : _this12.paymode.thePaymodes;
|
1127
1459
|
(0, _each3.default)(thePaymodes, function (mode, index) {
|
1128
|
-
var themode = (0, _find3.default)(
|
1460
|
+
var themode = (0, _find3.default)(_this12.paymode.paymodes, { 'paymentType': mode.paymentType });
|
1129
1461
|
if (mode.paymentType == PayStyle.hyczk) {
|
1130
1462
|
czkSum = Math.Add(czkSum, mode.value);
|
1131
|
-
|
1463
|
+
_this12.dto.RetailStorageDetails.push({
|
1132
1464
|
Code: mode.paymethodId,
|
1133
1465
|
MeStorageCardId: mode.meStorageCardId,
|
1134
1466
|
StoragePaymentAmount: mode.value,
|
@@ -1137,17 +1469,17 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
1137
1469
|
Idmember: mode.memberId,
|
1138
1470
|
DynamicPropertyKeys: [],
|
1139
1471
|
DynamicPropertyValues: [],
|
1140
|
-
DataSource: { Id:
|
1472
|
+
DataSource: { Id: _this12.dataSource },
|
1141
1473
|
Password: mode.authCode
|
1142
1474
|
});
|
1143
1475
|
} else {
|
1144
1476
|
var value = parseFloat(mode.value);
|
1145
1477
|
var giveChange = null;
|
1146
|
-
if (mode.paymentType == PayStyle.xianjin &&
|
1147
|
-
value = Math.Add(value,
|
1148
|
-
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);
|
1149
1481
|
}
|
1150
|
-
|
1482
|
+
_this12.dto.RetailPaymentDetails.push({
|
1151
1483
|
Code: mode.paymethodId,
|
1152
1484
|
OrigAmount: mode.exchangeRate != 1 ? mode.value2 : value,
|
1153
1485
|
Amount: value,
|
@@ -1161,13 +1493,14 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
1161
1493
|
OverchargesAmount: mode.overchargesAmount,
|
1162
1494
|
DynamicPropertyKeys: [],
|
1163
1495
|
DynamicPropertyValues: [],
|
1164
|
-
DataSource: { Id:
|
1496
|
+
DataSource: { Id: _this12.dataSource },
|
1165
1497
|
ThirdPaymentInfo: themode.thridPayment || null,
|
1498
|
+
SettleStyle: { Name: mode.name },
|
1166
1499
|
ThirdPaymentReturnInfo: mode.thirdPaymentReturnInfo || null
|
1167
1500
|
});
|
1168
1501
|
if (mode.paymentType == PayStyle.djq) {
|
1169
|
-
(0, _each3.default)(
|
1170
|
-
|
1502
|
+
(0, _each3.default)(_this12.paymode.checkList && _this12.paymode.checkList.length ? _this12.paymode.checkList : mode.djqs, function (djq) {
|
1503
|
+
_this12.dto.RetailCouponDetails.push({
|
1171
1504
|
CouponCode: djq.promoCouponCode,
|
1172
1505
|
ReductionAmount: djq.amount,
|
1173
1506
|
EnableAmount: djq.doorsill,
|
@@ -1177,24 +1510,24 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
1177
1510
|
PromotionId: djq.promoId,
|
1178
1511
|
PromotionRuleId: djq.promoRuleId,
|
1179
1512
|
PromoCouponAllocatedId: djq.id,
|
1180
|
-
DataSource: { Id:
|
1513
|
+
DataSource: { Id: _this12.dataSource }
|
1181
1514
|
});
|
1182
1515
|
});
|
1183
1516
|
}
|
1184
1517
|
}
|
1185
1518
|
});
|
1186
|
-
if (
|
1187
|
-
var themode = (0, _find3.default)(
|
1188
|
-
|
1189
|
-
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,
|
1190
1523
|
OrigAmount: czkSum,
|
1191
1524
|
Amount: czkSum,
|
1192
1525
|
IdsettleStyle: themode.idSettleStyle,
|
1193
1526
|
IdbankAccount: themode.idBankAccount,
|
1194
1527
|
DynamicPropertyKeys: [],
|
1195
1528
|
DynamicPropertyValues: [],
|
1196
|
-
DataSource: { Id:
|
1197
|
-
RetailStorageDetails:
|
1529
|
+
DataSource: { Id: _this12.dataSource },
|
1530
|
+
RetailStorageDetails: _this12.dto.RetailStorageDetails
|
1198
1531
|
});
|
1199
1532
|
}
|
1200
1533
|
});
|
@@ -1207,7 +1540,7 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
1207
1540
|
}
|
1208
1541
|
RetailTypeEnum = this.dto.IdbusiType == 36 ? "INTEGRAL_EXCHANGE" : "NORMAL";
|
1209
1542
|
_getLoginInfo3 = this.getLoginInfo(), PreSellOrBook = _getLoginInfo3.PreSellOrBook, PercentageWhenBook = _getLoginInfo3.PercentageWhenBook;
|
1210
|
-
|
1543
|
+
_ref14 = this.dto || {}, IdbusiType = _ref14.IdbusiType, DistributionMode = _ref14.DistributionMode;
|
1211
1544
|
|
1212
1545
|
if (IdbusiType == 38 && PreSellOrBook == 'BOOK' && PercentageWhenBook < 100 && (!DistributionMode.Id || DistributionMode.Id == 'ON_SITE_PICKUP')) {
|
1213
1546
|
prepaidAmount = (0, _utils.getFixedNumber)(this.dto.RetailPaymentDetails.reduce(function (c, item) {
|
@@ -1219,35 +1552,35 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
1219
1552
|
|
1220
1553
|
this.isFull = fullPayment == prepaidAmount; // 是否全款
|
1221
1554
|
(0, _mobx.runInAction)(function () {
|
1222
|
-
|
1555
|
+
_this12.dto.PrepaidAmount = prepaidAmount;
|
1223
1556
|
});
|
1224
1557
|
}
|
1225
|
-
|
1558
|
+
_context6.t1 = this.dto.IdbusiType == 37;
|
1226
1559
|
|
1227
|
-
if (!
|
1228
|
-
|
1560
|
+
if (!_context6.t1) {
|
1561
|
+
_context6.next = 14;
|
1229
1562
|
break;
|
1230
1563
|
}
|
1231
1564
|
|
1232
|
-
|
1565
|
+
_context6.next = 13;
|
1233
1566
|
return this.checkIntegralExchangeReturn(this.dto.RetailDetails[0].ReturnSourceId);
|
1234
1567
|
|
1235
1568
|
case 13:
|
1236
|
-
|
1569
|
+
_context6.t1 = _context6.sent;
|
1237
1570
|
|
1238
1571
|
case 14:
|
1239
|
-
|
1572
|
+
_context6.t0 = _context6.t1;
|
1240
1573
|
|
1241
|
-
if (
|
1242
|
-
|
1574
|
+
if (_context6.t0) {
|
1575
|
+
_context6.next = 17;
|
1243
1576
|
break;
|
1244
1577
|
}
|
1245
1578
|
|
1246
|
-
|
1579
|
+
_context6.t0 = this.dto.IdbusiType != 37;
|
1247
1580
|
|
1248
1581
|
case 17:
|
1249
|
-
if (!
|
1250
|
-
|
1582
|
+
if (!_context6.t0) {
|
1583
|
+
_context6.next = 36;
|
1251
1584
|
break;
|
1252
1585
|
}
|
1253
1586
|
|
@@ -1259,54 +1592,54 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
1259
1592
|
});
|
1260
1593
|
|
1261
1594
|
if (!(payList && payList.length > 0)) {
|
1262
|
-
|
1595
|
+
_context6.next = 33;
|
1263
1596
|
break;
|
1264
1597
|
}
|
1265
1598
|
|
1266
1599
|
payment = payList[0];
|
1267
1600
|
tradeType = payment && payment.Amount > 0 ? TradeType.PAY : TradeType.REFUND;
|
1268
|
-
|
1601
|
+
_context6.next = 25;
|
1269
1602
|
return this.thirdPay(1, payment, tradeType, dtoParams);
|
1270
1603
|
|
1271
1604
|
case 25:
|
1272
|
-
ret =
|
1273
|
-
|
1605
|
+
ret = _context6.sent;
|
1606
|
+
_ref15 = ret || {}, type = _ref15.type, data = _ref15.data, msg = _ref15.msg, code = _ref15.code;
|
1274
1607
|
|
1275
1608
|
if (!(type === true)) {
|
1276
|
-
|
1609
|
+
_context6.next = 31;
|
1277
1610
|
break;
|
1278
1611
|
}
|
1279
1612
|
|
1280
1613
|
dtoParams = data;
|
1281
|
-
|
1614
|
+
_context6.next = 33;
|
1282
1615
|
break;
|
1283
1616
|
|
1284
1617
|
case 31:
|
1285
1618
|
_message2.default.warn('\u5237\u5361\u652F\u4ED8\u5931\u8D25,\u9519\u8BEF\u7801:' + code);
|
1286
|
-
return
|
1619
|
+
return _context6.abrupt('return', false);
|
1287
1620
|
|
1288
1621
|
case 33:
|
1289
1622
|
this.dtoParams = dtoParams;
|
1290
1623
|
console.log('结算信息:', dtoParams);
|
1291
|
-
return
|
1292
|
-
var
|
1293
|
-
ID =
|
1624
|
+
return _context6.abrupt('return', (0, _tplusApi.ccApi)({ dto: dtoParams, cip: IPMSG.query || "" }, '/retail/RetailPos/settle', false, false, { method: 'post', timeout_skip: true }).then(function (resp) {
|
1625
|
+
var _ref16 = resp || {},
|
1626
|
+
ID = _ref16.ID;
|
1294
1627
|
|
1295
|
-
|
1296
|
-
|
1297
|
-
|
1628
|
+
_this12.setDtoID(ID);
|
1629
|
+
_this12.billID = ID;
|
1630
|
+
_this12.paymode.checkList = [];
|
1298
1631
|
}));
|
1299
1632
|
|
1300
1633
|
case 36:
|
1301
1634
|
case 'end':
|
1302
|
-
return
|
1635
|
+
return _context6.stop();
|
1303
1636
|
}
|
1304
1637
|
}
|
1305
|
-
},
|
1638
|
+
}, _callee6, this);
|
1306
1639
|
}));
|
1307
1640
|
|
1308
1641
|
function save() {
|
1309
|
-
return
|
1642
|
+
return _ref13.apply(this, arguments);
|
1310
1643
|
}
|
1311
1644
|
|
1312
1645
|
return save;
|
@@ -1334,19 +1667,19 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
1334
1667
|
}, {
|
1335
1668
|
key: 'thirdPay',
|
1336
1669
|
value: function () {
|
1337
|
-
var
|
1338
|
-
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;
|
1339
1672
|
|
1340
|
-
return _regenerator2.default.wrap(function
|
1673
|
+
return _regenerator2.default.wrap(function _callee7$(_context7) {
|
1341
1674
|
while (1) {
|
1342
|
-
switch (
|
1675
|
+
switch (_context7.prev = _context7.next) {
|
1343
1676
|
case 0:
|
1344
|
-
|
1677
|
+
_context7.prev = 0;
|
1345
1678
|
cto = this.removeThirdPayDto(dto);
|
1346
1679
|
params = { VoucherType: vType, Payment: payment, TradeType: trade, dto: cto };
|
1347
1680
|
|
1348
1681
|
console.log('刷卡信息:', (0, _stringify2.default)(params));
|
1349
|
-
|
1682
|
+
_context7.next = 6;
|
1350
1683
|
return new _promise2.default(function (resolve, reject) {
|
1351
1684
|
_mutantsMicrofx.nativeMs.setIpcRendererMethod('ThirdPayment', (0, _extends3.default)({}, params), function (res) {
|
1352
1685
|
return resolve(res);
|
@@ -1354,26 +1687,26 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
1354
1687
|
});
|
1355
1688
|
|
1356
1689
|
case 6:
|
1357
|
-
ret =
|
1690
|
+
ret = _context7.sent;
|
1358
1691
|
|
1359
1692
|
console.log('刷卡返回信息:', ret);
|
1360
1693
|
ret = JSON.parse(ret);
|
1361
|
-
|
1694
|
+
_ref18 = ret || {}, Code = _ref18.Code, _Message = _ref18.Message, Result = _ref18.Result;
|
1362
1695
|
|
1363
1696
|
if (!(Code > 0)) {
|
1364
|
-
|
1697
|
+
_context7.next = 14;
|
1365
1698
|
break;
|
1366
1699
|
}
|
1367
1700
|
|
1368
|
-
return
|
1701
|
+
return _context7.abrupt('return', { type: false, data: null, msg: _Message, code: Code });
|
1369
1702
|
|
1370
1703
|
case 14:
|
1371
1704
|
if (!(trade == '00')) {
|
1372
|
-
|
1705
|
+
_context7.next = 20;
|
1373
1706
|
break;
|
1374
1707
|
}
|
1375
1708
|
|
1376
|
-
|
1709
|
+
_ref19 = Result || {}, ThirdPaymentReturnInfo = _ref19.ThirdPaymentReturnInfo;
|
1377
1710
|
|
1378
1711
|
if (vType == 1) {
|
1379
1712
|
dto.RetailPaymentDetails.forEach(function (v) {
|
@@ -1388,35 +1721,35 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
1388
1721
|
}
|
1389
1722
|
});
|
1390
1723
|
}
|
1391
|
-
return
|
1724
|
+
return _context7.abrupt('return', { type: true, data: dto, msg: _Message, code: Code });
|
1392
1725
|
|
1393
1726
|
case 20:
|
1394
1727
|
if (!(trade == '02')) {
|
1395
|
-
|
1728
|
+
_context7.next = 22;
|
1396
1729
|
break;
|
1397
1730
|
}
|
1398
1731
|
|
1399
|
-
return
|
1732
|
+
return _context7.abrupt('return', { type: true, data: dto, msg: _Message, code: Code });
|
1400
1733
|
|
1401
1734
|
case 22:
|
1402
|
-
|
1735
|
+
_context7.next = 27;
|
1403
1736
|
break;
|
1404
1737
|
|
1405
1738
|
case 24:
|
1406
|
-
|
1407
|
-
|
1408
|
-
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' });
|
1409
1742
|
|
1410
1743
|
case 27:
|
1411
1744
|
case 'end':
|
1412
|
-
return
|
1745
|
+
return _context7.stop();
|
1413
1746
|
}
|
1414
1747
|
}
|
1415
|
-
},
|
1748
|
+
}, _callee7, this, [[0, 24]]);
|
1416
1749
|
}));
|
1417
1750
|
|
1418
|
-
function thirdPay(
|
1419
|
-
return
|
1751
|
+
function thirdPay(_x4, _x5, _x6, _x7) {
|
1752
|
+
return _ref17.apply(this, arguments);
|
1420
1753
|
}
|
1421
1754
|
|
1422
1755
|
return thirdPay;
|
@@ -1427,14 +1760,14 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
1427
1760
|
}, {
|
1428
1761
|
key: 'thirdPayRefund',
|
1429
1762
|
value: function () {
|
1430
|
-
var
|
1431
|
-
var
|
1763
|
+
var _ref20 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee9(type) {
|
1764
|
+
var _this13 = this;
|
1432
1765
|
|
1433
|
-
var dto, pay, payment, _enumController$
|
1766
|
+
var dto, pay, payment, _enumController$getEn17, TradeType;
|
1434
1767
|
|
1435
|
-
return _regenerator2.default.wrap(function
|
1768
|
+
return _regenerator2.default.wrap(function _callee9$(_context9) {
|
1436
1769
|
while (1) {
|
1437
|
-
switch (
|
1770
|
+
switch (_context9.prev = _context9.next) {
|
1438
1771
|
case 0:
|
1439
1772
|
dto = type == 1 ? this.dtoParams.RetailPaymentDetails : this.dtoParams.StorageMutiSettleDetails;
|
1440
1773
|
pay = dto && dto.filter(function (v) {
|
@@ -1446,43 +1779,43 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
1446
1779
|
_message2.default.warn("支付出现异常,将发起刷卡退款。", { duration: 4.5 });
|
1447
1780
|
}, 1000);
|
1448
1781
|
payment = pay[0];
|
1449
|
-
_enumController$
|
1782
|
+
_enumController$getEn17 = _mutantsUtil.enumController.getEnumOj(), TradeType = _enumController$getEn17.TradeType;
|
1450
1783
|
|
1451
|
-
setTimeout((0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function
|
1452
|
-
var ret,
|
1784
|
+
setTimeout((0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee8() {
|
1785
|
+
var ret, _ref22, msg;
|
1453
1786
|
|
1454
|
-
return _regenerator2.default.wrap(function
|
1787
|
+
return _regenerator2.default.wrap(function _callee8$(_context8) {
|
1455
1788
|
while (1) {
|
1456
|
-
switch (
|
1789
|
+
switch (_context8.prev = _context8.next) {
|
1457
1790
|
case 0:
|
1458
|
-
|
1459
|
-
return
|
1791
|
+
_context8.next = 2;
|
1792
|
+
return _this13.thirdPay(type, payment, TradeType.REFUND, dto);
|
1460
1793
|
|
1461
1794
|
case 2:
|
1462
|
-
ret =
|
1463
|
-
|
1795
|
+
ret = _context8.sent;
|
1796
|
+
_ref22 = ret || {}, msg = _ref22.msg;
|
1464
1797
|
|
1465
1798
|
console.log('\u5237\u5361\u652F\u4ED8\u9000\u6B3E:' + msg);
|
1466
1799
|
|
1467
1800
|
case 5:
|
1468
1801
|
case 'end':
|
1469
|
-
return
|
1802
|
+
return _context8.stop();
|
1470
1803
|
}
|
1471
1804
|
}
|
1472
|
-
},
|
1805
|
+
}, _callee8, _this13);
|
1473
1806
|
})), 4500);
|
1474
1807
|
}
|
1475
1808
|
|
1476
1809
|
case 3:
|
1477
1810
|
case 'end':
|
1478
|
-
return
|
1811
|
+
return _context9.stop();
|
1479
1812
|
}
|
1480
1813
|
}
|
1481
|
-
},
|
1814
|
+
}, _callee9, this);
|
1482
1815
|
}));
|
1483
1816
|
|
1484
|
-
function thirdPayRefund(
|
1485
|
-
return
|
1817
|
+
function thirdPayRefund(_x8) {
|
1818
|
+
return _ref20.apply(this, arguments);
|
1486
1819
|
}
|
1487
1820
|
|
1488
1821
|
return thirdPayRefund;
|
@@ -1495,35 +1828,35 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
1495
1828
|
}, {
|
1496
1829
|
key: 'querySettleResult',
|
1497
1830
|
value: function () {
|
1498
|
-
var
|
1499
|
-
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) {
|
1500
1833
|
while (1) {
|
1501
|
-
switch (
|
1834
|
+
switch (_context10.prev = _context10.next) {
|
1502
1835
|
case 0:
|
1503
|
-
|
1504
|
-
|
1505
|
-
|
1506
|
-
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 });
|
1507
1840
|
|
1508
1841
|
case 4:
|
1509
|
-
|
1510
|
-
return
|
1842
|
+
_context10.t1 = _context10.sent;
|
1843
|
+
return _context10.abrupt('return', _context10.t0.resolve.call(_context10.t0, _context10.t1));
|
1511
1844
|
|
1512
1845
|
case 8:
|
1513
|
-
|
1514
|
-
|
1515
|
-
return
|
1846
|
+
_context10.prev = 8;
|
1847
|
+
_context10.t2 = _context10['catch'](0);
|
1848
|
+
return _context10.abrupt('return', _promise2.default.resolve({ Flag: "1" }));
|
1516
1849
|
|
1517
1850
|
case 11:
|
1518
1851
|
case 'end':
|
1519
|
-
return
|
1852
|
+
return _context10.stop();
|
1520
1853
|
}
|
1521
1854
|
}
|
1522
|
-
},
|
1855
|
+
}, _callee10, this, [[0, 8]]);
|
1523
1856
|
}));
|
1524
1857
|
|
1525
1858
|
function querySettleResult() {
|
1526
|
-
return
|
1859
|
+
return _ref23.apply(this, arguments);
|
1527
1860
|
}
|
1528
1861
|
|
1529
1862
|
return querySettleResult;
|
@@ -1549,18 +1882,18 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
1549
1882
|
}, {
|
1550
1883
|
key: 'validePwd',
|
1551
1884
|
value: function () {
|
1552
|
-
var
|
1553
|
-
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;
|
1554
1887
|
|
1555
|
-
return _regenerator2.default.wrap(function
|
1888
|
+
return _regenerator2.default.wrap(function _callee11$(_context11) {
|
1556
1889
|
while (1) {
|
1557
|
-
switch (
|
1890
|
+
switch (_context11.prev = _context11.next) {
|
1558
1891
|
case 0:
|
1559
|
-
|
1560
|
-
|
1892
|
+
_ref25 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref25.isNewRetailBCPos;
|
1893
|
+
_context11.prev = 1;
|
1561
1894
|
|
1562
1895
|
if (!isNewRetailBCPos) {
|
1563
|
-
|
1896
|
+
_context11.next = 33;
|
1564
1897
|
break;
|
1565
1898
|
}
|
1566
1899
|
|
@@ -1570,56 +1903,62 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
1570
1903
|
memberStorageId = this.paymode.currentMode.meStorageCardId;
|
1571
1904
|
|
1572
1905
|
if (!cook2) {
|
1573
|
-
|
1906
|
+
_context11.next = 12;
|
1574
1907
|
break;
|
1575
1908
|
}
|
1576
1909
|
|
1577
1910
|
if (!cook2.hasOwnProperty(memberStorageId + "")) {
|
1578
|
-
|
1911
|
+
_context11.next = 12;
|
1579
1912
|
break;
|
1580
1913
|
}
|
1581
1914
|
|
1582
1915
|
if (!(cook2[memberStorageId] > 3)) {
|
1583
|
-
|
1916
|
+
_context11.next = 12;
|
1584
1917
|
break;
|
1585
1918
|
}
|
1586
1919
|
|
1587
1920
|
message = '今日密码错误已达上限,不可使用储值消费,请明日再试,如忘记请重置密码或修改密码。';
|
1588
|
-
return
|
1921
|
+
return _context11.abrupt('return', _promise2.default.resolve(message));
|
1589
1922
|
|
1590
1923
|
case 12:
|
1591
1924
|
_paymode$currentMode = this.paymode.currentMode, cardTypeEnum = _paymode$currentMode.cardTypeEnum, memberId = _paymode$currentMode.memberId, meStorageCardId = _paymode$currentMode.meStorageCardId, cardStatusEnum = _paymode$currentMode.cardStatusEnum;
|
1592
|
-
|
1593
|
-
|
1594
|
-
|
1595
|
-
|
1596
|
-
|
1597
|
-
md5Password: _tplusApi.User.pwdEncrypt(value.pwd),
|
1598
|
-
cardType: cardTypeEnum
|
1599
|
-
};
|
1600
|
-
checkPaymentPasswordId = memberId;
|
1601
|
-
} else {
|
1602
|
-
if (cardStatusEnum === 'BINDING' && this.member && this.member.ID === memberId) {
|
1603
|
-
checkPaymentPasswordParams = {
|
1604
|
-
md5Password: _tplusApi.User.pwdEncrypt(value.pwd),
|
1605
|
-
password: value.pwd,
|
1606
|
-
cardType: cardTypeEnum
|
1607
|
-
};
|
1608
|
-
checkPaymentPasswordId = meStorageCardId;
|
1609
|
-
} else {
|
1610
|
-
checkPaymentPasswordParams = {
|
1611
|
-
password: value.pwd,
|
1612
|
-
cardType: cardTypeEnum
|
1613
|
-
};
|
1614
|
-
checkPaymentPasswordId = meStorageCardId;
|
1615
|
-
}
|
1925
|
+
result = null;
|
1926
|
+
|
1927
|
+
if (!(cardTypeEnum === 'BALANCE_CARD')) {
|
1928
|
+
_context11.next = 20;
|
1929
|
+
break;
|
1616
1930
|
}
|
1617
|
-
_context9.next = 18;
|
1618
|
-
return this.SettlementApi.checkPaymentPassword(checkPaymentPasswordParams, checkPaymentPasswordId);
|
1619
1931
|
|
1620
|
-
|
1621
|
-
|
1932
|
+
_context11.next = 17;
|
1933
|
+
return (0, _tplusApi.ccApi)({ md5Password: _tplusApi.User.pwdEncrypt(value.pwd), cardType: cardTypeEnum }, '/member/MeMemberWallet/checkPaymentPassword/' + memberId, false, false);
|
1934
|
+
|
1935
|
+
case 17:
|
1936
|
+
result = _context11.sent;
|
1937
|
+
_context11.next = 29;
|
1938
|
+
break;
|
1622
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:
|
1623
1962
|
if (!result.data) {
|
1624
1963
|
if (cook2) {
|
1625
1964
|
if (cook2.hasOwnProperty(memberStorageId + "")) {
|
@@ -1636,381 +1975,45 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
1636
1975
|
this.setCookie('errorPwd', '', -1);
|
1637
1976
|
this.setCookie('errorPwd', (0, _stringify2.default)(cook2));
|
1638
1977
|
}
|
1639
|
-
return
|
1978
|
+
return _context11.abrupt('return', _promise2.default.resolve(result.data ? "" : message));
|
1640
1979
|
|
1641
|
-
case
|
1642
|
-
|
1643
|
-
return
|
1980
|
+
case 33:
|
1981
|
+
_context11.next = 35;
|
1982
|
+
return (0, _tplusApi.tApi)({ "CheckoutParams": {
|
1644
1983
|
"Idmember": value.id,
|
1645
1984
|
"Password": value.pwd
|
1646
|
-
} });
|
1985
|
+
} }, 'AA.DR.newRetailMember.CheckoutMemberPassword', false, false);
|
1647
1986
|
|
1648
|
-
case
|
1649
|
-
_result =
|
1650
|
-
return
|
1987
|
+
case 35:
|
1988
|
+
_result = _context11.sent;
|
1989
|
+
return _context11.abrupt('return', _promise2.default.resolve(_result.Success ? "" : _result.Message));
|
1651
1990
|
|
1652
|
-
case
|
1653
|
-
|
1991
|
+
case 37:
|
1992
|
+
_context11.next = 42;
|
1654
1993
|
break;
|
1655
1994
|
|
1656
|
-
case
|
1657
|
-
|
1658
|
-
|
1659
|
-
return
|
1995
|
+
case 39:
|
1996
|
+
_context11.prev = 39;
|
1997
|
+
_context11.t0 = _context11['catch'](1);
|
1998
|
+
return _context11.abrupt('return', "failed");
|
1660
1999
|
|
1661
|
-
case
|
2000
|
+
case 42:
|
1662
2001
|
case 'end':
|
1663
|
-
return
|
2002
|
+
return _context11.stop();
|
1664
2003
|
}
|
1665
2004
|
}
|
1666
|
-
},
|
2005
|
+
}, _callee11, this, [[1, 39]]);
|
1667
2006
|
}));
|
1668
2007
|
|
1669
|
-
function validePwd(
|
1670
|
-
return
|
2008
|
+
function validePwd(_x9) {
|
2009
|
+
return _ref24.apply(this, arguments);
|
1671
2010
|
}
|
1672
2011
|
|
1673
2012
|
return validePwd;
|
1674
2013
|
}()
|
1675
2014
|
}]);
|
1676
2015
|
return SettlementStore;
|
1677
|
-
}(),
|
1678
|
-
var _this13 = this;
|
1679
|
-
|
1680
|
-
this.paymode = null;
|
1681
|
-
this.dto = null;
|
1682
|
-
this.dtoParams = null;
|
1683
|
-
this.member = null;
|
1684
|
-
this.brefund = false;
|
1685
|
-
this.bquick = false;
|
1686
|
-
this.boriginReturn = false;
|
1687
|
-
|
1688
|
-
_initDefineProp(this, 'newStyle', _descriptor, this);
|
1689
|
-
|
1690
|
-
this.isFull = true;
|
1691
|
-
|
1692
|
-
_initDefineProp(this, 'setNewStyle', _descriptor2, this);
|
1693
|
-
|
1694
|
-
_initDefineProp(this, 'queryPwd', _descriptor3, this);
|
1695
|
-
|
1696
|
-
_initDefineProp(this, 'updateMemberInfo', _descriptor4, this);
|
1697
|
-
|
1698
|
-
_initDefineProp(this, 'updateCurrentMode', _descriptor5, this);
|
1699
|
-
|
1700
|
-
_initDefineProp(this, 'updateCardInfo', _descriptor6, this);
|
1701
|
-
|
1702
|
-
this.handleCzkData = function (m) {
|
1703
|
-
if (!m || !m.StorageCardNo) {
|
1704
|
-
(0, _mobx.runInAction)(function () {
|
1705
|
-
_this13.paymode.currentMode.errinfo = "无效的会员卡号";
|
1706
|
-
});
|
1707
|
-
} else {
|
1708
|
-
(0, _mobx.runInAction)(function () {
|
1709
|
-
_this13.paymode.currentMode.errinfo = "";
|
1710
|
-
_this13.paymode.currentMode.memberId = m.ID;
|
1711
|
-
_this13.paymode.currentMode.value = (0, _utils.getFixedNumber)(_this13.brefund ? _this13.paymode.receivable : Math.max(_this13.paymode.receivable, 0));
|
1712
|
-
_this13.updateEvent();
|
1713
|
-
var message = '';
|
1714
|
-
var sum = (0, _reduce3.default)(_this13.paymode.thePaymodes, function (total, cur) {
|
1715
|
-
return total + cur.value;
|
1716
|
-
}, 0);
|
1717
|
-
// 对于卡不用判断会员的一些信息
|
1718
|
-
// if (global.CheckMemberStorageProcessorBlock ) {
|
1719
|
-
// message= CheckMemberStorageProcessorBlock.execute(m);
|
1720
|
-
// }
|
1721
|
-
if (!String.isNullOrEmpty(message)) {
|
1722
|
-
_this13.paymode.currentMode.errinfo = message;
|
1723
|
-
} else if (_this13.checkReceived(_this13.paymode.currentMode, "balance")) {
|
1724
|
-
_this13.paymode.currentMode.errinfo = "余额不足";
|
1725
|
-
} else if (_this13.paymode.amount > 0 && parseFloat(_this13.paymode.amount) !== sum && _this13.paymode.currentMode.value == 0) {
|
1726
|
-
_this13.paymode.currentMode.errinfo = "实收金额必须录入";
|
1727
|
-
} else {
|
1728
|
-
// 查询成功后将焦点移入下一个输入框
|
1729
|
-
setTimeout(function () {
|
1730
|
-
var nextInput = document.querySelector('.czk .received .input');
|
1731
|
-
nextInput && nextInput.select();
|
1732
|
-
}, 300);
|
1733
|
-
}
|
1734
|
-
});
|
1735
|
-
}
|
1736
|
-
};
|
1737
|
-
|
1738
|
-
this.getCouponList = function (coupon_code) {
|
1739
|
-
var _enumController$getEn15 = _mutantsUtil.enumController.getEnumOj(),
|
1740
|
-
PayStyle = _enumController$getEn15.PayStyle,
|
1741
|
-
Differentiate = _enumController$getEn15.Differentiate;
|
1742
|
-
|
1743
|
-
var couponApplyRule = (0, _tplusPoslogin.PosInitData)('CouponApplyRule');
|
1744
|
-
|
1745
|
-
var _enumController$getEn16 = _mutantsUtil.enumController.getEnumOj(),
|
1746
|
-
CouponApplyRule = _enumController$getEn16.CouponApplyRule;
|
1747
|
-
|
1748
|
-
if (couponApplyRule == CouponApplyRule.SHOWN_BY_CUSTOMER && !!coupon_code || couponApplyRule != CouponApplyRule.SHOWN_BY_CUSTOMER) {
|
1749
|
-
var dto = _this13.dto;
|
1750
|
-
var promoVoucher = {};
|
1751
|
-
_this13.paymode.clearDjqs();
|
1752
|
-
_this13.paymode.reCalculationDjqs();
|
1753
|
-
promoVoucher.coupon_code = coupon_code || "";
|
1754
|
-
promoVoucher.boName = "Retail";
|
1755
|
-
promoVoucher.voucherId = dto.ID;
|
1756
|
-
var onlinePaymentAmount = 0;
|
1757
|
-
if (dto.OnlinePaymentAmount) {
|
1758
|
-
onlinePaymentAmount = dto.OnlinePaymentAmount;
|
1759
|
-
}
|
1760
|
-
promoVoucher.promoLinks = (0, _filter3.default)(_this13.paymode.currentMode.djqs, function (djq) {
|
1761
|
-
return djq.checked;
|
1762
|
-
});
|
1763
|
-
promoVoucher.totalAmountWithTax = Math.Minus(dto.TotalTaxAmount, onlinePaymentAmount);
|
1764
|
-
promoVoucher.redBlueFlagEnum = "BLUE";
|
1765
|
-
promoVoucher.meMemberId = dto.Idmember;
|
1766
|
-
promoVoucher.storeFactorId = dto.Idstore;
|
1767
|
-
promoVoucher.voucherDetailList = [];
|
1768
|
-
dto.RetailDetails.forEach(function (item) {
|
1769
|
-
var detailDTO = {};
|
1770
|
-
detailDTO.uuid = item.Code;
|
1771
|
-
detailDTO.detailBoName = "RetailDetail";
|
1772
|
-
detailDTO.voucherDetailId = item.ID;
|
1773
|
-
detailDTO.productId = item.Idinventory;
|
1774
|
-
detailDTO.uomId = item.Idunit;
|
1775
|
-
detailDTO.productSpecId = item.ProductSpecId;
|
1776
|
-
detailDTO.isManualFreeGift = item.IsPresent;
|
1777
|
-
detailDTO.isListPriceIncludingTax = item.TaxFlag || true;
|
1778
|
-
detailDTO.IsManualChangePrice = item.IsManualChangePrice;
|
1779
|
-
// if(detailDTO.IsManualChangePrice)//如果是手工改价
|
1780
|
-
// {
|
1781
|
-
// detailDTO.listPrice = item.TaxPrice;
|
1782
|
-
// detailDTO.netAmountWithTax = item.TaxAmount;
|
1783
|
-
// }
|
1784
|
-
// else
|
1785
|
-
// {
|
1786
|
-
var bookingQuantity = 0;
|
1787
|
-
if (item.BookingQuantity) {
|
1788
|
-
bookingQuantity = item.BookingQuantity;
|
1789
|
-
}
|
1790
|
-
detailDTO.listPrice = JSON.getCellValue(item, "listPrice");
|
1791
|
-
detailDTO.netAmountWithTax = Math.Multiply(detailDTO.listPrice, Math.Minus(item.Quantity, bookingQuantity)); //item.TaxAmount;
|
1792
|
-
//}
|
1793
|
-
detailDTO.taxRate = item.TaxRate;
|
1794
|
-
detailDTO.quantity = item.Quantity;
|
1795
|
-
|
1796
|
-
detailDTO.amountWithTax = item.RetailAmount;
|
1797
|
-
// 促销 start
|
1798
|
-
if (item.PromotionDetails && item.PromotionDetails.length != 0) {
|
1799
|
-
var promoLinks = [];
|
1800
|
-
item.PromotionDetails.forEach(function (promotion) {
|
1801
|
-
promoLinks.push({
|
1802
|
-
promoId: promotion.IdSalesPromotionDTO,
|
1803
|
-
promoRuleId: promotion.PromotionRuleId
|
1804
|
-
});
|
1805
|
-
});
|
1806
|
-
if (promoLinks.length != 0) detailDTO.promoLinks = promoLinks;
|
1807
|
-
}
|
1808
|
-
// 促销 end
|
1809
|
-
promoVoucher.voucherDetailList.push(detailDTO);
|
1810
|
-
});
|
1811
|
-
return _this13.SettlementApi.findUsefulCouponPromoList(promoVoucher).then(function (result) {
|
1812
|
-
if (result && result.length != 0) {
|
1813
|
-
result.forEach(function (element) {
|
1814
|
-
var _ref22 = element || {},
|
1815
|
-
couponCode = _ref22.couponCode,
|
1816
|
-
name = _ref22.name,
|
1817
|
-
tieredAmountResult = _ref22.tieredAmountResult,
|
1818
|
-
fromDate = _ref22.fromDate,
|
1819
|
-
dateMount = _ref22.dateMount,
|
1820
|
-
promoMethodEnum = _ref22.promoMethodEnum,
|
1821
|
-
discountPct = _ref22.discountPct,
|
1822
|
-
nominalAmount = _ref22.nominalAmount,
|
1823
|
-
promoId = _ref22.promoId,
|
1824
|
-
id = _ref22.id;
|
1825
|
-
|
1826
|
-
var condValue = tieredAmountResult.condValue,
|
1827
|
-
promoDiscount = tieredAmountResult.promoDiscount,
|
1828
|
-
displayText = tieredAmountResult.displayText,
|
1829
|
-
promoRuleId = tieredAmountResult.promoRuleId,
|
1830
|
-
couponCategoryEnum = tieredAmountResult.couponCategoryEnum;
|
1831
|
-
|
1832
|
-
if (result.IsRepelWithPoints && (0, _find3.default)(_this13.paymode.thePaymodes, function (themode) {
|
1833
|
-
return themode.paymentType == PayStyle.jfdx;
|
1834
|
-
})) {
|
1835
|
-
_message2.default.error(Differentiate.COUPON + '\uFF08' + result.SN + '\uFF09\u4E0D\u53EF\u4E0E\u79EF\u5206\u4E00\u8D77\u4F7F\u7528');
|
1836
|
-
} else {
|
1837
|
-
var IsEnable = couponCategoryEnum === 'RIGUP' || couponCategoryEnum === 'UN_MATCH' || couponCategoryEnum === "PREPARING" || couponCategoryEnum === 'PROMO_LIMITED' || couponCategoryEnum === 'COUPON_CONFLICT' ? false : true;
|
1838
|
-
_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);
|
1839
|
-
}
|
1840
|
-
});
|
1841
|
-
if (promoVoucher.coupon_code) {
|
1842
|
-
_this13.paymode.calcDjqCheckValue(_this13.paymode.currentMode.djqs[0], _this13.dto, 'single');
|
1843
|
-
}
|
1844
|
-
} else {
|
1845
|
-
if (promoVoucher.coupon_code) {
|
1846
|
-
_message2.default.info(Differentiate.COUPON + '\u53F7\u4E0D\u5B58\u5728\uFF01');
|
1847
|
-
_this13.getCouponList();
|
1848
|
-
} else {
|
1849
|
-
_message2.default.info('\u6CA1\u6709\u627E\u5230\u53EF\u4F7F\u7528\u7684' + Differentiate.COUPON + '\uFF01');
|
1850
|
-
}
|
1851
|
-
}
|
1852
|
-
});
|
1853
|
-
}
|
1854
|
-
};
|
1855
|
-
|
1856
|
-
this.getSettleGift = function () {
|
1857
|
-
return _this13.SettlementApi.executeRightsForPos(_this13.billID);
|
1858
|
-
};
|
1859
|
-
|
1860
|
-
this.getRefWareHouseList = function () {
|
1861
|
-
return _this13.SettlementApi.getRefWareHouseList();
|
1862
|
-
};
|
1863
|
-
|
1864
|
-
this.checkCoupon = function () {
|
1865
|
-
var _ref23 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee10(sn) {
|
1866
|
-
var _ref24, isNewRetailBCPos, _enumController$getEn17, PayStyle, Differentiate, params;
|
1867
|
-
|
1868
|
-
return _regenerator2.default.wrap(function _callee10$(_context10) {
|
1869
|
-
while (1) {
|
1870
|
-
switch (_context10.prev = _context10.next) {
|
1871
|
-
case 0:
|
1872
|
-
_ref24 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref24.isNewRetailBCPos;
|
1873
|
-
|
1874
|
-
if (!isNewRetailBCPos) {
|
1875
|
-
_context10.next = 7;
|
1876
|
-
break;
|
1877
|
-
}
|
1878
|
-
|
1879
|
-
_context10.next = 4;
|
1880
|
-
return _this13.getCouponList(sn, 'sinlge');
|
1881
|
-
|
1882
|
-
case 4:
|
1883
|
-
return _context10.abrupt('return', _context10.sent);
|
1884
|
-
|
1885
|
-
case 7:
|
1886
|
-
_enumController$getEn17 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn17.PayStyle, Differentiate = _enumController$getEn17.Differentiate;
|
1887
|
-
params = { request: {
|
1888
|
-
Uid: _this13.paymode.currentMode.member.uid || '',
|
1889
|
-
SN: sn,
|
1890
|
-
StoreCode: _this13.dto.Idstore,
|
1891
|
-
Inventories: (0, _map3.default)((0, _filter3.default)(_this13.dto.RetailDetails, function (d) {
|
1892
|
-
return d.Quantity > 0 && !d.IsPresent;
|
1893
|
-
}), function (detail) {
|
1894
|
-
return {
|
1895
|
-
IdInventory: detail.Inventory.ID,
|
1896
|
-
IdUnit: detail.Idunit,
|
1897
|
-
Code: detail.Inventory.Code,
|
1898
|
-
FreeItem0: JSON.getCellValue(detail, "freeitem0"),
|
1899
|
-
FreeItem1: JSON.getCellValue(detail, "freeitem1"),
|
1900
|
-
FreeItem2: JSON.getCellValue(detail, "freeitem2"),
|
1901
|
-
FreeItem3: JSON.getCellValue(detail, "freeitem3"),
|
1902
|
-
FreeItem4: JSON.getCellValue(detail, "freeitem4"),
|
1903
|
-
FreeItem5: JSON.getCellValue(detail, "freeitem5"),
|
1904
|
-
FreeItem6: JSON.getCellValue(detail, "freeitem6"),
|
1905
|
-
FreeItem7: JSON.getCellValue(detail, "freeitem7"),
|
1906
|
-
FreeItem8: JSON.getCellValue(detail, "freeitem8"),
|
1907
|
-
FreeItem9: JSON.getCellValue(detail, "freeitem9")
|
1908
|
-
};
|
1909
|
-
}),
|
1910
|
-
// inventoryCodes:_join(_map(this.dto.RetailDetails,(detail)=>{return detail.Inventory.Code;}),','),
|
1911
|
-
InventoryClassCodes: (0, _join3.default)((0, _map3.default)((0, _filter3.default)(_this13.dto.RetailDetails, function (d) {
|
1912
|
-
return d.Quantity > 0;
|
1913
|
-
}), function (detail) {
|
1914
|
-
return (detail.Inventory.InventoryClass || { Code: '' }).Code;
|
1915
|
-
}), ','),
|
1916
|
-
Amount: _this13.paymode.amount
|
1917
|
-
} };
|
1918
|
-
return _context10.abrupt('return', _this13.SettlementApi.CheckCoupon(params).then(function (result) {
|
1919
|
-
if ((0, _find3.default)(_this13.paymode.currentMode.djqs, function (djq) {
|
1920
|
-
return djq.code == result.SN;
|
1921
|
-
})) {
|
1922
|
-
_message2.default.info(Differentiate.COUPON + '\u5DF2\u6DFB\u52A0');
|
1923
|
-
} else if (result.IsRepelWithPoints && (0, _find3.default)(_this13.paymode.thePaymodes, function (themode) {
|
1924
|
-
return themode.paymentType == PayStyle.jfdx;
|
1925
|
-
})) {
|
1926
|
-
_message2.default.error(Differentiate.COUPON + '\uFF08' + result.SN + '\uFF09\u4E0D\u53EF\u4E0E\u79EF\u5206\u4E00\u8D77\u4F7F\u7528');
|
1927
|
-
} else {
|
1928
|
-
_this13.addDjq(result.SN, result.Title, result.ReduceAmount, result.StartAmount, result.LastTS, false, !result.IsRepelWithPoints, result.UMemberID);
|
1929
|
-
}
|
1930
|
-
}));
|
1931
|
-
|
1932
|
-
case 10:
|
1933
|
-
case 'end':
|
1934
|
-
return _context10.stop();
|
1935
|
-
}
|
1936
|
-
}
|
1937
|
-
}, _callee10, _this13);
|
1938
|
-
}));
|
1939
|
-
|
1940
|
-
return function (_x9) {
|
1941
|
-
return _ref23.apply(this, arguments);
|
1942
|
-
};
|
1943
|
-
}();
|
1944
|
-
|
1945
|
-
this.repeatStorageModal = function (content) {
|
1946
|
-
return new _promise2.default(function (resolve, reject) {
|
1947
|
-
_tplusComponentsTouch.ModalWraper.confirm({
|
1948
|
-
title: '',
|
1949
|
-
okText: '继续储值',
|
1950
|
-
className: 'repeat-modal',
|
1951
|
-
zIndex: 1007,
|
1952
|
-
content: content,
|
1953
|
-
onOk: function () {
|
1954
|
-
var _ref25 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee11() {
|
1955
|
-
var ret;
|
1956
|
-
return _regenerator2.default.wrap(function _callee11$(_context11) {
|
1957
|
-
while (1) {
|
1958
|
-
switch (_context11.prev = _context11.next) {
|
1959
|
-
case 0:
|
1960
|
-
_context11.next = 2;
|
1961
|
-
return _this13.saveMember();
|
1962
|
-
|
1963
|
-
case 2:
|
1964
|
-
ret = _context11.sent;
|
1965
|
-
|
1966
|
-
if (ret === false) {
|
1967
|
-
resolve(false);
|
1968
|
-
} else {
|
1969
|
-
resolve(true);
|
1970
|
-
}
|
1971
|
-
|
1972
|
-
case 4:
|
1973
|
-
case 'end':
|
1974
|
-
return _context11.stop();
|
1975
|
-
}
|
1976
|
-
}
|
1977
|
-
}, _callee11, _this13);
|
1978
|
-
}));
|
1979
|
-
|
1980
|
-
return function onOk() {
|
1981
|
-
return _ref25.apply(this, arguments);
|
1982
|
-
};
|
1983
|
-
}(),
|
1984
|
-
onCancel: function onCancel() {
|
1985
|
-
resolve(false);
|
1986
|
-
}
|
1987
|
-
});
|
1988
|
-
});
|
1989
|
-
};
|
1990
|
-
|
1991
|
-
this.checkIntegralExchangeReturn = function (id) {
|
1992
|
-
return new _promise2.default(function (resolve, reject) {
|
1993
|
-
_this13.SettlementApi.GetNewIntegralExchange({ param: { refVoucherId: id } }).then(function (resp) {
|
1994
|
-
if (resp && resp.expireIntegral > 0) {
|
1995
|
-
_tplusComponentsTouch.ModalWraper.confirm({
|
1996
|
-
className: 'tplus-confirm-modal',
|
1997
|
-
title: "温馨提示",
|
1998
|
-
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',
|
1999
|
-
cancelable: false,
|
2000
|
-
onOk: function onOk() {
|
2001
|
-
resolve(true);
|
2002
|
-
},
|
2003
|
-
onCancel: function onCancel() {
|
2004
|
-
reject(false);
|
2005
|
-
}
|
2006
|
-
});
|
2007
|
-
} else {
|
2008
|
-
resolve(true);
|
2009
|
-
}
|
2010
|
-
});
|
2011
|
-
});
|
2012
|
-
};
|
2013
|
-
}, _temp), (_descriptor = _applyDecoratedDescriptor(_class.prototype, 'newStyle', [_mobx.observable], {
|
2016
|
+
}(), (_descriptor = _applyDecoratedDescriptor(_class.prototype, 'newStyle', [_mobx.observable], {
|
2014
2017
|
enumerable: true,
|
2015
2018
|
initializer: function initializer() {
|
2016
2019
|
return true;
|
@@ -2021,8 +2024,7 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
2021
2024
|
var _this14 = this;
|
2022
2025
|
|
2023
2026
|
return function () {
|
2024
|
-
|
2025
|
-
_this14.newStyle = voucherDefaultPosMode == 'voucher';
|
2027
|
+
_this14.newStyle = _mutantsMicrofx.localStore && _mutantsMicrofx.localStore.get('voucherDefaultPosMode') == 'voucher';
|
2026
2028
|
};
|
2027
2029
|
}
|
2028
2030
|
}), _descriptor3 = _applyDecoratedDescriptor(_class.prototype, 'queryPwd', [_mobx.action], {
|
@@ -2038,13 +2040,13 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
2038
2040
|
return _message2.default.warn('您两次输入的密码不一致');
|
2039
2041
|
}
|
2040
2042
|
var idstore = (0, _tplusPoslogin.PosInitData)('storeID');
|
2041
|
-
return
|
2043
|
+
return (0, _tplusApi.ccApi)({
|
2042
2044
|
Idstore: idstore,
|
2043
2045
|
meMemberId: _this15.paymode.currentMode.memberId,
|
2044
2046
|
oldPassword: null,
|
2045
2047
|
newPassword: _tplusApi.User.pwdEncrypt(newPassConfirm),
|
2046
2048
|
dataSource: "POS"
|
2047
|
-
}).then(function (resp) {
|
2049
|
+
}, '/member/MeMemberWallet/setWalletPayPassword', false, false, { method: 'post', timeout_skip: true }).then(function (resp) {
|
2048
2050
|
if (resp.successful) {
|
2049
2051
|
return true;
|
2050
2052
|
}
|
@@ -2066,7 +2068,7 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
2066
2068
|
case 0:
|
2067
2069
|
_getLoginInfo4 = _this16.getLoginInfo(), IdStore = _getLoginInfo4.IdStore, StoreCode = _getLoginInfo4.StoreCode;
|
2068
2070
|
_context12.next = 3;
|
2069
|
-
return
|
2071
|
+
return (0, _tplusApi.tApi)({ Idmember: _this16.member.ID, IdStore: IdStore, StoreCode: StoreCode }, 'chanjet.AA.DR.INewRetailMember.GetUmemberDTO', false, false);
|
2070
2072
|
|
2071
2073
|
case 3:
|
2072
2074
|
resp = _context12.sent;
|
@@ -2101,10 +2103,9 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
2101
2103
|
switch (_context13.prev = _context13.next) {
|
2102
2104
|
case 0:
|
2103
2105
|
isOnlyEnabled = returnType ? false : true; //非原单退货为false,其他true
|
2104
|
-
// 查看会员卡信息
|
2105
2106
|
|
2106
2107
|
_context13.next = 3;
|
2107
|
-
return
|
2108
|
+
return (0, _tplusApi.ccApi)({}, '/marketingtool/MeStorageCard/getCardInfoByMemberId/' + memberId + '/' + isOnlyEnabled, false, false, { method: 'get' });
|
2108
2109
|
|
2109
2110
|
case 3:
|
2110
2111
|
result = _context13.sent;
|
@@ -2170,7 +2171,7 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
2170
2171
|
ctMode = _this18.paymode && _this18.paymode.currentMode;
|
2171
2172
|
cardNo = ctMode && ctMode.storageCardNo;
|
2172
2173
|
_context14.next = 4;
|
2173
|
-
return
|
2174
|
+
return (0, _tplusApi.ccApi)({}, '/marketingtool/MeStorageCard/getCardInfoByCardNo/' + cardNo, false, false, { method: 'get', timeout_skip: true });
|
2174
2175
|
|
2175
2176
|
case 4:
|
2176
2177
|
result = _context14.sent;
|
@@ -2413,7 +2414,7 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
2413
2414
|
promoVoucher.voucherDetailList.push(detailDTO);
|
2414
2415
|
});
|
2415
2416
|
promoVoucher.promoLinks = this.checkList;
|
2416
|
-
return
|
2417
|
+
return (0, _tplusApi.ccApi)((0, _extends3.default)({}, promoVoucher), 'promotion/PromoCalculate/findUsefulCouponPromoList', false, false, { method: 'post', timeout_skip: true }).then(function (result) {
|
2417
2418
|
if (result && result.length != 0) {
|
2418
2419
|
result.forEach(function (element, index) {
|
2419
2420
|
var djq1 = false;
|
@@ -2595,7 +2596,7 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
2595
2596
|
memberStoreCode = settleStyleType.memberStoreCode, settlementCode = settleStyleType.settlementCode;
|
2596
2597
|
param = { 'settleStyleType': type == 1 ? memberStoreCode : settlementCode, isIntegralExchange: isIntegralExchange };
|
2597
2598
|
_context15.next = 7;
|
2598
|
-
return
|
2599
|
+
return (0, _tplusApi.tApi)({ param: param }, 'chanjet.RE.NewPos.GetNewStoreSettleStyles', false, false);
|
2599
2600
|
|
2600
2601
|
case 7:
|
2601
2602
|
modes = _context15.sent;
|