tplus-member 3.36.1 → 3.38.3
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/api.js +5 -5
- package/dist/api.js.map +1 -1
- package/dist/controllers/FeedbackController.js.map +1 -1
- package/dist/controllers/MemberOrderController.js +12 -12
- package/dist/controllers/MemberOrderController.js.map +1 -1
- package/dist/controllers/OpenCardController.js +7 -7
- package/dist/controllers/OpenCardController.js.map +1 -1
- package/dist/controllers/defaultConfig.js.map +1 -1
- package/dist/dataProvider/member.js +7 -7
- package/dist/dataProvider/member.js.map +1 -1
- package/dist/dataProvider/openCard.js.map +1 -1
- package/dist/domain/member/AuthProcess.js.map +1 -1
- package/dist/domain/member/CardCodeChangedProcessor.js +2 -2
- package/dist/domain/member/CardCodeChangedProcessor.js.map +1 -1
- package/dist/domain/member/CheckCardCodeAndCodeProcessor.js +2 -2
- package/dist/domain/member/CheckCardCodeAndCodeProcessor.js.map +1 -1
- package/dist/domain/member/CheckMobilephoneFormatProcessor.js +2 -2
- package/dist/domain/member/CheckMobilephoneFormatProcessor.js.map +1 -1
- package/dist/domain/member/CheckPresentAmountProcessor.js +2 -2
- package/dist/domain/member/CheckPresentAmountProcessor.js.map +1 -1
- package/dist/domain/member/EffectiveDateChangedProcessor.js +2 -2
- package/dist/domain/member/EffectiveDateChangedProcessor.js.map +1 -1
- package/dist/domain/member/GetThisPresentAmountProcessor.js +2 -2
- package/dist/domain/member/GetThisPresentAmountProcessor.js.map +1 -1
- package/dist/domain/member/InitDataProcessor.js +123 -123
- package/dist/domain/member/InitDataProcessor.js.map +1 -1
- package/dist/domain/member/IsMemberEffectiveProcessor.js +2 -2
- package/dist/domain/member/IsMemberEffectiveProcessor.js.map +1 -1
- package/dist/domain/member/IsMemberEnableProcessor.js +2 -2
- package/dist/domain/member/IsMemberEnableProcessor.js.map +1 -1
- package/dist/domain/member/IsMemberExpirationProcessor.js +2 -2
- package/dist/domain/member/IsMemberExpirationProcessor.js.map +1 -1
- package/dist/domain/member/IsMemberPasswordSameProcessor.js +2 -2
- package/dist/domain/member/IsMemberPasswordSameProcessor.js.map +1 -1
- package/dist/domain/member/IsMemberStorageForStoreProcessor.js +3 -3
- package/dist/domain/member/IsMemberStorageForStoreProcessor.js.map +1 -1
- package/dist/domain/member/MemberTypeChangedProcessor.js +4 -4
- package/dist/domain/member/MemberTypeChangedProcessor.js.map +1 -1
- package/dist/domain/member/MobilephoneChangedProcessor.js +4 -4
- package/dist/domain/member/MobilephoneChangedProcessor.js.map +1 -1
- package/dist/domain/member/PersonProcesser.js.map +1 -1
- package/dist/domain/member/PriuserdefChangedProcessor.js +2 -2
- package/dist/domain/member/PriuserdefChangedProcessor.js.map +1 -1
- package/dist/domain/operationLog/AddLogProcessor.js +6 -6
- package/dist/domain/operationLog/AddLogProcessor.js.map +1 -1
- package/dist/domain/operationLog/OperationConfig.js.map +1 -1
- package/dist/domain/operationLog/OperationLog.js.map +1 -1
- package/dist/index.js +6 -1
- package/dist/index.js.map +1 -1
- package/dist/member/MemberCardList.js +393 -0
- package/dist/member/MemberCardList.js.map +1 -0
- package/dist/member/MemberPhoto.js.map +1 -1
- package/dist/member/MemberShow.js +3 -1
- package/dist/member/MemberShow.js.map +1 -1
- package/dist/member/ShopMember.js +274 -268
- package/dist/member/ShopMember.js.map +1 -1
- package/dist/member/ShopMember.less +636 -531
- package/dist/member/ShopMemberStorage.js +451 -0
- package/dist/member/ShopMemberStorage.js.map +1 -0
- package/dist/member/api.js +277 -42
- package/dist/member/api.js.map +1 -1
- package/dist/member/color.less +31 -31
- package/dist/member/index.js +142 -121
- package/dist/member/index.js.map +1 -1
- package/dist/member/index.less +570 -570
- package/dist/member/memberMenu/bindCard/index.js +295 -0
- package/dist/member/memberMenu/bindCard/index.js.map +1 -0
- package/dist/member/memberMenu/bindCard/style.less +8 -0
- package/dist/member/memberMenu/changeMemberCard/index.js.map +1 -1
- package/dist/member/memberMenu/changeMemberCard/style.less +42 -42
- package/dist/member/memberMenu/index.js +504 -345
- package/dist/member/memberMenu/index.js.map +1 -1
- package/dist/member/memberMenu/modifyPass/index.js +0 -2
- package/dist/member/memberMenu/modifyPass/index.js.map +1 -1
- package/dist/member/memberMenu/modifyPass/store.js.map +1 -1
- package/dist/member/memberMenu/modifyPass/style.less +96 -96
- package/dist/member/memberMenu/style.less +128 -85
- package/dist/member/memberMenuStorage/bindCard/index.js +172 -0
- package/dist/member/memberMenuStorage/bindCard/index.js.map +1 -0
- package/dist/member/memberMenuStorage/bindCard/style.less +8 -0
- package/dist/member/memberMenuStorage/changeMemberCard/index.js +260 -0
- package/dist/member/memberMenuStorage/changeMemberCard/index.js.map +1 -0
- package/dist/member/memberMenuStorage/changeMemberCard/style.less +43 -0
- package/dist/member/memberMenuStorage/index.js +1807 -0
- package/dist/member/memberMenuStorage/index.js.map +1 -0
- package/dist/member/memberMenuStorage/modifyPass/index.js +420 -0
- package/dist/member/memberMenuStorage/modifyPass/index.js.map +1 -0
- package/dist/member/memberMenuStorage/modifyPass/store.js +426 -0
- package/dist/member/memberMenuStorage/modifyPass/store.js.map +1 -0
- package/dist/member/memberMenuStorage/modifyPass/style.less +96 -0
- package/dist/member/memberMenuStorage/style.less +130 -0
- package/dist/member/memberTab/MemberCardInfo.js +89 -0
- package/dist/member/memberTab/MemberCardInfo.js.map +1 -0
- package/dist/member/memberTab/MemberManager.js +640 -0
- package/dist/member/memberTab/MemberManager.js.map +1 -0
- package/dist/member/memberTab/MemberStorage.js +176 -0
- package/dist/member/memberTab/MemberStorage.js.map +1 -0
- package/dist/member/memberTab/index.js +133 -0
- package/dist/member/memberTab/index.js.map +1 -0
- package/dist/member/memberTab.js +58 -11
- package/dist/member/memberTab.js.map +1 -1
- package/dist/socket.js +13 -13
- package/dist/socket.js.map +1 -1
- package/dist/stores/MemberStore.js +87 -5
- package/dist/stores/MemberStore.js.map +1 -1
- package/dist/stores/index.js.map +1 -1
- package/dist/utils.js +15 -1
- package/dist/utils.js.map +1 -1
- package/dist/viewController/MemberOrderViewController.js.map +1 -1
- package/dist/viewDoMain/CheckMemberProcessorBlock.js +2 -2
- package/dist/viewDoMain/CheckMemberProcessorBlock.js.map +1 -1
- package/dist/viewDoMain/CheckMemberStorageProcessorBlock.js +2 -2
- package/dist/viewDoMain/CheckMemberStorageProcessorBlock.js.map +1 -1
- package/dist/viewDoMain/CheckSelectMemberProcessorBlock.js +2 -2
- package/dist/viewDoMain/CheckSelectMemberProcessorBlock.js.map +1 -1
- package/dist/viewDoMain/CheckUpdatePasswordProcessorBlock.js.map +1 -1
- package/dist/viewDoMain/MemberDataChangedProcessorBlock.js +2 -2
- package/dist/viewDoMain/MemberDataChangedProcessorBlock.js.map +1 -1
- package/dist/viewDoMain/MemberDataPreSaveProcessorBlock.js +2 -2
- package/dist/viewDoMain/MemberDataPreSaveProcessorBlock.js.map +1 -1
- package/dist/viewDoMain/StorageAmountChangedProcessorBlock.js +3 -2
- package/dist/viewDoMain/StorageAmountChangedProcessorBlock.js.map +1 -1
- package/dist/viewModels/memberVoucher.js +3 -3
- package/dist/viewModels/memberVoucher.js.map +1 -1
- package/dist/views/MemberOrderView.js +6 -6
- package/dist/views/MemberOrderView.js.map +1 -1
- package/dist/views/MemberStore.less +143 -143
- package/dist/views/MemberStoreNew.less +228 -230
- package/dist/views/MemberStoreNewView.js +14 -26
- package/dist/views/MemberStoreNewView.js.map +1 -1
- package/dist/views/MemberStoreView.js.map +1 -1
- package/dist/views/MemberStoreViewContainer.js.map +1 -1
- package/dist/views/PresentDetail.less +118 -118
- package/dist/views/PresetDetailView.js.map +1 -1
- package/dist/views/memberOrder.less +54 -54
- package/locales/zh/tplus-portsetting.json +1 -1
- package/locales/zh-CN/tplus-portsetting.json +1 -1
- package/package.json +6 -7
@@ -0,0 +1,1807 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.default = undefined;
|
7
|
+
|
8
|
+
var _defineProperty2 = require('babel-runtime/helpers/defineProperty');
|
9
|
+
|
10
|
+
var _defineProperty3 = _interopRequireDefault(_defineProperty2);
|
11
|
+
|
12
|
+
var _extends2 = require('babel-runtime/helpers/extends');
|
13
|
+
|
14
|
+
var _extends3 = _interopRequireDefault(_extends2);
|
15
|
+
|
16
|
+
var _promise = require('babel-runtime/core-js/promise');
|
17
|
+
|
18
|
+
var _promise2 = _interopRequireDefault(_promise);
|
19
|
+
|
20
|
+
var _stringify = require('babel-runtime/core-js/json/stringify');
|
21
|
+
|
22
|
+
var _stringify2 = _interopRequireDefault(_stringify);
|
23
|
+
|
24
|
+
var _regenerator = require('babel-runtime/regenerator');
|
25
|
+
|
26
|
+
var _regenerator2 = _interopRequireDefault(_regenerator);
|
27
|
+
|
28
|
+
var _asyncToGenerator2 = require('babel-runtime/helpers/asyncToGenerator');
|
29
|
+
|
30
|
+
var _asyncToGenerator3 = _interopRequireDefault(_asyncToGenerator2);
|
31
|
+
|
32
|
+
var _getPrototypeOf = require('babel-runtime/core-js/object/get-prototype-of');
|
33
|
+
|
34
|
+
var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
|
35
|
+
|
36
|
+
var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');
|
37
|
+
|
38
|
+
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
|
39
|
+
|
40
|
+
var _createClass2 = require('babel-runtime/helpers/createClass');
|
41
|
+
|
42
|
+
var _createClass3 = _interopRequireDefault(_createClass2);
|
43
|
+
|
44
|
+
var _possibleConstructorReturn2 = require('babel-runtime/helpers/possibleConstructorReturn');
|
45
|
+
|
46
|
+
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
|
47
|
+
|
48
|
+
var _inherits2 = require('babel-runtime/helpers/inherits');
|
49
|
+
|
50
|
+
var _inherits3 = _interopRequireDefault(_inherits2);
|
51
|
+
|
52
|
+
var _class, _class2, _temp, _initialiseProps;
|
53
|
+
|
54
|
+
var _react = require('react');
|
55
|
+
|
56
|
+
var _react2 = _interopRequireDefault(_react);
|
57
|
+
|
58
|
+
var _mutantsMicrofx = require('mutants-microfx');
|
59
|
+
|
60
|
+
var _mutantsAppfx = require('mutants-appfx');
|
61
|
+
|
62
|
+
var _mobx = require('mobx');
|
63
|
+
|
64
|
+
require('./style.less');
|
65
|
+
|
66
|
+
var _tplusComponentsTouch = require('tplus-components-touch');
|
67
|
+
|
68
|
+
var _mutantsUtil = require('mutants-util');
|
69
|
+
|
70
|
+
var _utils = require('../../utils');
|
71
|
+
|
72
|
+
var _modifyPass = require('./modifyPass');
|
73
|
+
|
74
|
+
var _modifyPass2 = _interopRequireDefault(_modifyPass);
|
75
|
+
|
76
|
+
var _changeMemberCard = require('./changeMemberCard');
|
77
|
+
|
78
|
+
var _changeMemberCard2 = _interopRequireDefault(_changeMemberCard);
|
79
|
+
|
80
|
+
var _propTypes = require('prop-types');
|
81
|
+
|
82
|
+
var _api = require('../api');
|
83
|
+
|
84
|
+
var _api2 = _interopRequireDefault(_api);
|
85
|
+
|
86
|
+
var _bindCard = require('./bindCard');
|
87
|
+
|
88
|
+
var _bindCard2 = _interopRequireDefault(_bindCard);
|
89
|
+
|
90
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
91
|
+
|
92
|
+
var menus1 = [{
|
93
|
+
key: 'storage',
|
94
|
+
name: '储值',
|
95
|
+
visible: true,
|
96
|
+
icon: 'chuzhi',
|
97
|
+
auth: 'Storage',
|
98
|
+
SHORTCUT_KEY: ''
|
99
|
+
}, {
|
100
|
+
key: 'returnedStorage',
|
101
|
+
name: '退储值',
|
102
|
+
visible: true,
|
103
|
+
icon: 'tuichuzhi',
|
104
|
+
auth: 'RefundStorage',
|
105
|
+
SHORTCUT_KEY: ''
|
106
|
+
}, {
|
107
|
+
key: 'changePassword',
|
108
|
+
name: '修改密码',
|
109
|
+
visible: true,
|
110
|
+
icon: 'xiugaimima1',
|
111
|
+
auth: 'ModifyPassword',
|
112
|
+
SHORTCUT_KEY: ''
|
113
|
+
},
|
114
|
+
// {
|
115
|
+
// key: 'reportLoss',
|
116
|
+
// name: '挂失',
|
117
|
+
// visible: true,
|
118
|
+
// icon: 'guashi',
|
119
|
+
// auth:'RecordLoss'
|
120
|
+
|
121
|
+
// },
|
122
|
+
{
|
123
|
+
key: 'cancelLoss',
|
124
|
+
name: '取消挂失',
|
125
|
+
visible: true,
|
126
|
+
icon: 'quxiaoguashi',
|
127
|
+
auth: 'RecordLoss',
|
128
|
+
SHORTCUT_KEY: ''
|
129
|
+
}, {
|
130
|
+
key: 'resetPassword',
|
131
|
+
name: '重置密码',
|
132
|
+
visible: true,
|
133
|
+
icon: 'chongzhimima',
|
134
|
+
auth: 'PosResetPwd',
|
135
|
+
SHORTCUT_KEY: ''
|
136
|
+
}, {
|
137
|
+
key: 'memberBindCard',
|
138
|
+
name: '会员绑定',
|
139
|
+
visible: true,
|
140
|
+
icon: 'huiyuanbangding',
|
141
|
+
auth: 'BindStorageCard',
|
142
|
+
SHORTCUT_KEY: ''
|
143
|
+
}, {
|
144
|
+
key: 'memberUnBindCard',
|
145
|
+
name: '解绑',
|
146
|
+
visible: true,
|
147
|
+
icon: 'jiebang',
|
148
|
+
auth: 'BindStorageCard',
|
149
|
+
SHORTCUT_KEY: ''
|
150
|
+
}];
|
151
|
+
var display = {
|
152
|
+
finish: ['storage', 'changePassword', 'reportLoss', 'cancelLoss'],
|
153
|
+
semi: ['openCard']
|
154
|
+
};
|
155
|
+
|
156
|
+
var menus = [];
|
157
|
+
|
158
|
+
var _default = (0, _mutantsMicrofx.observer)(_class = (_temp = _class2 = function (_Component) {
|
159
|
+
(0, _inherits3.default)(_default, _Component);
|
160
|
+
|
161
|
+
function _default(props) {
|
162
|
+
(0, _classCallCheck3.default)(this, _default);
|
163
|
+
|
164
|
+
var _this = (0, _possibleConstructorReturn3.default)(this, (_default.__proto__ || (0, _getPrototypeOf2.default)(_default)).call(this, props));
|
165
|
+
|
166
|
+
_initialiseProps.call(_this);
|
167
|
+
|
168
|
+
var title = props.title,
|
169
|
+
subKey = props.subKey;
|
170
|
+
|
171
|
+
_this.state = {
|
172
|
+
menus: menus1,
|
173
|
+
modifyPass: false,
|
174
|
+
passwordTitle: '换卡',
|
175
|
+
btnDissabled: true,
|
176
|
+
warnContent: '',
|
177
|
+
setPwdShortKey: '',
|
178
|
+
bindCardShow: false, // 是否显示会员绑卡,默认否
|
179
|
+
bindCardBtnDisabled: true, // 会员绑卡确定按钮disabled
|
180
|
+
menuKey: null, // 用来判断是否是储值,设置密码的时候使用
|
181
|
+
refundShow: false, // 是否显示退储值,默认否
|
182
|
+
refundTitle: '退储值', // 退储值名称
|
183
|
+
memberUnBindCardLoading: false, // 解绑按钮loadong
|
184
|
+
refundBtnDisabled: false, // 退储值disabled
|
185
|
+
lastesStorageResult: {} // 最后一次储值的信息
|
186
|
+
};
|
187
|
+
_this.api = _api2.default;
|
188
|
+
return _this;
|
189
|
+
}
|
190
|
+
|
191
|
+
(0, _createClass3.default)(_default, [{
|
192
|
+
key: 'componentWillMount',
|
193
|
+
value: function componentWillMount() {
|
194
|
+
this.changeDisplay('finish');
|
195
|
+
}
|
196
|
+
}, {
|
197
|
+
key: 'componentDidMount',
|
198
|
+
value: function componentDidMount() {
|
199
|
+
var _this2 = this;
|
200
|
+
|
201
|
+
var setting_setData = _mutantsUtil.localStore.get("setting_setData");
|
202
|
+
if (setting_setData == null) {
|
203
|
+
setting_setData = JSON.parse(localStorage.getItem("setting_setData"));
|
204
|
+
}
|
205
|
+
if (setting_setData && setting_setData.length != 0) {
|
206
|
+
setting_setData.forEach(function (settingItem) {
|
207
|
+
if (settingItem.ParamType && settingItem.ParamType === "SHORTCUT_KEY") {
|
208
|
+
var _ref = settingItem || {},
|
209
|
+
Name = _ref.Name,
|
210
|
+
Value = _ref.Value;
|
211
|
+
|
212
|
+
var _props = _this2.props,
|
213
|
+
title = _props.title,
|
214
|
+
storeKey = _props.storeKey;
|
215
|
+
|
216
|
+
menus = menus1;
|
217
|
+
menus.forEach(function (item) {
|
218
|
+
if (item.auth === Name) {
|
219
|
+
item.SHORTCUT_KEY = Value;
|
220
|
+
}
|
221
|
+
});
|
222
|
+
if (Name === 'MemberSetPassword') {
|
223
|
+
_this2.setState({
|
224
|
+
setPwdShortKey: Value
|
225
|
+
});
|
226
|
+
}
|
227
|
+
}
|
228
|
+
});
|
229
|
+
}
|
230
|
+
setTimeout(function () {
|
231
|
+
_this2.changeState();
|
232
|
+
}, 0);
|
233
|
+
}
|
234
|
+
}, {
|
235
|
+
key: 'componentWillReceiveProps',
|
236
|
+
value: function componentWillReceiveProps() {
|
237
|
+
this.changeState();
|
238
|
+
}
|
239
|
+
}, {
|
240
|
+
key: 'changeDisplay',
|
241
|
+
value: function changeDisplay() {
|
242
|
+
var flag = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'finish';
|
243
|
+
|
244
|
+
var menus = this.filterMenus(display[flag]);
|
245
|
+
this.setState({ menus: menus });
|
246
|
+
}
|
247
|
+
}, {
|
248
|
+
key: 'changeState',
|
249
|
+
value: function changeState() {
|
250
|
+
var _props2 = this.props,
|
251
|
+
member = _props2.member,
|
252
|
+
memberEnumState = _props2.memberEnumState;
|
253
|
+
var _props3 = this.props,
|
254
|
+
title = _props3.title,
|
255
|
+
storeKey = _props3.storeKey;
|
256
|
+
|
257
|
+
var list = menus1;;
|
258
|
+
|
259
|
+
if (member && member.MemberState) {
|
260
|
+
if (member.MemberState.Id == memberEnumState.notusing) {
|
261
|
+
this.changeDisplay('semi');
|
262
|
+
return;
|
263
|
+
}
|
264
|
+
this.changeDisplay('finish');
|
265
|
+
if (member.MemberState.Id == memberEnumState.loss) {
|
266
|
+
list = menus.filter(function (menu) {
|
267
|
+
return menu.key !== 'reportLoss' && menu.key !== 'openCard';
|
268
|
+
});
|
269
|
+
} else {
|
270
|
+
list = menus.filter(function (menu) {
|
271
|
+
return menu.key !== 'cancelLoss' && menu.key !== 'openCard';
|
272
|
+
});
|
273
|
+
}
|
274
|
+
}
|
275
|
+
this.setState({ menus: list });
|
276
|
+
}
|
277
|
+
}, {
|
278
|
+
key: 'handleEvent',
|
279
|
+
value: function () {
|
280
|
+
var _ref2 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee(auth) {
|
281
|
+
var _props4, _props4$cardList, cardList, _props4$selected, selected, viewM;
|
282
|
+
|
283
|
+
return _regenerator2.default.wrap(function _callee$(_context) {
|
284
|
+
while (1) {
|
285
|
+
switch (_context.prev = _context.next) {
|
286
|
+
case 0:
|
287
|
+
_props4 = this.props, _props4$cardList = _props4.cardList, cardList = _props4$cardList === undefined ? [] : _props4$cardList, _props4$selected = _props4.selected, selected = _props4$selected === undefined ? 0 : _props4$selected;
|
288
|
+
_context.next = 3;
|
289
|
+
return this.controllerEvent('ValidateOperationName', { memberDto: cardList && cardList.length && cardList[selected], operationName: auth, card: 'card' });
|
290
|
+
|
291
|
+
case 3:
|
292
|
+
viewM = this.context.viewModel.getViewItem('Voucher');
|
293
|
+
|
294
|
+
if (!(viewM && viewM.AuthType === false)) {
|
295
|
+
_context.next = 8;
|
296
|
+
break;
|
297
|
+
}
|
298
|
+
|
299
|
+
return _context.abrupt('return', false);
|
300
|
+
|
301
|
+
case 8:
|
302
|
+
return _context.abrupt('return', true);
|
303
|
+
|
304
|
+
case 9:
|
305
|
+
case 'end':
|
306
|
+
return _context.stop();
|
307
|
+
}
|
308
|
+
}
|
309
|
+
}, _callee, this);
|
310
|
+
}));
|
311
|
+
|
312
|
+
function handleEvent(_x2) {
|
313
|
+
return _ref2.apply(this, arguments);
|
314
|
+
}
|
315
|
+
|
316
|
+
return handleEvent;
|
317
|
+
}()
|
318
|
+
}, {
|
319
|
+
key: 'justifyAuthority',
|
320
|
+
value: function () {
|
321
|
+
var _ref3 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2() {
|
322
|
+
var _props5, _props5$cardList, cardList, _props5$selected, selected, _ref4, CardStatusEnum;
|
323
|
+
|
324
|
+
return _regenerator2.default.wrap(function _callee2$(_context2) {
|
325
|
+
while (1) {
|
326
|
+
switch (_context2.prev = _context2.next) {
|
327
|
+
case 0:
|
328
|
+
_props5 = this.props, _props5$cardList = _props5.cardList, cardList = _props5$cardList === undefined ? [] : _props5$cardList, _props5$selected = _props5.selected, selected = _props5$selected === undefined ? 0 : _props5$selected;
|
329
|
+
_ref4 = cardList[selected] || {}, CardStatusEnum = _ref4.CardStatusEnum;
|
330
|
+
|
331
|
+
if (!(CardStatusEnum === 'DISABLED')) {
|
332
|
+
_context2.next = 7;
|
333
|
+
break;
|
334
|
+
}
|
335
|
+
|
336
|
+
_tplusComponentsTouch.Message.warn('该储值卡未启用,不能进行该操作!');
|
337
|
+
return _context2.abrupt('return', false);
|
338
|
+
|
339
|
+
case 7:
|
340
|
+
if (!(CardStatusEnum === 'REFUNDED_CARD')) {
|
341
|
+
_context2.next = 12;
|
342
|
+
break;
|
343
|
+
}
|
344
|
+
|
345
|
+
_tplusComponentsTouch.Message.warn('该储值卡已退卡,不能进行该操作!');
|
346
|
+
return _context2.abrupt('return', false);
|
347
|
+
|
348
|
+
case 12:
|
349
|
+
if (!(CardStatusEnum === 'REFUNDING_CARD')) {
|
350
|
+
_context2.next = 17;
|
351
|
+
break;
|
352
|
+
}
|
353
|
+
|
354
|
+
_tplusComponentsTouch.Message.warn('该储值卡退卡中,不能进行该操作!');
|
355
|
+
return _context2.abrupt('return', false);
|
356
|
+
|
357
|
+
case 17:
|
358
|
+
if (!(CardStatusEnum === 'INVALIDATION')) {
|
359
|
+
_context2.next = 22;
|
360
|
+
break;
|
361
|
+
}
|
362
|
+
|
363
|
+
_tplusComponentsTouch.Message.warn('该储值卡已失效,不能进行该操作!');
|
364
|
+
return _context2.abrupt('return', false);
|
365
|
+
|
366
|
+
case 22:
|
367
|
+
if (!(CardStatusEnum === 'EXPIRED')) {
|
368
|
+
_context2.next = 25;
|
369
|
+
break;
|
370
|
+
}
|
371
|
+
|
372
|
+
_tplusComponentsTouch.Message.warn('该储值卡已过期,不能进行该操作!');
|
373
|
+
return _context2.abrupt('return', false);
|
374
|
+
|
375
|
+
case 25:
|
376
|
+
case 'end':
|
377
|
+
return _context2.stop();
|
378
|
+
}
|
379
|
+
}
|
380
|
+
}, _callee2, this);
|
381
|
+
}));
|
382
|
+
|
383
|
+
function justifyAuthority() {
|
384
|
+
return _ref3.apply(this, arguments);
|
385
|
+
}
|
386
|
+
|
387
|
+
return justifyAuthority;
|
388
|
+
}()
|
389
|
+
}, {
|
390
|
+
key: 'storage',
|
391
|
+
value: function () {
|
392
|
+
var _ref5 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee3() {
|
393
|
+
var _props6, _props6$cardList, cardList, _props6$selected, selected, cardInfo, _ref6, CardTypeEnum, WalletEnabled, FreePaymentPasswordStore, data;
|
394
|
+
|
395
|
+
return _regenerator2.default.wrap(function _callee3$(_context3) {
|
396
|
+
while (1) {
|
397
|
+
switch (_context3.prev = _context3.next) {
|
398
|
+
case 0:
|
399
|
+
_props6 = this.props, _props6$cardList = _props6.cardList, cardList = _props6$cardList === undefined ? [] : _props6$cardList, _props6$selected = _props6.selected, selected = _props6$selected === undefined ? 0 : _props6$selected;
|
400
|
+
|
401
|
+
if (!(cardList && cardList.length)) {
|
402
|
+
_context3.next = 14;
|
403
|
+
break;
|
404
|
+
}
|
405
|
+
|
406
|
+
cardInfo = cardList[selected];
|
407
|
+
_ref6 = cardInfo || {}, CardTypeEnum = _ref6.CardTypeEnum, WalletEnabled = _ref6.WalletEnabled, FreePaymentPasswordStore = _ref6.FreePaymentPasswordStore;
|
408
|
+
|
409
|
+
if (!(CardTypeEnum === 'BALANCE_CARD')) {
|
410
|
+
_context3.next = 8;
|
411
|
+
break;
|
412
|
+
}
|
413
|
+
|
414
|
+
if (FreePaymentPasswordStore || WalletEnabled) {
|
415
|
+
this.storageInit();
|
416
|
+
} else {
|
417
|
+
this.setState({ modifyPass: true, passwordTitle: '设置密码', warnContent: '' });
|
418
|
+
}
|
419
|
+
_context3.next = 14;
|
420
|
+
break;
|
421
|
+
|
422
|
+
case 8:
|
423
|
+
_context3.next = 10;
|
424
|
+
return this.justifyAuthority();
|
425
|
+
|
426
|
+
case 10:
|
427
|
+
data = _context3.sent;
|
428
|
+
|
429
|
+
if (!(data === false)) {
|
430
|
+
_context3.next = 13;
|
431
|
+
break;
|
432
|
+
}
|
433
|
+
|
434
|
+
return _context3.abrupt('return');
|
435
|
+
|
436
|
+
case 13:
|
437
|
+
this.storageInit();
|
438
|
+
|
439
|
+
case 14:
|
440
|
+
case 'end':
|
441
|
+
return _context3.stop();
|
442
|
+
}
|
443
|
+
}
|
444
|
+
}, _callee3, this);
|
445
|
+
}));
|
446
|
+
|
447
|
+
function storage() {
|
448
|
+
return _ref5.apply(this, arguments);
|
449
|
+
}
|
450
|
+
|
451
|
+
return storage;
|
452
|
+
}()
|
453
|
+
|
454
|
+
//修改密码
|
455
|
+
|
456
|
+
}, {
|
457
|
+
key: 'changePassword',
|
458
|
+
|
459
|
+
// 修改密码
|
460
|
+
value: function () {
|
461
|
+
var _ref7 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee4() {
|
462
|
+
var data, _props7, _props7$cardList, cardList, _props7$selected, selected, _ref8, IsNeedPassword, CardTypeEnum;
|
463
|
+
|
464
|
+
return _regenerator2.default.wrap(function _callee4$(_context4) {
|
465
|
+
while (1) {
|
466
|
+
switch (_context4.prev = _context4.next) {
|
467
|
+
case 0:
|
468
|
+
_context4.next = 2;
|
469
|
+
return this.justifyAuthority();
|
470
|
+
|
471
|
+
case 2:
|
472
|
+
data = _context4.sent;
|
473
|
+
|
474
|
+
if (!(data === false)) {
|
475
|
+
_context4.next = 5;
|
476
|
+
break;
|
477
|
+
}
|
478
|
+
|
479
|
+
return _context4.abrupt('return');
|
480
|
+
|
481
|
+
case 5:
|
482
|
+
_props7 = this.props, _props7$cardList = _props7.cardList, cardList = _props7$cardList === undefined ? [] : _props7$cardList, _props7$selected = _props7.selected, selected = _props7$selected === undefined ? 0 : _props7$selected;
|
483
|
+
_ref8 = cardList[selected] || {}, IsNeedPassword = _ref8.IsNeedPassword, CardTypeEnum = _ref8.CardTypeEnum;
|
484
|
+
|
485
|
+
if (!(CardTypeEnum !== 'BALANCE_CARD' && !IsNeedPassword)) {
|
486
|
+
_context4.next = 10;
|
487
|
+
break;
|
488
|
+
}
|
489
|
+
|
490
|
+
_tplusComponentsTouch.Message.warn("此卡没启用密码!");
|
491
|
+
return _context4.abrupt('return');
|
492
|
+
|
493
|
+
case 10:
|
494
|
+
this.setState({ modifyPass: true, passwordTitle: '修改密码' });
|
495
|
+
|
496
|
+
case 11:
|
497
|
+
case 'end':
|
498
|
+
return _context4.stop();
|
499
|
+
}
|
500
|
+
}
|
501
|
+
}, _callee4, this);
|
502
|
+
}));
|
503
|
+
|
504
|
+
function changePassword() {
|
505
|
+
return _ref7.apply(this, arguments);
|
506
|
+
}
|
507
|
+
|
508
|
+
return changePassword;
|
509
|
+
}()
|
510
|
+
|
511
|
+
// 重置密码
|
512
|
+
|
513
|
+
}, {
|
514
|
+
key: 'resetPassword',
|
515
|
+
value: function () {
|
516
|
+
var _ref9 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee5() {
|
517
|
+
var data, _props8, _props8$cardList, cardList, _props8$selected, selected, _ref10, IsNeedPassword, CardTypeEnum;
|
518
|
+
|
519
|
+
return _regenerator2.default.wrap(function _callee5$(_context5) {
|
520
|
+
while (1) {
|
521
|
+
switch (_context5.prev = _context5.next) {
|
522
|
+
case 0:
|
523
|
+
_context5.next = 2;
|
524
|
+
return this.justifyAuthority();
|
525
|
+
|
526
|
+
case 2:
|
527
|
+
data = _context5.sent;
|
528
|
+
|
529
|
+
if (!(data === false)) {
|
530
|
+
_context5.next = 5;
|
531
|
+
break;
|
532
|
+
}
|
533
|
+
|
534
|
+
return _context5.abrupt('return');
|
535
|
+
|
536
|
+
case 5:
|
537
|
+
_props8 = this.props, _props8$cardList = _props8.cardList, cardList = _props8$cardList === undefined ? [] : _props8$cardList, _props8$selected = _props8.selected, selected = _props8$selected === undefined ? 0 : _props8$selected;
|
538
|
+
_ref10 = cardList[selected] || {}, IsNeedPassword = _ref10.IsNeedPassword, CardTypeEnum = _ref10.CardTypeEnum;
|
539
|
+
|
540
|
+
if (!(CardTypeEnum !== 'BALANCE_CARD' && !IsNeedPassword)) {
|
541
|
+
_context5.next = 10;
|
542
|
+
break;
|
543
|
+
}
|
544
|
+
|
545
|
+
_tplusComponentsTouch.Message.warn("此卡没启用密码!");
|
546
|
+
return _context5.abrupt('return');
|
547
|
+
|
548
|
+
case 10:
|
549
|
+
this.setState({ modifyPass: true, passwordTitle: '重置密码' });
|
550
|
+
|
551
|
+
case 11:
|
552
|
+
case 'end':
|
553
|
+
return _context5.stop();
|
554
|
+
}
|
555
|
+
}
|
556
|
+
}, _callee5, this);
|
557
|
+
}));
|
558
|
+
|
559
|
+
function resetPassword() {
|
560
|
+
return _ref9.apply(this, arguments);
|
561
|
+
}
|
562
|
+
|
563
|
+
return resetPassword;
|
564
|
+
}()
|
565
|
+
|
566
|
+
// 注销卡
|
567
|
+
|
568
|
+
//取消注销卡
|
569
|
+
|
570
|
+
|
571
|
+
// 开卡
|
572
|
+
|
573
|
+
|
574
|
+
// 点击会员绑卡
|
575
|
+
|
576
|
+
|
577
|
+
// 点击关闭绑卡
|
578
|
+
|
579
|
+
|
580
|
+
// 修改会员绑卡disabled
|
581
|
+
|
582
|
+
|
583
|
+
// 点击会员绑卡确定按钮
|
584
|
+
|
585
|
+
}, {
|
586
|
+
key: 'bindCardFn',
|
587
|
+
|
588
|
+
|
589
|
+
// MeStorageCard > gridTemplateUser > MeStorageCard.cardbatchExport
|
590
|
+
// 绑卡/会员绑卡确定按钮后,如果是会员绑卡
|
591
|
+
value: function () {
|
592
|
+
var _ref11 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee6(state) {
|
593
|
+
var value, _props9, getCardList, _props9$cardList, cardList, _props9$selected, selected, _ref12, StorageCardNo, params, ret;
|
594
|
+
|
595
|
+
return _regenerator2.default.wrap(function _callee6$(_context6) {
|
596
|
+
while (1) {
|
597
|
+
switch (_context6.prev = _context6.next) {
|
598
|
+
case 0:
|
599
|
+
value = state.value;
|
600
|
+
_props9 = this.props, getCardList = _props9.getCardList, _props9$cardList = _props9.cardList, cardList = _props9$cardList === undefined ? [] : _props9$cardList, _props9$selected = _props9.selected, selected = _props9$selected === undefined ? 0 : _props9$selected;
|
601
|
+
_ref12 = cardList[selected] || {}, StorageCardNo = _ref12.StorageCardNo;
|
602
|
+
params = {
|
603
|
+
cardNo: StorageCardNo,
|
604
|
+
mobile: value,
|
605
|
+
isStorageCardBindMember: true
|
606
|
+
};
|
607
|
+
|
608
|
+
this.changeBindCardBtnDisabled(true);
|
609
|
+
_context6.prev = 5;
|
610
|
+
_context6.next = 8;
|
611
|
+
return this.api.MeStorageCardBind(params);
|
612
|
+
|
613
|
+
case 8:
|
614
|
+
ret = _context6.sent;
|
615
|
+
|
616
|
+
this.changeBindCardBtnDisabled(false);
|
617
|
+
_tplusComponentsTouch.Message.success('绑定成功');
|
618
|
+
getCardList(cardList && cardList.length > 1 ? cardList[0].MemberMobile : StorageCardNo);
|
619
|
+
this.setState({
|
620
|
+
bindCardShow: false
|
621
|
+
});
|
622
|
+
_context6.next = 18;
|
623
|
+
break;
|
624
|
+
|
625
|
+
case 15:
|
626
|
+
_context6.prev = 15;
|
627
|
+
_context6.t0 = _context6['catch'](5);
|
628
|
+
|
629
|
+
this.changeBindCardBtnDisabled(false);
|
630
|
+
|
631
|
+
case 18:
|
632
|
+
case 'end':
|
633
|
+
return _context6.stop();
|
634
|
+
}
|
635
|
+
}
|
636
|
+
}, _callee6, this, [[5, 15]]);
|
637
|
+
}));
|
638
|
+
|
639
|
+
function bindCardFn(_x3) {
|
640
|
+
return _ref11.apply(this, arguments);
|
641
|
+
}
|
642
|
+
|
643
|
+
return bindCardFn;
|
644
|
+
}()
|
645
|
+
|
646
|
+
// 点击退储值的取消按钮
|
647
|
+
|
648
|
+
|
649
|
+
// 点击退储值的确定按钮
|
650
|
+
|
651
|
+
|
652
|
+
// 获取二开支付信息,如果有的话返回。
|
653
|
+
|
654
|
+
}, {
|
655
|
+
key: 'thirdPayRefund',
|
656
|
+
|
657
|
+
|
658
|
+
// 执行储值退款
|
659
|
+
value: function () {
|
660
|
+
var _ref13 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee7(params) {
|
661
|
+
var _enumController$getEn, TradeType, dto, pay, payment, _params, ret, _ref14, Code, _Message;
|
662
|
+
|
663
|
+
return _regenerator2.default.wrap(function _callee7$(_context7) {
|
664
|
+
while (1) {
|
665
|
+
switch (_context7.prev = _context7.next) {
|
666
|
+
case 0:
|
667
|
+
_context7.prev = 0;
|
668
|
+
_enumController$getEn = _mutantsUtil.enumController.getEnumOj(), TradeType = _enumController$getEn.TradeType;
|
669
|
+
dto = params.StorageMutiSettleDetails;
|
670
|
+
pay = dto && dto.filter(function (v) {
|
671
|
+
return v.ThirdPaymentInfo;
|
672
|
+
});
|
673
|
+
|
674
|
+
if (!(pay && pay.length > 0)) {
|
675
|
+
_context7.next = 19;
|
676
|
+
break;
|
677
|
+
}
|
678
|
+
|
679
|
+
payment = pay[0];
|
680
|
+
_params = { VoucherType: 2, Payment: payment, TradeType: TradeType.REFUND, dto: dto };
|
681
|
+
|
682
|
+
console.log('退储值刷卡参数:', (0, _stringify2.default)(_params));
|
683
|
+
_context7.next = 10;
|
684
|
+
return new _promise2.default(function (resolve, reject) {
|
685
|
+
_mutantsMicrofx.nativeMs.setIpcRendererMethod('ThirdPayment', (0, _extends3.default)({}, _params), function (res) {
|
686
|
+
return resolve(res);
|
687
|
+
});
|
688
|
+
});
|
689
|
+
|
690
|
+
case 10:
|
691
|
+
ret = _context7.sent;
|
692
|
+
|
693
|
+
console.log('退储值刷卡返回:', ret);
|
694
|
+
ret = JSON.parse(ret);
|
695
|
+
_ref14 = ret || {}, Code = _ref14.Code, _Message = _ref14.Message;
|
696
|
+
|
697
|
+
if (!(Code > 0)) {
|
698
|
+
_context7.next = 18;
|
699
|
+
break;
|
700
|
+
}
|
701
|
+
|
702
|
+
return _context7.abrupt('return', { type: false, msg: _Message, code: Code });
|
703
|
+
|
704
|
+
case 18:
|
705
|
+
return _context7.abrupt('return', { type: true, msg: _Message, code: Code });
|
706
|
+
|
707
|
+
case 19:
|
708
|
+
return _context7.abrupt('return', { type: true });
|
709
|
+
|
710
|
+
case 22:
|
711
|
+
_context7.prev = 22;
|
712
|
+
_context7.t0 = _context7['catch'](0);
|
713
|
+
return _context7.abrupt('return', { type: false, msg: _context7.t0, code: '9999' });
|
714
|
+
|
715
|
+
case 25:
|
716
|
+
case 'end':
|
717
|
+
return _context7.stop();
|
718
|
+
}
|
719
|
+
}
|
720
|
+
}, _callee7, this, [[0, 22]]);
|
721
|
+
}));
|
722
|
+
|
723
|
+
function thirdPayRefund(_x4) {
|
724
|
+
return _ref13.apply(this, arguments);
|
725
|
+
}
|
726
|
+
|
727
|
+
return thirdPayRefund;
|
728
|
+
}()
|
729
|
+
|
730
|
+
// 点击退储值确定或者退现金之后,请求数据 isCash, 是否是现金结算
|
731
|
+
|
732
|
+
}, {
|
733
|
+
key: 'submitRefundStorage',
|
734
|
+
value: function () {
|
735
|
+
var _ref15 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee8() {
|
736
|
+
var _this3 = this;
|
737
|
+
|
738
|
+
var cardInfo = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
739
|
+
var storageAmount = arguments[1];
|
740
|
+
|
741
|
+
var _ref16, memberStore, settlementStore, _memberStore$data, data, MeStorageCardId, StorageCardNo, ID, _cardInfo$PresentAmou, PresentAmount, _cardInfo$BalanceStor, BalanceStorage, _props10, getCardList, _props10$cardList, cardList, loadUserInfo, _ref17, _ref17$isCanRefund, isCanRefund, _ref17$canReturnAmoun, canReturnAmount, _ref17$storageInfos, storageInfos, _ref18, _ref18$data, _ref18$data$Member, dtMember, isSelectedMember, params, _ref19, finAccountId, paymentTypeId, latestStorageAmount, outTradeNo, ret, _ref20, type, code, _ret, _ref21, isSuccess, ex;
|
742
|
+
|
743
|
+
return _regenerator2.default.wrap(function _callee8$(_context8) {
|
744
|
+
while (1) {
|
745
|
+
switch (_context8.prev = _context8.next) {
|
746
|
+
case 0:
|
747
|
+
if (cardInfo) {
|
748
|
+
_context8.next = 2;
|
749
|
+
break;
|
750
|
+
}
|
751
|
+
|
752
|
+
return _context8.abrupt('return');
|
753
|
+
|
754
|
+
case 2:
|
755
|
+
_ref16 = _mutantsMicrofx.stores || {}, memberStore = _ref16.memberStore, settlementStore = _ref16.settlementStore;
|
756
|
+
_memberStore$data = memberStore.data, data = _memberStore$data === undefined ? {} : _memberStore$data;
|
757
|
+
MeStorageCardId = cardInfo.MeStorageCardId, StorageCardNo = cardInfo.StorageCardNo, ID = cardInfo.ID, _cardInfo$PresentAmou = cardInfo.PresentAmount, PresentAmount = _cardInfo$PresentAmou === undefined ? 0 : _cardInfo$PresentAmou, _cardInfo$BalanceStor = cardInfo.BalanceStorage, BalanceStorage = _cardInfo$BalanceStor === undefined ? 0 : _cardInfo$BalanceStor;
|
758
|
+
_props10 = this.props, getCardList = _props10.getCardList, _props10$cardList = _props10.cardList, cardList = _props10$cardList === undefined ? [] : _props10$cardList, loadUserInfo = _props10.loadUserInfo;
|
759
|
+
_ref17 = this.state.lastesStorageResult || {}, _ref17$isCanRefund = _ref17.isCanRefund, isCanRefund = _ref17$isCanRefund === undefined ? false : _ref17$isCanRefund, _ref17$canReturnAmoun = _ref17.canReturnAmount, canReturnAmount = _ref17$canReturnAmoun === undefined ? 0 : _ref17$canReturnAmoun, _ref17$storageInfos = _ref17.storageInfos, storageInfos = _ref17$storageInfos === undefined ? [] : _ref17$storageInfos;
|
760
|
+
_ref18 = this.context.viewModel || {}, _ref18$data = _ref18.data;
|
761
|
+
_ref18$data = _ref18$data === undefined ? {} : _ref18$data;
|
762
|
+
_ref18$data$Member = _ref18$data.Member, dtMember = _ref18$data$Member === undefined ? {} : _ref18$data$Member;
|
763
|
+
isSelectedMember = !!dtMember.ID;
|
764
|
+
params = (0, _extends3.default)({}, data, {
|
765
|
+
StorageDetails: [{
|
766
|
+
Idmember: ID,
|
767
|
+
ThisStorageAmount: storageAmount,
|
768
|
+
StorageType: {},
|
769
|
+
meStorageCardId: MeStorageCardId,
|
770
|
+
isPresentGiftpack: data.StorageDetails[0].isPresentGiftpack,
|
771
|
+
ThisPresentAmount: (0, _utils.getFixedNumber)(0 - (BalanceStorage - canReturnAmount))
|
772
|
+
}],
|
773
|
+
redBlueFlagEnum: 'RED',
|
774
|
+
storageAmount: storageAmount,
|
775
|
+
tradeTypeEnum: 'REFUND_CARD'
|
776
|
+
|
777
|
+
// 如果isCanRefund是false的话,说明是需要退现金,入参的计算方式明细金额是需要退的总金额
|
778
|
+
});
|
779
|
+
if (!isCanRefund) {
|
780
|
+
_ref19 = storageInfos[0] || {}, finAccountId = _ref19.finAccountId, paymentTypeId = _ref19.paymentTypeId, latestStorageAmount = _ref19.latestStorageAmount, outTradeNo = _ref19.outTradeNo;
|
781
|
+
|
782
|
+
params.StorageMutiSettleDetails = [{
|
783
|
+
StorageAmount: storageAmount,
|
784
|
+
PaymentCode: "",
|
785
|
+
DynamicPropertyValues: [],
|
786
|
+
IdbankAccount: finAccountId,
|
787
|
+
Code: 1,
|
788
|
+
IdsettleStyle: paymentTypeId,
|
789
|
+
DynamicPropertyKeys: [],
|
790
|
+
DataSource: {},
|
791
|
+
OrigPayAmount: latestStorageAmount,
|
792
|
+
OrigTradeNo: outTradeNo
|
793
|
+
}];
|
794
|
+
} else {
|
795
|
+
params.StorageMutiSettleDetails = storageInfos.map(function (item) {
|
796
|
+
var dynamic = item.thirdPaymentReturnInfo ? _this3.getThirdPaymentInfo(item, settlementStore) : {};
|
797
|
+
return (0, _extends3.default)({
|
798
|
+
StorageAmount: '-' + item.latestStorageAmount,
|
799
|
+
PaymentCode: "",
|
800
|
+
DynamicPropertyValues: [],
|
801
|
+
IdbankAccount: item.finAccountId,
|
802
|
+
Code: 1,
|
803
|
+
IdsettleStyle: item.paymentTypeId,
|
804
|
+
DynamicPropertyKeys: [],
|
805
|
+
DataSource: {},
|
806
|
+
OrigPayAmount: item.latestStorageAmount,
|
807
|
+
OrigTradeNo: item.outTradeNo
|
808
|
+
}, dynamic);
|
809
|
+
});
|
810
|
+
}
|
811
|
+
|
812
|
+
// 二开支付处理
|
813
|
+
_context8.next = 15;
|
814
|
+
return this.thirdPayRefund(params);
|
815
|
+
|
816
|
+
case 15:
|
817
|
+
ret = _context8.sent;
|
818
|
+
_ref20 = ret || {}, type = _ref20.type, code = _ref20.code;
|
819
|
+
|
820
|
+
if (!(type === false)) {
|
821
|
+
_context8.next = 20;
|
822
|
+
break;
|
823
|
+
}
|
824
|
+
|
825
|
+
_tplusComponentsTouch.Message.warn('\u5237\u5361\u652F\u4ED8\u5931\u8D25,\u9519\u8BEF\u7801:' + code);
|
826
|
+
return _context8.abrupt('return');
|
827
|
+
|
828
|
+
case 20:
|
829
|
+
_context8.next = 22;
|
830
|
+
return this.setState({
|
831
|
+
refundBtnDisabled: true
|
832
|
+
});
|
833
|
+
|
834
|
+
case 22:
|
835
|
+
_context8.prev = 22;
|
836
|
+
_context8.next = 25;
|
837
|
+
return this.api.ReturnedStorage(params);
|
838
|
+
|
839
|
+
case 25:
|
840
|
+
_ret = _context8.sent;
|
841
|
+
_ref21 = _ret.data || {}, isSuccess = _ref21.isSuccess, ex = _ref21.ex;
|
842
|
+
|
843
|
+
if (isSuccess === true || isSuccess === 'true') {
|
844
|
+
if (!!isSelectedMember && dtMember.ID === ID) {
|
845
|
+
loadUserInfo(ID);
|
846
|
+
}
|
847
|
+
getCardList && getCardList(cardList && cardList.length > 1 ? cardList[0].MemberMobile : StorageCardNo);
|
848
|
+
_tplusComponentsTouch.Message.success('退储值成功!');
|
849
|
+
} else {
|
850
|
+
this.returnedCash('\u53EA\u80FD\u9000\u73B0\u91D1\uFF0C\u662F\u5426\u7EE7\u7EED', storageAmount);
|
851
|
+
}
|
852
|
+
|
853
|
+
_context8.next = 30;
|
854
|
+
return this.setState({
|
855
|
+
refundBtnDisabled: false,
|
856
|
+
refundShow: false
|
857
|
+
});
|
858
|
+
|
859
|
+
case 30:
|
860
|
+
_context8.next = 36;
|
861
|
+
break;
|
862
|
+
|
863
|
+
case 32:
|
864
|
+
_context8.prev = 32;
|
865
|
+
_context8.t0 = _context8['catch'](22);
|
866
|
+
_context8.next = 36;
|
867
|
+
return this.setState({
|
868
|
+
refundBtnDisabled: false
|
869
|
+
});
|
870
|
+
|
871
|
+
case 36:
|
872
|
+
case 'end':
|
873
|
+
return _context8.stop();
|
874
|
+
}
|
875
|
+
}
|
876
|
+
}, _callee8, this, [[22, 32]]);
|
877
|
+
}));
|
878
|
+
|
879
|
+
function submitRefundStorage() {
|
880
|
+
return _ref15.apply(this, arguments);
|
881
|
+
}
|
882
|
+
|
883
|
+
return submitRefundStorage;
|
884
|
+
}()
|
885
|
+
// 退现金提示
|
886
|
+
|
887
|
+
}, {
|
888
|
+
key: 'returnedCash',
|
889
|
+
value: function returnedCash(content, storageAmount) {
|
890
|
+
var that = this;
|
891
|
+
_tplusComponentsTouch.ModalWraper.confirm({
|
892
|
+
title: '提示',
|
893
|
+
content: content,
|
894
|
+
okText: '现金',
|
895
|
+
onOk: function onOk() {
|
896
|
+
var _that$props = that.props,
|
897
|
+
_that$props$cardList = _that$props.cardList,
|
898
|
+
cardList = _that$props$cardList === undefined ? [] : _that$props$cardList,
|
899
|
+
selected = _that$props.selected;
|
900
|
+
|
901
|
+
that.setState({
|
902
|
+
refundShow: false
|
903
|
+
});
|
904
|
+
that.submitRefundStorage(cardList[selected], storageAmount);
|
905
|
+
}
|
906
|
+
});
|
907
|
+
}
|
908
|
+
// 点击退储值
|
909
|
+
|
910
|
+
// 点击解绑
|
911
|
+
|
912
|
+
}, {
|
913
|
+
key: 'click',
|
914
|
+
value: function click(key, auth, name) {
|
915
|
+
var _this4 = this;
|
916
|
+
|
917
|
+
this.setState({
|
918
|
+
warnContent: ''
|
919
|
+
});
|
920
|
+
this.handleEvent(auth).then(function (ret) {
|
921
|
+
if (key === 'storage') {
|
922
|
+
_this4.setState({
|
923
|
+
menuKey: 'storage'
|
924
|
+
});
|
925
|
+
} else {
|
926
|
+
_this4.setState({
|
927
|
+
menuKey: null
|
928
|
+
});
|
929
|
+
}
|
930
|
+
if (ret === true) {
|
931
|
+
var _ref22 = _mutantsUtil.platform || {},
|
932
|
+
isHorizontalSunMi = _ref22.isHorizontalSunMi;
|
933
|
+
|
934
|
+
switch (key) {
|
935
|
+
case 'storage':
|
936
|
+
_this4.storage();break;
|
937
|
+
case 'changePassword':
|
938
|
+
_this4.changePassword();break;
|
939
|
+
case 'reportLoss':
|
940
|
+
_this4.reportLoss();break;
|
941
|
+
case 'cancelLoss':
|
942
|
+
_this4.cancelLoss();break;
|
943
|
+
case 'openCard':
|
944
|
+
_this4.openCard();break;
|
945
|
+
case 'resetPassword':
|
946
|
+
_this4.resetPassword();break;
|
947
|
+
case 'memberBindCard':
|
948
|
+
_this4.bindCard(key, name);break;
|
949
|
+
case 'memberUnBindCard':
|
950
|
+
_this4.memberUnBindCard();break;
|
951
|
+
case 'returnedStorage':
|
952
|
+
_this4.returnedStorage();break;
|
953
|
+
}
|
954
|
+
}
|
955
|
+
});
|
956
|
+
}
|
957
|
+
}, {
|
958
|
+
key: 'render',
|
959
|
+
value: function render() {
|
960
|
+
var _this5 = this;
|
961
|
+
|
962
|
+
var _state = this.state,
|
963
|
+
menus = _state.menus,
|
964
|
+
modifyPass = _state.modifyPass,
|
965
|
+
passwordTitle = _state.passwordTitle,
|
966
|
+
btnDissabled = _state.btnDissabled,
|
967
|
+
bindCardShow = _state.bindCardShow,
|
968
|
+
bindCardBtnDisabled = _state.bindCardBtnDisabled,
|
969
|
+
refundShow = _state.refundShow,
|
970
|
+
refundBtnDisabled = _state.refundBtnDisabled,
|
971
|
+
menuKey = _state.menuKey,
|
972
|
+
_state$lastesStorageR = _state.lastesStorageResult,
|
973
|
+
lastesStorageResult = _state$lastesStorageR === undefined ? {} : _state$lastesStorageR;
|
974
|
+
var _props11 = this.props,
|
975
|
+
_props11$member = _props11.member,
|
976
|
+
member = _props11$member === undefined ? {} : _props11$member,
|
977
|
+
authProcess = _props11.authProcess,
|
978
|
+
getCardList = _props11.getCardList,
|
979
|
+
_props11$selected = _props11.selected,
|
980
|
+
selected = _props11$selected === undefined ? 0 : _props11$selected,
|
981
|
+
modifyMember = _props11.modifyMember,
|
982
|
+
_props11$cardList = _props11.cardList,
|
983
|
+
cardList = _props11$cardList === undefined ? [] : _props11$cardList;
|
984
|
+
|
985
|
+
var _ref23 = cardList.length && cardList[selected] || {},
|
986
|
+
Id = _ref23.Id,
|
987
|
+
_ref23$BalanceStorage = _ref23.BalanceStorage,
|
988
|
+
BalanceStorage = _ref23$BalanceStorage === undefined ? 0 : _ref23$BalanceStorage,
|
989
|
+
_ref23$PresentAmount = _ref23.PresentAmount,
|
990
|
+
PresentAmount = _ref23$PresentAmount === undefined ? 0 : _ref23$PresentAmount,
|
991
|
+
WalletEnabled = _ref23.WalletEnabled,
|
992
|
+
CardTypeEnum = _ref23.CardTypeEnum,
|
993
|
+
CardStatusEnum = _ref23.CardStatusEnum,
|
994
|
+
StorageCardNo = _ref23.StorageCardNo;
|
995
|
+
|
996
|
+
var canReturnAmount = lastesStorageResult.canReturnAmount,
|
997
|
+
usedPresentAmount = lastesStorageResult.usedPresentAmount;
|
998
|
+
|
999
|
+
|
1000
|
+
return _react2.default.createElement(
|
1001
|
+
'div',
|
1002
|
+
{ className: 'member-menu' },
|
1003
|
+
menus && menus.map(function (menu, index) {
|
1004
|
+
var status = authProcess.execute(menu.auth);
|
1005
|
+
if (status) {
|
1006
|
+
if (menu.auth === 'BindStorageCard') {
|
1007
|
+
if (menu.key === 'memberBindCard' && CardTypeEnum !== 'BALANCE_CARD' && CardStatusEnum && CardStatusEnum === 'UNBINDING') {
|
1008
|
+
return _this5.getMenuItem(index, menu);
|
1009
|
+
}
|
1010
|
+
if (menu.key === 'memberUnBindCard' && CardTypeEnum !== 'BALANCE_CARD' && CardStatusEnum && CardStatusEnum === 'BINDING') {
|
1011
|
+
return _this5.getMenuItem(index, menu);
|
1012
|
+
}
|
1013
|
+
} else {
|
1014
|
+
return _this5.getMenuItem(index, menu);
|
1015
|
+
}
|
1016
|
+
} else {
|
1017
|
+
if (menu.auth === 'ModifyPassword') {
|
1018
|
+
return _this5.getMenuItem(index, menu);
|
1019
|
+
} else if (menu.auth === 'returnedStorage') {
|
1020
|
+
return _this5.getMenuItem(index, menu);
|
1021
|
+
} else {
|
1022
|
+
return '';
|
1023
|
+
}
|
1024
|
+
}
|
1025
|
+
}),
|
1026
|
+
_react2.default.createElement(
|
1027
|
+
_tplusComponentsTouch.ModalWraper,
|
1028
|
+
{
|
1029
|
+
title: CardTypeEnum === 'BALANCE_CARD' && !WalletEnabled ? '设置密码' : passwordTitle,
|
1030
|
+
show: modifyPass,
|
1031
|
+
ok: this.changePasswordClick,
|
1032
|
+
className: 'modify-password',
|
1033
|
+
modalType: 'mid',
|
1034
|
+
closeButton: true,
|
1035
|
+
exclueBoard: true,
|
1036
|
+
cancel: this.changePasswordCancel,
|
1037
|
+
btnDissabled: btnDissabled
|
1038
|
+
},
|
1039
|
+
passwordTitle === '换卡' ? _react2.default.createElement(_changeMemberCard2.default, { cardList: cardList && cardList.length && cardList[selected], modifyMember: modifyMember, member: member, ref: function ref(_ref24) {
|
1040
|
+
return _this5.modifyPass = _ref24;
|
1041
|
+
}, cancelModal: this.changePasswordCancel }) : _react2.default.createElement(_modifyPass2.default, { menuKey: menuKey, cardListCopy: cardList, cardList: cardList && cardList.length && cardList[selected], changeBtnDisabled: this.changeBtnDisabled, getCardList: getCardList, selected: selected, storageInit: this.storageInit, passwordTitle: CardTypeEnum === 'BALANCE_CARD' && !WalletEnabled ? '设置密码' : passwordTitle, modifyMember: modifyMember, ref: function ref(_ref25) {
|
1042
|
+
return _this5.modifyPass = _ref25;
|
1043
|
+
}, member: member, cancelModal: this.changePasswordCancel })
|
1044
|
+
),
|
1045
|
+
_react2.default.createElement(
|
1046
|
+
_tplusComponentsTouch.ModalWraper,
|
1047
|
+
{
|
1048
|
+
title: '\u4F1A\u5458\u7ED1\u5B9A',
|
1049
|
+
show: bindCardShow,
|
1050
|
+
className: 'bind-card',
|
1051
|
+
closeButton: false,
|
1052
|
+
ok: this.bindCardClick,
|
1053
|
+
cancel: this.changeBindCardCancel,
|
1054
|
+
btnDissabled: bindCardBtnDisabled
|
1055
|
+
},
|
1056
|
+
_react2.default.createElement(_bindCard2.default, {
|
1057
|
+
ref: function ref(_ref26) {
|
1058
|
+
return _this5.bindCardRef = _ref26;
|
1059
|
+
},
|
1060
|
+
bindCardClick: this.bindCardClick,
|
1061
|
+
changeBindCardBtnDisabled: this.changeBindCardBtnDisabled
|
1062
|
+
})
|
1063
|
+
),
|
1064
|
+
_react2.default.createElement(
|
1065
|
+
_tplusComponentsTouch.ModalWraper,
|
1066
|
+
{
|
1067
|
+
title: '\u9000\u50A8\u503C',
|
1068
|
+
show: refundShow,
|
1069
|
+
className: 'refund',
|
1070
|
+
modalType: 'mid',
|
1071
|
+
closeButton: false,
|
1072
|
+
ok: this.changeRefundOk,
|
1073
|
+
cancel: this.changeRefundCancel,
|
1074
|
+
btnDissabled: refundBtnDisabled
|
1075
|
+
},
|
1076
|
+
_react2.default.createElement(
|
1077
|
+
'div',
|
1078
|
+
{ className: 'refund-container' },
|
1079
|
+
_react2.default.createElement(
|
1080
|
+
'ul',
|
1081
|
+
{ className: 'refund-list' },
|
1082
|
+
_react2.default.createElement(
|
1083
|
+
'li',
|
1084
|
+
{ className: 'refund-item' },
|
1085
|
+
_react2.default.createElement(
|
1086
|
+
'span',
|
1087
|
+
{ className: 'title' },
|
1088
|
+
'\u50A8\u503C\u5361\u53F7\uFF1A'
|
1089
|
+
),
|
1090
|
+
_react2.default.createElement(
|
1091
|
+
'span',
|
1092
|
+
{ className: 'value' },
|
1093
|
+
StorageCardNo
|
1094
|
+
)
|
1095
|
+
),
|
1096
|
+
_react2.default.createElement(
|
1097
|
+
'li',
|
1098
|
+
{ className: 'refund-item' },
|
1099
|
+
_react2.default.createElement(
|
1100
|
+
'span',
|
1101
|
+
{ className: 'title' },
|
1102
|
+
'\u50A8\u503C\u4F59\u989D\uFF1A'
|
1103
|
+
),
|
1104
|
+
_react2.default.createElement(
|
1105
|
+
'span',
|
1106
|
+
{ className: 'value' },
|
1107
|
+
(0, _utils.formatPrecision)(BalanceStorage, 2)
|
1108
|
+
)
|
1109
|
+
),
|
1110
|
+
_react2.default.createElement(
|
1111
|
+
'li',
|
1112
|
+
{ className: 'refund-item' },
|
1113
|
+
_react2.default.createElement(
|
1114
|
+
'span',
|
1115
|
+
{ className: 'title' },
|
1116
|
+
'\u8D60\u9001\u91D1\u989D\uFF1A'
|
1117
|
+
),
|
1118
|
+
_react2.default.createElement(
|
1119
|
+
'span',
|
1120
|
+
{ className: 'value' },
|
1121
|
+
(0, _utils.getFixedNumber)(PresentAmount + usedPresentAmount)
|
1122
|
+
)
|
1123
|
+
),
|
1124
|
+
_react2.default.createElement(
|
1125
|
+
'li',
|
1126
|
+
{ className: 'refund-item' },
|
1127
|
+
_react2.default.createElement(
|
1128
|
+
'span',
|
1129
|
+
{ className: 'title' },
|
1130
|
+
'\u53EF\u9000\u91D1\u989D\uFF1A'
|
1131
|
+
),
|
1132
|
+
_react2.default.createElement(
|
1133
|
+
'span',
|
1134
|
+
{ className: 'value special' },
|
1135
|
+
(0, _utils.getFixedNumber)(canReturnAmount)
|
1136
|
+
)
|
1137
|
+
)
|
1138
|
+
),
|
1139
|
+
_react2.default.createElement(
|
1140
|
+
'p',
|
1141
|
+
{ className: 'tips' },
|
1142
|
+
'\u6CE8\uFF1A\u53EF\u9000\u91D1\u989D = \u50A8\u503C\u4F59\u989D-\u8D60\u9001\u91D1\u3002\uFF08\u4EC5\u652F\u6301\u5C06\u6700\u8FD1\u4E00\u6B21\u50A8\u503C\u91D1\u989D\u539F\u8DEF\u9000\u56DE\u5230\u5FAE\u4FE1\u6216\u652F\u4ED8\u5B9D\uFF0C\u82E5\u8D85\u51FA\u65F6\u8BF7\u9000\u73B0\u91D1\uFF01\uFF09'
|
1143
|
+
)
|
1144
|
+
)
|
1145
|
+
)
|
1146
|
+
);
|
1147
|
+
}
|
1148
|
+
}]);
|
1149
|
+
return _default;
|
1150
|
+
}(_react.Component), _class2.contextTypes = {
|
1151
|
+
onEvent: _propTypes.PropTypes.func,
|
1152
|
+
viewModel: _propTypes.PropTypes.object,
|
1153
|
+
stores: _propTypes.PropTypes.object
|
1154
|
+
}, _initialiseProps = function _initialiseProps() {
|
1155
|
+
var _this6 = this;
|
1156
|
+
|
1157
|
+
this.filterMenus = function (tags) {
|
1158
|
+
var _props12 = _this6.props,
|
1159
|
+
title = _props12.title,
|
1160
|
+
storeKey = _props12.storeKey;
|
1161
|
+
|
1162
|
+
menus = menus1;
|
1163
|
+
return menus.filter(function (menu) {
|
1164
|
+
return ~tags.indexOf(menu.key);
|
1165
|
+
});
|
1166
|
+
};
|
1167
|
+
|
1168
|
+
this.controllerEvent = function (methodName, methodArgs) {
|
1169
|
+
return _this6.context.onEvent({ 'controllerEvent': _mutantsAppfx.Action.fromJS(_this6.context.viewModel, methodName) }, 'controllerEvent', methodArgs);
|
1170
|
+
};
|
1171
|
+
|
1172
|
+
this.storageInit = function () {
|
1173
|
+
var _props13 = _this6.props,
|
1174
|
+
_props13$cardList = _props13.cardList,
|
1175
|
+
cardList = _props13$cardList === undefined ? [] : _props13$cardList,
|
1176
|
+
getCardList = _props13.getCardList,
|
1177
|
+
_props13$selected = _props13.selected,
|
1178
|
+
selected = _props13$selected === undefined ? 0 : _props13$selected,
|
1179
|
+
loadUserInfo = _props13.loadUserInfo;
|
1180
|
+
|
1181
|
+
var _ref27 = cardList[selected] || {},
|
1182
|
+
StorageCardNo = _ref27.StorageCardNo,
|
1183
|
+
ID = _ref27.ID;
|
1184
|
+
|
1185
|
+
var _ref28 = _this6.context.viewModel || {},
|
1186
|
+
_ref28$data = _ref28.data;
|
1187
|
+
|
1188
|
+
_ref28$data = _ref28$data === undefined ? {} : _ref28$data;
|
1189
|
+
var _ref28$data$Member = _ref28$data.Member,
|
1190
|
+
dtMember = _ref28$data$Member === undefined ? {} : _ref28$data$Member;
|
1191
|
+
|
1192
|
+
var isSelectedMember = !!dtMember.ID;
|
1193
|
+
_mutantsMicrofx.stores.memberStore.init({
|
1194
|
+
cardInfo: cardList[selected],
|
1195
|
+
settlementControlEvent: {
|
1196
|
+
onSettleSuccess: function onSettleSuccess() {
|
1197
|
+
_mutantsMicrofx.stores.modalRouter.hide('/memberstore');
|
1198
|
+
if (!!isSelectedMember && dtMember.ID === ID) {
|
1199
|
+
loadUserInfo(ID);
|
1200
|
+
}
|
1201
|
+
getCardList(cardList && cardList.length > 1 ? cardList[0].MemberMobile : StorageCardNo);
|
1202
|
+
}
|
1203
|
+
},
|
1204
|
+
callback: function callback() {
|
1205
|
+
_mutantsMicrofx.stores.modalRouter.show({
|
1206
|
+
url: '/memberstore',
|
1207
|
+
title: '储值',
|
1208
|
+
className: 'memberContainer1',
|
1209
|
+
memberClass: 'memberClassWidth',
|
1210
|
+
onHide: function onHide() {
|
1211
|
+
_mutantsMicrofx.stores.modalRouter.hide('/memberstore');
|
1212
|
+
}
|
1213
|
+
});
|
1214
|
+
}
|
1215
|
+
});
|
1216
|
+
};
|
1217
|
+
|
1218
|
+
this.changePasswordClick = function () {
|
1219
|
+
if (_this6.modifyPass) _this6.modifyPass.handleOk();
|
1220
|
+
};
|
1221
|
+
|
1222
|
+
this.changePasswordCancel = function () {
|
1223
|
+
_this6.setState({ modifyPass: false });
|
1224
|
+
_this6.modifyPass.handleCancel();
|
1225
|
+
};
|
1226
|
+
|
1227
|
+
this.reportLoss = function () {
|
1228
|
+
var _props14 = _this6.props,
|
1229
|
+
member = _props14.member,
|
1230
|
+
handleChange = _props14.handleChange,
|
1231
|
+
memberEnumState = _props14.memberEnumState;
|
1232
|
+
|
1233
|
+
_tplusComponentsTouch.ModalWraper.confirm({
|
1234
|
+
title: '提示',
|
1235
|
+
content: '确定要挂失该会员卡吗?',
|
1236
|
+
onOk: function () {
|
1237
|
+
var _ref29 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee9() {
|
1238
|
+
return _regenerator2.default.wrap(function _callee9$(_context9) {
|
1239
|
+
while (1) {
|
1240
|
+
switch (_context9.prev = _context9.next) {
|
1241
|
+
case 0:
|
1242
|
+
_this6.api.RecordLoss(member).then(function (ret) {
|
1243
|
+
var Success = ret.Success,
|
1244
|
+
Msg = ret.Msg,
|
1245
|
+
Data = ret.Data;
|
1246
|
+
|
1247
|
+
if (Success === true && Data) {
|
1248
|
+
var dt = JSON.parse(Data);
|
1249
|
+
member.Ts = dt.Ts;
|
1250
|
+
member.MemberState.Id = memberEnumState.loss;
|
1251
|
+
handleChange && handleChange(member);
|
1252
|
+
_tplusComponentsTouch.Message.success('挂失成功。');
|
1253
|
+
} else {
|
1254
|
+
_tplusComponentsTouch.Message.error("挂失失败:" + Msg);
|
1255
|
+
}
|
1256
|
+
}).catch(function (e) {
|
1257
|
+
console.log('err', e);
|
1258
|
+
});
|
1259
|
+
|
1260
|
+
case 1:
|
1261
|
+
case 'end':
|
1262
|
+
return _context9.stop();
|
1263
|
+
}
|
1264
|
+
}
|
1265
|
+
}, _callee9, _this6);
|
1266
|
+
}));
|
1267
|
+
|
1268
|
+
return function onOk() {
|
1269
|
+
return _ref29.apply(this, arguments);
|
1270
|
+
};
|
1271
|
+
}(),
|
1272
|
+
onCancel: function onCancel() {},
|
1273
|
+
|
1274
|
+
onHide: function onHide() {}
|
1275
|
+
});
|
1276
|
+
};
|
1277
|
+
|
1278
|
+
this.cancelLoss = function () {
|
1279
|
+
if (!_this6.api) return;
|
1280
|
+
var _props15 = _this6.props,
|
1281
|
+
member = _props15.member,
|
1282
|
+
handleChange = _props15.handleChange,
|
1283
|
+
memberEnumState = _props15.memberEnumState;
|
1284
|
+
|
1285
|
+
_tplusComponentsTouch.ModalWraper.confirm({
|
1286
|
+
title: '提示',
|
1287
|
+
content: '确定要取消挂失该会员卡吗?',
|
1288
|
+
onOk: function () {
|
1289
|
+
var _ref30 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee10() {
|
1290
|
+
return _regenerator2.default.wrap(function _callee10$(_context10) {
|
1291
|
+
while (1) {
|
1292
|
+
switch (_context10.prev = _context10.next) {
|
1293
|
+
case 0:
|
1294
|
+
_this6.api.UnRecordLoss(member).then(function (ret) {
|
1295
|
+
var Success = ret.Success,
|
1296
|
+
Msg = ret.Msg,
|
1297
|
+
Data = ret.Data;
|
1298
|
+
|
1299
|
+
if (Success === true && Data) {
|
1300
|
+
var dt = JSON.parse(Data);
|
1301
|
+
member.Ts = dt.Ts;
|
1302
|
+
member.MemberState.Id = memberEnumState.using;
|
1303
|
+
handleChange && handleChange(member);
|
1304
|
+
_tplusComponentsTouch.Message.success('取消挂失成功。');
|
1305
|
+
} else {
|
1306
|
+
_tplusComponentsTouch.Message.error("取消挂失败:" + Msg);
|
1307
|
+
}
|
1308
|
+
}).catch(function (e) {
|
1309
|
+
console.log('err', e);
|
1310
|
+
});
|
1311
|
+
|
1312
|
+
case 1:
|
1313
|
+
case 'end':
|
1314
|
+
return _context10.stop();
|
1315
|
+
}
|
1316
|
+
}
|
1317
|
+
}, _callee10, _this6);
|
1318
|
+
}));
|
1319
|
+
|
1320
|
+
return function onOk() {
|
1321
|
+
return _ref30.apply(this, arguments);
|
1322
|
+
};
|
1323
|
+
}(),
|
1324
|
+
onCancel: function onCancel() {},
|
1325
|
+
|
1326
|
+
onHide: function onHide() {}
|
1327
|
+
});
|
1328
|
+
};
|
1329
|
+
|
1330
|
+
this.openCard = function () {
|
1331
|
+
var _props16 = _this6.props,
|
1332
|
+
member = _props16.member,
|
1333
|
+
_props16$selected = _props16.selected,
|
1334
|
+
selected = _props16$selected === undefined ? 0 : _props16$selected,
|
1335
|
+
memberEnumState = _props16.memberEnumState;
|
1336
|
+
|
1337
|
+
var _ref31 = member || {},
|
1338
|
+
ID = _ref31.ID,
|
1339
|
+
_ref31$MemberType = _ref31.MemberType;
|
1340
|
+
|
1341
|
+
_ref31$MemberType = _ref31$MemberType === undefined ? {} : _ref31$MemberType;
|
1342
|
+
var IsStorage = _ref31$MemberType.IsStorage;
|
1343
|
+
|
1344
|
+
memberStore.GetMemberDTO(ID, false).then(function (ret) {
|
1345
|
+
_mutantsMicrofx.stores.selectMemberStore.setCurMemberInfo(ret);
|
1346
|
+
_mutantsMicrofx.stores.modalRouter.show({
|
1347
|
+
url: '/AA/OPENCARD',
|
1348
|
+
title: '开卡',
|
1349
|
+
className: 'memberAddModal',
|
1350
|
+
modalType: 'big',
|
1351
|
+
onHide: function onHide() {
|
1352
|
+
return _mutantsMicrofx.stores.modalRouter.hide('/AA/OPENCARD');
|
1353
|
+
},
|
1354
|
+
closeCk: function closeCk() {
|
1355
|
+
member.MemberState.Id = memberEnumState.using;
|
1356
|
+
}
|
1357
|
+
|
1358
|
+
});
|
1359
|
+
_tplusComponentsTouch.Loading.hide();
|
1360
|
+
});
|
1361
|
+
_mutantsMicrofx.stores.modalRouter.show((0, _defineProperty3.default)({
|
1362
|
+
url: '/AA/OPENCARD',
|
1363
|
+
title: '开卡',
|
1364
|
+
className: 'memberAddModal',
|
1365
|
+
modalType: 'big',
|
1366
|
+
destroyOnClose: true,
|
1367
|
+
onHide: function onHide() {
|
1368
|
+
return _mutantsMicrofx.stores.modalRouter.hide('/AA/OPENCARD');
|
1369
|
+
},
|
1370
|
+
closeCk: function closeCk() {
|
1371
|
+
member.MemberState.Id = memberEnumState.using;
|
1372
|
+
}
|
1373
|
+
}, 'onHide', function onHide() {}));
|
1374
|
+
_tplusComponentsTouch.Loading.hide();
|
1375
|
+
};
|
1376
|
+
|
1377
|
+
this.bindCard = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee11() {
|
1378
|
+
var data, _props17, _props17$cardList, cardList, _props17$selected, selected, _ref33, ID;
|
1379
|
+
|
1380
|
+
return _regenerator2.default.wrap(function _callee11$(_context11) {
|
1381
|
+
while (1) {
|
1382
|
+
switch (_context11.prev = _context11.next) {
|
1383
|
+
case 0:
|
1384
|
+
_context11.next = 2;
|
1385
|
+
return _this6.justifyAuthority();
|
1386
|
+
|
1387
|
+
case 2:
|
1388
|
+
data = _context11.sent;
|
1389
|
+
|
1390
|
+
if (!(data === false)) {
|
1391
|
+
_context11.next = 5;
|
1392
|
+
break;
|
1393
|
+
}
|
1394
|
+
|
1395
|
+
return _context11.abrupt('return');
|
1396
|
+
|
1397
|
+
case 5:
|
1398
|
+
_props17 = _this6.props, _props17$cardList = _props17.cardList, cardList = _props17$cardList === undefined ? [] : _props17$cardList, _props17$selected = _props17.selected, selected = _props17$selected === undefined ? 0 : _props17$selected;
|
1399
|
+
_ref33 = cardList[selected] || {}, ID = _ref33.ID;
|
1400
|
+
|
1401
|
+
if (!ID) {
|
1402
|
+
_context11.next = 10;
|
1403
|
+
break;
|
1404
|
+
}
|
1405
|
+
|
1406
|
+
_tplusComponentsTouch.Message.error('该储值卡已经绑定,不能再次进行绑定');
|
1407
|
+
return _context11.abrupt('return');
|
1408
|
+
|
1409
|
+
case 10:
|
1410
|
+
_this6.setState({ bindCardShow: true });
|
1411
|
+
|
1412
|
+
case 11:
|
1413
|
+
case 'end':
|
1414
|
+
return _context11.stop();
|
1415
|
+
}
|
1416
|
+
}
|
1417
|
+
}, _callee11, _this6);
|
1418
|
+
}));
|
1419
|
+
this.changeBindCardCancel = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee12() {
|
1420
|
+
var data;
|
1421
|
+
return _regenerator2.default.wrap(function _callee12$(_context12) {
|
1422
|
+
while (1) {
|
1423
|
+
switch (_context12.prev = _context12.next) {
|
1424
|
+
case 0:
|
1425
|
+
_context12.next = 2;
|
1426
|
+
return _this6.justifyAuthority();
|
1427
|
+
|
1428
|
+
case 2:
|
1429
|
+
data = _context12.sent;
|
1430
|
+
|
1431
|
+
if (!(data === false)) {
|
1432
|
+
_context12.next = 5;
|
1433
|
+
break;
|
1434
|
+
}
|
1435
|
+
|
1436
|
+
return _context12.abrupt('return');
|
1437
|
+
|
1438
|
+
case 5:
|
1439
|
+
_this6.setState({
|
1440
|
+
bindCardShow: false,
|
1441
|
+
bindCardBtnDisabled: true
|
1442
|
+
});
|
1443
|
+
|
1444
|
+
case 6:
|
1445
|
+
case 'end':
|
1446
|
+
return _context12.stop();
|
1447
|
+
}
|
1448
|
+
}
|
1449
|
+
}, _callee12, _this6);
|
1450
|
+
}));
|
1451
|
+
|
1452
|
+
this.changeBindCardBtnDisabled = function (disabled) {
|
1453
|
+
_this6.setState({
|
1454
|
+
bindCardBtnDisabled: disabled
|
1455
|
+
});
|
1456
|
+
};
|
1457
|
+
|
1458
|
+
this.bindCardClick = function () {
|
1459
|
+
if (_this6.bindCardRef) {
|
1460
|
+
var storeKey = _this6.props.storeKey;
|
1461
|
+
|
1462
|
+
_this6.bindCardFn(_this6.bindCardRef.state);
|
1463
|
+
}
|
1464
|
+
};
|
1465
|
+
|
1466
|
+
this.changeRefundCancel = function () {
|
1467
|
+
_this6.setState({
|
1468
|
+
refundShow: false
|
1469
|
+
});
|
1470
|
+
};
|
1471
|
+
|
1472
|
+
this.changeRefundOk = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee13() {
|
1473
|
+
var _props18, _props18$cardList, cardList, _props18$selected, selected, _ref36, MeStorageCardId, _ref36$BalanceStorage, BalanceStorage, _ref36$PresentAmount, PresentAmount, StorageCardNo, ID, _ref37, _ref37$isCanRefund, isCanRefund, _ref37$canReturnAmoun, canReturnAmount, _ref37$storageInfos, storageInfos, refundable, storageAmount, latestStorageAmount;
|
1474
|
+
|
1475
|
+
return _regenerator2.default.wrap(function _callee13$(_context13) {
|
1476
|
+
while (1) {
|
1477
|
+
switch (_context13.prev = _context13.next) {
|
1478
|
+
case 0:
|
1479
|
+
_props18 = _this6.props, _props18$cardList = _props18.cardList, cardList = _props18$cardList === undefined ? [] : _props18$cardList, _props18$selected = _props18.selected, selected = _props18$selected === undefined ? 0 : _props18$selected;
|
1480
|
+
_ref36 = cardList.length && cardList[selected] || {}, MeStorageCardId = _ref36.MeStorageCardId, _ref36$BalanceStorage = _ref36.BalanceStorage, BalanceStorage = _ref36$BalanceStorage === undefined ? 0 : _ref36$BalanceStorage, _ref36$PresentAmount = _ref36.PresentAmount, PresentAmount = _ref36$PresentAmount === undefined ? 0 : _ref36$PresentAmount, StorageCardNo = _ref36.StorageCardNo, ID = _ref36.ID;
|
1481
|
+
_ref37 = _this6.state.lastesStorageResult || {}, _ref37$isCanRefund = _ref37.isCanRefund, isCanRefund = _ref37$isCanRefund === undefined ? false : _ref37$isCanRefund, _ref37$canReturnAmoun = _ref37.canReturnAmount, canReturnAmount = _ref37$canReturnAmoun === undefined ? 0 : _ref37$canReturnAmoun, _ref37$storageInfos = _ref37.storageInfos, storageInfos = _ref37$storageInfos === undefined ? [] : _ref37$storageInfos;
|
1482
|
+
refundable = parseFloat((0, _utils.getFixedNumber)(canReturnAmount));
|
1483
|
+
storageAmount = (0, _utils.getFixedNumber)(0 - canReturnAmount);
|
1484
|
+
|
1485
|
+
// 退款金额小于等于0,不允许退款
|
1486
|
+
|
1487
|
+
if (!(Number(canReturnAmount) <= 0)) {
|
1488
|
+
_context13.next = 8;
|
1489
|
+
break;
|
1490
|
+
}
|
1491
|
+
|
1492
|
+
_tplusComponentsTouch.Message.error('无可退金额,不支持退款!');
|
1493
|
+
return _context13.abrupt('return');
|
1494
|
+
|
1495
|
+
case 8:
|
1496
|
+
if (isCanRefund) {
|
1497
|
+
_context13.next = 11;
|
1498
|
+
break;
|
1499
|
+
}
|
1500
|
+
|
1501
|
+
_this6.returnedCash('\u53EA\u80FD\u9000\u73B0\u91D1\uFF0C\u662F\u5426\u7EE7\u7EED', storageAmount);
|
1502
|
+
return _context13.abrupt('return');
|
1503
|
+
|
1504
|
+
case 11:
|
1505
|
+
|
1506
|
+
// 计算最后一次储值的总金额,
|
1507
|
+
latestStorageAmount = storageInfos.reduce(function (total, cur) {
|
1508
|
+
return total + cur.latestStorageAmount;
|
1509
|
+
}, 0);
|
1510
|
+
// 退款只支持退最后一次储值的金额,如果最后一次储值的金额小于可退金额,弹出提示。
|
1511
|
+
|
1512
|
+
if (!(latestStorageAmount && latestStorageAmount < refundable)) {
|
1513
|
+
_context13.next = 15;
|
1514
|
+
break;
|
1515
|
+
}
|
1516
|
+
|
1517
|
+
_this6.returnedCash('\u9000\u6B3E\u5927\u4E8E\u6700\u540E\u4E00\u6B21\u50A8\u503C\u91D1\u989D\uFF0C\u65E0\u6CD5\u539F\u8DEF\u9000\u56DE\uFF0C\u53EA\u53EF\u9000\u73B0\u91D1\uFF01\u662F\u5426\u9000\u6B3E\uFF1F', storageAmount);
|
1518
|
+
return _context13.abrupt('return');
|
1519
|
+
|
1520
|
+
case 15:
|
1521
|
+
|
1522
|
+
_this6.submitRefundStorage(cardList[selected], storageAmount);
|
1523
|
+
|
1524
|
+
case 16:
|
1525
|
+
case 'end':
|
1526
|
+
return _context13.stop();
|
1527
|
+
}
|
1528
|
+
}
|
1529
|
+
}, _callee13, _this6);
|
1530
|
+
}));
|
1531
|
+
|
1532
|
+
this.getThirdPaymentInfo = function (item, settlementStore) {
|
1533
|
+
var _ref38 = item || {},
|
1534
|
+
paymentTypeId = _ref38.paymentTypeId,
|
1535
|
+
thirdPaymentReturnInfo = _ref38.thirdPaymentReturnInfo;
|
1536
|
+
|
1537
|
+
var obj = {};
|
1538
|
+
var paymode = settlementStore && settlementStore.paymode;
|
1539
|
+
if (paymode) {
|
1540
|
+
var mode = paymode && paymode.paymodes.find(function (v) {
|
1541
|
+
return v.idSettleStyle == paymentTypeId;
|
1542
|
+
});
|
1543
|
+
obj = thirdPaymentReturnInfo ? {
|
1544
|
+
ThirdPaymentInfo: mode && mode.thridPayment || null,
|
1545
|
+
ThirdPaymentReturnInfo: thirdPaymentReturnInfo
|
1546
|
+
} : {};
|
1547
|
+
}
|
1548
|
+
return obj;
|
1549
|
+
};
|
1550
|
+
|
1551
|
+
this.returnedStorage = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee14() {
|
1552
|
+
var data, _props19, _props19$cardList, cardList, _props19$selected, selected, _ref40, Id, MeStorageCardId, _ref40$BalanceStorage, BalanceStorage, _ref40$PresentAmount, PresentAmount, refundable, lastesStorageResult;
|
1553
|
+
|
1554
|
+
return _regenerator2.default.wrap(function _callee14$(_context14) {
|
1555
|
+
while (1) {
|
1556
|
+
switch (_context14.prev = _context14.next) {
|
1557
|
+
case 0:
|
1558
|
+
_context14.next = 2;
|
1559
|
+
return _this6.justifyAuthority();
|
1560
|
+
|
1561
|
+
case 2:
|
1562
|
+
data = _context14.sent;
|
1563
|
+
|
1564
|
+
if (!(data === false)) {
|
1565
|
+
_context14.next = 5;
|
1566
|
+
break;
|
1567
|
+
}
|
1568
|
+
|
1569
|
+
return _context14.abrupt('return');
|
1570
|
+
|
1571
|
+
case 5:
|
1572
|
+
_props19 = _this6.props, _props19$cardList = _props19.cardList, cardList = _props19$cardList === undefined ? [] : _props19$cardList, _props19$selected = _props19.selected, selected = _props19$selected === undefined ? 0 : _props19$selected;
|
1573
|
+
_ref40 = cardList[selected] || {}, Id = _ref40.Id, MeStorageCardId = _ref40.MeStorageCardId, _ref40$BalanceStorage = _ref40.BalanceStorage, BalanceStorage = _ref40$BalanceStorage === undefined ? 0 : _ref40$BalanceStorage, _ref40$PresentAmount = _ref40.PresentAmount, PresentAmount = _ref40$PresentAmount === undefined ? 0 : _ref40$PresentAmount;
|
1574
|
+
|
1575
|
+
// 获取最后一次储值信息
|
1576
|
+
|
1577
|
+
refundable = parseFloat((0, _utils.getFixedNumber)(BalanceStorage - PresentAmount));
|
1578
|
+
_context14.next = 10;
|
1579
|
+
return _this6.api.getLatestStorageAmount({ cardId: MeStorageCardId, inputRefundAmount: refundable });
|
1580
|
+
|
1581
|
+
case 10:
|
1582
|
+
lastesStorageResult = _context14.sent;
|
1583
|
+
|
1584
|
+
_this6.setState({
|
1585
|
+
lastesStorageResult: lastesStorageResult.data || {}
|
1586
|
+
});
|
1587
|
+
|
1588
|
+
cardList[selected].meMemberId = Id;
|
1589
|
+
cardList[selected].isRefundStorage = 1; // 自己添加参数,用来判断是储值还是退储值
|
1590
|
+
_mutantsMicrofx.stores.memberStore.init({
|
1591
|
+
cardInfo: cardList[selected],
|
1592
|
+
settlementControlEvent: {},
|
1593
|
+
callback: function callback() {
|
1594
|
+
_this6.setState({
|
1595
|
+
refundShow: true
|
1596
|
+
});
|
1597
|
+
}
|
1598
|
+
});
|
1599
|
+
|
1600
|
+
case 15:
|
1601
|
+
case 'end':
|
1602
|
+
return _context14.stop();
|
1603
|
+
}
|
1604
|
+
}
|
1605
|
+
}, _callee14, _this6);
|
1606
|
+
}));
|
1607
|
+
this.memberUnBindCard = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee16() {
|
1608
|
+
var data, _props20, _props20$cardList, cardList, _props20$selected, selected, _ref42, StorageCardNo, MemberMobile, MemberName, ID;
|
1609
|
+
|
1610
|
+
return _regenerator2.default.wrap(function _callee16$(_context16) {
|
1611
|
+
while (1) {
|
1612
|
+
switch (_context16.prev = _context16.next) {
|
1613
|
+
case 0:
|
1614
|
+
_context16.next = 2;
|
1615
|
+
return _this6.justifyAuthority();
|
1616
|
+
|
1617
|
+
case 2:
|
1618
|
+
data = _context16.sent;
|
1619
|
+
|
1620
|
+
if (!(data === false)) {
|
1621
|
+
_context16.next = 5;
|
1622
|
+
break;
|
1623
|
+
}
|
1624
|
+
|
1625
|
+
return _context16.abrupt('return');
|
1626
|
+
|
1627
|
+
case 5:
|
1628
|
+
_props20 = _this6.props, _props20$cardList = _props20.cardList, cardList = _props20$cardList === undefined ? [] : _props20$cardList, _props20$selected = _props20.selected, selected = _props20$selected === undefined ? 0 : _props20$selected;
|
1629
|
+
_ref42 = cardList[selected] || {}, StorageCardNo = _ref42.StorageCardNo, MemberMobile = _ref42.MemberMobile, MemberName = _ref42.MemberName, ID = _ref42.ID;
|
1630
|
+
|
1631
|
+
if (ID) {
|
1632
|
+
_context16.next = 10;
|
1633
|
+
break;
|
1634
|
+
}
|
1635
|
+
|
1636
|
+
_tplusComponentsTouch.Message.error('该卡未绑定会员');
|
1637
|
+
return _context16.abrupt('return');
|
1638
|
+
|
1639
|
+
case 10:
|
1640
|
+
_tplusComponentsTouch.ModalWraper.confirm({
|
1641
|
+
title: '提示',
|
1642
|
+
content: '\u6B64\u5361\u5C5E\u4E8E' + (MemberName || MemberMobile) + '\u4F1A\u5458\uFF0C\u786E\u8BA4\u89E3\u7ED1\u5417\uFF1F',
|
1643
|
+
confirmLoading: _this6.state.memberUnBindCardLoading,
|
1644
|
+
onOk: function () {
|
1645
|
+
var _ref43 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee15() {
|
1646
|
+
return _regenerator2.default.wrap(function _callee15$(_context15) {
|
1647
|
+
while (1) {
|
1648
|
+
switch (_context15.prev = _context15.next) {
|
1649
|
+
case 0:
|
1650
|
+
_this6.setState({
|
1651
|
+
memberUnBindCardLoading: true
|
1652
|
+
});
|
1653
|
+
_this6.api.MeStorageCardUnbind({ StorageCardNo: StorageCardNo }).then(function (res) {
|
1654
|
+
var getCardList = _this6.props.getCardList;
|
1655
|
+
|
1656
|
+
_tplusComponentsTouch.Message.success('解绑成功');
|
1657
|
+
getCardList(cardList && cardList.length > 1 ? cardList[0].MemberMobile : StorageCardNo);
|
1658
|
+
_this6.setState({
|
1659
|
+
memberUnBindCardLoading: false
|
1660
|
+
});
|
1661
|
+
}).catch(function () {
|
1662
|
+
_this6.setState({
|
1663
|
+
memberUnBindCardLoading: false
|
1664
|
+
});
|
1665
|
+
});
|
1666
|
+
|
1667
|
+
case 2:
|
1668
|
+
case 'end':
|
1669
|
+
return _context15.stop();
|
1670
|
+
}
|
1671
|
+
}
|
1672
|
+
}, _callee15, _this6);
|
1673
|
+
}));
|
1674
|
+
|
1675
|
+
return function onOk() {
|
1676
|
+
return _ref43.apply(this, arguments);
|
1677
|
+
};
|
1678
|
+
}()
|
1679
|
+
});
|
1680
|
+
|
1681
|
+
case 11:
|
1682
|
+
case 'end':
|
1683
|
+
return _context16.stop();
|
1684
|
+
}
|
1685
|
+
}
|
1686
|
+
}, _callee16, _this6);
|
1687
|
+
}));
|
1688
|
+
|
1689
|
+
this.changeBtnDisabled = function (value) {
|
1690
|
+
_this6.setState({
|
1691
|
+
btnDissabled: value
|
1692
|
+
});
|
1693
|
+
};
|
1694
|
+
|
1695
|
+
this.getMenuItem = function (index, menu) {
|
1696
|
+
var _props21 = _this6.props,
|
1697
|
+
loadingBtn = _props21.loadingBtn,
|
1698
|
+
_props21$cardList = _props21.cardList,
|
1699
|
+
cardList = _props21$cardList === undefined ? [] : _props21$cardList,
|
1700
|
+
_props21$selected = _props21.selected,
|
1701
|
+
selected = _props21$selected === undefined ? 0 : _props21$selected;
|
1702
|
+
|
1703
|
+
var _ref44 = _this6.state || {},
|
1704
|
+
setPwdShortKey = _ref44.setPwdShortKey;
|
1705
|
+
|
1706
|
+
var newStyle = _mutantsUtil.localStore && _mutantsUtil.localStore.get('voucherDefaultPosMode') == 'voucher';
|
1707
|
+
|
1708
|
+
var _ref45 = cardList && cardList.length && cardList[selected] || {},
|
1709
|
+
WalletEnabled = _ref45.WalletEnabled,
|
1710
|
+
CardTypeEnum = _ref45.CardTypeEnum;
|
1711
|
+
// 控制显示修改密码还是设置密码
|
1712
|
+
|
1713
|
+
|
1714
|
+
if (menu.auth === 'ModifyPassword') {
|
1715
|
+
if (CardTypeEnum === 'BALANCE_CARD') {
|
1716
|
+
return _react2.default.createElement(
|
1717
|
+
'div',
|
1718
|
+
{ key: index, className: 'primary-color b-theme ' + ('hot-' + menu.auth) + ' ' + (loadingBtn === false ? 'member-menu-el' : 'member-menu-el disabled-member-select-btn ') + ' ' + (newStyle && 'memberHeight'),
|
1719
|
+
onClick: function onClick() {
|
1720
|
+
if (loadingBtn === false) _this6.click(menu.key, menu.auth);
|
1721
|
+
}
|
1722
|
+
},
|
1723
|
+
WalletEnabled ? _react2.default.createElement(
|
1724
|
+
'div',
|
1725
|
+
null,
|
1726
|
+
_react2.default.createElement(_tplusComponentsTouch.Ticon, { icon: menu.icon }),
|
1727
|
+
_react2.default.createElement(
|
1728
|
+
'span',
|
1729
|
+
null,
|
1730
|
+
'\u4FEE\u6539\u5BC6\u7801'
|
1731
|
+
),
|
1732
|
+
_react2.default.createElement(
|
1733
|
+
'div',
|
1734
|
+
{ className: 'menuHotkey' },
|
1735
|
+
menu.SHORTCUT_KEY
|
1736
|
+
)
|
1737
|
+
) : _react2.default.createElement(
|
1738
|
+
'div',
|
1739
|
+
null,
|
1740
|
+
_react2.default.createElement(_tplusComponentsTouch.Ticon, { icon: menu.icon }),
|
1741
|
+
_react2.default.createElement(
|
1742
|
+
'span',
|
1743
|
+
null,
|
1744
|
+
'\u8BBE\u7F6E\u5BC6\u7801'
|
1745
|
+
),
|
1746
|
+
_react2.default.createElement(
|
1747
|
+
'div',
|
1748
|
+
{ className: 'menuHotkey' },
|
1749
|
+
setPwdShortKey
|
1750
|
+
)
|
1751
|
+
)
|
1752
|
+
);
|
1753
|
+
} else {
|
1754
|
+
return _react2.default.createElement(
|
1755
|
+
'div',
|
1756
|
+
{ key: index, className: 'primary-color b-theme ' + ('hot-' + menu.auth) + ' ' + (loadingBtn === false ? 'member-menu-el' : 'member-menu-el disabled-member-select-btn ') + ' ' + (newStyle && 'memberHeight'),
|
1757
|
+
onClick: function onClick() {
|
1758
|
+
if (loadingBtn === false) _this6.click(menu.key, menu.auth);
|
1759
|
+
}
|
1760
|
+
},
|
1761
|
+
_react2.default.createElement(
|
1762
|
+
'div',
|
1763
|
+
null,
|
1764
|
+
_react2.default.createElement(_tplusComponentsTouch.Ticon, { icon: menu.icon }),
|
1765
|
+
_react2.default.createElement(
|
1766
|
+
'span',
|
1767
|
+
null,
|
1768
|
+
'\u4FEE\u6539\u5BC6\u7801'
|
1769
|
+
),
|
1770
|
+
_react2.default.createElement(
|
1771
|
+
'div',
|
1772
|
+
{ className: 'menuHotkey' },
|
1773
|
+
menu.SHORTCUT_KEY
|
1774
|
+
)
|
1775
|
+
)
|
1776
|
+
);
|
1777
|
+
}
|
1778
|
+
} else if (CardTypeEnum === 'BALANCE_CARD' && !WalletEnabled && menu.auth === 'PosResetPwd') {
|
1779
|
+
return;
|
1780
|
+
} else {
|
1781
|
+
return _react2.default.createElement(
|
1782
|
+
'div',
|
1783
|
+
{
|
1784
|
+
key: index,
|
1785
|
+
className: 'primary-color b-theme ' + ('hot-' + menu.auth) + ' ' + (loadingBtn === false ? 'member-menu-el' : 'member-menu-el disabled-member-select-btn ') + ' ' + (newStyle && 'memberHeight'),
|
1786
|
+
onClick: function onClick() {
|
1787
|
+
if (loadingBtn === false) _this6.click(menu.key, menu.auth, menu.name);
|
1788
|
+
}
|
1789
|
+
},
|
1790
|
+
_react2.default.createElement(_tplusComponentsTouch.Ticon, { icon: menu.icon }),
|
1791
|
+
_react2.default.createElement(
|
1792
|
+
'span',
|
1793
|
+
null,
|
1794
|
+
menu.name
|
1795
|
+
),
|
1796
|
+
_react2.default.createElement(
|
1797
|
+
'div',
|
1798
|
+
{ className: 'menuHotkey' },
|
1799
|
+
menu.SHORTCUT_KEY
|
1800
|
+
)
|
1801
|
+
);
|
1802
|
+
}
|
1803
|
+
};
|
1804
|
+
}, _temp)) || _class;
|
1805
|
+
|
1806
|
+
exports.default = _default;
|
1807
|
+
//# sourceMappingURL=index.js.map
|