tplus-member 1.26.3 → 1.27.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (136) hide show
  1. package/locales/zh/tplus-portsetting.json +1 -1
  2. package/locales/zh-CN/tplus-portsetting.json +1 -1
  3. package/package.json +27 -27
  4. package/dist/api.js +0 -533
  5. package/dist/api.js.map +0 -1
  6. package/dist/controllers/FeedbackController.js +0 -53
  7. package/dist/controllers/FeedbackController.js.map +0 -1
  8. package/dist/controllers/MemberOrderController.js +0 -359
  9. package/dist/controllers/MemberOrderController.js.map +0 -1
  10. package/dist/controllers/OpenCardController.js +0 -289
  11. package/dist/controllers/OpenCardController.js.map +0 -1
  12. package/dist/controllers/defaultConfig.js +0 -19
  13. package/dist/controllers/defaultConfig.js.map +0 -1
  14. package/dist/dataProvider/member.js +0 -144
  15. package/dist/dataProvider/member.js.map +0 -1
  16. package/dist/dataProvider/openCard.js +0 -145
  17. package/dist/dataProvider/openCard.js.map +0 -1
  18. package/dist/domain/member/AuthProcess.js +0 -42
  19. package/dist/domain/member/AuthProcess.js.map +0 -1
  20. package/dist/domain/member/CardCodeChangedProcessor.js +0 -35
  21. package/dist/domain/member/CardCodeChangedProcessor.js.map +0 -1
  22. package/dist/domain/member/CheckCardCodeAndCodeProcessor.js +0 -48
  23. package/dist/domain/member/CheckCardCodeAndCodeProcessor.js.map +0 -1
  24. package/dist/domain/member/CheckMobilephoneFormatProcessor.js +0 -38
  25. package/dist/domain/member/CheckMobilephoneFormatProcessor.js.map +0 -1
  26. package/dist/domain/member/CheckPresentAmountProcessor.js +0 -99
  27. package/dist/domain/member/CheckPresentAmountProcessor.js.map +0 -1
  28. package/dist/domain/member/EffectiveDateChangedProcessor.js +0 -50
  29. package/dist/domain/member/EffectiveDateChangedProcessor.js.map +0 -1
  30. package/dist/domain/member/GetThisPresentAmountProcessor.js +0 -116
  31. package/dist/domain/member/GetThisPresentAmountProcessor.js.map +0 -1
  32. package/dist/domain/member/InitDataDeductionProcessor.js +0 -68
  33. package/dist/domain/member/InitDataDeductionProcessor.js.map +0 -1
  34. package/dist/domain/member/InitDataProcessor.js +0 -140
  35. package/dist/domain/member/InitDataProcessor.js.map +0 -1
  36. package/dist/domain/member/InitDataProjectProcessor.js +0 -102
  37. package/dist/domain/member/InitDataProjectProcessor.js.map +0 -1
  38. package/dist/domain/member/IsMemberEffectiveProcessor.js +0 -45
  39. package/dist/domain/member/IsMemberEffectiveProcessor.js.map +0 -1
  40. package/dist/domain/member/IsMemberEnableProcessor.js +0 -38
  41. package/dist/domain/member/IsMemberEnableProcessor.js.map +0 -1
  42. package/dist/domain/member/IsMemberExpirationProcessor.js +0 -46
  43. package/dist/domain/member/IsMemberExpirationProcessor.js.map +0 -1
  44. package/dist/domain/member/IsMemberPasswordSameProcessor.js +0 -41
  45. package/dist/domain/member/IsMemberPasswordSameProcessor.js.map +0 -1
  46. package/dist/domain/member/IsMemberStorageForStoreProcessor.js +0 -40
  47. package/dist/domain/member/IsMemberStorageForStoreProcessor.js.map +0 -1
  48. package/dist/domain/member/MemberTypeChangedProcessor.js +0 -120
  49. package/dist/domain/member/MemberTypeChangedProcessor.js.map +0 -1
  50. package/dist/domain/member/MobilephoneChangedProcessor.js +0 -39
  51. package/dist/domain/member/MobilephoneChangedProcessor.js.map +0 -1
  52. package/dist/domain/member/PersonProcesser.js +0 -35
  53. package/dist/domain/member/PersonProcesser.js.map +0 -1
  54. package/dist/domain/member/PriuserdefChangedProcessor.js +0 -50
  55. package/dist/domain/member/PriuserdefChangedProcessor.js.map +0 -1
  56. package/dist/domain/operationLog/AddLogProcessor.js +0 -50
  57. package/dist/domain/operationLog/AddLogProcessor.js.map +0 -1
  58. package/dist/domain/operationLog/OperationConfig.js +0 -34
  59. package/dist/domain/operationLog/OperationConfig.js.map +0 -1
  60. package/dist/domain/operationLog/OperationLog.js +0 -146
  61. package/dist/domain/operationLog/OperationLog.js.map +0 -1
  62. package/dist/index.js +0 -124
  63. package/dist/index.js.map +0 -1
  64. package/dist/member/MemberPhoto.js +0 -268
  65. package/dist/member/MemberPhoto.js.map +0 -1
  66. package/dist/member/MemberShow.js +0 -167
  67. package/dist/member/MemberShow.js.map +0 -1
  68. package/dist/member/ShopMember.js +0 -1096
  69. package/dist/member/ShopMember.js.map +0 -1
  70. package/dist/member/ShopMember.less +0 -605
  71. package/dist/member/api.js +0 -726
  72. package/dist/member/api.js.map +0 -1
  73. package/dist/member/color.less +0 -32
  74. package/dist/member/index.js +0 -843
  75. package/dist/member/index.js.map +0 -1
  76. package/dist/member/index.less +0 -466
  77. package/dist/member/memberTab.js +0 -675
  78. package/dist/member/memberTab.js.map +0 -1
  79. package/dist/memberMenu/changeMemberCard/index.js +0 -268
  80. package/dist/memberMenu/changeMemberCard/index.js.map +0 -1
  81. package/dist/memberMenu/changeMemberCard/style.less +0 -43
  82. package/dist/memberMenu/index.js +0 -826
  83. package/dist/memberMenu/index.js.map +0 -1
  84. package/dist/memberMenu/modifyPass/index.js +0 -207
  85. package/dist/memberMenu/modifyPass/index.js.map +0 -1
  86. package/dist/memberMenu/modifyPass/store.js +0 -357
  87. package/dist/memberMenu/modifyPass/store.js.map +0 -1
  88. package/dist/memberMenu/modifyPass/style.less +0 -91
  89. package/dist/memberMenu/style.less +0 -82
  90. package/dist/socket.js +0 -164
  91. package/dist/socket.js.map +0 -1
  92. package/dist/utils.js +0 -246
  93. package/dist/utils.js.map +0 -1
  94. package/dist/viewController/MemberOrderViewController.js +0 -144
  95. package/dist/viewController/MemberOrderViewController.js.map +0 -1
  96. package/dist/viewDoMain/CheckMemberProcessorBlock.js +0 -53
  97. package/dist/viewDoMain/CheckMemberProcessorBlock.js.map +0 -1
  98. package/dist/viewDoMain/CheckMemberStorageProcessorBlock.js +0 -85
  99. package/dist/viewDoMain/CheckMemberStorageProcessorBlock.js.map +0 -1
  100. package/dist/viewDoMain/CheckSelectMemberProcessorBlock.js +0 -69
  101. package/dist/viewDoMain/CheckSelectMemberProcessorBlock.js.map +0 -1
  102. package/dist/viewDoMain/CheckUpdatePasswordProcessorBlock.js +0 -44
  103. package/dist/viewDoMain/CheckUpdatePasswordProcessorBlock.js.map +0 -1
  104. package/dist/viewDoMain/MemberDataChangedProcessorBlock.js +0 -66
  105. package/dist/viewDoMain/MemberDataChangedProcessorBlock.js.map +0 -1
  106. package/dist/viewDoMain/MemberDataPreSaveProcessorBlock.js +0 -79
  107. package/dist/viewDoMain/MemberDataPreSaveProcessorBlock.js.map +0 -1
  108. package/dist/viewModels/MemberDeduction.js +0 -862
  109. package/dist/viewModels/MemberDeduction.js.map +0 -1
  110. package/dist/viewModels/MemberOrder.js +0 -248
  111. package/dist/viewModels/MemberOrder.js.map +0 -1
  112. package/dist/viewModels/MemberProject.js +0 -953
  113. package/dist/viewModels/MemberProject.js.map +0 -1
  114. package/dist/viewModels/MemberStore.js +0 -310
  115. package/dist/viewModels/MemberStore.js.map +0 -1
  116. package/dist/views/commonPerson/commonPerson.less +0 -54
  117. package/dist/views/commonPerson/commonPersonModal.js +0 -459
  118. package/dist/views/commonPerson/commonPersonModal.js.map +0 -1
  119. package/dist/views/memberDeduction/MemberDeductionView.js +0 -837
  120. package/dist/views/memberDeduction/MemberDeductionView.js.map +0 -1
  121. package/dist/views/memberDeduction/deductionSuccess.js +0 -62
  122. package/dist/views/memberDeduction/deductionSuccess.js.map +0 -1
  123. package/dist/views/memberDeduction/memberDeduction.less +0 -238
  124. package/dist/views/memberManage/MemberOrderView.js +0 -427
  125. package/dist/views/memberManage/MemberOrderView.js.map +0 -1
  126. package/dist/views/memberManage/memberOrder.less +0 -72
  127. package/dist/views/memberProject/GroupProjectModal.js +0 -676
  128. package/dist/views/memberProject/GroupProjectModal.js.map +0 -1
  129. package/dist/views/memberProject/MemberProjectView.js +0 -578
  130. package/dist/views/memberProject/MemberProjectView.js.map +0 -1
  131. package/dist/views/memberProject/SelectProjectModal.js +0 -330
  132. package/dist/views/memberProject/SelectProjectModal.js.map +0 -1
  133. package/dist/views/memberProject/memberProject.less +0 -334
  134. package/dist/views/memberRecharge/MemberStoreView.js +0 -546
  135. package/dist/views/memberRecharge/MemberStoreView.js.map +0 -1
  136. package/dist/views/memberRecharge/memberStore.less +0 -148
