tplus-components-touch 3.44.1 → 3.45.2

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