tplus-components-touch 3.54.6 → 3.55.2
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/components/hotKey/localConfig.js +0 -39
- package/dist/components/hotKey/localConfig.js.map +1 -1
- package/dist/components/settlement/settlement.js +651 -663
- package/dist/components/settlement/settlement.js.map +1 -1
- package/dist/components/settlement/settlement.less +0 -27
- package/dist/components/settlement/settlementApi.js +2 -2
- package/dist/components/settlement/settlementApi.js.map +1 -1
- package/dist/components/settlement/settlementStore.js +395 -578
- package/dist/components/settlement/settlementStore.js.map +1 -1
- package/dist/components/ticon/iconfont/demo_index.html +3 -72
- package/dist/components/ticon/iconfont/iconfont.css +3 -15
- package/dist/components/ticon/iconfont/iconfont.js +1 -1
- package/dist/components/ticon/iconfont/iconfont.js.map +1 -1
- package/dist/components/ticon/iconfont/iconfont.json +0 -21
- package/dist/components/ticon/iconfont/iconfont.ttf +0 -0
- package/dist/components/ticon/iconfont/iconfont.woff +0 -0
- package/dist/components/ticon/iconfont/iconfont.woff2 +0 -0
- package/dist/index.js +1 -22
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/dist/components/collection/api.js +0 -105
- package/dist/components/collection/api.js.map +0 -1
- package/dist/components/collection/index.js +0 -484
- package/dist/components/collection/index.js.map +0 -1
- package/dist/components/collection/searchView/index.js +0 -296
- package/dist/components/collection/searchView/index.js.map +0 -1
- package/dist/components/collection/searchView/index.less +0 -134
- package/dist/components/password/ModifyPass.js +0 -426
- package/dist/components/password/ModifyPass.js.map +0 -1
- package/dist/components/password/api.js +0 -100
- package/dist/components/password/api.js.map +0 -1
- package/dist/components/password/confirmPwd.js +0 -212
- package/dist/components/password/confirmPwd.js.map +0 -1
- package/dist/components/password/store.js +0 -282
- package/dist/components/password/store.js.map +0 -1
- package/dist/components/password/style.less +0 -95
@@ -1,212 +0,0 @@
|
|
1
|
-
'use strict';
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports.default = undefined;
|
7
|
-
|
8
|
-
var _input = require('antd/es/input');
|
9
|
-
|
10
|
-
var _input2 = _interopRequireDefault(_input);
|
11
|
-
|
12
|
-
var _getPrototypeOf = require('babel-runtime/core-js/object/get-prototype-of');
|
13
|
-
|
14
|
-
var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
|
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 _possibleConstructorReturn2 = require('babel-runtime/helpers/possibleConstructorReturn');
|
25
|
-
|
26
|
-
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
|
27
|
-
|
28
|
-
var _inherits2 = require('babel-runtime/helpers/inherits');
|
29
|
-
|
30
|
-
var _inherits3 = _interopRequireDefault(_inherits2);
|
31
|
-
|
32
|
-
var _class;
|
33
|
-
|
34
|
-
require('antd/es/input/style');
|
35
|
-
|
36
|
-
var _react = require('react');
|
37
|
-
|
38
|
-
var _react2 = _interopRequireDefault(_react);
|
39
|
-
|
40
|
-
var _mobxReact = require('mobx-react');
|
41
|
-
|
42
|
-
var _store = require('./store');
|
43
|
-
|
44
|
-
var _store2 = _interopRequireDefault(_store);
|
45
|
-
|
46
|
-
var _numkeyboardPassword = require('../keyboard/numkeyboardPassword');
|
47
|
-
|
48
|
-
var _numkeyboardPassword2 = _interopRequireDefault(_numkeyboardPassword);
|
49
|
-
|
50
|
-
var _keyboard = require('../keyboard');
|
51
|
-
|
52
|
-
var _keyboard2 = _interopRequireDefault(_keyboard);
|
53
|
-
|
54
|
-
require('./style.less');
|
55
|
-
|
56
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
57
|
-
|
58
|
-
var ConfirmPwd = (0, _mobxReact.observer)(_class = function (_Component) {
|
59
|
-
(0, _inherits3.default)(ConfirmPwd, _Component);
|
60
|
-
|
61
|
-
function ConfirmPwd(props) {
|
62
|
-
(0, _classCallCheck3.default)(this, ConfirmPwd);
|
63
|
-
|
64
|
-
var _this2 = (0, _possibleConstructorReturn3.default)(this, (ConfirmPwd.__proto__ || (0, _getPrototypeOf2.default)(ConfirmPwd)).call(this, props));
|
65
|
-
|
66
|
-
_this2.setConfirmPwdValue = function (value) {
|
67
|
-
var getConfirmPwd = _this2.props.getConfirmPwd;
|
68
|
-
|
69
|
-
getConfirmPwd && getConfirmPwd(value);
|
70
|
-
};
|
71
|
-
|
72
|
-
_this2.onKeyDown = function (e) {
|
73
|
-
if (!e) return;
|
74
|
-
var input = e.target;
|
75
|
-
var key = e.keyCode;
|
76
|
-
if (key === 13) {
|
77
|
-
var inputs = $.find_element('input');
|
78
|
-
console.log(inputs[0].value, '扫码enter==========');
|
79
|
-
if (!inputs) return;
|
80
|
-
var length = inputs.length;
|
81
|
-
if (length == 0) return;
|
82
|
-
var index = inputs && inputs.findIndex(function (v) {
|
83
|
-
return v == input;
|
84
|
-
});
|
85
|
-
if (index == length - 1) {
|
86
|
-
var ok = _this2.props.ok;
|
87
|
-
|
88
|
-
e.target.value = null;
|
89
|
-
ok && ok();
|
90
|
-
setTimeout(function () {
|
91
|
-
input && input != document.activeElement && input.focus();
|
92
|
-
}, 0);
|
93
|
-
} else {
|
94
|
-
input = inputs[index + 1];
|
95
|
-
input && input != document.activeElement && input.focus();
|
96
|
-
}
|
97
|
-
}
|
98
|
-
};
|
99
|
-
|
100
|
-
_this2.store = new _store2.default();
|
101
|
-
return _this2;
|
102
|
-
}
|
103
|
-
|
104
|
-
(0, _createClass3.default)(ConfirmPwd, [{
|
105
|
-
key: 'componentDidMount',
|
106
|
-
value: function componentDidMount() {}
|
107
|
-
}, {
|
108
|
-
key: 'componentWillUnmount',
|
109
|
-
value: function componentWillUnmount() {
|
110
|
-
_keyboard2.default.close();
|
111
|
-
}
|
112
|
-
}, {
|
113
|
-
key: 'render',
|
114
|
-
value: function render() {
|
115
|
-
var _this3 = this;
|
116
|
-
|
117
|
-
var _props = this.props,
|
118
|
-
_props$params = _props.params,
|
119
|
-
params = _props$params === undefined ? '' : _props$params,
|
120
|
-
amount = _props.amount,
|
121
|
-
labelName = _props.labelName,
|
122
|
-
placeholder = _props.placeholder,
|
123
|
-
maxLength = _props.maxLength,
|
124
|
-
isLimit = _props.isLimit;
|
125
|
-
|
126
|
-
return _react2.default.createElement(
|
127
|
-
'div',
|
128
|
-
{ className: 'scanInput' },
|
129
|
-
params === 'pay' && _react2.default.createElement(
|
130
|
-
'div',
|
131
|
-
null,
|
132
|
-
_react2.default.createElement(
|
133
|
-
'span',
|
134
|
-
{ className: 'label' },
|
135
|
-
'\u5E94\u6536\u91D1\u989D\uFF1A'
|
136
|
-
),
|
137
|
-
_react2.default.createElement(
|
138
|
-
'span',
|
139
|
-
{ className: 'yfje' },
|
140
|
-
amount
|
141
|
-
)
|
142
|
-
),
|
143
|
-
_react2.default.createElement(
|
144
|
-
'div',
|
145
|
-
{ className: 'pwd' },
|
146
|
-
_react2.default.createElement(
|
147
|
-
'span',
|
148
|
-
{ className: 'label' },
|
149
|
-
labelName,
|
150
|
-
'\uFF1A'
|
151
|
-
),
|
152
|
-
_react2.default.createElement(
|
153
|
-
'span',
|
154
|
-
null,
|
155
|
-
isLimit === 'yes' ? _react2.default.createElement(_numkeyboardPassword2.default, {
|
156
|
-
id: 'pwd',
|
157
|
-
className: 'content',
|
158
|
-
placement: 'rightBottom',
|
159
|
-
newType: 'positive',
|
160
|
-
bordered: true,
|
161
|
-
placeholder: placeholder,
|
162
|
-
style: { width: 266, height: 32 },
|
163
|
-
maxLength: this.props.maxLength,
|
164
|
-
ref: function ref(input) {
|
165
|
-
return _this3.inputAmount = input;
|
166
|
-
},
|
167
|
-
onChange: function onChange(value) {
|
168
|
-
return _this3.setConfirmPwdValue(value);
|
169
|
-
}
|
170
|
-
}) : _react2.default.createElement(_input2.default, {
|
171
|
-
id: 'pwd',
|
172
|
-
style: { width: 266, height: 32 },
|
173
|
-
type: 'password',
|
174
|
-
placeholder: placeholder,
|
175
|
-
maxLength: maxLength,
|
176
|
-
ref: function ref(input) {
|
177
|
-
return _this3.inputAmount = input;
|
178
|
-
},
|
179
|
-
bordered: true,
|
180
|
-
onChange: function onChange(e) {
|
181
|
-
_this3.setConfirmPwdValue(e.target.value);
|
182
|
-
},
|
183
|
-
max: maxLength,
|
184
|
-
min: 1,
|
185
|
-
onFocus: function onFocus(e) {
|
186
|
-
var _this = _this3;
|
187
|
-
_this3.input = e.target;
|
188
|
-
_keyboard2.default.open(function (v) {
|
189
|
-
var value = _keyboard2.default.getNewValue(_this3.input, _this3.input.value, v);
|
190
|
-
if (!(value.length > 18)) {
|
191
|
-
_this.setConfirmPwdValue(value);
|
192
|
-
_this3.input.value = value;
|
193
|
-
}
|
194
|
-
})();
|
195
|
-
},
|
196
|
-
onBlur: function onBlur() {
|
197
|
-
return _keyboard2.default.close();
|
198
|
-
},
|
199
|
-
onKeyDown: function onKeyDown(e) {
|
200
|
-
return _this3.onKeyDown(e);
|
201
|
-
}
|
202
|
-
})
|
203
|
-
)
|
204
|
-
)
|
205
|
-
);
|
206
|
-
}
|
207
|
-
}]);
|
208
|
-
return ConfirmPwd;
|
209
|
-
}(_react.Component)) || _class;
|
210
|
-
|
211
|
-
exports.default = ConfirmPwd;
|
212
|
-
//# sourceMappingURL=confirmPwd.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"sources":["tplus-components-touch/components/password/confirmPwd.js"],"names":["ConfirmPwd","observer","props","setConfirmPwdValue","value","getConfirmPwd","onKeyDown","e","input","target","key","keyCode","inputs","$","find_element","console","log","length","index","findIndex","v","ok","setTimeout","document","activeElement","focus","store","Keyboard","close","params","amount","labelName","placeholder","maxLength","isLimit","width","height","inputAmount","_this","open","getNewValue","Component"],"mappings":";;;;;;;;;;;;;;;;;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MD,mBAAK;AAAA,uBAAS,OAAKI,WAAL,GAAmB7B,KAA5B;AAAA,eANJ;AAOD,4BAPC;AAQD,wBAAU,qBAAK;AACb,uBAAKL,kBAAL,CAAwBI,EAAEE,MAAF,CAASL,KAAjC;AACD,eAVA;AAWD,mBAAK6B,SAXJ;AAYD,mBAAK,CAZJ;AAaD,uBAAS,iBAAC1B,CAAD,EAAO;AACd,oBAAI+B,QAAQ,MAAZ;AACA,uBAAK9B,KAAL,GAAaD,EAAEE,MAAf;AACAkB,mCAASY,IAAT,CAAc,UAACnB,CAAD,EAAO;AACnB,sBAAIhB,QAAQuB,mBAASa,WAAT,CAAqB,OAAKhC,KAA1B,EAAiC,OAAKA,KAAL,CAAWJ,KAA5C,EAAmDgB,CAAnD,CAAZ;AACA,sBAAI,EAAEhB,MAAMa,MAAN,GAAe,EAAjB,CAAJ,EAA2B;AACzBqB,0BAAMnC,kBAAN,CAAyBC,KAAzB;AACA,2BAAKI,KAAL,CAAWJ,KAAX,GAAmBA,KAAnB;AACD;AACF,iBAND;AAOD,eAvBA;AAwBD,sBAAQ;AAAA,uBAAOuB,mBAASC,KAAT,EAAP;AAAA,eAxBP;AAyBD,yBAAW;AAAA,uBAAK,OAAKtB,SAAL,CAAeC,CAAf,CAAL;AAAA;AAzBV;AAZT;AAFF;AAJJ,OADF;AAmDD;;;EAhGqCkC,gB;;kBAAnBzC,U","file":"confirmPwd.js","sourcesContent":["import React, { Component } from 'react';\nimport { observer } from 'mobx-react';\nimport store from './store';\nimport NumkeyboardPassword from '../keyboard/numkeyboardPassword'\nimport Keyboard from '../keyboard';\n\nimport './style.less';\nimport { Input } from 'antd';\n\n@observer\nexport default class ConfirmPwd extends Component {\n\n constructor(props) {\n super(props);\n this.store = new store();\n }\n\n componentDidMount() {\n \n }\n\n componentWillUnmount() {\n Keyboard.close();\n }\n\n setConfirmPwdValue = (value) => {\n const { getConfirmPwd } = this.props;\n getConfirmPwd && getConfirmPwd(value);\n }\n\n onKeyDown = (e) => {\n if (!e) return;\n let input = e.target;\n const key = e.keyCode;\n if (key === 13) {\n let inputs = $.find_element('input');\n console.log(inputs[0].value, '扫码enter==========');\n if (!inputs) return;\n let length = inputs.length;\n if (length == 0) return;\n let index = inputs && inputs.findIndex(v => v == input);\n if (index == length - 1) {\n const { ok } = this.props;\n e.target.value = null;\n ok && ok();\n setTimeout(() => { input && input != document.activeElement && input.focus() }, 0)\n } else {\n input = inputs[index + 1];\n input && input != document.activeElement && input.focus();\n }\n }\n }\n\n render() {\n const { params = '', amount, labelName, placeholder, maxLength, isLimit } = this.props;\n return (\n <div className=\"scanInput\">\n {params === 'pay' && <div>\n <span className=\"label\">应收金额:</span><span className=\"yfje\">{amount}</span>\n </div>}\n <div className=\"pwd\">\n <span className=\"label\">{labelName}:</span>\n <span>\n {isLimit === 'yes' ? <NumkeyboardPassword\n id='pwd'\n className=\"content\"\n placement=\"rightBottom\"\n newType='positive'\n bordered\n placeholder={placeholder}\n style={{ width: 266, height: 32 }}\n maxLength={this.props.maxLength}\n ref={input => this.inputAmount = input}\n onChange={value => this.setConfirmPwdValue(value)}\n /> : <Input\n id='pwd'\n style={{ width: 266, height: 32 }}\n type='password'\n placeholder={placeholder}\n maxLength={maxLength}\n ref={input => this.inputAmount = input}\n bordered\n onChange={e => {\n this.setConfirmPwdValue(e.target.value)\n }}\n max={maxLength}\n min={1}\n onFocus={(e) => {\n let _this = this;\n this.input = e.target;\n Keyboard.open((v) => {\n let value = Keyboard.getNewValue(this.input, this.input.value, v);\n if (!(value.length > 18 )) {\n _this.setConfirmPwdValue(value)\n this.input.value = value;\n }\n })()\n }}\n onBlur={() => Keyboard.close()}\n onKeyDown={e => this.onKeyDown(e)}\n />\n }\n </span>\n </div>\n </div>\n );\n }\n}\n"]}
|
@@ -1,282 +0,0 @@
|
|
1
|
-
'use strict';
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports.default = undefined;
|
7
|
-
|
8
|
-
var _defineProperty = require('babel-runtime/core-js/object/define-property');
|
9
|
-
|
10
|
-
var _defineProperty2 = _interopRequireDefault(_defineProperty);
|
11
|
-
|
12
|
-
var _getOwnPropertyDescriptor = require('babel-runtime/core-js/object/get-own-property-descriptor');
|
13
|
-
|
14
|
-
var _getOwnPropertyDescriptor2 = _interopRequireDefault(_getOwnPropertyDescriptor);
|
15
|
-
|
16
|
-
var _regenerator = require('babel-runtime/regenerator');
|
17
|
-
|
18
|
-
var _regenerator2 = _interopRequireDefault(_regenerator);
|
19
|
-
|
20
|
-
var _asyncToGenerator2 = require('babel-runtime/helpers/asyncToGenerator');
|
21
|
-
|
22
|
-
var _asyncToGenerator3 = _interopRequireDefault(_asyncToGenerator2);
|
23
|
-
|
24
|
-
var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');
|
25
|
-
|
26
|
-
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
|
27
|
-
|
28
|
-
var _createClass2 = require('babel-runtime/helpers/createClass');
|
29
|
-
|
30
|
-
var _createClass3 = _interopRequireDefault(_createClass2);
|
31
|
-
|
32
|
-
var _desc, _value, _class, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5;
|
33
|
-
|
34
|
-
var _mobx = require('mobx');
|
35
|
-
|
36
|
-
var _tplusComponentsTouch = require('tplus-components-touch');
|
37
|
-
|
38
|
-
var _tplusPoslogin = require('tplus-poslogin');
|
39
|
-
|
40
|
-
var _api = require('./api');
|
41
|
-
|
42
|
-
var _api2 = _interopRequireDefault(_api);
|
43
|
-
|
44
|
-
var _tplusApi = require('tplus-api');
|
45
|
-
|
46
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
47
|
-
|
48
|
-
function _initDefineProp(target, property, descriptor, context) {
|
49
|
-
if (!descriptor) return;
|
50
|
-
(0, _defineProperty2.default)(target, property, {
|
51
|
-
enumerable: descriptor.enumerable,
|
52
|
-
configurable: descriptor.configurable,
|
53
|
-
writable: descriptor.writable,
|
54
|
-
value: descriptor.initializer ? descriptor.initializer.call(context) : void 0
|
55
|
-
});
|
56
|
-
}
|
57
|
-
|
58
|
-
function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
|
59
|
-
var desc = {};
|
60
|
-
Object['ke' + 'ys'](descriptor).forEach(function (key) {
|
61
|
-
desc[key] = descriptor[key];
|
62
|
-
});
|
63
|
-
desc.enumerable = !!desc.enumerable;
|
64
|
-
desc.configurable = !!desc.configurable;
|
65
|
-
|
66
|
-
if ('value' in desc || desc.initializer) {
|
67
|
-
desc.writable = true;
|
68
|
-
}
|
69
|
-
|
70
|
-
desc = decorators.slice().reverse().reduce(function (desc, decorator) {
|
71
|
-
return decorator(target, property, desc) || desc;
|
72
|
-
}, desc);
|
73
|
-
|
74
|
-
if (context && desc.initializer !== void 0) {
|
75
|
-
desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
|
76
|
-
desc.initializer = undefined;
|
77
|
-
}
|
78
|
-
|
79
|
-
if (desc.initializer === void 0) {
|
80
|
-
Object['define' + 'Property'](target, property, desc);
|
81
|
-
desc = null;
|
82
|
-
}
|
83
|
-
|
84
|
-
return desc;
|
85
|
-
}
|
86
|
-
|
87
|
-
function _initializerWarningHelper(descriptor, context) {
|
88
|
-
throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.');
|
89
|
-
}
|
90
|
-
|
91
|
-
(0, _mobx.useStrict)(true);
|
92
|
-
var ModifyPassStore = (_class = function () {
|
93
|
-
function ModifyPassStore() {
|
94
|
-
(0, _classCallCheck3.default)(this, ModifyPassStore);
|
95
|
-
|
96
|
-
_initDefineProp(this, 'oldPass', _descriptor, this);
|
97
|
-
|
98
|
-
_initDefineProp(this, 'newPass', _descriptor2, this);
|
99
|
-
|
100
|
-
_initDefineProp(this, 'newPassConfirm', _descriptor3, this);
|
101
|
-
|
102
|
-
_initDefineProp(this, 'watchChange', _descriptor4, this);
|
103
|
-
|
104
|
-
_initDefineProp(this, 'updateValue', _descriptor5, this);
|
105
|
-
}
|
106
|
-
|
107
|
-
(0, _createClass3.default)(ModifyPassStore, [{
|
108
|
-
key: 'updatePwd',
|
109
|
-
value: function () {
|
110
|
-
var _ref = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee(obj, params, callback) {
|
111
|
-
var _ref2, oldPass, newPass, pam;
|
112
|
-
|
113
|
-
return _regenerator2.default.wrap(function _callee$(_context) {
|
114
|
-
while (1) {
|
115
|
-
switch (_context.prev = _context.next) {
|
116
|
-
case 0:
|
117
|
-
_ref2 = this || {}, oldPass = _ref2.oldPass, newPass = _ref2.newPass;
|
118
|
-
|
119
|
-
try {
|
120
|
-
// member.Password = newPass;
|
121
|
-
pam = {
|
122
|
-
storageCardId: obj.MeStorageCardId,
|
123
|
-
oldPwd: null,
|
124
|
-
newPwd: newPass,
|
125
|
-
isReset: false
|
126
|
-
};
|
127
|
-
|
128
|
-
if (params === 'modify') {
|
129
|
-
pam.oldPwd = oldPass;
|
130
|
-
} else {
|
131
|
-
pam.isReset = true;
|
132
|
-
}
|
133
|
-
_api2.default.updatePwd(pam).then(function (ret) {
|
134
|
-
var successful = ret.successful,
|
135
|
-
msg = ret.msg;
|
136
|
-
|
137
|
-
if (successful === true) {
|
138
|
-
if (params === 'modify') {
|
139
|
-
_tplusComponentsTouch.Message.success('修改成功');
|
140
|
-
} else if (params === 'reset') {
|
141
|
-
_tplusComponentsTouch.Message.success('重置成功');
|
142
|
-
}
|
143
|
-
_tplusComponentsTouch.Keyboard.close();
|
144
|
-
callback && callback();
|
145
|
-
} else {
|
146
|
-
_tplusComponentsTouch.Message.error(msg);
|
147
|
-
}
|
148
|
-
//Loading.hide();
|
149
|
-
}).catch(function (e) {
|
150
|
-
console.log('err', e);
|
151
|
-
});
|
152
|
-
} catch (err) {
|
153
|
-
//Loading.hide();
|
154
|
-
console.log('err======', err);
|
155
|
-
}
|
156
|
-
|
157
|
-
case 2:
|
158
|
-
case 'end':
|
159
|
-
return _context.stop();
|
160
|
-
}
|
161
|
-
}
|
162
|
-
}, _callee, this);
|
163
|
-
}));
|
164
|
-
|
165
|
-
function updatePwd(_x, _x2, _x3) {
|
166
|
-
return _ref.apply(this, arguments);
|
167
|
-
}
|
168
|
-
|
169
|
-
return updatePwd;
|
170
|
-
}()
|
171
|
-
}, {
|
172
|
-
key: 'modifyPassWord',
|
173
|
-
value: function () {
|
174
|
-
var _ref3 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2(member, params, callback) {
|
175
|
-
var _ref4, oldPass, newPass, idstore, params1;
|
176
|
-
|
177
|
-
return _regenerator2.default.wrap(function _callee2$(_context2) {
|
178
|
-
while (1) {
|
179
|
-
switch (_context2.prev = _context2.next) {
|
180
|
-
case 0:
|
181
|
-
_ref4 = this || {}, oldPass = _ref4.oldPass, newPass = _ref4.newPass;
|
182
|
-
|
183
|
-
try {
|
184
|
-
// 修改设置重置密码参数
|
185
|
-
|
186
|
-
idstore = (0, _tplusPoslogin.PosInitData)('storeID');
|
187
|
-
params1 = {
|
188
|
-
Idstore: idstore,
|
189
|
-
meMemberId: member.ID ? member.ID : member.memberId,
|
190
|
-
oldPassword: null,
|
191
|
-
newPassword: _tplusApi.User.pwdEncrypt(newPass),
|
192
|
-
dataSource: "POS"
|
193
|
-
};
|
194
|
-
|
195
|
-
if (params === 'modify') {
|
196
|
-
params1.oldPassword = _tplusApi.User.pwdEncrypt(oldPass);
|
197
|
-
}
|
198
|
-
_api2.default.modifyMemberPass(params1).then(function (ret) {
|
199
|
-
var successful = ret.successful,
|
200
|
-
msg = ret.msg;
|
201
|
-
|
202
|
-
if (successful === true) {
|
203
|
-
var tips = '设置成功';
|
204
|
-
if (params === 'modify') {
|
205
|
-
tips = '修改成功';
|
206
|
-
} else if (params === 'reset') {
|
207
|
-
tips = '重置成功';
|
208
|
-
}
|
209
|
-
_tplusComponentsTouch.Message.success(tips);
|
210
|
-
_tplusComponentsTouch.Keyboard.close();
|
211
|
-
callback && callback();
|
212
|
-
} else {
|
213
|
-
_tplusComponentsTouch.Message.error(msg);
|
214
|
-
}
|
215
|
-
//Loading.hide();
|
216
|
-
}).catch(function (e) {
|
217
|
-
console.log('err', e);
|
218
|
-
});
|
219
|
-
} catch (err) {
|
220
|
-
//Loading.hide();
|
221
|
-
console.log('err======', err);
|
222
|
-
}
|
223
|
-
|
224
|
-
case 2:
|
225
|
-
case 'end':
|
226
|
-
return _context2.stop();
|
227
|
-
}
|
228
|
-
}
|
229
|
-
}, _callee2, this);
|
230
|
-
}));
|
231
|
-
|
232
|
-
function modifyPassWord(_x4, _x5, _x6) {
|
233
|
-
return _ref3.apply(this, arguments);
|
234
|
-
}
|
235
|
-
|
236
|
-
return modifyPassWord;
|
237
|
-
}()
|
238
|
-
}, {
|
239
|
-
key: 'cleanStores',
|
240
|
-
value: function cleanStores() {
|
241
|
-
this.oldPass = '';
|
242
|
-
this.newPass = '';
|
243
|
-
this.newPassConfirm = '';
|
244
|
-
}
|
245
|
-
}]);
|
246
|
-
return ModifyPassStore;
|
247
|
-
}(), (_descriptor = _applyDecoratedDescriptor(_class.prototype, 'oldPass', [_mobx.observable], {
|
248
|
-
enumerable: true,
|
249
|
-
initializer: function initializer() {
|
250
|
-
return '';
|
251
|
-
}
|
252
|
-
}), _descriptor2 = _applyDecoratedDescriptor(_class.prototype, 'newPass', [_mobx.observable], {
|
253
|
-
enumerable: true,
|
254
|
-
initializer: function initializer() {
|
255
|
-
return '';
|
256
|
-
}
|
257
|
-
}), _descriptor3 = _applyDecoratedDescriptor(_class.prototype, 'newPassConfirm', [_mobx.observable], {
|
258
|
-
enumerable: true,
|
259
|
-
initializer: function initializer() {
|
260
|
-
return '';
|
261
|
-
}
|
262
|
-
}), _descriptor4 = _applyDecoratedDescriptor(_class.prototype, 'watchChange', [_mobx.action], {
|
263
|
-
enumerable: true,
|
264
|
-
initializer: function initializer() {
|
265
|
-
var _this = this;
|
266
|
-
|
267
|
-
return function (key, value) {
|
268
|
-
_this[key] = value;
|
269
|
-
};
|
270
|
-
}
|
271
|
-
}), _descriptor5 = _applyDecoratedDescriptor(_class.prototype, 'updateValue', [_mobx.action], {
|
272
|
-
enumerable: true,
|
273
|
-
initializer: function initializer() {
|
274
|
-
var _this2 = this;
|
275
|
-
|
276
|
-
return function (field, value) {
|
277
|
-
_this2[field] = value;
|
278
|
-
};
|
279
|
-
}
|
280
|
-
}), _applyDecoratedDescriptor(_class.prototype, 'updatePwd', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'updatePwd'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'modifyPassWord', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'modifyPassWord'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'cleanStores', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'cleanStores'), _class.prototype)), _class);
|
281
|
-
exports.default = ModifyPassStore;
|
282
|
-
//# sourceMappingURL=store.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"sources":["tplus-components-touch/components/password/store.js"],"names":["ModifyPassStore","obj","params","callback","oldPass","newPass","pam","storageCardId","MeStorageCardId","oldPwd","newPwd","isReset","MemberPwdApi","updatePwd","then","successful","ret","msg","Message","success","Keyboard","close","error","catch","console","log","e","err","member","idstore","params1","Idstore","meMemberId","ID","memberId","oldPassword","newPassword","User","pwdEncrypt","dataSource","modifyMemberPass","tips","newPassConfirm","observable","action","key","value","field"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;;;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,qBAAU,IAAV;IACqBA,e;AACnB,6BAAc;AAAA;;AAAA;;AAAA;;AAAA;;AAAA;;AAAA;AACb;;;;;2GAcuBC,G,EAAMC,M,EAAQC,Q;;;;;;;wBACP,QAAQ,E,EAA7BC,O,SAAAA,O,EAASC,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AEAF,Y;;;;;WAAqB,UAACG,KAAD,EAAQD,KAAR,EAAkB;AACtC,aAAKC,KAAL,IAAcD,KAAd;AACD,K;;8DAEAF,Y,6JAsCAA,Y,+JAyCAA,Y;kBA/FkB5C,e","file":"store.js","sourcesContent":["import {observable, action, useStrict} from 'mobx';\nimport { Message, Keyboard } from 'tplus-components-touch';\nimport { PosInitData } from 'tplus-poslogin';\nimport MemberPwdApi from './api';\nimport { User } from 'tplus-api';\n\nuseStrict(true);\nexport default class ModifyPassStore {\n constructor() {\n }\n\n @observable oldPass = '';\n @observable newPass = '';\n @observable newPassConfirm = '';\n\n @action watchChange = (key, value) => {\n this[key] = value;\n }\n\n @action updateValue = (field, value) => {\n this[field] = value;\n }\n\n @action async updatePwd(obj , params, callback) {\n const { oldPass, newPass } = this || {};\n try {\n // member.Password = newPass;\n let pam = {\n storageCardId: obj.MeStorageCardId,\n oldPwd: null,\n newPwd: newPass,\n isReset: false\n };\n if(params === 'modify') {\n pam.oldPwd = oldPass;\n } else {\n pam.isReset = true;\n }\n MemberPwdApi.updatePwd(pam).then(ret => {\n const { successful, msg } = ret;\n if (successful === true) {\n if (params === 'modify') {\n Message.success('修改成功');\n } else if (params === 'reset') {\n Message.success('重置成功');\n }\n Keyboard.close();\n callback && callback();\n } else {\n Message.error(msg);\n }\n //Loading.hide();\n }).catch(e => {\n console.log('err', e);\n })\n } catch (err) {\n //Loading.hide();\n console.log('err======', err);\n }\n }\n\n @action async modifyPassWord(member, params, callback) {\n const { oldPass, newPass } = this || {};\n try {\n // 修改设置重置密码参数\n\n let idstore = PosInitData('storeID'); \n let params1 = {\n Idstore: idstore,\n meMemberId: member.ID ? member.ID: member.memberId,\n oldPassword: null,\n newPassword: User.pwdEncrypt(newPass),\n dataSource: \"POS\"\n }\n if (params === 'modify') {\n params1.oldPassword = User.pwdEncrypt(oldPass);\n }\n MemberPwdApi.modifyMemberPass(params1).then(ret => {\n const { successful, msg } = ret;\n if (successful === true) {\n let tips = '设置成功';\n if (params === 'modify') {\n tips = '修改成功';\n } else if (params === 'reset') {\n tips = '重置成功';\n }\n Message.success(tips);\n Keyboard.close();\n callback && callback();\n } else {\n Message.error(msg);\n }\n //Loading.hide();\n }).catch(e => {\n console.log('err', e);\n })\n } catch (err) {\n //Loading.hide();\n console.log('err======', err);\n }\n }\n\n @action cleanStores() {\n this.oldPass = '';\n this.newPass = '';\n this.newPassConfirm = '';\n }\n}\n"]}
|
@@ -1,95 +0,0 @@
|
|
1
|
-
.u-modal {
|
2
|
-
.u-close{
|
3
|
-
opacity: 1 !important;//统一覆盖
|
4
|
-
}
|
5
|
-
&.in {
|
6
|
-
.modify-password{
|
7
|
-
top: 50% !important;
|
8
|
-
transform: translateY(-50%) !important;
|
9
|
-
}
|
10
|
-
}
|
11
|
-
&.fade {
|
12
|
-
.modify-password{
|
13
|
-
top: 50%;
|
14
|
-
transform: translateY(-65%);
|
15
|
-
}
|
16
|
-
}
|
17
|
-
}
|
18
|
-
.modify-password{
|
19
|
-
margin: 0 auto !important;
|
20
|
-
.u-modal-header{
|
21
|
-
font-size: 18px;
|
22
|
-
color: #333333;
|
23
|
-
line-height: 18px;
|
24
|
-
border-bottom: 1px solid #E6E6EB;
|
25
|
-
padding: 10px 16px;
|
26
|
-
.u-modal-title{
|
27
|
-
font-weight: 500;
|
28
|
-
}
|
29
|
-
.u-close{
|
30
|
-
outline: none;
|
31
|
-
}
|
32
|
-
}
|
33
|
-
.u-modal-body{
|
34
|
-
padding: 28px 30px;
|
35
|
-
}
|
36
|
-
.u-modal-footer{
|
37
|
-
padding: 8px 16px;
|
38
|
-
border-top: 1px solid #E6E6EB;
|
39
|
-
}
|
40
|
-
.modifypass-cancal-button{
|
41
|
-
border-radius: 4px;
|
42
|
-
min-width: 76px;
|
43
|
-
box-sizing: border-box;
|
44
|
-
}
|
45
|
-
.modifypass-ok-button{
|
46
|
-
border-radius: 4px;
|
47
|
-
font-size: 16px;
|
48
|
-
text-align: center;
|
49
|
-
border: 0;
|
50
|
-
margin-left: 16px;
|
51
|
-
min-width: 76px;
|
52
|
-
box-sizing: border-box;
|
53
|
-
}
|
54
|
-
.modify-password-container2 {
|
55
|
-
display: flex;
|
56
|
-
justify-content: center;
|
57
|
-
align-items: center;
|
58
|
-
height: 100%;
|
59
|
-
|
60
|
-
.tplus-container {
|
61
|
-
|
62
|
-
width: 100%;
|
63
|
-
padding: 20px;
|
64
|
-
|
65
|
-
.tplus-input-container {
|
66
|
-
margin-bottom: 24px;
|
67
|
-
width : 100%;
|
68
|
-
|
69
|
-
&:last-child {
|
70
|
-
margin-bottom: 10px;
|
71
|
-
}
|
72
|
-
|
73
|
-
&:first-child {
|
74
|
-
margin-top: 24px;
|
75
|
-
}
|
76
|
-
}
|
77
|
-
|
78
|
-
.tplus-input-title {
|
79
|
-
width: 80px;
|
80
|
-
}
|
81
|
-
}
|
82
|
-
}
|
83
|
-
.passContainer {
|
84
|
-
display: flex;
|
85
|
-
padding: 10px 0;
|
86
|
-
.one {
|
87
|
-
width: 120px;
|
88
|
-
text-align: right;
|
89
|
-
padding-right: 10px;
|
90
|
-
}
|
91
|
-
.two {
|
92
|
-
width: 266px;
|
93
|
-
}
|
94
|
-
}
|
95
|
-
}
|