tplus-components-touch 3.28.2 → 3.28.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/acCitySelect/CitySelect.js +541 -0
- package/dist/components/acCitySelect/CitySelect.js.map +1 -0
- package/dist/components/acCitySelect/CitySelect.less +10 -0
- package/dist/components/acCitySelect/citys.js +1270 -0
- package/dist/components/acCitySelect/citys.js.map +1 -0
- package/dist/components/acCitySelect/index.js +18 -0
- package/dist/components/acCitySelect/index.js.map +1 -0
- package/dist/components/acCitySelect/provinceData.js +40 -0
- package/dist/components/acCitySelect/provinceData.js.map +1 -0
- package/dist/components/addLog/AddLogProcessor.js +49 -0
- package/dist/components/addLog/AddLogProcessor.js.map +1 -0
- package/dist/components/addLog/OperationLogApi.js +125 -0
- package/dist/components/addLog/OperationLogApi.js.map +1 -0
- package/dist/components/autoComplete/index.js +245 -0
- package/dist/components/autoComplete/index.js.map +1 -0
- package/dist/components/autoComplete/index.less +89 -0
- package/dist/components/autoComplete/option.js +75 -0
- package/dist/components/autoComplete/option.js.map +1 -0
- package/dist/components/autoCompleteWithKeyboard/index.js +231 -0
- package/dist/components/autoCompleteWithKeyboard/index.js.map +1 -0
- package/dist/components/autoCompleteWithKeyboard/index.less +8 -0
- package/dist/components/billSearch/api.js +465 -0
- package/dist/components/billSearch/api.js.map +1 -0
- package/dist/components/billSearch/index.js +2201 -0
- package/dist/components/billSearch/index.js.map +1 -0
- package/dist/components/billSearch/index.less +376 -0
- package/dist/components/cloudPrint/BTPrintFormatUtil.js +568 -0
- package/dist/components/cloudPrint/BTPrintFormatUtil.js.map +1 -0
- package/dist/components/cloudPrint/api.js +391 -0
- package/dist/components/cloudPrint/api.js.map +1 -0
- package/dist/components/cloudPrint/index.js +727 -0
- package/dist/components/cloudPrint/index.js.map +1 -0
- package/dist/components/cloudPrint/printDispatch.js +324 -0
- package/dist/components/cloudPrint/printDispatch.js.map +1 -0
- package/dist/components/commonForm/addressPicker/index.js +232 -0
- package/dist/components/commonForm/addressPicker/index.js.map +1 -0
- package/dist/components/commonForm/addressPicker/style.less +11 -0
- package/dist/components/commonForm/autoComplete/index.js +241 -0
- package/dist/components/commonForm/autoComplete/index.js.map +1 -0
- package/dist/components/commonForm/autoComplete/style.less +3 -0
- package/dist/components/commonForm/datePicker/index.js +89 -0
- package/dist/components/commonForm/datePicker/index.js.map +1 -0
- package/dist/components/commonForm/datePicker/style.less +5 -0
- package/dist/components/commonForm/formControl/index.js +143 -0
- package/dist/components/commonForm/formControl/index.js.map +1 -0
- package/dist/components/commonForm/formControl/style.less +0 -0
- package/dist/components/commonForm/index.js +225 -0
- package/dist/components/commonForm/index.js.map +1 -0
- package/dist/components/commonForm/inputNumber/index.js +272 -0
- package/dist/components/commonForm/inputNumber/index.js.map +1 -0
- package/dist/components/commonForm/inputNumber/style.less +11 -0
- package/dist/components/commonForm/radio/index.js +132 -0
- package/dist/components/commonForm/radio/index.js.map +1 -0
- package/dist/components/commonForm/radio/style.less +0 -0
- package/dist/components/commonForm/style.less +2 -0
- package/dist/components/deliverySearch/api.js +355 -0
- package/dist/components/deliverySearch/api.js.map +1 -0
- package/dist/components/deliverySearch/index.js +1218 -0
- package/dist/components/deliverySearch/index.js.map +1 -0
- package/dist/components/deliverySearch/index.less +554 -0
- package/dist/components/form/index.js +310 -0
- package/dist/components/form/index.js.map +1 -0
- package/dist/components/hardwareAPI/index.js +181 -0
- package/dist/components/hardwareAPI/index.js.map +1 -0
- package/dist/components/hotKey/config.js +306 -0
- package/dist/components/hotKey/config.js.map +1 -0
- package/dist/components/hotKey/hotKeyModal.js +479 -0
- package/dist/components/hotKey/hotKeyModal.js.map +1 -0
- package/dist/components/hotKey/index.js +785 -0
- package/dist/components/hotKey/index.js.map +1 -0
- package/dist/components/hotKey/localConfig.js +1021 -0
- package/dist/components/hotKey/localConfig.js.map +1 -0
- package/dist/components/hotKey/style.less +96 -0
- package/dist/components/hotKey/utils.js +135 -0
- package/dist/components/hotKey/utils.js.map +1 -0
- package/dist/components/input/index.js +251 -0
- package/dist/components/input/index.js.map +1 -0
- package/dist/components/input/scanInput.js +98 -0
- package/dist/components/input/scanInput.js.map +1 -0
- package/dist/components/input/scanInput.less +28 -0
- package/dist/components/input/style.less +99 -0
- package/dist/components/input/tplusInput/index.js +81 -0
- package/dist/components/input/tplusInput/index.js.map +1 -0
- package/dist/components/input/tplusInput/inputContent.js +128 -0
- package/dist/components/input/tplusInput/inputContent.js.map +1 -0
- package/dist/components/input/tplusInput/inputs.js +151 -0
- package/dist/components/input/tplusInput/inputs.js.map +1 -0
- package/dist/components/input/tplusInput/style.less +132 -0
- package/dist/components/input/utils/index.js +26 -0
- package/dist/components/input/utils/index.js.map +1 -0
- package/dist/components/inventorySearch/api.js +214 -0
- package/dist/components/inventorySearch/api.js.map +1 -0
- package/dist/components/inventorySearch/index.js +303 -0
- package/dist/components/inventorySearch/index.js.map +1 -0
- package/dist/components/inventorySearch/index.less +120 -0
- package/dist/components/inventorySearch/store.js +363 -0
- package/dist/components/inventorySearch/store.js.map +1 -0
- package/dist/components/inventorySearch/tab.js +273 -0
- package/dist/components/inventorySearch/tab.js.map +1 -0
- package/dist/components/keyboard/index.js +255 -0
- package/dist/components/keyboard/index.js.map +1 -0
- package/dist/components/keyboard/index.less +470 -0
- package/dist/components/keyboard/letterKeyboard.js +210 -0
- package/dist/components/keyboard/letterKeyboard.js.map +1 -0
- package/dist/components/keyboard/numKeyboard.js +459 -0
- package/dist/components/keyboard/numKeyboard.js.map +1 -0
- package/dist/components/keyboard/numKeyboardScan.js +195 -0
- package/dist/components/keyboard/numKeyboardScan.js.map +1 -0
- package/dist/components/keyboard/numberButton_input.js +303 -0
- package/dist/components/keyboard/numberButton_input.js.map +1 -0
- package/dist/components/keyboard/numkeyboardPassword.js +460 -0
- package/dist/components/keyboard/numkeyboardPassword.js.map +1 -0
- package/dist/components/keyboard/onlyKeyboard.js +90 -0
- package/dist/components/keyboard/onlyKeyboard.js.map +1 -0
- package/dist/components/keyboard/onlyLetterButton.js +187 -0
- package/dist/components/keyboard/onlyLetterButton.js.map +1 -0
- package/dist/components/keyboard/onlyLetterButton2.js +235 -0
- package/dist/components/keyboard/onlyLetterButton2.js.map +1 -0
- package/dist/components/keyboard/onlyLetterButton2.less +162 -0
- package/dist/components/keyboard/onlyNumberButton.js +128 -0
- package/dist/components/keyboard/onlyNumberButton.js.map +1 -0
- package/dist/components/keyboard/onlyNumberButton2.js +115 -0
- package/dist/components/keyboard/onlyNumberButton2.js.map +1 -0
- package/dist/components/keyboard/textKeyboard.js +50 -0
- package/dist/components/keyboard/textKeyboard.js.map +1 -0
- package/dist/components/layout/hamburger.js +29 -0
- package/dist/components/layout/hamburger.js.map +1 -0
- package/dist/components/layout/index.js +31 -0
- package/dist/components/layout/index.js.map +1 -0
- package/dist/components/layout/layout.js +182 -0
- package/dist/components/layout/layout.js.map +1 -0
- package/dist/components/layout/sider.js +165 -0
- package/dist/components/layout/sider.js.map +1 -0
- package/dist/components/layout/style.less +82 -0
- package/dist/components/loading/index.js +198 -0
- package/dist/components/loading/index.js.map +1 -0
- package/dist/components/loading/loadingContent.js +185 -0
- package/dist/components/loading/loadingContent.js.map +1 -0
- package/dist/components/loading/style.less +70 -0
- package/dist/components/loading/utils.js +29 -0
- package/dist/components/loading/utils.js.map +1 -0
- package/dist/components/message/index.js +311 -0
- package/dist/components/message/index.js.map +1 -0
- package/dist/components/message/index.less +101 -0
- package/dist/components/modal/index.js +93 -0
- package/dist/components/modal/index.js.map +1 -0
- package/dist/components/modal/index.less +19 -0
- package/dist/components/modalVertical/index.js +325 -0
- package/dist/components/modalVertical/index.js.map +1 -0
- package/dist/components/modalVertical/style.less +60 -0
- package/dist/components/modalWraper/index.js +470 -0
- package/dist/components/modalWraper/index.js.map +1 -0
- package/dist/components/modalWraper/style.less +257 -0
- package/dist/components/modalWraper/utils.js +48 -0
- package/dist/components/modalWraper/utils.js.map +1 -0
- package/dist/components/notification/index.js +119 -0
- package/dist/components/notification/index.js.map +1 -0
- package/dist/components/notification/index.less +52 -0
- package/dist/components/overflowTip/index.js +269 -0
- package/dist/components/overflowTip/index.js.map +1 -0
- package/dist/components/overflowTip/style.less +66 -0
- package/dist/components/page/index.js +49 -0
- package/dist/components/page/index.js.map +1 -0
- package/dist/components/page/index.less +22 -0
- package/dist/components/product/detail.js +148 -0
- package/dist/components/product/detail.js.map +1 -0
- package/dist/components/product/getCard.js +145 -0
- package/dist/components/product/getCard.js.map +1 -0
- package/dist/components/product/index.less +128 -0
- package/dist/components/progressState/EmptyAndErrorView.js +143 -0
- package/dist/components/progressState/EmptyAndErrorView.js.map +1 -0
- package/dist/components/progressState/ProgressState.js +157 -0
- package/dist/components/progressState/ProgressState.js.map +1 -0
- package/dist/components/progressState/index.js +14 -0
- package/dist/components/progressState/index.js.map +1 -0
- package/dist/components/progressState/style.less +65 -0
- package/dist/components/scan/index.js +219 -0
- package/dist/components/scan/index.js.map +1 -0
- package/dist/components/scan/index.less +34 -0
- package/dist/components/select/index.js +28 -0
- package/dist/components/select/index.js.map +1 -0
- package/dist/components/select/index.less +12 -0
- package/dist/components/settlement/asyncModal.js +204 -0
- package/dist/components/settlement/asyncModal.js.map +1 -0
- package/dist/components/settlement/index.js +16 -0
- package/dist/components/settlement/index.js.map +1 -0
- 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 +5474 -0
- package/dist/components/settlement/settlement.js.map +1 -0
- package/dist/components/settlement/settlement.less +1595 -0
- package/dist/components/settlement/settlementStore.js +2117 -0
- package/dist/components/settlement/settlementStore.js.map +1 -0
- package/dist/components/settlement/utils.js +249 -0
- package/dist/components/settlement/utils.js.map +1 -0
- package/dist/components/socket/index.js +221 -0
- package/dist/components/socket/index.js.map +1 -0
- package/dist/components/spin/index.js +95 -0
- package/dist/components/spin/index.js.map +1 -0
- package/dist/components/spin/spin-style.less +436 -0
- package/dist/components/test/index.js +330 -0
- package/dist/components/test/index.js.map +1 -0
- package/dist/components/ticon/iconfont/demo.css +539 -0
- package/dist/components/ticon/iconfont/demo_index.html +5202 -0
- package/dist/components/ticon/iconfont/iconfont.css +887 -0
- package/dist/components/ticon/iconfont/iconfont.eot +0 -0
- package/dist/components/ticon/iconfont/iconfont.js +35 -0
- package/dist/components/ticon/iconfont/iconfont.js.map +1 -0
- package/dist/components/ticon/iconfont/iconfont.json +1535 -0
- package/dist/components/ticon/iconfont/iconfont.svg +593 -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/components/ticon/index.js +60 -0
- package/dist/components/ticon/index.js.map +1 -0
- package/dist/components/touchScroll/index.js +182 -0
- package/dist/components/touchScroll/index.js.map +1 -0
- package/dist/components/touchTable/AuthProcess.js +42 -0
- package/dist/components/touchTable/AuthProcess.js.map +1 -0
- package/dist/components/touchTable/generateWater.js +59 -0
- package/dist/components/touchTable/generateWater.js.map +1 -0
- package/dist/components/touchTable/index.js +1110 -0
- package/dist/components/touchTable/index.js.map +1 -0
- package/dist/components/touchTable/index.less +370 -0
- package/dist/components/touchTable/utils.js +14 -0
- package/dist/components/touchTable/utils.js.map +1 -0
- package/dist/demo/PopOverDemo.js +126 -0
- package/dist/demo/PopOverDemo.js.map +1 -0
- package/dist/index.js +266 -0
- package/dist/index.js.map +1 -0
- package/dist/util/tools.js +200 -0
- package/dist/util/tools.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
var _extends2 = require('babel-runtime/helpers/extends');
|
|
8
|
+
|
|
9
|
+
var _extends3 = _interopRequireDefault(_extends2);
|
|
10
|
+
|
|
11
|
+
var _slicedToArray2 = require('babel-runtime/helpers/slicedToArray');
|
|
12
|
+
|
|
13
|
+
var _slicedToArray3 = _interopRequireDefault(_slicedToArray2);
|
|
14
|
+
|
|
15
|
+
var _objectWithoutProperties2 = require('babel-runtime/helpers/objectWithoutProperties');
|
|
16
|
+
|
|
17
|
+
var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
|
|
18
|
+
|
|
19
|
+
exports.default = InputContent;
|
|
20
|
+
|
|
21
|
+
var _react = require('react');
|
|
22
|
+
|
|
23
|
+
var _react2 = _interopRequireDefault(_react);
|
|
24
|
+
|
|
25
|
+
var _index = require('../../../index');
|
|
26
|
+
|
|
27
|
+
var _inputs = require('./inputs');
|
|
28
|
+
|
|
29
|
+
var _inputs2 = _interopRequireDefault(_inputs);
|
|
30
|
+
|
|
31
|
+
var _utils = require('../utils');
|
|
32
|
+
|
|
33
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
34
|
+
|
|
35
|
+
function InputContent(props) {
|
|
36
|
+
var prefix = props.prefix,
|
|
37
|
+
suffix = props.suffix,
|
|
38
|
+
_props$style = props.style,
|
|
39
|
+
style = _props$style === undefined ? {} : _props$style,
|
|
40
|
+
_props$className = props.className,
|
|
41
|
+
className = _props$className === undefined ? '' : _props$className,
|
|
42
|
+
title = props.title,
|
|
43
|
+
bottomLine = props.bottomLine,
|
|
44
|
+
error = props.error,
|
|
45
|
+
onClick = props.onClick,
|
|
46
|
+
selectPlaceholder = props.selectPlaceholder,
|
|
47
|
+
arrowPlaceholder = props.arrowPlaceholder,
|
|
48
|
+
_props$arrowPlacehold = props.arrowPlaceholderClass,
|
|
49
|
+
arrowPlaceholderClass = _props$arrowPlacehold === undefined ? '' : _props$arrowPlacehold,
|
|
50
|
+
vertical = props.vertical,
|
|
51
|
+
prop = (0, _objectWithoutProperties3.default)(props, ['prefix', 'suffix', 'style', 'className', 'title', 'bottomLine', 'error', 'onClick', 'selectPlaceholder', 'arrowPlaceholder', 'arrowPlaceholderClass', 'vertical']);
|
|
52
|
+
|
|
53
|
+
var _useState = (0, _react.useState)(false),
|
|
54
|
+
_useState2 = (0, _slicedToArray3.default)(_useState, 2),
|
|
55
|
+
isFocus = _useState2[0],
|
|
56
|
+
setFocus = _useState2[1];
|
|
57
|
+
|
|
58
|
+
var nativeFocus = function nativeFocus(e) {
|
|
59
|
+
setFocus(true);
|
|
60
|
+
};
|
|
61
|
+
var nativeBlur = function nativeBlur(e) {
|
|
62
|
+
setFocus(false);
|
|
63
|
+
};
|
|
64
|
+
var handleClick = function handleClick(e) {
|
|
65
|
+
onClick && onClick(e);
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
var createIcon = function createIcon(icon, className) {
|
|
69
|
+
if (!icon) return;
|
|
70
|
+
var iconNode = void 0;
|
|
71
|
+
if (typeof icon === 'string') {
|
|
72
|
+
iconNode = _react2.default.createElement(_index.Ticon, {
|
|
73
|
+
icon: icon,
|
|
74
|
+
className: 'tplus-input-icon'
|
|
75
|
+
});
|
|
76
|
+
} else {
|
|
77
|
+
iconNode = icon;
|
|
78
|
+
}
|
|
79
|
+
return _react2.default.createElement(
|
|
80
|
+
'span',
|
|
81
|
+
{ className: className },
|
|
82
|
+
iconNode
|
|
83
|
+
);
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
var FormControlClass = function FormControlClass() {
|
|
87
|
+
var classes = ['tplus-input'];
|
|
88
|
+
prefix && classes.push('has-prefix-icon');
|
|
89
|
+
suffix && classes.push('has-suffix-icon');
|
|
90
|
+
return classes.join(' ');
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
var inputClassName = FormControlClass();
|
|
94
|
+
var bottomLineClass = bottomLine && ['native', 'select'].includes(props.type) ? 'tplus-input-bottom-line' : '';
|
|
95
|
+
var inputIsFocusClass = props.type === 'native' && isFocus ? 'tplus-input-focus' : 'tplus-input-blur';
|
|
96
|
+
var inputDisabledClass = props.disabled ? 'tplus-input-disabled' : '';
|
|
97
|
+
var inputIsError = error ? 'tplus-input-error' : '';
|
|
98
|
+
|
|
99
|
+
var classNames = (0, _utils.generatorClass)('tplus-input-wrapper', className, inputIsFocusClass, inputIsError, bottomLineClass, inputDisabledClass);
|
|
100
|
+
return _react2.default.createElement(
|
|
101
|
+
'div',
|
|
102
|
+
{ className: 'tplus-input-container ' + (vertical ? 'vertical-input-container' : '') },
|
|
103
|
+
title && _react2.default.createElement(
|
|
104
|
+
'span',
|
|
105
|
+
{ className: 'tplus-input-title' },
|
|
106
|
+
title
|
|
107
|
+
),
|
|
108
|
+
_react2.default.createElement(
|
|
109
|
+
'div',
|
|
110
|
+
{ className: classNames, onClick: handleClick, style: style },
|
|
111
|
+
createIcon(prefix, 'tplus-input-icon tplus-input-prefix'),
|
|
112
|
+
selectPlaceholder && _react2.default.createElement('div', { className: 'tplus-select-placeholder' }),
|
|
113
|
+
_react2.default.createElement(_inputs2.default, (0, _extends3.default)({
|
|
114
|
+
className: inputClassName,
|
|
115
|
+
nativeFocus: nativeFocus,
|
|
116
|
+
nativeBlur: nativeBlur
|
|
117
|
+
}, prop)),
|
|
118
|
+
arrowPlaceholder && _react2.default.createElement('div', { className: 'tplus-select-arrow-placeholder ' + arrowPlaceholderClass }),
|
|
119
|
+
createIcon(suffix, 'tplus-input-icon tplus-input-suffix'),
|
|
120
|
+
error && _react2.default.createElement(
|
|
121
|
+
'p',
|
|
122
|
+
{ className: 'tplus-input-error-text' },
|
|
123
|
+
error
|
|
124
|
+
)
|
|
125
|
+
)
|
|
126
|
+
);
|
|
127
|
+
}
|
|
128
|
+
//# sourceMappingURL=inputContent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["tplus-components-touch/components/input/tplusInput/inputContent.js"],"names":["InputContent","props","prefix","suffix","style","className","title","bottomLine","error","onClick","selectPlaceholder","arrowPlaceholder","arrowPlaceholderClass","vertical","prop","isFocus","setFocus","nativeFocus","e","nativeBlur","handleClick","createIcon","icon","iconNode","FormControlClass","classes","push","join","inputClassName","bottomLineClass","includes","type","inputIsFocusClass","inputDisabledClass","disabled","inputIsError","classNames"],"mappings":";;;;;;;;;;;;;;;;;;kBAKwBA,Y;;AALxB;;;;AACA;;AACA;;;;AACA;;;;AAEe,SAASA,YAAT,CAAsBC,KAAtB,EAA6B;AAAA,MACnCC,MADmC,GAE8CD,KAF9C,CACnCC,MADmC;AAAA,MAC3BC,MAD2B,GAE8CF,KAF9C,CAC3BE,MAD2B;AAAA,qBAE8CF,KAF9C,CACnBG,KADmB;AAAA,MACnBA,KADmB,gCACX,EADW;AAAA,yBAE8CH,KAF9C,CACPI,SADO;AAAA,MACPA,SADO,oCACK,EADL;AAAA,MACSC,KADT,GAE8CL,KAF9C,CACSK,KADT;AAAA,MACgBC,UADhB,GAE8CN,KAF9C,CACgBM,UADhB;AAAA,MAC4BC,KAD5B,GAE8CP,KAF9C,CAC4BO,KAD5B;AAAA,MACmCC,OADnC,GAE8CR,KAF9C,CACmCQ,OADnC;AAAA,MAExCC,iBAFwC,GAE8CT,KAF9C,CAExCS,iBAFwC;AAAA,MAErBC,gBAFqB,GAE8CV,KAF9C,CAErBU,gBAFqB;AAAA,8BAE8CV,KAF9C,CAEHW,qBAFG;AAAA,MAEHA,qBAFG,yCAEqB,EAFrB;AAAA,MAEyBC,QAFzB,GAE8CZ,KAF9C,CAEyBY,QAFzB;AAAA,MAEsCC,IAFtC,0CAE8Cb,KAF9C;;AAAA,kBAGd,qBAAS,KAAT,CAHc;AAAA;AAAA,MAGnCc,OAHmC;AAAA,MAG1BC,QAH0B;;AAK1C,MAAMC,cAAc,SAAdA,WAAc,CAACC,CAAD,EAAO;AACzBF,aAAS,IAAT;AACD,GAFD;AAGA,MAAMG,aAAa,SAAbA,UAAa,CAACD,CAAD,EAAO;AACxBF,aAAS,KAAT;AACD,GAFD;AAGA,MAAMI,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EAA5E,CAAL;AACLP,aAAS;AAAA;AAAA,QAAM,WAAU,mBAAhB;AAAqCA;AAArC,KADJ;AAEN;AAAA;AAAA,QAAK,WAAW8B,UAAhB,EAA4B,SAAShB,WAArC,EAAkD,OAAOhB,KAAzD;AACGiB,iBAAWnB,MAAX,EAAmB,qCAAnB,CADH;AAEGQ,2BAAqB,uCAAK,WAAU,0BAAf,GAFxB;AAGE,oCAAC,gBAAD;AACE,mBAAWkB,cADb;AAEE,qBAAaX,WAFf;AAGE,oBAAYE;AAHd,SAIML,IAJN,EAHF;AASGH,0BAAoB,uCAAK,+CAA6CC,qBAAlD,GATvB;AAUGS,iBAAWlB,MAAX,EAAmB,qCAAnB,CAVH;AAWGK,eAAS;AAAA;AAAA,UAAG,WAAU,wBAAb;AAAuCA;AAAvC;AAXZ;AAFM,GAAR;AAgBD","file":"inputContent.js","sourcesContent":["import React, {useState, useEffect} from 'react';\nimport {Ticon} from '../../../index';\nimport Inputs from './inputs';\nimport {generatorClass} from '../utils';\n\nexport default function InputContent(props) {\n const {prefix, suffix, style = {}, className = '', title, bottomLine, error, onClick,\n selectPlaceholder, arrowPlaceholder, arrowPlaceholderClass = '', vertical, ...prop} = props;\n const [isFocus, setFocus] = useState(false);\n\n const nativeFocus = (e) => {\n setFocus(true);\n }\n const nativeBlur = (e) => {\n setFocus(false);\n }\n const handleClick = (e) => {\n onClick && onClick(e);\n }\n\n const createIcon = (icon, className) => {\n if (!icon) return;\n let iconNode;\n if (typeof icon === 'string') {\n iconNode = <Ticon\n icon={icon}\n className='tplus-input-icon'\n />\n } else {\n iconNode = icon;\n }\n return <span className={className}>{iconNode}</span>;\n };\n\n const FormControlClass = () => {\n const classes = ['tplus-input'];\n prefix && classes.push('has-prefix-icon');\n suffix && classes.push('has-suffix-icon');\n return classes.join(' ');\n };\n\n const inputClassName = FormControlClass();\n const bottomLineClass = bottomLine && ['native', 'select'].includes(props.type) ? 'tplus-input-bottom-line' : '';\n const inputIsFocusClass = (props.type === 'native' && isFocus) ? 'tplus-input-focus' : 'tplus-input-blur';\n const inputDisabledClass = props.disabled ? 'tplus-input-disabled' : '';\n const inputIsError = error ? 'tplus-input-error' : '';\n\n const classNames = generatorClass('tplus-input-wrapper', className, inputIsFocusClass, inputIsError, bottomLineClass, inputDisabledClass);\n return (<div className={`tplus-input-container ${vertical ? 'vertical-input-container' : ''}`}>\n {title && <span className='tplus-input-title'>{title}</span>}\n <div className={classNames} onClick={handleClick} style={style}>\n {createIcon(prefix, 'tplus-input-icon tplus-input-prefix')}\n {selectPlaceholder && <div className='tplus-select-placeholder' />}\n <Inputs\n className={inputClassName}\n nativeFocus={nativeFocus}\n nativeBlur={nativeBlur}\n {...prop}\n />\n {arrowPlaceholder && <div className={`tplus-select-arrow-placeholder ${arrowPlaceholderClass}`} />}\n {createIcon(suffix, 'tplus-input-icon tplus-input-suffix')}\n {error && <p className='tplus-input-error-text'>{error}</p>}\n </div>\n </div>);\n}\n\n"]}
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
var _input = require('antd/es/input');
|
|
8
|
+
|
|
9
|
+
var _input2 = _interopRequireDefault(_input);
|
|
10
|
+
|
|
11
|
+
var _select = require('antd/es/select');
|
|
12
|
+
|
|
13
|
+
var _select2 = _interopRequireDefault(_select);
|
|
14
|
+
|
|
15
|
+
var _extends2 = require('babel-runtime/helpers/extends');
|
|
16
|
+
|
|
17
|
+
var _extends3 = _interopRequireDefault(_extends2);
|
|
18
|
+
|
|
19
|
+
var _objectWithoutProperties2 = require('babel-runtime/helpers/objectWithoutProperties');
|
|
20
|
+
|
|
21
|
+
var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
|
|
22
|
+
|
|
23
|
+
exports.default = Inputs;
|
|
24
|
+
|
|
25
|
+
require('antd/es/input/style');
|
|
26
|
+
|
|
27
|
+
require('antd/es/select/style');
|
|
28
|
+
|
|
29
|
+
var _react = require('react');
|
|
30
|
+
|
|
31
|
+
var _react2 = _interopRequireDefault(_react);
|
|
32
|
+
|
|
33
|
+
var _index = require('../../../index');
|
|
34
|
+
|
|
35
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
36
|
+
|
|
37
|
+
var NativeInput = function NativeInput(props) {
|
|
38
|
+
var placeholder = props.placeholder,
|
|
39
|
+
onChange = props.onChange,
|
|
40
|
+
value = props.value,
|
|
41
|
+
onFocus = props.onFocus,
|
|
42
|
+
onBlur = props.onBlur,
|
|
43
|
+
noAutocomplete = props.noAutocomplete,
|
|
44
|
+
nativeFocus = props.nativeFocus,
|
|
45
|
+
nativeBlur = props.nativeBlur,
|
|
46
|
+
password = props.password,
|
|
47
|
+
_props$disabled = props.disabled,
|
|
48
|
+
disabled = _props$disabled === undefined ? false : _props$disabled,
|
|
49
|
+
className = props.className,
|
|
50
|
+
inputRef = props.inputRef,
|
|
51
|
+
_props$htmlType = props.htmlType,
|
|
52
|
+
htmlType = _props$htmlType === undefined ? 'text' : _props$htmlType,
|
|
53
|
+
_props$size = props.size,
|
|
54
|
+
size = _props$size === undefined ? '' : _props$size,
|
|
55
|
+
onClear = props.onClear,
|
|
56
|
+
prop = (0, _objectWithoutProperties3.default)(props, ['placeholder', 'onChange', 'value', 'onFocus', 'onBlur', 'noAutocomplete', 'nativeFocus', 'nativeBlur', 'password', 'disabled', 'className', 'inputRef', 'htmlType', 'size', 'onClear']);
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
var handleChange = function handleChange(e) {
|
|
60
|
+
onChange && onChange(e);
|
|
61
|
+
};
|
|
62
|
+
var handleFocus = function handleFocus(e) {
|
|
63
|
+
nativeFocus();
|
|
64
|
+
onFocus && onFocus(e);
|
|
65
|
+
};
|
|
66
|
+
var handleBlur = function handleBlur(e) {
|
|
67
|
+
nativeBlur();
|
|
68
|
+
onBlur && onBlur(e);
|
|
69
|
+
};
|
|
70
|
+
var clearValue = function clearValue(e) {
|
|
71
|
+
onClear && onClear(e);
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
var classNames = 'tplus-inout-native ' + className;
|
|
75
|
+
switch (size) {
|
|
76
|
+
case 'sm':
|
|
77
|
+
classNames += ' sm';
|
|
78
|
+
break;
|
|
79
|
+
case 'lg':
|
|
80
|
+
classNames += ' lg';
|
|
81
|
+
break;
|
|
82
|
+
default:
|
|
83
|
+
classNames += ' md';
|
|
84
|
+
}
|
|
85
|
+
var isPassword = password ? { type: 'password' } : {};
|
|
86
|
+
return _react2.default.createElement(
|
|
87
|
+
_react.Fragment,
|
|
88
|
+
null,
|
|
89
|
+
!!noAutocomplete && _react2.default.createElement(NoAutocomplete, null),
|
|
90
|
+
_react2.default.createElement('input', (0, _extends3.default)({
|
|
91
|
+
ref: function ref(input) {
|
|
92
|
+
textInput = input;
|
|
93
|
+
}
|
|
94
|
+
}, isPassword, {
|
|
95
|
+
placeholder: placeholder,
|
|
96
|
+
disabled: disabled,
|
|
97
|
+
onChange: handleChange,
|
|
98
|
+
value: value,
|
|
99
|
+
onFocus: handleFocus,
|
|
100
|
+
onBlur: handleBlur,
|
|
101
|
+
className: classNames,
|
|
102
|
+
ref: inputRef,
|
|
103
|
+
type: htmlType
|
|
104
|
+
}, prop)),
|
|
105
|
+
onClear && !!(value || '').length && _react2.default.createElement(_index.Ticon, {
|
|
106
|
+
icon: 'guanbi-yuan',
|
|
107
|
+
className: 'tplus-input-icon tplus-input-clear',
|
|
108
|
+
onClick: clearValue,
|
|
109
|
+
style: { fontSize: 14 }
|
|
110
|
+
})
|
|
111
|
+
);
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
var NoAutocomplete = function NoAutocomplete(props) {
|
|
115
|
+
return _react2.default.createElement(
|
|
116
|
+
'div',
|
|
117
|
+
{ className: 'tplus-input-noAutocomplete' },
|
|
118
|
+
_react2.default.createElement('input', null),
|
|
119
|
+
_react2.default.createElement('input', { type: 'password' })
|
|
120
|
+
);
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
var SelectInput = function SelectInput(props) {
|
|
124
|
+
var children = props.children,
|
|
125
|
+
prop = (0, _objectWithoutProperties3.default)(props, ['children']);
|
|
126
|
+
|
|
127
|
+
return _react2.default.createElement(
|
|
128
|
+
_select2.default,
|
|
129
|
+
(0, _extends3.default)({ suffixIcon: _react2.default.createElement(_index.Ticon, { type: 'xialaqietu3' }) }, prop),
|
|
130
|
+
children
|
|
131
|
+
);
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
function Inputs(props) {
|
|
135
|
+
var type = props.type,
|
|
136
|
+
prop = (0, _objectWithoutProperties3.default)(props, ['type']);
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
var createInput = function createInput(type) {
|
|
140
|
+
switch (type) {
|
|
141
|
+
case 'native':
|
|
142
|
+
return _react2.default.createElement(NativeInput, prop);
|
|
143
|
+
case 'select':
|
|
144
|
+
return _react2.default.createElement(SelectInput, prop);
|
|
145
|
+
default:
|
|
146
|
+
return _react2.default.createElement(_input2.default, props);
|
|
147
|
+
}
|
|
148
|
+
};
|
|
149
|
+
return createInput(type);
|
|
150
|
+
};
|
|
151
|
+
//# sourceMappingURL=inputs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["tplus-components-touch/components/input/tplusInput/inputs.js"],"names":["Inputs","NativeInput","props","placeholder","onChange","value","onFocus","onBlur","noAutocomplete","nativeFocus","nativeBlur","password","disabled","className","inputRef","htmlType","size","onClear","prop","handleChange","e","handleFocus","handleBlur","clearValue","classNames","isPassword","type","input","textInput","length","fontSize","NoAutocomplete","SelectInput","children","createInput"],"mappings":";;;;;;;;;;;;;;;;;;;;;;kBAuEwBA,M;;;;;;AAvExB;;;;AACA;;;;AAGA,IAAMC,cAAc,SAAdA,WAAc,CAACC,KAAD,EAAW;AAAA,MACtBC,WADsB,GACqKD,KADrK,CACtBC,WADsB;AAA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BR,IADoB,0CACZhB,KADY;;;AAGpC,MAAMgC,cAAc,SAAdA,WAAc,CAACR,IAAD,EAAU;AAC5B,YAAQA,IAAR;AACE,WAAK,QAAL;AACE,eAAO,8BAAC,WAAD,EAAiBR,IAAjB,CAAP;AACF,WAAK,QAAL;AACE,eAAO,8BAAC,WAAD,EAAiBA,IAAjB,CAAP;AACF;AACE,eAAO,+CAAWhB,KAAX,CAAP;AANJ;AAQD,GATD;AAUA,SAAOgC,YAAYR,IAAZ,CAAP;AACD","file":"inputs.js","sourcesContent":["import React, {Fragment} from 'react';\nimport {Ticon} from '../../../index';\nimport { Select, Input } from 'antd';\n\nconst NativeInput = (props) => {\n const {placeholder, onChange, value, onFocus, onBlur, noAutocomplete, nativeFocus, nativeBlur, password, disabled = false, className, inputRef, htmlType = 'text', size = '', onClear, ...prop} = props;\n\n const handleChange = (e) => {\n onChange && onChange(e);\n };\n const handleFocus = (e) => {\n nativeFocus();\n onFocus && onFocus(e);\n };\n const handleBlur = (e) => {\n nativeBlur();\n onBlur && onBlur(e);\n };\n const clearValue = (e) => {\n onClear && onClear(e);\n };\n\n let classNames = `tplus-inout-native ${className}`;\n switch (size) {\n case 'sm':\n classNames += ' sm';\n break;\n case 'lg':\n classNames += ' lg';\n break;\n default:\n classNames += ' md';\n }\n const isPassword = password ? {type: 'password'} : {};\n return <Fragment>\n {!!noAutocomplete && <NoAutocomplete />}\n <input\n ref={(input) => { textInput = input; }}\n {...isPassword}\n placeholder={placeholder}\n disabled={disabled}\n onChange={handleChange}\n value={value}\n onFocus={handleFocus}\n onBlur={handleBlur}\n className={classNames}\n ref={inputRef}\n type={htmlType}\n {...prop}\n />\n {onClear && !!(value || '').length && <Ticon\n icon='guanbi-yuan'\n className='tplus-input-icon tplus-input-clear'\n onClick={clearValue}\n style={{fontSize: 14}}\n />}\n </Fragment>;\n};\n\nconst NoAutocomplete = (props) => {\n return <div className=\"tplus-input-noAutocomplete\">\n <input />\n <input type=\"password\" />\n </div>;\n}\n\nconst SelectInput = (props) => {\n const {children, ...prop} = props;\n return <Select suffixIcon={<Ticon type=\"xialaqietu3\"/>} {...prop}>{children}</Select>;\n};\n\nexport default function Inputs(props) {\n const {type, ...prop} = props;\n\n const createInput = (type) => {\n switch (type) {\n case 'native':\n return <NativeInput {...prop}/>;\n case 'select':\n return <SelectInput {...prop}/>;\n default:\n return <Input {...props}/>;\n }\n };\n return createInput(type);\n};\n\n"]}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
.tplus-input-container{
|
|
2
|
+
display: flex;
|
|
3
|
+
.tplus-input-title{
|
|
4
|
+
flex: 0 0 auto;
|
|
5
|
+
padding: 0px 4px;
|
|
6
|
+
line-height: 32px;
|
|
7
|
+
font-size: 14px;
|
|
8
|
+
text-align: right;
|
|
9
|
+
margin-right: 10px;
|
|
10
|
+
}
|
|
11
|
+
.tplus-input-wrapper{
|
|
12
|
+
flex: 1;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
.tplus-input-noAutocomplete{
|
|
16
|
+
position: fixed;
|
|
17
|
+
top: -999999px;
|
|
18
|
+
}
|
|
19
|
+
.tplus-input-wrapper {
|
|
20
|
+
position: relative;
|
|
21
|
+
display: flex;
|
|
22
|
+
border-radius: 3px;
|
|
23
|
+
height: 34px;
|
|
24
|
+
box-sizing: border-box;
|
|
25
|
+
input{
|
|
26
|
+
border: none;
|
|
27
|
+
outline: none;
|
|
28
|
+
flex: auto;
|
|
29
|
+
background: transparent;
|
|
30
|
+
}
|
|
31
|
+
._tplus-animation-ease_{
|
|
32
|
+
-webkit-transition: all 0.3s ease-in-out;
|
|
33
|
+
-o-transition: all 0.3s ease-in-out;
|
|
34
|
+
transition: all 0.3s ease-in-out;
|
|
35
|
+
};
|
|
36
|
+
._tplus-animation-ease_;
|
|
37
|
+
.tplus-select-arrow-placeholder{
|
|
38
|
+
position: absolute;
|
|
39
|
+
height: 100%;
|
|
40
|
+
width: 20px;
|
|
41
|
+
right: 0px;
|
|
42
|
+
top: 0px;
|
|
43
|
+
z-index: 9;
|
|
44
|
+
cursor: pointer;
|
|
45
|
+
}
|
|
46
|
+
.tplus-input-icon{
|
|
47
|
+
color: rgba(0, 0, 0, 0.25);
|
|
48
|
+
font-size: 16px;
|
|
49
|
+
flex: 0 0 32px;
|
|
50
|
+
line-height: 32px;
|
|
51
|
+
text-align: center;
|
|
52
|
+
}
|
|
53
|
+
input {
|
|
54
|
+
padding: 0px 10px;
|
|
55
|
+
}
|
|
56
|
+
.tplus-input-clear{
|
|
57
|
+
color: #c8c8cd;
|
|
58
|
+
}
|
|
59
|
+
.tplus-input-prefix{
|
|
60
|
+
left: 5px;
|
|
61
|
+
}
|
|
62
|
+
.tplus-input-suffix{
|
|
63
|
+
right: 6px;
|
|
64
|
+
}
|
|
65
|
+
.has-prefix-icon{
|
|
66
|
+
//padding-left: 28px;
|
|
67
|
+
}
|
|
68
|
+
.has-suffix-icon{
|
|
69
|
+
//padding-right: 28px;
|
|
70
|
+
}
|
|
71
|
+
&.tplus-input-disabled{
|
|
72
|
+
cursor: not-allowed;
|
|
73
|
+
input{
|
|
74
|
+
cursor: not-allowed;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
.tplus-input-error-text{
|
|
78
|
+
position: absolute;
|
|
79
|
+
right: 0px;
|
|
80
|
+
bottom: -18px;
|
|
81
|
+
margin: 0px;
|
|
82
|
+
font-size: 12px;
|
|
83
|
+
}
|
|
84
|
+
.tplus-select-placeholder{
|
|
85
|
+
position: absolute;
|
|
86
|
+
left: 0px;
|
|
87
|
+
right: 0px;
|
|
88
|
+
top: 0px;
|
|
89
|
+
bottom: 0px;
|
|
90
|
+
z-index: 9;
|
|
91
|
+
cursor: pointer;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.vertical-input-container{
|
|
96
|
+
.tplus-input-title{
|
|
97
|
+
font-size: 28px;
|
|
98
|
+
line-height: 64px;
|
|
99
|
+
}
|
|
100
|
+
.tplus-input-wrapper{
|
|
101
|
+
height: 64px;
|
|
102
|
+
input{
|
|
103
|
+
font-size: 26px;
|
|
104
|
+
padding: 0px 20px;
|
|
105
|
+
}
|
|
106
|
+
.tplus-input-icon {
|
|
107
|
+
font-size: 32px;
|
|
108
|
+
line-height: 64px;
|
|
109
|
+
}
|
|
110
|
+
.tplus-input-suffix{
|
|
111
|
+
right: 12px;
|
|
112
|
+
position: relative;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
.ant-select{
|
|
117
|
+
.ant-select-arrow{
|
|
118
|
+
.iconfont{
|
|
119
|
+
display: inline-block;
|
|
120
|
+
color: #999;
|
|
121
|
+
font-size: 12px;
|
|
122
|
+
transition: transform .2s ease,-webkit-transform .2s ease;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
&.ant-select-open{
|
|
126
|
+
.ant-select-arrow{
|
|
127
|
+
.iconfont{
|
|
128
|
+
transform: rotate(180deg);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
var _toConsumableArray2 = require('babel-runtime/helpers/toConsumableArray');
|
|
8
|
+
|
|
9
|
+
var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2);
|
|
10
|
+
|
|
11
|
+
exports.generatorClass = generatorClass;
|
|
12
|
+
|
|
13
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
|
+
|
|
15
|
+
function generatorClass() {
|
|
16
|
+
var classes = [];
|
|
17
|
+
[].concat(Array.prototype.slice.call(arguments)).forEach(function (currentArg) {
|
|
18
|
+
if (typeof currentArg === 'string') {
|
|
19
|
+
classes.push(currentArg);
|
|
20
|
+
} else {
|
|
21
|
+
classes.push.apply(classes, (0, _toConsumableArray3.default)(currentArg));
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
return classes.join(' ').trim();
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["tplus-components-touch/components/input/utils/index.js"],"names":["generatorClass","classes","arguments","forEach","currentArg","push","join","trim"],"mappings":";;;;;;;;;;QAAgBA,c,GAAAA,c;;;;AAAT,SAASA,cAAT,GAA0B;AAC/B,MAAIC,UAAU,EAAd;AACA,uCAAIC,SAAJ,GAAeC,OAAf,CAAuB,sBAAc;AACnC,QAAI,OAAOC,UAAP,KAAsB,QAA1B,EAAoC;AAClCH,cAAQI,IAAR,CAAaD,UAAb;AACD,KAFD,MAEO;AACLH,cAAQI,IAAR,iDAAgBD,UAAhB;AACD;AACF,GAND;AAOA,SAAOH,QAAQK,IAAR,CAAa,GAAb,EAAkBC,IAAlB,EAAP;AACD","file":"index.js","sourcesContent":["export function generatorClass() {\n var classes = [];\n [...arguments].forEach(currentArg => {\n if (typeof currentArg === 'string') {\n classes.push(currentArg);\n } else {\n classes.push(...currentArg);\n }\n })\n return classes.join(' ').trim();\n}\n"]}
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = undefined;
|
|
7
|
+
|
|
8
|
+
var _regenerator = require('babel-runtime/regenerator');
|
|
9
|
+
|
|
10
|
+
var _regenerator2 = _interopRequireDefault(_regenerator);
|
|
11
|
+
|
|
12
|
+
var _asyncToGenerator2 = require('babel-runtime/helpers/asyncToGenerator');
|
|
13
|
+
|
|
14
|
+
var _asyncToGenerator3 = _interopRequireDefault(_asyncToGenerator2);
|
|
15
|
+
|
|
16
|
+
var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');
|
|
17
|
+
|
|
18
|
+
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
|
|
19
|
+
|
|
20
|
+
var _createClass2 = require('babel-runtime/helpers/createClass');
|
|
21
|
+
|
|
22
|
+
var _createClass3 = _interopRequireDefault(_createClass2);
|
|
23
|
+
|
|
24
|
+
var _tplusApi = require('tplus-api');
|
|
25
|
+
|
|
26
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
27
|
+
|
|
28
|
+
var InventorySearchApi = function () {
|
|
29
|
+
function InventorySearchApi() {
|
|
30
|
+
(0, _classCallCheck3.default)(this, InventorySearchApi);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
(0, _createClass3.default)(InventorySearchApi, null, [{
|
|
34
|
+
key: 'getPOSSearchDesigns',
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @param {string} ViewName 获取库存栏目
|
|
40
|
+
*/
|
|
41
|
+
value: function () {
|
|
42
|
+
var _ref = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee(ViewName) {
|
|
43
|
+
var result;
|
|
44
|
+
return _regenerator2.default.wrap(function _callee$(_context) {
|
|
45
|
+
while (1) {
|
|
46
|
+
switch (_context.prev = _context.next) {
|
|
47
|
+
case 0:
|
|
48
|
+
_context.next = 2;
|
|
49
|
+
return (0, _tplusApi.tApi)({ ViewName: ViewName }, 'chanjet.RE.newRetail.GetPOSSearchDesigns', false, false);
|
|
50
|
+
|
|
51
|
+
case 2:
|
|
52
|
+
result = _context.sent;
|
|
53
|
+
return _context.abrupt('return', result);
|
|
54
|
+
|
|
55
|
+
case 4:
|
|
56
|
+
case 'end':
|
|
57
|
+
return _context.stop();
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}, _callee, this);
|
|
61
|
+
}));
|
|
62
|
+
|
|
63
|
+
function getPOSSearchDesigns(_x) {
|
|
64
|
+
return _ref.apply(this, arguments);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
return getPOSSearchDesigns;
|
|
68
|
+
}()
|
|
69
|
+
/**
|
|
70
|
+
*
|
|
71
|
+
* @param {object} SearchParams 获取查询库存查询结果
|
|
72
|
+
*/
|
|
73
|
+
|
|
74
|
+
}, {
|
|
75
|
+
key: 'searchInventoryAvailableQuantity',
|
|
76
|
+
value: function () {
|
|
77
|
+
var _ref2 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2(SearchParams) {
|
|
78
|
+
var result;
|
|
79
|
+
return _regenerator2.default.wrap(function _callee2$(_context2) {
|
|
80
|
+
while (1) {
|
|
81
|
+
switch (_context2.prev = _context2.next) {
|
|
82
|
+
case 0:
|
|
83
|
+
_context2.next = 2;
|
|
84
|
+
return (0, _tplusApi.tApi)({ SearchParams: SearchParams }, 'chanjet.AA.DR.NewRetailBaseInfo.SearchInventoryAvailableQuantity', false, false);
|
|
85
|
+
|
|
86
|
+
case 2:
|
|
87
|
+
result = _context2.sent;
|
|
88
|
+
return _context2.abrupt('return', result);
|
|
89
|
+
|
|
90
|
+
case 4:
|
|
91
|
+
case 'end':
|
|
92
|
+
return _context2.stop();
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}, _callee2, this);
|
|
96
|
+
}));
|
|
97
|
+
|
|
98
|
+
function searchInventoryAvailableQuantity(_x2) {
|
|
99
|
+
return _ref2.apply(this, arguments);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
return searchInventoryAvailableQuantity;
|
|
103
|
+
}()
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* POS端查询栏目宽度设置
|
|
107
|
+
* @param {string} ViewType 查询视图名称,支持:Retail,Member,Inventory
|
|
108
|
+
* @param {array} DesignFieldWidth 需要设置的字段和对应宽度
|
|
109
|
+
* DesignFieldWidth说明:
|
|
110
|
+
* 参数名
|
|
111
|
+
* 值类型
|
|
112
|
+
* 说明
|
|
113
|
+
* Key string 字段名
|
|
114
|
+
* Value decimal 字段宽度
|
|
115
|
+
* @returns {bool} 布尔值true|false
|
|
116
|
+
*
|
|
117
|
+
* 示例:
|
|
118
|
+
call:newRetailBaseInfo/SavePOSSearchDesignFieldWidth
|
|
119
|
+
post:
|
|
120
|
+
{
|
|
121
|
+
"POSParam": {
|
|
122
|
+
"ViewType": "Inventory",
|
|
123
|
+
"DesignFieldWidth": [{
|
|
124
|
+
"Key": "InventoryCode",
|
|
125
|
+
"Value": "150"
|
|
126
|
+
}, {
|
|
127
|
+
"Key": "InventoryName",
|
|
128
|
+
"Value": "150"
|
|
129
|
+
}, {
|
|
130
|
+
"Key": "Specification",
|
|
131
|
+
"Value": "150"
|
|
132
|
+
}, {
|
|
133
|
+
"Key": "BarCode",
|
|
134
|
+
"Value": "150"
|
|
135
|
+
}, {
|
|
136
|
+
"Key": "Shorthand",
|
|
137
|
+
"Value": "150"
|
|
138
|
+
}, {
|
|
139
|
+
"Key": "UnitName",
|
|
140
|
+
"Value": "150"
|
|
141
|
+
}, {
|
|
142
|
+
"Key": "Batch",
|
|
143
|
+
"Value": "150"
|
|
144
|
+
}, {
|
|
145
|
+
"Key": "ExpiryDate",
|
|
146
|
+
"Value": "150"
|
|
147
|
+
}, {
|
|
148
|
+
"Key": "ExistingQuantity",
|
|
149
|
+
"Value": "150"
|
|
150
|
+
}, {
|
|
151
|
+
"Key": "AvailableQuantity",
|
|
152
|
+
"Value": "150"
|
|
153
|
+
}]
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
result:true
|
|
157
|
+
*/
|
|
158
|
+
|
|
159
|
+
}, {
|
|
160
|
+
key: 'savePOSSearchDesignFieldWidth',
|
|
161
|
+
value: function () {
|
|
162
|
+
var _ref3 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee3(DesignFieldWidth) {
|
|
163
|
+
var result;
|
|
164
|
+
return _regenerator2.default.wrap(function _callee3$(_context3) {
|
|
165
|
+
while (1) {
|
|
166
|
+
switch (_context3.prev = _context3.next) {
|
|
167
|
+
case 0:
|
|
168
|
+
_context3.next = 2;
|
|
169
|
+
return (0, _tplusApi.tApi)({
|
|
170
|
+
ViewType: Inventory,
|
|
171
|
+
DesignFieldWidth: DesignFieldWidth
|
|
172
|
+
}, 'chanjet.RE.newRetail.SavePOSSearchDesignFieldWidth', false, false);
|
|
173
|
+
|
|
174
|
+
case 2:
|
|
175
|
+
result = _context3.sent;
|
|
176
|
+
return _context3.abrupt('return', result);
|
|
177
|
+
|
|
178
|
+
case 4:
|
|
179
|
+
case 'end':
|
|
180
|
+
return _context3.stop();
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
}, _callee3, this);
|
|
184
|
+
}));
|
|
185
|
+
|
|
186
|
+
function savePOSSearchDesignFieldWidth(_x3) {
|
|
187
|
+
return _ref3.apply(this, arguments);
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
return savePOSSearchDesignFieldWidth;
|
|
191
|
+
}()
|
|
192
|
+
}, {
|
|
193
|
+
key: 'formatNumber',
|
|
194
|
+
value: function formatNumber(number, length) {
|
|
195
|
+
if (number === '' || number === undefined) {
|
|
196
|
+
return number;
|
|
197
|
+
}
|
|
198
|
+
number += '';
|
|
199
|
+
if (length == 0) {
|
|
200
|
+
return parseInt(number);
|
|
201
|
+
}
|
|
202
|
+
if (number.indexOf('.') > 0) {
|
|
203
|
+
number += '0000000000';
|
|
204
|
+
} else {
|
|
205
|
+
number += '.0000000000';
|
|
206
|
+
}
|
|
207
|
+
return number.substring(0, number.indexOf(".") + +length + 1);
|
|
208
|
+
}
|
|
209
|
+
}]);
|
|
210
|
+
return InventorySearchApi;
|
|
211
|
+
}();
|
|
212
|
+
|
|
213
|
+
exports.default = InventorySearchApi;
|
|
214
|
+
//# sourceMappingURL=api.js.map
|