tplus-components-touch 3.54.1 → 3.55.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (176) hide show
  1. package/dist/components/cloudPrint/printTemplate/template.js +52 -0
  2. package/dist/components/cloudPrint/printTemplate/template.js.map +1 -0
  3. package/dist/components/commonForm/addressPicker/index.js +255 -0
  4. package/dist/components/commonForm/addressPicker/index.js.map +1 -0
  5. package/dist/components/commonForm/autoComplete/index.js +260 -0
  6. package/dist/components/commonForm/autoComplete/index.js.map +1 -0
  7. package/dist/components/commonForm/datePicker/index.js +92 -0
  8. package/dist/components/commonForm/datePicker/index.js.map +1 -0
  9. package/dist/components/commonForm/formControl/index.js +144 -0
  10. package/dist/components/commonForm/formControl/index.js.map +1 -0
  11. package/dist/components/commonForm/index.js +231 -0
  12. package/dist/components/commonForm/index.js.map +1 -0
  13. package/dist/components/commonForm/inputNumber/index.js +272 -0
  14. package/dist/components/commonForm/inputNumber/index.js.map +1 -0
  15. package/dist/components/commonForm/radio/index.js +132 -0
  16. package/dist/components/commonForm/radio/index.js.map +1 -0
  17. package/dist/components/deliverySearch/api.js +355 -0
  18. package/dist/components/deliverySearch/api.js.map +1 -0
  19. package/dist/components/deliverySearch/index.js +1222 -0
  20. package/dist/components/deliverySearch/index.js.map +1 -0
  21. package/dist/components/form/index.js +310 -0
  22. package/dist/components/form/index.js.map +1 -0
  23. package/dist/components/hardwareAPI/index.js +215 -0
  24. package/dist/components/hardwareAPI/index.js.map +1 -0
  25. package/dist/components/hotKey/config.js +306 -0
  26. package/dist/components/hotKey/config.js.map +1 -0
  27. package/dist/components/hotKey/hotKeyModal.js +479 -0
  28. package/dist/components/hotKey/hotKeyModal.js.map +1 -0
  29. package/dist/components/hotKey/index.js +795 -0
  30. package/dist/components/hotKey/index.js.map +1 -0
  31. package/dist/components/hotKey/localConfig.js +1216 -0
  32. package/dist/components/hotKey/localConfig.js.map +1 -0
  33. package/dist/components/hotKey/utils.js +135 -0
  34. package/dist/components/hotKey/utils.js.map +1 -0
  35. package/dist/components/input/index.js +254 -0
  36. package/dist/components/input/index.js.map +1 -0
  37. package/dist/components/input/scanInput.js +98 -0
  38. package/dist/components/input/scanInput.js.map +1 -0
  39. package/dist/components/input/tplusInput/index.js +81 -0
  40. package/dist/components/input/tplusInput/index.js.map +1 -0
  41. package/dist/components/input/tplusInput/inputContent.js +128 -0
  42. package/dist/components/input/tplusInput/inputContent.js.map +1 -0
  43. package/dist/components/input/tplusInput/inputs.js +151 -0
  44. package/dist/components/input/tplusInput/inputs.js.map +1 -0
  45. package/dist/components/input/utils/index.js +26 -0
  46. package/dist/components/input/utils/index.js.map +1 -0
  47. package/dist/components/inventorySearch/api.js +214 -0
  48. package/dist/components/inventorySearch/api.js.map +1 -0
  49. package/dist/components/inventorySearch/index.js +303 -0
  50. package/dist/components/inventorySearch/index.js.map +1 -0
  51. package/dist/components/inventorySearch/store.js +363 -0
  52. package/dist/components/inventorySearch/store.js.map +1 -0
  53. package/dist/components/inventorySearch/tab.js +280 -0
  54. package/dist/components/inventorySearch/tab.js.map +1 -0
  55. package/dist/components/keyboard/index.js +259 -0
  56. package/dist/components/keyboard/index.js.map +1 -0
  57. package/dist/components/keyboard/letterKeyboard.js +227 -0
  58. package/dist/components/keyboard/letterKeyboard.js.map +1 -0
  59. package/dist/components/keyboard/numKeyboard.js +469 -0
  60. package/dist/components/keyboard/numKeyboard.js.map +1 -0
  61. package/dist/components/keyboard/numKeyboardScan.js +208 -0
  62. package/dist/components/keyboard/numKeyboardScan.js.map +1 -0
  63. package/dist/components/keyboard/numberButton_input.js +305 -0
  64. package/dist/components/keyboard/numberButton_input.js.map +1 -0
  65. package/dist/components/keyboard/numkeyboardPassword.js +477 -0
  66. package/dist/components/keyboard/numkeyboardPassword.js.map +1 -0
  67. package/dist/components/keyboard/onlyKeyboard.js +90 -0
  68. package/dist/components/keyboard/onlyKeyboard.js.map +1 -0
  69. package/dist/components/keyboard/onlyLetterButton.js +187 -0
  70. package/dist/components/keyboard/onlyLetterButton.js.map +1 -0
  71. package/dist/components/keyboard/onlyLetterButton2.js +235 -0
  72. package/dist/components/keyboard/onlyLetterButton2.js.map +1 -0
  73. package/dist/components/keyboard/onlyNumberButton.js +128 -0
  74. package/dist/components/keyboard/onlyNumberButton.js.map +1 -0
  75. package/dist/components/keyboard/onlyNumberButton2.js +115 -0
  76. package/dist/components/keyboard/onlyNumberButton2.js.map +1 -0
  77. package/dist/components/keyboard/textKeyboard.js +50 -0
  78. package/dist/components/keyboard/textKeyboard.js.map +1 -0
  79. package/dist/components/layout/hamburger.js +29 -0
  80. package/dist/components/layout/hamburger.js.map +1 -0
  81. package/dist/components/layout/index.js +31 -0
  82. package/dist/components/layout/index.js.map +1 -0
  83. package/dist/components/layout/layout.js +182 -0
  84. package/dist/components/layout/layout.js.map +1 -0
  85. package/dist/components/layout/sider.js +167 -0
  86. package/dist/components/layout/sider.js.map +1 -0
  87. package/dist/components/loading/index.js +198 -0
  88. package/dist/components/loading/index.js.map +1 -0
  89. package/dist/components/loading/loadingContent.js +188 -0
  90. package/dist/components/loading/loadingContent.js.map +1 -0
  91. package/dist/components/loading/utils.js +29 -0
  92. package/dist/components/loading/utils.js.map +1 -0
  93. package/dist/components/message/index.js +309 -0
  94. package/dist/components/message/index.js.map +1 -0
  95. package/dist/components/modal/index.js +93 -0
  96. package/dist/components/modal/index.js.map +1 -0
  97. package/dist/components/modalVertical/index.js +325 -0
  98. package/dist/components/modalVertical/index.js.map +1 -0
  99. package/dist/components/modalWraper/index.js +485 -0
  100. package/dist/components/modalWraper/index.js.map +1 -0
  101. package/dist/components/modalWraper/utils.js +48 -0
  102. package/dist/components/modalWraper/utils.js.map +1 -0
  103. package/dist/components/notification/index.js +118 -0
  104. package/dist/components/notification/index.js.map +1 -0
  105. package/dist/components/overflowTip/index.js +269 -0
  106. package/dist/components/overflowTip/index.js.map +1 -0
  107. package/dist/components/page/index.js +49 -0
  108. package/dist/components/page/index.js.map +1 -0
  109. package/dist/components/presale/pickup.js +479 -0
  110. package/dist/components/presale/pickup.js.map +1 -0
  111. package/dist/components/product/detail.js +148 -0
  112. package/dist/components/product/detail.js.map +1 -0
  113. package/dist/components/product/getCard.js +145 -0
  114. package/dist/components/product/getCard.js.map +1 -0
  115. package/dist/components/progressState/EmptyAndErrorView.js +142 -0
  116. package/dist/components/progressState/EmptyAndErrorView.js.map +1 -0
  117. package/dist/components/progressState/ProgressState.js +158 -0
  118. package/dist/components/progressState/ProgressState.js.map +1 -0
  119. package/dist/components/progressState/index.js +14 -0
  120. package/dist/components/progressState/index.js.map +1 -0
  121. package/dist/components/scan/index.js +219 -0
  122. package/dist/components/scan/index.js.map +1 -0
  123. package/dist/components/select/index.js +28 -0
  124. package/dist/components/select/index.js.map +1 -0
  125. package/dist/components/settlement/asyncModal.js +207 -0
  126. package/dist/components/settlement/asyncModal.js.map +1 -0
  127. package/dist/components/settlement/index.js +25 -0
  128. package/dist/components/settlement/index.js.map +1 -0
  129. package/dist/components/settlement/moreCzkTable/index.js +156 -0
  130. package/dist/components/settlement/moreCzkTable/index.js.map +1 -0
  131. package/dist/components/settlement/prototypeTable/index.js +353 -0
  132. package/dist/components/settlement/prototypeTable/index.js.map +1 -0
  133. package/dist/components/settlement/prototypeTable/utils.js +14 -0
  134. package/dist/components/settlement/prototypeTable/utils.js.map +1 -0
  135. package/dist/components/settlement/settlement.js +5557 -0
  136. package/dist/components/settlement/settlement.js.map +1 -0
  137. package/dist/components/settlement/settlement.less +0 -10
  138. package/dist/components/settlement/settlementApi.js +512 -0
  139. package/dist/components/settlement/settlementApi.js.map +1 -0
  140. package/dist/components/settlement/settlementStore.js +2833 -0
  141. package/dist/components/settlement/settlementStore.js.map +1 -0
  142. package/dist/components/settlement/utils.js +249 -0
  143. package/dist/components/settlement/utils.js.map +1 -0
  144. package/dist/components/socket/index.js +221 -0
  145. package/dist/components/socket/index.js.map +1 -0
  146. package/dist/components/spin/index.js +95 -0
  147. package/dist/components/spin/index.js.map +1 -0
  148. package/dist/components/test/index.js +330 -0
  149. package/dist/components/test/index.js.map +1 -0
  150. package/dist/components/ticon/iconfont/demo_index.html +3 -72
  151. package/dist/components/ticon/iconfont/iconfont.css +3 -15
  152. package/dist/components/ticon/iconfont/iconfont.js +36 -0
  153. package/dist/components/ticon/iconfont/iconfont.js.map +1 -0
  154. package/dist/components/ticon/iconfont/iconfont.json +0 -21
  155. package/dist/components/ticon/iconfont/iconfont.ttf +0 -0
  156. package/dist/components/ticon/iconfont/iconfont.woff +0 -0
  157. package/dist/components/ticon/iconfont/iconfont.woff2 +0 -0
  158. package/dist/components/ticon/index.js +60 -0
  159. package/dist/components/ticon/index.js.map +1 -0
  160. package/dist/components/touchScroll/index.js +186 -0
  161. package/dist/components/touchScroll/index.js.map +1 -0
  162. package/dist/components/touchTable/AuthProcess.js +42 -0
  163. package/dist/components/touchTable/AuthProcess.js.map +1 -0
  164. package/dist/components/touchTable/generateWater.js +59 -0
  165. package/dist/components/touchTable/generateWater.js.map +1 -0
  166. package/dist/components/touchTable/index.js +1148 -0
  167. package/dist/components/touchTable/index.js.map +1 -0
  168. package/dist/components/touchTable/utils.js +27 -0
  169. package/dist/components/touchTable/utils.js.map +1 -0
  170. package/dist/index.js +1 -22
  171. package/dist/index.js.map +1 -1
  172. package/package.json +2 -2
  173. package/dist/components/collection/api.js +0 -105
  174. package/dist/components/collection/api.js.map +0 -1
  175. package/dist/components/collection/searchView/index.less +0 -134
  176. package/dist/components/password/style.less +0 -95