@@ -1,953 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
-
7
- var _defineProperty = require('babel-runtime/core-js/object/define-property');
8
-
9
- var _defineProperty2 = _interopRequireDefault(_defineProperty);
10
-
11
- var _regenerator = require('babel-runtime/regenerator');
12
-
13
- var _regenerator2 = _interopRequireDefault(_regenerator);
14
-
15
- var _asyncToGenerator2 = require('babel-runtime/helpers/asyncToGenerator');
16
-
17
- var _asyncToGenerator3 = _interopRequireDefault(_asyncToGenerator2);
18
-
19
- var _getOwnPropertyDescriptor = require('babel-runtime/core-js/object/get-own-property-descriptor');
20
-
21
- var _getOwnPropertyDescriptor2 = _interopRequireDefault(_getOwnPropertyDescriptor);
22
-
23
- var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');
24
-
25
- var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
26
-
27
- var _createClass2 = require('babel-runtime/helpers/createClass');
28
-
29
- var _createClass3 = _interopRequireDefault(_createClass2);
30
-
31
- var _desc, _value, _class, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13, _descriptor14, _descriptor15, _descriptor16, _descriptor17, _descriptor18, _descriptor19, _descriptor20, _descriptor21, _descriptor22, _descriptor23, _descriptor24, _descriptor25, _descriptor26, _descriptor27, _descriptor28, _descriptor29, _descriptor30, _descriptor31, _descriptor32, _descriptor33;
32
-
33
- var _mobx = require('mobx');
34
-
35
- var _mutantsAppfx = require('mutants-appfx');
36
-
37
- var _InitDataProjectProcessor = require('../domain/member/InitDataProjectProcessor');
38
-
39
- var _api = require('../api');
40
-
41
- var _api2 = _interopRequireDefault(_api);
42
-
43
- var _moment = require('moment');
44
-
45
- var _moment2 = _interopRequireDefault(_moment);
46
-
47
- var _utils = require('../utils');
48
-
49
- var _tplusPoslogin = require('tplus-poslogin');
50
-
51
- var _tplusComponentsTouch = require('tplus-components-touch');
52
-
53
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
54
-
55
- function _initDefineProp(target, property, descriptor, context) {
56
- if (!descriptor) return;
57
- (0, _defineProperty2.default)(target, property, {
58
- enumerable: descriptor.enumerable,
59
- configurable: descriptor.configurable,
60
- writable: descriptor.writable,
61
- value: descriptor.initializer ? descriptor.initializer.call(context) : void 0
62
- });
63
- }
64
-
65
- function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
66
- var desc = {};
67
- Object['ke' + 'ys'](descriptor).forEach(function (key) {
68
- desc[key] = descriptor[key];
69
- });
70
- desc.enumerable = !!desc.enumerable;
71
- desc.configurable = !!desc.configurable;
72
-
73
- if ('value' in desc || desc.initializer) {
74
- desc.writable = true;
75
- }
76
-
77
- desc = decorators.slice().reverse().reduce(function (desc, decorator) {
78
- return decorator(target, property, desc) || desc;
79
- }, desc);
80
-
81
- if (context && desc.initializer !== void 0) {
82
- desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
83
- desc.initializer = undefined;
84
- }
85
-
86
- if (desc.initializer === void 0) {
87
- Object['define' + 'Property'](target, property, desc);
88
- desc = null;
89
- }
90
-
91
- return desc;
92
- }
93
-
94
- function _initializerWarningHelper(descriptor, context) {
95
- throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.');
96
- }
97
-
98
- var MemberProject = (_class = function () {
99
- function MemberProject() {
100
- (0, _classCallCheck3.default)(this, MemberProject);
101
-
102
- _initDefineProp(this, 'data', _descriptor, this);
103
-
104
- _initDefineProp(this, 'salesPerson', _descriptor2, this);
105
-
106
- _initDefineProp(this, 'selectSalesPerson', _descriptor3, this);
107
-
108
- _initDefineProp(this, 'projectSalesPerson', _descriptor4, this);
109
-
110
- _initDefineProp(this, 'group', _descriptor5, this);
111
-
112
- _initDefineProp(this, 'selectGroupList', _descriptor6, this);
113
-
114
- _initDefineProp(this, 'project', _descriptor7, this);
115
-
116
- _initDefineProp(this, 'amount', _descriptor8, this);
117
-
118
- _initDefineProp(this, 'effectiveDate', _descriptor9, this);
119
-
120
- _initDefineProp(this, 'expiryDate', _descriptor10, this);
121
-
122
- _initDefineProp(this, 'isGroup', _descriptor11, this);
123
-
124
- _initDefineProp(this, 'projectList', _descriptor12, this);
125
-
126
- _initDefineProp(this, 'groupQuantity', _descriptor13, this);
127
-
128
- _initDefineProp(this, 'groupAmount', _descriptor14, this);
129
-
130
- _initDefineProp(this, 'projectDetails', _descriptor15, this);
131
-
132
- _initDefineProp(this, 'selectedProjectDetails', _descriptor16, this);
133
-
134
- _initDefineProp(this, 'isOtherStore', _descriptor17, this);
135
-
136
- _initDefineProp(this, 'DataSource', _descriptor18, this);
137
-
138
- _initDefineProp(this, 'Condition', _descriptor19, this);
139
-
140
- _initDefineProp(this, 'isNullPackage', _descriptor20, this);
141
-
142
- _initDefineProp(this, 'totalProjectAmount', _descriptor21, this);
143
-
144
- _initDefineProp(this, 'memberData', _descriptor22, this);
145
-
146
- _initDefineProp(this, 'changeDecimalBuZero', _descriptor23, this);
147
-
148
- _initDefineProp(this, 'clearMoreProjectList', _descriptor24, this);
149
-
150
- _initDefineProp(this, 'getPersonDTOsByStoreID', _descriptor25, this);
151
-
152
- _initDefineProp(this, 'GetServiceProject', _descriptor26, this);
153
-
154
- this.changeProjectDetails = function () {};
155
-
156
- _initDefineProp(this, 'changeOtherStore', _descriptor27, this);
157
-
158
- _initDefineProp(this, 'GetServiceProjectPackageAndDetail', _descriptor28, this);
159
-
160
- _initDefineProp(this, 'changeMemo', _descriptor29, this);
161
-
162
- _initDefineProp(this, 'changeCondition', _descriptor30, this);
163
-
164
- _initDefineProp(this, 'clearDatePicker', _descriptor31, this);
165
-
166
- _initDefineProp(this, 'setDate', _descriptor32, this);
167
-
168
- _initDefineProp(this, 'init', _descriptor33, this);
169
- } //储值业务员
170
- //比例金额页面业务员集合
171
- //储值业务员集合
172
- //套餐
173
- //套餐集合
174
- //项目
175
- //储值金额
176
- //生效日期
177
- //失效日期
178
- //是否选择套餐
179
- //项目列表
180
- //项目列表数量
181
- //项目列表金额
182
- //项目详情集合
183
- //选中的项目详情集合
184
- //是否是他店
185
- //数据范围
186
- //项目名称
187
- // 空套餐
188
- //项目总金额
189
-
190
-
191
- (0, _createClass3.default)(MemberProject, [{
192
- key: 'changeIsGroup',
193
- //会员信息
194
- /*
195
- * 改变权限状态
196
- * params{v}
197
- */
198
- value: function changeIsGroup(v) {
199
- this.isGroup = v;
200
- }
201
-
202
- /*
203
- * 改变储值业务员
204
- * params{v}
205
- */
206
-
207
- }, {
208
- key: 'changeSalesPerson',
209
- value: function changeSalesPerson(v, params, targetIndex) {
210
- if (!params) {
211
- this.salesPerson = v;
212
- }
213
- // this.changeGroupProject()
214
- this.updateGroupProjectPerson(v, targetIndex);
215
- this.handleDetail();
216
- }
217
-
218
- /*
219
- * 重新计算列表的储值人员
220
- * params{v}
221
- */
222
-
223
- }, {
224
- key: 'updateGroupProjectPerson',
225
- value: function updateGroupProjectPerson(v, targetIndex) {
226
- var _ref = this || {},
227
- salesPerson = _ref.salesPerson;
228
-
229
- var personName = v ? v.Name : '';
230
- var personId = v ? v.ID : null;
231
- this.projectList && this.projectList.map(function (newValue, index) {
232
- if (targetIndex !== undefined) {
233
- if (index === targetIndex) {
234
- newValue.person = personName;
235
- newValue.IdPerson = personId;
236
- }
237
- } else {
238
- newValue.person = personName;
239
- newValue.IdPerson = personId;
240
- }
241
- });
242
- }
243
-
244
- /*
245
- * 改变套餐
246
- * params{v}
247
- */
248
-
249
- }, {
250
- key: 'changeGroup',
251
- value: function changeGroup(v) {
252
- var _ref2 = v || {},
253
- _ref2$ServiceProjectD = _ref2.ServiceProjectDetail,
254
- ServiceProjectDetail = _ref2$ServiceProjectD === undefined ? [] : _ref2$ServiceProjectD,
255
- Price = _ref2.Price,
256
- Name = _ref2.Name,
257
- IsLimit = _ref2.IsLimit;
258
-
259
- this.group = v;
260
- this.projectList = ServiceProjectDetail;
261
- this.isNullPackage = ServiceProjectDetail.length ? false : true;
262
- this.isGroup = Name ? false : true;
263
- if (!this.isGroup) {
264
- this.groupAmount = this.changeDecimalBuZero(Price, 2);
265
- }
266
- this.groupQuantity = ServiceProjectDetail && ServiceProjectDetail.length;
267
- this.changeGroupProject();
268
- this.IsLimit = v ? IsLimit : true;
269
- if (v.ValidPeriod) {
270
- this.effectiveDate = (0, _utils.todayDateFormat)();
271
- this.expiryDate = (0, _utils.DateAdd)("m", v.ValidPeriod, new Date());
272
- } else {
273
- this.effectiveDate = v.EffectiveDate ? (0, _moment2.default)(v.EffectiveDate) : '';
274
- this.expiryDate = v.ExpirationDate ? (0, _moment2.default)(v.ExpirationDate) : '';
275
- }
276
- this.data.IdServiceClass = v.ID ? v.ID : '';
277
- this.data.EffectiveDate = this.effectiveDate;
278
- this.data.ExpirationDate = this.expiryDate;
279
- this.handleDetail();
280
- }
281
- }, {
282
- key: 'handleDetail',
283
-
284
-
285
- /*
286
- * 处理Detail
287
- * params{v}
288
- */
289
- value: function handleDetail() {
290
- var arr = [];
291
- var total = 0;
292
- this.projectList && this.projectList.map(function (value) {
293
- var Quantity = value.Quantity,
294
- UnitPrice = value.UnitPrice;
295
-
296
- total += Quantity * UnitPrice;
297
- arr.push({
298
- IdServiceProject: value.ID,
299
- Quantity: value.Quantity,
300
- UnitPrice: value.UnitPrice,
301
- Amount: value.UnitPrice * value.Quantity,
302
- IsPresent: false,
303
- IdPerson: value.IdPerson,
304
- Percentage: value.Percentage,
305
- CommissionAmount: value.CommissionAmount,
306
- CreatedTime: new Date()
307
- });
308
- });
309
- this.totalProjectAmount = total;
310
- this.project = this.projectList;
311
- this.data.Details = arr;
312
- }
313
-
314
- /*
315
- * 从新计算弹出项目列表参数
316
- * params{v}
317
- */
318
-
319
- }, {
320
- key: 'changeGroupProject',
321
- value: function changeGroupProject(params) {
322
- var _this2 = this;
323
-
324
- var arr = [];
325
-
326
- var _ref3 = this || {},
327
- projectList = _ref3.projectList,
328
- salesPerson = _ref3.salesPerson;
329
-
330
- var personName = salesPerson ? salesPerson.Name : '';
331
- var IdPerson = salesPerson ? salesPerson.ID : '';
332
- var total = 0;
333
- var amountPricePrecision = (0, _tplusPoslogin.PosInitData)("PricePrecision");
334
- amountPricePrecision = amountPricePrecision ? parseInt(amountPricePrecision) : '';
335
- projectList && projectList.map(function (v) {
336
- var ID = v.ID,
337
- Name = v.Name,
338
- Quantity = v.Quantity,
339
- UnitPrice = v.UnitPrice;
340
-
341
- total += Quantity * UnitPrice;
342
- var Percentage = null,
343
- CommissionAmount = null;
344
- if (v.Percentage || v.Percentage === 0) {
345
- Percentage = v.Percentage;
346
- CommissionAmount = v.Percentage * Quantity * UnitPrice / 100;
347
- } else {
348
- Percentage = v.SalesmanPerfRate === 0 || v.SalesmanPerfRate ? v.SalesmanPerfRate * 100 : null;
349
- CommissionAmount = v.SalesmanPerfRate === 0 || v.SalesmanPerfRate ? Quantity * UnitPrice * v.SalesmanPerfRate : null;
350
- }
351
- // let Percentage = this.changeDecimalBuZero(percent, amountPrecision);
352
- // if (!/%/.test(Percentage)) {
353
- // Percentage = Percentage + "%"
354
- // }
355
- arr.push({
356
- ID: ID,
357
- Name: Name,
358
- Quantity: Quantity,
359
- UnitPrice: _this2.changeDecimalBuZero(UnitPrice, amountPricePrecision),
360
- person: params ? v.person : personName,
361
- IdPerson: params ? v.IdPerson : IdPerson,
362
- PackageIsLimit: v.IsLimit ? v.IsLimit : true,
363
- Percentage: _this2.changeDecimalBuZero(Percentage, 2),
364
- EffectiveDate: v.EffectiveDate ? v.EffectiveDate : '',
365
- ExpirationDate: v.ExpirationDate ? v.ExpirationDate : '',
366
- isShowOtherStore: false
367
- // CommissionAmount: this.changeDecimalBuZero(CommissionAmount, 2)
368
- });
369
- });
370
- this.projectList = arr;
371
- this.groupQuantity = arr.length;
372
- this.amount = total;
373
- if (this.isGroup) {
374
- this.groupAmount = this.changeDecimalBuZero(total, 2);
375
- // this.totalProjectAmount = this.changeDecimalBuZero(total, 2);
376
- }
377
- this.data.StorageAmount = this.changeDecimalBuZero(this.groupAmount, 2);
378
- }
379
-
380
- /**
381
- * 选择项目列表点击取消
382
- */
383
-
384
- }, {
385
- key: 'changeAmount',
386
-
387
- /*
388
- * 改变储值金额
389
- * params{v}
390
- */
391
- value: function changeAmount(v, params) {
392
- if ('isHandleChange' === params) {
393
- this.groupAmount = this.changeDecimalBuZero(v, 2);
394
- } else {
395
- if (this.isGroup) {
396
- this.groupAmount = this.changeDecimalBuZero(v, 2);
397
- // this.totalProjectAmount = this.changeDecimalBuZero(v, 2);
398
- }
399
- }
400
- if (this.projectList) {
401
- // this.date.EffectiveDate = this.effectiveDate = this.projectList[0].Por
402
- // this.date.ExpirationDate = this.expiryDate
403
- }
404
- this.data.StorageAmount = this.groupAmount;
405
- }
406
-
407
- /*
408
- * 改变项目集合
409
- * params{v}
410
- */
411
-
412
- }, {
413
- key: 'changeProject',
414
- value: function changeProject(v) {
415
- this.projectList = v;
416
- this.handleDetail();
417
- }
418
-
419
- /*
420
- * 改变项目列表
421
- * params{v}
422
- */
423
-
424
- }, {
425
- key: 'changeProjectList',
426
- value: function changeProjectList(v) {
427
- var _this3 = this;
428
-
429
- this.projectList = v;
430
- this.changeGroupProject('project');
431
- if (this.isGroup) {
432
- this.projectList.map(function (value, index) {
433
- if (index === 0) {
434
- _this3.data.EffectiveDate = _this3.effectiveDate = value.EffectiveDate ? (0, _moment2.default)(value.EffectiveDate) : '';
435
- _this3.data.ExpirationDate = _this3.expiryDate = value.ExpirationDate ? (0, _moment2.default)(value.ExpirationDate) : '';
436
- }
437
- });
438
- }
439
- }
440
-
441
- /*
442
- * 改变项目列表-数量
443
- * params{v}
444
- */
445
-
446
- }, {
447
- key: 'changeGroupQuantity',
448
- value: function changeGroupQuantity(v, index) {
449
- this.groupQuantity = v;
450
- }
451
-
452
- /*
453
- * 改变项目列表-金额
454
- * params{v}
455
- */
456
-
457
- }, {
458
- key: 'changeGroupAmount',
459
- value: function changeGroupAmount(v, index) {
460
- if (this.isGroup) {
461
- this.groupAmount = this.changeDecimalBuZero(v, 2);
462
- this.data.StorageAmount = this.groupAmount;
463
- // this.totalProjectAmount = this.changeDecimalBuZero(v, 2);
464
- }
465
- }
466
-
467
- /*
468
- * 更新项目列表
469
- * params{v}
470
- */
471
-
472
- }, {
473
- key: 'updateGroupProjectList',
474
- value: function updateGroupProjectList(arr) {
475
- this.projectList = arr;
476
- }
477
-
478
- /*
479
- * 改变选中的选择项目集合
480
- * params{v}
481
- */
482
-
483
- }, {
484
- key: 'changeSelectedProjectDetails',
485
- value: function changeSelectedProjectDetails(v) {
486
- this.selectedProjectDetails = v;
487
- }
488
-
489
- /*
490
- * 清除项目详情参数
491
- * params{}
492
- */
493
-
494
- }, {
495
- key: 'clearSelectProjectParams',
496
- value: function clearSelectProjectParams() {
497
- this.selectedProjectDetails = [];
498
- }
499
-
500
- /*
501
- * 清除项目列表详情参数
502
- * params{}
503
- */
504
-
505
- }, {
506
- key: 'clearGroupProjectParams',
507
- value: function clearGroupProjectParams() {
508
- this.projectList = null;
509
- this.groupAmount = 0;
510
- this.groupQuantity = 0;
511
- this.data.StorageAmount = this.groupAmount;
512
- this.data.EffectiveDate = this.effectiveDate = '';
513
- this.data.ExpirationDate = this.expiryDate = '';
514
- }
515
-
516
- /*
517
- * 清除项目储值参数
518
- * params{v}
519
- */
520
-
521
- }, {
522
- key: 'clearMemberProjectParams',
523
- value: function clearMemberProjectParams() {
524
- this.isGroup = false;
525
- this.salesPerson = null;
526
- this.group = null;
527
- this.projectList = null;
528
- this.groupAmount = this.changeDecimalBuZero(0, 2);
529
- this.amount = null;
530
- this.effectiveDate = '';
531
- this.expiryDate = '';
532
- this.data.EffectiveDate = '';
533
- this.data.ExpirationDate = '';
534
- }
535
-
536
- /*
537
- * 获取储值业务员
538
- * params{Idstore}
539
- */
540
-
541
-
542
- /*
543
- * 获取项目列表信息
544
- * params{searchValue}
545
- */
546
-
547
- }, {
548
- key: 'changeServiceNumber',
549
-
550
-
551
- /*
552
- * 修改服务人员的业绩比例以及金额
553
- * params{searchValue}
554
- */
555
- value: function changeServiceNumber(targetRecord, amountValue, percentValue) {
556
- this.projectList && this.projectList.map(function (v) {
557
- if (targetRecord.ID === v.ID) {
558
- v.Percentage = percentValue;
559
- v.CommissionAmount = amountValue;
560
- }
561
- });
562
- this.handleDetail();
563
- }
564
-
565
- /*
566
- * 修改他店参数
567
- * params{}
568
- */
569
-
570
- /*
571
- * 获取套餐信息列表
572
- * params{}
573
- */
574
-
575
- /*
576
- * 获取condition
577
- * params{}
578
- */
579
-
580
-
581
- /*
582
- * 清空日期
583
- * params{}
584
- */
585
-
586
-
587
- /*
588
- * 设置日期
589
- * params{}
590
- */
591
-
592
- }]);
593
- return MemberProject;
594
- }(), (_descriptor = _applyDecoratedDescriptor(_class.prototype, 'data', [_mobx.observable], {
595
- enumerable: true,
596
- initializer: null
597
- }), _descriptor2 = _applyDecoratedDescriptor(_class.prototype, 'salesPerson', [_mobx.observable], {
598
- enumerable: true,
599
- initializer: null
600
- }), _descriptor3 = _applyDecoratedDescriptor(_class.prototype, 'selectSalesPerson', [_mobx.observable], {
601
- enumerable: true,
602
- initializer: null
603
- }), _descriptor4 = _applyDecoratedDescriptor(_class.prototype, 'projectSalesPerson', [_mobx.observable], {
604
- enumerable: true,
605
- initializer: null
606
- }), _descriptor5 = _applyDecoratedDescriptor(_class.prototype, 'group', [_mobx.observable], {
607
- enumerable: true,
608
- initializer: null
609
- }), _descriptor6 = _applyDecoratedDescriptor(_class.prototype, 'selectGroupList', [_mobx.observable], {
610
- enumerable: true,
611
- initializer: null
612
- }), _descriptor7 = _applyDecoratedDescriptor(_class.prototype, 'project', [_mobx.observable], {
613
- enumerable: true,
614
- initializer: null
615
- }), _descriptor8 = _applyDecoratedDescriptor(_class.prototype, 'amount', [_mobx.observable], {
616
- enumerable: true,
617
- initializer: null
618
- }), _descriptor9 = _applyDecoratedDescriptor(_class.prototype, 'effectiveDate', [_mobx.observable], {
619
- enumerable: true,
620
- initializer: function initializer() {
621
- return '';
622
- }
623
- }), _descriptor10 = _applyDecoratedDescriptor(_class.prototype, 'expiryDate', [_mobx.observable], {
624
- enumerable: true,
625
- initializer: function initializer() {
626
- return '';
627
- }
628
- }), _descriptor11 = _applyDecoratedDescriptor(_class.prototype, 'isGroup', [_mobx.observable], {
629
- enumerable: true,
630
- initializer: function initializer() {
631
- return true;
632
- }
633
- }), _descriptor12 = _applyDecoratedDescriptor(_class.prototype, 'projectList', [_mobx.observable], {
634
- enumerable: true,
635
- initializer: null
636
- }), _descriptor13 = _applyDecoratedDescriptor(_class.prototype, 'groupQuantity', [_mobx.observable], {
637
- enumerable: true,
638
- initializer: null
639
- }), _descriptor14 = _applyDecoratedDescriptor(_class.prototype, 'groupAmount', [_mobx.observable], {
640
- enumerable: true,
641
- initializer: null
642
- }), _descriptor15 = _applyDecoratedDescriptor(_class.prototype, 'projectDetails', [_mobx.observable], {
643
- enumerable: true,
644
- initializer: null
645
- }), _descriptor16 = _applyDecoratedDescriptor(_class.prototype, 'selectedProjectDetails', [_mobx.observable], {
646
- enumerable: true,
647
- initializer: null
648
- }), _descriptor17 = _applyDecoratedDescriptor(_class.prototype, 'isOtherStore', [_mobx.observable], {
649
- enumerable: true,
650
- initializer: function initializer() {
651
- return false;
652
- }
653
- }), _descriptor18 = _applyDecoratedDescriptor(_class.prototype, 'DataSource', [_mobx.observable], {
654
- enumerable: true,
655
- initializer: function initializer() {
656
- return 2;
657
- }
658
- }), _descriptor19 = _applyDecoratedDescriptor(_class.prototype, 'Condition', [_mobx.observable], {
659
- enumerable: true,
660
- initializer: function initializer() {
661
- return '';
662
- }
663
- }), _descriptor20 = _applyDecoratedDescriptor(_class.prototype, 'isNullPackage', [_mobx.observable], {
664
- enumerable: true,
665
- initializer: null
666
- }), _descriptor21 = _applyDecoratedDescriptor(_class.prototype, 'totalProjectAmount', [_mobx.observable], {
667
- enumerable: true,
668
- initializer: null
669
- }), _descriptor22 = _applyDecoratedDescriptor(_class.prototype, 'memberData', [_mobx.observable], {
670
- enumerable: true,
671
- initializer: null
672
- }), _applyDecoratedDescriptor(_class.prototype, 'changeIsGroup', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'changeIsGroup'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'changeSalesPerson', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'changeSalesPerson'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'updateGroupProjectPerson', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'updateGroupProjectPerson'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'changeGroup', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'changeGroup'), _class.prototype), _descriptor23 = _applyDecoratedDescriptor(_class.prototype, 'changeDecimalBuZero', [_mobx.action], {
673
- enumerable: true,
674
- initializer: function initializer() {
675
- return function (number, bitNum) {
676
- if (bitNum == 0) return number;
677
- var f_x = parseFloat(number);
678
- if (isNaN(f_x)) {
679
- return '';
680
- }
681
- var newBitNum = Math.pow(10, bitNum);
682
- f_x = Math.round(number * newBitNum) / newBitNum;
683
- var s_x = f_x.toString();
684
- var pos_decimal = s_x.indexOf('.');
685
- if (pos_decimal < 0) {
686
- pos_decimal = s_x.length;
687
- s_x += '.';
688
- }
689
- while (s_x.length <= pos_decimal + bitNum) {
690
- s_x += '0';
691
- }
692
- return s_x;
693
- };
694
- }
695
- }), _applyDecoratedDescriptor(_class.prototype, 'handleDetail', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'handleDetail'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'changeGroupProject', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'changeGroupProject'), _class.prototype), _descriptor24 = _applyDecoratedDescriptor(_class.prototype, 'clearMoreProjectList', [_mobx.action], {
696
- enumerable: true,
697
- initializer: function initializer() {
698
- var _this4 = this;
699
-
700
- return function () {
701
- _this4.projectList = _this4.project;
702
- // 非项目套餐进行清空
703
- if (_this4.isGroup) {
704
- _this4.groupAmount = 0;
705
- _this4.groupQuantity = 0;
706
- _this4.data.StorageAmount = _this4.groupAmount;
707
- _this4.data.EffectiveDate = _this4.effectiveDate = '';
708
- _this4.data.ExpirationDate = _this4.expiryDate = '';
709
- }
710
- };
711
- }
712
- }), _applyDecoratedDescriptor(_class.prototype, 'changeAmount', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'changeAmount'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'changeProject', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'changeProject'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'changeProjectList', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'changeProjectList'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'changeGroupQuantity', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'changeGroupQuantity'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'changeGroupAmount', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'changeGroupAmount'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'updateGroupProjectList', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'updateGroupProjectList'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'changeSelectedProjectDetails', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'changeSelectedProjectDetails'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'clearSelectProjectParams', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'clearSelectProjectParams'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'clearGroupProjectParams', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'clearGroupProjectParams'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'clearMemberProjectParams', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'clearMemberProjectParams'), _class.prototype), _descriptor25 = _applyDecoratedDescriptor(_class.prototype, 'getPersonDTOsByStoreID', [_mobx.action], {
713
- enumerable: true,
714
- initializer: function initializer() {
715
- var _this5 = this;
716
-
717
- return function () {
718
- var _ref4 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee(isOtherStore, params) {
719
- return _regenerator2.default.wrap(function _callee$(_context) {
720
- while (1) {
721
- switch (_context.prev = _context.next) {
722
- case 0:
723
- _context.next = 2;
724
- return _api2.default.GetPersonDTOsByStoreID(_this5.data.Idstore, isOtherStore).then(function (ret) {
725
- (0, _mobx.runInAction)(function () {
726
- if (params) {
727
- _this5.projectSalesPerson = ret;
728
- } else {
729
- _this5.selectSalesPerson = ret;
730
- }
731
- });
732
- });
733
-
734
- case 2:
735
- case 'end':
736
- return _context.stop();
737
- }
738
- }
739
- }, _callee, _this5);
740
- }));
741
-
742
- return function (_x, _x2) {
743
- return _ref4.apply(this, arguments);
744
- };
745
- }();
746
- }
747
- }), _descriptor26 = _applyDecoratedDescriptor(_class.prototype, 'GetServiceProject', [_mobx.action], {
748
- enumerable: true,
749
- initializer: function initializer() {
750
- var _this6 = this;
751
-
752
- return function () {
753
- var _ref5 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2(DataSource, Condition, callback) {
754
- return _regenerator2.default.wrap(function _callee2$(_context2) {
755
- while (1) {
756
- switch (_context2.prev = _context2.next) {
757
- case 0:
758
- _context2.next = 2;
759
- return _api2.default.GetServiceProject(DataSource, Condition).then(function (ret) {
760
- (0, _mobx.runInAction)(function () {
761
- _this6.projectDetails = ret.Data;
762
- callback && callback();
763
- });
764
- });
765
-
766
- case 2:
767
- case 'end':
768
- return _context2.stop();
769
- }
770
- }
771
- }, _callee2, _this6);
772
- }));
773
-
774
- return function (_x3, _x4, _x5) {
775
- return _ref5.apply(this, arguments);
776
- };
777
- }();
778
- }
779
- }), _applyDecoratedDescriptor(_class.prototype, 'changeServiceNumber', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'changeServiceNumber'), _class.prototype), _descriptor27 = _applyDecoratedDescriptor(_class.prototype, 'changeOtherStore', [_mobx.action], {
780
- enumerable: true,
781
- initializer: function initializer() {
782
- var _this7 = this;
783
-
784
- return function () {
785
- var _ref6 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee3(params, targetIndex) {
786
- return _regenerator2.default.wrap(function _callee3$(_context3) {
787
- while (1) {
788
- switch (_context3.prev = _context3.next) {
789
- case 0:
790
- _this7.isOtherStore = !_this7.isOtherStore;
791
- if (params !== 'project') {
792
- _this7.projectList[targetIndex].isShowOtherStore = !_this7.projectList[targetIndex].isShowOtherStore;
793
- _this7.getPersonDTOsByStoreID(_this7.projectList[targetIndex].isShowOtherStore, params);
794
- } else {
795
- _this7.getPersonDTOsByStoreID(_this7.isOtherStore, params);
796
- }
797
-
798
- case 2:
799
- case 'end':
800
- return _context3.stop();
801
- }
802
- }
803
- }, _callee3, _this7);
804
- }));
805
-
806
- return function (_x6, _x7) {
807
- return _ref6.apply(this, arguments);
808
- };
809
- }();
810
- }
811
- }), _descriptor28 = _applyDecoratedDescriptor(_class.prototype, 'GetServiceProjectPackageAndDetail', [_mobx.action], {
812
- enumerable: true,
813
- initializer: function initializer() {
814
- var _this8 = this;
815
-
816
- return function () {
817
- var _ref7 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee4(DataSource, Condition) {
818
- return _regenerator2.default.wrap(function _callee4$(_context4) {
819
- while (1) {
820
- switch (_context4.prev = _context4.next) {
821
- case 0:
822
- _context4.next = 2;
823
- return _api2.default.GetServiceProjectPackageAndDetail(DataSource, Condition).then(function (ret) {
824
- (0, _mobx.runInAction)(function () {
825
- _this8.selectGroupList = ret.Data;
826
- });
827
- });
828
-
829
- case 2:
830
- case 'end':
831
- return _context4.stop();
832
- }
833
- }
834
- }, _callee4, _this8);
835
- }));
836
-
837
- return function (_x8, _x9) {
838
- return _ref7.apply(this, arguments);
839
- };
840
- }();
841
- }
842
- }), _descriptor29 = _applyDecoratedDescriptor(_class.prototype, 'changeMemo', [_mobx.action], {
843
- enumerable: true,
844
- initializer: function initializer() {
845
- var _this9 = this;
846
-
847
- return function (value) {
848
- _this9.data.Memo = value;
849
- };
850
- }
851
- }), _descriptor30 = _applyDecoratedDescriptor(_class.prototype, 'changeCondition', [_mobx.action], {
852
- enumerable: true,
853
- initializer: function initializer() {
854
- var _this10 = this;
855
-
856
- return function () {
857
- var _ref8 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee5(val) {
858
- return _regenerator2.default.wrap(function _callee5$(_context5) {
859
- while (1) {
860
- switch (_context5.prev = _context5.next) {
861
- case 0:
862
- _this10.Condition = val;
863
-
864
- case 1:
865
- case 'end':
866
- return _context5.stop();
867
- }
868
- }
869
- }, _callee5, _this10);
870
- }));
871
-
872
- return function (_x10) {
873
- return _ref8.apply(this, arguments);
874
- };
875
- }();
876
- }
877
- }), _descriptor31 = _applyDecoratedDescriptor(_class.prototype, 'clearDatePicker', [_mobx.action], {
878
- enumerable: true,
879
- initializer: function initializer() {
880
- var _this11 = this;
881
-
882
- return function (params) {
883
- if (params === 'effective') {
884
- _this11.data.EffectiveDate = _this11.effectiveDate = '';
885
- }
886
- if (params === 'expiry') {
887
- _this11.data.ExpirationDate = _this11.expiryDate = '';
888
- }
889
- };
890
- }
891
- }), _descriptor32 = _applyDecoratedDescriptor(_class.prototype, 'setDate', [_mobx.action], {
892
- enumerable: true,
893
- initializer: function initializer() {
894
- var _this12 = this;
895
-
896
- return function () {
897
- var _ref9 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee6(params, date) {
898
- return _regenerator2.default.wrap(function _callee6$(_context6) {
899
- while (1) {
900
- switch (_context6.prev = _context6.next) {
901
- case 0:
902
- if (params === 'effective') {
903
- _this12.effectiveDate = date;
904
- _this12.data.EffectiveDate = _this12.effectiveDate;
905
- }
906
- if (params === 'expiry') {
907
- _this12.expiryDate = date;
908
- _this12.data.ExpirationDate = _this12.expiryDate;
909
- }
910
-
911
- case 2:
912
- case 'end':
913
- return _context6.stop();
914
- }
915
- }
916
- }, _callee6, _this12);
917
- }));
918
-
919
- return function (_x11, _x12) {
920
- return _ref9.apply(this, arguments);
921
- };
922
- }();
923
- }
924
- }), _descriptor33 = _applyDecoratedDescriptor(_class.prototype, 'init', [_mobx.action], {
925
- enumerable: true,
926
- initializer: function initializer() {
927
- var _this13 = this;
928
-
929
- return function (_ref10) {
930
- var member = _ref10.member,
931
- settlementControlEvent = _ref10.settlementControlEvent,
932
- callback = _ref10.callback;
933
-
934
- _this13.isGroup = true;
935
- _this13.IsLimit = true;
936
- var _this = _this13;
937
- _this13.memberData = member;
938
- _api2.default.getMemberVoucherDataInfo().then(function (ret) {
939
- //获取datainfo数据 生成data
940
- (0, _mobx.runInAction)(function () {
941
- _this.data = new _mutantsAppfx.DataModel({}, '001');
942
- _this13.memberData = member;
943
- _InitDataProjectProcessor.InitProjectDataProcessor.execute(_this.data, member);
944
- _this.settlementControlEvent = settlementControlEvent;
945
- callback && callback();
946
- console.log('====会员项目储值data====', _this.data);
947
- });
948
- });
949
- };
950
- }
951
- })), _class);
952
- exports.default = { 'memberProjectStore': new MemberProject() };
953
- //# sourceMappingURL=MemberProject.js.map