tplus-components-touch 3.19.1 → 3.20.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/cloudPrint/api.js +1 -1
- package/dist/components/cloudPrint/api.js.map +1 -1
- package/dist/components/cloudPrint/index.js +24 -48
- package/dist/components/cloudPrint/index.js.map +1 -1
- package/dist/components/inventorySearch/index.js +12 -3
- package/dist/components/inventorySearch/index.js.map +1 -1
- package/dist/components/inventorySearch/index.less +6 -2
- package/dist/components/keyboard/index.js +1 -1
- package/dist/components/keyboard/index.js.map +1 -1
- package/dist/components/settlement/asyncModal.js +4 -0
- package/dist/components/settlement/asyncModal.js.map +1 -1
- package/dist/components/settlement/prototypeTable/index.js +349 -0
- package/dist/components/settlement/prototypeTable/index.js.map +1 -0
- package/dist/components/settlement/prototypeTable/style.less +59 -0
- package/dist/components/settlement/prototypeTable/utils.js +14 -0
- package/dist/components/settlement/prototypeTable/utils.js.map +1 -0
- package/dist/components/settlement/settlement.js +469 -149
- package/dist/components/settlement/settlement.js.map +1 -1
- package/dist/components/settlement/settlement.less +48 -3
- package/dist/components/settlement/settlementStore.js +185 -79
- package/dist/components/settlement/settlementStore.js.map +1 -1
- package/dist/components/ticon/iconfont/demo.css +539 -539
- package/dist/components/ticon/iconfont/demo_index.html +325 -3
- package/dist/components/ticon/iconfont/iconfont.css +59 -3
- package/dist/components/ticon/iconfont/iconfont.js +12 -10
- package/dist/components/ticon/iconfont/iconfont.js.map +1 -1
- package/dist/components/ticon/iconfont/iconfont.json +98 -0
- package/dist/components/ticon/iconfont/iconfont.ttf +0 -0
- package/dist/components/ticon/iconfont/iconfont.woff +0 -0
- package/dist/components/ticon/iconfont/iconfont.woff2 +0 -0
- package/dist/index.js +2 -17
- package/dist/index.js.map +1 -1
- package/package.json +35 -35
- package/dist/components/cloudPrint/printDispatch.js +0 -223
- package/dist/components/cloudPrint/printDispatch.js.map +0 -1
|
@@ -52,6 +52,10 @@ var _asyncToGenerator2 = require('babel-runtime/helpers/asyncToGenerator');
|
|
|
52
52
|
|
|
53
53
|
var _asyncToGenerator3 = _interopRequireDefault(_asyncToGenerator2);
|
|
54
54
|
|
|
55
|
+
var _assign = require('babel-runtime/core-js/object/assign');
|
|
56
|
+
|
|
57
|
+
var _assign2 = _interopRequireDefault(_assign);
|
|
58
|
+
|
|
55
59
|
var _promise = require('babel-runtime/core-js/promise');
|
|
56
60
|
|
|
57
61
|
var _promise2 = _interopRequireDefault(_promise);
|
|
@@ -130,6 +134,10 @@ var _debounce2 = require('lodash/debounce');
|
|
|
130
134
|
|
|
131
135
|
var _debounce3 = _interopRequireDefault(_debounce2);
|
|
132
136
|
|
|
137
|
+
var _lodash = require('lodash');
|
|
138
|
+
|
|
139
|
+
var _lodash2 = _interopRequireDefault(_lodash);
|
|
140
|
+
|
|
133
141
|
var _reduce2 = require('lodash/reduce');
|
|
134
142
|
|
|
135
143
|
var _reduce3 = _interopRequireDefault(_reduce2);
|
|
@@ -196,6 +204,10 @@ var _index = require('../../index');
|
|
|
196
204
|
|
|
197
205
|
var _tplusPoslogin = require('tplus-poslogin');
|
|
198
206
|
|
|
207
|
+
var _index2 = require('./prototypeTable/index');
|
|
208
|
+
|
|
209
|
+
var _index3 = _interopRequireDefault(_index2);
|
|
210
|
+
|
|
199
211
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
200
212
|
|
|
201
213
|
var hasElectron = _mutantsMicrofx.env.platform === _mutantsMicrofx.env.constant.platform.electron;
|
|
@@ -217,6 +229,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
217
229
|
djqVisible: false,
|
|
218
230
|
jfdxVisible: false,
|
|
219
231
|
showSetPwdModal: false,
|
|
232
|
+
prototypeVisible: false, // 优惠明细弹出框
|
|
220
233
|
currentIndex: 0,
|
|
221
234
|
connectCardStatus: false, //连接IC卡状态
|
|
222
235
|
connectCardError: '', //连接IC卡错误后记录错误信息
|
|
@@ -229,7 +242,15 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
229
242
|
noAlreadyWarn: true,
|
|
230
243
|
btnDissabled: true,
|
|
231
244
|
confirmPwd: '',
|
|
232
|
-
settleDisabled: false
|
|
245
|
+
settleDisabled: false,
|
|
246
|
+
protytypeCount: null,
|
|
247
|
+
isPrototypeClick: false,
|
|
248
|
+
dataSource: [],
|
|
249
|
+
discountTotalAmount: null,
|
|
250
|
+
discountRetailTotalAount: null,
|
|
251
|
+
discountPrototypeTotalAmount: null,
|
|
252
|
+
bquick: false,
|
|
253
|
+
currentKey: null };
|
|
233
254
|
_this2.compoundHotkeysList = (window.$.operationControl[5] ? window.$.operationControl[5].control || [] : []).map(function (key) {
|
|
234
255
|
return key.toLocaleUpperCase();
|
|
235
256
|
});
|
|
@@ -294,28 +315,59 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
294
315
|
}
|
|
295
316
|
};
|
|
296
317
|
|
|
297
|
-
_this2.
|
|
318
|
+
_this2.payQuick = function () {
|
|
319
|
+
var currentKey = _this2.state.currentKey;
|
|
320
|
+
|
|
298
321
|
var _enumController$getEn = _mutantsUtil.enumController.getEnumOj(),
|
|
299
322
|
PayStyle = _enumController$getEn.PayStyle;
|
|
300
323
|
|
|
324
|
+
_this2.store.init(_this2.props.type == 1 ? null : _this2.context, _this2.props.onHandleAmount, _this2.props.dataSource.Code_02, _this2.props.storeInfo, true, _this2.props.amount, _this2.props.type, _this2.props.dto);
|
|
325
|
+
var amount = _this2.store.paymode.amount;
|
|
326
|
+
if (amount == 0) {
|
|
327
|
+
_this2.settleZero();
|
|
328
|
+
return;
|
|
329
|
+
}
|
|
330
|
+
if (currentKey == PayStyle.hyczk) {
|
|
331
|
+
var isProhibitMeStorageCard = _this2.props.isProhibitMeStorageCard;
|
|
332
|
+
|
|
333
|
+
if (isProhibitMeStorageCard) {
|
|
334
|
+
_message2.default.warn('储值卡不可键盘录入,请刷卡!');
|
|
335
|
+
return;
|
|
336
|
+
}
|
|
337
|
+
_this2.showCzkModal();
|
|
338
|
+
} else {
|
|
339
|
+
_this2.store.quickSettle(currentKey);
|
|
340
|
+
_this2.handleSettle("quickPay");
|
|
341
|
+
}
|
|
342
|
+
_this2.handleGuestShow(amount < 0 ? 2 : 3, amount);
|
|
343
|
+
};
|
|
344
|
+
|
|
345
|
+
_this2.quickSettle = function (key) {
|
|
346
|
+
var isAutoShowCouponWhenCash = (0, _tplusPoslogin.PosInitData)('IsAutoShowCouponWhenCash');
|
|
347
|
+
_this2.setState({
|
|
348
|
+
currentKey: key
|
|
349
|
+
});
|
|
350
|
+
var _this2$props = _this2.props,
|
|
351
|
+
isReturn = _this2$props.isReturn,
|
|
352
|
+
type = _this2$props.type;
|
|
353
|
+
|
|
301
354
|
_promise2.default.resolve(!_this2.props.onValidate || _this2.props.onValidate()).then(function (result) {
|
|
302
355
|
if (result) {
|
|
303
356
|
_this2.setState({
|
|
304
357
|
settleDisabled: false
|
|
305
358
|
});
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
359
|
+
if (type !== 1) {
|
|
360
|
+
var count = _this2.handleShowPrototype();
|
|
361
|
+
if (!isReturn && isAutoShowCouponWhenCash && count > 0) {
|
|
362
|
+
_this2.setState({
|
|
363
|
+
prototypeVisible: true
|
|
364
|
+
});
|
|
365
|
+
} else {
|
|
366
|
+
_this2.payQuick();
|
|
367
|
+
}
|
|
314
368
|
} else {
|
|
315
|
-
_this2.
|
|
316
|
-
_this2.handleSettle("quickPay");
|
|
369
|
+
_this2.payQuick();
|
|
317
370
|
}
|
|
318
|
-
_this2.handleGuestShow(amount < 0 ? 2 : 3, amount);
|
|
319
371
|
}
|
|
320
372
|
});
|
|
321
373
|
};
|
|
@@ -326,36 +378,115 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
326
378
|
return IdbusiType === 37 || IdbusiType === 36;
|
|
327
379
|
};
|
|
328
380
|
|
|
381
|
+
_this2.payFun = function () {
|
|
382
|
+
_this2.store.init(_this2.props.type == 1 ? null : _this2.context, _this2.props.onHandleAmount, _this2.props.dataSource.Code_02, _this2.props.storeInfo, false, _this2.props.amount, _this2.props.type, _this2.props.dto);
|
|
383
|
+
var amount = _this2.store.paymode.amount;
|
|
384
|
+
if (amount == 0) {
|
|
385
|
+
_this2.settleZero();
|
|
386
|
+
return;
|
|
387
|
+
}
|
|
388
|
+
_this2.setState({ visible: true });
|
|
389
|
+
_this2.handleGuestShow(amount < 0 ? 2 : 3, amount);
|
|
390
|
+
setTimeout(function () {
|
|
391
|
+
_this2.handleDefault();
|
|
392
|
+
// // 单据模式 临时性获取第一个结算方式焦点
|
|
393
|
+
// // document.querySelector('.modeItem:nth-child(1) .content input').focus()
|
|
394
|
+
var _this2$store = _this2.store,
|
|
395
|
+
paymode = _this2$store.paymode,
|
|
396
|
+
brefund = _this2$store.brefund,
|
|
397
|
+
newStyle = _this2$store.newStyle;
|
|
398
|
+
|
|
399
|
+
var boriginReturn = _this2.context && _this2.context.viewModel && _this2.context.viewModel.data && JSON.getCellValue(_this2.context.viewModel.data, "IsOriginalReturn");
|
|
400
|
+
var thePaymodes = newStyle ? (0, _filter3.default)(paymode.thePaymodes, function (m) {
|
|
401
|
+
return !(_this2.checkModeDisabled(m.paymentType, brefund, boriginReturn) && parseFloat(m.value) == 0);
|
|
402
|
+
}) : paymode.thePaymodes;
|
|
403
|
+
_this2.setFocusAndSelectionMode(thePaymodes, -1);
|
|
404
|
+
}, 100);
|
|
405
|
+
};
|
|
406
|
+
|
|
407
|
+
_this2.handleShowPrototype = function () {
|
|
408
|
+
var pricePrecision = (0, _tplusPoslogin.PosInitData)("PricePrecision");
|
|
409
|
+
var quantityPrecision = (0, _tplusPoslogin.PosInitData)('QuantityPrecision');
|
|
410
|
+
var _this2$context$viewMo = _this2.context.viewModel.data,
|
|
411
|
+
RetailDetails = _this2$context$viewMo.RetailDetails,
|
|
412
|
+
TotalTaxAmount = _this2$context$viewMo.TotalTaxAmount;
|
|
413
|
+
|
|
414
|
+
var dataSource = RetailDetails.map(function (o) {
|
|
415
|
+
return (0, _assign2.default)({}, o);
|
|
416
|
+
});
|
|
417
|
+
var discountRetailTotalAount = null;
|
|
418
|
+
var count = 0;
|
|
419
|
+
dataSource && dataSource.forEach(function (item) {
|
|
420
|
+
var count1 = 0;
|
|
421
|
+
item.ShowFreeItem = false;
|
|
422
|
+
for (var i in item) {
|
|
423
|
+
if (/FreeItem/.test(i)) {
|
|
424
|
+
if (item[i] && item[i].Name) {
|
|
425
|
+
count1++;
|
|
426
|
+
item.ShowFreeItem = true;
|
|
427
|
+
count1 === 1 ? item.FreeItem = item[i].Name : item.FreeItem += '/' + item[i].Name;
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
//有赠品的情况,不在考虑是否促销
|
|
432
|
+
if (item.IsPresent) {
|
|
433
|
+
item.badge = { text: '赠', position: 'leftTop', className: '' };
|
|
434
|
+
} else if (item.IsGWPBuyGift) {
|
|
435
|
+
item.badge = { text: '换', position: 'leftTop', className: '' };
|
|
436
|
+
} else if (item.PromotionDetails && item.PromotionDetails.length > 0) {
|
|
437
|
+
item.badge = { text: '促', position: 'leftTop', className: '' };
|
|
438
|
+
} else {
|
|
439
|
+
item.badge = { text: '', position: '', className: '' };
|
|
440
|
+
}
|
|
441
|
+
if (!item.IsPresent) {
|
|
442
|
+
discountRetailTotalAount += item.RetailPrice * item.Quantity;
|
|
443
|
+
}
|
|
444
|
+
if (item.PromotionDetails && item.PromotionDetails.length > 0) {
|
|
445
|
+
count++;
|
|
446
|
+
}
|
|
447
|
+
item.InventoryName = item.Inventory.Name;
|
|
448
|
+
item.Discount = (0, _utils.getRoundValue)(item.RetailPrice - item.TaxPrice, pricePrecision);
|
|
449
|
+
item.TotalDiscount = (0, _utils.getFixedNumber)(item.Discount * item.Quantity);
|
|
450
|
+
item.nAmount = (0, _utils.getFixedNumber)(item.TaxAmount);
|
|
451
|
+
item.UnitName = item.Unit.Name;
|
|
452
|
+
item.nQuantity = (0, _utils.getRoundValue)(item.Quantity, quantityPrecision);
|
|
453
|
+
item.nTaxPrice = (0, _utils.getRoundValue)(item.TaxPrice, pricePrecision);
|
|
454
|
+
item.nRetailPrice = (0, _utils.getRoundValue)(item.RetailPrice, pricePrecision);
|
|
455
|
+
});
|
|
456
|
+
_this2.setState({
|
|
457
|
+
dataSource: dataSource,
|
|
458
|
+
discountTotalAmount: (0, _utils.getFixedNumber)(TotalTaxAmount),
|
|
459
|
+
discountRetailTotalAount: (0, _utils.getFixedNumber)(discountRetailTotalAount),
|
|
460
|
+
discountPrototypeTotalAmount: (0, _utils.getFixedNumber)(discountRetailTotalAount - TotalTaxAmount)
|
|
461
|
+
});
|
|
462
|
+
console.log(RetailDetails, 'RetailDetails-----');
|
|
463
|
+
return count;
|
|
464
|
+
};
|
|
465
|
+
|
|
329
466
|
_this2.showModal = function () {
|
|
467
|
+
var _this2$props2 = _this2.props,
|
|
468
|
+
isReturn = _this2$props2.isReturn,
|
|
469
|
+
type = _this2$props2.type;
|
|
470
|
+
|
|
471
|
+
var isAutoShowCouponWhenCash = (0, _tplusPoslogin.PosInitData)('IsAutoShowCouponWhenCash');
|
|
330
472
|
// 支持异步验证过程
|
|
331
473
|
_promise2.default.resolve(!_this2.props.onValidate || _this2.props.onValidate()).then(function (result) {
|
|
332
474
|
if (result) {
|
|
333
475
|
_this2.setState({
|
|
334
476
|
settleDisabled: false
|
|
335
477
|
});
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
478
|
+
if (type !== 1) {
|
|
479
|
+
var count = _this2.handleShowPrototype();
|
|
480
|
+
if (!isReturn && isAutoShowCouponWhenCash && count > 0) {
|
|
481
|
+
_this2.setState({
|
|
482
|
+
prototypeVisible: true
|
|
483
|
+
});
|
|
484
|
+
} else {
|
|
485
|
+
_this2.payFun();
|
|
486
|
+
}
|
|
487
|
+
} else {
|
|
488
|
+
_this2.payFun();
|
|
341
489
|
}
|
|
342
|
-
_this2.setState({ visible: true });
|
|
343
|
-
_this2.handleGuestShow(amount < 0 ? 2 : 3, amount);
|
|
344
|
-
setTimeout(function () {
|
|
345
|
-
_this2.handleDefault();
|
|
346
|
-
// // 单据模式 临时性获取第一个结算方式焦点
|
|
347
|
-
// // document.querySelector('.modeItem:nth-child(1) .content input').focus()
|
|
348
|
-
var _this2$store = _this2.store,
|
|
349
|
-
paymode = _this2$store.paymode,
|
|
350
|
-
brefund = _this2$store.brefund,
|
|
351
|
-
newStyle = _this2$store.newStyle;
|
|
352
|
-
|
|
353
|
-
var boriginReturn = _this2.context && _this2.context.viewModel && _this2.context.viewModel.data && JSON.getCellValue(_this2.context.viewModel.data, "IsOriginalReturn");
|
|
354
|
-
var thePaymodes = newStyle ? (0, _filter3.default)(paymode.thePaymodes, function (m) {
|
|
355
|
-
return !(_this2.checkModeDisabled(m.paymentType, brefund, boriginReturn) && parseFloat(m.value) == 0);
|
|
356
|
-
}) : paymode.thePaymodes;
|
|
357
|
-
_this2.setFocusAndSelectionMode(thePaymodes, -1);
|
|
358
|
-
}, 100);
|
|
359
490
|
}
|
|
360
491
|
});
|
|
361
492
|
};
|
|
@@ -435,38 +566,42 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
435
566
|
duration: 4
|
|
436
567
|
});
|
|
437
568
|
} else {
|
|
438
|
-
if (isNewRetailBCPos) {
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
}
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
}
|
|
467
|
-
//
|
|
468
|
-
//
|
|
469
|
-
//
|
|
569
|
+
// if (isNewRetailBCPos) {
|
|
570
|
+
// let { isReturn } = this.props;
|
|
571
|
+
// let sMember = this.store.member;
|
|
572
|
+
// if (!sMember.StorageCardEnable) {
|
|
573
|
+
// Message.warn("该储值卡已停用");
|
|
574
|
+
// return;
|
|
575
|
+
// }
|
|
576
|
+
// if (sMember && sMember.ID) {
|
|
577
|
+
// // noPlaySetPwd 点击结算方式设置密码,点加号不设置
|
|
578
|
+
// if (!sMember.WalletEnabled && params !== 'noPlaySetPwd' && !isReturn) {
|
|
579
|
+
// this.setState({
|
|
580
|
+
// newPass: '',
|
|
581
|
+
// newPassConfirm: '',
|
|
582
|
+
// showSetPwdModal: true
|
|
583
|
+
// })
|
|
584
|
+
// } else {
|
|
585
|
+
// this.setState({
|
|
586
|
+
// showSetPwdModal: false,
|
|
587
|
+
// czkVisible: true
|
|
588
|
+
// })
|
|
589
|
+
// }
|
|
590
|
+
// }
|
|
591
|
+
// // else {
|
|
592
|
+
// // Message.warn('请先录入会员');
|
|
593
|
+
// // }
|
|
594
|
+
// // this.setState({
|
|
595
|
+
// // czkVisible: true,
|
|
596
|
+
// // });
|
|
597
|
+
// } else {
|
|
598
|
+
// this.setState({
|
|
599
|
+
// czkVisible: true,
|
|
600
|
+
// });
|
|
601
|
+
// }
|
|
602
|
+
_this2.setState({
|
|
603
|
+
czkVisible: true
|
|
604
|
+
});
|
|
470
605
|
}
|
|
471
606
|
setTimeout(function () {
|
|
472
607
|
if (!currentMode.member || !currentMode.member.id) {
|
|
@@ -477,13 +612,13 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
477
612
|
_this2.inputCzkAmount.input.setSelectionRange(0, _this2.inputCzkAmount.input.value.length);
|
|
478
613
|
}
|
|
479
614
|
}
|
|
480
|
-
},
|
|
615
|
+
}, 500);
|
|
481
616
|
_this2.connectRfCard();
|
|
482
617
|
};
|
|
483
618
|
|
|
484
619
|
_this2.handleCzkOk = function () {
|
|
485
620
|
var _ref2 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee(e) {
|
|
486
|
-
var _enumController$getEn3, PayStyle;
|
|
621
|
+
var sMember, _enumController$getEn3, PayStyle;
|
|
487
622
|
|
|
488
623
|
return _regenerator2.default.wrap(function _callee$(_context) {
|
|
489
624
|
while (1) {
|
|
@@ -497,46 +632,57 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
497
632
|
// });
|
|
498
633
|
// return;
|
|
499
634
|
// }
|
|
635
|
+
sMember = _this2.store.member;
|
|
636
|
+
|
|
637
|
+
if (sMember.StorageCardEnable) {
|
|
638
|
+
_context.next = 4;
|
|
639
|
+
break;
|
|
640
|
+
}
|
|
641
|
+
|
|
642
|
+
_message2.default.warn("该储值卡已停用");
|
|
643
|
+
return _context.abrupt('return');
|
|
644
|
+
|
|
645
|
+
case 4:
|
|
500
646
|
_enumController$getEn3 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn3.PayStyle;
|
|
501
647
|
|
|
502
648
|
if (_this2.store.paymode.currentMode.member.id) {
|
|
503
|
-
_context.next =
|
|
649
|
+
_context.next = 8;
|
|
504
650
|
break;
|
|
505
651
|
}
|
|
506
652
|
|
|
507
|
-
_context.next =
|
|
653
|
+
_context.next = 8;
|
|
508
654
|
return _this2.store.loadCzk(_this2.czkInput.input.value);
|
|
509
655
|
|
|
510
|
-
case
|
|
656
|
+
case 8:
|
|
511
657
|
if (_this2.store.paymode.currentMode.member.id) {
|
|
512
|
-
_context.next =
|
|
658
|
+
_context.next = 11;
|
|
513
659
|
break;
|
|
514
660
|
}
|
|
515
661
|
|
|
516
662
|
_message2.default.error("请录入储值卡!");
|
|
517
663
|
return _context.abrupt('return');
|
|
518
664
|
|
|
519
|
-
case
|
|
665
|
+
case 11:
|
|
520
666
|
if (!(0, _find3.default)(_this2.store.paymode.thePaymodes, function (mode) {
|
|
521
667
|
return mode.paymethodId != _this2.store.paymode.currentMode.paymethodId && mode.paymentType == PayStyle.hyczk && mode.member.id == _this2.store.paymode.currentMode.member.id;
|
|
522
668
|
})) {
|
|
523
|
-
_context.next =
|
|
669
|
+
_context.next = 14;
|
|
524
670
|
break;
|
|
525
671
|
}
|
|
526
672
|
|
|
527
673
|
_message2.default.error("该储值卡已使用。");
|
|
528
674
|
return _context.abrupt('return');
|
|
529
675
|
|
|
530
|
-
case
|
|
676
|
+
case 14:
|
|
531
677
|
if (!(_this2.store.bquick && _this2.store.paymode.amount != _this2.store.paymode.currentMode.value)) {
|
|
532
|
-
_context.next =
|
|
678
|
+
_context.next = 17;
|
|
533
679
|
break;
|
|
534
680
|
}
|
|
535
681
|
|
|
536
682
|
_message2.default.error("实收金额应等于应收金额。");
|
|
537
683
|
return _context.abrupt('return');
|
|
538
684
|
|
|
539
|
-
case
|
|
685
|
+
case 17:
|
|
540
686
|
|
|
541
687
|
_this2.setState({
|
|
542
688
|
czkVisible: false
|
|
@@ -545,7 +691,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
545
691
|
_this2.store.paymode.calcMemberBalance();
|
|
546
692
|
_this2.handleCzk();
|
|
547
693
|
|
|
548
|
-
case
|
|
694
|
+
case 21:
|
|
549
695
|
case 'end':
|
|
550
696
|
return _context.stop();
|
|
551
697
|
}
|
|
@@ -893,7 +1039,20 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
893
1039
|
|
|
894
1040
|
_this2.onTabsClick = function (key) {
|
|
895
1041
|
var _enumController$getEn9 = _mutantsUtil.enumController.getEnumOj(),
|
|
896
|
-
|
|
1042
|
+
PayStyle = _enumController$getEn9.PayStyle,
|
|
1043
|
+
Differentiate = _enumController$getEn9.Differentiate;
|
|
1044
|
+
|
|
1045
|
+
if (key === PayStyle.hyczk) {
|
|
1046
|
+
var isProhibitMeStorageCard = _this2.props.isProhibitMeStorageCard;
|
|
1047
|
+
|
|
1048
|
+
if (isProhibitMeStorageCard) {
|
|
1049
|
+
_message2.default.warn('储值卡不可键盘录入,请刷卡!');
|
|
1050
|
+
return;
|
|
1051
|
+
}
|
|
1052
|
+
}
|
|
1053
|
+
|
|
1054
|
+
var _enumController$getEn10 = _mutantsUtil.enumController.getEnumOj(),
|
|
1055
|
+
MultiPay = _enumController$getEn10.MultiPay;
|
|
897
1056
|
|
|
898
1057
|
var _this2$store3 = _this2.store,
|
|
899
1058
|
paymode = _this2$store3.paymode,
|
|
@@ -952,8 +1111,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
952
1111
|
_this2.editModal = function (id, type, boriginReturn) {
|
|
953
1112
|
_this2.setState({ currentIndex: id });
|
|
954
1113
|
|
|
955
|
-
var _enumController$
|
|
956
|
-
PayStyle = _enumController$
|
|
1114
|
+
var _enumController$getEn11 = _mutantsUtil.enumController.getEnumOj(),
|
|
1115
|
+
PayStyle = _enumController$getEn11.PayStyle;
|
|
957
1116
|
|
|
958
1117
|
switch (type) {
|
|
959
1118
|
case PayStyle.hyczk:
|
|
@@ -978,8 +1137,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
978
1137
|
};
|
|
979
1138
|
|
|
980
1139
|
_this2.onDelPay = function (index, boriginReturn, type) {
|
|
981
|
-
var _enumController$
|
|
982
|
-
PayStyle = _enumController$
|
|
1140
|
+
var _enumController$getEn12 = _mutantsUtil.enumController.getEnumOj(),
|
|
1141
|
+
PayStyle = _enumController$getEn12.PayStyle;
|
|
983
1142
|
|
|
984
1143
|
if (boriginReturn && (type == PayStyle.hyczk || type == PayStyle.djq || type == PayStyle.jfdx)) {
|
|
985
1144
|
_message2.default.info('原单退货时,该结算方式不可以删除。');
|
|
@@ -1041,8 +1200,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1041
1200
|
};
|
|
1042
1201
|
|
|
1043
1202
|
_this2.appendCzkmode = function (boriginReturn, params) {
|
|
1044
|
-
var _enumController$
|
|
1045
|
-
PayStyle = _enumController$
|
|
1203
|
+
var _enumController$getEn13 = _mutantsUtil.enumController.getEnumOj(),
|
|
1204
|
+
PayStyle = _enumController$getEn13.PayStyle;
|
|
1046
1205
|
|
|
1047
1206
|
if (boriginReturn) {
|
|
1048
1207
|
_message2.default.info('原单退货时不可以使用非原单的储值卡结算方式。');
|
|
@@ -1063,8 +1222,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1063
1222
|
};
|
|
1064
1223
|
|
|
1065
1224
|
_this2.djqChecked = function (q) {
|
|
1066
|
-
var _enumController$
|
|
1067
|
-
Differentiate = _enumController$
|
|
1225
|
+
var _enumController$getEn14 = _mutantsUtil.enumController.getEnumOj(),
|
|
1226
|
+
Differentiate = _enumController$getEn14.Differentiate;
|
|
1068
1227
|
|
|
1069
1228
|
if (_this2.store.paymode.currentMode.boriginReturn) {
|
|
1070
1229
|
_message2.default.info('\u539F\u5355\u9000\u8D27\u65F6' + Differentiate.COUPON + '\u4E0D\u53EF\u4EE5\u53D6\u6D88\u3002');
|
|
@@ -1129,8 +1288,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1129
1288
|
};
|
|
1130
1289
|
|
|
1131
1290
|
_this2.onHotKeyClickModal = function (mode, index, boriginReturn) {
|
|
1132
|
-
var _enumController$
|
|
1133
|
-
PayStyle = _enumController$
|
|
1291
|
+
var _enumController$getEn15 = _mutantsUtil.enumController.getEnumOj(),
|
|
1292
|
+
PayStyle = _enumController$getEn15.PayStyle;
|
|
1134
1293
|
|
|
1135
1294
|
var brefund = _this2.store.brefund;
|
|
1136
1295
|
|
|
@@ -1215,8 +1374,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1215
1374
|
};
|
|
1216
1375
|
|
|
1217
1376
|
_this2.setFocusAndSelectionMode = function (thePaymodes, currentIndex) {
|
|
1218
|
-
var _enumController$
|
|
1219
|
-
PayStyle = _enumController$
|
|
1377
|
+
var _enumController$getEn16 = _mutantsUtil.enumController.getEnumOj(),
|
|
1378
|
+
PayStyle = _enumController$getEn16.PayStyle;
|
|
1220
1379
|
|
|
1221
1380
|
var displayPayModeList = [].concat((0, _toConsumableArray3.default)(thePaymodes));
|
|
1222
1381
|
// 复制支付方式列表
|
|
@@ -1239,8 +1398,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1239
1398
|
};
|
|
1240
1399
|
|
|
1241
1400
|
_this2.findModlePayBySplice = function (thePaymodes, currenIndex, symbol) {
|
|
1242
|
-
var _enumController$
|
|
1243
|
-
PayStyle = _enumController$
|
|
1401
|
+
var _enumController$getEn17 = _mutantsUtil.enumController.getEnumOj(),
|
|
1402
|
+
PayStyle = _enumController$getEn17.PayStyle;
|
|
1244
1403
|
|
|
1245
1404
|
var findIndex = currenIndex;
|
|
1246
1405
|
var endCurrentMode = thePaymodes.find(function (mode, index) {
|
|
@@ -1377,14 +1536,14 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1377
1536
|
};
|
|
1378
1537
|
|
|
1379
1538
|
_this2.settleSuccess = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee5() {
|
|
1380
|
-
var _enumController$
|
|
1539
|
+
var _enumController$getEn18, PayStyle, _this2$store$paymode, amount, received, thePaymodes, IdbusiType, charge, openCashBox, _this, showTwoScreen, getSettleGift, type, resp1;
|
|
1381
1540
|
|
|
1382
1541
|
return _regenerator2.default.wrap(function _callee5$(_context5) {
|
|
1383
1542
|
while (1) {
|
|
1384
1543
|
switch (_context5.prev = _context5.next) {
|
|
1385
1544
|
case 0:
|
|
1386
1545
|
//提示成功
|
|
1387
|
-
_enumController$
|
|
1546
|
+
_enumController$getEn18 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn18.PayStyle;
|
|
1388
1547
|
_this2$store$paymode = _this2.store.paymode, amount = _this2$store$paymode.amount, received = _this2$store$paymode.received, thePaymodes = _this2$store$paymode.thePaymodes;
|
|
1389
1548
|
IdbusiType = _this2.store.dto.IdbusiType;
|
|
1390
1549
|
charge = _this2.store.paymode.charge;
|
|
@@ -1423,9 +1582,6 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1423
1582
|
//副屏-第二屏幕
|
|
1424
1583
|
if (_this.isHorizontalSunMi) {
|
|
1425
1584
|
window.sunMi_PresentationManager.sendMessageToSecondScreen(params);
|
|
1426
|
-
setTimeout(function () {
|
|
1427
|
-
window.sunMi_PresentationManager.sendMessageToSecondScreen({ step: 1 });
|
|
1428
|
-
}, 3000);
|
|
1429
1585
|
} else {
|
|
1430
1586
|
_mutantsMicrofx.nativeMs && _mutantsMicrofx.nativeMs.setIpcRendererMethod('ReplyScreen', params);
|
|
1431
1587
|
}
|
|
@@ -1438,23 +1594,30 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1438
1594
|
};
|
|
1439
1595
|
|
|
1440
1596
|
getSettleGift = _this2.store.getSettleGift;
|
|
1597
|
+
type = _this2.props.type;
|
|
1441
1598
|
resp1 = false;
|
|
1442
|
-
|
|
1443
|
-
|
|
1599
|
+
|
|
1600
|
+
if (!(type !== 1)) {
|
|
1601
|
+
_context5.next = 20;
|
|
1602
|
+
break;
|
|
1603
|
+
}
|
|
1604
|
+
|
|
1605
|
+
_context5.prev = 11;
|
|
1606
|
+
_context5.next = 14;
|
|
1444
1607
|
return getSettleGift();
|
|
1445
1608
|
|
|
1446
|
-
case
|
|
1609
|
+
case 14:
|
|
1447
1610
|
resp1 = _context5.sent;
|
|
1448
|
-
_context5.next =
|
|
1611
|
+
_context5.next = 20;
|
|
1449
1612
|
break;
|
|
1450
1613
|
|
|
1451
|
-
case
|
|
1452
|
-
_context5.prev =
|
|
1453
|
-
_context5.t0 = _context5['catch'](
|
|
1614
|
+
case 17:
|
|
1615
|
+
_context5.prev = 17;
|
|
1616
|
+
_context5.t0 = _context5['catch'](11);
|
|
1454
1617
|
|
|
1455
1618
|
console.log("获取支付礼包getSettleGift失败");
|
|
1456
1619
|
|
|
1457
|
-
case
|
|
1620
|
+
case 20:
|
|
1458
1621
|
|
|
1459
1622
|
setTimeout(function () {
|
|
1460
1623
|
if (window.__loadingModal) {
|
|
@@ -1486,12 +1649,12 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1486
1649
|
_this2.cancelState();
|
|
1487
1650
|
}, 0);
|
|
1488
1651
|
|
|
1489
|
-
case
|
|
1652
|
+
case 21:
|
|
1490
1653
|
case 'end':
|
|
1491
1654
|
return _context5.stop();
|
|
1492
1655
|
}
|
|
1493
1656
|
}
|
|
1494
|
-
}, _callee5, _this3, [[
|
|
1657
|
+
}, _callee5, _this3, [[11, 17]]);
|
|
1495
1658
|
}));
|
|
1496
1659
|
|
|
1497
1660
|
_this2.handleGuestShow = function (dtype, value) {
|
|
@@ -1636,7 +1799,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1636
1799
|
};
|
|
1637
1800
|
}();
|
|
1638
1801
|
|
|
1639
|
-
var _enumController$
|
|
1802
|
+
var _enumController$getEn19, PayStyle, _this2$store6, paymode, brefund, boriginReturn, newStyle, isQuickPay, that, status, zeromode, promises, thePaymodes, quickmode, commit;
|
|
1640
1803
|
|
|
1641
1804
|
return _regenerator2.default.wrap(function _callee8$(_context8) {
|
|
1642
1805
|
while (1) {
|
|
@@ -1656,7 +1819,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1656
1819
|
// }
|
|
1657
1820
|
//
|
|
1658
1821
|
// testAsync(p);
|
|
1659
|
-
_enumController$
|
|
1822
|
+
_enumController$getEn19 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn19.PayStyle;
|
|
1660
1823
|
_this2$store6 = _this2.store, paymode = _this2$store6.paymode, brefund = _this2$store6.brefund, boriginReturn = _this2$store6.boriginReturn, newStyle = _this2$store6.newStyle;
|
|
1661
1824
|
isQuickPay = args === 'quickPay';
|
|
1662
1825
|
that = _this2;
|
|
@@ -1931,7 +2094,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1931
2094
|
};
|
|
1932
2095
|
}();
|
|
1933
2096
|
|
|
1934
|
-
var that, curmode, promises, _ref15, isNewRetailBCPos, _enumController$
|
|
2097
|
+
var that, curmode, promises, _ref15, isNewRetailBCPos, _enumController$getEn20, PayStyle, isNeedPasswordForStoragePay, commit;
|
|
1935
2098
|
|
|
1936
2099
|
return _regenerator2.default.wrap(function _callee11$(_context11) {
|
|
1937
2100
|
while (1) {
|
|
@@ -1944,10 +2107,14 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1944
2107
|
|
|
1945
2108
|
if (isNewRetailBCPos) {
|
|
1946
2109
|
if (curmode.value > 0) {
|
|
1947
|
-
_enumController$
|
|
2110
|
+
_enumController$getEn20 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn20.PayStyle;
|
|
1948
2111
|
|
|
1949
2112
|
if (curmode.paymentType === PayStyle.hyczk) {
|
|
1950
|
-
|
|
2113
|
+
isNeedPasswordForStoragePay = (0, _tplusPoslogin.PosInitData)('IsNeedPasswordForStoragePay');
|
|
2114
|
+
|
|
2115
|
+
if (isNeedPasswordForStoragePay) {
|
|
2116
|
+
promises.push(that.inputPwd(curmode));
|
|
2117
|
+
}
|
|
1951
2118
|
}
|
|
1952
2119
|
}
|
|
1953
2120
|
} else {
|
|
@@ -2212,8 +2379,12 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2212
2379
|
}();
|
|
2213
2380
|
|
|
2214
2381
|
_this2.btnDebounced = function (type, bquick) {
|
|
2215
|
-
|
|
2216
|
-
|
|
2382
|
+
_this2.setState({
|
|
2383
|
+
bquick: bquick
|
|
2384
|
+
});
|
|
2385
|
+
|
|
2386
|
+
var _enumController$getEn21 = _mutantsUtil.enumController.getEnumOj(),
|
|
2387
|
+
PayStyle = _enumController$getEn21.PayStyle;
|
|
2217
2388
|
|
|
2218
2389
|
var _this2$store7 = _this2.store,
|
|
2219
2390
|
paymode = _this2$store7.paymode,
|
|
@@ -2309,8 +2480,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2309
2480
|
};
|
|
2310
2481
|
|
|
2311
2482
|
_this2.checkCharge = function () {
|
|
2312
|
-
var _enumController$
|
|
2313
|
-
PayStyle = _enumController$
|
|
2483
|
+
var _enumController$getEn22 = _mutantsUtil.enumController.getEnumOj(),
|
|
2484
|
+
PayStyle = _enumController$getEn22.PayStyle;
|
|
2314
2485
|
|
|
2315
2486
|
var paymode = _this2.store.paymode;
|
|
2316
2487
|
|
|
@@ -2357,8 +2528,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2357
2528
|
};
|
|
2358
2529
|
|
|
2359
2530
|
_this2.getXianjinPayment = function (payType, value) {
|
|
2360
|
-
var _enumController$
|
|
2361
|
-
PayStyle = _enumController$
|
|
2531
|
+
var _enumController$getEn23 = _mutantsUtil.enumController.getEnumOj(),
|
|
2532
|
+
PayStyle = _enumController$getEn23.PayStyle;
|
|
2362
2533
|
|
|
2363
2534
|
var isManualIntoAmount = _this2.state.isManualIntoAmount;
|
|
2364
2535
|
|
|
@@ -2366,8 +2537,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2366
2537
|
};
|
|
2367
2538
|
|
|
2368
2539
|
_this2.getXianjinBalance = function (payType, value) {
|
|
2369
|
-
var _enumController$
|
|
2370
|
-
PayStyle = _enumController$
|
|
2540
|
+
var _enumController$getEn24 = _mutantsUtil.enumController.getEnumOj(),
|
|
2541
|
+
PayStyle = _enumController$getEn24.PayStyle;
|
|
2371
2542
|
//找零金额-存在权限控制
|
|
2372
2543
|
|
|
2373
2544
|
|
|
@@ -2379,12 +2550,17 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2379
2550
|
_this2.inputConfirm = function (paymode, isQuickPay) {
|
|
2380
2551
|
var that = _this2;
|
|
2381
2552
|
var isStoredValueCard = false;
|
|
2553
|
+
var discountPrototypeTotalAmount = _this2.state.discountPrototypeTotalAmount;
|
|
2554
|
+
var _this2$props3 = _this2.props,
|
|
2555
|
+
isReturn = _this2$props3.isReturn,
|
|
2556
|
+
type = _this2$props3.type;
|
|
2557
|
+
|
|
2382
2558
|
var isManualIntoAmount = void 0;
|
|
2383
2559
|
// 付款弹窗
|
|
2384
2560
|
return new _promise2.default(function (resolve, reject) {
|
|
2385
|
-
var _enumController$
|
|
2386
|
-
PayStyle = _enumController$
|
|
2387
|
-
PayIcon2 = _enumController$
|
|
2561
|
+
var _enumController$getEn25 = _mutantsUtil.enumController.getEnumOj(),
|
|
2562
|
+
PayStyle = _enumController$getEn25.PayStyle,
|
|
2563
|
+
PayIcon2 = _enumController$getEn25.PayIcon2;
|
|
2388
2564
|
|
|
2389
2565
|
var modal = (0, _asyncModal2.default)({
|
|
2390
2566
|
onPressEnter: function onPressEnter() {
|
|
@@ -2418,6 +2594,21 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2418
2594
|
throw "error";
|
|
2419
2595
|
}
|
|
2420
2596
|
},
|
|
2597
|
+
isCancelFun: function isCancelFun() {
|
|
2598
|
+
var _that$state = that.state,
|
|
2599
|
+
prototypeVisible = _that$state.prototypeVisible,
|
|
2600
|
+
protytypeCount = _that$state.protytypeCount;
|
|
2601
|
+
|
|
2602
|
+
if (protytypeCount === 1) {
|
|
2603
|
+
that.setState({
|
|
2604
|
+
protytypeCount: 0
|
|
2605
|
+
});
|
|
2606
|
+
// setTimeout(() => {
|
|
2607
|
+
// that[`inputS${paymode.paymethodId}`].input.input.focus();
|
|
2608
|
+
// }, 535)
|
|
2609
|
+
}
|
|
2610
|
+
return prototypeVisible || protytypeCount;
|
|
2611
|
+
},
|
|
2421
2612
|
onPressEsc: function onPressEsc() {
|
|
2422
2613
|
_keyboard2.default.close();
|
|
2423
2614
|
that.store.bquick && that.props.onCancelSettle && that.props.onCancelSettle();
|
|
@@ -2470,6 +2661,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2470
2661
|
'span',
|
|
2471
2662
|
null,
|
|
2472
2663
|
_react2.default.createElement(_numKeyboard2.default, {
|
|
2664
|
+
id: 'paymentAmount',
|
|
2473
2665
|
className: 'content',
|
|
2474
2666
|
type: 'text',
|
|
2475
2667
|
placeholder: '\u8BF7\u8F93\u5165\u4ED8\u6B3E\u91D1\u989D',
|
|
@@ -2507,6 +2699,27 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2507
2699
|
that.getXianjinBalance(paymode.paymentType, paymode.value)
|
|
2508
2700
|
)
|
|
2509
2701
|
),
|
|
2702
|
+
!isReturn && type !== 1 && _react2.default.createElement(
|
|
2703
|
+
'div',
|
|
2704
|
+
{ className: 'zlje prototype' },
|
|
2705
|
+
_react2.default.createElement(
|
|
2706
|
+
'span',
|
|
2707
|
+
{ className: 'label' },
|
|
2708
|
+
'\u4F18\u60E0\u660E\u7EC6\uFF1A'
|
|
2709
|
+
),
|
|
2710
|
+
_react2.default.createElement(
|
|
2711
|
+
'span',
|
|
2712
|
+
{ className: 'yfje economize' },
|
|
2713
|
+
'\u7701\xA5',
|
|
2714
|
+
discountPrototypeTotalAmount
|
|
2715
|
+
),
|
|
2716
|
+
_react2.default.createElement(
|
|
2717
|
+
'span',
|
|
2718
|
+
{ onClick: that.prototypeDetailedClick, className: 'prototypeDetailed primary-color' },
|
|
2719
|
+
'\u4F18\u60E0\u660E\u7EC6',
|
|
2720
|
+
_react2.default.createElement(_ticon2.default, { type: 'you2' })
|
|
2721
|
+
)
|
|
2722
|
+
),
|
|
2510
2723
|
(paymode.paymentType == PayStyle.wx || paymode.paymentType == PayStyle.zfb || paymode.paymentType == PayStyle.smzf || paymode.paymentType == PayStyle.SQBPAY || paymode.paymentType == PayStyle.CSYH) && _react2.default.createElement(
|
|
2511
2724
|
'div',
|
|
2512
2725
|
{ className: 'contentzf' },
|
|
@@ -2607,7 +2820,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2607
2820
|
setTimeout(function () {
|
|
2608
2821
|
// console.log(that[`inputS${paymode.paymethodId}`].input, '-------------------')
|
|
2609
2822
|
that['inputS' + paymode.paymethodId].input.input.focus();
|
|
2610
|
-
},
|
|
2823
|
+
}, 350);
|
|
2611
2824
|
});
|
|
2612
2825
|
};
|
|
2613
2826
|
|
|
@@ -2616,8 +2829,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2616
2829
|
paymode = _this2$store8.paymode,
|
|
2617
2830
|
newStyle = _this2$store8.newStyle;
|
|
2618
2831
|
|
|
2619
|
-
var _enumController$
|
|
2620
|
-
PayStyle = _enumController$
|
|
2832
|
+
var _enumController$getEn26 = _mutantsUtil.enumController.getEnumOj(),
|
|
2833
|
+
PayStyle = _enumController$getEn26.PayStyle;
|
|
2621
2834
|
|
|
2622
2835
|
var payTypeList = [PayStyle.SQBPAY, PayStyle.CSYH, PayStyle.smzf];
|
|
2623
2836
|
var payTypeFilterList = payTypeList.filter(function (filterType) {
|
|
@@ -2638,15 +2851,15 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2638
2851
|
};
|
|
2639
2852
|
|
|
2640
2853
|
_this2.checkModeDisabled = function (type, brefund, boriginReturn) {
|
|
2641
|
-
var _enumController$
|
|
2642
|
-
PayStyle = _enumController$
|
|
2854
|
+
var _enumController$getEn27 = _mutantsUtil.enumController.getEnumOj(),
|
|
2855
|
+
PayStyle = _enumController$getEn27.PayStyle;
|
|
2643
2856
|
|
|
2644
2857
|
return (brefund && (type == PayStyle.wx || type == PayStyle.zfb || type == PayStyle.smzf || type == PayStyle.jfdx || type == PayStyle.djq || type == PayStyle.SQBPAY || type == PayStyle.CSYH) || boriginReturn && type == PayStyle.hyczk) && !(boriginReturn && (type == PayStyle.wx || type == PayStyle.zfb)) || _this2.checkCurrentModeHaveMutex(type);
|
|
2645
2858
|
};
|
|
2646
2859
|
|
|
2647
2860
|
_this2.checkSettleDisabled = function (paymode, thePaymodes) {
|
|
2648
|
-
var _enumController$
|
|
2649
|
-
PayStyle = _enumController$
|
|
2861
|
+
var _enumController$getEn28 = _mutantsUtil.enumController.getEnumOj(),
|
|
2862
|
+
PayStyle = _enumController$getEn28.PayStyle;
|
|
2650
2863
|
|
|
2651
2864
|
console.log("settlement.checkSettleDisabled开始执行,参数:", { paymode: paymode, thePaymodes: thePaymodes });
|
|
2652
2865
|
if (paymode.amount == 0 && paymode.received == 0) {
|
|
@@ -2692,8 +2905,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2692
2905
|
};
|
|
2693
2906
|
|
|
2694
2907
|
_this2.editCzkModal = function () {
|
|
2695
|
-
var _enumController$
|
|
2696
|
-
PayStyle = _enumController$
|
|
2908
|
+
var _enumController$getEn29 = _mutantsUtil.enumController.getEnumOj(),
|
|
2909
|
+
PayStyle = _enumController$getEn29.PayStyle;
|
|
2697
2910
|
|
|
2698
2911
|
(0, _find3.default)(_this2.store.paymode.thePaymodes, function (mode) {
|
|
2699
2912
|
if (mode.paymentType == PayStyle.hyczk) {
|
|
@@ -2744,6 +2957,41 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2744
2957
|
);
|
|
2745
2958
|
};
|
|
2746
2959
|
|
|
2960
|
+
_this2.prototypeDetailedClick = function () {
|
|
2961
|
+
_this2.handleShowPrototype();
|
|
2962
|
+
_this2.setState({
|
|
2963
|
+
prototypeVisible: true,
|
|
2964
|
+
isPrototypeClick: true
|
|
2965
|
+
});
|
|
2966
|
+
};
|
|
2967
|
+
|
|
2968
|
+
_this2.handleprototypeCancel = function () {
|
|
2969
|
+
_this2.setState({
|
|
2970
|
+
prototypeVisible: false,
|
|
2971
|
+
protytypeCount: 1,
|
|
2972
|
+
isPrototypeClick: false
|
|
2973
|
+
});
|
|
2974
|
+
var that = _this2;
|
|
2975
|
+
var _this2$state2 = _this2.state,
|
|
2976
|
+
bquick = _this2$state2.bquick,
|
|
2977
|
+
isPrototypeClick = _this2$state2.isPrototypeClick;
|
|
2978
|
+
|
|
2979
|
+
if (!isPrototypeClick) {
|
|
2980
|
+
if (bquick) {
|
|
2981
|
+
setTimeout(function () {
|
|
2982
|
+
_this2.payQuick();
|
|
2983
|
+
}, 100);
|
|
2984
|
+
} else {
|
|
2985
|
+
_this2.payFun();
|
|
2986
|
+
}
|
|
2987
|
+
} else {
|
|
2988
|
+
setTimeout(function () {
|
|
2989
|
+
var input = document.getElementById('paymentAmount');
|
|
2990
|
+
input && input.select();
|
|
2991
|
+
}, 700);
|
|
2992
|
+
}
|
|
2993
|
+
};
|
|
2994
|
+
|
|
2747
2995
|
_this2.hasElectron = hasElectron;
|
|
2748
2996
|
|
|
2749
2997
|
var _ref22 = _mutantsMicrofx.localStore.get('user') || {},
|
|
@@ -2906,9 +3154,9 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2906
3154
|
value: function renderToolbtn(mode, index) {
|
|
2907
3155
|
var _this7 = this;
|
|
2908
3156
|
|
|
2909
|
-
var _enumController$
|
|
2910
|
-
PayIcon = _enumController$
|
|
2911
|
-
PayStyle = _enumController$
|
|
3157
|
+
var _enumController$getEn30 = _mutantsUtil.enumController.getEnumOj(),
|
|
3158
|
+
PayIcon = _enumController$getEn30.PayIcon,
|
|
3159
|
+
PayStyle = _enumController$getEn30.PayStyle;
|
|
2912
3160
|
|
|
2913
3161
|
var isReturn = this.props.isReturn;
|
|
2914
3162
|
var _store = this.store,
|
|
@@ -2980,13 +3228,18 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2980
3228
|
value: function render() {
|
|
2981
3229
|
var _this8 = this;
|
|
2982
3230
|
|
|
2983
|
-
var _enumController$
|
|
2984
|
-
PayIcon = _enumController$
|
|
2985
|
-
PayIcon2 = _enumController$
|
|
2986
|
-
PayStyle = _enumController$
|
|
2987
|
-
Differentiate = _enumController$
|
|
3231
|
+
var _enumController$getEn31 = _mutantsUtil.enumController.getEnumOj(),
|
|
3232
|
+
PayIcon = _enumController$getEn31.PayIcon,
|
|
3233
|
+
PayIcon2 = _enumController$getEn31.PayIcon2,
|
|
3234
|
+
PayStyle = _enumController$getEn31.PayStyle,
|
|
3235
|
+
Differentiate = _enumController$getEn31.Differentiate;
|
|
2988
3236
|
|
|
2989
|
-
var
|
|
3237
|
+
var _state2 = this.state,
|
|
3238
|
+
btnDissabled = _state2.btnDissabled,
|
|
3239
|
+
dataSource = _state2.dataSource,
|
|
3240
|
+
discountTotalAmount = _state2.discountTotalAmount,
|
|
3241
|
+
discountRetailTotalAount = _state2.discountRetailTotalAount,
|
|
3242
|
+
discountPrototypeTotalAmount = _state2.discountPrototypeTotalAmount;
|
|
2990
3243
|
|
|
2991
3244
|
var _ref24 = _mutantsUtil.platform || {},
|
|
2992
3245
|
isNewRetailBCPos = _ref24.isNewRetailBCPos;
|
|
@@ -3073,6 +3326,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3073
3326
|
}
|
|
3074
3327
|
sumQuantity = this.changeDecimalBuZero(sumQuantity, quantityPrecision);
|
|
3075
3328
|
}
|
|
3329
|
+
|
|
3330
|
+
var isNeedPasswordForStoragePay = (0, _tplusPoslogin.PosInitData)('IsNeedPasswordForStoragePay');
|
|
3076
3331
|
return _react2.default.createElement(
|
|
3077
3332
|
'div',
|
|
3078
3333
|
{ className: 'billingSettlement', ref: function ref(r) {
|
|
@@ -3313,6 +3568,14 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3313
3568
|
return _this8.handleChange(index, e);
|
|
3314
3569
|
}
|
|
3315
3570
|
})
|
|
3571
|
+
),
|
|
3572
|
+
!isNeedPasswordForStoragePay && _react2.default.createElement(
|
|
3573
|
+
'div',
|
|
3574
|
+
{ className: 'righticon', style: { display: mode.paymentType == PayStyle.hyczk ? 'inline-block' : 'none' },
|
|
3575
|
+
onClick: function onClick() {
|
|
3576
|
+
_this8.appendCzkmode(boriginReturn, 'noPlaySetPwd');
|
|
3577
|
+
} },
|
|
3578
|
+
_react2.default.createElement(_ticon2.default, { type: 'zengjia', className: 'plus primary-color' })
|
|
3316
3579
|
)
|
|
3317
3580
|
),
|
|
3318
3581
|
mode.paymentType == PayStyle.djq ? _react2.default.createElement(
|
|
@@ -3433,6 +3696,12 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3433
3696
|
)
|
|
3434
3697
|
)
|
|
3435
3698
|
),
|
|
3699
|
+
!isReturn && _react2.default.createElement(
|
|
3700
|
+
'div',
|
|
3701
|
+
{ onClick: this.prototypeDetailedClick, className: 'prototypeDetailed primary-color' },
|
|
3702
|
+
'\u4F18\u60E0\u660E\u7EC6',
|
|
3703
|
+
_react2.default.createElement(_ticon2.default, { type: 'shouqi1' })
|
|
3704
|
+
),
|
|
3436
3705
|
_react2.default.createElement(
|
|
3437
3706
|
'div',
|
|
3438
3707
|
{ className: this.isHorizontalPad ? 'keyboard_ios' : 'keyboard' },
|
|
@@ -3561,6 +3830,12 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3561
3830
|
(0, _utils.getFixedNumber)(Math.abs(paymode.receivable))
|
|
3562
3831
|
)
|
|
3563
3832
|
)
|
|
3833
|
+
),
|
|
3834
|
+
!isReturn && _react2.default.createElement(
|
|
3835
|
+
'div',
|
|
3836
|
+
{ onClick: this.prototypeDetailedClick, className: 'prototypeDetailed primary-color' },
|
|
3837
|
+
'\u4F18\u60E0\u660E\u7EC6',
|
|
3838
|
+
_react2.default.createElement(_ticon2.default, { type: 'shouqi1' })
|
|
3564
3839
|
)
|
|
3565
3840
|
),
|
|
3566
3841
|
_react2.default.createElement(
|
|
@@ -3627,8 +3902,16 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3627
3902
|
className: _index.hotKey.hotKeyNotFilter("paymode hotkey_" + _this8.compoundHotkeysList[hotkeyIndex]),
|
|
3628
3903
|
disabled: _this8.checkModeDisabled(mode.paymentType, brefund, boriginReturn),
|
|
3629
3904
|
onClick: function onClick() {
|
|
3630
|
-
|
|
3631
|
-
mode.paymentType
|
|
3905
|
+
// let czkinput = document.getElementById('inputS' + index);
|
|
3906
|
+
// if (mode.paymentType === PayStyle.hyczk) {
|
|
3907
|
+
// const { isProhibitMeStorageCard } = this.props;
|
|
3908
|
+
// if (isProhibitMeStorageCard) {
|
|
3909
|
+
// Message.warn('储值卡不可键盘录入,请刷卡!');
|
|
3910
|
+
// return;
|
|
3911
|
+
// }
|
|
3912
|
+
// }
|
|
3913
|
+
// mode.paymentType == PayStyle.hyczk && czkinput && czkinput.value !== '0.00' ? this.editCzkModal() :
|
|
3914
|
+
_this8.onHotKeyClick1(mode, index, boriginReturn);
|
|
3632
3915
|
},
|
|
3633
3916
|
value: mode.paymentType == PayStyle.hyczk ? (0, _utils.getFixedNumber)((0, _reduce3.default)((0, _filter3.default)(thePaymodes, function (tm) {
|
|
3634
3917
|
return tm.paymentType == PayStyle.hyczk;
|
|
@@ -3882,6 +4165,14 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3882
4165
|
return _this8.onFocusHack(index, mode, paymode, e);
|
|
3883
4166
|
}
|
|
3884
4167
|
})
|
|
4168
|
+
),
|
|
4169
|
+
!isNeedPasswordForStoragePay && _react2.default.createElement(
|
|
4170
|
+
'div',
|
|
4171
|
+
{ className: 'righticon', style: { display: mode.paymentType == PayStyle.hyczk ? 'inline-block' : 'none' },
|
|
4172
|
+
onClick: function onClick() {
|
|
4173
|
+
_this8.appendCzkmode('', 'noPlaySetPwd');
|
|
4174
|
+
} },
|
|
4175
|
+
_react2.default.createElement(_ticon2.default, { type: 'zengjia', className: 'plus primary-color' })
|
|
3885
4176
|
)
|
|
3886
4177
|
),
|
|
3887
4178
|
mode.paymentType == PayStyle.djq ? _react2.default.createElement(
|
|
@@ -4329,8 +4620,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4329
4620
|
type: 'text',
|
|
4330
4621
|
placeholder: '\u8BF7\u626B\u63CF\u6216\u8F93\u5165\u4F59\u989D\u5361'
|
|
4331
4622
|
// disabled={currentMode && !currentMode.member.StorageCardNo && isReturn ? true: false}
|
|
4332
|
-
,
|
|
4333
|
-
className: 'input ' + (this.hasElectron === true && this.iCCardServer === 1 || this.isHorizontalPad === true ? 'temp' : ''),
|
|
4623
|
+
, className: 'input ' + (this.hasElectron === true && this.iCCardServer === 1 || this.isHorizontalPad === true ? 'temp' : ''),
|
|
4334
4624
|
onChange: function onChange(e) {
|
|
4335
4625
|
return _this8.onCzkChange(e.target.value);
|
|
4336
4626
|
},
|
|
@@ -4345,7 +4635,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4345
4635
|
},
|
|
4346
4636
|
onFocus: function onFocus(e) {
|
|
4347
4637
|
_this8.inputTarget = _this8.czkInput.input;
|
|
4348
|
-
_keyboard2.default.open(function (v) {
|
|
4638
|
+
!_this8.state.prototypeVisible && _keyboard2.default.open(function (v) {
|
|
4349
4639
|
var value = _keyboard2.default.getNewValue(_this8.inputTarget, _this8.inputTarget.value, v);
|
|
4350
4640
|
_this8.onCzkChange(value);
|
|
4351
4641
|
}, _this8.czkKeyboardOnOk, _this8.czkKeyboardOnClose)();
|
|
@@ -4389,6 +4679,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4389
4679
|
'span',
|
|
4390
4680
|
null,
|
|
4391
4681
|
_react2.default.createElement(_input2.default, {
|
|
4682
|
+
id: 'paymentAmount',
|
|
4392
4683
|
type: 'text',
|
|
4393
4684
|
className: _index.hotKey.hotKeyNotFilter('input'),
|
|
4394
4685
|
onChange: function onChange(event) {
|
|
@@ -4406,12 +4697,38 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4406
4697
|
}, _this8.keyboardOnOk, _this8.keyboardOnClose)();
|
|
4407
4698
|
},
|
|
4408
4699
|
onBlur: function onBlur(e) {
|
|
4700
|
+
var sMember = _this8.store.member;
|
|
4701
|
+
if (!sMember.StorageCardEnable) {
|
|
4702
|
+
_message2.default.warn("该储值卡已停用");
|
|
4703
|
+
return;
|
|
4704
|
+
}
|
|
4409
4705
|
_keyboard2.default.close();
|
|
4410
4706
|
_this8.setCurrentModeValue((0, _utils.getFixedNumber)(_this8.inputCzkAmount.input.value), Math.min(currentMode.maxamount, currentMode.member.balance));
|
|
4411
4707
|
}
|
|
4412
4708
|
})
|
|
4413
4709
|
)
|
|
4414
4710
|
),
|
|
4711
|
+
!isReturn && _react2.default.createElement(
|
|
4712
|
+
'div',
|
|
4713
|
+
{ className: 'received' },
|
|
4714
|
+
_react2.default.createElement(
|
|
4715
|
+
'span',
|
|
4716
|
+
{ className: 'label' },
|
|
4717
|
+
'\u4F18\u60E0\u660E\u7EC6\uFF1A'
|
|
4718
|
+
),
|
|
4719
|
+
_react2.default.createElement(
|
|
4720
|
+
'span',
|
|
4721
|
+
{ className: 'yfje economize' },
|
|
4722
|
+
'\u7701\xA5',
|
|
4723
|
+
discountPrototypeTotalAmount
|
|
4724
|
+
),
|
|
4725
|
+
_react2.default.createElement(
|
|
4726
|
+
'span',
|
|
4727
|
+
{ onClick: this.prototypeDetailedClick, className: 'prototypeDetailed primary-color' },
|
|
4728
|
+
'\u4F18\u60E0\u660E\u7EC6',
|
|
4729
|
+
_react2.default.createElement(_ticon2.default, { type: 'you2' })
|
|
4730
|
+
)
|
|
4731
|
+
),
|
|
4415
4732
|
_react2.default.createElement(
|
|
4416
4733
|
'div',
|
|
4417
4734
|
{ className: 'error' },
|
|
@@ -4983,7 +5300,10 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4983
5300
|
currentMode && currentMode.errinfo
|
|
4984
5301
|
)
|
|
4985
5302
|
)
|
|
4986
|
-
)
|
|
5303
|
+
),
|
|
5304
|
+
_react2.default.createElement(_index3.default, { discount: {
|
|
5305
|
+
discountTotalAmount: discountTotalAmount, discountRetailTotalAount: discountRetailTotalAount, discountPrototypeTotalAmount: discountPrototypeTotalAmount
|
|
5306
|
+
}, handleprototypeCancel: this.handleprototypeCancel, isHorizontalPad: this.isHorizontalPad, dataSource: dataSource, prototypeVisible: this.state.prototypeVisible })
|
|
4987
5307
|
);
|
|
4988
5308
|
}
|
|
4989
5309
|
}]);
|