tplus-components-touch 3.17.9 → 3.17.13
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/README.md +16 -16
- package/dist/components/acCitySelect/CitySelect.js +18 -18
- package/dist/components/acCitySelect/CitySelect.js.map +1 -1
- package/dist/components/acCitySelect/CitySelect.less +9 -9
- package/dist/components/acCitySelect/citys.js.map +1 -1
- package/dist/components/acCitySelect/index.js.map +1 -1
- package/dist/components/acCitySelect/provinceData.js +7 -7
- package/dist/components/acCitySelect/provinceData.js.map +1 -1
- package/dist/components/addLog/AddLogProcessor.js +7 -11
- package/dist/components/addLog/AddLogProcessor.js.map +1 -1
- package/dist/components/addLog/OperationLogApi.js +9 -48
- package/dist/components/addLog/OperationLogApi.js.map +1 -1
- package/dist/components/autoComplete/index.js +14 -14
- package/dist/components/autoComplete/index.js.map +1 -1
- package/dist/components/autoComplete/index.less +89 -89
- package/dist/components/autoComplete/option.js.map +1 -1
- package/dist/components/autoCompleteWithKeyboard/index.js +14 -14
- package/dist/components/autoCompleteWithKeyboard/index.js.map +1 -1
- package/dist/components/autoCompleteWithKeyboard/index.less +7 -7
- package/dist/components/billSearch/api.js +29 -29
- package/dist/components/billSearch/api.js.map +1 -1
- package/dist/components/billSearch/index.js +6 -6
- package/dist/components/billSearch/index.js.map +1 -1
- package/dist/components/billSearch/index.less +363 -363
- package/dist/components/cloudPrint/BTPrintFormatUtil.js +17 -17
- package/dist/components/cloudPrint/BTPrintFormatUtil.js.map +1 -1
- package/dist/components/cloudPrint/api.js.map +1 -1
- package/dist/components/cloudPrint/index.js.map +1 -1
- package/dist/components/commonForm/addressPicker/index.js +7 -7
- package/dist/components/commonForm/addressPicker/index.js.map +1 -1
- package/dist/components/commonForm/addressPicker/style.less +10 -10
- package/dist/components/commonForm/autoComplete/index.js.map +1 -1
- package/dist/components/commonForm/autoComplete/style.less +2 -2
- package/dist/components/commonForm/datePicker/index.js.map +1 -1
- package/dist/components/commonForm/datePicker/style.less +4 -4
- package/dist/components/commonForm/formControl/index.js.map +1 -1
- package/dist/components/commonForm/index.js +4 -4
- package/dist/components/commonForm/index.js.map +1 -1
- package/dist/components/commonForm/inputNumber/index.js.map +1 -1
- package/dist/components/commonForm/inputNumber/style.less +10 -10
- package/dist/components/commonForm/radio/index.js.map +1 -1
- package/dist/components/commonForm/style.less +1 -1
- package/dist/components/deliverySearch/api.js +21 -21
- package/dist/components/deliverySearch/api.js.map +1 -1
- package/dist/components/deliverySearch/index.js +6 -6
- package/dist/components/deliverySearch/index.js.map +1 -1
- package/dist/components/deliverySearch/index.less +553 -553
- package/dist/components/form/index.js.map +1 -1
- package/dist/components/hardwareAPI/index.js.map +1 -1
- package/dist/components/hotKey/config.js +23 -23
- package/dist/components/hotKey/config.js.map +1 -1
- package/dist/components/hotKey/hotKeyModal.js.map +1 -1
- package/dist/components/hotKey/index.js +26 -26
- package/dist/components/hotKey/index.js.map +1 -1
- package/dist/components/hotKey/localConfig.js.map +1 -1
- package/dist/components/hotKey/style.less +96 -96
- package/dist/components/hotKey/utils.js.map +1 -1
- package/dist/components/input/index.js +6 -6
- package/dist/components/input/index.js.map +1 -1
- package/dist/components/input/style.less +99 -99
- package/dist/components/input/tplusInput/index.js +30 -30
- package/dist/components/input/tplusInput/index.js.map +1 -1
- package/dist/components/input/tplusInput/inputContent.js.map +1 -1
- package/dist/components/input/tplusInput/inputs.js.map +1 -1
- package/dist/components/input/tplusInput/style.less +132 -132
- package/dist/components/input/utils/index.js.map +1 -1
- package/dist/components/inventorySearch/api.js +58 -58
- package/dist/components/inventorySearch/api.js.map +1 -1
- package/dist/components/inventorySearch/index.js +15 -6
- package/dist/components/inventorySearch/index.js.map +1 -1
- package/dist/components/inventorySearch/index.less +119 -115
- package/dist/components/inventorySearch/store.js.map +1 -1
- package/dist/components/inventorySearch/tab.js.map +1 -1
- package/dist/components/keyboard/index.js.map +1 -1
- package/dist/components/keyboard/index.less +469 -469
- package/dist/components/keyboard/letterKeyboard.js +2 -2
- package/dist/components/keyboard/letterKeyboard.js.map +1 -1
- package/dist/components/keyboard/numKeyboard.js +4 -4
- package/dist/components/keyboard/numKeyboard.js.map +1 -1
- package/dist/components/keyboard/numKeyboardScan.js.map +1 -1
- package/dist/components/keyboard/numberButton_input.js +5 -5
- package/dist/components/keyboard/numberButton_input.js.map +1 -1
- package/dist/components/keyboard/numkeyboardPassword.js +4 -4
- package/dist/components/keyboard/numkeyboardPassword.js.map +1 -1
- package/dist/components/keyboard/onlyKeyboard.js +7 -7
- package/dist/components/keyboard/onlyKeyboard.js.map +1 -1
- package/dist/components/keyboard/onlyLetterButton.js +2 -2
- package/dist/components/keyboard/onlyLetterButton.js.map +1 -1
- package/dist/components/keyboard/onlyLetterButton2.js +2 -2
- package/dist/components/keyboard/onlyLetterButton2.js.map +1 -1
- package/dist/components/keyboard/onlyLetterButton2.less +161 -161
- package/dist/components/keyboard/onlyNumberButton.js +2 -2
- package/dist/components/keyboard/onlyNumberButton.js.map +1 -1
- package/dist/components/keyboard/onlyNumberButton2.js +3 -3
- package/dist/components/keyboard/onlyNumberButton2.js.map +1 -1
- package/dist/components/keyboard/textKeyboard.js.map +1 -1
- package/dist/components/layout/hamburger.js.map +1 -1
- package/dist/components/layout/index.js +10 -10
- package/dist/components/layout/index.js.map +1 -1
- package/dist/components/layout/layout.js.map +1 -1
- package/dist/components/layout/sider.js +12 -12
- package/dist/components/layout/sider.js.map +1 -1
- package/dist/components/layout/style.less +82 -82
- package/dist/components/loading/index.js +15 -15
- package/dist/components/loading/index.js.map +1 -1
- package/dist/components/loading/loadingContent.js.map +1 -1
- package/dist/components/loading/style.less +61 -61
- package/dist/components/loading/utils.js.map +1 -1
- package/dist/components/message/index.js +8 -8
- package/dist/components/message/index.js.map +1 -1
- package/dist/components/message/index.less +101 -101
- package/dist/components/modal/index.js.map +1 -1
- package/dist/components/modal/index.less +19 -19
- package/dist/components/modalVertical/index.js +7 -7
- package/dist/components/modalVertical/index.js.map +1 -1
- package/dist/components/modalVertical/style.less +60 -60
- package/dist/components/modalWraper/index.js +15 -15
- package/dist/components/modalWraper/index.js.map +1 -1
- package/dist/components/modalWraper/style.less +251 -251
- package/dist/components/modalWraper/utils.js.map +1 -1
- package/dist/components/notification/index.js +4 -4
- package/dist/components/notification/index.js.map +1 -1
- package/dist/components/notification/index.less +51 -51
- package/dist/components/overflowTip/index.js +15 -15
- package/dist/components/overflowTip/index.js.map +1 -1
- package/dist/components/overflowTip/style.less +66 -66
- package/dist/components/page/index.js.map +1 -1
- package/dist/components/page/index.less +21 -21
- package/dist/components/product/detail.js +7 -7
- package/dist/components/product/detail.js.map +1 -1
- package/dist/components/product/getCard.js +5 -5
- package/dist/components/product/getCard.js.map +1 -1
- package/dist/components/product/index.less +128 -128
- package/dist/components/progressState/EmptyAndErrorView.js.map +1 -1
- package/dist/components/progressState/ProgressState.js +10 -10
- package/dist/components/progressState/ProgressState.js.map +1 -1
- package/dist/components/progressState/index.js.map +1 -1
- package/dist/components/progressState/style.less +65 -65
- package/dist/components/scan/index.js.map +1 -1
- package/dist/components/scan/index.less +33 -33
- package/dist/components/select/index.js.map +1 -1
- package/dist/components/select/index.less +11 -11
- package/dist/components/settlement/asyncModal.js +4 -0
- package/dist/components/settlement/asyncModal.js.map +1 -1
- package/dist/components/settlement/index.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 +391 -110
- package/dist/components/settlement/settlement.js.map +1 -1
- package/dist/components/settlement/settlement.less +1519 -1474
- package/dist/components/settlement/settlementStore.js.map +1 -1
- package/dist/components/settlement/utils.js.map +1 -1
- package/dist/components/socket/index.js +11 -11
- package/dist/components/socket/index.js.map +1 -1
- package/dist/components/spin/index.js +6 -6
- package/dist/components/spin/index.js.map +1 -1
- package/dist/components/spin/spin-style.less +436 -436
- package/dist/components/test/index.js +3 -3
- package/dist/components/test/index.js.map +1 -1
- package/dist/components/ticon/iconfont/demo.css +539 -539
- package/dist/components/ticon/iconfont/demo_index.html +5041 -4926
- package/dist/components/ticon/iconfont/iconfont.css +859 -839
- package/dist/components/ticon/iconfont/iconfont.js +4 -4
- package/dist/components/ticon/iconfont/iconfont.js.map +1 -1
- package/dist/components/ticon/iconfont/iconfont.json +1486 -1451
- 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/ticon/index.js.map +1 -1
- package/dist/components/touchScroll/index.js +9 -9
- package/dist/components/touchScroll/index.js.map +1 -1
- package/dist/components/touchTable/AuthProcess.js.map +1 -1
- package/dist/components/touchTable/generateWater.js.map +1 -1
- package/dist/components/touchTable/index.js +9 -9
- package/dist/components/touchTable/index.js.map +1 -1
- package/dist/components/touchTable/index.less +369 -369
- package/dist/components/touchTable/utils.js.map +1 -1
- package/dist/demo/PopOverDemo.js.map +1 -1
- package/dist/index.js +7 -7
- package/dist/index.js.map +1 -1
- package/dist/util/tools.js.map +1 -1
- package/locales/zh/tplus-components-touch.json +1 -1
- package/locales/zh-CN/tplus-components-touch.json +1 -1
- package/mocks/memberInfo.json +79 -79
- package/package.json +1 -1
- package/tsconfig.json +26 -26
|
@@ -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,113 @@ 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.PromotionDetails && item.PromotionDetails.length > 0) {
|
|
435
|
+
item.badge = { text: '促', position: 'leftTop', className: '' };
|
|
436
|
+
} else {
|
|
437
|
+
item.badge = { text: '', position: '', className: '' };
|
|
438
|
+
}
|
|
439
|
+
if (!item.IsPresent) {
|
|
440
|
+
discountRetailTotalAount += item.RetailPrice * item.Quantity;
|
|
441
|
+
}
|
|
442
|
+
if (item.PromotionDetails && item.PromotionDetails.length > 0) {
|
|
443
|
+
count++;
|
|
444
|
+
}
|
|
445
|
+
item.InventoryName = item.Inventory.Name;
|
|
446
|
+
item.Discount = (0, _utils.getRoundValue)(item.RetailPrice - item.TaxPrice, pricePrecision);
|
|
447
|
+
item.TotalDiscount = (0, _utils.getFixedNumber)(item.Discount * item.Quantity);
|
|
448
|
+
item.nAmount = (0, _utils.getFixedNumber)(item.TaxAmount);
|
|
449
|
+
item.UnitName = item.Unit.Name;
|
|
450
|
+
item.nQuantity = (0, _utils.getRoundValue)(item.Quantity, quantityPrecision);
|
|
451
|
+
item.nTaxPrice = (0, _utils.getRoundValue)(item.TaxPrice, pricePrecision);
|
|
452
|
+
item.nRetailPrice = (0, _utils.getRoundValue)(item.RetailPrice, pricePrecision);
|
|
453
|
+
});
|
|
454
|
+
_this2.setState({
|
|
455
|
+
dataSource: dataSource,
|
|
456
|
+
discountTotalAmount: (0, _utils.getFixedNumber)(TotalTaxAmount),
|
|
457
|
+
discountRetailTotalAount: (0, _utils.getFixedNumber)(discountRetailTotalAount),
|
|
458
|
+
discountPrototypeTotalAmount: (0, _utils.getFixedNumber)(discountRetailTotalAount - TotalTaxAmount)
|
|
459
|
+
});
|
|
460
|
+
console.log(RetailDetails, 'RetailDetails-----');
|
|
461
|
+
return count;
|
|
462
|
+
};
|
|
463
|
+
|
|
329
464
|
_this2.showModal = function () {
|
|
465
|
+
var _this2$props2 = _this2.props,
|
|
466
|
+
isReturn = _this2$props2.isReturn,
|
|
467
|
+
type = _this2$props2.type;
|
|
468
|
+
|
|
469
|
+
var isAutoShowCouponWhenCash = (0, _tplusPoslogin.PosInitData)('IsAutoShowCouponWhenCash');
|
|
330
470
|
// 支持异步验证过程
|
|
331
471
|
_promise2.default.resolve(!_this2.props.onValidate || _this2.props.onValidate()).then(function (result) {
|
|
332
472
|
if (result) {
|
|
333
473
|
_this2.setState({
|
|
334
474
|
settleDisabled: false
|
|
335
475
|
});
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
476
|
+
if (type !== 1) {
|
|
477
|
+
var count = _this2.handleShowPrototype();
|
|
478
|
+
if (!isReturn && isAutoShowCouponWhenCash && count > 0) {
|
|
479
|
+
_this2.setState({
|
|
480
|
+
prototypeVisible: true
|
|
481
|
+
});
|
|
482
|
+
} else {
|
|
483
|
+
_this2.payFun();
|
|
484
|
+
}
|
|
485
|
+
} else {
|
|
486
|
+
_this2.payFun();
|
|
341
487
|
}
|
|
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
488
|
}
|
|
360
489
|
});
|
|
361
490
|
};
|
|
@@ -439,6 +568,10 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
439
568
|
var isReturn = _this2.props.isReturn;
|
|
440
569
|
|
|
441
570
|
var sMember = _this2.store.member;
|
|
571
|
+
if (!sMember.StorageCardEnable) {
|
|
572
|
+
_message2.default.warn("该储值卡已停用");
|
|
573
|
+
return;
|
|
574
|
+
}
|
|
442
575
|
if (sMember && sMember.ID) {
|
|
443
576
|
// noPlaySetPwd 点击结算方式设置密码,点加号不设置
|
|
444
577
|
if (!sMember.WalletEnabled && params !== 'noPlaySetPwd' && !isReturn) {
|
|
@@ -477,7 +610,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
477
610
|
_this2.inputCzkAmount.input.setSelectionRange(0, _this2.inputCzkAmount.input.value.length);
|
|
478
611
|
}
|
|
479
612
|
}
|
|
480
|
-
},
|
|
613
|
+
}, 500);
|
|
481
614
|
_this2.connectRfCard();
|
|
482
615
|
};
|
|
483
616
|
|
|
@@ -801,11 +934,9 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
801
934
|
var _ref8 = paymode || {},
|
|
802
935
|
paymodes = _ref8.paymodes;
|
|
803
936
|
|
|
804
|
-
var
|
|
805
|
-
offlineStatus = _stores$offlineSys.offlineStatus,
|
|
806
|
-
OFFLINE_STATUS = _stores$offlineSys.OFFLINE_STATUS;
|
|
937
|
+
var isOffline = _mutantsMicrofx.stores.offlineSys.isOffline;
|
|
807
938
|
|
|
808
|
-
if (
|
|
939
|
+
if (isOffline) {
|
|
809
940
|
if (paymodes) {
|
|
810
941
|
var currentPayMode = paymodes.find(function (item) {
|
|
811
942
|
return item.paymentType === key;
|
|
@@ -830,7 +961,6 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
830
961
|
Differentiate = _enumController$getEn7.Differentiate;
|
|
831
962
|
|
|
832
963
|
paymode.currentMode = null;
|
|
833
|
-
if (!_mutantsMicrofx.stores.offlineSys.shouldSettlement(key)) return false;
|
|
834
964
|
switch (key) {
|
|
835
965
|
case PayStyle.hyczk:
|
|
836
966
|
_this2.showCzkModal(-1);
|
|
@@ -921,7 +1051,20 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
921
1051
|
|
|
922
1052
|
_this2.onTabsClick = function (key) {
|
|
923
1053
|
var _enumController$getEn9 = _mutantsUtil.enumController.getEnumOj(),
|
|
924
|
-
|
|
1054
|
+
PayStyle = _enumController$getEn9.PayStyle,
|
|
1055
|
+
Differentiate = _enumController$getEn9.Differentiate;
|
|
1056
|
+
|
|
1057
|
+
if (key === PayStyle.hyczk) {
|
|
1058
|
+
var isProhibitMeStorageCard = _this2.props.isProhibitMeStorageCard;
|
|
1059
|
+
|
|
1060
|
+
if (isProhibitMeStorageCard) {
|
|
1061
|
+
_message2.default.warn('储值卡不可键盘录入,请刷卡!');
|
|
1062
|
+
return;
|
|
1063
|
+
}
|
|
1064
|
+
}
|
|
1065
|
+
|
|
1066
|
+
var _enumController$getEn10 = _mutantsUtil.enumController.getEnumOj(),
|
|
1067
|
+
MultiPay = _enumController$getEn10.MultiPay;
|
|
925
1068
|
|
|
926
1069
|
var _this2$store3 = _this2.store,
|
|
927
1070
|
paymode = _this2$store3.paymode,
|
|
@@ -983,8 +1126,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
983
1126
|
_this2.editModal = function (id, type, boriginReturn) {
|
|
984
1127
|
_this2.setState({ currentIndex: id });
|
|
985
1128
|
|
|
986
|
-
var _enumController$
|
|
987
|
-
PayStyle = _enumController$
|
|
1129
|
+
var _enumController$getEn11 = _mutantsUtil.enumController.getEnumOj(),
|
|
1130
|
+
PayStyle = _enumController$getEn11.PayStyle;
|
|
988
1131
|
|
|
989
1132
|
switch (type) {
|
|
990
1133
|
case PayStyle.hyczk:
|
|
@@ -1009,8 +1152,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1009
1152
|
};
|
|
1010
1153
|
|
|
1011
1154
|
_this2.onDelPay = function (index, boriginReturn, type) {
|
|
1012
|
-
var _enumController$
|
|
1013
|
-
PayStyle = _enumController$
|
|
1155
|
+
var _enumController$getEn12 = _mutantsUtil.enumController.getEnumOj(),
|
|
1156
|
+
PayStyle = _enumController$getEn12.PayStyle;
|
|
1014
1157
|
|
|
1015
1158
|
if (boriginReturn && (type == PayStyle.hyczk || type == PayStyle.djq || type == PayStyle.jfdx)) {
|
|
1016
1159
|
_message2.default.info('原单退货时,该结算方式不可以删除。');
|
|
@@ -1072,8 +1215,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1072
1215
|
};
|
|
1073
1216
|
|
|
1074
1217
|
_this2.appendCzkmode = function (boriginReturn, params) {
|
|
1075
|
-
var _enumController$
|
|
1076
|
-
PayStyle = _enumController$
|
|
1218
|
+
var _enumController$getEn13 = _mutantsUtil.enumController.getEnumOj(),
|
|
1219
|
+
PayStyle = _enumController$getEn13.PayStyle;
|
|
1077
1220
|
|
|
1078
1221
|
if (boriginReturn) {
|
|
1079
1222
|
_message2.default.info('原单退货时不可以使用非原单的储值卡结算方式。');
|
|
@@ -1094,8 +1237,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1094
1237
|
};
|
|
1095
1238
|
|
|
1096
1239
|
_this2.djqChecked = function (q) {
|
|
1097
|
-
var _enumController$
|
|
1098
|
-
Differentiate = _enumController$
|
|
1240
|
+
var _enumController$getEn14 = _mutantsUtil.enumController.getEnumOj(),
|
|
1241
|
+
Differentiate = _enumController$getEn14.Differentiate;
|
|
1099
1242
|
|
|
1100
1243
|
if (_this2.store.paymode.currentMode.boriginReturn) {
|
|
1101
1244
|
_message2.default.info('\u539F\u5355\u9000\u8D27\u65F6' + Differentiate.COUPON + '\u4E0D\u53EF\u4EE5\u53D6\u6D88\u3002');
|
|
@@ -1137,6 +1280,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1137
1280
|
};
|
|
1138
1281
|
|
|
1139
1282
|
_this2.onHotKeyClick1 = function (mode, index, boriginReturn) {
|
|
1283
|
+
if (!_mutantsMicrofx.stores.offlineSys.shouldSettlement(mode.paymentType)) return false;
|
|
1140
1284
|
if (_this2.hotkeydebouncedPayMode == mode) {
|
|
1141
1285
|
return;
|
|
1142
1286
|
}
|
|
@@ -1160,8 +1304,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1160
1304
|
};
|
|
1161
1305
|
|
|
1162
1306
|
_this2.onHotKeyClickModal = function (mode, index, boriginReturn) {
|
|
1163
|
-
var _enumController$
|
|
1164
|
-
PayStyle = _enumController$
|
|
1307
|
+
var _enumController$getEn15 = _mutantsUtil.enumController.getEnumOj(),
|
|
1308
|
+
PayStyle = _enumController$getEn15.PayStyle;
|
|
1165
1309
|
|
|
1166
1310
|
var brefund = _this2.store.brefund;
|
|
1167
1311
|
|
|
@@ -1230,7 +1374,6 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1230
1374
|
thePaymodes.forEach(function (paymodes, index) {
|
|
1231
1375
|
if (paymodes.paymethodId == _this2.state.currentIndex) payIndex = index;
|
|
1232
1376
|
});
|
|
1233
|
-
|
|
1234
1377
|
_this2.setFocusAndSelectionMode(thePaymodes, payIndex);
|
|
1235
1378
|
}
|
|
1236
1379
|
}, 500, {
|
|
@@ -1246,8 +1389,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1246
1389
|
};
|
|
1247
1390
|
|
|
1248
1391
|
_this2.setFocusAndSelectionMode = function (thePaymodes, currentIndex) {
|
|
1249
|
-
var _enumController$
|
|
1250
|
-
PayStyle = _enumController$
|
|
1392
|
+
var _enumController$getEn16 = _mutantsUtil.enumController.getEnumOj(),
|
|
1393
|
+
PayStyle = _enumController$getEn16.PayStyle;
|
|
1251
1394
|
|
|
1252
1395
|
var displayPayModeList = [].concat((0, _toConsumableArray3.default)(thePaymodes));
|
|
1253
1396
|
// 复制支付方式列表
|
|
@@ -1270,13 +1413,13 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1270
1413
|
};
|
|
1271
1414
|
|
|
1272
1415
|
_this2.findModlePayBySplice = function (thePaymodes, currenIndex, symbol) {
|
|
1273
|
-
var _enumController$
|
|
1274
|
-
PayStyle = _enumController$
|
|
1416
|
+
var _enumController$getEn17 = _mutantsUtil.enumController.getEnumOj(),
|
|
1417
|
+
PayStyle = _enumController$getEn17.PayStyle;
|
|
1275
1418
|
|
|
1276
1419
|
var findIndex = currenIndex;
|
|
1277
1420
|
var endCurrentMode = thePaymodes.find(function (mode, index) {
|
|
1278
1421
|
findIndex++;
|
|
1279
|
-
return (symbol ? index > currenIndex : index < currenIndex) && mode.paymentType != PayStyle.hyczk && mode.paymentType != PayStyle.djq && mode.paymentType != PayStyle.jfdx;
|
|
1422
|
+
return (symbol ? index > currenIndex : index < currenIndex) && mode.paymentType != PayStyle.hyczk && mode.paymentType != PayStyle.djq && mode.paymentType != PayStyle.jfdx && _mutantsMicrofx.stores.offlineSys.shouldSettlement(mode.paymentType, true);
|
|
1280
1423
|
});
|
|
1281
1424
|
if (endCurrentMode) return { mode: endCurrentMode, index: findIndex };
|
|
1282
1425
|
return null;
|
|
@@ -1408,14 +1551,14 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1408
1551
|
};
|
|
1409
1552
|
|
|
1410
1553
|
_this2.settleSuccess = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee5() {
|
|
1411
|
-
var _enumController$
|
|
1554
|
+
var _enumController$getEn18, PayStyle, _this2$store$paymode, amount, received, thePaymodes, IdbusiType, charge, openCashBox, _this, showTwoScreen, getSettleGift, type, resp1;
|
|
1412
1555
|
|
|
1413
1556
|
return _regenerator2.default.wrap(function _callee5$(_context5) {
|
|
1414
1557
|
while (1) {
|
|
1415
1558
|
switch (_context5.prev = _context5.next) {
|
|
1416
1559
|
case 0:
|
|
1417
1560
|
//提示成功
|
|
1418
|
-
_enumController$
|
|
1561
|
+
_enumController$getEn18 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn18.PayStyle;
|
|
1419
1562
|
_this2$store$paymode = _this2.store.paymode, amount = _this2$store$paymode.amount, received = _this2$store$paymode.received, thePaymodes = _this2$store$paymode.thePaymodes;
|
|
1420
1563
|
IdbusiType = _this2.store.dto.IdbusiType;
|
|
1421
1564
|
charge = _this2.store.paymode.charge;
|
|
@@ -1466,23 +1609,30 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1466
1609
|
};
|
|
1467
1610
|
|
|
1468
1611
|
getSettleGift = _this2.store.getSettleGift;
|
|
1612
|
+
type = _this2.props.type;
|
|
1469
1613
|
resp1 = false;
|
|
1470
|
-
|
|
1471
|
-
|
|
1614
|
+
|
|
1615
|
+
if (!(type !== 1)) {
|
|
1616
|
+
_context5.next = 20;
|
|
1617
|
+
break;
|
|
1618
|
+
}
|
|
1619
|
+
|
|
1620
|
+
_context5.prev = 11;
|
|
1621
|
+
_context5.next = 14;
|
|
1472
1622
|
return getSettleGift();
|
|
1473
1623
|
|
|
1474
|
-
case
|
|
1624
|
+
case 14:
|
|
1475
1625
|
resp1 = _context5.sent;
|
|
1476
|
-
_context5.next =
|
|
1626
|
+
_context5.next = 20;
|
|
1477
1627
|
break;
|
|
1478
1628
|
|
|
1479
|
-
case
|
|
1480
|
-
_context5.prev =
|
|
1481
|
-
_context5.t0 = _context5['catch'](
|
|
1629
|
+
case 17:
|
|
1630
|
+
_context5.prev = 17;
|
|
1631
|
+
_context5.t0 = _context5['catch'](11);
|
|
1482
1632
|
|
|
1483
1633
|
console.log("获取支付礼包getSettleGift失败");
|
|
1484
1634
|
|
|
1485
|
-
case
|
|
1635
|
+
case 20:
|
|
1486
1636
|
|
|
1487
1637
|
setTimeout(function () {
|
|
1488
1638
|
if (window.__loadingModal) {
|
|
@@ -1514,12 +1664,12 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1514
1664
|
_this2.cancelState();
|
|
1515
1665
|
}, 0);
|
|
1516
1666
|
|
|
1517
|
-
case
|
|
1667
|
+
case 21:
|
|
1518
1668
|
case 'end':
|
|
1519
1669
|
return _context5.stop();
|
|
1520
1670
|
}
|
|
1521
1671
|
}
|
|
1522
|
-
}, _callee5, _this3, [[
|
|
1672
|
+
}, _callee5, _this3, [[11, 17]]);
|
|
1523
1673
|
}));
|
|
1524
1674
|
|
|
1525
1675
|
_this2.handleGuestShow = function (dtype, value) {
|
|
@@ -1664,7 +1814,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1664
1814
|
};
|
|
1665
1815
|
}();
|
|
1666
1816
|
|
|
1667
|
-
var _enumController$
|
|
1817
|
+
var _enumController$getEn19, PayStyle, _this2$store6, paymode, brefund, boriginReturn, newStyle, isQuickPay, that, status, zeromode, promises, thePaymodes, quickmode, commit;
|
|
1668
1818
|
|
|
1669
1819
|
return _regenerator2.default.wrap(function _callee8$(_context8) {
|
|
1670
1820
|
while (1) {
|
|
@@ -1684,7 +1834,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1684
1834
|
// }
|
|
1685
1835
|
//
|
|
1686
1836
|
// testAsync(p);
|
|
1687
|
-
_enumController$
|
|
1837
|
+
_enumController$getEn19 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn19.PayStyle;
|
|
1688
1838
|
_this2$store6 = _this2.store, paymode = _this2$store6.paymode, brefund = _this2$store6.brefund, boriginReturn = _this2$store6.boriginReturn, newStyle = _this2$store6.newStyle;
|
|
1689
1839
|
isQuickPay = args === 'quickPay';
|
|
1690
1840
|
that = _this2;
|
|
@@ -1959,7 +2109,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1959
2109
|
};
|
|
1960
2110
|
}();
|
|
1961
2111
|
|
|
1962
|
-
var that, curmode, promises, _ref16, isNewRetailBCPos, _enumController$
|
|
2112
|
+
var that, curmode, promises, _ref16, isNewRetailBCPos, _enumController$getEn20, PayStyle, commit;
|
|
1963
2113
|
|
|
1964
2114
|
return _regenerator2.default.wrap(function _callee11$(_context11) {
|
|
1965
2115
|
while (1) {
|
|
@@ -1972,7 +2122,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1972
2122
|
|
|
1973
2123
|
if (isNewRetailBCPos) {
|
|
1974
2124
|
if (curmode.value > 0) {
|
|
1975
|
-
_enumController$
|
|
2125
|
+
_enumController$getEn20 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn20.PayStyle;
|
|
1976
2126
|
|
|
1977
2127
|
if (curmode.paymentType === PayStyle.hyczk) {
|
|
1978
2128
|
promises.push(that.inputPwd(curmode));
|
|
@@ -2240,8 +2390,12 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2240
2390
|
}();
|
|
2241
2391
|
|
|
2242
2392
|
_this2.btnDebounced = function (type, bquick) {
|
|
2243
|
-
|
|
2244
|
-
|
|
2393
|
+
_this2.setState({
|
|
2394
|
+
bquick: bquick
|
|
2395
|
+
});
|
|
2396
|
+
|
|
2397
|
+
var _enumController$getEn21 = _mutantsUtil.enumController.getEnumOj(),
|
|
2398
|
+
PayStyle = _enumController$getEn21.PayStyle;
|
|
2245
2399
|
|
|
2246
2400
|
var _this2$store7 = _this2.store,
|
|
2247
2401
|
paymode = _this2$store7.paymode,
|
|
@@ -2340,8 +2494,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2340
2494
|
};
|
|
2341
2495
|
|
|
2342
2496
|
_this2.checkCharge = function () {
|
|
2343
|
-
var _enumController$
|
|
2344
|
-
PayStyle = _enumController$
|
|
2497
|
+
var _enumController$getEn22 = _mutantsUtil.enumController.getEnumOj(),
|
|
2498
|
+
PayStyle = _enumController$getEn22.PayStyle;
|
|
2345
2499
|
|
|
2346
2500
|
var paymode = _this2.store.paymode;
|
|
2347
2501
|
|
|
@@ -2388,8 +2542,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2388
2542
|
};
|
|
2389
2543
|
|
|
2390
2544
|
_this2.getXianjinPayment = function (payType, value) {
|
|
2391
|
-
var _enumController$
|
|
2392
|
-
PayStyle = _enumController$
|
|
2545
|
+
var _enumController$getEn23 = _mutantsUtil.enumController.getEnumOj(),
|
|
2546
|
+
PayStyle = _enumController$getEn23.PayStyle;
|
|
2393
2547
|
|
|
2394
2548
|
var isManualIntoAmount = _this2.state.isManualIntoAmount;
|
|
2395
2549
|
|
|
@@ -2397,8 +2551,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2397
2551
|
};
|
|
2398
2552
|
|
|
2399
2553
|
_this2.getXianjinBalance = function (payType, value) {
|
|
2400
|
-
var _enumController$
|
|
2401
|
-
PayStyle = _enumController$
|
|
2554
|
+
var _enumController$getEn24 = _mutantsUtil.enumController.getEnumOj(),
|
|
2555
|
+
PayStyle = _enumController$getEn24.PayStyle;
|
|
2402
2556
|
//找零金额-存在权限控制
|
|
2403
2557
|
|
|
2404
2558
|
|
|
@@ -2410,12 +2564,17 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2410
2564
|
_this2.inputConfirm = function (paymode, isQuickPay) {
|
|
2411
2565
|
var that = _this2;
|
|
2412
2566
|
var isStoredValueCard = false;
|
|
2567
|
+
var discountPrototypeTotalAmount = _this2.state.discountPrototypeTotalAmount;
|
|
2568
|
+
var _this2$props3 = _this2.props,
|
|
2569
|
+
isReturn = _this2$props3.isReturn,
|
|
2570
|
+
type = _this2$props3.type;
|
|
2571
|
+
|
|
2413
2572
|
var isManualIntoAmount = void 0;
|
|
2414
2573
|
// 付款弹窗
|
|
2415
2574
|
return new _promise2.default(function (resolve, reject) {
|
|
2416
|
-
var _enumController$
|
|
2417
|
-
PayStyle = _enumController$
|
|
2418
|
-
PayIcon2 = _enumController$
|
|
2575
|
+
var _enumController$getEn25 = _mutantsUtil.enumController.getEnumOj(),
|
|
2576
|
+
PayStyle = _enumController$getEn25.PayStyle,
|
|
2577
|
+
PayIcon2 = _enumController$getEn25.PayIcon2;
|
|
2419
2578
|
|
|
2420
2579
|
var modal = (0, _asyncModal2.default)({
|
|
2421
2580
|
onPressEnter: function onPressEnter() {
|
|
@@ -2449,6 +2608,21 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2449
2608
|
throw "error";
|
|
2450
2609
|
}
|
|
2451
2610
|
},
|
|
2611
|
+
isCancelFun: function isCancelFun() {
|
|
2612
|
+
var _that$state = that.state,
|
|
2613
|
+
prototypeVisible = _that$state.prototypeVisible,
|
|
2614
|
+
protytypeCount = _that$state.protytypeCount;
|
|
2615
|
+
|
|
2616
|
+
if (protytypeCount === 1) {
|
|
2617
|
+
that.setState({
|
|
2618
|
+
protytypeCount: 0
|
|
2619
|
+
});
|
|
2620
|
+
// setTimeout(() => {
|
|
2621
|
+
// that[`inputS${paymode.paymethodId}`].input.input.focus();
|
|
2622
|
+
// }, 535)
|
|
2623
|
+
}
|
|
2624
|
+
return prototypeVisible || protytypeCount;
|
|
2625
|
+
},
|
|
2452
2626
|
onPressEsc: function onPressEsc() {
|
|
2453
2627
|
_keyboard2.default.close();
|
|
2454
2628
|
that.store.bquick && that.props.onCancelSettle && that.props.onCancelSettle();
|
|
@@ -2501,6 +2675,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2501
2675
|
'span',
|
|
2502
2676
|
null,
|
|
2503
2677
|
_react2.default.createElement(_numKeyboard2.default, {
|
|
2678
|
+
id: 'paymentAmount',
|
|
2504
2679
|
className: 'content',
|
|
2505
2680
|
type: 'text',
|
|
2506
2681
|
placeholder: '\u8BF7\u8F93\u5165\u4ED8\u6B3E\u91D1\u989D',
|
|
@@ -2538,6 +2713,27 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2538
2713
|
that.getXianjinBalance(paymode.paymentType, paymode.value)
|
|
2539
2714
|
)
|
|
2540
2715
|
),
|
|
2716
|
+
!isReturn && type !== 1 && _react2.default.createElement(
|
|
2717
|
+
'div',
|
|
2718
|
+
{ className: 'zlje prototype' },
|
|
2719
|
+
_react2.default.createElement(
|
|
2720
|
+
'span',
|
|
2721
|
+
{ className: 'label' },
|
|
2722
|
+
'\u4F18\u60E0\u660E\u7EC6\uFF1A'
|
|
2723
|
+
),
|
|
2724
|
+
_react2.default.createElement(
|
|
2725
|
+
'span',
|
|
2726
|
+
{ className: 'yfje economize' },
|
|
2727
|
+
'\u7701\xA5',
|
|
2728
|
+
discountPrototypeTotalAmount
|
|
2729
|
+
),
|
|
2730
|
+
_react2.default.createElement(
|
|
2731
|
+
'span',
|
|
2732
|
+
{ onClick: that.prototypeDetailedClick, className: 'prototypeDetailed primary-color' },
|
|
2733
|
+
'\u4F18\u60E0\u660E\u7EC6',
|
|
2734
|
+
_react2.default.createElement(_ticon2.default, { type: 'you2' })
|
|
2735
|
+
)
|
|
2736
|
+
),
|
|
2541
2737
|
(paymode.paymentType == PayStyle.wx || paymode.paymentType == PayStyle.zfb || paymode.paymentType == PayStyle.smzf || paymode.paymentType == PayStyle.SQBPAY || paymode.paymentType == PayStyle.CSYH) && _react2.default.createElement(
|
|
2542
2738
|
'div',
|
|
2543
2739
|
{ className: 'contentzf' },
|
|
@@ -2638,7 +2834,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2638
2834
|
setTimeout(function () {
|
|
2639
2835
|
// console.log(that[`inputS${paymode.paymethodId}`].input, '-------------------')
|
|
2640
2836
|
that['inputS' + paymode.paymethodId].input.input.focus();
|
|
2641
|
-
},
|
|
2837
|
+
}, 350);
|
|
2642
2838
|
});
|
|
2643
2839
|
};
|
|
2644
2840
|
|
|
@@ -2647,8 +2843,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2647
2843
|
paymode = _this2$store8.paymode,
|
|
2648
2844
|
newStyle = _this2$store8.newStyle;
|
|
2649
2845
|
|
|
2650
|
-
var _enumController$
|
|
2651
|
-
PayStyle = _enumController$
|
|
2846
|
+
var _enumController$getEn26 = _mutantsUtil.enumController.getEnumOj(),
|
|
2847
|
+
PayStyle = _enumController$getEn26.PayStyle;
|
|
2652
2848
|
|
|
2653
2849
|
var payTypeList = [PayStyle.SQBPAY, PayStyle.CSYH, PayStyle.smzf];
|
|
2654
2850
|
var payTypeFilterList = payTypeList.filter(function (filterType) {
|
|
@@ -2669,15 +2865,15 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2669
2865
|
};
|
|
2670
2866
|
|
|
2671
2867
|
_this2.checkModeDisabled = function (type, brefund, boriginReturn) {
|
|
2672
|
-
var _enumController$
|
|
2673
|
-
PayStyle = _enumController$
|
|
2868
|
+
var _enumController$getEn27 = _mutantsUtil.enumController.getEnumOj(),
|
|
2869
|
+
PayStyle = _enumController$getEn27.PayStyle;
|
|
2674
2870
|
|
|
2675
2871
|
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);
|
|
2676
2872
|
};
|
|
2677
2873
|
|
|
2678
2874
|
_this2.checkSettleDisabled = function (paymode, thePaymodes) {
|
|
2679
|
-
var _enumController$
|
|
2680
|
-
PayStyle = _enumController$
|
|
2875
|
+
var _enumController$getEn28 = _mutantsUtil.enumController.getEnumOj(),
|
|
2876
|
+
PayStyle = _enumController$getEn28.PayStyle;
|
|
2681
2877
|
|
|
2682
2878
|
console.log("settlement.checkSettleDisabled开始执行,参数:", { paymode: paymode, thePaymodes: thePaymodes });
|
|
2683
2879
|
if (paymode.amount == 0 && paymode.received == 0) {
|
|
@@ -2723,8 +2919,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2723
2919
|
};
|
|
2724
2920
|
|
|
2725
2921
|
_this2.editCzkModal = function () {
|
|
2726
|
-
var _enumController$
|
|
2727
|
-
PayStyle = _enumController$
|
|
2922
|
+
var _enumController$getEn29 = _mutantsUtil.enumController.getEnumOj(),
|
|
2923
|
+
PayStyle = _enumController$getEn29.PayStyle;
|
|
2728
2924
|
|
|
2729
2925
|
(0, _find3.default)(_this2.store.paymode.thePaymodes, function (mode) {
|
|
2730
2926
|
if (mode.paymentType == PayStyle.hyczk) {
|
|
@@ -2775,6 +2971,41 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2775
2971
|
);
|
|
2776
2972
|
};
|
|
2777
2973
|
|
|
2974
|
+
_this2.prototypeDetailedClick = function () {
|
|
2975
|
+
_this2.handleShowPrototype();
|
|
2976
|
+
_this2.setState({
|
|
2977
|
+
prototypeVisible: true,
|
|
2978
|
+
isPrototypeClick: true
|
|
2979
|
+
});
|
|
2980
|
+
};
|
|
2981
|
+
|
|
2982
|
+
_this2.handleprototypeCancel = function () {
|
|
2983
|
+
_this2.setState({
|
|
2984
|
+
prototypeVisible: false,
|
|
2985
|
+
protytypeCount: 1,
|
|
2986
|
+
isPrototypeClick: false
|
|
2987
|
+
});
|
|
2988
|
+
var that = _this2;
|
|
2989
|
+
var _this2$state2 = _this2.state,
|
|
2990
|
+
bquick = _this2$state2.bquick,
|
|
2991
|
+
isPrototypeClick = _this2$state2.isPrototypeClick;
|
|
2992
|
+
|
|
2993
|
+
if (!isPrototypeClick) {
|
|
2994
|
+
if (bquick) {
|
|
2995
|
+
setTimeout(function () {
|
|
2996
|
+
_this2.payQuick();
|
|
2997
|
+
}, 100);
|
|
2998
|
+
} else {
|
|
2999
|
+
_this2.payFun();
|
|
3000
|
+
}
|
|
3001
|
+
} else {
|
|
3002
|
+
setTimeout(function () {
|
|
3003
|
+
var input = document.getElementById('paymentAmount');
|
|
3004
|
+
input && input.select();
|
|
3005
|
+
}, 700);
|
|
3006
|
+
}
|
|
3007
|
+
};
|
|
3008
|
+
|
|
2778
3009
|
_this2.hasElectron = hasElectron;
|
|
2779
3010
|
|
|
2780
3011
|
var _ref23 = _mutantsMicrofx.localStore.get('user') || {},
|
|
@@ -2905,11 +3136,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2905
3136
|
//jfdx
|
|
2906
3137
|
|
|
2907
3138
|
|
|
2908
|
-
/**
|
|
2909
|
-
*
|
|
2910
|
-
* @param {*} thePaymodes 支付方式列表
|
|
2911
|
-
* @param {*} currenIndex 当前支付方式下标
|
|
2912
|
-
* @param {*} symbol 从当前currenIndex开始 还是从当前currenIndex截止
|
|
3139
|
+
/**
|
|
3140
|
+
*
|
|
3141
|
+
* @param {*} thePaymodes 支付方式列表
|
|
3142
|
+
* @param {*} currenIndex 当前支付方式下标
|
|
3143
|
+
* @param {*} symbol 从当前currenIndex开始 还是从当前currenIndex截止
|
|
2913
3144
|
*/
|
|
2914
3145
|
|
|
2915
3146
|
// 处理客显显示功能
|
|
@@ -2937,9 +3168,9 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2937
3168
|
value: function renderToolbtn(mode, index) {
|
|
2938
3169
|
var _this7 = this;
|
|
2939
3170
|
|
|
2940
|
-
var _enumController$
|
|
2941
|
-
PayIcon = _enumController$
|
|
2942
|
-
PayStyle = _enumController$
|
|
3171
|
+
var _enumController$getEn30 = _mutantsUtil.enumController.getEnumOj(),
|
|
3172
|
+
PayIcon = _enumController$getEn30.PayIcon,
|
|
3173
|
+
PayStyle = _enumController$getEn30.PayStyle;
|
|
2943
3174
|
|
|
2944
3175
|
var isReturn = this.props.isReturn;
|
|
2945
3176
|
var _store = this.store,
|
|
@@ -3011,13 +3242,18 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3011
3242
|
value: function render() {
|
|
3012
3243
|
var _this8 = this;
|
|
3013
3244
|
|
|
3014
|
-
var _enumController$
|
|
3015
|
-
PayIcon = _enumController$
|
|
3016
|
-
PayIcon2 = _enumController$
|
|
3017
|
-
PayStyle = _enumController$
|
|
3018
|
-
Differentiate = _enumController$
|
|
3245
|
+
var _enumController$getEn31 = _mutantsUtil.enumController.getEnumOj(),
|
|
3246
|
+
PayIcon = _enumController$getEn31.PayIcon,
|
|
3247
|
+
PayIcon2 = _enumController$getEn31.PayIcon2,
|
|
3248
|
+
PayStyle = _enumController$getEn31.PayStyle,
|
|
3249
|
+
Differentiate = _enumController$getEn31.Differentiate;
|
|
3019
3250
|
|
|
3020
|
-
var
|
|
3251
|
+
var _state2 = this.state,
|
|
3252
|
+
btnDissabled = _state2.btnDissabled,
|
|
3253
|
+
dataSource = _state2.dataSource,
|
|
3254
|
+
discountTotalAmount = _state2.discountTotalAmount,
|
|
3255
|
+
discountRetailTotalAount = _state2.discountRetailTotalAount,
|
|
3256
|
+
discountPrototypeTotalAmount = _state2.discountPrototypeTotalAmount;
|
|
3021
3257
|
|
|
3022
3258
|
var _ref25 = _mutantsUtil.platform || {},
|
|
3023
3259
|
isNewRetailBCPos = _ref25.isNewRetailBCPos;
|
|
@@ -3464,6 +3700,12 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3464
3700
|
)
|
|
3465
3701
|
)
|
|
3466
3702
|
),
|
|
3703
|
+
!isReturn && _react2.default.createElement(
|
|
3704
|
+
'div',
|
|
3705
|
+
{ onClick: this.prototypeDetailedClick, className: 'prototypeDetailed primary-color' },
|
|
3706
|
+
'\u4F18\u60E0\u660E\u7EC6',
|
|
3707
|
+
_react2.default.createElement(_ticon2.default, { type: 'shouqi1' })
|
|
3708
|
+
),
|
|
3467
3709
|
_react2.default.createElement(
|
|
3468
3710
|
'div',
|
|
3469
3711
|
{ className: this.isHorizontalPad ? 'keyboard_ios' : 'keyboard' },
|
|
@@ -3592,6 +3834,12 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3592
3834
|
(0, _utils.getFixedNumber)(Math.abs(paymode.receivable))
|
|
3593
3835
|
)
|
|
3594
3836
|
)
|
|
3837
|
+
),
|
|
3838
|
+
!isReturn && _react2.default.createElement(
|
|
3839
|
+
'div',
|
|
3840
|
+
{ onClick: this.prototypeDetailedClick, className: 'prototypeDetailed primary-color' },
|
|
3841
|
+
'\u4F18\u60E0\u660E\u7EC6',
|
|
3842
|
+
_react2.default.createElement(_ticon2.default, { type: 'shouqi1' })
|
|
3595
3843
|
)
|
|
3596
3844
|
),
|
|
3597
3845
|
_react2.default.createElement(
|
|
@@ -3659,6 +3907,14 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3659
3907
|
disabled: _this8.checkModeDisabled(mode.paymentType, brefund, boriginReturn),
|
|
3660
3908
|
onClick: function onClick() {
|
|
3661
3909
|
var czkinput = document.getElementById('inputS' + index);
|
|
3910
|
+
if (mode.paymentType === PayStyle.hyczk) {
|
|
3911
|
+
var isProhibitMeStorageCard = _this8.props.isProhibitMeStorageCard;
|
|
3912
|
+
|
|
3913
|
+
if (isProhibitMeStorageCard) {
|
|
3914
|
+
_message2.default.warn('储值卡不可键盘录入,请刷卡!');
|
|
3915
|
+
return;
|
|
3916
|
+
}
|
|
3917
|
+
}
|
|
3662
3918
|
mode.paymentType == PayStyle.hyczk && czkinput && czkinput.value !== '0.00' ? _this8.editCzkModal() : _this8.onHotKeyClick1(mode, index, boriginReturn);
|
|
3663
3919
|
},
|
|
3664
3920
|
value: mode.paymentType == PayStyle.hyczk ? (0, _utils.getFixedNumber)((0, _reduce3.default)((0, _filter3.default)(thePaymodes, function (tm) {
|
|
@@ -4376,7 +4632,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4376
4632
|
},
|
|
4377
4633
|
onFocus: function onFocus(e) {
|
|
4378
4634
|
_this8.inputTarget = _this8.czkInput.input;
|
|
4379
|
-
_keyboard2.default.open(function (v) {
|
|
4635
|
+
!_this8.state.prototypeVisible && _keyboard2.default.open(function (v) {
|
|
4380
4636
|
var value = _keyboard2.default.getNewValue(_this8.inputTarget, _this8.inputTarget.value, v);
|
|
4381
4637
|
_this8.onCzkChange(value);
|
|
4382
4638
|
}, _this8.czkKeyboardOnOk, _this8.czkKeyboardOnClose)();
|
|
@@ -4420,6 +4676,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4420
4676
|
'span',
|
|
4421
4677
|
null,
|
|
4422
4678
|
_react2.default.createElement(_input2.default, {
|
|
4679
|
+
id: 'paymentAmount',
|
|
4423
4680
|
type: 'text',
|
|
4424
4681
|
className: _index.hotKey.hotKeyNotFilter('input'),
|
|
4425
4682
|
onChange: function onChange(event) {
|
|
@@ -4443,6 +4700,27 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4443
4700
|
})
|
|
4444
4701
|
)
|
|
4445
4702
|
),
|
|
4703
|
+
!isReturn && _react2.default.createElement(
|
|
4704
|
+
'div',
|
|
4705
|
+
{ className: 'received' },
|
|
4706
|
+
_react2.default.createElement(
|
|
4707
|
+
'span',
|
|
4708
|
+
{ className: 'label' },
|
|
4709
|
+
'\u4F18\u60E0\u660E\u7EC6\uFF1A'
|
|
4710
|
+
),
|
|
4711
|
+
_react2.default.createElement(
|
|
4712
|
+
'span',
|
|
4713
|
+
{ className: 'yfje economize' },
|
|
4714
|
+
'\u7701\xA5',
|
|
4715
|
+
discountPrototypeTotalAmount
|
|
4716
|
+
),
|
|
4717
|
+
_react2.default.createElement(
|
|
4718
|
+
'span',
|
|
4719
|
+
{ onClick: this.prototypeDetailedClick, className: 'prototypeDetailed primary-color' },
|
|
4720
|
+
'\u4F18\u60E0\u660E\u7EC6',
|
|
4721
|
+
_react2.default.createElement(_ticon2.default, { type: 'you2' })
|
|
4722
|
+
)
|
|
4723
|
+
),
|
|
4446
4724
|
_react2.default.createElement(
|
|
4447
4725
|
'div',
|
|
4448
4726
|
{ className: 'error' },
|
|
@@ -5014,7 +5292,10 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
5014
5292
|
currentMode && currentMode.errinfo
|
|
5015
5293
|
)
|
|
5016
5294
|
)
|
|
5017
|
-
)
|
|
5295
|
+
),
|
|
5296
|
+
_react2.default.createElement(_index3.default, { discount: {
|
|
5297
|
+
discountTotalAmount: discountTotalAmount, discountRetailTotalAount: discountRetailTotalAount, discountPrototypeTotalAmount: discountPrototypeTotalAmount
|
|
5298
|
+
}, handleprototypeCancel: this.handleprototypeCancel, isHorizontalPad: this.isHorizontalPad, dataSource: dataSource, prototypeVisible: this.state.prototypeVisible })
|
|
5018
5299
|
);
|
|
5019
5300
|
}
|
|
5020
5301
|
}]);
|