tplus-components-touch 3.41.4 → 3.42.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/billSearch/index.js +39 -16
- package/dist/components/billSearch/index.js.map +1 -1
- package/dist/components/cloudPrint/BTPrintFormatUtil.js +2 -2
- package/dist/components/cloudPrint/BTPrintFormatUtil.js.map +1 -1
- package/dist/components/cloudPrint/index.js +608 -891
- package/dist/components/cloudPrint/index.js.map +1 -1
- package/dist/components/cloudPrint/printDispatch.js +47 -151
- package/dist/components/cloudPrint/printDispatch.js.map +1 -1
- package/dist/components/deliverySearch/index.js +2 -6
- package/dist/components/deliverySearch/index.js.map +1 -1
- package/dist/components/hardwareAPI/index.js +12 -46
- package/dist/components/hardwareAPI/index.js.map +1 -1
- package/dist/components/hotKey/index.js +5 -0
- package/dist/components/hotKey/index.js.map +1 -1
- package/dist/components/inventorySearch/tab.js +2 -7
- package/dist/components/inventorySearch/tab.js.map +1 -1
- package/dist/components/loading/loadingContent.js +3 -6
- package/dist/components/loading/loadingContent.js.map +1 -1
- package/dist/components/message/index.js +5 -4
- package/dist/components/message/index.js.map +1 -1
- package/dist/components/notification/index.js +12 -11
- package/dist/components/notification/index.js.map +1 -1
- package/dist/components/progressState/EmptyAndErrorView.js +7 -5
- package/dist/components/progressState/EmptyAndErrorView.js.map +1 -1
- package/dist/components/settlement/settlement.js +127 -82
- package/dist/components/settlement/settlement.js.map +1 -1
- package/dist/components/settlement/settlementStore.js +26 -16
- package/dist/components/settlement/settlementStore.js.map +1 -1
- package/dist/components/ticon/iconfont/demo.css +539 -539
- package/dist/components/touchTable/index.js +3 -5
- package/dist/components/touchTable/index.js.map +1 -1
- package/package.json +3 -3
- package/dist/components/cloudPrint/printTemplate/dialy_one.json +0 -239
- package/dist/components/cloudPrint/printTemplate/duty_one.json +0 -239
- package/dist/components/cloudPrint/printTemplate/retail_one.json +0 -208
- package/dist/components/cloudPrint/printTemplate/retail_two.json +0 -220
- package/dist/components/cloudPrint/printTemplate/storage_one.json +0 -129
- package/dist/components/cloudPrint/printTemplate/template.js +0 -52
- package/dist/components/cloudPrint/printTemplate/template.js.map +0 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["tplus-components-touch/components/progressState/EmptyAndErrorView.js"],"names":["
|
1
|
+
{"version":3,"sources":["tplus-components-touch/components/progressState/EmptyAndErrorView.js"],"names":["imgRef","empty","error","EmptyAndErrorView","onButtonClick","e","onClick","props","iconVisible","info","buttonVisible","buttonTitle","secondaryTip","style","type","imgStyle","imgURL","Component","propTypes","PropTypes","bool","string","func","object"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;AAEA;;;;;;AAGA,IAAMA,SAAS;AACXC,WAAM,gDADK;AAEXC,WAAM;AAFK,CAAf;;IAKMC,iB;;;;;;;;;;;;;;sOA+CFC,a,GAAgB,UAACC,CAAD,EAAK;AAAA,gBACVC,OADU,GACC,MAAKC,KADN,CACVD,OADU;;AAEjBA,uBAAWA,QAAQD,CAAR,CAAX;AACH,S;;;;;iCArCQ;AAAA,yBAEoG,KAAKE,KAFzG;AAAA,gBAEEC,WAFF,UAEEA,WAFF;AAAA,gBAEeC,IAFf,UAEeA,IAFf;AAAA,gBAEqBC,aAFrB,UAEqBA,aAFrB;AAAA,gBAEoCC,WAFpC,UAEoCA,WAFpC;AAAA,gBAEgDC,YAFhD,UAEgDA,YAFhD;AAAA,sCAE6DC,KAF7D;AAAA,gBAE6DA,KAF7D,gCAEmE,EAFnE;AAAA,qCAEsEC,IAFtE;AAAA,gBAEsEA,IAFtE,+BAE2E,OAF3E;AAAA,yCAEmFC,QAFnF;AAAA,gBAEmFA,QAFnF,mCAE8F,EAF9F;;AAGL,gBAAMC,SAAShB,OAAOc,IAAP,CAAf;AACA,mBACI;AAAA;AAAA,kBAAK,WAAU,eAAf,EAA+B,OAAOD,KAAtC;AACI;AAAA;AAAA;AACKL,mCACD;AAAA;AAAA,0BAAK,WAAU,MAAf;AACI,+DAAK,OAAOO,QAAZ,EAAsB,KAAKC,MAA3B;AADJ,qBAFJ;AAMKP,4BACD;AAAA;AAAA,0BAAK,WAAU,MAAf;AAAuBA;AAAvB,qBAPJ;AASKC,qCACD;AAAA;AAAA,0BAAK,WAAU,QAAf;AACI;AAAA;AAAA,8BAAQ,MAAK,SAAb,EAAuB,SAAS,KAAKN,aAArC;AACMO;AADN;AADJ;AAVJ,iBADJ;AAkBKC,gCACG;AAAA;AAAA,sBAAK,WAAU,cAAf;AACI;AAAA;AAAA,0BAAM,WAAU,UAAhB;AAAA;AAAA,qBADJ;AAEI;AAAA;AAAA,0BAAK,WAAU,YAAf;AAAA;AAA+BA;AAA/B;AAFJ;AAnBR,aADJ;AA4BH;;;EA7C2BK,gB,UAErBC,S,GAAY;AACfV,iBAAaW,oBAAUC,IADR;AAEfX,UAAMU,oBAAUE,MAFD;AAGfX,mBAAeS,oBAAUC,IAHV;AAIfT,iBAAaQ,oBAAUE,MAJR;AAKfT,kBAAcO,oBAAUE,MALT;AAMff,aAASa,oBAAUG,IANJ;AAOfT,WAAOM,oBAAUI,MAPF;AAQfT,UAAMK,oBAAUE;AARD,C;kBAoDRlB,iB","file":"EmptyAndErrorView.js","sourcesContent":["import React, {Component} from 'react';\r\nimport { Button } from 'antd';\r\nimport PropTypes from 'prop-types';\r\n\r\n\r\nconst imgRef = {\r\n empty:'https://newretail.static.chanjet.com/empty.png',\r\n error:'https://newretail.static.chanjet.com/operation_error.png'\r\n}\r\n\r\nclass EmptyAndErrorView extends Component{\r\n\r\n static propTypes = {\r\n iconVisible: PropTypes.bool,\r\n info: PropTypes.string,\r\n buttonVisible: PropTypes.bool,\r\n buttonTitle: PropTypes.string,\r\n secondaryTip: PropTypes.string,\r\n onClick: PropTypes.func,\r\n style: PropTypes.object,\r\n type: PropTypes.string\r\n };\r\n\r\n render() {\r\n\r\n const {iconVisible, info, buttonVisible, buttonTitle,secondaryTip,style={},type='error',imgStyle = {}} = this.props;\r\n const imgURL = imgRef[type];\r\n return (\r\n <div className=\"progressState\" style={style}>\r\n <div>\r\n {iconVisible &&\r\n <div className=\"icon\">\r\n <img style={imgStyle} src={imgURL}/>\r\n </div>\r\n }\r\n {info &&\r\n <div className=\"text\">{info}</div>\r\n }\r\n {buttonVisible &&\r\n <div className=\"addBtn\">\r\n <Button type=\"primary\" onClick={this.onButtonClick}>\r\n {buttonTitle}\r\n </Button>\r\n </div>\r\n }\r\n </div>\r\n {secondaryTip &&\r\n <div className=\"secondaryTip\">\r\n <span className=\"tipLabel\">提示 :</span>\r\n <div className=\"tipContent\"> {secondaryTip}</div>\r\n </div>\r\n }\r\n\r\n </div>\r\n );\r\n }\r\n\r\n onButtonClick = (e)=>{\r\n const {onClick} = this.props;\r\n onClick && onClick(e);\r\n }\r\n\r\n}\r\n\r\nexport default EmptyAndErrorView;"]}
|
@@ -463,17 +463,18 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
463
463
|
} else {
|
464
464
|
item.badge = { text: '', position: '', className: '' };
|
465
465
|
}
|
466
|
-
if (!item.IsPresent) {
|
467
|
-
discountRetailTotalAount += item.RetailPrice * item.Quantity;
|
468
|
-
}
|
469
466
|
if (item.PromotionDetails && item.PromotionDetails.length > 0) {
|
470
467
|
count++;
|
471
468
|
}
|
472
469
|
item.InventoryName = item.Inventory.Name;
|
473
470
|
item.Discount = (0, _utils.getRoundValue)(item.RetailPrice - item.TaxPrice, pricePrecision);
|
474
|
-
|
471
|
+
if (!item.IsPresent) {
|
472
|
+
discountPrototypeTotalAmount += item.DetailDiscountAmount;
|
473
|
+
item.TotalDiscount = item.DetailDiscountAmount;
|
474
|
+
} else {
|
475
|
+
item.TotalDiscount = 0;
|
476
|
+
}
|
475
477
|
//item.TotalDiscount = getFixedNumber(item.Discount * item.Quantity);
|
476
|
-
item.TotalDiscount = item.DetailDiscountAmount;
|
477
478
|
item.nAmount = (0, _utils.getFixedNumber)(item.TaxAmount);
|
478
479
|
item.UnitName = item.Unit.Name;
|
479
480
|
item.nQuantity = (0, _utils.getRoundValue)(item.Quantity, quantityPrecision);
|
@@ -484,7 +485,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
484
485
|
dataSource: dataSource,
|
485
486
|
discountTotalAmount: (0, _utils.getFixedNumber)(_this2.props.amount),
|
486
487
|
discountPrototypeTotalAmount: (0, _utils.getFixedNumber)(discountPrototypeTotalAmount),
|
487
|
-
discountRetailTotalAount: (0, _utils.getFixedNumber)(_this2.props.amount + discountPrototypeTotalAmount)
|
488
|
+
discountRetailTotalAount: (0, _utils.getFixedNumber)(_this2.props.amount + parseFloat(discountPrototypeTotalAmount))
|
488
489
|
});
|
489
490
|
return count;
|
490
491
|
};
|
@@ -1007,7 +1008,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
1007
1008
|
}, 200);
|
1008
1009
|
|
1009
1010
|
// TODO: 测试优惠券支付
|
1010
|
-
|
1011
|
+
|
1012
|
+
var _ref10 = _mutantsUtil.platform || {},
|
1013
|
+
isNewRetailBCPos = _ref10.isNewRetailBCPos;
|
1014
|
+
|
1015
|
+
if (isNewRetailBCPos && !_this2.store.paymode.currentMode.boriginReturn) {
|
1011
1016
|
_this2.store.getCouponList();
|
1012
1017
|
}
|
1013
1018
|
};
|
@@ -1089,8 +1094,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
1089
1094
|
};
|
1090
1095
|
|
1091
1096
|
_this2.checkOfflineEnable = function (paymode, key) {
|
1092
|
-
var
|
1093
|
-
paymodes =
|
1097
|
+
var _ref11 = paymode || {},
|
1098
|
+
paymodes = _ref11.paymodes;
|
1094
1099
|
|
1095
1100
|
var isOffline = _mutantsMicrofx.stores.offlineSys.isOffline;
|
1096
1101
|
|
@@ -1212,6 +1217,14 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
1212
1217
|
};
|
1213
1218
|
|
1214
1219
|
_this2.onTabsClick = function (key, bookType) {
|
1220
|
+
if (!_this2.isDjqValidated(key)) {
|
1221
|
+
return;
|
1222
|
+
};
|
1223
|
+
var _this2$store3 = _this2.store,
|
1224
|
+
paymode = _this2$store3.paymode,
|
1225
|
+
brefund = _this2$store3.brefund,
|
1226
|
+
boriginReturn = _this2$store3.boriginReturn;
|
1227
|
+
|
1215
1228
|
var _enumController$getEn9 = _mutantsUtil.enumController.getEnumOj(),
|
1216
1229
|
PayStyle = _enumController$getEn9.PayStyle,
|
1217
1230
|
Differentiate = _enumController$getEn9.Differentiate;
|
@@ -1228,10 +1241,6 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
1228
1241
|
var _enumController$getEn10 = _mutantsUtil.enumController.getEnumOj(),
|
1229
1242
|
MultiPay = _enumController$getEn10.MultiPay;
|
1230
1243
|
|
1231
|
-
var _this2$store3 = _this2.store,
|
1232
|
-
paymode = _this2$store3.paymode,
|
1233
|
-
brefund = _this2$store3.brefund,
|
1234
|
-
boriginReturn = _this2$store3.boriginReturn;
|
1235
1244
|
var noAlreadyWarn = _this2.state.noAlreadyWarn;
|
1236
1245
|
|
1237
1246
|
if (!_mutantsMicrofx.stores.offlineSys.shouldSettlement(key)) return false;
|
@@ -1437,7 +1446,15 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
1437
1446
|
_message2.default.info('\u539F\u5355\u9000\u8D27\u65F6' + Differentiate.COUPON + '\u4E0D\u53EF\u4EE5\u53D6\u6D88\u3002');
|
1438
1447
|
return;
|
1439
1448
|
}
|
1440
|
-
|
1449
|
+
|
1450
|
+
var _ref12 = _mutantsUtil.platform || {},
|
1451
|
+
isNewRetailBCPos = _ref12.isNewRetailBCPos;
|
1452
|
+
|
1453
|
+
if (isNewRetailBCPos) {
|
1454
|
+
_this2.store.paymode.calcDjqCheckValue(q, _this2.store.dto);
|
1455
|
+
} else {
|
1456
|
+
_this2.store.paymode.calcDjqValue(q);
|
1457
|
+
}
|
1441
1458
|
// this.props.onGetCouponList && this.props.onGetCouponList(this.store.dto, _filter(this.store.paymode.currentMode.djqs,(djq)=>{return djq.couponCategoryEnum !== 'RIGHT'}));
|
1442
1459
|
// this.props.onGetCouponList && this.props.onGetCouponList(this.store.dto, _filter(this.store.paymode.currentMode.djqs,(djq)=>{return djq.checked}), this.store.paymode.currentMode.djqs);
|
1443
1460
|
};
|
@@ -1510,6 +1527,9 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
1510
1527
|
};
|
1511
1528
|
|
1512
1529
|
_this2.onHotKeyClick1 = function (mode, index, boriginReturn, bookType) {
|
1530
|
+
if (!_this2.isDjqValidated(mode.paymentType)) {
|
1531
|
+
return;
|
1532
|
+
};
|
1513
1533
|
// if (bookType == 'bookPay' && this.store.paymode.isNotFullOnlyBook && mode.virtualPay){
|
1514
1534
|
// return Message.error("付订金时不可使用零售抵现类结算方式!");
|
1515
1535
|
// }
|
@@ -1927,13 +1947,13 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
1927
1947
|
if (_this2.hasElectron === false) return;
|
1928
1948
|
var dt = _mutantsMicrofx.localStore.get('portsetting_hardSet') || [];
|
1929
1949
|
|
1930
|
-
var
|
1931
|
-
guestshow_enable =
|
1932
|
-
guestshow_clear =
|
1933
|
-
guestshow_welcome =
|
1934
|
-
guestshow_collect =
|
1935
|
-
guestshow_refund =
|
1936
|
-
guestshow_change =
|
1950
|
+
var _ref16 = dt || {},
|
1951
|
+
guestshow_enable = _ref16.guestshow_enable,
|
1952
|
+
guestshow_clear = _ref16.guestshow_clear,
|
1953
|
+
guestshow_welcome = _ref16.guestshow_welcome,
|
1954
|
+
guestshow_collect = _ref16.guestshow_collect,
|
1955
|
+
guestshow_refund = _ref16.guestshow_refund,
|
1956
|
+
guestshow_change = _ref16.guestshow_change;
|
1937
1957
|
|
1938
1958
|
var hasSuccess = _mutantsMicrofx.localStore && _mutantsMicrofx.localStore.get('portsetting_hardSet_isSuccess');
|
1939
1959
|
if (!guestshow_enable || !!guestshow_enable && hasSuccess == '0') return;
|
@@ -1968,9 +1988,9 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
1968
1988
|
};
|
1969
1989
|
|
1970
1990
|
_this2.handleSettle = function () {
|
1971
|
-
var
|
1991
|
+
var _ref17 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee11(args) {
|
1972
1992
|
var handleUserInputs = function () {
|
1973
|
-
var
|
1993
|
+
var _ref19 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee10(promises) {
|
1974
1994
|
var results, _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, p, _result;
|
1975
1995
|
|
1976
1996
|
return _regenerator2.default.wrap(function _callee10$(_context10) {
|
@@ -2061,7 +2081,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2061
2081
|
}));
|
2062
2082
|
|
2063
2083
|
return function handleUserInputs(_x6) {
|
2064
|
-
return
|
2084
|
+
return _ref19.apply(this, arguments);
|
2065
2085
|
};
|
2066
2086
|
}();
|
2067
2087
|
|
@@ -2154,7 +2174,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2154
2174
|
});
|
2155
2175
|
|
2156
2176
|
commit = function () {
|
2157
|
-
var
|
2177
|
+
var _ref18 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee9(values) {
|
2158
2178
|
var result;
|
2159
2179
|
return _regenerator2.default.wrap(function _callee9$(_context9) {
|
2160
2180
|
while (1) {
|
@@ -2228,7 +2248,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2228
2248
|
}));
|
2229
2249
|
|
2230
2250
|
return function commit(_x5) {
|
2231
|
-
return
|
2251
|
+
return _ref18.apply(this, arguments);
|
2232
2252
|
};
|
2233
2253
|
}();
|
2234
2254
|
|
@@ -2243,13 +2263,13 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2243
2263
|
}));
|
2244
2264
|
|
2245
2265
|
return function (_x4) {
|
2246
|
-
return
|
2266
|
+
return _ref17.apply(this, arguments);
|
2247
2267
|
};
|
2248
2268
|
}();
|
2249
2269
|
|
2250
2270
|
_this2.handleCzk = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee14() {
|
2251
2271
|
var handleUserInputs = function () {
|
2252
|
-
var
|
2272
|
+
var _ref23 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee13(promises) {
|
2253
2273
|
var results, _iteratorNormalCompletion2, _didIteratorError2, _iteratorError2, _iterator2, _step2, p, _result2;
|
2254
2274
|
|
2255
2275
|
return _regenerator2.default.wrap(function _callee13$(_context13) {
|
@@ -2346,11 +2366,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2346
2366
|
}));
|
2347
2367
|
|
2348
2368
|
return function handleUserInputs(_x8) {
|
2349
|
-
return
|
2369
|
+
return _ref23.apply(this, arguments);
|
2350
2370
|
};
|
2351
2371
|
}();
|
2352
2372
|
|
2353
|
-
var that, curmode, promises, _enumController$getEn22, PayStyle, commit;
|
2373
|
+
var that, curmode, promises, _ref21, isNewRetailBCPos, _enumController$getEn22, PayStyle, commit;
|
2354
2374
|
|
2355
2375
|
return _regenerator2.default.wrap(function _callee14$(_context14) {
|
2356
2376
|
while (1) {
|
@@ -2359,21 +2379,28 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2359
2379
|
that = _this2;
|
2360
2380
|
curmode = _this2.store.paymode.currentMode;
|
2361
2381
|
promises = [];
|
2382
|
+
_ref21 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref21.isNewRetailBCPos;
|
2362
2383
|
|
2363
|
-
if (
|
2364
|
-
|
2384
|
+
if (isNewRetailBCPos) {
|
2385
|
+
if (curmode.value > 0) {
|
2386
|
+
_enumController$getEn22 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn22.PayStyle;
|
2365
2387
|
|
2366
|
-
|
2367
|
-
|
2368
|
-
|
2369
|
-
|
2370
|
-
|
2388
|
+
if (curmode.paymentType === PayStyle.hyczk) {
|
2389
|
+
if (curmode.cardTypeEnum === 'BALANCE_CARD') {
|
2390
|
+
!curmode.freePaymentPasswordStore && promises.push(that.inputPwd(curmode));
|
2391
|
+
} else {
|
2392
|
+
curmode.isNeedPassword && promises.push(that.inputPwd(curmode));
|
2393
|
+
}
|
2371
2394
|
}
|
2372
2395
|
}
|
2396
|
+
} else {
|
2397
|
+
if (curmode.member.needPwd && curmode.value > 0) {
|
2398
|
+
promises.push(that.inputPwd(curmode));
|
2399
|
+
}
|
2373
2400
|
}
|
2374
2401
|
|
2375
2402
|
commit = function () {
|
2376
|
-
var
|
2403
|
+
var _ref22 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee12(values) {
|
2377
2404
|
var result;
|
2378
2405
|
return _regenerator2.default.wrap(function _callee12$(_context12) {
|
2379
2406
|
while (1) {
|
@@ -2423,13 +2450,13 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2423
2450
|
}));
|
2424
2451
|
|
2425
2452
|
return function commit(_x7) {
|
2426
|
-
return
|
2453
|
+
return _ref22.apply(this, arguments);
|
2427
2454
|
};
|
2428
2455
|
}();
|
2429
2456
|
|
2430
2457
|
handleUserInputs(promises);
|
2431
2458
|
|
2432
|
-
case
|
2459
|
+
case 7:
|
2433
2460
|
case 'end':
|
2434
2461
|
return _context14.stop();
|
2435
2462
|
}
|
@@ -2474,7 +2501,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2474
2501
|
};
|
2475
2502
|
|
2476
2503
|
_this2.inputPwd = function () {
|
2477
|
-
var
|
2504
|
+
var _ref24 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee15(paymode) {
|
2478
2505
|
var that, confirmPwd;
|
2479
2506
|
return _regenerator2.default.wrap(function _callee15$(_context15) {
|
2480
2507
|
while (1) {
|
@@ -2490,8 +2517,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2490
2517
|
// if (v !== '') {
|
2491
2518
|
modal.destroy();
|
2492
2519
|
|
2493
|
-
var
|
2494
|
-
confirmPwd =
|
2520
|
+
var _ref25 = that.state || {},
|
2521
|
+
confirmPwd = _ref25.confirmPwd;
|
2495
2522
|
|
2496
2523
|
setTimeout(function () {
|
2497
2524
|
paymode.authCode = v;
|
@@ -2582,8 +2609,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2582
2609
|
type: 'primary', size: 'large', onClick: function onClick() {
|
2583
2610
|
var v = (0, _trim3.default)(that['inputAmount']['input']['value']);
|
2584
2611
|
|
2585
|
-
var
|
2586
|
-
confirmPwd =
|
2612
|
+
var _ref26 = that.state || {},
|
2613
|
+
confirmPwd = _ref26.confirmPwd;
|
2587
2614
|
// if (v !== '') {
|
2588
2615
|
|
2589
2616
|
|
@@ -2624,12 +2651,12 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2624
2651
|
}));
|
2625
2652
|
|
2626
2653
|
return function (_x9) {
|
2627
|
-
return
|
2654
|
+
return _ref24.apply(this, arguments);
|
2628
2655
|
};
|
2629
2656
|
}();
|
2630
2657
|
|
2631
2658
|
_this2.btnDebounced = function () {
|
2632
|
-
var
|
2659
|
+
var _ref27 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee16(type, bquick) {
|
2633
2660
|
var IdbusiType, CustomerPhone, DistributionMode, Address, isEnableSerialNumber, resultObj, title, _enumController$getEn23, PayStyle, _this2$store8, paymode, brefund, boriginReturn, newStyle, status;
|
2634
2661
|
|
2635
2662
|
return _regenerator2.default.wrap(function _callee16$(_context16) {
|
@@ -2736,14 +2763,14 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2736
2763
|
}));
|
2737
2764
|
|
2738
2765
|
return function (_x10, _x11) {
|
2739
|
-
return
|
2766
|
+
return _ref27.apply(this, arguments);
|
2740
2767
|
};
|
2741
2768
|
}();
|
2742
2769
|
|
2743
2770
|
_this2.onCzkChange = function (v) {
|
2744
2771
|
// console.log("czk change:"+new Date().toLocaleTimeString())
|
2745
|
-
var
|
2746
|
-
isNewRetailBCPos =
|
2772
|
+
var _ref28 = _mutantsUtil.platform || {},
|
2773
|
+
isNewRetailBCPos = _ref28.isNewRetailBCPos;
|
2747
2774
|
|
2748
2775
|
if (!isNewRetailBCPos) {
|
2749
2776
|
_this2.store.paymode.currentMode.member.setCardNo(v);
|
@@ -3352,12 +3379,12 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
3352
3379
|
|
3353
3380
|
_this2.hasElectron = hasElectron;
|
3354
3381
|
|
3355
|
-
var
|
3356
|
-
MemberMeStorageCardInputByKeyBoard =
|
3357
|
-
ICCardServer =
|
3358
|
-
ICCardPassword =
|
3359
|
-
PreSellOrBook =
|
3360
|
-
PercentageWhenBook =
|
3382
|
+
var _ref29 = _mutantsMicrofx.stores.user.options.get('loginInfo') || {},
|
3383
|
+
MemberMeStorageCardInputByKeyBoard = _ref29.MemberMeStorageCardInputByKeyBoard,
|
3384
|
+
ICCardServer = _ref29.ICCardServer,
|
3385
|
+
ICCardPassword = _ref29.ICCardPassword,
|
3386
|
+
PreSellOrBook = _ref29.PreSellOrBook,
|
3387
|
+
PercentageWhenBook = _ref29.PercentageWhenBook;
|
3361
3388
|
|
3362
3389
|
_this2.isStorageCardInputType = MemberMeStorageCardInputByKeyBoard; // 仅储值卡是否禁用键盘输入,'0'为不禁用 '1'为禁用
|
3363
3390
|
_this2.iCCardServer = parseInt(ICCardServer); // 启用IC卡:0为禁用 1为启用
|
@@ -3366,9 +3393,9 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
3366
3393
|
_this2.percentageWhenBook = PercentageWhenBook;
|
3367
3394
|
//移动端环境下,没有读取IC卡的方式。
|
3368
3395
|
|
3369
|
-
var
|
3370
|
-
isHorizontalPad =
|
3371
|
-
isHorizontalSunMi =
|
3396
|
+
var _ref30 = _mutantsUtil.platform || {},
|
3397
|
+
isHorizontalPad = _ref30.isHorizontalPad,
|
3398
|
+
isHorizontalSunMi = _ref30.isHorizontalSunMi;
|
3372
3399
|
|
3373
3400
|
_this2.isHorizontalPad = !!isHorizontalPad;
|
3374
3401
|
_this2.isHorizontalSunMi = !!isHorizontalSunMi;
|
@@ -3485,6 +3512,20 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
3485
3512
|
|
3486
3513
|
//jfdx
|
3487
3514
|
|
3515
|
+
}, {
|
3516
|
+
key: 'isDjqValidated',
|
3517
|
+
value: function isDjqValidated(key) {
|
3518
|
+
var paymode = this.store.paymode;
|
3519
|
+
|
3520
|
+
var _enumController$getEn32 = _mutantsUtil.enumController.getEnumOj(),
|
3521
|
+
PayStyle = _enumController$getEn32.PayStyle;
|
3522
|
+
|
3523
|
+
if (key === PayStyle.djq && Math.Minus(paymode.received, paymode.amount) > 0) {
|
3524
|
+
_message2.default.warn('实收金额已大于应收金额,不允许使用优惠券');
|
3525
|
+
return false;
|
3526
|
+
}
|
3527
|
+
return true;
|
3528
|
+
}
|
3488
3529
|
|
3489
3530
|
/**
|
3490
3531
|
*
|
@@ -3500,8 +3541,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
3500
3541
|
}, {
|
3501
3542
|
key: 'isNoProductTip',
|
3502
3543
|
value: function isNoProductTip(nonProductMap) {
|
3503
|
-
var
|
3504
|
-
RetailDetails =
|
3544
|
+
var _ref31 = this.context.viewModel.data || {},
|
3545
|
+
RetailDetails = _ref31.RetailDetails;
|
3505
3546
|
|
3506
3547
|
var temphtml = [];
|
3507
3548
|
if ((0, _keys2.default)(nonProductMap).length > 0) {
|
@@ -3575,8 +3616,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
3575
3616
|
}, {
|
3576
3617
|
key: 'onKeyboardChange',
|
3577
3618
|
value: function onKeyboardChange(key) {
|
3578
|
-
var _enumController$
|
3579
|
-
PayStyle = _enumController$
|
3619
|
+
var _enumController$getEn33 = _mutantsUtil.enumController.getEnumOj(),
|
3620
|
+
PayStyle = _enumController$getEn33.PayStyle;
|
3580
3621
|
|
3581
3622
|
if (this.currentInput) {
|
3582
3623
|
if (this.store.paymode.currentMode) {
|
@@ -3597,9 +3638,9 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
3597
3638
|
value: function renderToolbtn(mode, index, bookType) {
|
3598
3639
|
var _this7 = this;
|
3599
3640
|
|
3600
|
-
var _enumController$
|
3601
|
-
PayIcon = _enumController$
|
3602
|
-
PayStyle = _enumController$
|
3641
|
+
var _enumController$getEn34 = _mutantsUtil.enumController.getEnumOj(),
|
3642
|
+
PayIcon = _enumController$getEn34.PayIcon,
|
3643
|
+
PayStyle = _enumController$getEn34.PayStyle;
|
3603
3644
|
|
3604
3645
|
var isReturn = this.props.isReturn;
|
3605
3646
|
var _store = this.store,
|
@@ -3671,11 +3712,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
3671
3712
|
value: function render() {
|
3672
3713
|
var _this8 = this;
|
3673
3714
|
|
3674
|
-
var _enumController$
|
3675
|
-
PayIcon = _enumController$
|
3676
|
-
PayIcon2 = _enumController$
|
3677
|
-
PayStyle = _enumController$
|
3678
|
-
Differentiate = _enumController$
|
3715
|
+
var _enumController$getEn35 = _mutantsUtil.enumController.getEnumOj(),
|
3716
|
+
PayIcon = _enumController$getEn35.PayIcon,
|
3717
|
+
PayIcon2 = _enumController$getEn35.PayIcon2,
|
3718
|
+
PayStyle = _enumController$getEn35.PayStyle,
|
3719
|
+
Differentiate = _enumController$getEn35.Differentiate;
|
3679
3720
|
|
3680
3721
|
var _state2 = this.state,
|
3681
3722
|
btnDissabled = _state2.btnDissabled,
|
@@ -3688,6 +3729,10 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
3688
3729
|
newPassConfirm = _state2.newPassConfirm,
|
3689
3730
|
newPass = _state2.newPass,
|
3690
3731
|
isNotAutoFocus = _state2.isNotAutoFocus;
|
3732
|
+
|
3733
|
+
var _ref32 = _mutantsUtil.platform || {},
|
3734
|
+
isNewRetailBCPos = _ref32.isNewRetailBCPos;
|
3735
|
+
|
3691
3736
|
var _store2 = this.store,
|
3692
3737
|
paymode = _store2.paymode,
|
3693
3738
|
brefund = _store2.brefund,
|
@@ -3772,11 +3817,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
3772
3817
|
quantity4 = 0;
|
3773
3818
|
var sumQuantity = 0; //数量总和的值,包括称重的。
|
3774
3819
|
|
3775
|
-
var
|
3776
|
-
|
3777
|
-
buyQuantity =
|
3778
|
-
|
3779
|
-
returnQuantity =
|
3820
|
+
var _ref33 = quantityDetail || {},
|
3821
|
+
_ref33$buyQuantity = _ref33.buyQuantity,
|
3822
|
+
buyQuantity = _ref33$buyQuantity === undefined ? 0 : _ref33$buyQuantity,
|
3823
|
+
_ref33$returnQuantity = _ref33.returnQuantity,
|
3824
|
+
returnQuantity = _ref33$returnQuantity === undefined ? 0 : _ref33$returnQuantity;
|
3780
3825
|
|
3781
3826
|
var quantityPrecision = (0, _tplusPoslogin.PosInitData)("QuantityPrecision");
|
3782
3827
|
quantityPrecision = quantityPrecision ? parseInt(quantityPrecision) : '';
|
@@ -4661,7 +4706,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
4661
4706
|
return _this8.czkInput = input;
|
4662
4707
|
},
|
4663
4708
|
onKeyDown: function () {
|
4664
|
-
var
|
4709
|
+
var _ref34 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee17(e) {
|
4665
4710
|
var time, _paymode;
|
4666
4711
|
|
4667
4712
|
return _regenerator2.default.wrap(function _callee17$(_context17) {
|
@@ -4717,7 +4762,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
4717
4762
|
}));
|
4718
4763
|
|
4719
4764
|
return function (_x13) {
|
4720
|
-
return
|
4765
|
+
return _ref34.apply(this, arguments);
|
4721
4766
|
};
|
4722
4767
|
}(),
|
4723
4768
|
onFocus: function onFocus(e) {
|
@@ -4774,8 +4819,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
4774
4819
|
_this8.setCurrentModeValue(event.target.value, Math.min(currentMode.maxamount, currentMode.balance));
|
4775
4820
|
},
|
4776
4821
|
defaultValue: currentMode && (0, _utils.getFixedNumber)(brefund ? currentMode.value : Math.min(currentMode.value, currentMode.maxamount, currentMode.balance)),
|
4777
|
-
ref: function ref(
|
4778
|
-
return _this8["inputCzkAmount"] =
|
4822
|
+
ref: function ref(_ref35) {
|
4823
|
+
return _this8["inputCzkAmount"] = _ref35;
|
4779
4824
|
},
|
4780
4825
|
onFocus: function onFocus(e) {
|
4781
4826
|
_this8.inputkey = "inputCzkAmount";
|
@@ -5445,8 +5490,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
5445
5490
|
_this8.setCurrentModeValue(e.target.value, Math.min(currentMode.maxamount, currentMode.member.exchangable));
|
5446
5491
|
},
|
5447
5492
|
defaultValue: currentMode && currentMode.member && (0, _utils.getFixedNumber)(Math.min(currentMode.value, currentMode.maxamount, currentMode.member.exchangable)),
|
5448
|
-
ref: function ref(
|
5449
|
-
return _this8["inputJfdxAmount"] =
|
5493
|
+
ref: function ref(_ref36) {
|
5494
|
+
return _this8["inputJfdxAmount"] = _ref36;
|
5450
5495
|
},
|
5451
5496
|
onFocus: function onFocus(e) {
|
5452
5497
|
_this8.inputkey = "inputJfdxAmount";
|