tplus-member 3.28.6 → 3.28.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/domain/member/AuthProcess.js +40 -0
- package/dist/domain/member/AuthProcess.js.map +1 -0
- package/dist/domain/member/CardCodeChangedProcessor.js +35 -0
- package/dist/domain/member/CardCodeChangedProcessor.js.map +1 -0
- package/dist/domain/member/CheckCardCodeAndCodeProcessor.js +48 -0
- package/dist/domain/member/CheckCardCodeAndCodeProcessor.js.map +1 -0
- package/dist/domain/member/CheckMobilephoneFormatProcessor.js +38 -0
- package/dist/domain/member/CheckMobilephoneFormatProcessor.js.map +1 -0
- package/dist/domain/member/CheckPresentAmountProcessor.js +99 -0
- package/dist/domain/member/CheckPresentAmountProcessor.js.map +1 -0
- package/dist/domain/member/EffectiveDateChangedProcessor.js +57 -0
- package/dist/domain/member/EffectiveDateChangedProcessor.js.map +1 -0
- package/dist/domain/member/GetThisPresentAmountProcessor.js +112 -0
- package/dist/domain/member/GetThisPresentAmountProcessor.js.map +1 -0
- package/dist/domain/member/InitDataProcessor.js +153 -0
- package/dist/domain/member/InitDataProcessor.js.map +1 -0
- package/dist/domain/member/IsMemberEffectiveProcessor.js +45 -0
- package/dist/domain/member/IsMemberEffectiveProcessor.js.map +1 -0
- package/dist/domain/member/IsMemberEnableProcessor.js +42 -0
- package/dist/domain/member/IsMemberEnableProcessor.js.map +1 -0
- package/dist/domain/member/IsMemberExpirationProcessor.js +46 -0
- package/dist/domain/member/IsMemberExpirationProcessor.js.map +1 -0
- package/dist/domain/member/IsMemberPasswordSameProcessor.js +41 -0
- package/dist/domain/member/IsMemberPasswordSameProcessor.js.map +1 -0
- package/dist/domain/member/IsMemberStorageForStoreProcessor.js +46 -0
- package/dist/domain/member/IsMemberStorageForStoreProcessor.js.map +1 -0
- package/dist/domain/member/MemberTypeChangedProcessor.js +127 -0
- package/dist/domain/member/MemberTypeChangedProcessor.js.map +1 -0
- package/dist/domain/member/MobilephoneChangedProcessor.js +39 -0
- package/dist/domain/member/MobilephoneChangedProcessor.js.map +1 -0
- package/dist/domain/member/PersonProcesser.js +35 -0
- package/dist/domain/member/PersonProcesser.js.map +1 -0
- package/dist/domain/member/PriuserdefChangedProcessor.js +50 -0
- package/dist/domain/member/PriuserdefChangedProcessor.js.map +1 -0
- package/dist/domain/operationLog/AddLogProcessor.js +46 -0
- package/dist/domain/operationLog/AddLogProcessor.js.map +1 -0
- package/dist/domain/operationLog/OperationConfig.js +34 -0
- package/dist/domain/operationLog/OperationConfig.js.map +1 -0
- package/dist/domain/operationLog/OperationLog.js +170 -0
- package/dist/domain/operationLog/OperationLog.js.map +1 -0
- package/dist/member/ShopMember.js +1217 -0
- package/dist/member/ShopMember.js.map +1 -0
- package/dist/member/ShopMember.less +24 -0
- package/dist/member/api.js +33 -0
- package/dist/member/api.js.map +1 -1
- package/dist/member/index.js +129 -115
- package/dist/member/index.js.map +1 -1
- package/dist/member/memberMenu/changeMemberCard/index.js +260 -0
- package/dist/member/memberMenu/changeMemberCard/index.js.map +1 -0
- package/dist/member/memberMenu/index.js +720 -0
- package/dist/member/memberMenu/index.js.map +1 -0
- package/dist/member/memberMenu/modifyPass/index.js +391 -0
- package/dist/member/memberMenu/modifyPass/index.js.map +1 -0
- package/dist/member/memberMenu/modifyPass/store.js +321 -0
- package/dist/member/memberMenu/modifyPass/store.js.map +1 -0
- package/dist/member/memberTab.js +604 -0
- package/dist/member/memberTab.js.map +1 -0
- package/dist/stores/MemberStore.js +536 -0
- package/dist/stores/MemberStore.js.map +1 -0
- package/dist/stores/index.js +16 -0
- package/dist/stores/index.js.map +1 -0
- package/dist/viewController/MemberOrderViewController.js +144 -0
- package/dist/viewController/MemberOrderViewController.js.map +1 -0
- package/dist/viewDoMain/CheckMemberProcessorBlock.js +56 -0
- package/dist/viewDoMain/CheckMemberProcessorBlock.js.map +1 -0
- package/dist/viewDoMain/CheckMemberStorageProcessorBlock.js +85 -0
- package/dist/viewDoMain/CheckMemberStorageProcessorBlock.js.map +1 -0
- package/dist/viewDoMain/CheckSelectMemberProcessorBlock.js +69 -0
- package/dist/viewDoMain/CheckSelectMemberProcessorBlock.js.map +1 -0
- package/dist/viewDoMain/CheckUpdatePasswordProcessorBlock.js +44 -0
- package/dist/viewDoMain/CheckUpdatePasswordProcessorBlock.js.map +1 -0
- package/dist/viewDoMain/MemberDataChangedProcessorBlock.js +66 -0
- package/dist/viewDoMain/MemberDataChangedProcessorBlock.js.map +1 -0
- package/dist/viewDoMain/MemberDataPreSaveProcessorBlock.js +79 -0
- package/dist/viewDoMain/MemberDataPreSaveProcessorBlock.js.map +1 -0
- package/dist/viewDoMain/StorageAmountChangedProcessorBlock.js +136 -0
- package/dist/viewDoMain/StorageAmountChangedProcessorBlock.js.map +1 -0
- package/dist/viewModels/memberVoucher.js +269 -0
- package/dist/viewModels/memberVoucher.js.map +1 -0
- package/dist/views/MemberOrderView.js +435 -0
- package/dist/views/MemberOrderView.js.map +1 -0
- package/dist/views/MemberStoreNewView.js +538 -0
- package/dist/views/MemberStoreNewView.js.map +1 -0
- package/dist/views/MemberStoreView.js +441 -0
- package/dist/views/MemberStoreView.js.map +1 -0
- package/dist/views/MemberStoreViewContainer.js +72 -0
- package/dist/views/MemberStoreViewContainer.js.map +1 -0
- package/dist/views/PresetDetailView.js +88 -0
- package/dist/views/PresetDetailView.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.AuthProcess = undefined;
|
|
7
|
+
|
|
8
|
+
var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');
|
|
9
|
+
|
|
10
|
+
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
|
|
11
|
+
|
|
12
|
+
var _createClass2 = require('babel-runtime/helpers/createClass');
|
|
13
|
+
|
|
14
|
+
var _createClass3 = _interopRequireDefault(_createClass2);
|
|
15
|
+
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
+
|
|
18
|
+
var AuthProcess = exports.AuthProcess = function () {
|
|
19
|
+
function AuthProcess() {
|
|
20
|
+
(0, _classCallCheck3.default)(this, AuthProcess);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
(0, _createClass3.default)(AuthProcess, null, [{
|
|
24
|
+
key: 'execute',
|
|
25
|
+
value: function execute(name) {
|
|
26
|
+
var operations = PosInitData('FunctionAuth');
|
|
27
|
+
if (operations) {
|
|
28
|
+
for (var index = 0; index < operations.length; index++) {
|
|
29
|
+
var operation = operations[index];
|
|
30
|
+
if (name + '' == operation + '') {
|
|
31
|
+
return true;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return false;
|
|
36
|
+
}
|
|
37
|
+
}]);
|
|
38
|
+
return AuthProcess;
|
|
39
|
+
}();
|
|
40
|
+
//# sourceMappingURL=AuthProcess.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["tplus-member/domain/member/AuthProcess.js"],"names":["AuthProcess","name","operations","PosInitData","index","length","operation"],"mappings":";;;;;;;;;;;;;;;;;IAAaA,W,WAAAA,W;;;;;;;gCAEMC,I,EAAM;AACjB,gBAAIC,aAAaC,YAAY,cAAZ,CAAjB;AACA,gBAAID,UAAJ,EAAgB;AACZ,qBAAK,IAAIE,QAAQ,CAAjB,EAAoBA,QAAQF,WAAWG,MAAvC,EAA+CD,OAA/C,EAAwD;AACpD,wBAAME,YAAYJ,WAAWE,KAAX,CAAlB;AACA,wBAAKH,OAAO,EAAR,IAAgBK,YAAY,EAAhC,EAAqC;AACjC,+BAAO,IAAP;AACH;AACJ;AACJ;AACD,mBAAO,KAAP;AACH","file":"AuthProcess.js","sourcesContent":["export class AuthProcess\r\n{\r\n static execute(name) {\r\n let operations = PosInitData('FunctionAuth');\r\n if (operations) {\r\n for (let index = 0; index < operations.length; index++) {\r\n const operation = operations[index];\r\n if ((name + '') == (operation + '')) {\r\n return true;\r\n }\r\n }\r\n }\r\n return false\r\n } \r\n}"]}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.CardCodeChangedProcessor = undefined;
|
|
7
|
+
|
|
8
|
+
var _classCallCheck2 = require("babel-runtime/helpers/classCallCheck");
|
|
9
|
+
|
|
10
|
+
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
|
|
11
|
+
|
|
12
|
+
var _createClass2 = require("babel-runtime/helpers/createClass");
|
|
13
|
+
|
|
14
|
+
var _createClass3 = _interopRequireDefault(_createClass2);
|
|
15
|
+
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* 会员卡号改变时
|
|
20
|
+
*/
|
|
21
|
+
var CardCodeChangedProcessor = exports.CardCodeChangedProcessor = function () {
|
|
22
|
+
function CardCodeChangedProcessor() {
|
|
23
|
+
(0, _classCallCheck3.default)(this, CardCodeChangedProcessor);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
(0, _createClass3.default)(CardCodeChangedProcessor, null, [{
|
|
27
|
+
key: "execute",
|
|
28
|
+
value: function execute(memberData, changed) {
|
|
29
|
+
var cardcode = changed["CardCode"];
|
|
30
|
+
memberData["Code"] = cardcode;
|
|
31
|
+
}
|
|
32
|
+
}]);
|
|
33
|
+
return CardCodeChangedProcessor;
|
|
34
|
+
}();
|
|
35
|
+
//# sourceMappingURL=CardCodeChangedProcessor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["tplus-member/domain/member/CardCodeChangedProcessor.js"],"names":["CardCodeChangedProcessor","memberData","changed","cardcode"],"mappings":";;;;;;;;;;;;;;;;;AAAA;;;IAGcA,wB,WAAAA,wB;;;;;;;8BAEMC,U,EAAWC,O,EAC1B;AACG,aAAIC,WAASD,QAAQ,UAAR,CAAb;AACAD,oBAAW,MAAX,IAAmBE,QAAnB;AACF","file":"CardCodeChangedProcessor.js","sourcesContent":["/**\r\n * 会员卡号改变时\r\n */\r\n export class CardCodeChangedProcessor\r\n {\r\n static execute(memberData,changed)\r\n {\r\n let cardcode=changed[\"CardCode\"];\r\n memberData[\"Code\"]=cardcode;\r\n }\r\n }"]}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.CheckCardCodeAndCodeProcessor = undefined;
|
|
7
|
+
|
|
8
|
+
var _classCallCheck2 = require("babel-runtime/helpers/classCallCheck");
|
|
9
|
+
|
|
10
|
+
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
|
|
11
|
+
|
|
12
|
+
var _createClass2 = require("babel-runtime/helpers/createClass");
|
|
13
|
+
|
|
14
|
+
var _createClass3 = _interopRequireDefault(_createClass2);
|
|
15
|
+
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* 校验会员编号和卡号
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
var CheckCardCodeAndCodeProcessor = exports.CheckCardCodeAndCodeProcessor = function () {
|
|
23
|
+
function CheckCardCodeAndCodeProcessor() {
|
|
24
|
+
(0, _classCallCheck3.default)(this, CheckCardCodeAndCodeProcessor);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
(0, _createClass3.default)(CheckCardCodeAndCodeProcessor, null, [{
|
|
28
|
+
key: "execute",
|
|
29
|
+
value: function execute(memberData) {
|
|
30
|
+
var code = memberData["Code"];
|
|
31
|
+
var cardcode = memberData["CardCode"];
|
|
32
|
+
if (code == null) {
|
|
33
|
+
code = cardcode;
|
|
34
|
+
memberData["Code"] = cardcode;
|
|
35
|
+
}
|
|
36
|
+
if (cardcode == null) {
|
|
37
|
+
cardcode = code;
|
|
38
|
+
memberData["CardCode"] = code;
|
|
39
|
+
}
|
|
40
|
+
if (cardcode == null || code == null) {
|
|
41
|
+
return false;
|
|
42
|
+
}
|
|
43
|
+
return true;
|
|
44
|
+
}
|
|
45
|
+
}]);
|
|
46
|
+
return CheckCardCodeAndCodeProcessor;
|
|
47
|
+
}();
|
|
48
|
+
//# sourceMappingURL=CheckCardCodeAndCodeProcessor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["tplus-member/domain/member/CheckCardCodeAndCodeProcessor.js"],"names":["CheckCardCodeAndCodeProcessor","memberData","code","cardcode"],"mappings":";;;;;;;;;;;;;;;;;AAAA;;;;IAIcA,6B,WAAAA,6B;;;;;;;gCAEMC,U,EACf;AACI,gBAAIC,OAAKD,WAAW,MAAX,CAAT;AACA,gBAAIE,WAASF,WAAW,UAAX,CAAb;AACA,gBAAGC,QAAM,IAAT,EACA;AACIA,uBAAKC,QAAL;AACDF,2BAAW,MAAX,IAAmBE,QAAnB;AACF;AACD,gBAAGA,YAAU,IAAb,EACA;AACIA,2BAASD,IAAT;AACDD,2BAAW,UAAX,IAAuBC,IAAvB;AACF;AACD,gBAAGC,YAAU,IAAV,IAAgBD,QAAM,IAAzB,EACA;AACI,uBAAO,KAAP;AACH;AACD,mBAAO,IAAP;AACH","file":"CheckCardCodeAndCodeProcessor.js","sourcesContent":["/**\r\n * 校验会员编号和卡号\r\n */\r\n\r\n export class CheckCardCodeAndCodeProcessor\r\n {\r\n static execute(memberData)\r\n {\r\n var code=memberData[\"Code\"];\r\n var cardcode=memberData[\"CardCode\"];\r\n if(code==null)\r\n {\r\n code=cardcode;\r\n memberData[\"Code\"]=cardcode;\r\n }\r\n if(cardcode==null)\r\n {\r\n cardcode=code;\r\n memberData[\"CardCode\"]=code;\r\n }\r\n if(cardcode==null||code==null)\r\n {\r\n return false;\r\n }\r\n return true;\r\n }\r\n }"]}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.CheckMobilephoneFormatProcessor = undefined;
|
|
7
|
+
|
|
8
|
+
var _classCallCheck2 = require("babel-runtime/helpers/classCallCheck");
|
|
9
|
+
|
|
10
|
+
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
|
|
11
|
+
|
|
12
|
+
var _createClass2 = require("babel-runtime/helpers/createClass");
|
|
13
|
+
|
|
14
|
+
var _createClass3 = _interopRequireDefault(_createClass2);
|
|
15
|
+
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* 判断会员手机号
|
|
20
|
+
*/
|
|
21
|
+
var CheckMobilephoneFormatProcessor = exports.CheckMobilephoneFormatProcessor = function () {
|
|
22
|
+
function CheckMobilephoneFormatProcessor() {
|
|
23
|
+
(0, _classCallCheck3.default)(this, CheckMobilephoneFormatProcessor);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
(0, _createClass3.default)(CheckMobilephoneFormatProcessor, null, [{
|
|
27
|
+
key: "execute",
|
|
28
|
+
value: function execute(memberDTO) {
|
|
29
|
+
var phone = memberDTO["Mobilephone"];
|
|
30
|
+
if (phone != '' && phone != null && !/^1\d{10}$/.test(phone)) {
|
|
31
|
+
return false;
|
|
32
|
+
}
|
|
33
|
+
return true;
|
|
34
|
+
}
|
|
35
|
+
}]);
|
|
36
|
+
return CheckMobilephoneFormatProcessor;
|
|
37
|
+
}();
|
|
38
|
+
//# sourceMappingURL=CheckMobilephoneFormatProcessor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["tplus-member/domain/member/CheckMobilephoneFormatProcessor.js"],"names":["CheckMobilephoneFormatProcessor","memberDTO","phone","test"],"mappings":";;;;;;;;;;;;;;;;;AAAA;;;IAGaA,+B,WAAAA,+B;;;;;;;gCACMC,S,EAAW;AACtB,gBAAIC,QAAOD,UAAU,aAAV,CAAX;AACA,gBAAGC,SAAO,EAAP,IAAaA,SAAO,IAApB,IACA,CAAE,YAAYC,IAAZ,CAAiBD,KAAjB,CADL,EAC8B;AAC1B,uBAAO,KAAP;AACH;AACD,mBAAO,IAAP;AACH","file":"CheckMobilephoneFormatProcessor.js","sourcesContent":["/**\r\n * 判断会员手机号\r\n */\r\nexport class CheckMobilephoneFormatProcessor {\r\n static execute(memberDTO) {\r\n let phone= memberDTO[\"Mobilephone\"];\r\n if(phone!='' && phone!=null\r\n && !(/^1\\d{10}$/.test(phone))){ \r\n return false;\r\n }\r\n return true;\r\n }\r\n}"]}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.CheckPresentAmountProcessor = undefined;
|
|
7
|
+
|
|
8
|
+
var _regenerator = require("babel-runtime/regenerator");
|
|
9
|
+
|
|
10
|
+
var _regenerator2 = _interopRequireDefault(_regenerator);
|
|
11
|
+
|
|
12
|
+
var _asyncToGenerator2 = require("babel-runtime/helpers/asyncToGenerator");
|
|
13
|
+
|
|
14
|
+
var _asyncToGenerator3 = _interopRequireDefault(_asyncToGenerator2);
|
|
15
|
+
|
|
16
|
+
var _classCallCheck2 = require("babel-runtime/helpers/classCallCheck");
|
|
17
|
+
|
|
18
|
+
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
|
|
19
|
+
|
|
20
|
+
var _createClass2 = require("babel-runtime/helpers/createClass");
|
|
21
|
+
|
|
22
|
+
var _createClass3 = _interopRequireDefault(_createClass2);
|
|
23
|
+
|
|
24
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* 获取本次赠送金额
|
|
28
|
+
*/
|
|
29
|
+
var CheckPresentAmountProcessor = exports.CheckPresentAmountProcessor = function () {
|
|
30
|
+
function CheckPresentAmountProcessor() {
|
|
31
|
+
(0, _classCallCheck3.default)(this, CheckPresentAmountProcessor);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
(0, _createClass3.default)(CheckPresentAmountProcessor, null, [{
|
|
35
|
+
key: "execute",
|
|
36
|
+
value: function () {
|
|
37
|
+
var _ref = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee(dto, param) {
|
|
38
|
+
var isCanUpdate, percentValue, thisPresentAmount, presentAmount;
|
|
39
|
+
return _regenerator2.default.wrap(function _callee$(_context) {
|
|
40
|
+
while (1) {
|
|
41
|
+
switch (_context.prev = _context.next) {
|
|
42
|
+
case 0:
|
|
43
|
+
// 根据选择判断是否可以修改,且设置了比例 tuzha by 2020-06-19
|
|
44
|
+
isCanUpdate = param.isCanUpdate;
|
|
45
|
+
percentValue = param.percentValue;
|
|
46
|
+
|
|
47
|
+
if (isCanUpdate) {
|
|
48
|
+
_context.next = 4;
|
|
49
|
+
break;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
return _context.abrupt("return");
|
|
53
|
+
|
|
54
|
+
case 4:
|
|
55
|
+
if (param.value) {
|
|
56
|
+
_context.next = 8;
|
|
57
|
+
break;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
dto.StorageDetails[0].ThisPresentAmount = 0;
|
|
61
|
+
dto.StorageDetails[0].ThisValidStorageAmount = Math.Add(0, dto.ThisStorageAmount);
|
|
62
|
+
return _context.abrupt("return");
|
|
63
|
+
|
|
64
|
+
case 8:
|
|
65
|
+
thisPresentAmount = Number(param.value);
|
|
66
|
+
|
|
67
|
+
if (percentValue) {
|
|
68
|
+
// 本次储值金额
|
|
69
|
+
|
|
70
|
+
presentAmount = Number(Math.Multiply(dto.StorageDetails[0].ThisStorageAmount, Math.Divide(percentValue, 100)));
|
|
71
|
+
|
|
72
|
+
if (thisPresentAmount > presentAmount) {
|
|
73
|
+
thisPresentAmount = presentAmount;
|
|
74
|
+
}
|
|
75
|
+
dto.StorageDetails[0].ThisPresentAmount = thisPresentAmount;
|
|
76
|
+
} else {
|
|
77
|
+
dto.StorageDetails[0].ThisPresentAmount = thisPresentAmount;
|
|
78
|
+
}
|
|
79
|
+
// 本次有效储值金额
|
|
80
|
+
dto.StorageDetails[0].ThisValidStorageAmount = Math.Add(dto.StorageDetails[0].ThisPresentAmount, dto.ThisStorageAmount);
|
|
81
|
+
|
|
82
|
+
case 11:
|
|
83
|
+
case "end":
|
|
84
|
+
return _context.stop();
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}, _callee, this);
|
|
88
|
+
}));
|
|
89
|
+
|
|
90
|
+
function execute(_x, _x2) {
|
|
91
|
+
return _ref.apply(this, arguments);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
return execute;
|
|
95
|
+
}()
|
|
96
|
+
}]);
|
|
97
|
+
return CheckPresentAmountProcessor;
|
|
98
|
+
}();
|
|
99
|
+
//# sourceMappingURL=CheckPresentAmountProcessor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["tplus-member/domain/member/CheckPresentAmountProcessor.js"],"names":["CheckPresentAmountProcessor","dto","param","isCanUpdate","percentValue","value","StorageDetails","ThisPresentAmount","ThisValidStorageAmount","Math","Add","ThisStorageAmount","thisPresentAmount","Number","presentAmount","Multiply","Divide"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAEA;;;IAGaA,2B,WAAAA,2B;;;;;;;;iHACYC,G,EAAKC,K;;;;;;AACtB;AACIC,2C,GAAcD,MAAMC,W;AACpBC,4C,GAAeF,MAAME,Y;;oCAEpBD,W;;;;;;;;oCAGAD,MAAMG,K;;;;;AACPJ,oCAAIK,cAAJ,CAAmB,CAAnB,EAAsBC,iBAAtB,GAA0C,CAA1C;AACAN,oCAAIK,cAAJ,CAAmB,CAAnB,EAAsBE,sBAAtB,GAA+CC,KAAKC,GAAL,CAAS,CAAT,EAAYT,IAAIU,iBAAhB,CAA/C;;;;AAIAC,iD,GAAoBC,OAAOX,MAAMG,KAAb,C;;AACxB,oCAAID,YAAJ,EAAkB;AACd;;AAEIU,iDAHU,GAGMD,OAAOJ,KAAKM,QAAL,CAAcd,IAAIK,cAAJ,CAAmB,CAAnB,EAAsBK,iBAApC,EAAuDF,KAAKO,MAAL,CAAYZ,YAAZ,EAA0B,GAA1B,CAAvD,CAAP,CAHN;;AAId,wCAAGQ,oBAAkBE,aAArB,EACA;AACIF,4DAAkBE,aAAlB;AACH;AACDb,wCAAIK,cAAJ,CAAmB,CAAnB,EAAsBC,iBAAtB,GAA0CK,iBAA1C;AACH,iCATD,MAWA;AACIX,wCAAIK,cAAJ,CAAmB,CAAnB,EAAsBC,iBAAtB,GAA0CK,iBAA1C;AACH;AACE;AACHX,oCAAIK,cAAJ,CAAmB,CAAnB,EAAsBE,sBAAtB,GAA+CC,KAAKC,GAAL,CAAST,IAAIK,cAAJ,CAAmB,CAAnB,EAAsBC,iBAA/B,EAAkDN,IAAIU,iBAAtD,CAA/C","file":"CheckPresentAmountProcessor.js","sourcesContent":["\r\n\r\n/**\r\n * 获取本次赠送金额\r\n */\r\nexport class CheckPresentAmountProcessor {\r\n static async execute(dto, param) {\r\n // 根据选择判断是否可以修改,且设置了比例 tuzha by 2020-06-19\r\n let isCanUpdate = param.isCanUpdate;\r\n let percentValue = param.percentValue; \r\n \r\n if (!isCanUpdate) {\r\n return;\r\n }\r\n if (!param.value ) {\r\n dto.StorageDetails[0].ThisPresentAmount = 0;\r\n dto.StorageDetails[0].ThisValidStorageAmount = Math.Add(0, dto.ThisStorageAmount);\r\n return;\r\n }\r\n\r\n let thisPresentAmount = Number(param.value); \r\n if (percentValue) {\r\n // 本次储值金额\r\n \r\n let presentAmount = Number(Math.Multiply(dto.StorageDetails[0].ThisStorageAmount, Math.Divide(percentValue, 100)));\r\n if(thisPresentAmount>presentAmount)\r\n {\r\n thisPresentAmount=presentAmount;\r\n }\r\n dto.StorageDetails[0].ThisPresentAmount = thisPresentAmount;\r\n }\r\n else\r\n {\r\n dto.StorageDetails[0].ThisPresentAmount = thisPresentAmount;\r\n }\r\n // 本次有效储值金额\r\n dto.StorageDetails[0].ThisValidStorageAmount = Math.Add(dto.StorageDetails[0].ThisPresentAmount, dto.ThisStorageAmount);\r\n\r\n }\r\n}"]}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.EffectiveDateChangedProcessor = undefined;
|
|
7
|
+
|
|
8
|
+
var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');
|
|
9
|
+
|
|
10
|
+
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
|
|
11
|
+
|
|
12
|
+
var _createClass2 = require('babel-runtime/helpers/createClass');
|
|
13
|
+
|
|
14
|
+
var _createClass3 = _interopRequireDefault(_createClass2);
|
|
15
|
+
|
|
16
|
+
var _tplusComponentsTouch = require('tplus-components-touch');
|
|
17
|
+
|
|
18
|
+
var _mutantsUtil = require('mutants-util');
|
|
19
|
+
|
|
20
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* 生效日期改变时计算失效日期
|
|
24
|
+
*/
|
|
25
|
+
var EffectiveDateChangedProcessor = exports.EffectiveDateChangedProcessor = function () {
|
|
26
|
+
function EffectiveDateChangedProcessor() {
|
|
27
|
+
(0, _classCallCheck3.default)(this, EffectiveDateChangedProcessor);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
(0, _createClass3.default)(EffectiveDateChangedProcessor, null, [{
|
|
31
|
+
key: 'execute',
|
|
32
|
+
value: function execute(isOpen, changed, memberData) {
|
|
33
|
+
if (!isOpen || isOpen && memberData.ExpirationDate == null) {
|
|
34
|
+
var membertype = memberData.MemberType;
|
|
35
|
+
if (membertype.ValidityControlMode != null && membertype.ValidityPeriod != null && membertype.ValidityPeriod > 0) {
|
|
36
|
+
var EffectiveDate = changed["EffectiveDate"];
|
|
37
|
+
var nowDate = new Date(EffectiveDate);
|
|
38
|
+
var stride = membertype.ValidityPeriod;
|
|
39
|
+
|
|
40
|
+
var _enumController$getEn = _mutantsUtil.enumController.getEnumOj(),
|
|
41
|
+
MemberValidityControlMode = _enumController$getEn.MemberValidityControlMode;
|
|
42
|
+
|
|
43
|
+
switch (membertype.ValidityControlMode.Id) {
|
|
44
|
+
case MemberValidityControlMode.year:
|
|
45
|
+
nowDate = nowDate.setFullYear(nowDate.getFullYear() + stride);
|
|
46
|
+
break;
|
|
47
|
+
case MemberValidityControlMode.month:
|
|
48
|
+
nowDate = nowDate.setMonth(nowDate.getMonth() + stride);
|
|
49
|
+
}
|
|
50
|
+
changed["ExpirationDate"] = _tplusComponentsTouch.tools.dateFormat(nowDate);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}]);
|
|
55
|
+
return EffectiveDateChangedProcessor;
|
|
56
|
+
}();
|
|
57
|
+
//# sourceMappingURL=EffectiveDateChangedProcessor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["tplus-member/domain/member/EffectiveDateChangedProcessor.js"],"names":["EffectiveDateChangedProcessor","isOpen","changed","memberData","ExpirationDate","membertype","MemberType","ValidityControlMode","ValidityPeriod","EffectiveDate","nowDate","Date","stride","enumController","getEnumOj","MemberValidityControlMode","Id","year","setFullYear","getFullYear","month","setMonth","getMonth","tools","dateFormat"],"mappings":";;;;;;;;;;;;;;;AAGA;;AACA;;;;AAJA;;;IAMaA,6B,WAAAA,6B;;;;;;;4BAEMC,M,EAAOC,O,EAAQC,U,EAC9B;AACE,UAAG,CAACF,MAAD,IAAUA,UAAQE,WAAWC,cAAX,IAA2B,IAAhD,EACA;AACE,YAAIC,aAAWF,WAAWG,UAA1B;AACA,YAAGD,WAAWE,mBAAX,IAAgC,IAAhC,IAAsCF,WAAWG,cAAX,IAA2B,IAAjE,IAAuEH,WAAWG,cAAX,GAA0B,CAApG,EACA;AACE,cAAIC,gBAAcP,QAAQ,eAAR,CAAlB;AACA,cAAIQ,UAAQ,IAAIC,IAAJ,CAASF,aAAT,CAAZ;AACA,cAAIG,SAAOP,WAAWG,cAAtB;;AAHF,sCAIwCK,4BAAeC,SAAf,EAJxC;AAAA,cAIUC,yBAJV,yBAIUA,yBAJV;;AAKE,kBAAOV,WAAWE,mBAAX,CAA+BS,EAAtC;AAEE,iBAAKD,0BAA0BE,IAA/B;AACEP,wBAAQA,QAAQQ,WAAR,CAAoBR,QAAQS,WAAR,KAAsBP,MAA1C,CAAR;AACA;AACF,iBAAKG,0BAA0BK,KAA/B;AACEV,wBAAQA,QAAQW,QAAR,CAAiBX,QAAQY,QAAR,KAAmBV,MAApC,CAAR;AANJ;AAQAV,kBAAQ,gBAAR,IAA0BqB,4BAAMC,UAAN,CAAiBd,OAAjB,CAA1B;AACD;AACF;AACF","file":"EffectiveDateChangedProcessor.js","sourcesContent":["/**\r\n * 生效日期改变时计算失效日期\r\n */\r\nimport { tools } from 'tplus-components-touch'\r\nimport { enumController } from 'mutants-util';\r\n\r\nexport class EffectiveDateChangedProcessor\r\n{\r\n static execute(isOpen,changed,memberData)\r\n {\r\n if(!isOpen||(isOpen&&memberData.ExpirationDate==null))\r\n {\r\n let membertype=memberData.MemberType;\r\n if(membertype.ValidityControlMode!=null&&membertype.ValidityPeriod!=null&&membertype.ValidityPeriod>0)\r\n {\r\n let EffectiveDate=changed[\"EffectiveDate\"];\r\n let nowDate=new Date(EffectiveDate);\r\n let stride=membertype.ValidityPeriod;\r\n const { MemberValidityControlMode } = enumController.getEnumOj();\r\n switch(membertype.ValidityControlMode.Id)\r\n {\r\n case MemberValidityControlMode.year:\r\n nowDate=nowDate.setFullYear(nowDate.getFullYear()+stride);\r\n break;\r\n case MemberValidityControlMode.month:\r\n nowDate=nowDate.setMonth(nowDate.getMonth()+stride);\r\n }\r\n changed[\"ExpirationDate\"]=tools.dateFormat(nowDate);\r\n }\r\n }\r\n }\r\n}"]}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.GetThisPresentAmountProcessor = undefined;
|
|
7
|
+
|
|
8
|
+
var _regenerator = require('babel-runtime/regenerator');
|
|
9
|
+
|
|
10
|
+
var _regenerator2 = _interopRequireDefault(_regenerator);
|
|
11
|
+
|
|
12
|
+
var _asyncToGenerator2 = require('babel-runtime/helpers/asyncToGenerator');
|
|
13
|
+
|
|
14
|
+
var _asyncToGenerator3 = _interopRequireDefault(_asyncToGenerator2);
|
|
15
|
+
|
|
16
|
+
var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');
|
|
17
|
+
|
|
18
|
+
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
|
|
19
|
+
|
|
20
|
+
var _createClass2 = require('babel-runtime/helpers/createClass');
|
|
21
|
+
|
|
22
|
+
var _createClass3 = _interopRequireDefault(_createClass2);
|
|
23
|
+
|
|
24
|
+
var _api = require('../../api');
|
|
25
|
+
|
|
26
|
+
var _api2 = _interopRequireDefault(_api);
|
|
27
|
+
|
|
28
|
+
var _mobx = require('mobx');
|
|
29
|
+
|
|
30
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* 获取本次赠送金额
|
|
34
|
+
*/
|
|
35
|
+
var GetThisPresentAmountProcessor = exports.GetThisPresentAmountProcessor = function () {
|
|
36
|
+
function GetThisPresentAmountProcessor() {
|
|
37
|
+
(0, _classCallCheck3.default)(this, GetThisPresentAmountProcessor);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
(0, _createClass3.default)(GetThisPresentAmountProcessor, null, [{
|
|
41
|
+
key: 'execute',
|
|
42
|
+
value: function () {
|
|
43
|
+
var _ref = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee(dto, param) {
|
|
44
|
+
var result;
|
|
45
|
+
return _regenerator2.default.wrap(function _callee$(_context) {
|
|
46
|
+
while (1) {
|
|
47
|
+
switch (_context.prev = _context.next) {
|
|
48
|
+
case 0:
|
|
49
|
+
if (param.value) {
|
|
50
|
+
_context.next = 5;
|
|
51
|
+
break;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// 本次储值金额
|
|
55
|
+
dto.StorageDetails[0].ThisStorageAmount = null;
|
|
56
|
+
// 本次赠送金额
|
|
57
|
+
dto.StorageDetails[0].ThisPresentAmount = null;
|
|
58
|
+
// 本次有效储值金额
|
|
59
|
+
dto.StorageDetails[0].ThisValidStorageAmount = null;
|
|
60
|
+
return _context.abrupt('return');
|
|
61
|
+
|
|
62
|
+
case 5:
|
|
63
|
+
|
|
64
|
+
// 本次储值金额
|
|
65
|
+
dto.StorageDetails[0].ThisStorageAmount = Number(param.value);
|
|
66
|
+
|
|
67
|
+
_context.next = 8;
|
|
68
|
+
return _api2.default.GetThisPresentAmount(dto);
|
|
69
|
+
|
|
70
|
+
case 8:
|
|
71
|
+
result = _context.sent;
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
(0, _mobx.runInAction)(function () {
|
|
75
|
+
dto.StorageDetails[0].ThisStorageAmount = Number(param.value);
|
|
76
|
+
if (result.ThisPresentAmount) {
|
|
77
|
+
// 本次赠送金额
|
|
78
|
+
dto.StorageDetails[0].ThisPresentAmount = Number(result.ThisPresentAmount);
|
|
79
|
+
// 根据选择判断是否可以修改,且设置了比例 tuzha by 2020-06-19号
|
|
80
|
+
var isCanUpdate = param.isCanUpdate;
|
|
81
|
+
var percentValue = param.percentValue;
|
|
82
|
+
if (isCanUpdate && percentValue) {
|
|
83
|
+
var presentAmount = Number(Math.Multiply(dto.StorageDetails[0].ThisStorageAmount, Math.Divide(percentValue, 100)));
|
|
84
|
+
if (presentAmount < Number(result.ThisPresentAmount)) {
|
|
85
|
+
dto.StorageDetails[0].ThisPresentAmount = presentAmount;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
} else {
|
|
89
|
+
dto.StorageDetails[0].ThisPresentAmount = null;
|
|
90
|
+
}
|
|
91
|
+
本次有效储值金额;
|
|
92
|
+
dto.StorageDetails[0].ThisValidStorageAmount = Math.Add(dto.StorageDetails[0].ThisPresentAmount, dto.ThisStorageAmount);
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
case 10:
|
|
96
|
+
case 'end':
|
|
97
|
+
return _context.stop();
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}, _callee, this);
|
|
101
|
+
}));
|
|
102
|
+
|
|
103
|
+
function execute(_x, _x2) {
|
|
104
|
+
return _ref.apply(this, arguments);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
return execute;
|
|
108
|
+
}()
|
|
109
|
+
}]);
|
|
110
|
+
return GetThisPresentAmountProcessor;
|
|
111
|
+
}();
|
|
112
|
+
//# sourceMappingURL=GetThisPresentAmountProcessor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["tplus-member/domain/member/GetThisPresentAmountProcessor.js"],"names":["GetThisPresentAmountProcessor","dto","param","value","StorageDetails","ThisStorageAmount","ThisPresentAmount","ThisValidStorageAmount","Number","api","GetThisPresentAmount","result","isCanUpdate","percentValue","presentAmount","Math","Multiply","Divide","本次有效储值金额","Add"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AACA;;;;AAEA;;;;AAEA;;;IAGaA,6B,WAAAA,6B;;;;;;;;iHACYC,G,EAAKC,K;;;;;;oCACjBA,MAAMC,K;;;;;AACP;AACAF,oCAAIG,cAAJ,CAAmB,CAAnB,EAAsBC,iBAAtB,GAA0C,IAA1C;AACA;AACAJ,oCAAIG,cAAJ,CAAmB,CAAnB,EAAsBE,iBAAtB,GAA0C,IAA1C;AACA;AACAL,oCAAIG,cAAJ,CAAmB,CAAnB,EAAsBG,sBAAtB,GAA+C,IAA/C;;;;;AAIJ;AACAN,oCAAIG,cAAJ,CAAmB,CAAnB,EAAsBC,iBAAtB,GAA0CG,OAAON,MAAMC,KAAb,CAA1C;;;uCAEmBM,cAAIC,oBAAJ,CAAyBT,GAAzB,C;;;AAAfU,sC;;;AAEJ,uDAAY,YAAM;AACdV,wCAAIG,cAAJ,CAAmB,CAAnB,EAAsBC,iBAAtB,GAA0CG,OAAON,MAAMC,KAAb,CAA1C;AACA,wCAAIQ,OAAOL,iBAAX,EAA8B;AAC1B;AACAL,4CAAIG,cAAJ,CAAmB,CAAnB,EAAsBE,iBAAtB,GAA0CE,OAAOG,OAAOL,iBAAd,CAA1C;AACA;AACA,4CAAIM,cAAcV,MAAMU,WAAxB;AACA,4CAAIC,eAAeX,MAAMW,YAAzB;AACA,4CAAID,eAAeC,YAAnB,EAAiC;AAC7B,gDAAIC,gBAAgBN,OAAOO,KAAKC,QAAL,CAAcf,IAAIG,cAAJ,CAAmB,CAAnB,EAAsBC,iBAApC,EAAuDU,KAAKE,MAAL,CAAYJ,YAAZ,EAA0B,GAA1B,CAAvD,CAAP,CAApB;AACA,gDAAIC,gBAAgBN,OAAOG,OAAOL,iBAAd,CAApB,EAAsD;AAClDL,oDAAIG,cAAJ,CAAmB,CAAnB,EAAsBE,iBAAtB,GAA0CQ,aAA1C;AACH;AACJ;AACJ,qCAZD,MAaK;AACDb,4CAAIG,cAAJ,CAAmB,CAAnB,EAAsBE,iBAAtB,GAA0C,IAA1C;AACH;AACDY;AACAjB,wCAAIG,cAAJ,CAAmB,CAAnB,EAAsBG,sBAAtB,GAA+CQ,KAAKI,GAAL,CAASlB,IAAIG,cAAJ,CAAmB,CAAnB,EAAsBE,iBAA/B,EAAkDL,IAAII,iBAAtD,CAA/C;AACH,iCApBD","file":"GetThisPresentAmountProcessor.js","sourcesContent":["\r\nimport api from '../../api';\r\n\r\nimport { runInAction } from 'mobx';\r\n\r\n/**\r\n * 获取本次赠送金额\r\n */\r\nexport class GetThisPresentAmountProcessor {\r\n static async execute(dto, param) {\r\n if (!param.value) {\r\n // 本次储值金额\r\n dto.StorageDetails[0].ThisStorageAmount = null;\r\n // 本次赠送金额\r\n dto.StorageDetails[0].ThisPresentAmount = null;\r\n // 本次有效储值金额\r\n dto.StorageDetails[0].ThisValidStorageAmount = null;\r\n return;\r\n }\r\n\r\n // 本次储值金额\r\n dto.StorageDetails[0].ThisStorageAmount = Number(param.value);\r\n\r\n let result = await api.GetThisPresentAmount(dto);\r\n\r\n runInAction(() => {\r\n dto.StorageDetails[0].ThisStorageAmount = Number(param.value);\r\n if (result.ThisPresentAmount) {\r\n // 本次赠送金额 \r\n dto.StorageDetails[0].ThisPresentAmount = Number(result.ThisPresentAmount);\r\n // 根据选择判断是否可以修改,且设置了比例 tuzha by 2020-06-19号\r\n let isCanUpdate = param.isCanUpdate;\r\n let percentValue = param.percentValue;\r\n if (isCanUpdate && percentValue) {\r\n let presentAmount = Number(Math.Multiply(dto.StorageDetails[0].ThisStorageAmount, Math.Divide(percentValue, 100)));\r\n if (presentAmount < Number(result.ThisPresentAmount)) {\r\n dto.StorageDetails[0].ThisPresentAmount = presentAmount;\r\n }\r\n }\r\n }\r\n else {\r\n dto.StorageDetails[0].ThisPresentAmount = null;\r\n }\r\n 本次有效储值金额\r\n dto.StorageDetails[0].ThisValidStorageAmount = Math.Add(dto.StorageDetails[0].ThisPresentAmount, dto.ThisStorageAmount);\r\n });\r\n }\r\n}"]}
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.InitDataProcessor = undefined;
|
|
7
|
+
|
|
8
|
+
var _regenerator = require("babel-runtime/regenerator");
|
|
9
|
+
|
|
10
|
+
var _regenerator2 = _interopRequireDefault(_regenerator);
|
|
11
|
+
|
|
12
|
+
var _asyncToGenerator2 = require("babel-runtime/helpers/asyncToGenerator");
|
|
13
|
+
|
|
14
|
+
var _asyncToGenerator3 = _interopRequireDefault(_asyncToGenerator2);
|
|
15
|
+
|
|
16
|
+
var _classCallCheck2 = require("babel-runtime/helpers/classCallCheck");
|
|
17
|
+
|
|
18
|
+
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
|
|
19
|
+
|
|
20
|
+
var _createClass2 = require("babel-runtime/helpers/createClass");
|
|
21
|
+
|
|
22
|
+
var _createClass3 = _interopRequireDefault(_createClass2);
|
|
23
|
+
|
|
24
|
+
var _tplusPoslogin = require("tplus-poslogin");
|
|
25
|
+
|
|
26
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
27
|
+
|
|
28
|
+
var InitDataProcessor = exports.InitDataProcessor = function () {
|
|
29
|
+
function InitDataProcessor() {
|
|
30
|
+
(0, _classCallCheck3.default)(this, InitDataProcessor);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
(0, _createClass3.default)(InitDataProcessor, null, [{
|
|
34
|
+
key: "execute",
|
|
35
|
+
value: function () {
|
|
36
|
+
var _ref = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee(dto, memberDto) {
|
|
37
|
+
var IPMSG;
|
|
38
|
+
return _regenerator2.default.wrap(function _callee$(_context) {
|
|
39
|
+
while (1) {
|
|
40
|
+
switch (_context.prev = _context.next) {
|
|
41
|
+
case 0:
|
|
42
|
+
$T.debugger();
|
|
43
|
+
|
|
44
|
+
// CardCode 会员卡号
|
|
45
|
+
JSON.setCellValue(dto, "CardCode", memberDto.CardCode);
|
|
46
|
+
// Code 编号
|
|
47
|
+
// DataSource 数据来源
|
|
48
|
+
|
|
49
|
+
// DayVoucherCode 日结单号
|
|
50
|
+
JSON.setCellValue(dto, "DayVoucherCode", (0, _tplusPoslogin.PosInitData)('DailyCode'));
|
|
51
|
+
// ExternalCode 外部系统单据编码
|
|
52
|
+
// dto.ExternalCode=
|
|
53
|
+
// idcustomer idcustomer
|
|
54
|
+
// iddailydetailvoucher 日结单ID
|
|
55
|
+
JSON.setCellValue(dto, "IdDailyDetailVoucher", (0, _tplusPoslogin.PosInitData)('IdDailyVoucher'));
|
|
56
|
+
// idintegralmember idintegralmember
|
|
57
|
+
// idmarketingOrgan 多营销机构临时值
|
|
58
|
+
JSON.setCellValue(dto, "IdmarketingOrgan", (0, _tplusPoslogin.PosInitData)('IdmarketingOrgan'));
|
|
59
|
+
|
|
60
|
+
JSON.setCellValue(dto, "Idmember", memberDto.ID);
|
|
61
|
+
|
|
62
|
+
JSON.setCellValue(dto, "Member", memberDto);
|
|
63
|
+
|
|
64
|
+
//JSON.setCellValue(dto,"Person",memberDto.Person);
|
|
65
|
+
|
|
66
|
+
//JSON.setCellValue(dto,"IdPerson",JSON.getCellValue(memberDto,"Person.ID"));
|
|
67
|
+
|
|
68
|
+
// idsettleCustomer idsettleCustomer
|
|
69
|
+
// Idstore idstore
|
|
70
|
+
JSON.setCellValue(dto, "Idstore", (0, _tplusPoslogin.PosInitData)('storeID'));
|
|
71
|
+
|
|
72
|
+
// Store Store
|
|
73
|
+
// PosCode POS编号
|
|
74
|
+
JSON.setCellValue(dto, "PosCode", (0, _tplusPoslogin.PosInitData)('posCode'));
|
|
75
|
+
// ShiftVoucherCode 交班单号
|
|
76
|
+
JSON.setCellValue(dto, "ShiftVoucherCode", (0, _tplusPoslogin.PosInitData)('ShiftCode'));
|
|
77
|
+
|
|
78
|
+
//交班单ID
|
|
79
|
+
dto.IdShiftVoucher = (0, _tplusPoslogin.PosInitData)('IdShiftVoucher');
|
|
80
|
+
//
|
|
81
|
+
// Maker 制单人
|
|
82
|
+
// MemberQuantity 会员数量
|
|
83
|
+
// Memo 备注
|
|
84
|
+
// Name 名称
|
|
85
|
+
|
|
86
|
+
// cc结算调用
|
|
87
|
+
IPMSG = {};
|
|
88
|
+
|
|
89
|
+
if (!!window.localStorage.IPMSG) {
|
|
90
|
+
IPMSG = JSON.parse(window.localStorage.IPMSG);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
dto.Cip = IPMSG.query || "";
|
|
94
|
+
|
|
95
|
+
// SingleStorageAmount 单卡储值金额
|
|
96
|
+
// StorageAmount 储值总额
|
|
97
|
+
// StorageDetails StorageDetails
|
|
98
|
+
// StorageMutiSettleDetails StorageMutiSettleDetails
|
|
99
|
+
|
|
100
|
+
// Ts 分布时间戳
|
|
101
|
+
// UID U会员储值明细ID
|
|
102
|
+
dto.UID = memberDto.Uid || 0;
|
|
103
|
+
// VoucherDate 单据日期
|
|
104
|
+
JSON.setCellValue(dto, "VoucherDate", (0, _tplusPoslogin.PosInitData)('VoucherDate'));
|
|
105
|
+
// 数据来源 POS端
|
|
106
|
+
if (!dto.DataSource) {
|
|
107
|
+
dto.DataSource = {};
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
dto.DataSource.Id = "POS";
|
|
111
|
+
dto.MakerId = (0, _tplusPoslogin.PosInitData)('UserID');
|
|
112
|
+
|
|
113
|
+
if (dto.StorageDetails == null || dto.StorageDetails.length < 1) {
|
|
114
|
+
|
|
115
|
+
dto.StorageDetails.push({ "Code": "0".PadLeft(4, '0'),
|
|
116
|
+
"Idmember": dto.Idmember,
|
|
117
|
+
"IdmemberType": null,
|
|
118
|
+
"ThisStorageAmount": null,
|
|
119
|
+
"ThisPresentAmount": null,
|
|
120
|
+
"ThisValidStorageAmount": null,
|
|
121
|
+
"StorageType": { Id: 2099 }
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
// 积分会员
|
|
126
|
+
if (JSON.getCellValue(memberDto, "MemberType.IsIntegral")) {
|
|
127
|
+
JSON.setCellValue(dto, "IdIntegralMember", memberDto.ID);
|
|
128
|
+
}
|
|
129
|
+
dto.ExternalCode = dto.Idmember + "_" + dto.PosCode + "_" + new Date().toArray().join("_") + Math.floor(Math.random() * 1000 + 1);
|
|
130
|
+
|
|
131
|
+
if (!dto.StorageDetails[0].StorageType) {
|
|
132
|
+
dto.StorageDetails[0].StorageType = {};
|
|
133
|
+
}
|
|
134
|
+
dto.StorageDetails[0].StorageType.Id = 2099;
|
|
135
|
+
|
|
136
|
+
case 24:
|
|
137
|
+
case "end":
|
|
138
|
+
return _context.stop();
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}, _callee, this);
|
|
142
|
+
}));
|
|
143
|
+
|
|
144
|
+
function execute(_x, _x2) {
|
|
145
|
+
return _ref.apply(this, arguments);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
return execute;
|
|
149
|
+
}()
|
|
150
|
+
}]);
|
|
151
|
+
return InitDataProcessor;
|
|
152
|
+
}();
|
|
153
|
+
//# sourceMappingURL=InitDataProcessor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["tplus-member/domain/member/InitDataProcessor.js"],"names":["InitDataProcessor","dto","memberDto","$T","debugger","JSON","setCellValue","CardCode","ID","IdShiftVoucher","IPMSG","window","localStorage","parse","Cip","query","UID","Uid","DataSource","Id","MakerId","StorageDetails","length","push","PadLeft","Idmember","getCellValue","ExternalCode","PosCode","Date","toArray","join","Math","floor","random","StorageType"],"mappings":"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","file":"InitDataProcessor.js","sourcesContent":["import {PosInitData} from 'tplus-poslogin';\r\n\r\nexport class InitDataProcessor{\r\n static async execute(dto,memberDto)\r\n {\r\n $T.debugger();\r\n\r\n // CardCode\t会员卡号\r\n JSON.setCellValue(dto,\"CardCode\",memberDto.CardCode);\r\n // Code\t编号\r\n // DataSource\t数据来源\r\n\r\n // DayVoucherCode\t日结单号\r\n JSON.setCellValue(dto,\"DayVoucherCode\",PosInitData('DailyCode'));\r\n // ExternalCode\t外部系统单据编码\r\n // dto.ExternalCode=\r\n // idcustomer\tidcustomer\r\n // iddailydetailvoucher\t日结单ID\r\n JSON.setCellValue(dto,\"IdDailyDetailVoucher\",PosInitData('IdDailyVoucher'));\r\n // idintegralmember\tidintegralmember\r\n // idmarketingOrgan\t多营销机构临时值\r\n JSON.setCellValue(dto,\"IdmarketingOrgan\",PosInitData('IdmarketingOrgan'));\r\n\r\n JSON.setCellValue(dto,\"Idmember\",memberDto.ID);\r\n\r\n JSON.setCellValue(dto,\"Member\",memberDto);\r\n\r\n //JSON.setCellValue(dto,\"Person\",memberDto.Person);\r\n \r\n //JSON.setCellValue(dto,\"IdPerson\",JSON.getCellValue(memberDto,\"Person.ID\"));\r\n \r\n // idsettleCustomer\tidsettleCustomer\r\n // Idstore\tidstore\r\n JSON.setCellValue(dto,\"Idstore\",PosInitData('storeID'));\r\n \r\n // Store\tStore\r\n // PosCode\tPOS编号\r\n JSON.setCellValue(dto,\"PosCode\",PosInitData('posCode'));\r\n // ShiftVoucherCode\t交班单号\r\n JSON.setCellValue(dto,\"ShiftVoucherCode\",PosInitData('ShiftCode'));\r\n\r\n //交班单ID\r\n dto.IdShiftVoucher = PosInitData('IdShiftVoucher');\r\n // \r\n // Maker\t制单人\r\n // MemberQuantity\t会员数量\r\n // Memo\t备注\r\n // Name\t名称\r\n\r\n // cc结算调用\r\n let IPMSG = {};\r\n if (!!window.localStorage.IPMSG) {\r\n IPMSG = JSON.parse(window.localStorage.IPMSG);\r\n }\r\n\r\n dto.Cip = IPMSG.query || \"\"\r\n\r\n // SingleStorageAmount\t单卡储值金额\r\n // StorageAmount\t储值总额\r\n // StorageDetails\tStorageDetails\r\n // StorageMutiSettleDetails\tStorageMutiSettleDetails\r\n\r\n // Ts\t分布时间戳\r\n // UID\tU会员储值明细ID\r\n dto.UID=memberDto.Uid||0;\r\n // VoucherDate\t单据日期\r\n JSON.setCellValue(dto,\"VoucherDate\",PosInitData('VoucherDate'));\r\n // 数据来源 POS端\r\n if (!dto.DataSource) {\r\n dto.DataSource={};\r\n }\r\n\r\n dto.DataSource.Id=\"POS\";\r\n dto.MakerId = PosInitData('UserID');\r\n\r\n if(dto.StorageDetails==null || dto.StorageDetails.length<1)\r\n {\r\n\r\n dto.StorageDetails.push({\"Code\":\"0\".PadLeft(4, '0'),\r\n \"Idmember\":dto.Idmember,\r\n \"IdmemberType\":null,\r\n \"ThisStorageAmount\":null,\r\n \"ThisPresentAmount\":null,\r\n \"ThisValidStorageAmount\":null,\r\n \"StorageType\":{Id:2099}\r\n });\r\n }\r\n\r\n // 积分会员\r\n if (JSON.getCellValue(memberDto,\"MemberType.IsIntegral\")) {\r\n JSON.setCellValue(dto,\"IdIntegralMember\",memberDto.ID);\r\n }\r\n dto.ExternalCode =dto.Idmember+\"_\"+dto.PosCode+\"_\"+ new Date().toArray().join(\"_\")+Math.floor((Math.random()*1000)+1)\r\n\r\n if (!dto.StorageDetails[0].StorageType) {\r\n dto.StorageDetails[0].StorageType={};\r\n }\r\n dto.StorageDetails[0].StorageType.Id=2099;\r\n }\r\n}"]}
|