tplus-components-touch 1.26.1 → 1.27.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -16
- package/locales/zh/tplus-components-touch.json +1 -1
- package/locales/zh-CN/tplus-components-touch.json +1 -1
- package/mocks/memberInfo.json +79 -79
- package/package.json +2 -2
- package/tsconfig.json +26 -26
- package/dist/components/addLog/AddLogProcessor.js +0 -53
- package/dist/components/addLog/AddLogProcessor.js.map +0 -1
- package/dist/components/addLog/OperationLogApi.js +0 -164
- package/dist/components/addLog/OperationLogApi.js.map +0 -1
- package/dist/components/autoComplete/index.js +0 -259
- package/dist/components/autoComplete/index.js.map +0 -1
- package/dist/components/autoComplete/index.less +0 -89
- package/dist/components/autoComplete/option.js +0 -75
- package/dist/components/autoComplete/option.js.map +0 -1
- package/dist/components/autoCompleteWithKeyboard/index.js +0 -206
- package/dist/components/autoCompleteWithKeyboard/index.js.map +0 -1
- package/dist/components/autoCompleteWithKeyboard/index.less +0 -5
- package/dist/components/billSearch/api.js +0 -425
- package/dist/components/billSearch/api.js.map +0 -1
- package/dist/components/billSearch/index.js +0 -2030
- package/dist/components/billSearch/index.js.map +0 -1
- package/dist/components/billSearch/index.less +0 -573
- package/dist/components/cloudPrint/BTPrintFormatUtil.js +0 -568
- package/dist/components/cloudPrint/BTPrintFormatUtil.js.map +0 -1
- package/dist/components/cloudPrint/api.js +0 -454
- package/dist/components/cloudPrint/api.js.map +0 -1
- package/dist/components/cloudPrint/index.js +0 -974
- package/dist/components/cloudPrint/index.js.map +0 -1
- package/dist/components/cloudPrint/printDispatch.js +0 -336
- package/dist/components/cloudPrint/printDispatch.js.map +0 -1
- package/dist/components/commonForm/autoComplete/index.js +0 -272
- package/dist/components/commonForm/autoComplete/index.js.map +0 -1
- package/dist/components/commonForm/autoComplete/style.less +0 -8
- package/dist/components/commonForm/datePicker/index.js +0 -117
- package/dist/components/commonForm/datePicker/index.js.map +0 -1
- package/dist/components/commonForm/datePicker/style.less +0 -11
- package/dist/components/commonForm/formControl/index.js +0 -183
- package/dist/components/commonForm/formControl/index.js.map +0 -1
- package/dist/components/commonForm/formControl/style.less +0 -8
- package/dist/components/commonForm/index.js +0 -208
- package/dist/components/commonForm/index.js.map +0 -1
- package/dist/components/commonForm/inputNumber/index.js +0 -291
- package/dist/components/commonForm/inputNumber/index.js.map +0 -1
- package/dist/components/commonForm/inputNumber/style.less +0 -17
- package/dist/components/commonForm/radio/index.js +0 -157
- package/dist/components/commonForm/radio/index.js.map +0 -1
- package/dist/components/commonForm/radio/style.less +0 -11
- package/dist/components/commonForm/style.less +0 -12
- package/dist/components/deliverySearch/api.js +0 -355
- package/dist/components/deliverySearch/api.js.map +0 -1
- package/dist/components/deliverySearch/index.js +0 -1254
- package/dist/components/deliverySearch/index.js.map +0 -1
- package/dist/components/deliverySearch/index.less +0 -624
- package/dist/components/form/index.js +0 -325
- package/dist/components/form/index.js.map +0 -1
- package/dist/components/hardwareAPI/index.js +0 -181
- package/dist/components/hardwareAPI/index.js.map +0 -1
- package/dist/components/hotKey/config.js +0 -306
- package/dist/components/hotKey/config.js.map +0 -1
- package/dist/components/hotKey/hotKeyModal.js +0 -479
- package/dist/components/hotKey/hotKeyModal.js.map +0 -1
- package/dist/components/hotKey/index.js +0 -782
- package/dist/components/hotKey/index.js.map +0 -1
- package/dist/components/hotKey/localConfig.js +0 -3831
- package/dist/components/hotKey/localConfig.js.map +0 -1
- package/dist/components/hotKey/style.less +0 -99
- package/dist/components/hotKey/utils.js +0 -135
- package/dist/components/hotKey/utils.js.map +0 -1
- package/dist/components/input/index.js +0 -257
- package/dist/components/input/index.js.map +0 -1
- package/dist/components/input/style.less +0 -107
- package/dist/components/input/tplusInput/index.js +0 -89
- package/dist/components/input/tplusInput/index.js.map +0 -1
- package/dist/components/input/tplusInput/inputContent.js +0 -130
- package/dist/components/input/tplusInput/inputContent.js.map +0 -1
- package/dist/components/input/tplusInput/inputs.js +0 -201
- package/dist/components/input/tplusInput/inputs.js.map +0 -1
- package/dist/components/input/tplusInput/style.less +0 -194
- package/dist/components/input/utils/index.js +0 -26
- package/dist/components/input/utils/index.js.map +0 -1
- package/dist/components/inventorySearch/api.js +0 -214
- package/dist/components/inventorySearch/api.js.map +0 -1
- package/dist/components/inventorySearch/index.js +0 -303
- package/dist/components/inventorySearch/index.js.map +0 -1
- package/dist/components/inventorySearch/index.less +0 -244
- package/dist/components/inventorySearch/store.js +0 -344
- package/dist/components/inventorySearch/store.js.map +0 -1
- package/dist/components/inventorySearch/tab.js +0 -255
- package/dist/components/inventorySearch/tab.js.map +0 -1
- package/dist/components/keyboard/index.js +0 -258
- package/dist/components/keyboard/index.js.map +0 -1
- package/dist/components/keyboard/index.less +0 -556
- package/dist/components/keyboard/letterKeyboard.js +0 -222
- package/dist/components/keyboard/letterKeyboard.js.map +0 -1
- package/dist/components/keyboard/numKeyboard.js +0 -458
- package/dist/components/keyboard/numKeyboard.js.map +0 -1
- package/dist/components/keyboard/numKeyboardDigit.js +0 -502
- package/dist/components/keyboard/numKeyboardDigit.js.map +0 -1
- package/dist/components/keyboard/numKeyboardScan.js +0 -215
- package/dist/components/keyboard/numKeyboardScan.js.map +0 -1
- package/dist/components/keyboard/numberButtonInteger.js +0 -296
- package/dist/components/keyboard/numberButtonInteger.js.map +0 -1
- package/dist/components/keyboard/numberButton_input.js +0 -300
- package/dist/components/keyboard/numberButton_input.js.map +0 -1
- package/dist/components/keyboard/onlyKeyboard.js +0 -90
- package/dist/components/keyboard/onlyKeyboard.js.map +0 -1
- package/dist/components/keyboard/onlyLetterButton.js +0 -187
- package/dist/components/keyboard/onlyLetterButton.js.map +0 -1
- package/dist/components/keyboard/onlyLetterButton2.js +0 -235
- package/dist/components/keyboard/onlyLetterButton2.js.map +0 -1
- package/dist/components/keyboard/onlyLetterButton2.less +0 -184
- package/dist/components/keyboard/onlyNumberButton.js +0 -128
- package/dist/components/keyboard/onlyNumberButton.js.map +0 -1
- package/dist/components/keyboard/onlyNumberButton2.js +0 -115
- package/dist/components/keyboard/onlyNumberButton2.js.map +0 -1
- package/dist/components/keyboard/textKeyboard.js +0 -50
- package/dist/components/keyboard/textKeyboard.js.map +0 -1
- package/dist/components/layout/hamburger.js +0 -29
- package/dist/components/layout/hamburger.js.map +0 -1
- package/dist/components/layout/index.js +0 -31
- package/dist/components/layout/index.js.map +0 -1
- package/dist/components/layout/layout.js +0 -182
- package/dist/components/layout/layout.js.map +0 -1
- package/dist/components/layout/sider.js +0 -165
- package/dist/components/layout/sider.js.map +0 -1
- package/dist/components/layout/style.less +0 -83
- package/dist/components/loading/index.js +0 -193
- package/dist/components/loading/index.js.map +0 -1
- package/dist/components/loading/loadingContent.js +0 -159
- package/dist/components/loading/loadingContent.js.map +0 -1
- package/dist/components/loading/style.less +0 -51
- package/dist/components/loading/utils.js +0 -29
- package/dist/components/loading/utils.js.map +0 -1
- package/dist/components/message/index.js +0 -286
- package/dist/components/message/index.js.map +0 -1
- package/dist/components/message/index.less +0 -150
- package/dist/components/modal/index.js +0 -93
- package/dist/components/modal/index.js.map +0 -1
- package/dist/components/modal/index.less +0 -19
- package/dist/components/modalVertical/index.js +0 -338
- package/dist/components/modalVertical/index.js.map +0 -1
- package/dist/components/modalVertical/style.less +0 -114
- package/dist/components/modalWraper/index.js +0 -482
- package/dist/components/modalWraper/index.js.map +0 -1
- package/dist/components/modalWraper/style.less +0 -363
- package/dist/components/modalWraper/utils.js +0 -49
- package/dist/components/modalWraper/utils.js.map +0 -1
- package/dist/components/notification/index.js +0 -124
- package/dist/components/notification/index.js.map +0 -1
- package/dist/components/notification/index.less +0 -58
- package/dist/components/overflowTip/index.js +0 -269
- package/dist/components/overflowTip/index.js.map +0 -1
- package/dist/components/overflowTip/style.less +0 -66
- package/dist/components/page/index.js +0 -49
- package/dist/components/page/index.js.map +0 -1
- package/dist/components/page/index.less +0 -26
- package/dist/components/product/detail.js +0 -97
- package/dist/components/product/detail.js.map +0 -1
- package/dist/components/product/getCard.js +0 -145
- package/dist/components/product/getCard.js.map +0 -1
- package/dist/components/product/index.less +0 -354
- package/dist/components/progressState/EmptyAndErrorView.js +0 -143
- package/dist/components/progressState/EmptyAndErrorView.js.map +0 -1
- package/dist/components/progressState/ProgressState.js +0 -157
- package/dist/components/progressState/ProgressState.js.map +0 -1
- package/dist/components/progressState/index.js +0 -14
- package/dist/components/progressState/index.js.map +0 -1
- package/dist/components/progressState/style.less +0 -65
- package/dist/components/scan/index.js +0 -219
- package/dist/components/scan/index.js.map +0 -1
- package/dist/components/scan/index.less +0 -34
- package/dist/components/select/index.js +0 -28
- package/dist/components/select/index.js.map +0 -1
- package/dist/components/select/index.less +0 -12
- package/dist/components/settlement/asyncModal.js +0 -178
- package/dist/components/settlement/asyncModal.js.map +0 -1
- package/dist/components/settlement/index.js +0 -16
- package/dist/components/settlement/index.js.map +0 -1
- package/dist/components/settlement/settlement.js +0 -5488
- package/dist/components/settlement/settlement.js.map +0 -1
- package/dist/components/settlement/settlement.less +0 -1604
- package/dist/components/settlement/settlementStore.js +0 -1459
- package/dist/components/settlement/settlementStore.js.map +0 -1
- package/dist/components/settlement/utils.js +0 -295
- package/dist/components/settlement/utils.js.map +0 -1
- package/dist/components/socket/index.js +0 -220
- package/dist/components/socket/index.js.map +0 -1
- package/dist/components/spin/index.js +0 -95
- package/dist/components/spin/index.js.map +0 -1
- package/dist/components/spin/spin-style.less +0 -436
- package/dist/components/test/index.js +0 -338
- package/dist/components/test/index.js.map +0 -1
- package/dist/components/ticon/iconfont/demo.css +0 -539
- package/dist/components/ticon/iconfont/demo_index.html +0 -4765
- package/dist/components/ticon/iconfont/iconfont.css +0 -811
- package/dist/components/ticon/iconfont/iconfont.eot +0 -0
- package/dist/components/ticon/iconfont/iconfont.js +0 -33
- package/dist/components/ticon/iconfont/iconfont.js.map +0 -1
- package/dist/components/ticon/iconfont/iconfont.json +0 -1402
- package/dist/components/ticon/iconfont/iconfont.svg +0 -572
- package/dist/components/ticon/iconfont/iconfont.ttf +0 -0
- package/dist/components/ticon/iconfont/iconfont.woff +0 -0
- package/dist/components/ticon/iconfont/iconfont.woff2 +0 -0
- package/dist/components/ticon/index.js +0 -60
- package/dist/components/ticon/index.js.map +0 -1
- package/dist/components/touchScroll/index.js +0 -182
- package/dist/components/touchScroll/index.js.map +0 -1
- package/dist/components/touchTable/AuthProcess.js +0 -42
- package/dist/components/touchTable/AuthProcess.js.map +0 -1
- package/dist/components/touchTable/generateWater.js +0 -59
- package/dist/components/touchTable/generateWater.js.map +0 -1
- package/dist/components/touchTable/index.js +0 -958
- package/dist/components/touchTable/index.js.map +0 -1
- package/dist/components/touchTable/index.less +0 -190
- package/dist/components/touchTable/utils.js +0 -14
- package/dist/components/touchTable/utils.js.map +0 -1
- package/dist/demo/PopOverDemo.js +0 -126
- package/dist/demo/PopOverDemo.js.map +0 -1
- package/dist/index.js +0 -246
- package/dist/index.js.map +0 -1
- package/dist/util/tools.js +0 -210
- package/dist/util/tools.js.map +0 -1
|
@@ -1,1459 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.Member = exports.PayMode = exports.default = exports.PayIcon2 = exports.PayIcon = exports.BankNoType = exports.PayStyle = 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 _promise = require('babel-runtime/core-js/promise');
|
|
25
|
-
|
|
26
|
-
var _promise2 = _interopRequireDefault(_promise);
|
|
27
|
-
|
|
28
|
-
var _extends2 = require('babel-runtime/helpers/extends');
|
|
29
|
-
|
|
30
|
-
var _extends3 = _interopRequireDefault(_extends2);
|
|
31
|
-
|
|
32
|
-
var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');
|
|
33
|
-
|
|
34
|
-
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
|
|
35
|
-
|
|
36
|
-
var _createClass2 = require('babel-runtime/helpers/createClass');
|
|
37
|
-
|
|
38
|
-
var _createClass3 = _interopRequireDefault(_createClass2);
|
|
39
|
-
|
|
40
|
-
var _desc, _value, _class, _desc2, _value2, _class3, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _desc3, _value3, _class5, _descriptor6, _descriptor7, _descriptor8;
|
|
41
|
-
|
|
42
|
-
var _mobx = require('mobx');
|
|
43
|
-
|
|
44
|
-
var _mutantsMicrofx = require('mutants-microfx');
|
|
45
|
-
|
|
46
|
-
var _find2 = require('lodash/find');
|
|
47
|
-
|
|
48
|
-
var _find3 = _interopRequireDefault(_find2);
|
|
49
|
-
|
|
50
|
-
var _remove2 = require('lodash/remove');
|
|
51
|
-
|
|
52
|
-
var _remove3 = _interopRequireDefault(_remove2);
|
|
53
|
-
|
|
54
|
-
var _each2 = require('lodash/each');
|
|
55
|
-
|
|
56
|
-
var _each3 = _interopRequireDefault(_each2);
|
|
57
|
-
|
|
58
|
-
var _map2 = require('lodash/map');
|
|
59
|
-
|
|
60
|
-
var _map3 = _interopRequireDefault(_map2);
|
|
61
|
-
|
|
62
|
-
var _join2 = require('lodash/join');
|
|
63
|
-
|
|
64
|
-
var _join3 = _interopRequireDefault(_join2);
|
|
65
|
-
|
|
66
|
-
var _trim2 = require('lodash/trim');
|
|
67
|
-
|
|
68
|
-
var _trim3 = _interopRequireDefault(_trim2);
|
|
69
|
-
|
|
70
|
-
var _filter2 = require('lodash/filter');
|
|
71
|
-
|
|
72
|
-
var _filter3 = _interopRequireDefault(_filter2);
|
|
73
|
-
|
|
74
|
-
var _findIndex2 = require('lodash/findIndex');
|
|
75
|
-
|
|
76
|
-
var _findIndex3 = _interopRequireDefault(_findIndex2);
|
|
77
|
-
|
|
78
|
-
var _findLastIndex2 = require('lodash/findLastIndex');
|
|
79
|
-
|
|
80
|
-
var _findLastIndex3 = _interopRequireDefault(_findLastIndex2);
|
|
81
|
-
|
|
82
|
-
var _findKey2 = require('lodash/findKey');
|
|
83
|
-
|
|
84
|
-
var _findKey3 = _interopRequireDefault(_findKey2);
|
|
85
|
-
|
|
86
|
-
var _utils = require('./utils');
|
|
87
|
-
|
|
88
|
-
var _tplusApi = require('tplus-api');
|
|
89
|
-
|
|
90
|
-
var _message = require('../message');
|
|
91
|
-
|
|
92
|
-
var _message2 = _interopRequireDefault(_message);
|
|
93
|
-
|
|
94
|
-
var _mutantsUtil = require('mutants-util');
|
|
95
|
-
|
|
96
|
-
var _tplusComponentsTouch = require('tplus-components-touch');
|
|
97
|
-
|
|
98
|
-
var _tplusPoslogin = require('tplus-poslogin');
|
|
99
|
-
|
|
100
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
101
|
-
|
|
102
|
-
function _initDefineProp(target, property, descriptor, context) {
|
|
103
|
-
if (!descriptor) return;
|
|
104
|
-
(0, _defineProperty2.default)(target, property, {
|
|
105
|
-
enumerable: descriptor.enumerable,
|
|
106
|
-
configurable: descriptor.configurable,
|
|
107
|
-
writable: descriptor.writable,
|
|
108
|
-
value: descriptor.initializer ? descriptor.initializer.call(context) : void 0
|
|
109
|
-
});
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
function _initializerWarningHelper(descriptor, context) {
|
|
113
|
-
throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.');
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
|
|
117
|
-
var desc = {};
|
|
118
|
-
Object['ke' + 'ys'](descriptor).forEach(function (key) {
|
|
119
|
-
desc[key] = descriptor[key];
|
|
120
|
-
});
|
|
121
|
-
desc.enumerable = !!desc.enumerable;
|
|
122
|
-
desc.configurable = !!desc.configurable;
|
|
123
|
-
|
|
124
|
-
if ('value' in desc || desc.initializer) {
|
|
125
|
-
desc.writable = true;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
desc = decorators.slice().reverse().reduce(function (desc, decorator) {
|
|
129
|
-
return decorator(target, property, desc) || desc;
|
|
130
|
-
}, desc);
|
|
131
|
-
|
|
132
|
-
if (context && desc.initializer !== void 0) {
|
|
133
|
-
desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
|
|
134
|
-
desc.initializer = undefined;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
if (desc.initializer === void 0) {
|
|
138
|
-
Object['define' + 'Property'](target, property, desc);
|
|
139
|
-
desc = null;
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
return desc;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
var t = _mutantsMicrofx.i18n.getFixedT(null, 'newretail');
|
|
146
|
-
|
|
147
|
-
/*
|
|
148
|
-
1,现金
|
|
149
|
-
93、积分储值卡
|
|
150
|
-
94、储值卡
|
|
151
|
-
99、积分抵现
|
|
152
|
-
995、 扫码收款
|
|
153
|
-
996、代金券
|
|
154
|
-
999、支付宝
|
|
155
|
-
998、微信
|
|
156
|
-
997、转账
|
|
157
|
-
*/
|
|
158
|
-
var PayStyle = exports.PayStyle = {
|
|
159
|
-
xianjin: "1",
|
|
160
|
-
jfczk: "93",
|
|
161
|
-
hyczk: "94",
|
|
162
|
-
jfdx: "99",
|
|
163
|
-
smzf: '995',
|
|
164
|
-
djq: "996", //996
|
|
165
|
-
zfb: "999",
|
|
166
|
-
wx: "998",
|
|
167
|
-
zz: "997"
|
|
168
|
-
};
|
|
169
|
-
|
|
170
|
-
var BankNoType = exports.BankNoType = {
|
|
171
|
-
xianjin: 309
|
|
172
|
-
};
|
|
173
|
-
|
|
174
|
-
var PayIcon = exports.PayIcon = {
|
|
175
|
-
"1": "xianjin2",
|
|
176
|
-
"93": "chuzhiqia",
|
|
177
|
-
"94": "chuzhiqia",
|
|
178
|
-
"99": "jifendixian",
|
|
179
|
-
"995": "saomashoukuan",
|
|
180
|
-
"996": "daijinquan",
|
|
181
|
-
"999": "zhifubao",
|
|
182
|
-
"998": "weixin",
|
|
183
|
-
//"997":"zhifubao",
|
|
184
|
-
"gengduo": "gengduo2",
|
|
185
|
-
"default": "moban1"
|
|
186
|
-
};
|
|
187
|
-
var PayIcon2 = exports.PayIcon2 = {
|
|
188
|
-
"1": "xianjinfanbai",
|
|
189
|
-
"998": "weixinfanbai",
|
|
190
|
-
"999": "zhifubaofanbai",
|
|
191
|
-
"995": "saomafanbai",
|
|
192
|
-
"chenggong": "zhifuchenggong",
|
|
193
|
-
"94": "chuzhikakuai",
|
|
194
|
-
"default": "mobanfanbai"
|
|
195
|
-
};
|
|
196
|
-
|
|
197
|
-
var SettlementStore = (_class = function () {
|
|
198
|
-
//type==2
|
|
199
|
-
function SettlementStore() {
|
|
200
|
-
(0, _classCallCheck3.default)(this, SettlementStore);
|
|
201
|
-
this.paymode = null;
|
|
202
|
-
this.dto = null;
|
|
203
|
-
this.member = null;
|
|
204
|
-
this.brefund = false;
|
|
205
|
-
this.bquick = false;
|
|
206
|
-
this.boriginReturn = false;
|
|
207
|
-
this.newStyle = true;
|
|
208
|
-
|
|
209
|
-
this.calculationIsXianJin = function (mode) {
|
|
210
|
-
return mode.bankNoType != undefined ? mode.bankNoType == BankNoType.xianjin : mode.paymentType == PayStyle.xianjin;
|
|
211
|
-
};
|
|
212
|
-
|
|
213
|
-
this.paymode = new PayMode();
|
|
214
|
-
this.newStyle = _mutantsMicrofx.localStore && _mutantsMicrofx.localStore.get('voucherDefaultPosMode') == 'voucher';
|
|
215
|
-
this.isCheckDate = true;
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
(0, _createClass3.default)(SettlementStore, [{
|
|
219
|
-
key: 'initPaymodes',
|
|
220
|
-
value: function initPaymodes(event, type, isProject) {
|
|
221
|
-
this.paymode.setPaymodes(type);
|
|
222
|
-
this.updateEvent = event;
|
|
223
|
-
this.isProject = isProject;
|
|
224
|
-
}
|
|
225
|
-
}, {
|
|
226
|
-
key: 'init',
|
|
227
|
-
value: function init(context, amounthandler, datasource, storeinfo, bquick, amount, type, data) {
|
|
228
|
-
var _this = this;
|
|
229
|
-
|
|
230
|
-
this.type = type;
|
|
231
|
-
if (context) {
|
|
232
|
-
this.context = context;
|
|
233
|
-
this.amountHandler = amounthandler;
|
|
234
|
-
this.dataSource = datasource;
|
|
235
|
-
this.storeInfo = storeinfo;
|
|
236
|
-
this.dto = context.viewModel.data;
|
|
237
|
-
(0, _mobx.runInAction)(function () {
|
|
238
|
-
// 单品金额抹零
|
|
239
|
-
if (global.DealSingleRowAmountSettingProcessorBlock) {
|
|
240
|
-
global.DealSingleRowAmountSettingProcessorBlock.execute(_this.dto);
|
|
241
|
-
}
|
|
242
|
-
// 成交金额抹零
|
|
243
|
-
if (global.DealAmountSettingProcessorBlock) {
|
|
244
|
-
global.DealAmountSettingProcessorBlock.execute(_this.dto);
|
|
245
|
-
}
|
|
246
|
-
});
|
|
247
|
-
|
|
248
|
-
// this.member=context.stores && context.stores.memberStore && context.stores.memberStore.member;
|
|
249
|
-
this.member = this.dto.Member; //stores.selectMemberStore.selectMemberInfo;
|
|
250
|
-
this.brefund = this.paymode.setAmount(this.dto.TotalTaxAmount, this.dto.OnlinePaymentAmount);
|
|
251
|
-
} else {
|
|
252
|
-
this.brefund = this.paymode.setAmount(amount, 0);
|
|
253
|
-
this.dto = data;
|
|
254
|
-
}
|
|
255
|
-
this.paymode.clean();
|
|
256
|
-
|
|
257
|
-
//this.dto.TotalTaxAmount<0;
|
|
258
|
-
this.bquick = !!bquick;
|
|
259
|
-
this.boriginReturn = JSON.getCellValue(this.dto, "IsOriginalReturn");
|
|
260
|
-
if (this.boriginReturn) {
|
|
261
|
-
this.initByOriginReturn();
|
|
262
|
-
}
|
|
263
|
-
if (this.newStyle) {
|
|
264
|
-
this.setModes();
|
|
265
|
-
}
|
|
266
|
-
}
|
|
267
|
-
}, {
|
|
268
|
-
key: 'setModes',
|
|
269
|
-
value: function setModes() {
|
|
270
|
-
var _this2 = this;
|
|
271
|
-
|
|
272
|
-
(0, _each3.default)(this.paymode.paymodes, function (p) {
|
|
273
|
-
if ((0, _findIndex3.default)(_this2.paymode.thePaymodes, function (mode) {
|
|
274
|
-
return p.paymentType == mode.paymentType;
|
|
275
|
-
}) == -1) {
|
|
276
|
-
_this2.addPay(p.paymentType);
|
|
277
|
-
}
|
|
278
|
-
});
|
|
279
|
-
if (!this.boriginReturn && this.paymode.thePaymodes.length > 0) {
|
|
280
|
-
this.changeValue(this.paymode.thePaymodes[0].paymethodId, 0, true);
|
|
281
|
-
}
|
|
282
|
-
}
|
|
283
|
-
}, {
|
|
284
|
-
key: 'amountChanged',
|
|
285
|
-
value: function amountChanged(amount) {
|
|
286
|
-
if (this.type == 1) {
|
|
287
|
-
this.brefund = this.paymode.setAmount(amount, 0);
|
|
288
|
-
}
|
|
289
|
-
}
|
|
290
|
-
}, {
|
|
291
|
-
key: 'initByOriginReturn',
|
|
292
|
-
value: function initByOriginReturn() {
|
|
293
|
-
var _this3 = this;
|
|
294
|
-
|
|
295
|
-
(0, _each3.default)(this.dto.RetailPaymentDetails, function (detail) {
|
|
296
|
-
var themode = (0, _find3.default)(_this3.paymode.paymodes, { 'idSettleStyle': detail.IdsettleStyle });
|
|
297
|
-
if (themode.paymentType != PayStyle.hyczk) {
|
|
298
|
-
var newmode = (0, _extends3.default)({}, _this3.genNewMode(themode.paymentType, false, detail.Amount), {
|
|
299
|
-
authCode: detail.PaymentCode,
|
|
300
|
-
steadCashIntegral: detail.SteadCashIntegral,
|
|
301
|
-
overchargesAmount: detail.OverchargesAmount,
|
|
302
|
-
boriginReturn: true
|
|
303
|
-
});
|
|
304
|
-
_this3.paymode.currentMode = newmode;
|
|
305
|
-
if (themode.paymentType == PayStyle.djq) {
|
|
306
|
-
(0, _each3.default)(_this3.dto.RetailCouponDetails, function (djq) {
|
|
307
|
-
_this3.addDjq(djq.CouponCode, djq.CouponTitle, djq.ReductionAmount, djq.EnableAmount, djq.LastTS, true, false);
|
|
308
|
-
});
|
|
309
|
-
}
|
|
310
|
-
_this3.paymode.thePaymodes.push(newmode);
|
|
311
|
-
}
|
|
312
|
-
});
|
|
313
|
-
(0, _each3.default)(this.dto.RetailStorageDetails, function (detail) {
|
|
314
|
-
var newmode = (0, _extends3.default)({}, _this3.genNewMode(PayStyle.hyczk, false, detail.StoragePaymentAmount), {
|
|
315
|
-
member: new Member(detail.Member),
|
|
316
|
-
authCode: detail.Password,
|
|
317
|
-
balance: detail.BalanceStorage,
|
|
318
|
-
boriginReturn: true
|
|
319
|
-
});
|
|
320
|
-
_this3.paymode.thePaymodes.push(newmode);
|
|
321
|
-
});
|
|
322
|
-
this.paymode.calcReserved();
|
|
323
|
-
}
|
|
324
|
-
}, {
|
|
325
|
-
key: 'clean',
|
|
326
|
-
value: function clean() {
|
|
327
|
-
this.bquick = false;
|
|
328
|
-
this.paymode.clean();
|
|
329
|
-
}
|
|
330
|
-
}, {
|
|
331
|
-
key: 'quickSettle',
|
|
332
|
-
value: function quickSettle(key) {
|
|
333
|
-
this.addPay(key);
|
|
334
|
-
}
|
|
335
|
-
|
|
336
|
-
//outer call
|
|
337
|
-
//(type===PayStyle.hyczk || type===PayStyle.jfczk || type===PayStyle.jfdx || type===PayStyle.djq)
|
|
338
|
-
|
|
339
|
-
}, {
|
|
340
|
-
key: 'changeFocusAndAddPay',
|
|
341
|
-
value: function changeFocusAndAddPay(type) {
|
|
342
|
-
var _this4 = this;
|
|
343
|
-
|
|
344
|
-
this.paymode.currentFocus = type;
|
|
345
|
-
if (this.paymode.currentMode) {
|
|
346
|
-
if (type == PayStyle.jfdx) {
|
|
347
|
-
if (this.newStyle) {
|
|
348
|
-
var index = (0, _findIndex3.default)(this.paymode.thePaymodes, function (m) {
|
|
349
|
-
return m.paymentType == PayStyle.jfdx;
|
|
350
|
-
});
|
|
351
|
-
this.paymode.thePaymodes.splice(index, 1, this.paymode.currentMode);
|
|
352
|
-
this.paymode.calcReserved();
|
|
353
|
-
} else {
|
|
354
|
-
this.addPayDirectly(this.paymode.currentMode);
|
|
355
|
-
}
|
|
356
|
-
|
|
357
|
-
//抵现积分
|
|
358
|
-
(0, _tplusApi.tApi)({ IntegralSteadCashParams: {
|
|
359
|
-
Idmember: this.paymode.currentMode.member.id,
|
|
360
|
-
TotalTaxAmount: this.paymode.amount,
|
|
361
|
-
BalanceTaxAmount: this.paymode.currentMode.value
|
|
362
|
-
} }, 'AA.DR.newRetailMember.CalculdateIntegralSteadCash', false, false).then(function (result) {
|
|
363
|
-
_this4.paymode.currentMode.steadCashIntegral = result.Integral;
|
|
364
|
-
_this4.paymode.currentMode.overchargesAmount = result.Amount - _this4.paymode.currentMode.value;
|
|
365
|
-
});
|
|
366
|
-
} else {
|
|
367
|
-
this.addPayDirectly(this.paymode.currentMode);
|
|
368
|
-
}
|
|
369
|
-
} else {
|
|
370
|
-
this.addPay(type);
|
|
371
|
-
}
|
|
372
|
-
}
|
|
373
|
-
}, {
|
|
374
|
-
key: 'loadCzk',
|
|
375
|
-
value: function loadCzk(v) {
|
|
376
|
-
var _this5 = this;
|
|
377
|
-
|
|
378
|
-
if ((0, _trim3.default)(v) === "") {
|
|
379
|
-
(0, _mobx.runInAction)(function () {
|
|
380
|
-
_this5.paymode.currentMode.member = new Member(null);
|
|
381
|
-
_this5.paymode.currentMode.errinfo = "请输入储值卡";
|
|
382
|
-
});
|
|
383
|
-
return;
|
|
384
|
-
}
|
|
385
|
-
var IdStore = this.storeInfo.storeID;
|
|
386
|
-
var StoreCode = this.storeInfo.storeCode; //_find(this.storeInfo.storeInfos,(store)=>{return store.ID==IdStore;}).Code;
|
|
387
|
-
return (0, _tplusApi.tApi)({ SearchParams: { Key: v, IsSingleMember: true, IdStore: IdStore, StoreCode: StoreCode } }, 'AA.DR.newRetailMember.SearchMember', false, false).then(function (result) {
|
|
388
|
-
var data = JSON.parse(result.Data);
|
|
389
|
-
var m = data && data.length > 0 && data[0];
|
|
390
|
-
if (!m || !m.ID) {
|
|
391
|
-
(0, _mobx.runInAction)(function () {
|
|
392
|
-
_this5.paymode.currentMode.errinfo = "无效的会员卡号";
|
|
393
|
-
});
|
|
394
|
-
} else {
|
|
395
|
-
(0, _mobx.runInAction)(function () {
|
|
396
|
-
_this5.paymode.currentMode.errinfo = "";
|
|
397
|
-
_this5.paymode.currentMode.member = new Member(m);
|
|
398
|
-
_this5.paymode.currentMode.value = (0, _utils.getFixedNumber)(_this5.brefund ? _this5.paymode.receivable : Math.max(_this5.paymode.receivable, 0));
|
|
399
|
-
_this5.updateEvent();
|
|
400
|
-
var message = '';
|
|
401
|
-
if (global.CheckMemberStorageProcessorBlock) {
|
|
402
|
-
message = CheckMemberStorageProcessorBlock.execute(data[0]);
|
|
403
|
-
}
|
|
404
|
-
if (!String.isNullOrEmpty(message)) {
|
|
405
|
-
_this5.paymode.currentMode.errinfo = message;
|
|
406
|
-
} else if (_this5.checkReceived(_this5.paymode.currentMode, "balance")) {
|
|
407
|
-
_this5.paymode.currentMode.errinfo = "余额不足";
|
|
408
|
-
} else if (_this5.paymode.amount > 0 && _this5.paymode.currentMode.value == 0) {
|
|
409
|
-
_this5.paymode.currentMode.errinfo = "实收金额必须录入";
|
|
410
|
-
} else {
|
|
411
|
-
// 查询成功后将焦点移入下一个输入框
|
|
412
|
-
var nextInput = document.querySelector('.czk .received .input');
|
|
413
|
-
nextInput && nextInput.focus();
|
|
414
|
-
}
|
|
415
|
-
});
|
|
416
|
-
}
|
|
417
|
-
});
|
|
418
|
-
}
|
|
419
|
-
}, {
|
|
420
|
-
key: 'checkCoupon',
|
|
421
|
-
value: function checkCoupon(sn) {
|
|
422
|
-
var _this6 = this;
|
|
423
|
-
|
|
424
|
-
var receivable = 0;
|
|
425
|
-
var djqs = this.paymode.currentMode.djqs;
|
|
426
|
-
djqs && djqs.map(function (value) {
|
|
427
|
-
receivable += value.doorsill;
|
|
428
|
-
});
|
|
429
|
-
var obj = {};
|
|
430
|
-
this.dto.RetailDetails.forEach(function (item) {
|
|
431
|
-
if (obj[item.Inventory.ID]) {
|
|
432
|
-
obj[item.Inventory.ID] += item.TaxAmount;
|
|
433
|
-
} else {
|
|
434
|
-
obj[item.Inventory.ID] = item.TaxAmount;
|
|
435
|
-
}
|
|
436
|
-
});
|
|
437
|
-
return (0, _tplusApi.tApi)({ request: {
|
|
438
|
-
Uid: this.paymode.currentMode.member.uid || '',
|
|
439
|
-
SN: sn,
|
|
440
|
-
StoreCode: this.dto.Idstore,
|
|
441
|
-
Inventories: (0, _map3.default)((0, _filter3.default)(this.dto.RetailDetails, function (d) {
|
|
442
|
-
return d.Quantity > 0 && !d.IsPresent;
|
|
443
|
-
}), function (detail) {
|
|
444
|
-
return {
|
|
445
|
-
IdInventory: detail.Inventory.ID,
|
|
446
|
-
singleTotalAmount: obj[detail.Inventory.ID],
|
|
447
|
-
IdUnit: detail.Idunit,
|
|
448
|
-
Code: detail.Inventory.Code,
|
|
449
|
-
FreeItem0: JSON.getCellValue(detail, "freeitem0"),
|
|
450
|
-
FreeItem1: JSON.getCellValue(detail, "freeitem1"),
|
|
451
|
-
FreeItem2: JSON.getCellValue(detail, "freeitem2"),
|
|
452
|
-
FreeItem3: JSON.getCellValue(detail, "freeitem3"),
|
|
453
|
-
FreeItem4: JSON.getCellValue(detail, "freeitem4"),
|
|
454
|
-
FreeItem5: JSON.getCellValue(detail, "freeitem5"),
|
|
455
|
-
FreeItem6: JSON.getCellValue(detail, "freeitem6"),
|
|
456
|
-
FreeItem7: JSON.getCellValue(detail, "freeitem7"),
|
|
457
|
-
FreeItem8: JSON.getCellValue(detail, "freeitem8"),
|
|
458
|
-
FreeItem9: JSON.getCellValue(detail, "freeitem9")
|
|
459
|
-
};
|
|
460
|
-
}),
|
|
461
|
-
// inventoryCodes:_join(_map(this.dto.RetailDetails,(detail)=>{return detail.Inventory.Code;}),','),
|
|
462
|
-
InventoryClassCodes: (0, _join3.default)((0, _map3.default)((0, _filter3.default)(this.dto.RetailDetails, function (d) {
|
|
463
|
-
return d.Quantity > 0;
|
|
464
|
-
}), function (detail) {
|
|
465
|
-
return (detail.Inventory.InventoryClass || { Code: '' }).Code;
|
|
466
|
-
}), ','),
|
|
467
|
-
Amount: this.paymode.amount,
|
|
468
|
-
Receivable: this.paymode.currentMode.maxamount - receivable
|
|
469
|
-
} }, 'chanjet.AA.DR.coupon.CheckCoupon', false, false).then(function (result) {
|
|
470
|
-
if ((0, _find3.default)(_this6.paymode.currentMode.djqs, function (djq) {
|
|
471
|
-
return djq.code == result.SN;
|
|
472
|
-
})) {
|
|
473
|
-
_message2.default.info('代金券已添加');
|
|
474
|
-
} else if (result.IsRepelWithPoints && (0, _find3.default)(_this6.paymode.thePaymodes, function (themode) {
|
|
475
|
-
return themode.paymentType == PayStyle.jfdx;
|
|
476
|
-
})) {
|
|
477
|
-
_message2.default.error('\u4EE3\u91D1\u5238\uFF08' + result.SN + '\uFF09\u4E0D\u53EF\u4E0E\u79EF\u5206\u4E00\u8D77\u4F7F\u7528');
|
|
478
|
-
} else {
|
|
479
|
-
_this6.addDjq(result.SN, result.Title, result.ReduceAmount, result.StartAmount, result.LastTS, false, !result.IsRepelWithPoints, result.UMemberID);
|
|
480
|
-
}
|
|
481
|
-
});
|
|
482
|
-
}
|
|
483
|
-
}, {
|
|
484
|
-
key: 'addDjq',
|
|
485
|
-
value: function addDjq(code, name, amount, doorsill, LastTS, checked, IsRepelWithPoints, UMemberID) {
|
|
486
|
-
var djq = {
|
|
487
|
-
code: code,
|
|
488
|
-
name: name,
|
|
489
|
-
amount: amount,
|
|
490
|
-
doorsill: doorsill, //:"无门槛"
|
|
491
|
-
LastTS: LastTS,
|
|
492
|
-
checked: checked,
|
|
493
|
-
IsRepelWithPoints: IsRepelWithPoints,
|
|
494
|
-
UMemberID: UMemberID
|
|
495
|
-
};
|
|
496
|
-
this.paymode.currentMode.djqs.push(djq);
|
|
497
|
-
!this.boriginReturn && this.paymode.calcDjqValue(djq);
|
|
498
|
-
}
|
|
499
|
-
}, {
|
|
500
|
-
key: 'setCurrentMode',
|
|
501
|
-
value: function setCurrentMode(id, type, append) {
|
|
502
|
-
var mode = (0, _find3.default)(this.paymode.thePaymodes, { paymethodId: id });
|
|
503
|
-
if (mode) {
|
|
504
|
-
this.paymode.currentMode = mode;
|
|
505
|
-
if (this.newStyle) {
|
|
506
|
-
this.afterSetCurrentMode(type);
|
|
507
|
-
}
|
|
508
|
-
} else {
|
|
509
|
-
this.paymode.currentMode = this.genNewMode(type, append);
|
|
510
|
-
this.afterSetCurrentMode(type);
|
|
511
|
-
}
|
|
512
|
-
}
|
|
513
|
-
}, {
|
|
514
|
-
key: 'afterSetCurrentMode',
|
|
515
|
-
value: function afterSetCurrentMode(type) {
|
|
516
|
-
var _this7 = this;
|
|
517
|
-
|
|
518
|
-
if (type == PayStyle.djq) {
|
|
519
|
-
this.paymode.calcDjqValue();
|
|
520
|
-
} else if (type == PayStyle.jfdx) {
|
|
521
|
-
//获取可兑换的金额
|
|
522
|
-
if (this.newStyle) {
|
|
523
|
-
var themode = (0, _find3.default)(this.paymode.thePaymodes, { paymentType: PayStyle.jfdx });
|
|
524
|
-
if (themode && parseFloat(themode.value || 0) != 0) {
|
|
525
|
-
this.paymode.currentMode.value = themode.value;
|
|
526
|
-
}
|
|
527
|
-
}
|
|
528
|
-
|
|
529
|
-
(0, _tplusApi.tApi)({ IntegralSteadCashParams: {
|
|
530
|
-
Idmember: this.paymode.currentMode.member.id,
|
|
531
|
-
TotalTaxAmount: this.paymode.amount,
|
|
532
|
-
BalanceTaxAmount: this.paymode.amount
|
|
533
|
-
} }, 'AA.DR.newRetailMember.CalculdateIntegralSteadCash', false, false).then(function (result) {
|
|
534
|
-
_this7.paymode.currentMode.member.setExchangable(result.MaxAmount);
|
|
535
|
-
_this7.updateEvent();
|
|
536
|
-
if (_this7.checkReceived(_this7.paymode.currentMode, "exchangable")) {
|
|
537
|
-
(0, _mobx.runInAction)(function () {
|
|
538
|
-
_this7.paymode.currentMode.errinfo = '余额不足';
|
|
539
|
-
});
|
|
540
|
-
}
|
|
541
|
-
});
|
|
542
|
-
}
|
|
543
|
-
}
|
|
544
|
-
}, {
|
|
545
|
-
key: 'checkReceived',
|
|
546
|
-
value: function checkReceived(mode, name) {
|
|
547
|
-
return !this.brefund && parseFloat(mode.value) > parseFloat(mode.maxamount || mode.member[name] || 0);
|
|
548
|
-
}
|
|
549
|
-
}, {
|
|
550
|
-
key: 'genNewMode',
|
|
551
|
-
value: function genNewMode(type, notwithm, v) {
|
|
552
|
-
var value = (0, _utils.getFixedNumber)(v || (this.brefund ? this.paymode.receivable : Math.max(this.paymode.receivable, 0)));
|
|
553
|
-
var themode = (0, _find3.default)(this.paymode.paymodes, { 'paymentType': type });
|
|
554
|
-
var mode = (0, _mobx.observable)({
|
|
555
|
-
paymethodId: this.paymode.counter,
|
|
556
|
-
name: themode.name,
|
|
557
|
-
exchangeRate: themode.exchangeRate,
|
|
558
|
-
calDirection: themode.calDirection,
|
|
559
|
-
value: value,
|
|
560
|
-
value2: (0, _utils.getFixedNumber)(themode.calDirection == "88" ? value / themode.exchangeRate : value * themode.exchangeRate),
|
|
561
|
-
value3: value,
|
|
562
|
-
order: this.paymode.thePaymodes.length + 1,
|
|
563
|
-
paymentType: type,
|
|
564
|
-
djqs: [],
|
|
565
|
-
member: new Member(!notwithm ? this.member : null),
|
|
566
|
-
authCode: '',
|
|
567
|
-
steadCashIntegral: null,
|
|
568
|
-
errinfo: '',
|
|
569
|
-
maxamount: this.paymode.amount,
|
|
570
|
-
bankNoType: themode.bankNoType
|
|
571
|
-
});
|
|
572
|
-
if (type == PayStyle.hyczk) {
|
|
573
|
-
if (!mode.member.id) {
|
|
574
|
-
(0, _mobx.runInAction)(function () {
|
|
575
|
-
mode.errinfo = '未录入储值卡';
|
|
576
|
-
});
|
|
577
|
-
} else if (this.checkReceived(mode, "balance")) {
|
|
578
|
-
(0, _mobx.runInAction)(function () {
|
|
579
|
-
mode.errinfo = '余额不足';
|
|
580
|
-
});
|
|
581
|
-
}
|
|
582
|
-
}
|
|
583
|
-
if (type == PayStyle.hyczk || type == PayStyle.jfdx || type == PayStyle.djq) {
|
|
584
|
-
this.setMaxAmount(type, mode);
|
|
585
|
-
}
|
|
586
|
-
console.log(mode);
|
|
587
|
-
return mode;
|
|
588
|
-
}
|
|
589
|
-
}, {
|
|
590
|
-
key: 'setMaxAmount',
|
|
591
|
-
value: function setMaxAmount(type, mode) {
|
|
592
|
-
var _this8 = this;
|
|
593
|
-
|
|
594
|
-
var sum = 0;
|
|
595
|
-
if (type == PayStyle.hyczk) {
|
|
596
|
-
(0, _each3.default)((0, _filter3.default)(this.paymode.thePaymodes, function (m) {
|
|
597
|
-
return m.paymentType == type;
|
|
598
|
-
}), function (q) {
|
|
599
|
-
sum = Math.Add(sum, q.value);
|
|
600
|
-
});
|
|
601
|
-
} else if (type == PayStyle.djq || type == PayStyle.jfdx) {
|
|
602
|
-
(0, _each3.default)((0, _filter3.default)(this.paymode.thePaymodes, function (m) {
|
|
603
|
-
return m.paymentType == PayStyle.djq || m.paymentType == PayStyle.jfdx;
|
|
604
|
-
}), function (q) {
|
|
605
|
-
sum = Math.Add(sum, q.value);
|
|
606
|
-
});
|
|
607
|
-
}
|
|
608
|
-
|
|
609
|
-
this.amountHandler(type).then(function () {
|
|
610
|
-
(0, _mobx.runInAction)(function () {
|
|
611
|
-
mode.maxamount = (0, _utils.getFixedNumber)(Math.Minus(_this8.context.viewModel.getViewItem('Voucher').availableAmount, sum));
|
|
612
|
-
_this8.updateEvent();
|
|
613
|
-
});
|
|
614
|
-
});
|
|
615
|
-
}
|
|
616
|
-
}, {
|
|
617
|
-
key: 'changeFocusOnly',
|
|
618
|
-
value: function changeFocusOnly(type) {
|
|
619
|
-
this.paymode.currentFocus = type;
|
|
620
|
-
// 获取焦点时带入剩余的值
|
|
621
|
-
var mode = (0, _find3.default)(this.paymode.thePaymodes, { 'paymentType': type });
|
|
622
|
-
|
|
623
|
-
var _ref = mode || {},
|
|
624
|
-
value = _ref.value;
|
|
625
|
-
|
|
626
|
-
if (mode && (value == '0.00' || value == null)) {
|
|
627
|
-
var shouldSetValue = (0, _utils.getFixedNumber)(parseFloat(this.paymode.receivable) + parseFloat(mode.value));
|
|
628
|
-
mode.value = shouldSetValue;
|
|
629
|
-
mode.value2 = (0, _utils.getFixedNumber)(mode.calDirection == "88" ? shouldSetValue / mode.exchangeRate : shouldSetValue * mode.exchangeRate);
|
|
630
|
-
mode.value3 = shouldSetValue;
|
|
631
|
-
this.paymode.calcReserved();
|
|
632
|
-
}
|
|
633
|
-
}
|
|
634
|
-
}, {
|
|
635
|
-
key: 'changeInputStorageValue',
|
|
636
|
-
value: function changeInputStorageValue(cashChange, giveChangeForStorage) {
|
|
637
|
-
this.cashChange = cashChange;
|
|
638
|
-
this.giveChangeForStorage = giveChangeForStorage;
|
|
639
|
-
}
|
|
640
|
-
}, {
|
|
641
|
-
key: 'clearInputStorageData',
|
|
642
|
-
value: function clearInputStorageData() {
|
|
643
|
-
this.cashChange = null;
|
|
644
|
-
this.giveChangeForStorage = null;
|
|
645
|
-
}
|
|
646
|
-
}, {
|
|
647
|
-
key: 'changeValue',
|
|
648
|
-
value: function changeValue(index, value, blur, storage, change, istoChange) {
|
|
649
|
-
var mode = (0, _find3.default)(this.paymode.thePaymodes, { 'paymethodId': index });
|
|
650
|
-
var v = blur ? (0, _utils.getFixedNumber)(value) : isNaN(value) && value != '-' ? 0.00 : value;
|
|
651
|
-
if (mode) {
|
|
652
|
-
if (mode.exchangeRate != 1) {
|
|
653
|
-
if ((0, _utils.getFixedNumber)(mode.calDirection == "88" ? mode.value3 / mode.exchangeRate : mode.value3 * mode.exchangeRate) != v) {
|
|
654
|
-
mode.value = (0, _utils.getFixedNumber)(mode.calDirection == "88" ? v * mode.exchangeRate : v / mode.exchangeRate);
|
|
655
|
-
} else {
|
|
656
|
-
mode.value = mode.value3;
|
|
657
|
-
}
|
|
658
|
-
if (istoChange) {
|
|
659
|
-
mode.value2 = change;
|
|
660
|
-
} else {
|
|
661
|
-
mode.value2 = v;
|
|
662
|
-
}
|
|
663
|
-
} else {
|
|
664
|
-
mode.value = v;
|
|
665
|
-
if (istoChange) {
|
|
666
|
-
mode.value2 = change;
|
|
667
|
-
} else {
|
|
668
|
-
mode.value2 = v;
|
|
669
|
-
}
|
|
670
|
-
}
|
|
671
|
-
|
|
672
|
-
this.paymode.calcReserved();
|
|
673
|
-
}
|
|
674
|
-
}
|
|
675
|
-
}, {
|
|
676
|
-
key: 'changeReturnValue',
|
|
677
|
-
value: function changeReturnValue(index, change) {
|
|
678
|
-
var mode = (0, _find3.default)(this.paymode.thePaymodes, { 'paymethodId': index });
|
|
679
|
-
if (mode) {
|
|
680
|
-
if (mode.exchangeRate != 1) {
|
|
681
|
-
mode.value2 = change;
|
|
682
|
-
} else {
|
|
683
|
-
mode.value2 = change;
|
|
684
|
-
}
|
|
685
|
-
}
|
|
686
|
-
this.paymode.calcReserved();
|
|
687
|
-
}
|
|
688
|
-
}, {
|
|
689
|
-
key: 'addPayDirectly',
|
|
690
|
-
value: function addPayDirectly(pay) {
|
|
691
|
-
|
|
692
|
-
if (!(0, _find3.default)(this.paymode.thePaymodes, { paymethodId: pay.paymethodId })) {
|
|
693
|
-
var pos = this.paymode.thePaymodes.length;
|
|
694
|
-
if (pay.paymentType == PayStyle.hyczk) {
|
|
695
|
-
var index = (0, _findLastIndex3.default)(this.paymode.thePaymodes, function (m) {
|
|
696
|
-
return m.paymethodId != pay.paymethodId && m.paymentType == PayStyle.hyczk;
|
|
697
|
-
});
|
|
698
|
-
pos = index == -1 ? pos : index + 1;
|
|
699
|
-
}
|
|
700
|
-
// this.paymode.thePaymodes.push(pay);
|
|
701
|
-
this.paymode.thePaymodes.splice(pos, 0, pay);
|
|
702
|
-
}
|
|
703
|
-
this.paymode.calcReserved();
|
|
704
|
-
}
|
|
705
|
-
}, {
|
|
706
|
-
key: 'addPay',
|
|
707
|
-
value: function addPay(type) {
|
|
708
|
-
var pos = this.paymode.thePaymodes.length;
|
|
709
|
-
if (type == PayStyle.hyczk) {
|
|
710
|
-
var index = (0, _findLastIndex3.default)(this.paymode.thePaymodes, function (m) {
|
|
711
|
-
return m.paymentType == PayStyle.hyczk;
|
|
712
|
-
});
|
|
713
|
-
pos = index == -1 ? pos : index + 1;
|
|
714
|
-
}
|
|
715
|
-
// this.paymode.thePaymodes.push(this.genNewMode(type) );
|
|
716
|
-
this.paymode.thePaymodes.splice(pos, 0, this.genNewMode(type, this.newStyle && type == PayStyle.hyczk));
|
|
717
|
-
this.paymode.calcReserved();
|
|
718
|
-
}
|
|
719
|
-
}, {
|
|
720
|
-
key: 'delPay',
|
|
721
|
-
value: function delPay(index) {
|
|
722
|
-
(0, _remove3.default)(this.paymode.thePaymodes, function (mode) {
|
|
723
|
-
return mode.paymethodId === index;
|
|
724
|
-
});
|
|
725
|
-
this.paymode.currentFocus = -1;
|
|
726
|
-
this.paymode.calcReserved();
|
|
727
|
-
}
|
|
728
|
-
}, {
|
|
729
|
-
key: 'changeIsCheckDate',
|
|
730
|
-
value: function changeIsCheckDate(isCheckDate) {
|
|
731
|
-
this.isCheckDate = isCheckDate;
|
|
732
|
-
}
|
|
733
|
-
}, {
|
|
734
|
-
key: 'getChangeToStorage',
|
|
735
|
-
value: function getChangeToStorage(wipechange) {
|
|
736
|
-
return _promise2.default.resolve((0, _tplusApi.tApi)({ idmember: this.dto.Idmember, idStore: this.dto.Idstore, wipechange: wipechange }, 'AA.DR.newRetailMember.GetChangeToStorage', false, false, { timeout_skip: true }));
|
|
737
|
-
}
|
|
738
|
-
}, {
|
|
739
|
-
key: 'CheckExpirationDate',
|
|
740
|
-
value: function () {
|
|
741
|
-
var _ref2 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee() {
|
|
742
|
-
return _regenerator2.default.wrap(function _callee$(_context) {
|
|
743
|
-
while (1) {
|
|
744
|
-
switch (_context.prev = _context.next) {
|
|
745
|
-
case 0:
|
|
746
|
-
return _context.abrupt('return', (0, _tplusApi.tApi)({ ExpirationDate: _mutantsMicrofx.stores.memberProjectStore.data.ExpirationDate }, 'chanjet.ME.IProjectStorage.CheckExpirationDate', false, false));
|
|
747
|
-
|
|
748
|
-
case 1:
|
|
749
|
-
case 'end':
|
|
750
|
-
return _context.stop();
|
|
751
|
-
}
|
|
752
|
-
}
|
|
753
|
-
}, _callee, this);
|
|
754
|
-
}));
|
|
755
|
-
|
|
756
|
-
function CheckExpirationDate() {
|
|
757
|
-
return _ref2.apply(this, arguments);
|
|
758
|
-
}
|
|
759
|
-
|
|
760
|
-
return CheckExpirationDate;
|
|
761
|
-
}()
|
|
762
|
-
}, {
|
|
763
|
-
key: 'getMemberRetailDetail',
|
|
764
|
-
value: function () {
|
|
765
|
-
var _ref3 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2() {
|
|
766
|
-
var _getLoginInfo, IdStore;
|
|
767
|
-
|
|
768
|
-
return _regenerator2.default.wrap(function _callee2$(_context2) {
|
|
769
|
-
while (1) {
|
|
770
|
-
switch (_context2.prev = _context2.next) {
|
|
771
|
-
case 0:
|
|
772
|
-
_getLoginInfo = this.getLoginInfo(), IdStore = _getLoginInfo.IdStore;
|
|
773
|
-
return _context2.abrupt('return', (0, _tplusApi.tApi)({ Idmember: this.dto.Idmember, IdStore: IdStore }, 'chanjet.AA.DR.INewRetailMember.GetMemberRetailDetail', false, false));
|
|
774
|
-
|
|
775
|
-
case 2:
|
|
776
|
-
case 'end':
|
|
777
|
-
return _context2.stop();
|
|
778
|
-
}
|
|
779
|
-
}
|
|
780
|
-
}, _callee2, this);
|
|
781
|
-
}));
|
|
782
|
-
|
|
783
|
-
function getMemberRetailDetail() {
|
|
784
|
-
return _ref3.apply(this, arguments);
|
|
785
|
-
}
|
|
786
|
-
|
|
787
|
-
return getMemberRetailDetail;
|
|
788
|
-
}()
|
|
789
|
-
}, {
|
|
790
|
-
key: 'getLoginInfo',
|
|
791
|
-
value: function getLoginInfo() {
|
|
792
|
-
var _ref4 = _mutantsMicrofx.localStore.get('user') || {},
|
|
793
|
-
_ref4$loginInfo = _ref4.loginInfo,
|
|
794
|
-
loginInfo = _ref4$loginInfo === undefined ? {} : _ref4$loginInfo;
|
|
795
|
-
|
|
796
|
-
return loginInfo;
|
|
797
|
-
}
|
|
798
|
-
}, {
|
|
799
|
-
key: 'commit',
|
|
800
|
-
value: function () {
|
|
801
|
-
var _ref5 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee3(bTest) {
|
|
802
|
-
var resp;
|
|
803
|
-
return _regenerator2.default.wrap(function _callee3$(_context3) {
|
|
804
|
-
while (1) {
|
|
805
|
-
switch (_context3.prev = _context3.next) {
|
|
806
|
-
case 0:
|
|
807
|
-
console.log('settlementStore.commit开始,参数:' + bTest);
|
|
808
|
-
|
|
809
|
-
if (!bTest) {
|
|
810
|
-
_context3.next = 3;
|
|
811
|
-
break;
|
|
812
|
-
}
|
|
813
|
-
|
|
814
|
-
return _context3.abrupt('return', _promise2.default.resolve(true));
|
|
815
|
-
|
|
816
|
-
case 3:
|
|
817
|
-
_context3.prev = 3;
|
|
818
|
-
|
|
819
|
-
if (!this.isProject) {
|
|
820
|
-
_context3.next = 12;
|
|
821
|
-
break;
|
|
822
|
-
}
|
|
823
|
-
|
|
824
|
-
_context3.next = 7;
|
|
825
|
-
return this.saveByPost();
|
|
826
|
-
|
|
827
|
-
case 7:
|
|
828
|
-
resp = _context3.sent;
|
|
829
|
-
|
|
830
|
-
if (!resp.IsSucceed) {
|
|
831
|
-
_context3.next = 10;
|
|
832
|
-
break;
|
|
833
|
-
}
|
|
834
|
-
|
|
835
|
-
return _context3.abrupt('return', _promise2.default.resolve(true));
|
|
836
|
-
|
|
837
|
-
case 10:
|
|
838
|
-
_context3.next = 20;
|
|
839
|
-
break;
|
|
840
|
-
|
|
841
|
-
case 12:
|
|
842
|
-
if (!(this.type == 1)) {
|
|
843
|
-
_context3.next = 17;
|
|
844
|
-
break;
|
|
845
|
-
}
|
|
846
|
-
|
|
847
|
-
_context3.next = 15;
|
|
848
|
-
return this.saveMember();
|
|
849
|
-
|
|
850
|
-
case 15:
|
|
851
|
-
_context3.next = 19;
|
|
852
|
-
break;
|
|
853
|
-
|
|
854
|
-
case 17:
|
|
855
|
-
_context3.next = 19;
|
|
856
|
-
return this.save();
|
|
857
|
-
|
|
858
|
-
case 19:
|
|
859
|
-
return _context3.abrupt('return', _promise2.default.resolve(true));
|
|
860
|
-
|
|
861
|
-
case 20:
|
|
862
|
-
_context3.next = 26;
|
|
863
|
-
break;
|
|
864
|
-
|
|
865
|
-
case 22:
|
|
866
|
-
_context3.prev = 22;
|
|
867
|
-
_context3.t0 = _context3['catch'](3);
|
|
868
|
-
|
|
869
|
-
console.error('settlementStore.commit失败,错误信息:' + _context3.t0);
|
|
870
|
-
return _context3.abrupt('return', _promise2.default.resolve(_context3.t0));
|
|
871
|
-
|
|
872
|
-
case 26:
|
|
873
|
-
case 'end':
|
|
874
|
-
return _context3.stop();
|
|
875
|
-
}
|
|
876
|
-
}
|
|
877
|
-
}, _callee3, this, [[3, 22]]);
|
|
878
|
-
}));
|
|
879
|
-
|
|
880
|
-
function commit(_x) {
|
|
881
|
-
return _ref5.apply(this, arguments);
|
|
882
|
-
}
|
|
883
|
-
|
|
884
|
-
return commit;
|
|
885
|
-
}()
|
|
886
|
-
}, {
|
|
887
|
-
key: 'handlePrint',
|
|
888
|
-
value: function handlePrint(resp) {
|
|
889
|
-
// 储值打印
|
|
890
|
-
return (0, _tplusComponentsTouch.printDispatch)(_tplusComponentsTouch.DoNameList.DO_STORAGE_PRINT, resp.ID, {});
|
|
891
|
-
}
|
|
892
|
-
}, {
|
|
893
|
-
key: 'handleProjectStoragePrint',
|
|
894
|
-
value: function handleProjectStoragePrint(resp) {
|
|
895
|
-
// 项目储值打印
|
|
896
|
-
return (0, _tplusComponentsTouch.printDispatch)(_tplusComponentsTouch.DoNameList.DO_PROJECT_STORAGE_PRINT, resp.Data.ID, {});
|
|
897
|
-
}
|
|
898
|
-
}, {
|
|
899
|
-
key: 'saveByPost',
|
|
900
|
-
value: function saveByPost() {
|
|
901
|
-
var _this9 = this;
|
|
902
|
-
|
|
903
|
-
(0, _mobx.runInAction)(function () {
|
|
904
|
-
_this9.dto.StorageMutiSettleDetails = [];
|
|
905
|
-
var thePaymodes = _this9.newStyle ? (0, _filter3.default)(_this9.paymode.thePaymodes, function (mode) {
|
|
906
|
-
return parseFloat(mode.value) != 0;
|
|
907
|
-
}) : _this9.paymode.thePaymodes;
|
|
908
|
-
(0, _each3.default)(thePaymodes, function (mode) {
|
|
909
|
-
var themode = (0, _find3.default)(_this9.paymode.paymodes, { 'paymentType': mode.paymentType });
|
|
910
|
-
|
|
911
|
-
var value = parseFloat(mode.value);
|
|
912
|
-
var giveChange = null;
|
|
913
|
-
if (_this9.calculationIsXianJin(mode) && _this9.paymode.receivable < 0 && value > Math.abs(_this9.paymode.receivable)) {
|
|
914
|
-
value = Math.Add(value, _this9.paymode.receivable);
|
|
915
|
-
giveChange = Math.abs(_this9.paymode.receivable);
|
|
916
|
-
}
|
|
917
|
-
_this9.dto.ExternalCode = _this9.dto.Idmember + "_" + (0, _tplusPoslogin.PosInitData)('posCode') + "_" + new Date().toArray().join("_") + Math.floor(Math.random() * 1000 + 1);
|
|
918
|
-
_this9.dto.StorageMutiSettleDetails.push({
|
|
919
|
-
Code: mode.paymethodId,
|
|
920
|
-
StorageAmount: value,
|
|
921
|
-
GiveChange: giveChange,
|
|
922
|
-
IdsettleStyle: themode.idSettleStyle,
|
|
923
|
-
IdbankAccount: themode.idBankAccount,
|
|
924
|
-
PaymentCode: mode.authCode,
|
|
925
|
-
DynamicPropertyKeys: [],
|
|
926
|
-
DynamicPropertyValues: [],
|
|
927
|
-
DataSource: { Id: _this9.dataSource }
|
|
928
|
-
});
|
|
929
|
-
});
|
|
930
|
-
});
|
|
931
|
-
return (0, _tplusApi.tApi)({ dto: this.dto, isCheckDate: this.isCheckDate }, 'chanjet.ME.IProjectStorage.SaveByPost', false, false).then(function (resp) {
|
|
932
|
-
if (resp.IsSucceed) {
|
|
933
|
-
_this9.getMemberRetailDetail().then(function (ret) {
|
|
934
|
-
var Storages = ret.Storages;
|
|
935
|
-
|
|
936
|
-
_mutantsMicrofx.stores.memberStore.setStoragesData(Storages);
|
|
937
|
-
});
|
|
938
|
-
_this9.handleProjectStoragePrint(resp); //项目储值打印
|
|
939
|
-
return resp;
|
|
940
|
-
} else {
|
|
941
|
-
// if (resp.ErrorMsg === '当前储值已失效,是否保存?') {
|
|
942
|
-
// ModalWraper.confirm({
|
|
943
|
-
// title: "温馨提示",
|
|
944
|
-
// content: resp.ErrorMsg,
|
|
945
|
-
// cancelable: false,
|
|
946
|
-
// okText: '确定',
|
|
947
|
-
// okType: 'warning',
|
|
948
|
-
// onOk: async() => {
|
|
949
|
-
// this.isCheckDate = false;
|
|
950
|
-
// },
|
|
951
|
-
// onCancel: () => {
|
|
952
|
-
// this.isCheckDate = true;
|
|
953
|
-
// }
|
|
954
|
-
// })
|
|
955
|
-
// } else {
|
|
956
|
-
_tplusComponentsTouch.ModalWraper.warning({
|
|
957
|
-
title: '温馨提示',
|
|
958
|
-
content: resp.ErrorMsg,
|
|
959
|
-
okText: '确定',
|
|
960
|
-
okType: 'warning'
|
|
961
|
-
});
|
|
962
|
-
// }
|
|
963
|
-
}
|
|
964
|
-
});
|
|
965
|
-
}
|
|
966
|
-
}, {
|
|
967
|
-
key: 'saveMember',
|
|
968
|
-
value: function saveMember() {
|
|
969
|
-
var _this10 = this;
|
|
970
|
-
|
|
971
|
-
(0, _mobx.runInAction)(function () {
|
|
972
|
-
_this10.dto.StorageMutiSettleDetails = [];
|
|
973
|
-
var thePaymodes = _this10.newStyle ? (0, _filter3.default)(_this10.paymode.thePaymodes, function (mode) {
|
|
974
|
-
return parseFloat(mode.value) != 0;
|
|
975
|
-
}) : _this10.paymode.thePaymodes;
|
|
976
|
-
(0, _each3.default)(thePaymodes, function (mode) {
|
|
977
|
-
var themode = (0, _find3.default)(_this10.paymode.paymodes, { 'paymentType': mode.paymentType });
|
|
978
|
-
|
|
979
|
-
var value = parseFloat(mode.value);
|
|
980
|
-
var giveChange = null;
|
|
981
|
-
if (mode.paymentType == PayStyle.xianjin && _this10.paymode.receivable < 0 && value > Math.abs(_this10.paymode.receivable)) {
|
|
982
|
-
value = Math.Add(value, _this10.paymode.receivable);
|
|
983
|
-
giveChange = Math.abs(_this10.paymode.receivable);
|
|
984
|
-
}
|
|
985
|
-
_this10.dto.StorageMutiSettleDetails.push({
|
|
986
|
-
Code: mode.paymethodId,
|
|
987
|
-
StorageAmount: value,
|
|
988
|
-
GiveChange: giveChange,
|
|
989
|
-
IdsettleStyle: themode.idSettleStyle,
|
|
990
|
-
IdbankAccount: themode.idBankAccount,
|
|
991
|
-
PaymentCode: mode.authCode,
|
|
992
|
-
DynamicPropertyKeys: [],
|
|
993
|
-
DynamicPropertyValues: [],
|
|
994
|
-
DataSource: { Id: _this10.dataSource }
|
|
995
|
-
});
|
|
996
|
-
});
|
|
997
|
-
});
|
|
998
|
-
return (0, _tplusApi.tApi)({ dto: this.dto }, 'chanjet.ME.INewRetailMemberStorage.Save', false, false).then(function (resp) {
|
|
999
|
-
_this10.handlePrint(resp);
|
|
1000
|
-
});
|
|
1001
|
-
}
|
|
1002
|
-
}, {
|
|
1003
|
-
key: 'save',
|
|
1004
|
-
value: function save() {
|
|
1005
|
-
var _this11 = this;
|
|
1006
|
-
|
|
1007
|
-
(0, _mobx.runInAction)(function () {
|
|
1008
|
-
_this11.dto.RetailPaymentDetails = [];
|
|
1009
|
-
_this11.dto.RetailStorageDetails = [];
|
|
1010
|
-
_this11.dto.RetailCouponDetails = [];
|
|
1011
|
-
var czkSum = 0;
|
|
1012
|
-
var Idmember = _this11.dto.Idmember;
|
|
1013
|
-
var thePaymodes = _this11.newStyle ? (0, _filter3.default)(_this11.paymode.thePaymodes, function (mode) {
|
|
1014
|
-
return parseFloat(mode.value) != 0;
|
|
1015
|
-
}) : _this11.paymode.thePaymodes;
|
|
1016
|
-
(0, _each3.default)(thePaymodes, function (mode) {
|
|
1017
|
-
var themode = (0, _find3.default)(_this11.paymode.paymodes, { 'paymentType': mode.paymentType });
|
|
1018
|
-
if (mode.paymentType == PayStyle.hyczk) {
|
|
1019
|
-
if (!Idmember) {
|
|
1020
|
-
Idmember = mode.member.id;
|
|
1021
|
-
}
|
|
1022
|
-
czkSum = Math.Add(czkSum, mode.value);
|
|
1023
|
-
_this11.dto.RetailStorageDetails.push({
|
|
1024
|
-
Code: mode.paymethodId,
|
|
1025
|
-
StoragePaymentAmount: mode.value,
|
|
1026
|
-
IsOrigReturn: false,
|
|
1027
|
-
BalanceStorage: mode.balance,
|
|
1028
|
-
Idmember: mode.member.id,
|
|
1029
|
-
DynamicPropertyKeys: [],
|
|
1030
|
-
DynamicPropertyValues: [],
|
|
1031
|
-
DataSource: { Id: _this11.dataSource },
|
|
1032
|
-
Password: mode.authCode
|
|
1033
|
-
});
|
|
1034
|
-
} else {
|
|
1035
|
-
var value = parseFloat(mode.value);
|
|
1036
|
-
var giveChange = null;
|
|
1037
|
-
if (_this11.calculationIsXianJin(mode) && _this11.paymode.receivable < 0 && value > Math.abs(_this11.paymode.receivable)) {
|
|
1038
|
-
value = Math.Add(value, _this11.paymode.receivable);
|
|
1039
|
-
giveChange = Math.abs(_this11.paymode.receivable);
|
|
1040
|
-
}
|
|
1041
|
-
var giveChangeForStorage = null;
|
|
1042
|
-
if (_this11.giveChangeForStorage > 0 && _this11.calculationIsXianJin(mode)) {
|
|
1043
|
-
giveChange = _this11.cashChange;
|
|
1044
|
-
giveChangeForStorage = _this11.giveChangeForStorage;
|
|
1045
|
-
}
|
|
1046
|
-
_this11.dto.GiveChangeForStorageAmount = _this11.giveChangeForStorage;
|
|
1047
|
-
_this11.dto.RetailPaymentDetails.push({
|
|
1048
|
-
Code: mode.paymethodId,
|
|
1049
|
-
OrigAmount: mode.exchangeRate != 1 ? mode.value2 : value,
|
|
1050
|
-
Amount: value,
|
|
1051
|
-
GiveChange: giveChange,
|
|
1052
|
-
GiveChangeForStorage: giveChangeForStorage,
|
|
1053
|
-
IdsettleStyle: themode.idSettleStyle,
|
|
1054
|
-
IdbankAccount: themode.idBankAccount,
|
|
1055
|
-
Idcurrency: themode.idCurrency,
|
|
1056
|
-
ExchangeRate: themode.exchangeRate,
|
|
1057
|
-
PaymentCode: mode.authCode,
|
|
1058
|
-
SteadCashIntegral: mode.steadCashIntegral,
|
|
1059
|
-
OverchargesAmount: mode.overchargesAmount,
|
|
1060
|
-
DynamicPropertyKeys: [],
|
|
1061
|
-
DynamicPropertyValues: [],
|
|
1062
|
-
DataSource: { Id: _this11.dataSource }
|
|
1063
|
-
});
|
|
1064
|
-
if (mode.paymentType == PayStyle.djq) {
|
|
1065
|
-
(0, _each3.default)(mode.djqs, function (djq) {
|
|
1066
|
-
if (djq.checked) {
|
|
1067
|
-
_this11.dto.RetailCouponDetails.push({
|
|
1068
|
-
CouponCode: djq.code,
|
|
1069
|
-
ReductionAmount: djq.amount,
|
|
1070
|
-
EnableAmount: djq.doorsill,
|
|
1071
|
-
CouponTitle: djq.name,
|
|
1072
|
-
IdMember: djq.UMemberID ? mode.member.id : null,
|
|
1073
|
-
LastTS: djq.LastTS,
|
|
1074
|
-
DataSource: { Id: _this11.dataSource }
|
|
1075
|
-
});
|
|
1076
|
-
}
|
|
1077
|
-
});
|
|
1078
|
-
}
|
|
1079
|
-
}
|
|
1080
|
-
});
|
|
1081
|
-
if (_this11.dto.RetailStorageDetails.length > 0) {
|
|
1082
|
-
var themode = (0, _find3.default)(_this11.paymode.paymodes, { 'paymentType': PayStyle.hyczk });
|
|
1083
|
-
_this11.dto.RetailPaymentDetails.push({
|
|
1084
|
-
Code: _this11.paymode.counter,
|
|
1085
|
-
OrigAmount: czkSum,
|
|
1086
|
-
Amount: czkSum,
|
|
1087
|
-
IdsettleStyle: themode.idSettleStyle,
|
|
1088
|
-
IdbankAccount: themode.idBankAccount,
|
|
1089
|
-
DynamicPropertyKeys: [],
|
|
1090
|
-
DynamicPropertyValues: [],
|
|
1091
|
-
DataSource: { Id: _this11.dataSource }
|
|
1092
|
-
});
|
|
1093
|
-
_this11.dto.Idmember = Idmember;
|
|
1094
|
-
}
|
|
1095
|
-
});
|
|
1096
|
-
console.log('结算数据:', this.dto);
|
|
1097
|
-
return (0, _tplusApi.tApi)({ dto: this.dto.cut() }, 'chanjet.RE.newRetail.Settle', false, false, { timeout_skip: true }).then(function (resp) {
|
|
1098
|
-
_this11.setDtoID(resp.ID);
|
|
1099
|
-
// runInAction(()=>{
|
|
1100
|
-
// this.context.viewModel.data.ID=resp.ID;
|
|
1101
|
-
// });
|
|
1102
|
-
});
|
|
1103
|
-
// return new Promise((resolve,reject)=>{
|
|
1104
|
-
// setTimeout(()=>{
|
|
1105
|
-
// if(result){
|
|
1106
|
-
// resolve(result);
|
|
1107
|
-
// }else{
|
|
1108
|
-
// reject(result);
|
|
1109
|
-
// }
|
|
1110
|
-
// },3000);//5000
|
|
1111
|
-
// })
|
|
1112
|
-
}
|
|
1113
|
-
}, {
|
|
1114
|
-
key: 'setDtoID',
|
|
1115
|
-
value: function setDtoID(id) {
|
|
1116
|
-
this.context.viewModel.data.ID = id;
|
|
1117
|
-
}
|
|
1118
|
-
}, {
|
|
1119
|
-
key: 'querySettleResult',
|
|
1120
|
-
value: function () {
|
|
1121
|
-
var _ref6 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee4() {
|
|
1122
|
-
return _regenerator2.default.wrap(function _callee4$(_context4) {
|
|
1123
|
-
while (1) {
|
|
1124
|
-
switch (_context4.prev = _context4.next) {
|
|
1125
|
-
case 0:
|
|
1126
|
-
_context4.prev = 0;
|
|
1127
|
-
_context4.t0 = _promise2.default;
|
|
1128
|
-
_context4.next = 4;
|
|
1129
|
-
return (0, _tplusApi.tApi)({ RetailCode: this.dto.Code }, 'chanjet.RE.newRetail.QuerySettleResult', false, false, { timeout_skip: true });
|
|
1130
|
-
|
|
1131
|
-
case 4:
|
|
1132
|
-
_context4.t1 = _context4.sent;
|
|
1133
|
-
return _context4.abrupt('return', _context4.t0.resolve.call(_context4.t0, _context4.t1));
|
|
1134
|
-
|
|
1135
|
-
case 8:
|
|
1136
|
-
_context4.prev = 8;
|
|
1137
|
-
_context4.t2 = _context4['catch'](0);
|
|
1138
|
-
return _context4.abrupt('return', _promise2.default.resolve({ Flag: "1" }));
|
|
1139
|
-
|
|
1140
|
-
case 11:
|
|
1141
|
-
case 'end':
|
|
1142
|
-
return _context4.stop();
|
|
1143
|
-
}
|
|
1144
|
-
}
|
|
1145
|
-
}, _callee4, this, [[0, 8]]);
|
|
1146
|
-
}));
|
|
1147
|
-
|
|
1148
|
-
function querySettleResult() {
|
|
1149
|
-
return _ref6.apply(this, arguments);
|
|
1150
|
-
}
|
|
1151
|
-
|
|
1152
|
-
return querySettleResult;
|
|
1153
|
-
}()
|
|
1154
|
-
}, {
|
|
1155
|
-
key: 'validePwd',
|
|
1156
|
-
value: function () {
|
|
1157
|
-
var _ref7 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee5(value) {
|
|
1158
|
-
var result;
|
|
1159
|
-
return _regenerator2.default.wrap(function _callee5$(_context5) {
|
|
1160
|
-
while (1) {
|
|
1161
|
-
switch (_context5.prev = _context5.next) {
|
|
1162
|
-
case 0:
|
|
1163
|
-
_context5.prev = 0;
|
|
1164
|
-
_context5.next = 3;
|
|
1165
|
-
return (0, _tplusApi.tApi)({ "CheckoutParams": {
|
|
1166
|
-
"Idmember": value.id,
|
|
1167
|
-
"Password": value.pwd
|
|
1168
|
-
} }, 'AA.DR.newRetailMember.CheckoutMemberPassword', false, false);
|
|
1169
|
-
|
|
1170
|
-
case 3:
|
|
1171
|
-
result = _context5.sent;
|
|
1172
|
-
return _context5.abrupt('return', _promise2.default.resolve(result.Success ? "" : result.Message));
|
|
1173
|
-
|
|
1174
|
-
case 7:
|
|
1175
|
-
_context5.prev = 7;
|
|
1176
|
-
_context5.t0 = _context5['catch'](0);
|
|
1177
|
-
return _context5.abrupt('return', "failed");
|
|
1178
|
-
|
|
1179
|
-
case 10:
|
|
1180
|
-
case 'end':
|
|
1181
|
-
return _context5.stop();
|
|
1182
|
-
}
|
|
1183
|
-
}
|
|
1184
|
-
}, _callee5, this, [[0, 7]]);
|
|
1185
|
-
}));
|
|
1186
|
-
|
|
1187
|
-
function validePwd(_x2) {
|
|
1188
|
-
return _ref7.apply(this, arguments);
|
|
1189
|
-
}
|
|
1190
|
-
|
|
1191
|
-
return validePwd;
|
|
1192
|
-
}()
|
|
1193
|
-
}]);
|
|
1194
|
-
return SettlementStore;
|
|
1195
|
-
}(), (_applyDecoratedDescriptor(_class.prototype, 'initByOriginReturn', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'initByOriginReturn'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'quickSettle', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'quickSettle'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'changeFocusAndAddPay', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'changeFocusAndAddPay'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'addDjq', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'addDjq'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'changeFocusOnly', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'changeFocusOnly'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'changeInputStorageValue', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'changeInputStorageValue'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'clearInputStorageData', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'clearInputStorageData'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'changeValue', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'changeValue'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'changeReturnValue', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'changeReturnValue'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'addPayDirectly', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'addPayDirectly'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'addPay', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'addPay'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'delPay', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'delPay'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'changeIsCheckDate', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'changeIsCheckDate'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'CheckExpirationDate', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'CheckExpirationDate'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'setDtoID', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'setDtoID'), _class.prototype)), _class);
|
|
1196
|
-
exports.default = SettlementStore;
|
|
1197
|
-
var PayMode = exports.PayMode = (_class3 = function () {
|
|
1198
|
-
function PayMode() {
|
|
1199
|
-
// this.amount=getFixedNumber(amount);
|
|
1200
|
-
// this.calcReserved();
|
|
1201
|
-
|
|
1202
|
-
(0, _classCallCheck3.default)(this, PayMode);
|
|
1203
|
-
this._counter = 0;
|
|
1204
|
-
this.amount = 0;
|
|
1205
|
-
this.onlineamount = 0;
|
|
1206
|
-
this.maxamount = 0;
|
|
1207
|
-
|
|
1208
|
-
_initDefineProp(this, 'currentFocus', _descriptor, this);
|
|
1209
|
-
|
|
1210
|
-
_initDefineProp(this, 'received', _descriptor2, this);
|
|
1211
|
-
|
|
1212
|
-
_initDefineProp(this, 'receivable', _descriptor3, this);
|
|
1213
|
-
|
|
1214
|
-
_initDefineProp(this, 'paymodes', _descriptor4, this);
|
|
1215
|
-
|
|
1216
|
-
_initDefineProp(this, 'thePaymodes', _descriptor5, this);
|
|
1217
|
-
|
|
1218
|
-
this.currentMode = null;
|
|
1219
|
-
this.settle = {
|
|
1220
|
-
name: "复合结算",
|
|
1221
|
-
hotKey: "Ctrl+M"
|
|
1222
|
-
};
|
|
1223
|
-
} //应收
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
(0, _createClass3.default)(PayMode, [{
|
|
1227
|
-
key: 'clean',
|
|
1228
|
-
value: function clean() {
|
|
1229
|
-
this.thePaymodes = [];
|
|
1230
|
-
this.calcReserved();
|
|
1231
|
-
}
|
|
1232
|
-
}, {
|
|
1233
|
-
key: 'setAmount',
|
|
1234
|
-
value: function setAmount(a, o) {
|
|
1235
|
-
this.amount = (0, _utils.getFixedNumber)((a || 0) - (o || 0));
|
|
1236
|
-
this.onlineamount = (0, _utils.getFixedNumber)(o || 0);
|
|
1237
|
-
this.calcReserved();
|
|
1238
|
-
return this.amount < 0;
|
|
1239
|
-
}
|
|
1240
|
-
}, {
|
|
1241
|
-
key: 'calcReserved',
|
|
1242
|
-
value: function calcReserved() {
|
|
1243
|
-
var sum = 0;
|
|
1244
|
-
(0, _each3.default)(this.thePaymodes, function (mode) {
|
|
1245
|
-
sum = Math.Add(sum, mode.value == "" ? 0 : mode.value);
|
|
1246
|
-
});
|
|
1247
|
-
this.received = (0, _utils.getFixedNumber)(sum);
|
|
1248
|
-
this.receivable = (0, _utils.getFixedNumber)(this.amount - sum);
|
|
1249
|
-
}
|
|
1250
|
-
}, {
|
|
1251
|
-
key: 'calcReservedDjq',
|
|
1252
|
-
value: function calcReservedDjq() {
|
|
1253
|
-
var sum = 0;
|
|
1254
|
-
(0, _each3.default)(this.thePaymodes, function (mode) {
|
|
1255
|
-
if (mode.paymentType != PayStyle.djq || mode.checked) {
|
|
1256
|
-
sum = Math.Add(sum, mode.value == "" ? 0 : mode.value);
|
|
1257
|
-
}
|
|
1258
|
-
});
|
|
1259
|
-
this.received = (0, _utils.getFixedNumber)(sum);
|
|
1260
|
-
this.receivable = (0, _utils.getFixedNumber)(this.amount - sum);
|
|
1261
|
-
}
|
|
1262
|
-
}, {
|
|
1263
|
-
key: 'calcDjqValue',
|
|
1264
|
-
value: function calcDjqValue(q1) {
|
|
1265
|
-
if (!this.currentMode.boriginReturn && parseFloat(this.currentMode.maxamount) <= 0) {
|
|
1266
|
-
_message2.default.error("本单没有代金券可用金额,该券不可使用。");
|
|
1267
|
-
return;
|
|
1268
|
-
}
|
|
1269
|
-
var q = (0, _find3.default)(this.currentMode.djqs, function (djq) {
|
|
1270
|
-
return djq.code == q1.code;
|
|
1271
|
-
});
|
|
1272
|
-
if (q && !q.checked && parseFloat(this.amount) < parseFloat(q.doorsill)) {
|
|
1273
|
-
_message2.default.error("本单金额低于使用门槛,该券不可使用。");
|
|
1274
|
-
return;
|
|
1275
|
-
}
|
|
1276
|
-
q && (q.checked = !q.checked);
|
|
1277
|
-
var sum = 0;
|
|
1278
|
-
(0, _each3.default)((0, _filter3.default)(this.currentMode.djqs, function (djq) {
|
|
1279
|
-
return djq.checked;
|
|
1280
|
-
}), function (q) {
|
|
1281
|
-
sum = Math.Add(sum, q.amount);
|
|
1282
|
-
});
|
|
1283
|
-
if (q && !q.checked) {
|
|
1284
|
-
this.calcReservedDjq();
|
|
1285
|
-
};
|
|
1286
|
-
this.currentMode.value = (0, _utils.getFixedNumber)(Math.max(0, Math.min(this.receivable, sum, this.currentMode.maxamount)));
|
|
1287
|
-
this.currentMode.receivable = (0, _utils.getFixedNumber)(this.receivable - this.currentMode.value);
|
|
1288
|
-
this.currentMode.overchargesAmount = (0, _utils.getFixedNumber)(sum - this.currentMode.value);
|
|
1289
|
-
}
|
|
1290
|
-
}, {
|
|
1291
|
-
key: 'setCurrentModeValue',
|
|
1292
|
-
value: function setCurrentModeValue(v, max) {
|
|
1293
|
-
this.currentMode.value = parseFloat(v) || 0;
|
|
1294
|
-
this.currentMode.errinfo = '';
|
|
1295
|
-
if (this.amount > 0 && (v === '' || v === '0.00')) {
|
|
1296
|
-
this.currentMode.errinfo = "实收金额必须录入";
|
|
1297
|
-
} else if (Math.abs(parseFloat(v)) > Math.abs(this.amount)) {
|
|
1298
|
-
this.currentMode.errinfo = "实收不应大于应收";
|
|
1299
|
-
} else if (parseFloat(v) > 0 && parseFloat(v) > (max || 0)) {
|
|
1300
|
-
this.currentMode.errinfo = "余额不足";
|
|
1301
|
-
}
|
|
1302
|
-
}
|
|
1303
|
-
}, {
|
|
1304
|
-
key: 'calcMemberBalance',
|
|
1305
|
-
value: function calcMemberBalance() {
|
|
1306
|
-
this.currentMode.balance = this.currentMode.member.rawbalance - this.currentMode.value;
|
|
1307
|
-
}
|
|
1308
|
-
}, {
|
|
1309
|
-
key: 'setPaymodes',
|
|
1310
|
-
value: function () {
|
|
1311
|
-
var _ref8 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee6(type) {
|
|
1312
|
-
var _this12 = this;
|
|
1313
|
-
|
|
1314
|
-
var modes;
|
|
1315
|
-
return _regenerator2.default.wrap(function _callee6$(_context6) {
|
|
1316
|
-
while (1) {
|
|
1317
|
-
switch (_context6.prev = _context6.next) {
|
|
1318
|
-
case 0:
|
|
1319
|
-
_context6.next = 2;
|
|
1320
|
-
return (0, _tplusApi.tApi)({ settleStyleType: type == 1 ? '63002' : '63001' }, 'chanjet.RE.NewPos.GetStoreSettleStyles', false, false);
|
|
1321
|
-
|
|
1322
|
-
case 2:
|
|
1323
|
-
modes = _context6.sent;
|
|
1324
|
-
|
|
1325
|
-
if (modes) {
|
|
1326
|
-
(0, _mobx.runInAction)(function () {
|
|
1327
|
-
(0, _each3.default)(modes.SettleStyles, function (mode, index) {
|
|
1328
|
-
//产品需求确认会员储值卡结算方式前端展示统一调整为“储值卡" tuzha by 2020-07-08
|
|
1329
|
-
if (mode.Code == PayStyle.hyczk) {
|
|
1330
|
-
mode.Name = '储值卡';
|
|
1331
|
-
}
|
|
1332
|
-
_this12.paymodes.push({
|
|
1333
|
-
name: mode.Name,
|
|
1334
|
-
isDefault: mode.IsDefaultSettleStyle,
|
|
1335
|
-
isQuick: (0, _findIndex3.default)(modes.QuickSettleStyles, { 'Code': mode.Code }) >= 0,
|
|
1336
|
-
orderBy: 1,
|
|
1337
|
-
paymentType: mode.Code,
|
|
1338
|
-
idSettleStyle: mode.IdSettleStyle,
|
|
1339
|
-
idBankAccount: mode.IdBankAccount,
|
|
1340
|
-
exchangeRate: mode.Currency ? mode.Currency.ExchangeRate : 1,
|
|
1341
|
-
idCurrency: mode.Currency ? mode.Currency.ID : -1,
|
|
1342
|
-
calDirection: mode.Currency ? mode.Currency.CalDirection.Id : "88",
|
|
1343
|
-
bankNoType: mode.BankNoType
|
|
1344
|
-
});
|
|
1345
|
-
});
|
|
1346
|
-
//modes.QuickSettleStyles
|
|
1347
|
-
});
|
|
1348
|
-
}
|
|
1349
|
-
|
|
1350
|
-
case 4:
|
|
1351
|
-
case 'end':
|
|
1352
|
-
return _context6.stop();
|
|
1353
|
-
}
|
|
1354
|
-
}
|
|
1355
|
-
}, _callee6, this);
|
|
1356
|
-
}));
|
|
1357
|
-
|
|
1358
|
-
function setPaymodes(_x3) {
|
|
1359
|
-
return _ref8.apply(this, arguments);
|
|
1360
|
-
}
|
|
1361
|
-
|
|
1362
|
-
return setPaymodes;
|
|
1363
|
-
}()
|
|
1364
|
-
}, {
|
|
1365
|
-
key: 'charge',
|
|
1366
|
-
get: function get() {
|
|
1367
|
-
return Math.abs(this.receivable);
|
|
1368
|
-
}
|
|
1369
|
-
}, {
|
|
1370
|
-
key: 'counter',
|
|
1371
|
-
get: function get() {
|
|
1372
|
-
return ++this._counter;
|
|
1373
|
-
}
|
|
1374
|
-
}]);
|
|
1375
|
-
return PayMode;
|
|
1376
|
-
}(), (_descriptor = _applyDecoratedDescriptor(_class3.prototype, 'currentFocus', [_mobx.observable], {
|
|
1377
|
-
enumerable: true,
|
|
1378
|
-
initializer: function initializer() {
|
|
1379
|
-
return "";
|
|
1380
|
-
}
|
|
1381
|
-
}), _descriptor2 = _applyDecoratedDescriptor(_class3.prototype, 'received', [_mobx.observable], {
|
|
1382
|
-
enumerable: true,
|
|
1383
|
-
initializer: function initializer() {
|
|
1384
|
-
return 0;
|
|
1385
|
-
}
|
|
1386
|
-
}), _descriptor3 = _applyDecoratedDescriptor(_class3.prototype, 'receivable', [_mobx.observable], {
|
|
1387
|
-
enumerable: true,
|
|
1388
|
-
initializer: function initializer() {
|
|
1389
|
-
return 0;
|
|
1390
|
-
}
|
|
1391
|
-
}), _descriptor4 = _applyDecoratedDescriptor(_class3.prototype, 'paymodes', [_mobx.observable], {
|
|
1392
|
-
enumerable: true,
|
|
1393
|
-
initializer: function initializer() {
|
|
1394
|
-
return [];
|
|
1395
|
-
}
|
|
1396
|
-
}), _descriptor5 = _applyDecoratedDescriptor(_class3.prototype, 'thePaymodes', [_mobx.observable], {
|
|
1397
|
-
enumerable: true,
|
|
1398
|
-
initializer: function initializer() {
|
|
1399
|
-
return [];
|
|
1400
|
-
}
|
|
1401
|
-
}), _applyDecoratedDescriptor(_class3.prototype, 'clean', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class3.prototype, 'clean'), _class3.prototype), _applyDecoratedDescriptor(_class3.prototype, 'calcReserved', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class3.prototype, 'calcReserved'), _class3.prototype), _applyDecoratedDescriptor(_class3.prototype, 'calcReservedDjq', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class3.prototype, 'calcReservedDjq'), _class3.prototype), _applyDecoratedDescriptor(_class3.prototype, 'calcDjqValue', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class3.prototype, 'calcDjqValue'), _class3.prototype), _applyDecoratedDescriptor(_class3.prototype, 'setCurrentModeValue', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class3.prototype, 'setCurrentModeValue'), _class3.prototype), _applyDecoratedDescriptor(_class3.prototype, 'calcMemberBalance', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class3.prototype, 'calcMemberBalance'), _class3.prototype)), _class3);
|
|
1402
|
-
var Member = exports.Member = (_class5 = function () {
|
|
1403
|
-
function Member(m) {
|
|
1404
|
-
var _this13 = this;
|
|
1405
|
-
|
|
1406
|
-
(0, _classCallCheck3.default)(this, Member);
|
|
1407
|
-
|
|
1408
|
-
_initDefineProp(this, 'cardNo', _descriptor6, this);
|
|
1409
|
-
|
|
1410
|
-
_initDefineProp(this, 'balance', _descriptor7, this);
|
|
1411
|
-
|
|
1412
|
-
_initDefineProp(this, 'exchangable', _descriptor8, this);
|
|
1413
|
-
|
|
1414
|
-
if (m) {
|
|
1415
|
-
this.id = m.ID;
|
|
1416
|
-
this.uid = m.Uid;
|
|
1417
|
-
this.type = m.MemberType ? m.MemberType.Name : "普通";
|
|
1418
|
-
this.rawbalance = m.BalanceStorage;
|
|
1419
|
-
var index = (0, _findIndex3.default)(m.DynamicPropertyKeys, function (key) {
|
|
1420
|
-
return key == 'canusedbalancestorage';
|
|
1421
|
-
});
|
|
1422
|
-
(0, _mobx.runInAction)(function () {
|
|
1423
|
-
_this13.cardNo = m.CardCode;
|
|
1424
|
-
if (index >= 0) {
|
|
1425
|
-
_this13.balance = parseFloat(m.DynamicPropertyValues[index]);
|
|
1426
|
-
} else {
|
|
1427
|
-
_this13.balance = _this13.rawbalance;
|
|
1428
|
-
}
|
|
1429
|
-
});
|
|
1430
|
-
this.needPwd = m.MemberType ? m.MemberType.IsNeedPwd : false;
|
|
1431
|
-
this.NeedModifyPassword = m.NeedModifyPassword;
|
|
1432
|
-
this.bonusPoints = m.BalanceIntegral;
|
|
1433
|
-
}
|
|
1434
|
-
}
|
|
1435
|
-
|
|
1436
|
-
(0, _createClass3.default)(Member, [{
|
|
1437
|
-
key: 'setExchangable',
|
|
1438
|
-
value: function setExchangable(v) {
|
|
1439
|
-
this.exchangable = v;
|
|
1440
|
-
}
|
|
1441
|
-
}, {
|
|
1442
|
-
key: 'setCardNo',
|
|
1443
|
-
value: function setCardNo(v) {
|
|
1444
|
-
this.cardNo = v;
|
|
1445
|
-
this.id = null;
|
|
1446
|
-
}
|
|
1447
|
-
}]);
|
|
1448
|
-
return Member;
|
|
1449
|
-
}(), (_descriptor6 = _applyDecoratedDescriptor(_class5.prototype, 'cardNo', [_mobx.observable], {
|
|
1450
|
-
enumerable: true,
|
|
1451
|
-
initializer: null
|
|
1452
|
-
}), _descriptor7 = _applyDecoratedDescriptor(_class5.prototype, 'balance', [_mobx.observable], {
|
|
1453
|
-
enumerable: true,
|
|
1454
|
-
initializer: null
|
|
1455
|
-
}), _descriptor8 = _applyDecoratedDescriptor(_class5.prototype, 'exchangable', [_mobx.observable], {
|
|
1456
|
-
enumerable: true,
|
|
1457
|
-
initializer: null
|
|
1458
|
-
}), _applyDecoratedDescriptor(_class5.prototype, 'setExchangable', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class5.prototype, 'setExchangable'), _class5.prototype), _applyDecoratedDescriptor(_class5.prototype, 'setCardNo', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class5.prototype, 'setCardNo'), _class5.prototype)), _class5);
|
|
1459
|
-
//# sourceMappingURL=settlementStore.js.map
|