@@ -0,0 +1,2833 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.Member = exports.PayMode = exports.default = undefined;
7
+
8
+ var _isInteger = require('babel-runtime/core-js/number/is-integer');
9
+
10
+ var _isInteger2 = _interopRequireDefault(_isInteger);
11
+
12
+ var _defineProperty = require('babel-runtime/core-js/object/define-property');
13
+
14
+ var _defineProperty2 = _interopRequireDefault(_defineProperty);
15
+
16
+ var _getOwnPropertyDescriptor = require('babel-runtime/core-js/object/get-own-property-descriptor');
17
+
18
+ var _getOwnPropertyDescriptor2 = _interopRequireDefault(_getOwnPropertyDescriptor);
19
+
20
+ var _stringify = require('babel-runtime/core-js/json/stringify');
21
+
22
+ var _stringify2 = _interopRequireDefault(_stringify);
23
+
24
+ var _promise = require('babel-runtime/core-js/promise');
25
+
26
+ var _promise2 = _interopRequireDefault(_promise);
27
+
28
+ var _regenerator = require('babel-runtime/regenerator');
29
+
30
+ var _regenerator2 = _interopRequireDefault(_regenerator);
31
+
32
+ var _asyncToGenerator2 = require('babel-runtime/helpers/asyncToGenerator');
33
+
34
+ var _asyncToGenerator3 = _interopRequireDefault(_asyncToGenerator2);
35
+
36
+ var _extends2 = require('babel-runtime/helpers/extends');
37
+
38
+ var _extends3 = _interopRequireDefault(_extends2);
39
+
40
+ var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');
41
+
42
+ var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
43
+
44
+ var _createClass2 = require('babel-runtime/helpers/createClass');
45
+
46
+ var _createClass3 = _interopRequireDefault(_createClass2);
47
+
48
+ var _desc, _value, _class, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _class2, _temp, _initialiseProps, _desc2, _value2, _class3, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13, _descriptor14, _descriptor15, _descriptor16, _desc3, _value3, _class5, _descriptor17, _descriptor18, _descriptor19, _descriptor20, _descriptor21;
49
+
50
+ var _mobx = require('mobx');
51
+
52
+ var _mutantsMicrofx = require('mutants-microfx');
53
+
54
+ var _find2 = require('lodash/find');
55
+
56
+ var _find3 = _interopRequireDefault(_find2);
57
+
58
+ var _remove2 = require('lodash/remove');
59
+
60
+ var _remove3 = _interopRequireDefault(_remove2);
61
+
62
+ var _each2 = require('lodash/each');
63
+
64
+ var _each3 = _interopRequireDefault(_each2);
65
+
66
+ var _map2 = require('lodash/map');
67
+
68
+ var _map3 = _interopRequireDefault(_map2);
69
+
70
+ var _join2 = require('lodash/join');
71
+
72
+ var _join3 = _interopRequireDefault(_join2);
73
+
74
+ var _trim2 = require('lodash/trim');
75
+
76
+ var _trim3 = _interopRequireDefault(_trim2);
77
+
78
+ var _filter2 = require('lodash/filter');
79
+
80
+ var _filter3 = _interopRequireDefault(_filter2);
81
+
82
+ var _findIndex2 = require('lodash/findIndex');
83
+
84
+ var _findIndex3 = _interopRequireDefault(_findIndex2);
85
+
86
+ var _findLastIndex2 = require('lodash/findLastIndex');
87
+
88
+ var _findLastIndex3 = _interopRequireDefault(_findLastIndex2);
89
+
90
+ var _findKey2 = require('lodash/findKey');
91
+
92
+ var _findKey3 = _interopRequireDefault(_findKey2);
93
+
94
+ var _tplusPoslogin = require('tplus-poslogin');
95
+
96
+ var _utils = require('./utils');
97
+
98
+ var _tplusApi = require('tplus-api');
99
+
100
+ var _cloneDeep = require('lodash/cloneDeep');
101
+
102
+ var _cloneDeep2 = _interopRequireDefault(_cloneDeep);
103
+
104
+ var _message = require('../message');
105
+
106
+ var _message2 = _interopRequireDefault(_message);
107
+
108
+ var _mutantsUtil = require('mutants-util');
109
+
110
+ var _tplusComponentsTouch = require('tplus-components-touch');
111
+
112
+ var _moment = require('moment');
113
+
114
+ var _moment2 = _interopRequireDefault(_moment);
115
+
116
+ var _reduce2 = require('lodash/reduce');
117
+
118
+ var _reduce3 = _interopRequireDefault(_reduce2);
119
+
120
+ var _settlementApi = require('./settlementApi');
121
+
122
+ var _settlementApi2 = _interopRequireDefault(_settlementApi);
123
+
124
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
125
+
126
+ function _initDefineProp(target, property, descriptor, context) {
127
+ if (!descriptor) return;
128
+ (0, _defineProperty2.default)(target, property, {
129
+ enumerable: descriptor.enumerable,
130
+ configurable: descriptor.configurable,
131
+ writable: descriptor.writable,
132
+ value: descriptor.initializer ? descriptor.initializer.call(context) : void 0
133
+ });
134
+ }
135
+
136
+ function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
137
+ var desc = {};
138
+ Object['ke' + 'ys'](descriptor).forEach(function (key) {
139
+ desc[key] = descriptor[key];
140
+ });
141
+ desc.enumerable = !!desc.enumerable;
142
+ desc.configurable = !!desc.configurable;
143
+
144
+ if ('value' in desc || desc.initializer) {
145
+ desc.writable = true;
146
+ }
147
+
148
+ desc = decorators.slice().reverse().reduce(function (desc, decorator) {
149
+ return decorator(target, property, desc) || desc;
150
+ }, desc);
151
+
152
+ if (context && desc.initializer !== void 0) {
153
+ desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
154
+ desc.initializer = undefined;
155
+ }
156
+
157
+ if (desc.initializer === void 0) {
158
+ Object['define' + 'Property'](target, property, desc);
159
+ desc = null;
160
+ }
161
+
162
+ return desc;
163
+ }
164
+
165
+ function _initializerWarningHelper(descriptor, context) {
166
+ throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.');
167
+ }
168
+
169
+ var t = _mutantsMicrofx.i18n.getFixedT(null, 'newretail');
170
+
171
+ var SettlementStore = (_class = (_temp = _class2 = function () {
172
+ //type==2
173
+ function SettlementStore() {
174
+ (0, _classCallCheck3.default)(this, SettlementStore);
175
+
176
+ _initialiseProps.call(this);
177
+
178
+ this.paymode = new PayMode();
179
+ var params = _mutantsMicrofx.localStore && _mutantsMicrofx.localStore.get('cloudPrintArguments');
180
+ if (params) this.cloudPrintArguments = params;
181
+ this.setNewStyle();
182
+ this.SettlementApi = _settlementApi2.default;
183
+ } // 预售都是全款;预订是否全款,在点击确认支付时计算订金和商品金额计算得出
184
+
185
+ (0, _createClass3.default)(SettlementStore, [{
186
+ key: 'initPaymodes',
187
+ value: function initPaymodes(event, type, isIntegralExchange) {
188
+ this.isIntegralExchange = isIntegralExchange;
189
+ this.paymode.setPaymodes(type, isIntegralExchange);
190
+ this.updateEvent = event;
191
+ }
192
+ }, {
193
+ key: 'init',
194
+ value: function init(context, amounthandler, datasource, storeinfo, bquick, amount, type, data, payModeKey) {
195
+ var _this2 = this;
196
+
197
+ this.setNewStyle();
198
+ this.type = type;
199
+ if (context) {
200
+ this.context = context;
201
+ this.amountHandler = amounthandler;
202
+ this.dataSource = datasource;
203
+ this.storeInfo = storeinfo;
204
+ this.dto = context.viewModel.data;
205
+ (0, _mobx.runInAction)(function () {
206
+ // 单品金额抹零
207
+ if (global.DealSingleRowAmountSettingProcessorBlock) {
208
+ global.DealSingleRowAmountSettingProcessorBlock.execute(_this2.dto);
209
+ }
210
+
211
+ var _enumController$getEn = _mutantsUtil.enumController.getEnumOj(),
212
+ PayStyle = _enumController$getEn.PayStyle;
213
+
214
+ var isQuickCash = bquick && payModeKey == PayStyle.xianjin;
215
+
216
+ // 成交金额抹零
217
+ if (global.DealAmountSettingProcessorBlock) {
218
+ global.DealAmountSettingProcessorBlock.execute(_this2.dto, isQuickCash);
219
+ }
220
+ });
221
+ // this.member=context.stores && context.stores.memberStore && context.stores.memberStore.member;
222
+ this.member = this.dto.Member; //stores.selectMemberStore.selectMemberInfo;
223
+
224
+ this.paymode.isNotFullBook = false;
225
+ this.paymode.isNotFullOnlyBook = false;
226
+ //预订按比例收取订金处理
227
+ var value = this.dto.TotalTaxAmount;
228
+
229
+ var _getLoginInfo = this.getLoginInfo(),
230
+ PreSellOrBook = _getLoginInfo.PreSellOrBook,
231
+ PercentageWhenBook = _getLoginInfo.PercentageWhenBook;
232
+
233
+ var _ref = this.dto || {},
234
+ IdbusiType = _ref.IdbusiType,
235
+ DistributionMode = _ref.DistributionMode;
236
+
237
+ if (IdbusiType == 38 && PreSellOrBook == 'BOOK' && PercentageWhenBook < 100 && (!DistributionMode.Id || DistributionMode.Id == 'ON_SITE_PICKUP')) {
238
+ this.paymode.bookMaxValue = value;
239
+ this.paymode.isNotFullBook = true;
240
+ this.paymode.isNotFullOnlyBook = true;
241
+ value = value * PercentageWhenBook / 100;
242
+ }
243
+ if (IdbusiType == 38 && PreSellOrBook == 'BOOK') {
244
+ (0, _mobx.runInAction)(function () {
245
+ _this2.dto.PrepaidAmount = value;
246
+ });
247
+ }
248
+ //预订计算快递或同城配送运费
249
+ if (IdbusiType == 38 && PreSellOrBook != 'DISABLED' && (DistributionMode.Id == 'ELECTRONIC' || DistributionMode.Id == 'CITY_DISTRIBUTE')) {
250
+ value += this.dto.BuyerPayFreight || 0;
251
+ }
252
+ //预订取货应补款金额
253
+ if (IdbusiType == 39) {
254
+ value = _mutantsMicrofx.stores.drawerStore.thisWaitPaidAmount;
255
+ if (_mutantsMicrofx.stores.drawerStore.totalWaitPaidAmount > 0) {
256
+ this.paymode.isNotFullBook = true;
257
+ this.paymode.bookMaxValue = _mutantsMicrofx.stores.drawerStore.totalWaitPaidAmount;
258
+ }
259
+ }
260
+
261
+ this.brefund = this.paymode.setAmount(value, this.dto.OnlinePaymentAmount);
262
+ } else {
263
+ this.brefund = this.paymode.setAmount(amount, 0);
264
+ this.dto = data;
265
+ }
266
+ this.paymode.clean();
267
+
268
+ //this.dto.TotalTaxAmount<0;
269
+ this.bquick = !!bquick;
270
+ this.boriginReturn = JSON.getCellValue(this.dto, "IsOriginalReturn");
271
+ if (this.boriginReturn) {
272
+ this.initByOriginReturn();
273
+ }
274
+ if (this.newStyle) {
275
+ this.setModes();
276
+ }
277
+ }
278
+ }, {
279
+ key: 'setModes',
280
+ value: function setModes() {
281
+ var _this3 = this;
282
+
283
+ (0, _each3.default)(this.paymode.paymodes, function (p) {
284
+ if ((0, _findIndex3.default)(_this3.paymode.thePaymodes, function (mode) {
285
+ return p.paymentType == mode.paymentType;
286
+ }) == -1) {
287
+ _this3.addPay(p.paymentType);
288
+ }
289
+ });
290
+ if (!this.boriginReturn && this.paymode.thePaymodes.length > 0) {
291
+ this.changeValue(this.paymode.thePaymodes[0].paymethodId, 0, true);
292
+ }
293
+ }
294
+ }, {
295
+ key: 'amountChanged',
296
+ value: function amountChanged(amount) {
297
+ if (this.type == 1) {
298
+ this.brefund = this.paymode.setAmount(amount, 0);
299
+ }
300
+ }
301
+ }, {
302
+ key: 'initByOriginReturn',
303
+ value: function initByOriginReturn() {
304
+ var _this4 = this;
305
+
306
+ var _enumController$getEn2 = _mutantsUtil.enumController.getEnumOj(),
307
+ PayStyle = _enumController$getEn2.PayStyle;
308
+
309
+ var _ref2 = _mutantsUtil.platform || {},
310
+ isNewRetailBCPos = _ref2.isNewRetailBCPos;
311
+
312
+ console.log(this.dto, 'dto==========');
313
+ this.paymode.checkList = [];
314
+ (0, _each3.default)(this.dto.RetailPaymentDetails, function (detail) {
315
+ var themode = (0, _find3.default)(_this4.paymode.paymodes, { 'idSettleStyle': detail.IdsettleStyle });
316
+ if (detail.SettleStyle.Code === PayStyle.hyczk && !themode) {
317
+ _tplusComponentsTouch.ModalWraper.info({
318
+ title: '温馨提示',
319
+ content: '没有储值结算方式,请在后台添加储值余额结算方式。',
320
+ okText: '确定',
321
+ okType: 'primary'
322
+ });
323
+ }
324
+ if (themode && themode.paymentType && themode.paymentType != PayStyle.hyczk) {
325
+ var newmode = (0, _extends3.default)({}, _this4.genNewMode(themode.paymentType, false, detail.Amount), {
326
+ authCode: detail.PaymentCode,
327
+ steadCashIntegral: detail.SteadCashIntegral,
328
+ overchargesAmount: detail.OverchargesAmount,
329
+ boriginReturn: true,
330
+ thirdPaymentReturnInfo: detail.ThirdPaymentReturnInfo
331
+ });
332
+ _this4.paymode.currentMode = newmode;
333
+ if (themode.paymentType == PayStyle.djq) {
334
+ (0, _each3.default)(_this4.dto.RetailCouponDetails, function (djq) {
335
+ if (isNewRetailBCPos) {
336
+ var _ref3 = djq || {},
337
+ displayText = _ref3.displayText,
338
+ promoRuleId = _ref3.promoRuleId,
339
+ dateMount = _ref3.dateMount,
340
+ promoMethodEnum = _ref3.promoMethodEnum,
341
+ discountPct = _ref3.discountPct,
342
+ promoId = _ref3.promoId,
343
+ id = _ref3.id;
344
+
345
+ _this4.addDjq(djq.CouponCode, djq.CouponTitle, true, null, djq.ReductionAmount, djq.EnableAmount, djq.LastTS, true, false, _this4.dto.Idmember, dateMount, displayText, promoMethodEnum, discountPct, promoId, promoRuleId, null, id, true);
346
+ return;
347
+ }
348
+ _this4.addDjq(djq.CouponCode, djq.CouponTitle, true, null, djq.ReductionAmount, djq.EnableAmount, djq.LastTS, true, false);
349
+ });
350
+ }
351
+ _this4.paymode.thePaymodes.push(newmode);
352
+ }
353
+ });
354
+ (0, _each3.default)(this.dto.RetailStorageDetails, function (detail) {
355
+ var balanceAmount = null;
356
+ var storageCardNo = null;
357
+ var meStorageCardId = null;
358
+ detail.DynamicPropertyKeys.forEach(function (ele, index) {
359
+ if (ele === "mestoragecard") {
360
+ balanceAmount = detail.DynamicPropertyValues[index].BalanceStorage - detail.StoragePaymentAmount;
361
+ storageCardNo = detail.DynamicPropertyValues[index].StorageCardNo;
362
+ meStorageCardId = detail.DynamicPropertyValues[index].MeStorageCardId;
363
+ }
364
+ });
365
+ var newmode = (0, _extends3.default)({}, _this4.genNewMode(PayStyle.hyczk, false, detail.StoragePaymentAmount), {
366
+ member: new Member(detail.Member ? detail.Member : null),
367
+ authCode: detail.Password ? detail.Password : null,
368
+ balance: balanceAmount,
369
+ boriginReturn: true,
370
+ meStorageCardId: meStorageCardId ? meStorageCardId : detail.MeStorageCardId,
371
+ storageCardNo: storageCardNo ? storageCardNo : detail.StorageCardNo
372
+ });
373
+ _this4.paymode.thePaymodes.push(newmode);
374
+ });
375
+ this.paymode.calcReserved();
376
+ }
377
+ }, {
378
+ key: 'clean',
379
+ value: function clean() {
380
+ this.bquick = false;
381
+ this.paymode.clean();
382
+ }
383
+ }, {
384
+ key: 'quickSettle',
385
+ value: function quickSettle(key) {
386
+ this.addPay(key, null, true);
387
+ }
388
+
389
+ //outer call
390
+ //(type===PayStyle.hyczk || type===PayStyle.jfczk || type===PayStyle.jfdx || type===PayStyle.djq)
391
+
392
+ }, {
393
+ key: 'changeFocusAndAddPay',
394
+ value: function changeFocusAndAddPay(type, bookType) {
395
+ var _this5 = this;
396
+
397
+ var _enumController$getEn3 = _mutantsUtil.enumController.getEnumOj(),
398
+ PayStyle = _enumController$getEn3.PayStyle;
399
+
400
+ this.paymode.currentFocus = type;
401
+ if (this.paymode.currentMode) {
402
+ if (type == PayStyle.jfdx) {
403
+ if (this.newStyle) {
404
+ var index = (0, _findIndex3.default)(this.paymode.thePaymodes, function (m) {
405
+ return m.paymentType == PayStyle.jfdx;
406
+ });
407
+ this.paymode.thePaymodes.splice(index, 1, this.paymode.currentMode);
408
+ this.paymode.calcReserved();
409
+ } else {
410
+ this.addPayDirectly(this.paymode.currentMode);
411
+ }
412
+
413
+ //抵现积分
414
+ this.SettlementApi.CalculdateIntegralSteadCash({ IntegralSteadCashParams: {
415
+ Idmember: this.paymode.currentMode.memberId,
416
+ TotalTaxAmount: this.paymode.amount,
417
+ BalanceTaxAmount: this.paymode.currentMode.value
418
+ } }).then(function (result) {
419
+ // this.paymode.currentMode.steadCashIntegral=result.Integral;
420
+ // this.paymode.currentMode.perIntegral=result.perIntegral;
421
+ // this.paymode.currentMode.cashAmount=result.cashAmount;
422
+ _this5.paymode.currentMode.integralCashOverOrderAmount = result.isIntegralCashOverOrderAmount;
423
+ _this5.paymode.currentMode.overchargesAmount = result.Amount - _this5.paymode.currentMode.value;
424
+ });
425
+ } else {
426
+ this.addPayDirectly(this.paymode.currentMode);
427
+ }
428
+ } else {
429
+ this.addPay(type, bookType);
430
+ }
431
+ }
432
+
433
+ // 设置密码后更新会员信息
434
+
435
+
436
+ // 查看会员卡信息
437
+
438
+ }, {
439
+ key: 'getLoginInfo',
440
+ value: function getLoginInfo() {
441
+ return _mutantsMicrofx.stores.user.options.get('loginInfo');
442
+ }
443
+ }, {
444
+ key: 'loadCzk',
445
+ value: function loadCzk(v, returnType) {
446
+ var _this6 = this;
447
+
448
+ if ((0, _trim3.default)(v) === "") {
449
+ (0, _mobx.runInAction)(function () {
450
+ _this6.paymode.currentMode.errinfo = "请输入储值卡";
451
+ });
452
+ return;
453
+ }
454
+ var isOnlyEnabled = returnType ? false : true; //非原单退货为false,其他true
455
+ return this.SettlementApi.getCardInfoByCardNo(v, isOnlyEnabled).then(function () {
456
+ var _ref4 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee(result) {
457
+ var data, m;
458
+ return _regenerator2.default.wrap(function _callee$(_context) {
459
+ while (1) {
460
+ switch (_context.prev = _context.next) {
461
+ case 0:
462
+ data = result.data;
463
+ m = data && data.length && data[0];
464
+
465
+ if (!(result && result.data.length)) {
466
+ _context.next = 25;
467
+ break;
468
+ }
469
+
470
+ if (!(result.data.length === 1)) {
471
+ _context.next = 14;
472
+ break;
473
+ }
474
+
475
+ if (!(m.CardTypeEnum === 'BALANCE_CARD')) {
476
+ _context.next = 10;
477
+ break;
478
+ }
479
+
480
+ _this6.paymode.updateCardInfo(m);
481
+ _this6.handleCzkData(m);
482
+ return _context.abrupt('return', result.data);
483
+
484
+ case 10:
485
+ _context.next = 12;
486
+ return _this6.SettlementApi.validateRetailStorageCard({ dto: _this6.dto, meStorageCardId: m.MeStorageCardId }).then(function (result1) {
487
+ var data1 = result1.data ? JSON.parse(result1.data)[0] : {};
488
+ if (data1.enable) {
489
+ _this6.paymode.updateCardInfo(m);
490
+ _this6.handleCzkData(m);
491
+ return result1.data;
492
+ } else {
493
+ _message2.default.warn(data1.disableReason);
494
+ }
495
+ });
496
+
497
+ case 12:
498
+ _context.next = 25;
499
+ break;
500
+
501
+ case 14:
502
+ if (!(result.data && result.data.length === 1)) {
503
+ _context.next = 19;
504
+ break;
505
+ }
506
+
507
+ _this6.paymode.updateCardInfo(result.data[0]);
508
+ return _context.abrupt('return', result.data);
509
+
510
+ case 19:
511
+ if (!(result.data && result.data.length > 1)) {
512
+ _context.next = 23;
513
+ break;
514
+ }
515
+
516
+ return _context.abrupt('return', result.data);
517
+
518
+ case 23:
519
+ _message2.default.warn('没有可用储值卡!');
520
+ return _context.abrupt('return', false);
521
+
522
+ case 25:
523
+ case 'end':
524
+ return _context.stop();
525
+ }
526
+ }
527
+ }, _callee, _this6);
528
+ }));
529
+
530
+ return function (_x) {
531
+ return _ref4.apply(this, arguments);
532
+ };
533
+ }());
534
+ }
535
+ }, {
536
+ key: 'addDjq',
537
+ value: function addDjq(promoCouponCode, name, IsEnable, nominalAmount, amount, doorsill, LastTS, checked, IsRepelWithPoints, UMemberID, expired, displayText, promoMethodEnum, discountPct, promoId, promoRuleId, couponCategoryEnum, id, unCheck, count) {
538
+ var djq = {
539
+ code: promoCouponCode,
540
+ promoCouponCode: promoCouponCode,
541
+ name: name,
542
+ IsEnable: IsEnable,
543
+ nominalAmount: nominalAmount,
544
+ amount: amount,
545
+ doorsill: doorsill, //:"无门槛"
546
+ LastTS: LastTS,
547
+ checked: checked,
548
+ IsRepelWithPoints: IsRepelWithPoints,
549
+ UMemberID: UMemberID,
550
+ expired: expired, //还剩多少过期
551
+ displayText: displayText,
552
+ promoMethodEnum: promoMethodEnum,
553
+ discountPct: discountPct,
554
+ promoId: promoId,
555
+ promoRuleId: promoRuleId,
556
+ couponCategoryEnum: couponCategoryEnum,
557
+ id: id,
558
+ count: count === 1 && (couponCategoryEnum === 'RIGUP' || couponCategoryEnum === 'UN_MATCH' || couponCategoryEnum === "PREPARING" || couponCategoryEnum === 'PROMO_LIMITED' || couponCategoryEnum === 'COUPON_CONFLICT') ? 1 : null
559
+ };
560
+ this.paymode.currentMode.djqs.push(djq);
561
+ // let copyData = _clonedeep(this.data[targetIndex]);
562
+ !unCheck && !this.boriginReturn && this.paymode.calcDjqValue(djq);
563
+ }
564
+ }, {
565
+ key: 'setCurrentMode',
566
+ value: function setCurrentMode(id, type, append) {
567
+ var _enumController$getEn4 = _mutantsUtil.enumController.getEnumOj(),
568
+ PayStyle = _enumController$getEn4.PayStyle;
569
+
570
+ var mode = (0, _find3.default)(this.paymode.thePaymodes, { paymethodId: id });
571
+ if (mode) {
572
+ this.paymode.currentMode = mode;
573
+ if (this.newStyle) {
574
+ this.afterSetCurrentMode(type);
575
+ }
576
+ } else {
577
+ this.paymode.currentMode = this.genNewMode(type, append);
578
+ this.afterSetCurrentMode(type);
579
+ }
580
+ }
581
+ }, {
582
+ key: 'afterSetCurrentMode',
583
+ value: function afterSetCurrentMode(type) {
584
+ var _this7 = this;
585
+
586
+ var _enumController$getEn5 = _mutantsUtil.enumController.getEnumOj(),
587
+ PayStyle = _enumController$getEn5.PayStyle;
588
+
589
+ if (type == PayStyle.djq) {
590
+ this.paymode.calcDjqValue();
591
+ } else if (type == PayStyle.jfdx) {
592
+ //获取可兑换的金额
593
+ if (this.newStyle) {
594
+ var themode = (0, _find3.default)(this.paymode.thePaymodes, { paymentType: PayStyle.jfdx });
595
+ if (themode && parseFloat(themode.value || 0) != 0) {
596
+ this.paymode.currentMode.value = themode.value;
597
+ }
598
+ }
599
+
600
+ //积分抵现不包含运费
601
+ var BuyerPayFreight = this.dto.BuyerPayFreight;
602
+ var DistributionMode = this.dto.DistributionMode;
603
+ var IdbusiType = this.dto.IdbusiType;
604
+
605
+ var _getLoginInfo2 = this.getLoginInfo(),
606
+ PreSellOrBook = _getLoginInfo2.PreSellOrBook,
607
+ PercentageWhenBook = _getLoginInfo2.PercentageWhenBook;
608
+
609
+ var value = 0;
610
+ if ((DistributionMode.Id == 'ELECTRONIC' || DistributionMode.Id == 'CITY_DISTRIBUTE') && BuyerPayFreight && BuyerPayFreight > 0) {
611
+ value = (0, _utils.getFixedNumber)(Math.Minus(this.paymode.amount, BuyerPayFreight));
612
+ } else if (IdbusiType == 38 && PreSellOrBook == 'BOOK' && PercentageWhenBook < 100 && (!DistributionMode.Id || DistributionMode.Id == 'ON_SITE_PICKUP')) {
613
+ //预订场景下:现场提货,且订金比例非100%时,积分抵现按全款计算(因为只有全款才能使用积分抵现)
614
+ value = this.paymode.bookMaxValue;
615
+ } else {
616
+ value = this.paymode.amount;
617
+ }
618
+
619
+ this.SettlementApi.CalculdateIntegralSteadCash({ IntegralSteadCashParams: {
620
+ Idmember: this.paymode.currentMode.memberId,
621
+ TotalTaxAmount: value,
622
+ BalanceTaxAmount: value
623
+ } }).then(function (result) {
624
+ _this7.paymode.currentMode.member.setExchangable(result.MaxAmount);
625
+ _this7.paymode.currentMode.perIntegral = result.perIntegral;
626
+ _this7.paymode.currentMode.cashAmount = result.cashAmount;
627
+ _this7.paymode.currentMode.integralCashOverOrderAmount = result.isIntegralCashOverOrderAmount;
628
+ _this7.updateEvent();
629
+ if (_this7.checkReceived(_this7.paymode.currentMode, "exchangable")) {
630
+ (0, _mobx.runInAction)(function () {
631
+ _this7.paymode.currentMode.errinfo = '余额不足';
632
+ });
633
+ }
634
+ });
635
+ }
636
+ }
637
+ }, {
638
+ key: 'checkReceived',
639
+ value: function checkReceived(mode, name) {
640
+ return !this.brefund && parseFloat(mode.value) > parseFloat(mode.maxamount || mode.member[name] || 0);
641
+ }
642
+ }, {
643
+ key: 'genNewMode',
644
+ value: function genNewMode(type, notwithm, v, isQuick) {
645
+ var _enumController$getEn6 = _mutantsUtil.enumController.getEnumOj(),
646
+ PayStyle = _enumController$getEn6.PayStyle;
647
+
648
+ var value = (0, _utils.getFixedNumber)(v || (this.brefund ? this.paymode.receivable : Math.max(this.paymode.receivable, 0)));
649
+ var themode = (0, _find3.default)(this.paymode.paymodes, { 'paymentType': type });
650
+ var memberId = this.member && this.member.ID ? this.member.ID : null;
651
+ var mode = (0, _mobx.observable)({
652
+ paymethodId: this.paymode.counter,
653
+ name: themode.name,
654
+ exchangeRate: themode.exchangeRate,
655
+ calDirection: themode.calDirection,
656
+ thridPayment: themode.thridPayment,
657
+ value: value,
658
+ value2: (0, _utils.getFixedNumber)(themode.calDirection == "88" ? value / themode.exchangeRate : value * themode.exchangeRate),
659
+ value3: value,
660
+ order: this.paymode.thePaymodes.length + 1,
661
+ paymentType: type,
662
+ djqs: [],
663
+ card: null,
664
+ memberId: !notwithm ? memberId : null,
665
+ member: new Member(!notwithm ? this.member : null),
666
+ authCode: '',
667
+ steadCashIntegral: null,
668
+ errinfo: '',
669
+ maxamount: this.paymode.amount,
670
+ virtualPay: themode.virtualPay
671
+ });
672
+ if (type == PayStyle.hyczk) {
673
+ if (!mode.storageCardNo) {
674
+ (0, _mobx.runInAction)(function () {
675
+ mode.errinfo = '未录入手机号或储值卡号';
676
+ });
677
+ } else if (this.checkReceived(mode, "balance")) {
678
+ (0, _mobx.runInAction)(function () {
679
+ mode.errinfo = '余额不足';
680
+ });
681
+ }
682
+ }
683
+ if (type == PayStyle.hyczk || type == PayStyle.jfdx || type == PayStyle.djq) {
684
+ this.setMaxAmount(type, mode);
685
+ }
686
+ console.log('\u5F53\u524D\u64CD\u4F5C\u7ED3\u7B97\u65B9\u5F0F\u4FE1\u606F:' + mode);
687
+ return mode;
688
+ }
689
+ }, {
690
+ key: 'setMaxAmount',
691
+ value: function setMaxAmount(type, mode) {
692
+ var _this8 = this;
693
+
694
+ var _enumController$getEn7 = _mutantsUtil.enumController.getEnumOj(),
695
+ PayStyle = _enumController$getEn7.PayStyle;
696
+
697
+ var sum = 0;
698
+ if (type == PayStyle.hyczk) {
699
+ (0, _each3.default)((0, _filter3.default)(this.paymode.thePaymodes, function (m) {
700
+ return m.paymentType == type;
701
+ }), function (q) {
702
+ sum = Math.Add(sum, q.value);
703
+ });
704
+ } else if (type == PayStyle.djq || type == PayStyle.jfdx) {
705
+ (0, _each3.default)((0, _filter3.default)(this.paymode.thePaymodes, function (m) {
706
+ return m.paymentType == PayStyle.djq || m.paymentType == PayStyle.jfdx;
707
+ }), function (q) {
708
+ sum = Math.Add(sum, q.value);
709
+ });
710
+ }
711
+
712
+ this.amountHandler && this.amountHandler(type).then(function () {
713
+ (0, _mobx.runInAction)(function () {
714
+
715
+ //预售储值结算应包含运费
716
+ var BuyerPayFreight = _this8.dto.BuyerPayFreight;
717
+ var DistributionMode = _this8.dto.DistributionMode;
718
+ var value = 0;
719
+ if ((DistributionMode.Id == 'ELECTRONIC' || DistributionMode.Id == 'CITY_DISTRIBUTE') && BuyerPayFreight && BuyerPayFreight > 0 && type == PayStyle.hyczk) {
720
+ value = (0, _utils.getFixedNumber)(parseFloat(_this8.context.viewModel.getViewItem('Voucher').availableAmount) + parseFloat(BuyerPayFreight));
721
+ } else {
722
+ value = _this8.context.viewModel.getViewItem('Voucher').availableAmount;
723
+ }
724
+ mode.maxamount = (0, _utils.getFixedNumber)(Math.Minus(value, sum));
725
+ _this8.updateEvent();
726
+ });
727
+ });
728
+ }
729
+ }, {
730
+ key: 'changeFocusOnly',
731
+ value: function changeFocusOnly(type) {
732
+ this.paymode.currentFocus = type;
733
+ }
734
+ }, {
735
+ key: 'changeClickFocusOnly',
736
+ value: function changeClickFocusOnly(type) {
737
+ this.paymode.currentFocus = type;
738
+ // 获取焦点时带入剩余的值
739
+ var mode = (0, _find3.default)(this.paymode.thePaymodes, { 'paymentType': type });
740
+ if (mode) {
741
+ var shouldSetValue = (0, _utils.getFixedNumber)(parseFloat(this.paymode.receivable) + parseFloat(mode.value));
742
+ mode.value = shouldSetValue;
743
+ mode.value2 = (0, _utils.getFixedNumber)(mode.calDirection == "88" ? shouldSetValue / mode.exchangeRate : shouldSetValue * mode.exchangeRate);
744
+ mode.value3 = shouldSetValue;
745
+ this.paymode.calcReserved('bookPay'); //参数multiPay代表复合结算
746
+ }
747
+ }
748
+ }, {
749
+ key: 'changeValue',
750
+ value: function changeValue(index, value, blur, type) {
751
+ var mode = (0, _find3.default)(this.paymode.thePaymodes, { 'paymethodId': index });
752
+ var v = blur ? (0, _utils.getFixedNumber)(value) : isNaN(value) && value != '-' ? 0.00 : value;
753
+ if (mode) {
754
+ if (mode.exchangeRate != 1) {
755
+ if ((0, _utils.getFixedNumber)(mode.calDirection == "88" ? mode.value3 / mode.exchangeRate : mode.value3 * mode.exchangeRate) != v) {
756
+ mode.value = (0, _utils.getFixedNumber)(mode.calDirection == "88" ? v * mode.exchangeRate : v / mode.exchangeRate);
757
+ } else {
758
+ mode.value = mode.value3;
759
+ }
760
+ mode.value2 = v;
761
+ } else {
762
+ mode.value = v;
763
+ mode.value2 = v;
764
+ }
765
+
766
+ this.paymode.calcReserved(type);
767
+ }
768
+ }
769
+ }, {
770
+ key: 'addPayDirectly',
771
+ value: function addPayDirectly(pay) {
772
+ var _enumController$getEn8 = _mutantsUtil.enumController.getEnumOj(),
773
+ PayStyle = _enumController$getEn8.PayStyle;
774
+
775
+ if (!(0, _find3.default)(this.paymode.thePaymodes, { paymethodId: pay.paymethodId })) {
776
+ var pos = this.paymode.thePaymodes.length;
777
+ if (pay.paymentType == PayStyle.hyczk) {
778
+ var index = (0, _findLastIndex3.default)(this.paymode.thePaymodes, function (m) {
779
+ return m.paymethodId != pay.paymethodId && m.paymentType == PayStyle.hyczk;
780
+ });
781
+ pos = index == -1 ? pos : index + 1;
782
+ }
783
+ // this.paymode.thePaymodes.push(pay);
784
+ this.paymode.thePaymodes.splice(pos, 0, pay);
785
+ }
786
+ this.paymode.calcReserved();
787
+ }
788
+ }, {
789
+ key: 'addPay',
790
+ value: function addPay(type, bookType, isQuick) {
791
+ var _enumController$getEn9 = _mutantsUtil.enumController.getEnumOj(),
792
+ PayStyle = _enumController$getEn9.PayStyle;
793
+
794
+ var pos = this.paymode.thePaymodes.length;
795
+ if (type == PayStyle.hyczk) {
796
+ var index = (0, _findLastIndex3.default)(this.paymode.thePaymodes, function (m) {
797
+ return m.paymentType == PayStyle.hyczk;
798
+ });
799
+ pos = index == -1 ? pos : index + 1;
800
+ }
801
+ this.paymode.thePaymodes.splice(pos, 0, this.genNewMode(type, this.newStyle && type == PayStyle.hyczk, undefined, isQuick));
802
+ this.paymode.calcReserved(bookType);
803
+ }
804
+ }, {
805
+ key: 'delPay',
806
+ value: function delPay(index, bookType) {
807
+ var _enumController$getEn10 = _mutantsUtil.enumController.getEnumOj(),
808
+ PayStyle = _enumController$getEn10.PayStyle;
809
+
810
+ (0, _remove3.default)(this.paymode.thePaymodes, function (mode) {
811
+ return mode.paymethodId === index;
812
+ });
813
+ this.paymode.currentFocus = -1;
814
+ this.paymode.calcReserved(bookType);
815
+ }
816
+
817
+ // 获取储值是否重复, 在commit方法中使用
818
+
819
+ }, {
820
+ key: 'findStorageBillValidate',
821
+ value: function findStorageBillValidate() {
822
+ var _this9 = this;
823
+
824
+ var _enumController$getEn11 = _mutantsUtil.enumController.getEnumOj(),
825
+ PayStyle = _enumController$getEn11.PayStyle;
826
+
827
+ (0, _mobx.runInAction)(function () {
828
+ _this9.dto.StorageMutiSettleDetails = [];
829
+ var thePaymodes = _this9.newStyle ? (0, _filter3.default)(_this9.paymode.thePaymodes, function (mode) {
830
+ return parseFloat(mode.value) != 0;
831
+ }) : _this9.paymode.thePaymodes;
832
+ (0, _each3.default)(thePaymodes, function (mode) {
833
+ var themode = (0, _find3.default)(_this9.paymode.paymodes, { 'paymentType': mode.paymentType });
834
+
835
+ var value = parseFloat(mode.value);
836
+ var giveChange = null;
837
+ if (mode.paymentType == PayStyle.xianjin && _this9.paymode.receivable < 0 && value > Math.abs(_this9.paymode.receivable)) {
838
+ value = Math.Add(value, _this9.paymode.receivable);
839
+ giveChange = Math.abs(_this9.paymode.receivable);
840
+ }
841
+ _this9.dto.StorageMutiSettleDetails.push({
842
+ Code: mode.paymethodId,
843
+ StorageAmount: value,
844
+ GiveChange: giveChange,
845
+ IdsettleStyle: themode.idSettleStyle,
846
+ IdbankAccount: themode.idBankAccount,
847
+ PaymentCode: mode.authCode,
848
+ DynamicPropertyKeys: [],
849
+ DynamicPropertyValues: [],
850
+ DataSource: { Id: _this9.dataSource }
851
+ });
852
+ });
853
+ });
854
+ return this.SettlementApi.findStorageBillValidate((0, _extends3.default)({}, this.dto));
855
+ }
856
+
857
+ //判断是否重复弹框
858
+
859
+ }, {
860
+ key: 'commit',
861
+ value: function () {
862
+ var _ref5 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2(bTest) {
863
+ var status, paylist, ret, _ref6, _ref6$data, code, returnMsg, state, ret1, ret2;
864
+
865
+ return _regenerator2.default.wrap(function _callee2$(_context2) {
866
+ while (1) {
867
+ switch (_context2.prev = _context2.next) {
868
+ case 0:
869
+ console.log('settlementStore.commit开始,参数:' + bTest);
870
+
871
+ if (!bTest) {
872
+ _context2.next = 3;
873
+ break;
874
+ }
875
+
876
+ return _context2.abrupt('return', _promise2.default.resolve(true));
877
+
878
+ case 3:
879
+ status = this.type;
880
+ _context2.prev = 4;
881
+ paylist = this.paymode.thePaymodes.filter(function (v) {
882
+ return !!v.thridPayment && Math.abs(v.value) > 0;
883
+ }) || [];
884
+
885
+ if (!(paylist && paylist.length > 1)) {
886
+ _context2.next = 9;
887
+ break;
888
+ }
889
+
890
+ _message2.default.warn('二开支付目前仅支持单一结算方式。');
891
+ return _context2.abrupt('return', _promise2.default.resolve(false));
892
+
893
+ case 9:
894
+ if (!(status == 1)) {
895
+ _context2.next = 31;
896
+ break;
897
+ }
898
+
899
+ _context2.next = 12;
900
+ return this.findStorageBillValidate();
901
+
902
+ case 12:
903
+ ret = _context2.sent;
904
+ _ref6 = ret || {}, _ref6$data = _ref6.data;
905
+ _ref6$data = _ref6$data === undefined ? {} : _ref6$data;
906
+ code = _ref6$data.code, returnMsg = _ref6$data.returnMsg;
907
+
908
+ if (!(code && code == 10001)) {
909
+ _context2.next = 24;
910
+ break;
911
+ }
912
+
913
+ _context2.next = 19;
914
+ return this.repeatStorageModal(returnMsg);
915
+
916
+ case 19:
917
+ state = _context2.sent;
918
+
919
+ if (!(state === false)) {
920
+ _context2.next = 22;
921
+ break;
922
+ }
923
+
924
+ return _context2.abrupt('return', _promise2.default.resolve(false));
925
+
926
+ case 22:
927
+ _context2.next = 29;
928
+ break;
929
+
930
+ case 24:
931
+ _context2.next = 26;
932
+ return this.saveMember();
933
+
934
+ case 26:
935
+ ret1 = _context2.sent;
936
+
937
+ if (!(ret1 === false)) {
938
+ _context2.next = 29;
939
+ break;
940
+ }
941
+
942
+ return _context2.abrupt('return', _promise2.default.resolve(false));
943
+
944
+ case 29:
945
+ _context2.next = 40;
946
+ break;
947
+
948
+ case 31:
949
+ _context2.next = 33;
950
+ return _mutantsMicrofx.stores.offlineSys.generatorCode(this.dto);
951
+
952
+ case 33:
953
+ _context2.next = 35;
954
+ return this.save();
955
+
956
+ case 35:
957
+ ret2 = _context2.sent;
958
+
959
+ if (!(ret2 === false)) {
960
+ _context2.next = 38;
961
+ break;
962
+ }
963
+
964
+ return _context2.abrupt('return', _promise2.default.resolve(false));
965
+
966
+ case 38:
967
+ _context2.next = 40;
968
+ return _mutantsMicrofx.stores.offlineSys.retailSequenceUpload();
969
+
970
+ case 40:
971
+ return _context2.abrupt('return', _promise2.default.resolve(true));
972
+
973
+ case 43:
974
+ _context2.prev = 43;
975
+ _context2.t0 = _context2['catch'](4);
976
+
977
+ console.error('settlementStore.commit失败,错误信息:' + _context2.t0);
978
+ //其他支付失败时,处理二开支付情况。
979
+ this.thirdPayRefund(status == 1 ? 2 : 1);
980
+ return _context2.abrupt('return', _promise2.default.resolve(_context2.t0));
981
+
982
+ case 48:
983
+ case 'end':
984
+ return _context2.stop();
985
+ }
986
+ }
987
+ }, _callee2, this, [[4, 43]]);
988
+ }));
989
+
990
+ function commit(_x2) {
991
+ return _ref5.apply(this, arguments);
992
+ }
993
+
994
+ return commit;
995
+ }()
996
+ }, {
997
+ key: 'handlePrint',
998
+ value: function handlePrint(resp) {
999
+ // 储值打印
1000
+ return (0, _tplusComponentsTouch.printDispatch)(_tplusComponentsTouch.DoNameList.DO_STORAGE_PRINT, resp, {});
1001
+ }
1002
+ }, {
1003
+ key: 'saveMember',
1004
+ value: function () {
1005
+ var _ref7 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee3() {
1006
+ var _this10 = this;
1007
+
1008
+ var _enumController$getEn12, PayStyle, TradeType, IPMSG, dtoParams, payList, payment, tradeType, ret, _ref8, type, data, msg, code;
1009
+
1010
+ return _regenerator2.default.wrap(function _callee3$(_context3) {
1011
+ while (1) {
1012
+ switch (_context3.prev = _context3.next) {
1013
+ case 0:
1014
+ _enumController$getEn12 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn12.PayStyle, TradeType = _enumController$getEn12.TradeType;
1015
+
1016
+ (0, _mobx.runInAction)(function () {
1017
+ _this10.dto.StorageMutiSettleDetails = [];
1018
+ var thePaymodes = _this10.newStyle ? (0, _filter3.default)(_this10.paymode.thePaymodes, function (mode) {
1019
+ return parseFloat(mode.value) != 0;
1020
+ }) : _this10.paymode.thePaymodes;
1021
+ (0, _each3.default)(thePaymodes, function (mode) {
1022
+ var themode = (0, _find3.default)(_this10.paymode.paymodes, { 'paymentType': mode.paymentType });
1023
+
1024
+ var value = parseFloat(mode.value);
1025
+ var giveChange = null;
1026
+ if (mode.paymentType == PayStyle.xianjin && _this10.paymode.receivable < 0 && value > Math.abs(_this10.paymode.receivable)) {
1027
+ value = Math.Add(value, _this10.paymode.receivable);
1028
+ giveChange = Math.abs(_this10.paymode.receivable);
1029
+ }
1030
+ _this10.dto.StorageMutiSettleDetails.push({
1031
+ Code: mode.paymethodId,
1032
+ StorageAmount: value,
1033
+ GiveChange: giveChange,
1034
+ IdsettleStyle: themode.idSettleStyle,
1035
+ IdbankAccount: themode.idBankAccount,
1036
+ PaymentCode: mode.authCode,
1037
+ DynamicPropertyKeys: [],
1038
+ DynamicPropertyValues: [],
1039
+ DataSource: { Id: _this10.dataSource },
1040
+ ThirdPaymentInfo: themode.thridPayment || null,
1041
+ ThirdPaymentReturnInfo: mode.thirdPaymentReturnInfo || null
1042
+ });
1043
+ });
1044
+ });
1045
+ // cc结算调用
1046
+ IPMSG = {};
1047
+
1048
+ if (!!window.localStorage.IPMSG) {
1049
+ IPMSG = JSON.parse(window.localStorage.IPMSG);
1050
+ }
1051
+ dtoParams = this.dto;
1052
+ //处理存在二开支付情况
1053
+
1054
+ payList = dtoParams.StorageMutiSettleDetails.filter(function (v) {
1055
+ return v.ThirdPaymentInfo;
1056
+ });
1057
+
1058
+ if (!(payList && payList.length > 0)) {
1059
+ _context3.next = 19;
1060
+ break;
1061
+ }
1062
+
1063
+ payment = payList[0];
1064
+ tradeType = payment && payment.StorageAmount > 0 ? TradeType.PAY : TradeType.REFUND;
1065
+ _context3.next = 11;
1066
+ return this.thirdPay(2, payment, tradeType, dtoParams);
1067
+
1068
+ case 11:
1069
+ ret = _context3.sent;
1070
+ _ref8 = ret || {}, type = _ref8.type, data = _ref8.data, msg = _ref8.msg, code = _ref8.code;
1071
+
1072
+ if (!(type === true)) {
1073
+ _context3.next = 17;
1074
+ break;
1075
+ }
1076
+
1077
+ dtoParams = data;
1078
+ _context3.next = 19;
1079
+ break;
1080
+
1081
+ case 17:
1082
+ _message2.default.warn('\u5237\u5361\u652F\u4ED8\u5931\u8D25,\u9519\u8BEF\u7801:' + code);
1083
+ return _context3.abrupt('return', false);
1084
+
1085
+ case 19:
1086
+ this.dtoParams = dtoParams;
1087
+ console.log('储值结算信息:', dtoParams);
1088
+ return _context3.abrupt('return', this.SettlementApi.INewRetailMemberStorageSave({ dto: dtoParams }).then(function (resp) {
1089
+ _this10.handlePrint(resp);
1090
+ }));
1091
+
1092
+ case 22:
1093
+ case 'end':
1094
+ return _context3.stop();
1095
+ }
1096
+ }
1097
+ }, _callee3, this);
1098
+ }));
1099
+
1100
+ function saveMember() {
1101
+ return _ref7.apply(this, arguments);
1102
+ }
1103
+
1104
+ return saveMember;
1105
+ }()
1106
+ }, {
1107
+ key: 'save',
1108
+ value: function () {
1109
+ var _ref9 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee4() {
1110
+ var _this11 = this;
1111
+
1112
+ var _enumController$getEn13, PayStyle, TradeType, IPMSG, RetailTypeEnum, _getLoginInfo3, PreSellOrBook, PercentageWhenBook, _ref10, IdbusiType, DistributionMode, prepaidAmount, fullPayment, dtoParams, payList, payment, tradeType, ret, _ref11, type, data, msg, code;
1113
+
1114
+ return _regenerator2.default.wrap(function _callee4$(_context4) {
1115
+ while (1) {
1116
+ switch (_context4.prev = _context4.next) {
1117
+ case 0:
1118
+ _enumController$getEn13 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn13.PayStyle, TradeType = _enumController$getEn13.TradeType;
1119
+
1120
+ (0, _mobx.runInAction)(function () {
1121
+ _this11.dto.RetailPaymentDetails = [];
1122
+ _this11.dto.RetailStorageDetails = [];
1123
+ _this11.dto.RetailCouponDetails = [];
1124
+ var czkSum = 0;
1125
+ var count = 0;
1126
+ var thePaymodes = _this11.newStyle ? (0, _filter3.default)(_this11.paymode.thePaymodes, function (mode) {
1127
+ return parseFloat(mode.value) != 0;
1128
+ }) : _this11.paymode.thePaymodes;
1129
+ (0, _each3.default)(thePaymodes, function (mode, index) {
1130
+ var themode = (0, _find3.default)(_this11.paymode.paymodes, { 'paymentType': mode.paymentType });
1131
+ if (mode.paymentType == PayStyle.hyczk) {
1132
+ czkSum = Math.Add(czkSum, mode.value);
1133
+ _this11.dto.RetailStorageDetails.push({
1134
+ Code: mode.paymethodId,
1135
+ MeStorageCardId: mode.meStorageCardId,
1136
+ StoragePaymentAmount: mode.value,
1137
+ IsOrigReturn: false,
1138
+ BalanceStorage: mode.balance,
1139
+ Idmember: mode.memberId,
1140
+ DynamicPropertyKeys: [],
1141
+ DynamicPropertyValues: [],
1142
+ DataSource: { Id: _this11.dataSource },
1143
+ Password: mode.authCode
1144
+ });
1145
+ } else {
1146
+ var value = parseFloat(mode.value);
1147
+ var giveChange = null;
1148
+ if (mode.paymentType == PayStyle.xianjin && _this11.paymode.receivable < 0 && value > Math.abs(_this11.paymode.receivable)) {
1149
+ value = Math.Add(value, _this11.paymode.receivable);
1150
+ giveChange = Math.abs(_this11.paymode.receivable);
1151
+ }
1152
+ _this11.dto.RetailPaymentDetails.push({
1153
+ Code: mode.paymethodId,
1154
+ OrigAmount: mode.exchangeRate != 1 ? mode.value2 : value,
1155
+ Amount: value,
1156
+ GiveChange: giveChange,
1157
+ IdsettleStyle: themode.idSettleStyle,
1158
+ IdbankAccount: themode.idBankAccount,
1159
+ Idcurrency: themode.idCurrency,
1160
+ ExchangeRate: themode.exchangeRate,
1161
+ PaymentCode: mode.authCode,
1162
+ SteadCashIntegral: mode.steadCashIntegral,
1163
+ OverchargesAmount: mode.overchargesAmount,
1164
+ DynamicPropertyKeys: [],
1165
+ DynamicPropertyValues: [],
1166
+ DataSource: { Id: _this11.dataSource },
1167
+ ThirdPaymentInfo: themode.thridPayment || null,
1168
+ SettleStyle: { Name: mode.name },
1169
+ ThirdPaymentReturnInfo: mode.thirdPaymentReturnInfo || null
1170
+ });
1171
+ if (mode.paymentType == PayStyle.djq) {
1172
+ (0, _each3.default)(_this11.paymode.checkList && _this11.paymode.checkList.length ? _this11.paymode.checkList : mode.djqs, function (djq) {
1173
+ _this11.dto.RetailCouponDetails.push({
1174
+ CouponCode: djq.promoCouponCode,
1175
+ ReductionAmount: djq.amount,
1176
+ EnableAmount: djq.doorsill,
1177
+ CouponTitle: djq.name,
1178
+ IdMember: djq.UMemberID ? mode.memberId : null,
1179
+ LastTS: djq.LastTS,
1180
+ PromotionId: djq.promoId,
1181
+ PromotionRuleId: djq.promoRuleId,
1182
+ PromoCouponAllocatedId: djq.id,
1183
+ DataSource: { Id: _this11.dataSource }
1184
+ });
1185
+ });
1186
+ }
1187
+ }
1188
+ });
1189
+ if (_this11.dto.RetailStorageDetails.length > 0) {
1190
+ var themode = (0, _find3.default)(_this11.paymode.paymodes, { 'paymentType': PayStyle.hyczk });
1191
+ _this11.dto.RetailPaymentDetails.push({
1192
+ Code: _this11.paymode.counter,
1193
+ OrigAmount: czkSum,
1194
+ Amount: czkSum,
1195
+ IdsettleStyle: themode.idSettleStyle,
1196
+ IdbankAccount: themode.idBankAccount,
1197
+ DynamicPropertyKeys: [],
1198
+ DynamicPropertyValues: [],
1199
+ DataSource: { Id: _this11.dataSource },
1200
+ RetailStorageDetails: _this11.dto.RetailStorageDetails
1201
+ });
1202
+ }
1203
+ });
1204
+ console.log('\u7ED3\u7B97\u6570\u636E\uFF1A', this.dto);
1205
+ // cc结算调用
1206
+ IPMSG = {};
1207
+
1208
+ if (!!window.localStorage.IPMSG) {
1209
+ IPMSG = JSON.parse(window.localStorage.IPMSG);
1210
+ }
1211
+ RetailTypeEnum = this.dto.IdbusiType == 36 ? "INTEGRAL_EXCHANGE" : "NORMAL";
1212
+ _getLoginInfo3 = this.getLoginInfo(), PreSellOrBook = _getLoginInfo3.PreSellOrBook, PercentageWhenBook = _getLoginInfo3.PercentageWhenBook;
1213
+ _ref10 = this.dto || {}, IdbusiType = _ref10.IdbusiType, DistributionMode = _ref10.DistributionMode;
1214
+
1215
+ if (IdbusiType == 38 && PreSellOrBook == 'BOOK' && PercentageWhenBook < 100 && (!DistributionMode.Id || DistributionMode.Id == 'ON_SITE_PICKUP')) {
1216
+ prepaidAmount = (0, _utils.getFixedNumber)(this.dto.RetailPaymentDetails.reduce(function (c, item) {
1217
+ return c + (item.Amount || 0);
1218
+ }, 0));
1219
+ fullPayment = (0, _utils.getFixedNumber)(this.dto.RetailDetails.reduce(function (c, item) {
1220
+ return c + (item.TaxAmount || 0);
1221
+ }, 0));
1222
+
1223
+ this.isFull = fullPayment == prepaidAmount; // 是否全款
1224
+ (0, _mobx.runInAction)(function () {
1225
+ _this11.dto.PrepaidAmount = prepaidAmount;
1226
+ });
1227
+ }
1228
+ _context4.t1 = this.dto.IdbusiType == 37;
1229
+
1230
+ if (!_context4.t1) {
1231
+ _context4.next = 14;
1232
+ break;
1233
+ }
1234
+
1235
+ _context4.next = 13;
1236
+ return this.checkIntegralExchangeReturn(this.dto.RetailDetails[0].ReturnSourceId);
1237
+
1238
+ case 13:
1239
+ _context4.t1 = _context4.sent;
1240
+
1241
+ case 14:
1242
+ _context4.t0 = _context4.t1;
1243
+
1244
+ if (_context4.t0) {
1245
+ _context4.next = 17;
1246
+ break;
1247
+ }
1248
+
1249
+ _context4.t0 = this.dto.IdbusiType != 37;
1250
+
1251
+ case 17:
1252
+ if (!_context4.t0) {
1253
+ _context4.next = 36;
1254
+ break;
1255
+ }
1256
+
1257
+ dtoParams = (0, _extends3.default)({}, this.dto.cut(), { RetailOms: { RetailTypeEnum: RetailTypeEnum } });
1258
+ //处理存在二开支付情况
1259
+
1260
+ payList = dtoParams.RetailPaymentDetails.filter(function (v) {
1261
+ return v.ThirdPaymentInfo;
1262
+ });
1263
+
1264
+ if (!(payList && payList.length > 0)) {
1265
+ _context4.next = 33;
1266
+ break;
1267
+ }
1268
+
1269
+ payment = payList[0];
1270
+ tradeType = payment && payment.Amount > 0 ? TradeType.PAY : TradeType.REFUND;
1271
+ _context4.next = 25;
1272
+ return this.thirdPay(1, payment, tradeType, dtoParams);
1273
+
1274
+ case 25:
1275
+ ret = _context4.sent;
1276
+ _ref11 = ret || {}, type = _ref11.type, data = _ref11.data, msg = _ref11.msg, code = _ref11.code;
1277
+
1278
+ if (!(type === true)) {
1279
+ _context4.next = 31;
1280
+ break;
1281
+ }
1282
+
1283
+ dtoParams = data;
1284
+ _context4.next = 33;
1285
+ break;
1286
+
1287
+ case 31:
1288
+ _message2.default.warn('\u5237\u5361\u652F\u4ED8\u5931\u8D25,\u9519\u8BEF\u7801:' + code);
1289
+ return _context4.abrupt('return', false);
1290
+
1291
+ case 33:
1292
+ this.dtoParams = dtoParams;
1293
+ console.log('结算信息:', dtoParams);
1294
+ return _context4.abrupt('return', this.SettlementApi.retailPosSettle({
1295
+ dto: dtoParams,
1296
+ cip: IPMSG.query || "",
1297
+ longitude: IPMSG.longitude || "",
1298
+ latitude: IPMSG.latitude || ""
1299
+ }).then(function (resp) {
1300
+ var _ref12 = resp || {},
1301
+ ID = _ref12.ID;
1302
+
1303
+ _this11.setDtoID(ID);
1304
+ _this11.billID = ID;
1305
+ _this11.paymode.checkList = [];
1306
+ }));
1307
+
1308
+ case 36:
1309
+ case 'end':
1310
+ return _context4.stop();
1311
+ }
1312
+ }
1313
+ }, _callee4, this);
1314
+ }));
1315
+
1316
+ function save() {
1317
+ return _ref9.apply(this, arguments);
1318
+ }
1319
+
1320
+ return save;
1321
+ }()
1322
+
1323
+ //裁剪二开支付数据
1324
+
1325
+ }, {
1326
+ key: 'removeThirdPayDto',
1327
+ value: function removeThirdPayDto(dto) {
1328
+ var data = (0, _extends3.default)({}, dto);
1329
+ delete data['DynamicPropertyKeys'];
1330
+ delete data['DynamicPropertyValues'];
1331
+ return data;
1332
+ }
1333
+
1334
+ /**
1335
+ * 二开支付
1336
+ * vType:1零售单、2储值单
1337
+ * payment:结算方式
1338
+ * trade:00表示结算、02表示退款
1339
+ * dto:结算数据集合
1340
+ */
1341
+
1342
+ }, {
1343
+ key: 'thirdPay',
1344
+ value: function () {
1345
+ var _ref13 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee5(vType, payment, trade, dto) {
1346
+ var cto, params, ret, _ref14, Code, _Message, Result, _ref15, ThirdPaymentReturnInfo;
1347
+
1348
+ return _regenerator2.default.wrap(function _callee5$(_context5) {
1349
+ while (1) {
1350
+ switch (_context5.prev = _context5.next) {
1351
+ case 0:
1352
+ _context5.prev = 0;
1353
+ cto = this.removeThirdPayDto(dto);
1354
+ params = { VoucherType: vType, Payment: payment, TradeType: trade, dto: cto };
1355
+
1356
+ console.log('刷卡信息:', (0, _stringify2.default)(params));
1357
+ _context5.next = 6;
1358
+ return new _promise2.default(function (resolve, reject) {
1359
+ _mutantsMicrofx.nativeMs.setIpcRendererMethod('ThirdPayment', (0, _extends3.default)({}, params), function (res) {
1360
+ return resolve(res);
1361
+ });
1362
+ });
1363
+
1364
+ case 6:
1365
+ ret = _context5.sent;
1366
+
1367
+ console.log('刷卡返回信息:', ret);
1368
+ ret = JSON.parse(ret);
1369
+ _ref14 = ret || {}, Code = _ref14.Code, _Message = _ref14.Message, Result = _ref14.Result;
1370
+
1371
+ if (!(Code > 0)) {
1372
+ _context5.next = 14;
1373
+ break;
1374
+ }
1375
+
1376
+ return _context5.abrupt('return', { type: false, data: null, msg: _Message, code: Code });
1377
+
1378
+ case 14:
1379
+ if (!(trade == '00')) {
1380
+ _context5.next = 20;
1381
+ break;
1382
+ }
1383
+
1384
+ _ref15 = Result || {}, ThirdPaymentReturnInfo = _ref15.ThirdPaymentReturnInfo;
1385
+
1386
+ if (vType == 1) {
1387
+ dto.RetailPaymentDetails.forEach(function (v) {
1388
+ if (v.ThirdPaymentInfo != null && Math.abs(v.Amount) > 0) {
1389
+ v.ThirdPaymentReturnInfo = ThirdPaymentReturnInfo;
1390
+ }
1391
+ });
1392
+ } else if (vType == 2) {
1393
+ dto.StorageMutiSettleDetails.forEach(function (v) {
1394
+ if (v.ThirdPaymentInfo != null && Math.abs(v.StorageAmount) > 0) {
1395
+ v.ThirdPaymentReturnInfo = ThirdPaymentReturnInfo;
1396
+ }
1397
+ });
1398
+ }
1399
+ return _context5.abrupt('return', { type: true, data: dto, msg: _Message, code: Code });
1400
+
1401
+ case 20:
1402
+ if (!(trade == '02')) {
1403
+ _context5.next = 22;
1404
+ break;
1405
+ }
1406
+
1407
+ return _context5.abrupt('return', { type: true, data: dto, msg: _Message, code: Code });
1408
+
1409
+ case 22:
1410
+ _context5.next = 27;
1411
+ break;
1412
+
1413
+ case 24:
1414
+ _context5.prev = 24;
1415
+ _context5.t0 = _context5['catch'](0);
1416
+ return _context5.abrupt('return', { type: false, data: null, msg: _context5.t0, code: '9999' });
1417
+
1418
+ case 27:
1419
+ case 'end':
1420
+ return _context5.stop();
1421
+ }
1422
+ }
1423
+ }, _callee5, this, [[0, 24]]);
1424
+ }));
1425
+
1426
+ function thirdPay(_x3, _x4, _x5, _x6) {
1427
+ return _ref13.apply(this, arguments);
1428
+ }
1429
+
1430
+ return thirdPay;
1431
+ }()
1432
+
1433
+ //二开支付强制退款情况
1434
+
1435
+ }, {
1436
+ key: 'thirdPayRefund',
1437
+ value: function () {
1438
+ var _ref16 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee7(type) {
1439
+ var _this12 = this;
1440
+
1441
+ var dto, pay, payment, _enumController$getEn14, TradeType;
1442
+
1443
+ return _regenerator2.default.wrap(function _callee7$(_context7) {
1444
+ while (1) {
1445
+ switch (_context7.prev = _context7.next) {
1446
+ case 0:
1447
+ dto = type == 1 ? this.dtoParams.RetailPaymentDetails : this.dtoParams.StorageMutiSettleDetails;
1448
+ pay = dto && dto.filter(function (v) {
1449
+ return v.ThirdPaymentInfo;
1450
+ });
1451
+
1452
+ if (pay && pay.length > 0) {
1453
+ setTimeout(function () {
1454
+ _message2.default.warn("支付出现异常,将发起刷卡退款。", { duration: 4.5 });
1455
+ }, 1000);
1456
+ payment = pay[0];
1457
+ _enumController$getEn14 = _mutantsUtil.enumController.getEnumOj(), TradeType = _enumController$getEn14.TradeType;
1458
+
1459
+ setTimeout((0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee6() {
1460
+ var ret, _ref18, msg;
1461
+
1462
+ return _regenerator2.default.wrap(function _callee6$(_context6) {
1463
+ while (1) {
1464
+ switch (_context6.prev = _context6.next) {
1465
+ case 0:
1466
+ _context6.next = 2;
1467
+ return _this12.thirdPay(type, payment, TradeType.REFUND, dto);
1468
+
1469
+ case 2:
1470
+ ret = _context6.sent;
1471
+ _ref18 = ret || {}, msg = _ref18.msg;
1472
+
1473
+ console.log('\u5237\u5361\u652F\u4ED8\u9000\u6B3E:' + msg);
1474
+
1475
+ case 5:
1476
+ case 'end':
1477
+ return _context6.stop();
1478
+ }
1479
+ }
1480
+ }, _callee6, _this12);
1481
+ })), 4500);
1482
+ }
1483
+
1484
+ case 3:
1485
+ case 'end':
1486
+ return _context7.stop();
1487
+ }
1488
+ }
1489
+ }, _callee7, this);
1490
+ }));
1491
+
1492
+ function thirdPayRefund(_x7) {
1493
+ return _ref16.apply(this, arguments);
1494
+ }
1495
+
1496
+ return thirdPayRefund;
1497
+ }()
1498
+ }, {
1499
+ key: 'setDtoID',
1500
+ value: function setDtoID(id) {
1501
+ this.context.viewModel.data.ID = id;
1502
+ }
1503
+ }, {
1504
+ key: 'querySettleResult',
1505
+ value: function () {
1506
+ var _ref19 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee8() {
1507
+ return _regenerator2.default.wrap(function _callee8$(_context8) {
1508
+ while (1) {
1509
+ switch (_context8.prev = _context8.next) {
1510
+ case 0:
1511
+ _context8.prev = 0;
1512
+ _context8.t0 = _promise2.default;
1513
+ _context8.next = 4;
1514
+ return this.SettlementApi.QuerySettleResult({ RetailCode: this.dto.Code });
1515
+
1516
+ case 4:
1517
+ _context8.t1 = _context8.sent;
1518
+ return _context8.abrupt('return', _context8.t0.resolve.call(_context8.t0, _context8.t1));
1519
+
1520
+ case 8:
1521
+ _context8.prev = 8;
1522
+ _context8.t2 = _context8['catch'](0);
1523
+ return _context8.abrupt('return', _promise2.default.resolve({ Flag: "1" }));
1524
+
1525
+ case 11:
1526
+ case 'end':
1527
+ return _context8.stop();
1528
+ }
1529
+ }
1530
+ }, _callee8, this, [[0, 8]]);
1531
+ }));
1532
+
1533
+ function querySettleResult() {
1534
+ return _ref19.apply(this, arguments);
1535
+ }
1536
+
1537
+ return querySettleResult;
1538
+ }()
1539
+ }, {
1540
+ key: 'setCookie',
1541
+ value: function setCookie(key, val) {
1542
+ var exp = new Date();
1543
+ exp.setTime((0, _moment2.default)().endOf('day').valueOf());
1544
+ document.cookie = key + '=' + val + ';expires=' + exp.toGMTString();
1545
+ }
1546
+ }, {
1547
+ key: 'getAllCookies',
1548
+ value: function getAllCookies() {
1549
+ var cookies = document.cookie.split(/;\s/g);
1550
+ var cookieObj = {};
1551
+ cookies.forEach(function (item) {
1552
+ var key = item.split('=')[0];
1553
+ cookieObj[key] = item.split('=')[1];
1554
+ });
1555
+ return cookieObj;
1556
+ }
1557
+ }, {
1558
+ key: 'validePwd',
1559
+ value: function () {
1560
+ var _ref20 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee9(value) {
1561
+ var _ref21, isNewRetailBCPos, cook1, cook2, message, memberStorageId, _paymode$currentMode, cardTypeEnum, memberId, meStorageCardId, cardStatusEnum, checkPaymentPasswordParams, checkPaymentPasswordId, result, count, _result;
1562
+
1563
+ return _regenerator2.default.wrap(function _callee9$(_context9) {
1564
+ while (1) {
1565
+ switch (_context9.prev = _context9.next) {
1566
+ case 0:
1567
+ _ref21 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref21.isNewRetailBCPos;
1568
+ _context9.prev = 1;
1569
+
1570
+ if (!isNewRetailBCPos) {
1571
+ _context9.next = 23;
1572
+ break;
1573
+ }
1574
+
1575
+ cook1 = this.getAllCookies()['errorPwd'];
1576
+ cook2 = cook1 && JSON.parse(cook1);
1577
+ message = '密码输入错误';
1578
+ memberStorageId = this.paymode.currentMode.meStorageCardId;
1579
+
1580
+ if (!cook2) {
1581
+ _context9.next = 12;
1582
+ break;
1583
+ }
1584
+
1585
+ if (!cook2.hasOwnProperty(memberStorageId + "")) {
1586
+ _context9.next = 12;
1587
+ break;
1588
+ }
1589
+
1590
+ if (!(cook2[memberStorageId] > 3)) {
1591
+ _context9.next = 12;
1592
+ break;
1593
+ }
1594
+
1595
+ message = '今日密码错误已达上限,不可使用储值消费,请明日再试,如忘记请重置密码或修改密码。';
1596
+ return _context9.abrupt('return', _promise2.default.resolve(message));
1597
+
1598
+ case 12:
1599
+ _paymode$currentMode = this.paymode.currentMode, cardTypeEnum = _paymode$currentMode.cardTypeEnum, memberId = _paymode$currentMode.memberId, meStorageCardId = _paymode$currentMode.meStorageCardId, cardStatusEnum = _paymode$currentMode.cardStatusEnum;
1600
+ checkPaymentPasswordParams = {};
1601
+ checkPaymentPasswordId = null;
1602
+
1603
+ if (cardTypeEnum === 'BALANCE_CARD') {
1604
+ checkPaymentPasswordParams = {
1605
+ md5Password: _tplusApi.User.pwdEncrypt(value.pwd),
1606
+ cardType: cardTypeEnum
1607
+ };
1608
+ checkPaymentPasswordId = memberId;
1609
+ } else {
1610
+ if (cardStatusEnum === 'BINDING' && this.member && this.member.ID === memberId) {
1611
+ checkPaymentPasswordParams = {
1612
+ md5Password: _tplusApi.User.pwdEncrypt(value.pwd),
1613
+ password: value.pwd,
1614
+ cardType: cardTypeEnum
1615
+ };
1616
+ checkPaymentPasswordId = meStorageCardId;
1617
+ } else {
1618
+ checkPaymentPasswordParams = {
1619
+ password: value.pwd,
1620
+ cardType: cardTypeEnum
1621
+ };
1622
+ checkPaymentPasswordId = meStorageCardId;
1623
+ }
1624
+ }
1625
+ _context9.next = 18;
1626
+ return this.SettlementApi.checkPaymentPassword(checkPaymentPasswordParams, checkPaymentPasswordId);
1627
+
1628
+ case 18:
1629
+ result = _context9.sent;
1630
+
1631
+ if (!result.data) {
1632
+ if (cook2) {
1633
+ if (cook2.hasOwnProperty(memberStorageId + "")) {
1634
+ count = cook2[memberStorageId];
1635
+
1636
+ cook2[memberStorageId] = count + 1;
1637
+ } else {
1638
+ cook2[memberStorageId] = 1;
1639
+ }
1640
+ } else {
1641
+ cook2 = {};
1642
+ cook2[memberStorageId] = 1;
1643
+ }
1644
+ this.setCookie('errorPwd', '', -1);
1645
+ this.setCookie('errorPwd', (0, _stringify2.default)(cook2));
1646
+ }
1647
+ return _context9.abrupt('return', _promise2.default.resolve(result.data ? "" : message));
1648
+
1649
+ case 23:
1650
+ _context9.next = 25;
1651
+ return this.SettlementApi.CheckoutMemberPassword({ "CheckoutParams": {
1652
+ "Idmember": value.id,
1653
+ "Password": value.pwd
1654
+ } });
1655
+
1656
+ case 25:
1657
+ _result = _context9.sent;
1658
+ return _context9.abrupt('return', _promise2.default.resolve(_result.Success ? "" : _result.Message));
1659
+
1660
+ case 27:
1661
+ _context9.next = 32;
1662
+ break;
1663
+
1664
+ case 29:
1665
+ _context9.prev = 29;
1666
+ _context9.t0 = _context9['catch'](1);
1667
+ return _context9.abrupt('return', "failed");
1668
+
1669
+ case 32:
1670
+ case 'end':
1671
+ return _context9.stop();
1672
+ }
1673
+ }
1674
+ }, _callee9, this, [[1, 29]]);
1675
+ }));
1676
+
1677
+ function validePwd(_x8) {
1678
+ return _ref20.apply(this, arguments);
1679
+ }
1680
+
1681
+ return validePwd;
1682
+ }()
1683
+ }]);
1684
+ return SettlementStore;
1685
+ }(), _initialiseProps = function _initialiseProps() {
1686
+ var _this13 = this;
1687
+
1688
+ this.paymode = null;
1689
+ this.dto = null;
1690
+ this.dtoParams = null;
1691
+ this.member = null;
1692
+ this.brefund = false;
1693
+ this.bquick = false;
1694
+ this.boriginReturn = false;
1695
+
1696
+ _initDefineProp(this, 'newStyle', _descriptor, this);
1697
+
1698
+ this.isFull = true;
1699
+ this.isCanSettleOnQuickKey = true;
1700
+
1701
+ this.setCanSettleOnQuickKey = function (value) {
1702
+ _this13.isCanSettleOnQuickKey = value;
1703
+ };
1704
+
1705
+ _initDefineProp(this, 'setNewStyle', _descriptor2, this);
1706
+
1707
+ _initDefineProp(this, 'queryPwd', _descriptor3, this);
1708
+
1709
+ _initDefineProp(this, 'updateMemberInfo', _descriptor4, this);
1710
+
1711
+ _initDefineProp(this, 'updateCurrentMode', _descriptor5, this);
1712
+
1713
+ _initDefineProp(this, 'updateCardInfo', _descriptor6, this);
1714
+
1715
+ this.handleCzkData = function (m) {
1716
+ if (!m || !m.StorageCardNo) {
1717
+ (0, _mobx.runInAction)(function () {
1718
+ _this13.paymode.currentMode.errinfo = "无效的会员卡号";
1719
+ });
1720
+ } else {
1721
+ (0, _mobx.runInAction)(function () {
1722
+ _this13.paymode.currentMode.errinfo = "";
1723
+ _this13.paymode.currentMode.memberId = m.ID;
1724
+ _this13.paymode.currentMode.value = (0, _utils.getFixedNumber)(_this13.brefund ? _this13.paymode.receivable : Math.max(_this13.paymode.receivable, 0));
1725
+ _this13.updateEvent();
1726
+ var message = '';
1727
+ var sum = (0, _reduce3.default)(_this13.paymode.thePaymodes, function (total, cur) {
1728
+ return total + cur.value;
1729
+ }, 0);
1730
+ // 对于卡不用判断会员的一些信息
1731
+ // if (global.CheckMemberStorageProcessorBlock ) {
1732
+ // message= CheckMemberStorageProcessorBlock.execute(m);
1733
+ // }
1734
+ if (!String.isNullOrEmpty(message)) {
1735
+ _this13.paymode.currentMode.errinfo = message;
1736
+ } else if (_this13.checkReceived(_this13.paymode.currentMode, "balance")) {
1737
+ _this13.paymode.currentMode.errinfo = "余额不足";
1738
+ } else if (_this13.paymode.amount > 0 && parseFloat(_this13.paymode.amount) !== sum && _this13.paymode.currentMode.value == 0) {
1739
+ _this13.paymode.currentMode.errinfo = "实收金额必须录入";
1740
+ } else {
1741
+ // 查询成功后将焦点移入下一个输入框
1742
+ setTimeout(function () {
1743
+ var nextInput = document.querySelector('.czk .received .input');
1744
+ nextInput && nextInput.select();
1745
+ }, 300);
1746
+ }
1747
+ });
1748
+ }
1749
+ };
1750
+
1751
+ this.getCouponList = function (coupon_code) {
1752
+ var _enumController$getEn15 = _mutantsUtil.enumController.getEnumOj(),
1753
+ PayStyle = _enumController$getEn15.PayStyle,
1754
+ Differentiate = _enumController$getEn15.Differentiate;
1755
+
1756
+ var couponApplyRule = (0, _tplusPoslogin.PosInitData)('CouponApplyRule');
1757
+
1758
+ var _enumController$getEn16 = _mutantsUtil.enumController.getEnumOj(),
1759
+ CouponApplyRule = _enumController$getEn16.CouponApplyRule;
1760
+
1761
+ if (couponApplyRule == CouponApplyRule.SHOWN_BY_CUSTOMER && !!coupon_code || couponApplyRule != CouponApplyRule.SHOWN_BY_CUSTOMER) {
1762
+ var dto = _this13.dto;
1763
+ var promoVoucher = {};
1764
+ _this13.paymode.clearDjqs();
1765
+ _this13.paymode.reCalculationDjqs();
1766
+ promoVoucher.coupon_code = coupon_code || "";
1767
+ promoVoucher.boName = "Retail";
1768
+ promoVoucher.voucherId = dto.ID;
1769
+ var onlinePaymentAmount = 0;
1770
+ if (dto.OnlinePaymentAmount) {
1771
+ onlinePaymentAmount = dto.OnlinePaymentAmount;
1772
+ }
1773
+ promoVoucher.promoLinks = (0, _filter3.default)(_this13.paymode.currentMode.djqs, function (djq) {
1774
+ return djq.checked;
1775
+ });
1776
+ promoVoucher.totalAmountWithTax = Math.Minus(dto.TotalTaxAmount, onlinePaymentAmount);
1777
+ promoVoucher.redBlueFlagEnum = "BLUE";
1778
+ promoVoucher.meMemberId = dto.Idmember;
1779
+ promoVoucher.storeFactorId = dto.Idstore;
1780
+ promoVoucher.voucherDetailList = [];
1781
+ dto.RetailDetails.forEach(function (item) {
1782
+ var detailDTO = {};
1783
+ detailDTO.uuid = item.Code;
1784
+ detailDTO.detailBoName = "RetailDetail";
1785
+ detailDTO.voucherDetailId = item.ID;
1786
+ detailDTO.productId = item.Idinventory;
1787
+ detailDTO.uomId = item.Idunit;
1788
+ detailDTO.productSpecId = item.ProductSpecId;
1789
+ detailDTO.isManualFreeGift = item.IsPresent;
1790
+ detailDTO.isListPriceIncludingTax = item.TaxFlag || true;
1791
+ detailDTO.IsManualChangePrice = item.IsManualChangePrice;
1792
+ // if(detailDTO.IsManualChangePrice)//如果是手工改价
1793
+ // {
1794
+ // detailDTO.listPrice = item.TaxPrice;
1795
+ // detailDTO.netAmountWithTax = item.TaxAmount;
1796
+ // }
1797
+ // else
1798
+ // {
1799
+ var bookingQuantity = 0;
1800
+ if (item.BookingQuantity) {
1801
+ bookingQuantity = item.BookingQuantity;
1802
+ }
1803
+ detailDTO.listPrice = JSON.getCellValue(item, "listPrice");
1804
+ detailDTO.netAmountWithTax = Math.Multiply(detailDTO.listPrice, Math.Minus(item.Quantity, bookingQuantity)); //item.TaxAmount;
1805
+ //}
1806
+ detailDTO.taxRate = item.TaxRate;
1807
+ detailDTO.quantity = item.Quantity;
1808
+
1809
+ detailDTO.amountWithTax = item.RetailAmount;
1810
+ // 促销 start
1811
+ if (item.PromotionDetails && item.PromotionDetails.length != 0) {
1812
+ var promoLinks = [];
1813
+ item.PromotionDetails.forEach(function (promotion) {
1814
+ promoLinks.push({
1815
+ promoId: promotion.IdSalesPromotionDTO,
1816
+ promoRuleId: promotion.PromotionRuleId
1817
+ });
1818
+ });
1819
+ if (promoLinks.length != 0) detailDTO.promoLinks = promoLinks;
1820
+ }
1821
+ // 促销 end
1822
+ promoVoucher.voucherDetailList.push(detailDTO);
1823
+ });
1824
+ return _this13.SettlementApi.findUsefulCouponPromoList(promoVoucher).then(function (result) {
1825
+ if (result && result.length != 0) {
1826
+ result.forEach(function (element) {
1827
+ var _ref22 = element || {},
1828
+ couponCode = _ref22.couponCode,
1829
+ name = _ref22.name,
1830
+ tieredAmountResult = _ref22.tieredAmountResult,
1831
+ fromDate = _ref22.fromDate,
1832
+ dateMount = _ref22.dateMount,
1833
+ promoMethodEnum = _ref22.promoMethodEnum,
1834
+ discountPct = _ref22.discountPct,
1835
+ nominalAmount = _ref22.nominalAmount,
1836
+ promoId = _ref22.promoId,
1837
+ id = _ref22.id;
1838
+
1839
+ var condValue = tieredAmountResult.condValue,
1840
+ promoDiscount = tieredAmountResult.promoDiscount,
1841
+ displayText = tieredAmountResult.displayText,
1842
+ promoRuleId = tieredAmountResult.promoRuleId,
1843
+ couponCategoryEnum = tieredAmountResult.couponCategoryEnum;
1844
+
1845
+ if (result.IsRepelWithPoints && (0, _find3.default)(_this13.paymode.thePaymodes, function (themode) {
1846
+ return themode.paymentType == PayStyle.jfdx;
1847
+ })) {
1848
+ _message2.default.error(Differentiate.COUPON + '\uFF08' + result.SN + '\uFF09\u4E0D\u53EF\u4E0E\u79EF\u5206\u4E00\u8D77\u4F7F\u7528');
1849
+ } else {
1850
+ var IsEnable = couponCategoryEnum === 'RIGUP' || couponCategoryEnum === 'UN_MATCH' || couponCategoryEnum === "PREPARING" || couponCategoryEnum === 'PROMO_LIMITED' || couponCategoryEnum === 'COUPON_CONFLICT' ? false : true;
1851
+ _this13.addDjq(couponCode, name, IsEnable, promoMethodEnum == "CASH_COUPON" && nominalAmount, promoDiscount, condValue, null, false, !result.IsRepelWithPoints, dto.Idmember, dateMount, displayText, promoMethodEnum, discountPct, promoId, promoRuleId, couponCategoryEnum, id, true, 1);
1852
+ }
1853
+ });
1854
+ if (promoVoucher.coupon_code) {
1855
+ _this13.paymode.calcDjqCheckValue(_this13.paymode.currentMode.djqs[0], _this13.dto, 'single');
1856
+ }
1857
+ } else {
1858
+ if (promoVoucher.coupon_code) {
1859
+ _message2.default.info(Differentiate.COUPON + '\u53F7\u4E0D\u5B58\u5728\uFF01');
1860
+ _this13.getCouponList();
1861
+ } else {
1862
+ _message2.default.info('\u6CA1\u6709\u627E\u5230\u53EF\u4F7F\u7528\u7684' + Differentiate.COUPON + '\uFF01');
1863
+ }
1864
+ }
1865
+ });
1866
+ }
1867
+ };
1868
+
1869
+ this.getSettleGift = function () {
1870
+ return _this13.SettlementApi.executeRightsForPos(_this13.billID);
1871
+ };
1872
+
1873
+ this.getRefWareHouseList = function () {
1874
+ return _this13.SettlementApi.getRefWareHouseList();
1875
+ };
1876
+
1877
+ this.checkCoupon = function () {
1878
+ var _ref23 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee10(sn) {
1879
+ var _ref24, isNewRetailBCPos, _enumController$getEn17, PayStyle, Differentiate, params;
1880
+
1881
+ return _regenerator2.default.wrap(function _callee10$(_context10) {
1882
+ while (1) {
1883
+ switch (_context10.prev = _context10.next) {
1884
+ case 0:
1885
+ _ref24 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref24.isNewRetailBCPos;
1886
+
1887
+ if (!isNewRetailBCPos) {
1888
+ _context10.next = 7;
1889
+ break;
1890
+ }
1891
+
1892
+ _context10.next = 4;
1893
+ return _this13.getCouponList(sn, 'sinlge');
1894
+
1895
+ case 4:
1896
+ return _context10.abrupt('return', _context10.sent);
1897
+
1898
+ case 7:
1899
+ _enumController$getEn17 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn17.PayStyle, Differentiate = _enumController$getEn17.Differentiate;
1900
+ params = { request: {
1901
+ Uid: _this13.paymode.currentMode.member.uid || '',
1902
+ SN: sn,
1903
+ StoreCode: _this13.dto.Idstore,
1904
+ Inventories: (0, _map3.default)((0, _filter3.default)(_this13.dto.RetailDetails, function (d) {
1905
+ return d.Quantity > 0 && !d.IsPresent;
1906
+ }), function (detail) {
1907
+ return {
1908
+ IdInventory: detail.Inventory.ID,
1909
+ IdUnit: detail.Idunit,
1910
+ Code: detail.Inventory.Code,
1911
+ FreeItem0: JSON.getCellValue(detail, "freeitem0"),
1912
+ FreeItem1: JSON.getCellValue(detail, "freeitem1"),
1913
+ FreeItem2: JSON.getCellValue(detail, "freeitem2"),
1914
+ FreeItem3: JSON.getCellValue(detail, "freeitem3"),
1915
+ FreeItem4: JSON.getCellValue(detail, "freeitem4"),
1916
+ FreeItem5: JSON.getCellValue(detail, "freeitem5"),
1917
+ FreeItem6: JSON.getCellValue(detail, "freeitem6"),
1918
+ FreeItem7: JSON.getCellValue(detail, "freeitem7"),
1919
+ FreeItem8: JSON.getCellValue(detail, "freeitem8"),
1920
+ FreeItem9: JSON.getCellValue(detail, "freeitem9")
1921
+ };
1922
+ }),
1923
+ // inventoryCodes:_join(_map(this.dto.RetailDetails,(detail)=>{return detail.Inventory.Code;}),','),
1924
+ InventoryClassCodes: (0, _join3.default)((0, _map3.default)((0, _filter3.default)(_this13.dto.RetailDetails, function (d) {
1925
+ return d.Quantity > 0;
1926
+ }), function (detail) {
1927
+ return (detail.Inventory.InventoryClass || { Code: '' }).Code;
1928
+ }), ','),
1929
+ Amount: _this13.paymode.amount
1930
+ } };
1931
+ return _context10.abrupt('return', _this13.SettlementApi.CheckCoupon(params).then(function (result) {
1932
+ if ((0, _find3.default)(_this13.paymode.currentMode.djqs, function (djq) {
1933
+ return djq.code == result.SN;
1934
+ })) {
1935
+ _message2.default.info(Differentiate.COUPON + '\u5DF2\u6DFB\u52A0');
1936
+ } else if (result.IsRepelWithPoints && (0, _find3.default)(_this13.paymode.thePaymodes, function (themode) {
1937
+ return themode.paymentType == PayStyle.jfdx;
1938
+ })) {
1939
+ _message2.default.error(Differentiate.COUPON + '\uFF08' + result.SN + '\uFF09\u4E0D\u53EF\u4E0E\u79EF\u5206\u4E00\u8D77\u4F7F\u7528');
1940
+ } else {
1941
+ _this13.addDjq(result.SN, result.Title, result.ReduceAmount, result.StartAmount, result.LastTS, false, !result.IsRepelWithPoints, result.UMemberID);
1942
+ }
1943
+ }));
1944
+
1945
+ case 10:
1946
+ case 'end':
1947
+ return _context10.stop();
1948
+ }
1949
+ }
1950
+ }, _callee10, _this13);
1951
+ }));
1952
+
1953
+ return function (_x9) {
1954
+ return _ref23.apply(this, arguments);
1955
+ };
1956
+ }();
1957
+
1958
+ this.repeatStorageModal = function (content) {
1959
+ return new _promise2.default(function (resolve, reject) {
1960
+ _tplusComponentsTouch.ModalWraper.confirm({
1961
+ title: '',
1962
+ okText: '继续储值',
1963
+ className: 'repeat-modal',
1964
+ zIndex: 1007,
1965
+ content: content,
1966
+ onOk: function () {
1967
+ var _ref25 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee11() {
1968
+ var ret;
1969
+ return _regenerator2.default.wrap(function _callee11$(_context11) {
1970
+ while (1) {
1971
+ switch (_context11.prev = _context11.next) {
1972
+ case 0:
1973
+ _context11.next = 2;
1974
+ return _this13.saveMember();
1975
+
1976
+ case 2:
1977
+ ret = _context11.sent;
1978
+
1979
+ if (ret === false) {
1980
+ resolve(false);
1981
+ } else {
1982
+ resolve(true);
1983
+ }
1984
+
1985
+ case 4:
1986
+ case 'end':
1987
+ return _context11.stop();
1988
+ }
1989
+ }
1990
+ }, _callee11, _this13);
1991
+ }));
1992
+
1993
+ return function onOk() {
1994
+ return _ref25.apply(this, arguments);
1995
+ };
1996
+ }(),
1997
+ onCancel: function onCancel() {
1998
+ resolve(false);
1999
+ }
2000
+ });
2001
+ });
2002
+ };
2003
+
2004
+ this.checkIntegralExchangeReturn = function (id) {
2005
+ return new _promise2.default(function (resolve, reject) {
2006
+ _this13.SettlementApi.GetNewIntegralExchange({ param: { refVoucherId: id } }).then(function (resp) {
2007
+ if (resp && resp.expireIntegral > 0) {
2008
+ _tplusComponentsTouch.ModalWraper.confirm({
2009
+ className: 'tplus-confirm-modal',
2010
+ title: "温馨提示",
2011
+ content: '\u5B58\u5728\u5DF2\u7ECF\u8FC7\u671F\u7684\u79EF\u5206' + resp.expireIntegral + '\u9000\u8D27\u540E\u79EF\u5206\u4E0D\u4F1A\u8FD4\u8FD8\u3002\u662F\u5426\u7EE7\u7EED\u9000\u8D27\uFF1F',
2012
+ cancelable: false,
2013
+ onOk: function onOk() {
2014
+ resolve(true);
2015
+ },
2016
+ onCancel: function onCancel() {
2017
+ reject(false);
2018
+ }
2019
+ });
2020
+ } else {
2021
+ resolve(true);
2022
+ }
2023
+ });
2024
+ });
2025
+ };
2026
+ }, _temp), (_descriptor = _applyDecoratedDescriptor(_class.prototype, 'newStyle', [_mobx.observable], {
2027
+ enumerable: true,
2028
+ initializer: function initializer() {
2029
+ return true;
2030
+ }
2031
+ }), _descriptor2 = _applyDecoratedDescriptor(_class.prototype, 'setNewStyle', [_mobx.action], {
2032
+ enumerable: true,
2033
+ initializer: function initializer() {
2034
+ var _this14 = this;
2035
+
2036
+ return function () {
2037
+ var voucherDefaultPosMode = _mutantsMicrofx.localStore && _mutantsMicrofx.localStore.get('voucherDefaultPosMode') || 'touch';
2038
+ _this14.newStyle = voucherDefaultPosMode == 'voucher';
2039
+ };
2040
+ }
2041
+ }), _descriptor3 = _applyDecoratedDescriptor(_class.prototype, 'queryPwd', [_mobx.action], {
2042
+ enumerable: true,
2043
+ initializer: function initializer() {
2044
+ var _this15 = this;
2045
+
2046
+ return function (newPass, newPassConfirm) {
2047
+ if (!newPass || !newPassConfirm) {
2048
+ return _message2.default.warn('您还有未填写项');
2049
+ }
2050
+ if (newPass !== newPassConfirm) {
2051
+ return _message2.default.warn('您两次输入的密码不一致');
2052
+ }
2053
+ var idstore = (0, _tplusPoslogin.PosInitData)('storeID');
2054
+ return _this15.SettlementApi.setWalletPayPassword({
2055
+ Idstore: idstore,
2056
+ meMemberId: _this15.paymode.currentMode.memberId,
2057
+ oldPassword: null,
2058
+ newPassword: _tplusApi.User.pwdEncrypt(newPassConfirm),
2059
+ dataSource: "POS"
2060
+ }).then(function (resp) {
2061
+ if (resp.successful) {
2062
+ return true;
2063
+ }
2064
+ });
2065
+ };
2066
+ }
2067
+ }), _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), _descriptor4 = _applyDecoratedDescriptor(_class.prototype, 'updateMemberInfo', [_mobx.action], {
2068
+ enumerable: true,
2069
+ initializer: function initializer() {
2070
+ var _this16 = this;
2071
+
2072
+ return function () {
2073
+ var _ref26 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee12(_this) {
2074
+ var _getLoginInfo4, IdStore, StoreCode, resp;
2075
+
2076
+ return _regenerator2.default.wrap(function _callee12$(_context12) {
2077
+ while (1) {
2078
+ switch (_context12.prev = _context12.next) {
2079
+ case 0:
2080
+ _getLoginInfo4 = _this16.getLoginInfo(), IdStore = _getLoginInfo4.IdStore, StoreCode = _getLoginInfo4.StoreCode;
2081
+ _context12.next = 3;
2082
+ return _this16.SettlementApi.GetUmemberDTO({ Idmember: _this16.member.ID, IdStore: IdStore, StoreCode: StoreCode });
2083
+
2084
+ case 3:
2085
+ resp = _context12.sent;
2086
+
2087
+ _this.member = resp;
2088
+ _this.paymode.updateMemberStorageCardNo(resp.StorageCardNo, resp.WalletEnabled);
2089
+ return _context12.abrupt('return', _promise2.default.resolve(resp));
2090
+
2091
+ case 7:
2092
+ case 'end':
2093
+ return _context12.stop();
2094
+ }
2095
+ }
2096
+ }, _callee12, _this16);
2097
+ }));
2098
+
2099
+ return function (_x10) {
2100
+ return _ref26.apply(this, arguments);
2101
+ };
2102
+ }();
2103
+ }
2104
+ }), _descriptor5 = _applyDecoratedDescriptor(_class.prototype, 'updateCurrentMode', [_mobx.action], {
2105
+ enumerable: true,
2106
+ initializer: function initializer() {
2107
+ var _this17 = this;
2108
+
2109
+ return function () {
2110
+ var _ref27 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee13(memberId, returnType) {
2111
+ var isOnlyEnabled, result;
2112
+ return _regenerator2.default.wrap(function _callee13$(_context13) {
2113
+ while (1) {
2114
+ switch (_context13.prev = _context13.next) {
2115
+ case 0:
2116
+ isOnlyEnabled = returnType ? false : true; //非原单退货为false,其他true
2117
+ // 查看会员卡信息
2118
+
2119
+ _context13.next = 3;
2120
+ return _this17.SettlementApi.getCardInfoByMemberId(memberId, isOnlyEnabled);
2121
+
2122
+ case 3:
2123
+ result = _context13.sent;
2124
+
2125
+ if (!(result && result.data.length)) {
2126
+ _context13.next = 21;
2127
+ break;
2128
+ }
2129
+
2130
+ if (!(result.data.length === 1)) {
2131
+ _context13.next = 10;
2132
+ break;
2133
+ }
2134
+
2135
+ _this17.paymode.updateCardInfo(result.data[0]);
2136
+ return _context13.abrupt('return', result.data);
2137
+
2138
+ case 10:
2139
+ if (!(result.data && result.data.length === 1)) {
2140
+ _context13.next = 15;
2141
+ break;
2142
+ }
2143
+
2144
+ _this17.paymode.updateCardInfo(result.data[0]);
2145
+ return _context13.abrupt('return', result.data);
2146
+
2147
+ case 15:
2148
+ if (!(result.data && result.data.length > 1)) {
2149
+ _context13.next = 19;
2150
+ break;
2151
+ }
2152
+
2153
+ return _context13.abrupt('return', result.data);
2154
+
2155
+ case 19:
2156
+ _message2.default.warn('没有可用储值卡!');
2157
+ return _context13.abrupt('return', false);
2158
+
2159
+ case 21:
2160
+ case 'end':
2161
+ return _context13.stop();
2162
+ }
2163
+ }
2164
+ }, _callee13, _this17);
2165
+ }));
2166
+
2167
+ return function (_x11, _x12) {
2168
+ return _ref27.apply(this, arguments);
2169
+ };
2170
+ }();
2171
+ }
2172
+ }), _descriptor6 = _applyDecoratedDescriptor(_class.prototype, 'updateCardInfo', [_mobx.action], {
2173
+ enumerable: true,
2174
+ initializer: function initializer() {
2175
+ var _this18 = this;
2176
+
2177
+ return (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee14() {
2178
+ var ctMode, cardNo, result;
2179
+ return _regenerator2.default.wrap(function _callee14$(_context14) {
2180
+ while (1) {
2181
+ switch (_context14.prev = _context14.next) {
2182
+ case 0:
2183
+ ctMode = _this18.paymode && _this18.paymode.currentMode;
2184
+ cardNo = ctMode && ctMode.storageCardNo;
2185
+ _context14.next = 4;
2186
+ return _this18.SettlementApi.getCardInfoByCardNo(cardNo);
2187
+
2188
+ case 4:
2189
+ result = _context14.sent;
2190
+
2191
+ _this18.paymode.updateCardInfo(result && result.data);
2192
+
2193
+ case 6:
2194
+ case 'end':
2195
+ return _context14.stop();
2196
+ }
2197
+ }
2198
+ }, _callee14, _this18);
2199
+ }));
2200
+ }
2201
+ }), _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, 'changeClickFocusOnly', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'changeClickFocusOnly'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'changeValue', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'changeValue'), _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, 'setDtoID', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'setDtoID'), _class.prototype)), _class);
2202
+ exports.default = SettlementStore;
2203
+ var PayMode = exports.PayMode = (_class3 = function () {
2204
+ //预订场景下,现场提货,且选项设置订金比例非100% or 取货最大补款数大于0时 为 true
2205
+ function PayMode() {
2206
+ (0, _classCallCheck3.default)(this, PayMode);
2207
+ this._counter = 0;
2208
+ this.amount = 0;
2209
+ this.onlineamount = 0;
2210
+ this.maxamount = 0;
2211
+
2212
+ _initDefineProp(this, 'currentFocus', _descriptor7, this);
2213
+
2214
+ _initDefineProp(this, 'received', _descriptor8, this);
2215
+
2216
+ _initDefineProp(this, 'receivable', _descriptor9, this);
2217
+
2218
+ _initDefineProp(this, 'paymodes', _descriptor10, this);
2219
+
2220
+ _initDefineProp(this, 'thePaymodes', _descriptor11, this);
2221
+
2222
+ this.bookMaxValue = 0;
2223
+ this.isNotFullBook = false;
2224
+ this.isNotFullOnlyBook = false;
2225
+
2226
+ _initDefineProp(this, 'storageCardNo', _descriptor12, this);
2227
+
2228
+ _initDefineProp(this, 'balance', _descriptor13, this);
2229
+
2230
+ this.currentMode = null;
2231
+ this.checkList = [];
2232
+ this.settle = {
2233
+ name: "复合结算",
2234
+ hotKey: "Ctrl+M"
2235
+ };
2236
+
2237
+ _initDefineProp(this, 'calcCheckList', _descriptor14, this);
2238
+
2239
+ _initDefineProp(this, 'setCouponNum', _descriptor15, this);
2240
+
2241
+ _initDefineProp(this, 'addDjqs', _descriptor16, this);
2242
+
2243
+ // this.amount=getFixedNumber(amount);
2244
+ // this.calcReserved();
2245
+ this.SettlementApi = _settlementApi2.default;
2246
+ }
2247
+ // @observable store = null;
2248
+ //只是预订场景下,现场提货,且选项设置订金比例非100%时 为 true
2249
+ //应收
2250
+
2251
+
2252
+ (0, _createClass3.default)(PayMode, [{
2253
+ key: 'clean',
2254
+ value: function clean() {
2255
+ this.thePaymodes = [];
2256
+ this.calcReserved();
2257
+ }
2258
+ }, {
2259
+ key: 'clear',
2260
+ value: function clear() {
2261
+ this.thePaymodes = [];
2262
+ this.calcReserved();
2263
+ this.paymodes = [];
2264
+ }
2265
+ }, {
2266
+ key: 'setAmount',
2267
+ value: function setAmount(a, o) {
2268
+ this.amount = (0, _utils.getFixedNumber)((a || 0) - (o || 0));
2269
+ this.onlineamount = (0, _utils.getFixedNumber)(o || 0);
2270
+ this.calcReserved();
2271
+ return this.amount < 0;
2272
+ }
2273
+ }, {
2274
+ key: 'calcReserved',
2275
+ value: function calcReserved(type) {
2276
+ var sum = 0;
2277
+ (0, _each3.default)(this.thePaymodes, function (mode) {
2278
+ sum = Math.Add(sum, mode.value == "" ? 0 : mode.value);
2279
+ });
2280
+ this.received = (0, _utils.getFixedNumber)(sum);
2281
+ if (type === 'bookPay' && this.isNotFullBook) {
2282
+ if (this.amount <= sum && sum <= this.bookMaxValue) {
2283
+ this.receivable = (0, _utils.getFixedNumber)(0);
2284
+ }
2285
+ if (sum < this.amount) {
2286
+ this.receivable = (0, _utils.getFixedNumber)(this.amount - sum);
2287
+ }
2288
+ if (sum > this.bookMaxValue) {
2289
+ this.receivable = (0, _utils.getFixedNumber)(this.bookMaxValue - sum);
2290
+ }
2291
+ } else {
2292
+ this.receivable = (0, _utils.getFixedNumber)(this.amount - sum);
2293
+ }
2294
+ }
2295
+ }, {
2296
+ key: 'updateMemberStorageCardNo',
2297
+ value: function updateMemberStorageCardNo(storageCardNo, walletEnabled) {
2298
+ this.currentMode.storageCardNo = storageCardNo;
2299
+ this.currentMode.walletEnabled = walletEnabled;
2300
+ }
2301
+ }, {
2302
+ key: 'updateCardInfo',
2303
+ value: function updateCardInfo(m) {
2304
+ this.currentMode.cardStatusEnum = m.CardStatusEnum;
2305
+ this.currentMode.isNeedPassword = m.IsNeedPassword;
2306
+ this.currentMode.meStorageCardId = m.MeStorageCardId;
2307
+ this.currentMode.storageCardNo = m.StorageCardNo;
2308
+ this.currentMode.balance = m.BalanceStorage;
2309
+ this.currentMode.rawbalance = m.BalanceStorage;
2310
+ this.currentMode.cardTypeEnum = m.CardTypeEnum;
2311
+ this.currentMode.walletEnabled = m.WalletEnabled;
2312
+ this.currentMode.memberId = m.ID;
2313
+ this.currentMode.freePaymentPasswordStore = m.FreePaymentPasswordStore;
2314
+ }
2315
+ }, {
2316
+ key: 'calcDjqCheckValue',
2317
+ value: function calcDjqCheckValue(q1, dto, params) {
2318
+ var _this19 = this;
2319
+
2320
+ var useLimitPerOrder = (0, _tplusPoslogin.PosInitData)('UseLimitPerOrder');
2321
+ var qList = (0, _filter3.default)(this.currentMode.djqs, function (djq) {
2322
+ return djq.checked;
2323
+ });
2324
+ if (qList.length === useLimitPerOrder && !q1.checked) {
2325
+ _message2.default.warn('本单最多可用' + useLimitPerOrder + '张');
2326
+ return;
2327
+ }
2328
+ if (params === 'single') {
2329
+ this.checkList = [];
2330
+ }
2331
+
2332
+ var _enumController$getEn18 = _mutantsUtil.enumController.getEnumOj(),
2333
+ PayStyle = _enumController$getEn18.PayStyle,
2334
+ Differentiate = _enumController$getEn18.Differentiate;
2335
+
2336
+ if (q1) {
2337
+ if (!this.currentMode.boriginReturn && parseFloat(this.currentMode.maxamount) <= 0) {
2338
+ _message2.default.error('\u672C\u5355\u6CA1\u6709' + Differentiate.COUPON + '\u53EF\u7528\u91D1\u989D\uFF0C\u8BE5\u5238\u4E0D\u53EF\u4F7F\u7528\u3002');
2339
+ return;
2340
+ }
2341
+ var q = (0, _find3.default)(this.currentMode.djqs, function (djq) {
2342
+ return djq.promoCouponCode == q1.promoCouponCode;
2343
+ });
2344
+ if (q && !q.checked && parseFloat(this.amount) < parseFloat(q.doorsill)) {
2345
+ _message2.default.error("本单金额低于使用门槛,该券不可使用。");
2346
+ return;
2347
+ }
2348
+ //判断是否是选择优惠券 //CC优惠券只能使用一个
2349
+ // if (q1 && !q1.checked && isNewRetailBCPos) {
2350
+ // // 检查是否有已经选定优惠券 并且去除选定的优惠券
2351
+ // this.currentMode.djqs.forEach((djq, index) => {
2352
+ // if (djq.checked) this.currentMode.djqs[index].checked = false;
2353
+ // })
2354
+ // }
2355
+ q && (q.checked = !q.checked);
2356
+ }
2357
+ var sum = 0;
2358
+ // console.log(this.store, 'stores-------');
2359
+ if (!q1.checked) {
2360
+ this.checkList.forEach(function (ele, i) {
2361
+ if (ele.id === q1.id) {
2362
+ _this19.checkList.splice(i, 1);
2363
+ }
2364
+ });
2365
+ } else {
2366
+ this.checkList.push(q1);
2367
+ }
2368
+
2369
+ this.checkList.forEach(function (ele) {
2370
+ sum = Math.Add(sum, ele.amount);
2371
+ });
2372
+ this.currentMode.value = (0, _utils.getFixedNumber)(Math.min(this.receivable, sum, this.currentMode.maxamount));
2373
+ console.log(this.receivable, sum, Math.min(this.receivable, sum, this.currentMode.maxamount), 'sum---------');
2374
+ this.currentMode.receivable = (0, _utils.getFixedNumber)(this.receivable - Math.min(this.receivable, sum, this.currentMode.maxamount));
2375
+ this.currentMode.overchargesAmount = (0, _utils.getFixedNumber)(sum - this.currentMode.value);
2376
+ if (params === 'single') {
2377
+ return;
2378
+ }
2379
+ var promoVoucher = {};
2380
+ promoVoucher.boName = "Retail";
2381
+ // promoVoucher.promoLinks = _filter(this.currentMode.djqs,djq=>djq.checked);
2382
+ promoVoucher.meMemberId = this.currentMode.member.id;
2383
+ promoVoucher.storeFactorId = (0, _tplusPoslogin.PosInitData)('storeID');
2384
+ promoVoucher.voucherDetailList = [];
2385
+ dto.RetailDetails.forEach(function (item) {
2386
+ var detailDTO = {};
2387
+ detailDTO.uuid = item.Code;
2388
+ detailDTO.detailBoName = "RetailDetail";
2389
+ detailDTO.voucherDetailId = item.ID;
2390
+ detailDTO.productId = item.Idinventory;
2391
+ detailDTO.uomId = item.Idunit;
2392
+ detailDTO.productSpecId = item.ProductSpecId;
2393
+ detailDTO.isManualFreeGift = item.IsPresent;
2394
+ detailDTO.isListPriceIncludingTax = item.TaxFlag || true;
2395
+ detailDTO.IsManualChangePrice = item.IsManualChangePrice;
2396
+
2397
+ // if(detailDTO.IsManualChangePrice)//如果是手工改价
2398
+ // {
2399
+ // detailDTO.listPrice = item.TaxPrice;
2400
+ // detailDTO.netAmountWithTax = item.TaxAmount;
2401
+ // }
2402
+ // else
2403
+ // {
2404
+
2405
+ var bookingQuantity = 0;
2406
+ if (item.BookingQuantity) {
2407
+ bookingQuantity = item.BookingQuantity;
2408
+ }
2409
+ detailDTO.listPrice = JSON.getCellValue(item, "listPrice");
2410
+ detailDTO.netAmountWithTax = Math.Multiply(detailDTO.listPrice, Math.Minus(item.Quantity, bookingQuantity)); //item.TaxAmount;
2411
+ detailDTO.taxRate = item.TaxRate;
2412
+ detailDTO.quantity = item.Quantity;
2413
+
2414
+ detailDTO.amountWithTax = item.RetailAmount;
2415
+ // 促销 start
2416
+ if (item.PromotionDetails && item.PromotionDetails.length != 0) {
2417
+ var promoLinks = [];
2418
+ item.PromotionDetails.forEach(function (promotion) {
2419
+ promoLinks.push({
2420
+ promoId: promotion.IdSalesPromotionDTO,
2421
+ promoRuleId: promotion.PromotionRuleId
2422
+ });
2423
+ });
2424
+ if (promoLinks.length != 0) detailDTO.promoLinks = promoLinks;
2425
+ }
2426
+ // 促销 end
2427
+ promoVoucher.voucherDetailList.push(detailDTO);
2428
+ });
2429
+ promoVoucher.promoLinks = this.checkList;
2430
+ return this.SettlementApi.findUsefulCouponPromoList(promoVoucher).then(function (result) {
2431
+ if (result && result.length != 0) {
2432
+ result.forEach(function (element, index) {
2433
+ var djq1 = false;
2434
+ _this19.currentMode.djqs.forEach(function (djq) {
2435
+ if (element.id === djq.id) {
2436
+ djq1 = true;
2437
+ }
2438
+ });
2439
+
2440
+ var _ref29 = element || {},
2441
+ couponCode = _ref29.couponCode,
2442
+ name = _ref29.name,
2443
+ tieredAmountResult = _ref29.tieredAmountResult,
2444
+ fromDate = _ref29.fromDate,
2445
+ dateMount = _ref29.dateMount,
2446
+ promoMethodEnum = _ref29.promoMethodEnum,
2447
+ discountPct = _ref29.discountPct,
2448
+ nominalAmount = _ref29.nominalAmount,
2449
+ promoId = _ref29.promoId,
2450
+ id = _ref29.id,
2451
+ doorsill = _ref29.doorsill;
2452
+
2453
+ var condValue = tieredAmountResult.condValue,
2454
+ promoDiscount = tieredAmountResult.promoDiscount,
2455
+ displayText = tieredAmountResult.displayText,
2456
+ promoRuleId = tieredAmountResult.promoRuleId,
2457
+ couponCategoryEnum = tieredAmountResult.couponCategoryEnum;
2458
+
2459
+ if (!djq1) {
2460
+ // this.currentMode.djqs.push({
2461
+ // promoCouponCode: element.CouponCode,
2462
+ // name: element.CouponTitle,
2463
+ // IsEnable: true,
2464
+ // amount: element.ReductionAmount,
2465
+ // doorsill: element.EnableAmount,
2466
+ // LastTS: element.LastTS,
2467
+ // checked: false,
2468
+ // IsRepelWithPoints: true,
2469
+ // UMemberID: dto.Idmember,
2470
+ // expired: null,
2471
+ // displayText,
2472
+ // promoMethodEnum,
2473
+ // discountPct,
2474
+ // promoId,
2475
+ // promoRuleId,
2476
+ // couponCategoryEnum: tieredAmountResult.couponCategoryEnum,
2477
+ // id
2478
+ // })
2479
+ _this19.addDjqs(couponCode, name, true, nominalAmount, promoDiscount, doorsill, element.LastTS, false, true, dto.Idmember, dateMount, displayText, promoMethodEnum, discountPct, promoId, promoRuleId, tieredAmountResult.couponCategoryEnum, id);
2480
+ djq1 = false;
2481
+ } else {
2482
+ _this19.setCouponNum(element.id, couponCategoryEnum, promoMethodEnum, nominalAmount, promoDiscount);
2483
+ // this.currentMode.djqs[0].couponCategoryEnum = 'couponCategoryEnum';
2484
+ // djq1.couponCategoryEnum = element.tieredAmountResult.couponCategoryEnum
2485
+ }
2486
+ });
2487
+ }
2488
+ // 优惠券【6052098985043】与【6120822326451】不可叠加使用
2489
+ });
2490
+ //this.receivable = getFixedNumber(this.receivable - sum);
2491
+ }
2492
+ }, {
2493
+ key: 'calcDjqValue',
2494
+ value: function calcDjqValue(q1) {
2495
+ var _enumController$getEn19 = _mutantsUtil.enumController.getEnumOj(),
2496
+ Differentiate = _enumController$getEn19.Differentiate;
2497
+
2498
+ if (q1) {
2499
+ if (!this.currentMode.boriginReturn && parseFloat(this.currentMode.maxamount) <= 0) {
2500
+ _message2.default.error('\u672C\u5355\u6CA1\u6709' + Differentiate.COUPON + '\u53EF\u7528\u91D1\u989D\uFF0C\u8BE5\u5238\u4E0D\u53EF\u4F7F\u7528\u3002');
2501
+ return;
2502
+ }
2503
+ var q = (0, _find3.default)(this.currentMode.djqs, function (djq) {
2504
+ return djq.code == q1.code;
2505
+ });
2506
+ if (q && !q.checked && parseFloat(this.amount) < parseFloat(q.doorsill)) {
2507
+ _message2.default.error("本单金额低于使用门槛,该券不可使用。");
2508
+ return;
2509
+ }
2510
+ //判断是否是选择优惠券 //CC优惠券只能使用一个
2511
+ // if (q1 && !q1.checked && isNewRetailBCPos) {
2512
+ // // 检查是否有已经选定优惠券 并且去除选定的优惠券
2513
+ // this.currentMode.djqs.forEach((djq, index) => {
2514
+ // if (djq.checked) this.currentMode.djqs[index].checked = false;
2515
+ // })
2516
+ // }
2517
+ q && (q.checked = !q.checked);
2518
+ }
2519
+ var sum = 0;
2520
+ // console.log(this.store, 'stores-------');
2521
+ (0, _each3.default)((0, _filter3.default)(this.currentMode.djqs, function (djq) {
2522
+ return djq.checked;
2523
+ }), function (q) {
2524
+ sum = Math.Add(sum, q.amount);
2525
+ });
2526
+ this.currentMode.value = (0, _utils.getFixedNumber)(Math.min(this.receivable, sum, this.currentMode.maxamount));
2527
+ this.currentMode.receivable = (0, _utils.getFixedNumber)(this.receivable - this.currentMode.value);
2528
+ this.currentMode.overchargesAmount = (0, _utils.getFixedNumber)(sum - this.currentMode.value);
2529
+
2530
+ //this.receivable = getFixedNumber(this.receivable - sum);
2531
+ }
2532
+ }, {
2533
+ key: 'reCalculationDjqs',
2534
+ value: function reCalculationDjqs() {
2535
+ var sum = 0;
2536
+ (0, _each3.default)((0, _filter3.default)(this.currentMode.djqs, function (djq) {
2537
+ return djq.checked;
2538
+ }), function (q) {
2539
+ sum = Math.Add(sum, q.amount);
2540
+ });
2541
+ this.currentMode.value = (0, _utils.getFixedNumber)(Math.min(this.receivable, sum, this.currentMode.maxamount));
2542
+ this.currentMode.receivable = (0, _utils.getFixedNumber)(this.receivable - this.currentMode.value);
2543
+ this.currentMode.overchargesAmount = (0, _utils.getFixedNumber)(sum - this.currentMode.value);
2544
+ this.currentMode.maxamount = this.currentMode.receivable || this.currentMode.receivable;
2545
+ }
2546
+ }, {
2547
+ key: 'clearDjqs',
2548
+ value: function clearDjqs() {
2549
+ this.currentMode.djqs = [];
2550
+ }
2551
+ }, {
2552
+ key: 'setCurrentModeValue',
2553
+ value: function setCurrentModeValue(v, max) {
2554
+ this.currentMode.value = parseFloat(v) || 0;
2555
+ this.currentMode.errinfo = '';
2556
+ var sum = this.amount;
2557
+
2558
+ var _enumController$getEn20 = _mutantsUtil.enumController.getEnumOj(),
2559
+ PayStyle = _enumController$getEn20.PayStyle;
2560
+
2561
+ this.thePaymodes && this.thePaymodes.forEach(function (mode) {
2562
+ if (mode.paymentType === PayStyle.hyczk) {
2563
+ sum -= mode.value;
2564
+ }
2565
+ });
2566
+
2567
+ if (this.amount > 0 && (v === '' || v === '0.00') && sum !== 0) {
2568
+ this.currentMode.errinfo = "实收金额必须录入";
2569
+ } else if (Math.abs(parseFloat(v)) > Math.abs((0, _utils.getFixedNumber)(sum))) {
2570
+ this.currentMode.errinfo = "实收不应大于应收";
2571
+ } else if (parseFloat(v) > 0 && parseFloat(v) > (max || 0)) {
2572
+ this.currentMode.errinfo = "余额不足";
2573
+ }
2574
+ // 如果是积分抵现的一些判断
2575
+ if (this.currentMode.paymentType === PayStyle.jfdx) {
2576
+ if (this.currentMode.integralCashOverOrderAmount === true) {
2577
+ this.currentMode.steadCashIntegral = Math.ceil(this.currentMode.value / this.currentMode.cashAmount) * this.currentMode.perIntegral;
2578
+ } else if (this.currentMode.integralCashOverOrderAmount === false) {
2579
+ var v1 = this.currentMode.value / this.currentMode.cashAmount;
2580
+ if ((0, _isInteger2.default)(v1)) {
2581
+ this.currentMode.steadCashIntegral = Math.floor(this.currentMode.value / this.currentMode.cashAmount) * this.currentMode.perIntegral;
2582
+ } else {
2583
+ this.currentMode.errinfo = '\u8BF7\u6309\u7167\u79EF\u5206\u62B5\u73B0\u89C4\u5219' + this.currentMode.perIntegral + '\u79EF\u5206\u62B5\u7528' + this.currentMode.cashAmount + '\u5143\u8F93\u5165\u91D1\u989D';
2584
+ }
2585
+ }
2586
+ }
2587
+ }
2588
+ }, {
2589
+ key: 'calcMemberBalance',
2590
+ value: function calcMemberBalance() {
2591
+ this.currentMode.balance = this.currentMode.rawbalance - this.currentMode.value;
2592
+ }
2593
+ }, {
2594
+ key: 'setPaymodes',
2595
+ value: function () {
2596
+ var _ref30 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee15(type, isIntegralExchange) {
2597
+ var _this20 = this;
2598
+
2599
+ var _ref31, isHorizontalPad, isHorizontalSunMi, isMobileEnvironment, _enumController$getEn21, settleStyleType, PayStyle, memberStoreCode, settlementCode, param, modes;
2600
+
2601
+ return _regenerator2.default.wrap(function _callee15$(_context15) {
2602
+ while (1) {
2603
+ switch (_context15.prev = _context15.next) {
2604
+ case 0:
2605
+ // 是否移动端判断
2606
+ _ref31 = _mutantsUtil.platform || {}, isHorizontalPad = _ref31.isHorizontalPad, isHorizontalSunMi = _ref31.isHorizontalSunMi;
2607
+ isMobileEnvironment = !!isHorizontalPad || !!isHorizontalSunMi;
2608
+ _enumController$getEn21 = _mutantsUtil.enumController.getEnumOj(), settleStyleType = _enumController$getEn21.settleStyleType, PayStyle = _enumController$getEn21.PayStyle;
2609
+ memberStoreCode = settleStyleType.memberStoreCode, settlementCode = settleStyleType.settlementCode;
2610
+ param = { 'settleStyleType': type == 1 ? memberStoreCode : settlementCode, isIntegralExchange: isIntegralExchange };
2611
+ _context15.next = 7;
2612
+ return _settlementApi2.default.GetNewStoreSettleStyles({ param: param });
2613
+
2614
+ case 7:
2615
+ modes = _context15.sent;
2616
+
2617
+ if (modes) {
2618
+ (0, _mobx.runInAction)(function () {
2619
+ var paymodes = [];
2620
+ var settleLists = modes.SettleStyles;
2621
+ settleLists = isMobileEnvironment ? settleLists.filter(function (v) {
2622
+ return !v.ThirdPaymentInfo;
2623
+ }) : settleLists;
2624
+ (0, _each3.default)(settleLists, function (mode, index) {
2625
+ //产品需求确认会员储值卡结算方式前端展示统一调整为“储值卡" tuzha by 2020-07-08
2626
+ if (mode.Code == PayStyle.hyczk) {
2627
+ mode.Name = '储值卡';
2628
+ }
2629
+ paymodes.push({
2630
+ name: mode.Name,
2631
+ isDefault: mode.IsDefaultSettleStyle,
2632
+ isQuick: (0, _findIndex3.default)(modes.QuickSettleStyles, { 'Code': mode.Code }) >= 0,
2633
+ orderBy: 1,
2634
+ paymentType: mode.Code,
2635
+ offlineDisable: mode.offlineDisable,
2636
+ idSettleStyle: mode.IdSettleStyle,
2637
+ idBankAccount: mode.IdBankAccount,
2638
+ exchangeRate: mode.Currency ? mode.Currency.ExchangeRate : 1,
2639
+ idCurrency: mode.Currency ? mode.Currency.ID : -1,
2640
+ calDirection: mode.Currency ? mode.Currency.CalDirection.Id : "88",
2641
+ virtualPay: mode.VirtualPay,
2642
+ thridPayment: mode.ThirdPaymentInfo
2643
+ });
2644
+ });
2645
+ _this20.paymodes = paymodes;
2646
+ });
2647
+ }
2648
+
2649
+ case 9:
2650
+ case 'end':
2651
+ return _context15.stop();
2652
+ }
2653
+ }
2654
+ }, _callee15, this);
2655
+ }));
2656
+
2657
+ function setPaymodes(_x13, _x14) {
2658
+ return _ref30.apply(this, arguments);
2659
+ }
2660
+
2661
+ return setPaymodes;
2662
+ }()
2663
+ }, {
2664
+ key: 'charge',
2665
+ get: function get() {
2666
+ return Math.abs(this.receivable);
2667
+ }
2668
+ }, {
2669
+ key: 'counter',
2670
+ get: function get() {
2671
+ return ++this._counter;
2672
+ }
2673
+ }]);
2674
+ return PayMode;
2675
+ }(), (_descriptor7 = _applyDecoratedDescriptor(_class3.prototype, 'currentFocus', [_mobx.observable], {
2676
+ enumerable: true,
2677
+ initializer: function initializer() {
2678
+ return "";
2679
+ }
2680
+ }), _descriptor8 = _applyDecoratedDescriptor(_class3.prototype, 'received', [_mobx.observable], {
2681
+ enumerable: true,
2682
+ initializer: function initializer() {
2683
+ return 0;
2684
+ }
2685
+ }), _descriptor9 = _applyDecoratedDescriptor(_class3.prototype, 'receivable', [_mobx.observable], {
2686
+ enumerable: true,
2687
+ initializer: function initializer() {
2688
+ return 0;
2689
+ }
2690
+ }), _descriptor10 = _applyDecoratedDescriptor(_class3.prototype, 'paymodes', [_mobx.observable], {
2691
+ enumerable: true,
2692
+ initializer: function initializer() {
2693
+ return [];
2694
+ }
2695
+ }), _descriptor11 = _applyDecoratedDescriptor(_class3.prototype, 'thePaymodes', [_mobx.observable], {
2696
+ enumerable: true,
2697
+ initializer: function initializer() {
2698
+ return [];
2699
+ }
2700
+ }), _descriptor12 = _applyDecoratedDescriptor(_class3.prototype, 'storageCardNo', [_mobx.observable], {
2701
+ enumerable: true,
2702
+ initializer: function initializer() {
2703
+ return null;
2704
+ }
2705
+ }), _descriptor13 = _applyDecoratedDescriptor(_class3.prototype, 'balance', [_mobx.observable], {
2706
+ enumerable: true,
2707
+ initializer: function initializer() {
2708
+ return null;
2709
+ }
2710
+ }), _applyDecoratedDescriptor(_class3.prototype, 'clean', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class3.prototype, 'clean'), _class3.prototype), _applyDecoratedDescriptor(_class3.prototype, 'clear', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class3.prototype, 'clear'), _class3.prototype), _applyDecoratedDescriptor(_class3.prototype, 'calcReserved', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class3.prototype, 'calcReserved'), _class3.prototype), _descriptor14 = _applyDecoratedDescriptor(_class3.prototype, 'calcCheckList', [_mobx.action], {
2711
+ enumerable: true,
2712
+ initializer: function initializer() {
2713
+ var _this21 = this;
2714
+
2715
+ return function () {
2716
+ _this21.checkList = [];
2717
+ };
2718
+ }
2719
+ }), _applyDecoratedDescriptor(_class3.prototype, 'updateMemberStorageCardNo', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class3.prototype, 'updateMemberStorageCardNo'), _class3.prototype), _applyDecoratedDescriptor(_class3.prototype, 'updateCardInfo', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class3.prototype, 'updateCardInfo'), _class3.prototype), _applyDecoratedDescriptor(_class3.prototype, 'calcDjqCheckValue', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class3.prototype, 'calcDjqCheckValue'), _class3.prototype), _descriptor15 = _applyDecoratedDescriptor(_class3.prototype, 'setCouponNum', [_mobx.action], {
2720
+ enumerable: true,
2721
+ initializer: function initializer() {
2722
+ var _this22 = this;
2723
+
2724
+ return function (id, couponNum, promoMethodEnum, nominalAmount, promoDiscount) {
2725
+ _this22.currentMode.djqs.forEach(function (ele) {
2726
+ if (ele.id === id) {
2727
+ ele.amount = promoDiscount;
2728
+ promoMethodEnum == "CASH_COUPON" && (ele.nominalAmount = nominalAmount);
2729
+ ele.couponCategoryEnum = couponNum;
2730
+ var IsEnable = ele.couponCategoryEnum === 'RIGUP' || ele.couponCategoryEnum === 'UN_MATCH' || ele.couponCategoryEnum === "PREPARING" || ele.couponCategoryEnum === 'PROMO_LIMITED' || ele.couponCategoryEnum === 'COUPON_CONFLICT' ? false : true;
2731
+ ele.IsEnable = IsEnable;
2732
+ }
2733
+ });
2734
+ };
2735
+ }
2736
+ }), _descriptor16 = _applyDecoratedDescriptor(_class3.prototype, 'addDjqs', [_mobx.action], {
2737
+ enumerable: true,
2738
+ initializer: function initializer() {
2739
+ var _this23 = this;
2740
+
2741
+ return function (promoCouponCode, name, IsEnable, nominalAmount, amount, doorsill, LastTS, checked, IsRepelWithPoints, UMemberID, expired, displayText, promoMethodEnum, discountPct, promoId, promoRuleId, couponCategoryEnum, id) {
2742
+ var djq = {
2743
+ promoCouponCode: promoCouponCode,
2744
+ name: name,
2745
+ IsEnable: IsEnable,
2746
+ nominalAmount: nominalAmount,
2747
+ amount: amount,
2748
+ doorsill: doorsill,
2749
+ LastTS: LastTS,
2750
+ checked: checked,
2751
+ IsRepelWithPoints: IsRepelWithPoints,
2752
+ UMemberID: UMemberID,
2753
+ expired: expired,
2754
+ displayText: displayText,
2755
+ promoMethodEnum: promoMethodEnum,
2756
+ discountPct: discountPct,
2757
+ promoId: promoId,
2758
+ promoRuleId: promoRuleId,
2759
+ couponCategoryEnum: couponCategoryEnum,
2760
+ id: id
2761
+ };
2762
+ _this23.currentMode.djqs.push(djq);
2763
+ };
2764
+ }
2765
+ }), _applyDecoratedDescriptor(_class3.prototype, 'calcDjqValue', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class3.prototype, 'calcDjqValue'), _class3.prototype), _applyDecoratedDescriptor(_class3.prototype, 'reCalculationDjqs', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class3.prototype, 'reCalculationDjqs'), _class3.prototype), _applyDecoratedDescriptor(_class3.prototype, 'clearDjqs', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class3.prototype, 'clearDjqs'), _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);
2766
+ var Member = exports.Member = (_class5 = function () {
2767
+ function Member(m) {
2768
+ var _this24 = this;
2769
+
2770
+ (0, _classCallCheck3.default)(this, Member);
2771
+
2772
+ _initDefineProp(this, 'cardNo', _descriptor17, this);
2773
+
2774
+ _initDefineProp(this, 'balance', _descriptor18, this);
2775
+
2776
+ _initDefineProp(this, 'exchangable', _descriptor19, this);
2777
+
2778
+ _initDefineProp(this, 'meStorageCardId', _descriptor20, this);
2779
+
2780
+ _initDefineProp(this, 'storageCardNo', _descriptor21, this);
2781
+
2782
+ if (m) {
2783
+ this.id = m.ID;
2784
+ this.uid = m.Uid;
2785
+ this.type = m.MemberType ? m.MemberType.Name : "普通";
2786
+ this.rawbalance = m.BalanceStorage;
2787
+ var index = (0, _findIndex3.default)(m.DynamicPropertyKeys, function (key) {
2788
+ return key == 'canusedbalancestorage';
2789
+ });
2790
+ (0, _mobx.runInAction)(function () {
2791
+ _this24.cardNo = m.CardCode;
2792
+ if (index >= 0) {
2793
+ _this24.balance = parseFloat(m.DynamicPropertyValues[index]);
2794
+ } else {
2795
+ _this24.balance = _this24.rawbalance;
2796
+ }
2797
+ });
2798
+ this.needPwd = m.MemberType ? m.MemberType.IsNeedPwd : false;
2799
+ this.NeedModifyPassword = m.NeedModifyPassword;
2800
+ this.bonusPoints = m.BalanceIntegral;
2801
+ }
2802
+ }
2803
+
2804
+ (0, _createClass3.default)(Member, [{
2805
+ key: 'setExchangable',
2806
+ value: function setExchangable(v) {
2807
+ this.exchangable = v;
2808
+ }
2809
+ }, {
2810
+ key: 'setCardNo',
2811
+ value: function setCardNo(v) {
2812
+ this.cardNo = v;
2813
+ this.id = null;
2814
+ }
2815
+ }]);
2816
+ return Member;
2817
+ }(), (_descriptor17 = _applyDecoratedDescriptor(_class5.prototype, 'cardNo', [_mobx.observable], {
2818
+ enumerable: true,
2819
+ initializer: null
2820
+ }), _descriptor18 = _applyDecoratedDescriptor(_class5.prototype, 'balance', [_mobx.observable], {
2821
+ enumerable: true,
2822
+ initializer: null
2823
+ }), _descriptor19 = _applyDecoratedDescriptor(_class5.prototype, 'exchangable', [_mobx.observable], {
2824
+ enumerable: true,
2825
+ initializer: null
2826
+ }), _descriptor20 = _applyDecoratedDescriptor(_class5.prototype, 'meStorageCardId', [_mobx.observable], {
2827
+ enumerable: true,
2828
+ initializer: null
2829
+ }), _descriptor21 = _applyDecoratedDescriptor(_class5.prototype, 'storageCardNo', [_mobx.observable], {
2830
+ enumerable: true,
2831
+ initializer: null
2832
+ }), _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);
2833
+ //# sourceMappingURL=settlementStore.js.map