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