tplus-member 3.42.1 → 3.42.2
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/api.js +5 -5
- package/dist/api.js.map +1 -1
- package/dist/controllers/FeedbackController.js.map +1 -1
- package/dist/controllers/MemberOrderController.js +12 -12
- package/dist/controllers/MemberOrderController.js.map +1 -1
- package/dist/controllers/OpenCardController.js +7 -7
- package/dist/controllers/OpenCardController.js.map +1 -1
- package/dist/controllers/defaultConfig.js.map +1 -1
- package/dist/dataProvider/member.js +7 -7
- package/dist/dataProvider/member.js.map +1 -1
- package/dist/dataProvider/openCard.js.map +1 -1
- package/dist/domain/member/AuthProcess.js.map +1 -1
- package/dist/domain/member/CardCodeChangedProcessor.js +2 -2
- package/dist/domain/member/CardCodeChangedProcessor.js.map +1 -1
- package/dist/domain/member/CheckCardCodeAndCodeProcessor.js +2 -2
- package/dist/domain/member/CheckCardCodeAndCodeProcessor.js.map +1 -1
- package/dist/domain/member/CheckMobilephoneFormatProcessor.js +2 -2
- package/dist/domain/member/CheckMobilephoneFormatProcessor.js.map +1 -1
- package/dist/domain/member/CheckPresentAmountProcessor.js +2 -2
- package/dist/domain/member/CheckPresentAmountProcessor.js.map +1 -1
- package/dist/domain/member/EffectiveDateChangedProcessor.js +2 -2
- package/dist/domain/member/EffectiveDateChangedProcessor.js.map +1 -1
- package/dist/domain/member/GetThisPresentAmountProcessor.js +2 -2
- package/dist/domain/member/GetThisPresentAmountProcessor.js.map +1 -1
- package/dist/domain/member/InitDataProcessor.js +123 -123
- package/dist/domain/member/InitDataProcessor.js.map +1 -1
- package/dist/domain/member/IsMemberEffectiveProcessor.js +2 -2
- package/dist/domain/member/IsMemberEffectiveProcessor.js.map +1 -1
- package/dist/domain/member/IsMemberEnableProcessor.js +2 -2
- package/dist/domain/member/IsMemberEnableProcessor.js.map +1 -1
- package/dist/domain/member/IsMemberExpirationProcessor.js +2 -2
- package/dist/domain/member/IsMemberExpirationProcessor.js.map +1 -1
- package/dist/domain/member/IsMemberPasswordSameProcessor.js +2 -2
- package/dist/domain/member/IsMemberPasswordSameProcessor.js.map +1 -1
- package/dist/domain/member/IsMemberStorageForStoreProcessor.js +3 -3
- package/dist/domain/member/IsMemberStorageForStoreProcessor.js.map +1 -1
- package/dist/domain/member/MemberTypeChangedProcessor.js +4 -4
- package/dist/domain/member/MemberTypeChangedProcessor.js.map +1 -1
- package/dist/domain/member/MobilephoneChangedProcessor.js +4 -4
- package/dist/domain/member/MobilephoneChangedProcessor.js.map +1 -1
- package/dist/domain/member/PersonProcesser.js.map +1 -1
- package/dist/domain/member/PriuserdefChangedProcessor.js +2 -2
- package/dist/domain/member/PriuserdefChangedProcessor.js.map +1 -1
- package/dist/domain/operationLog/AddLogProcessor.js +6 -6
- package/dist/domain/operationLog/AddLogProcessor.js.map +1 -1
- package/dist/domain/operationLog/OperationConfig.js.map +1 -1
- package/dist/domain/operationLog/OperationLog.js.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/member/MemberCardList.js +2 -2
- package/dist/member/MemberCardList.js.map +1 -1
- package/dist/member/MemberPhoto.js.map +1 -1
- package/dist/member/MemberShow.js.map +1 -1
- package/dist/member/ShopMember.js.map +1 -1
- package/dist/member/ShopMember.less +635 -635
- package/dist/member/ShopMemberStorage.js.map +1 -1
- package/dist/member/api.js.map +1 -1
- package/dist/member/color.less +31 -31
- package/dist/member/index.js +4 -4
- package/dist/member/index.js.map +1 -1
- package/dist/member/index.less +570 -570
- package/dist/member/memberMenu/bindCard/index.js.map +1 -1
- package/dist/member/memberMenu/bindCard/style.less +7 -7
- package/dist/member/memberMenu/changeMemberCard/index.js.map +1 -1
- package/dist/member/memberMenu/changeMemberCard/style.less +42 -42
- package/dist/member/memberMenu/index.js.map +1 -1
- package/dist/member/memberMenu/modifyPass/index.js.map +1 -1
- package/dist/member/memberMenu/modifyPass/store.js.map +1 -1
- package/dist/member/memberMenu/modifyPass/style.less +96 -96
- package/dist/member/memberMenu/style.less +136 -136
- package/dist/member/memberMenuStorage/bindCard/index.js.map +1 -1
- package/dist/member/memberMenuStorage/bindCard/style.less +7 -7
- package/dist/member/memberMenuStorage/changeMemberCard/index.js.map +1 -1
- package/dist/member/memberMenuStorage/changeMemberCard/style.less +42 -42
- package/dist/member/memberMenuStorage/index.js.map +1 -1
- package/dist/member/memberMenuStorage/modifyPass/index.js.map +1 -1
- package/dist/member/memberMenuStorage/modifyPass/store.js.map +1 -1
- package/dist/member/memberMenuStorage/modifyPass/style.less +96 -96
- package/dist/member/memberMenuStorage/style.less +138 -138
- package/dist/member/memberTab/MemberCardInfo.js.map +1 -1
- package/dist/member/memberTab/MemberManager.js.map +1 -1
- package/dist/member/memberTab/MemberStorage.js +7 -7
- package/dist/member/memberTab/MemberStorage.js.map +1 -1
- package/dist/member/memberTab/index.js.map +1 -1
- package/dist/member/memberTab.js.map +1 -1
- package/dist/socket.js +13 -13
- package/dist/socket.js.map +1 -1
- package/dist/stores/MemberStore.js +1 -0
- package/dist/stores/MemberStore.js.map +1 -1
- package/dist/stores/index.js.map +1 -1
- package/dist/utils.js.map +1 -1
- package/dist/viewController/MemberOrderViewController.js.map +1 -1
- package/dist/viewDoMain/CheckMemberProcessorBlock.js +2 -2
- package/dist/viewDoMain/CheckMemberProcessorBlock.js.map +1 -1
- package/dist/viewDoMain/CheckMemberStorageProcessorBlock.js +2 -2
- package/dist/viewDoMain/CheckMemberStorageProcessorBlock.js.map +1 -1
- package/dist/viewDoMain/CheckSelectMemberProcessorBlock.js +2 -2
- package/dist/viewDoMain/CheckSelectMemberProcessorBlock.js.map +1 -1
- package/dist/viewDoMain/CheckUpdatePasswordProcessorBlock.js.map +1 -1
- package/dist/viewDoMain/MemberDataChangedProcessorBlock.js +2 -2
- package/dist/viewDoMain/MemberDataChangedProcessorBlock.js.map +1 -1
- package/dist/viewDoMain/MemberDataPreSaveProcessorBlock.js +2 -2
- package/dist/viewDoMain/MemberDataPreSaveProcessorBlock.js.map +1 -1
- package/dist/viewDoMain/StorageAmountChangedProcessorBlock.js +2 -2
- package/dist/viewDoMain/StorageAmountChangedProcessorBlock.js.map +1 -1
- package/dist/viewModels/memberVoucher.js +3 -3
- package/dist/viewModels/memberVoucher.js.map +1 -1
- package/dist/views/MemberOrderView.js +5 -5
- package/dist/views/MemberOrderView.js.map +1 -1
- package/dist/views/MemberStore.less +143 -143
- package/dist/views/MemberStoreNew.less +228 -228
- package/dist/views/MemberStoreNewView.js.map +1 -1
- package/dist/views/MemberStoreView.js.map +1 -1
- package/dist/views/MemberStoreViewContainer.js.map +1 -1
- package/dist/views/PresentDetail.less +118 -118
- package/dist/views/PresetDetailView.js.map +1 -1
- package/dist/views/memberOrder.less +54 -54
- package/locales/zh/tplus-portsetting.json +1 -1
- package/locales/zh-CN/tplus-portsetting.json +1 -1
- package/package.json +2 -2
@@ -60,7 +60,7 @@ var MemberDataChangedProcessorBlock = exports.MemberDataChangedProcessorBlock =
|
|
60
60
|
}
|
61
61
|
}]);
|
62
62
|
return MemberDataChangedProcessorBlock;
|
63
|
-
}(); /**
|
64
|
-
* 会员字段改变时的处理逻辑
|
63
|
+
}(); /**
|
64
|
+
* 会员字段改变时的处理逻辑
|
65
65
|
*/
|
66
66
|
//# sourceMappingURL=MemberDataChangedProcessorBlock.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["tplus-member/viewDoMain/MemberDataChangedProcessorBlock.js"],"names":["MemberDataChangedProcessorBlock","isOpen","memberData","changed","view","startMobileRequset","key","CardCodeChangedProcessor","execute","mobilephone","MobilephoneChangedProcessor","membertype","MemberTypeChangedProcessor","EffectiveDateChangedProcessor","PriuserdefChangedProcessor"],"mappings":";;;;;;;;;;;;;;;AAIA;;AACA;;AACA;;AACA;;AACA;;;;IAEaA,+B,WAAAA,+B;;;;;;;4BACIC,M,EAAQC,U,EAAYC,O,EAASC,I,EAAKC,kB,EAAoB;AACnE,WAAK,IAAIC,GAAT,IAAgBH,OAAhB,EAAyB;AACvB,YAAIG,OAAO,UAAX,EAAuB;AACrBC,6DAAyBC,OAAzB,CAAiCN,UAAjC,EAA6CC,OAA7C;AACD;AACD,YAAIG,OAAO,aAAX,EAA0B;AACxB,cAAIG,cAAcN,QAAQG,GAAR,CAAlB;AACAI,mEAA4BF,OAA5B,CAAoCP,MAApC,EAA4CC,UAA5C,EAAwDC,OAAxD,EAAiEM,WAAjE;AACD;;AAED,YAAIH,OAAO,YAAX,EAAyB;AACvB,cAAIK,aAAaR,QAAQG,GAAR,CAAjB;AACAM,iEAA2BJ,OAA3B,CAAmCP,MAAnC,EAA0CC,UAA1C,EAAsDC,OAAtD,EAA+DC,IAA/D,EAAqEO,UAArE,EAAgFN,kBAAhF;AACD;AACD,YAAIC,OAAO,eAAX,EAA4B;AAC1BO,uEAA8BL,OAA9B,CAAsCP,MAAtC,EAA6CE,OAA7C,EAAsDD,UAAtD;AACD;AACD,YAAII,OAAO,cAAP,IAAyBA,OAAO,aAApC,EAAmD;AACjD,cAAIH,QAAQG,GAAR,IAAe,CAAnB,EAAsB;AACpBH,oBAAQG,GAAR,IAAe,EAAf;AACD;AACF;AAEF;AACD;AACAQ,6DAA2BN,OAA3B,CAAmCN,UAAnC,EAA8CE,IAA9C,EAAmDD,OAAnD;AACD;;;KArCH","file":"MemberDataChangedProcessorBlock.js","sourcesContent":["/**\
|
1
|
+
{"version":3,"sources":["tplus-member/viewDoMain/MemberDataChangedProcessorBlock.js"],"names":["MemberDataChangedProcessorBlock","isOpen","memberData","changed","view","startMobileRequset","key","CardCodeChangedProcessor","execute","mobilephone","MobilephoneChangedProcessor","membertype","MemberTypeChangedProcessor","EffectiveDateChangedProcessor","PriuserdefChangedProcessor"],"mappings":";;;;;;;;;;;;;;;AAIA;;AACA;;AACA;;AACA;;AACA;;;;IAEaA,+B,WAAAA,+B;;;;;;;4BACIC,M,EAAQC,U,EAAYC,O,EAASC,I,EAAKC,kB,EAAoB;AACnE,WAAK,IAAIC,GAAT,IAAgBH,OAAhB,EAAyB;AACvB,YAAIG,OAAO,UAAX,EAAuB;AACrBC,6DAAyBC,OAAzB,CAAiCN,UAAjC,EAA6CC,OAA7C;AACD;AACD,YAAIG,OAAO,aAAX,EAA0B;AACxB,cAAIG,cAAcN,QAAQG,GAAR,CAAlB;AACAI,mEAA4BF,OAA5B,CAAoCP,MAApC,EAA4CC,UAA5C,EAAwDC,OAAxD,EAAiEM,WAAjE;AACD;;AAED,YAAIH,OAAO,YAAX,EAAyB;AACvB,cAAIK,aAAaR,QAAQG,GAAR,CAAjB;AACAM,iEAA2BJ,OAA3B,CAAmCP,MAAnC,EAA0CC,UAA1C,EAAsDC,OAAtD,EAA+DC,IAA/D,EAAqEO,UAArE,EAAgFN,kBAAhF;AACD;AACD,YAAIC,OAAO,eAAX,EAA4B;AAC1BO,uEAA8BL,OAA9B,CAAsCP,MAAtC,EAA6CE,OAA7C,EAAsDD,UAAtD;AACD;AACD,YAAII,OAAO,cAAP,IAAyBA,OAAO,aAApC,EAAmD;AACjD,cAAIH,QAAQG,GAAR,IAAe,CAAnB,EAAsB;AACpBH,oBAAQG,GAAR,IAAe,EAAf;AACD;AACF;AAEF;AACD;AACAQ,6DAA2BN,OAA3B,CAAmCN,UAAnC,EAA8CE,IAA9C,EAAmDD,OAAnD;AACD;;;KArCH","file":"MemberDataChangedProcessorBlock.js","sourcesContent":["/**\n * 会员字段改变时的处理逻辑\n */\n\nimport { MobilephoneChangedProcessor } from '../domain/member/MobilephoneChangedProcessor'\nimport { MemberTypeChangedProcessor } from '../domain/member/MemberTypeChangedProcessor'\nimport { EffectiveDateChangedProcessor } from '../domain/member/EffectiveDateChangedProcessor'\nimport { CardCodeChangedProcessor } from '../domain/member/CardCodeChangedProcessor'\nimport { PriuserdefChangedProcessor} from '../domain/member/PriuserdefChangedProcessor'\n\nexport class MemberDataChangedProcessorBlock {\n static execute(isOpen, memberData, changed, view,startMobileRequset) {\n for (let key in changed) {\n if (key == \"CardCode\") {\n CardCodeChangedProcessor.execute(memberData, changed);\n }\n if (key == \"Mobilephone\") {\n let mobilephone = changed[key];\n MobilephoneChangedProcessor.execute(isOpen, memberData, changed, mobilephone);\n }\n\n if (key == \"MemberType\") {\n let membertype = changed[key];\n MemberTypeChangedProcessor.execute(isOpen,memberData, changed, view, membertype,startMobileRequset);\n }\n if (key == \"EffectiveDate\") {\n EffectiveDateChangedProcessor.execute(isOpen,changed, memberData);\n }\n if (key == \"OpenIntegral\" || key == \"OpenStorage\") {\n if (changed[key] < 0) {\n changed[key] = '';\n }\n }\n\n } \n //处理自定义 \n PriuserdefChangedProcessor.execute(memberData,view,changed);\n }\n}"]}
|
@@ -19,8 +19,8 @@ var _tplusComponentsTouch = require('tplus-components-touch');
|
|
19
19
|
|
20
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
21
21
|
|
22
|
-
/**
|
23
|
-
* 保存前,会员数据处理
|
22
|
+
/**
|
23
|
+
* 保存前,会员数据处理
|
24
24
|
*/
|
25
25
|
var MemberDataPreSaveProcessorBlock = exports.MemberDataPreSaveProcessorBlock = function () {
|
26
26
|
function MemberDataPreSaveProcessorBlock() {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["tplus-member/viewDoMain/MemberDataPreSaveProcessorBlock.js"],"names":["MemberDataPreSaveProcessorBlock","memberData","view","store","ID","Name","Code","storeID","storeName","storeCode","key","indexOf","value","JSON","getCellValue","userdefItem","find","el","FieldName","FieldType","tools","dateFormat","setDynamicValue"],"mappings":";;;;;;;;;;;;;;;AAGA;;AACA;;;;AAJA;;;IAMaA,+B,WAAAA,+B;;;;;;;4BACIC,U,EAAWC,I,EAAMC,K,EAAO;AACrC;AACA,UAAIF,WAAW,QAAX,KAAwB,IAAxB,IAAgCA,WAAW,QAAX,EAAqBG,EAArB,IAA2B,IAA3D,IAAmEH,WAAW,QAAX,EAAqBG,EAArB,GAA0B,CAAjG,EAAoG;AAClGH,mBAAW,UAAX,IAAyBA,WAAW,QAAX,EAAqBG,EAA9C;AACD,OAFD,MAGK;AACHH,mBAAW,QAAX,IAAuB,IAAvB;AACD;AACD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"],"names":["MemberDataPreSaveProcessorBlock","memberData","view","store","ID","Name","Code","storeID","storeName","storeCode","key","indexOf","value","JSON","getCellValue","userdefItem","find","el","FieldName","FieldType","tools","dateFormat","setDynamicValue"],"mappings":";;;;;;;;;;;;;;;AAGA;;AACA;;;;AAJA;;;IAMaA,+B,WAAAA,+B;;;;;;;4BACIC,U,EAAWC,I,EAAMC,K,EAAO;AACrC;AACA,UAAIF,WAAW,QAAX,KAAwB,IAAxB,IAAgCA,WAAW,QAAX,EAAqBG,EAArB,IAA2B,IAA3D,IAAmEH,WAAW,QAAX,EAAqBG,EAArB,GAA0B,CAAjG,EAAoG;AAClGH,mBAAW,UAAX,IAAyBA,WAAW,QAAX,EAAqBG,EAA9C;AACD,OAFD,MAGK;AACHH,mBAAW,QAAX,IAAuB,IAAvB;AACD;AACD;AACA,UAAIA,WAAW,QAAX,KAAwB,IAAxB,IAAgCA,WAAW,QAAX,EAAqBG,EAArB,IAA2B,IAA3D,IAAmEH,WAAW,QAAX,EAAqBG,EAArB,GAA0B,CAAjG,EAAoG;AAClGH,mBAAW,UAAX,IAAyBA,WAAW,QAAX,EAAqBG,EAA9C;AACAH,mBAAW,QAAX,IAAuB;AACrBG,cAAIH,WAAW,QAAX,EAAqBG,EADJ;AAErBC,gBAAMJ,WAAW,QAAX,EAAqBI,IAFN;AAGrBC,gBAAML,WAAW,QAAX,EAAqBK;AAHN,SAAvB;AAKD,OAPD,MAQK;AACHL,mBAAW,QAAX,IAAuB,IAAvB;AACD;AACD;AACAA,iBAAW,SAAX,IAAwBE,MAAMI,OAA9B;AACAN,iBAAW,OAAX,IAAsB;AACpBG,YAAID,MAAMI,OADU;AAEpBF,cAAMF,MAAMK,SAFQ;AAGpBF,cAAMH,MAAMM;AAHQ,OAAtB;AAKA;;AA3BqC,iCA4B7BC,GA5B6B;AA6BnC,YAAIA,IAAIC,OAAJ,CAAY,SAAZ,IAAyB,CAA7B,EAAgC;AAC9B,cAAIC,QAAMC,KAAKC,YAAL,CAAkBb,UAAlB,EAA8BS,GAA9B,CAAV;AACA,cAAIK,cAAcb,KAAKc,IAAL,CAAU;AAAA,mBAAIC,GAAGC,SAAH,IAAcR,GAAlB;AAAA,WAAV,CAAlB;AACA,cAAGK,eAAaA,YAAYI,SAAZ,IAAuB,MAAvC,EACA;AACEP,oBAAMQ,4BAAMC,UAAN,CAAiBT,KAAjB,CAAN;AACD;AACDC,eAAKS,eAAL,CAAqBrB,UAArB,EAAiCS,GAAjC,EAAsCE,KAAtC;AACD;AArCkC;;AA4BrC,WAAI,IAAIF,GAAR,IAAeT,UAAf,EAA0B;AAAA,cAAlBS,GAAkB;AAUzB;AAEF","file":"MemberDataPreSaveProcessorBlock.js","sourcesContent":["/**\n * 保存前,会员数据处理\n */\nimport { PosInitData } from 'tplus-poslogin';\nimport { tools } from 'tplus-components-touch';\n\nexport class MemberDataPreSaveProcessorBlock {\n static execute(memberData,view, store) {\n //开卡业务员view,\n if (memberData[\"Person\"] != null && memberData[\"Person\"].ID != null && memberData[\"Person\"].ID > 0) {\n memberData[\"idperson\"] = memberData[\"Person\"].ID;\n }\n else {\n memberData[\"Person\"] = null;\n }\n //推荐人\n if (memberData[\"Member\"] != null && memberData[\"Member\"].ID != null && memberData[\"Member\"].ID > 0) {\n memberData[\"idmember\"] = memberData[\"Member\"].ID;\n memberData[\"Member\"] = {\n ID: memberData[\"Member\"].ID,\n Name: memberData[\"Member\"].Name,\n Code: memberData[\"Member\"].Code\n };\n }\n else {\n memberData[\"Member\"] = null;\n }\n //开卡门店\n memberData[\"idstore\"] = store.storeID;\n memberData[\"Store\"] = {\n ID: store.storeID,\n Name: store.storeName,\n Code: store.storeCode\n };\n //处理自定义 \n for(let key in memberData){\n if (key.indexOf(\"userdef\") > 0) {\n let value=JSON.getCellValue(memberData, key);\n let userdefItem = view.find(el=>el.FieldName==key);\n if(userdefItem&&userdefItem.FieldType==\"date\")\n {\n value=tools.dateFormat(value);\n }\n JSON.setDynamicValue(memberData, key, value); \n }\n } \n\n }\n}"]}
|
@@ -17,8 +17,8 @@ var _tplusComponentsTouch = require('tplus-components-touch');
|
|
17
17
|
|
18
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
19
19
|
|
20
|
-
/**
|
21
|
-
* 储值金额改变时的处理逻辑
|
20
|
+
/**
|
21
|
+
* 储值金额改变时的处理逻辑
|
22
22
|
*/
|
23
23
|
|
24
24
|
var StorageAmountChangedProcessorBlock = exports.StorageAmountChangedProcessorBlock = function () {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["tplus-member/viewDoMain/StorageAmountChangedProcessorBlock.js"],"names":["StorageAmountChangedProcessorBlock","storageAmount","posStorageRule","isPresentGiftpack","minStorageAmount","storageGiftpackMethodEnum","Message","warn","storageAmountList","storageAmountSpecList","forEach","push","element","presentSettingEnum","indexOf","giftBagList","storageGiftList","resultMap","getcanUseGiftBagList","canUseGiftBagList","filter","item","presentConditionTypeEnum","presentConditionValue","presentGiftBagList","sort","a","b","length","maxAmount","giftBag","presentAmount","couponQuantity","integral","growthValue","mtActivity","mtRightList","mtRight","getRightTypeEnum","mtRightCouponList","coupon","quantity","parseFloat","rightValue","rightsStr","amount","RightsStr","MtActivitys"],"mappings":";;;;;;;;;;;;;;;AAAA;;;;AAEA;;;;IAIaA,kC,WAAAA,kC;;;;;;;4BAEIC,a,EAAcC,c,EAAgB;AAAA;;AAC3C;AACA,UAAIC,oBAAkBD,eAAeC,iBAArC;AACA;AACA,UAAIC,mBAAiBF,eAAeE,gBAApC;AACA,UAAIC,4BAA0BH,eAAeG,yBAA7C;AACA,UAAGJ,kBAAkB,EAAlB,IAAwBA,gBAAcG,gBAAzC,EAA0D;AACxDE,sCAAQC,IAAR,CAAa,sBAAsBH,gBAAnC;AACA,eAAO,eAAP;AACD;AACD,UAAG,CAACD,iBAAJ,EAAsB;AACpB;AACD;AACD,UAAIK,oBAAoB,EAAxB;AACAN,qBAAeO,qBAAf,CAAqCC,OAArC,CAA6C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OAAnC;AACD;AACD,UAAGU,WAAWT,QAAX,IAAqB,CAAxB,EAA0B;AACxBW,oBAAUA,YAAUX,QAAV,GAAmB,KAA7B;AACD;AACD,UAAGS,WAAWR,WAAX,IAAwB,CAA3B,EAA6B;AAC3BU,oBAAUA,YAAUV,WAAV,GAAsB,MAAhC;AACD;AACDjB,kBAAY;AACVc,oCADU;AAEVc,gBAAQ5C,aAFE;AAGV6C,mBAAWF,SAHD;AAIVG,qBAAavB;AAJH,OAAZ;AAMA,aAAOP,SAAP;AACD","file":"StorageAmountChangedProcessorBlock.js","sourcesContent":["import { Message } from 'tplus-components-touch';\
|
1
|
+
{"version":3,"sources":["tplus-member/viewDoMain/StorageAmountChangedProcessorBlock.js"],"names":["StorageAmountChangedProcessorBlock","storageAmount","posStorageRule","isPresentGiftpack","minStorageAmount","storageGiftpackMethodEnum","Message","warn","storageAmountList","storageAmountSpecList","forEach","push","element","presentSettingEnum","indexOf","giftBagList","storageGiftList","resultMap","getcanUseGiftBagList","canUseGiftBagList","filter","item","presentConditionTypeEnum","presentConditionValue","presentGiftBagList","sort","a","b","length","maxAmount","giftBag","presentAmount","couponQuantity","integral","growthValue","mtActivity","mtRightList","mtRight","getRightTypeEnum","mtRightCouponList","coupon","quantity","parseFloat","rightValue","rightsStr","amount","RightsStr","MtActivitys"],"mappings":";;;;;;;;;;;;;;;AAAA;;;;AAEA;;;;IAIaA,kC,WAAAA,kC;;;;;;;4BAEIC,a,EAAcC,c,EAAgB;AAAA;;AAC3C;AACA,UAAIC,oBAAkBD,eAAeC,iBAArC;AACA;AACA,UAAIC,mBAAiBF,eAAeE,gBAApC;AACA,UAAIC,4BAA0BH,eAAeG,yBAA7C;AACA,UAAGJ,kBAAkB,EAAlB,IAAwBA,gBAAcG,gBAAzC,EAA0D;AACxDE,sCAAQC,IAAR,CAAa,sBAAsBH,gBAAnC;AACA,eAAO,eAAP;AACD;AACD,UAAG,CAACD,iBAAJ,EAAsB;AACpB;AACD;AACD,UAAIK,oB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B,CAA9B,EAAgC;AAC9BY,oBAAUA,YAAUZ,cAAV,GAAyB,OAAnC;AACD;AACD,UAAGU,WAAWT,QAAX,IAAqB,CAAxB,EAA0B;AACxBW,oBAAUA,YAAUX,QAAV,GAAmB,KAA7B;AACD;AACD,UAAGS,WAAWR,WAAX,IAAwB,CAA3B,EAA6B;AAC3BU,oBAAUA,YAAUV,WAAV,GAAsB,MAAhC;AACD;AACDjB,kBAAY;AACVc,oCADU;AAEVc,gBAAQ5C,aAFE;AAGV6C,mBAAWF,SAHD;AAIVG,qBAAavB;AAJH,OAAZ;AAMA,aAAOP,SAAP;AACD","file":"StorageAmountChangedProcessorBlock.js","sourcesContent":["import { Message } from 'tplus-components-touch';\n\n/**\n * 储值金额改变时的处理逻辑\n */\n\nexport class StorageAmountChangedProcessorBlock {\n\n static execute(storageAmount,posStorageRule) {\n //是否赠送礼包\n let isPresentGiftpack=posStorageRule.isPresentGiftpack;\n //最低储值金额\n let minStorageAmount=posStorageRule.minStorageAmount;\n let storageGiftpackMethodEnum=posStorageRule.storageGiftpackMethodEnum;\n if(storageAmount !== '' && storageAmount<minStorageAmount){\n Message.warn('本次储值金额不能低于最低储值金额¥' + minStorageAmount);\n return 'noIsMinAmount';\n }\n if(!isPresentGiftpack){\n return;\n }\n let storageAmountList = [];\n posStorageRule.storageAmountSpecList.forEach(element =>{\n storageAmountList.push(element.storageAmount);\n })\n if(posStorageRule.presentSettingEnum=='FIXED_STORAGE' && storageAmount && storageAmountList.indexOf(storageAmount)==-1)\n {\n return;\n }\n\n let giftBagList=posStorageRule.storageGiftList;\n let resultMap = [];\n //储值金额为空返回所有面额及对应的礼包\n if(!storageAmount){\n posStorageRule.storageAmountSpecList.forEach(element =>{\n resultMap.push(this.getcanUseGiftBagList(element.storageAmount,giftBagList,storageGiftpackMethodEnum));\n })\n }\n //返回当前储值金额对应的礼包 \n else{\n resultMap.push(this.getcanUseGiftBagList(storageAmount,giftBagList,storageGiftpackMethodEnum));\n }\n return resultMap;\n }\n\n static getcanUseGiftBagList(storageAmount,giftBagList,storageGiftpackMethodEnum){\n let resultMap;\n let canUseGiftBagList=giftBagList.filter(item=>item.presentConditionTypeEnum==\"GWP_AS_ORDER\" \n && item.presentConditionValue<=storageAmount);\n let presentGiftBagList= [];\n if(storageGiftpackMethodEnum=='BY_MAX_ONLY'){\n canUseGiftBagList.sort((a, b) => {\n return b.presentConditionValue - a.presentConditionValue;\n })\n if(canUseGiftBagList.length && canUseGiftBagList[0]){\n let maxAmount=canUseGiftBagList[0].presentConditionValue;\n presentGiftBagList=canUseGiftBagList.filter(giftBag=>giftBag.presentConditionValue===maxAmount);\n }\n }else if(storageGiftpackMethodEnum=='BY_CUMULATIVE_PRESENT'){\n presentGiftBagList=canUseGiftBagList;\n }\n let presentAmount=0,couponQuantity=0,integral=0,growthValue=0;\n presentGiftBagList.length && presentGiftBagList.forEach(mtActivity => {\n mtActivity && mtActivity.mtRightList && mtActivity.mtRightList.forEach(mtRight => {\n switch(mtRight.getRightTypeEnum){\n case\"COUPON\":\n mtRight.mtRightCouponList.forEach(coupon =>{\n couponQuantity=couponQuantity+coupon.quantity;\n });\n break;\n case\"PRESENT_AMOUNT\":\n presentAmount=(presentAmount*100+parseFloat(mtRight.rightValue)*100)/100;\n break;\n case\"PRESENT_AMOUNT_FOR_CALC\":\n presentAmount=(presentAmount*100+parseFloat(storageAmount)*100)/100;\n break;\n case\"INTEGRAL\":\n integral=(integral*100+parseFloat(mtRight.rightValue)*100)/100;\n break;\n case\"GROWTH_VALUE\":\n growthValue=(growthValue*100+parseFloat(mtRight.rightValue)*100)/100;\n break;\n }\n });\n });\n let rightsStr='';\n if(parseFloat(presentAmount)>0){\n rightsStr=rightsStr+presentAmount+\"元赠送金;\";\n }\n if(parseFloat(couponQuantity)>0){\n rightsStr=rightsStr+couponQuantity+\"张优惠券;\";\n }\n if(parseFloat(integral)>0){\n rightsStr=rightsStr+integral+\"积分;\";\n }\n if(parseFloat(growthValue)>0){\n rightsStr=rightsStr+growthValue+\"成长值;\";\n }\n resultMap = {\n presentAmount,\n amount: storageAmount,\n RightsStr: rightsStr,\n MtActivitys: presentGiftBagList\n }\n return resultMap;\n }\n }"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["tplus-member/viewModels/memberVoucher.js"],"names":["Voucher","data","store","console","log","name","AddMemberView","GetMemberReferData","FieldName","SearchKey","SearchValue","idStore","IdStore","param","paramList","result","Success","ReferData","JSON","parse","saveMember","sub","ck","enumController","getEnumOj","Sex","Loading","show","text","url","tip","router","toJS","dto","MAN","Id","SECRECY","WOMAN","then","value","hide","ex","storeInfo","TStore","restore","storeID","ViewBase","observable","computed","action","changed","model"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AAQA;;AACA;;AACA;;AACA;;;;AACA;;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAEMA,O;;;;wBACO;AACT,aAAO,SAAP;AACD;;;wBAMoB;AACnB,UAAIC,OAAO,KAAKC,KAAL,CAAWD,IAAtB;AACA,UAAI,CAACA,IAAL,EAAW,OAAO,EAAP;AACXE,cAAQC,GAAR,CAAY,aAAZ,EAA2BH,IAA3B;AACA,aAAOA,IAAP;AACD;;;AAED,mBAAYC,KAAZ,EAAmBG,IAAnB,EAAyBC,aAAzB,EAAwC;AAAA;;AAAA;;AAAA,wIAChCJ,KADgC,EACzBG,IADyB;;AAAA;;AAAA;;AAAA,UAcxCE,kBAdwC;AAAA,0FAcnB,iBAAOC,SAAP;AAAA,YAAkBC,SAAlB,uEAA8B,EAA9B;AAAA,YAAkCC,WAAlC,uEAAgD,EAAhD;AAAA;AAAA;AAAA;AAAA;AAAA;AACbC,uBADa,GACH,MAAKC,OAAL,IAAgB,EADb;AAEbC,qBAFa,GAEL;AACZC,6BAAW;AACTN,+BAAWA,SADF;AAETC,+BAAWA,SAFF;AAGTG,6BAASD,OAHA;AAITD;AAJS;AADC,iBA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WD,IAAtB;AACA,2BAAOA,IAAP,EAAaiD,OAAb;AACA/C,cAAQC,GAAR,CAAY,SAAZ,EAAuBH,IAAvB;AACD,K;;;kBAwEY,CACb,EAAEI,MAAM,SAAR,EAAmB8C,OAAOnD,OAA1B,EADa,C","file":"memberVoucher.js","sourcesContent":["import {\
|
1
|
+
{"version":3,"sources":["tplus-member/viewModels/memberVoucher.js"],"names":["Voucher","data","store","console","log","name","AddMemberView","GetMemberReferData","FieldName","SearchKey","SearchValue","idStore","IdStore","param","paramList","result","Success","ReferData","JSON","parse","saveMember","sub","ck","enumController","getEnumOj","Sex","Loading","show","text","url","tip","router","toJS","dto","MAN","Id","SECRECY","WOMAN","then","value","hide","ex","storeInfo","TStore","restore","storeID","ViewBase","observable","computed","action","changed","model"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AAQA;;AACA;;AACA;;AACA;;;;AACA;;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAEMA,O;;;;wBACO;AACT,aAAO,SAAP;AACD;;;wBAMoB;AACnB,UAAIC,OAAO,KAAKC,KAAL,CAAWD,IAAtB;AACA,UAAI,CAACA,IAAL,EAAW,OAAO,EAAP;AACXE,cAAQC,GAAR,CAAY,aAAZ,EAA2BH,IAA3B;AACA,aAAOA,IAAP;AACD;;;AAED,mBAAYC,KAAZ,EAAmBG,IAAnB,EAAyBC,aAAzB,EAAwC;AAAA;;AAAA;;AAAA,wIAChCJ,KADgC,EACzBG,IADyB;;AAAA;;AAAA;;AAAA,UAcxCE,kBAdwC;AAAA,0FAcnB,iBAAOC,SAAP;AAAA,YAAkBC,SAAlB,uEAA8B,EAA9B;AAAA,YAAkCC,WAAlC,uEAAgD,EAAhD;AAAA;AAAA;AAAA;AAAA;AAAA;AACbC,uBADa,GACH,MAAKC,OAAL,IAAgB,EADb;AAEbC,qBAFa,GAEL;AACZC,6BAAW;AACTN,+BAAWA,SADF;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;WACW,UAACC,OAAD,EAAa;AACvB,UAAIjD,OAAO,OAAKC,KAAL,CAAWD,IAAtB;AACA,2BAAOA,IAAP,EAAaiD,OAAb;AACA/C,cAAQC,GAAR,CAAY,SAAZ,EAAuBH,IAAvB;AACD,K;;;kBAwEY,CACb,EAAEI,MAAM,SAAR,EAAmB8C,OAAOnD,OAA1B,EADa,C","file":"memberVoucher.js","sourcesContent":["import {\n observable,\n computed,\n action,\n toJS,\n isObservableArray,\n autorun\n} from 'mobx';\nimport { ViewBase } from 'mutants-appfx';\nimport { tApi, User } from 'tplus-api';\nimport { TStore } from 'tplus-poslogin';\nimport _merge from 'lodash/merge';\nimport { Loading } from 'tplus-components-touch';\nimport { enumController } from 'mutants-util';\n\nclass Voucher extends ViewBase {\n get type() {\n return 'Voucher';\n }\n\n store;\n verify;\n @observable AddMemberView;\n\n @computed get data() {\n let data = this.store.data\n if (!data) return {};\n console.log('member-data', data)\n return data;\n }\n\n constructor(store, name, AddMemberView) {\n super(store, name);\n this.AddMemberView = AddMemberView;\n const storeInfo = TStore.restore()\n this.IdStore = storeInfo.storeID\n }\n\n @action\n changeVal = (changed) => {\n let data = this.store.data;\n _merge(data, changed)\n console.log('data===', data)\n }\n\n GetMemberReferData = async (FieldName, SearchKey = '', SearchValue = '') => {\n const idStore = this.IdStore || '';\n const param = {\n paramList: {\n FieldName: FieldName,\n SearchKey: SearchKey,\n IdStore: idStore,\n SearchValue\n }\n };\n const result = await tApi(param, 'chanjet.AA.DR.INewRetailMember.GetMemberReferData', false, false)\n if (result.Success && result.ReferData) {\n return JSON.parse(result.ReferData);\n }\n return [];\n }\n\n /**\n * 会员保存或者编辑(开卡)\n * @param {string} sub 保存or编辑 (save,edit)\n */\n saveMember = (sub = 'save', ck) => {\n const { Sex } = enumController.getEnumOj();\n Loading.show({ text: '提交中,请稍等...' })\n try {\n let data = this.store.data;\n let param, url, tip, router;\n if (sub == 'save') {\n param = {\n \"dto\": data.toJS()\n };\n\n if(param.dto.Sex){\n // 判断是不是CC环境 \n if(Sex.MAN == 1){\n //兼容CC\n if(param.dto.Sex.Id == 33 || param.dto.Sex.Id == 0){\n param.dto.Sex.Id = Sex.SECRECY + \"\"\n }\n if(param.dto.Sex.Id == 157 || param.dto.Sex.Id == 1){\n param.dto.Sex.Id = Sex.MAN + \"\"\n }\n if(param.dto.Sex.Id == 137 || param.dto.Sex.Id == 2){\n param.dto.Sex.Id = Sex.WOMAN + \"\"\n }\n }\n }\n url = 'chanjet.AA.DR.INewRetailMember.SaveMember'\n } else if (sub == 'edit') {\n param = {\n \"MemberDTO\": data.toJS()\n };\n url = 'chanjet.AA.DR.INewRetailMember.Enabled'\n }\n tApi(param, url, false, false).then((value) => {\n Loading.hide()\n ck && ck(value);\n })\n }\n catch (ex) {\n console.log('会员新增/开卡,信息提交失败。', ex)\n Loading.hide()\n }\n }\n\n static fromJS(store, { AddMemberView }) {\n return new Voucher(store, 'Voucher', AddMemberView)\n }\n}\n\nexport default [\n { name: 'Voucher', model: Voucher }\n];"]}
|
@@ -107,11 +107,11 @@ function _applyDecoratedDescriptor(target, property, decorators, descriptor, con
|
|
107
107
|
}
|
108
108
|
|
109
109
|
var defaultImage = 'https://newretail.static.chanjet.com/default_avatar.png';
|
110
|
-
/**
|
111
|
-
* func
|
112
|
-
* @prop sub save / edit
|
113
|
-
* @prop route
|
114
|
-
* @prop ck 回掉函数
|
110
|
+
/**
|
111
|
+
* func
|
112
|
+
* @prop sub save / edit
|
113
|
+
* @prop route
|
114
|
+
* @prop ck 回掉函数
|
115
115
|
*/
|
116
116
|
var funcs = {
|
117
117
|
'save': {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["tplus-member/views/MemberOrderView.js"],"names":["defaultImage","funcs","sub","route","ck","observer","props","context","formRef","React","createRef","cancel","stores","modalRouter","hide","func","handleSave","current","submit","handleCancel","platform","isHorizontalSunMi","window","android_setKeyBoard","SetKeyBoardDisplay","finishFailed","values","errorFields","outOfDate","error","formFinish","saveMember","save","state","showModal","changed","Assign","_this","changeVal","viewModel","controllerEvent","then","setState","verifyResult","verify","result","Message","success","modals","closeCk","drawerStore","data","selectMemberStore","searchValue","CardCode","setTimeout","init","title","key","subKey","mid","AddMemberView","edit","keys","length","curMemberInfo","editData","err","includes","getErrorField","Headers","GetMemberReferData","field","find","el","FieldName","Title","info","console","log","map","ControlType","imageField","isImage","Visible","isImageRead","ReadOnly","ImageFile","user","options","get","province","disctrict","city","geoCode","HeadersCopy","defaultValue","display","src","Component","action"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;AACA;;AACA;;AACA;;AAEA;;AACA;;AACA;;AACA;;;;AACA;;;;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,IAAMA,eAAe,yDAArB;AACA;;;;;;AAMA,IAAMC,QAAQ;AACZ,UAAQ;AACNC,SAAK,MADC;AAENC,WAAO,YAFD;AAGN;AACAC,QAAI;AAJE,GADI;AAOZ,UAAQ;AACNF,SAAK,MADC;AAENC,WAAO,cAFD;AAGN;AACAC,QAAI;AAJE;AAPI,CAAd;;uBAeC,mCAAgB,SAAhB,C,oBACAC,mB;;;AAGC,oBAAYC,KAAZ,EAAmBC,OAAnB,EAA4B;AAAA;;AAAA,2IACpBD,KADoB,EACbC,OADa;;AAAA,WAK5BC,OAL4B,GAKlBC,gBAAMC,SAAN,EALkB;;AAAA,WA2E5BC,MA3E4B,GA2EnB,YAAM;AACbC,6BAAOC,WAAP,CAAmBC,IAAnB,CAAwB,OAAKC,IAAL,CAAUZ,KAAlC;AACD,KA7E2B;;AAAA,WAiG5Ba,UAjG4B,GAiGf,YAAM;AACjB,aAAKR,OAAL,CAAaS,OAAb,CAAqBC,MAArB;AACD,KAnG2B;;AAAA,WAsG5BC,YAtG4B,GAsGb,YAAM;AACnB,aAAKR,MAAL;;AADmB,iBAEWS,yBAAY,EAFvB;AAAA,UAEXC,iBAFW,QAEXA,iBAFW;;AA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S,+DAShCC,Y","file":"MemberOrderView.js","sourcesContent":["import React from 'react';\r\nimport { when, action } from 'mobx';\r\nimport { observer } from 'mobx-react';\r\nimport { platform } from 'mutants-util';\r\nimport { Button } from 'antd';\r\nimport { injectViewModel } from 'mutants-appfx';\r\nimport { CommonForm, Message,Ticon } from 'tplus-components-touch';\r\nimport { stores, localStore } from 'mutants-microfx';\r\nimport MemberPhoto from '../member/MemberPhoto.js';\r\nimport _clonedeep from 'lodash/cloneDeep';\r\nimport './memberOrder.less';\r\n\r\nconst defaultImage = 'https://newretail.static.chanjet.com/default_avatar.png';\r\n/**\r\n * func\r\n * @prop sub save / edit\r\n * @prop route\r\n * @prop ck 回掉函数\r\n */\r\nconst funcs = {\r\n 'save': {\r\n sub: 'save',\r\n route: '/AA/MEMBER',\r\n // tip:'新增会员成功',\r\n ck: 'jumpToMemberManager'\r\n },\r\n 'edit': {\r\n sub: 'edit',\r\n route: '/AA/OPENCARD',\r\n // tip:'开卡成功',\r\n ck: 'openCardCk'\r\n }\r\n};\r\n\r\n@injectViewModel('Voucher')\r\n@observer\r\nexport default class extends React.Component {\r\n\r\n constructor(props, context) {\r\n super(props, context)\r\n this.func = funcs.save;\r\n this.state = { showModal: false };\r\n }\r\n formRef = React.createRef();\r\n\r\n @action\r\n async changeVal(changed,Assign=false) {\r\n const _this = this;\r\n const { viewModel: { changeVal } } = this.props;\r\n const { viewModel } = this.props;\r\n const { controllerEvent } = this.props;\r\n controllerEvent('change', { changed,Assign }).then(() => {\r\n _this.setState({})\r\n });\r\n }\r\n\r\n async saveMember() {\r\n const { viewModel: { saveMember } } = this.props;\r\n const _this = this;\r\n const { viewModel } = this.props;\r\n const { controllerEvent } = this.props;\r\n const verifyResult = await controllerEvent('handleData');\r\n if (!viewModel.verify) return;\r\n\r\n saveMember(this.func.save, (result) => {\r\n //保存或者编辑会员后处理\r\n _this[_this.func.ck] && _this[_this.func.ck]()\r\n });\r\n }\r\n\r\n openCardCk() {\r\n Message.success('开卡成功')\r\n stores.modalRouter.hide(this.func.route);\r\n const ck = stores.modalRouter.modals[this.func.route].closeCk;\r\n ck && ck();\r\n }\r\n\r\n jumpToMemberManager() {\r\n stores.modalRouter.hide(this.func.route);\r\n if (!stores.drawerStore) return;\r\n const { viewModel: { data } } = this.props;\r\n if (stores.selectMemberStore) {\r\n stores.selectMemberStore.searchValue = data.CardCode || ''\r\n }\r\n setTimeout(() => { stores.drawerStore.init({ title: '会员管理', key: 'member', subKey: 'memberManager' }) }, 300)\r\n }\r\n\r\n componentWillMount() {\r\n const { mid } = this.props;\r\n const { viewModel: { data, AddMemberView } } = this.props;\r\n const { viewModel } = this.props;\r\n if (mid && mid == 'OPENCARD') {\r\n this.func = funcs.edit;\r\n const _this = this;\r\n when(() => {\r\n let keys = Object.keys(data);\r\n return !!keys.length;\r\n }, () => {\r\n if (stores.selectMemberStore && stores.selectMemberStore.curMemberInfo) {\r\n const editData = stores.selectMemberStore.curMemberInfo || {};\r\n _this.changeVal(_clonedeep(editData),true)\r\n }\r\n })\r\n }\r\n // if(mid&&mid=='MEMBER'){\r\n when(() => {\r\n return !!(viewModel && viewModel.AddMemberView);\r\n }, () => {\r\n const { controllerEvent } = this.props;\r\n controllerEvent('modifyVM', { viewModel });\r\n })\r\n // }\r\n }\r\n cancel = () => {\r\n stores.modalRouter.hide(this.func.route)\r\n }\r\n\r\n getErrorField(err) {\r\n let keys = Object.keys(err) || [];\r\n if (keys.includes('errors')) {\r\n return err['errors']\r\n } else {\r\n return this.getErrorField(err[keys[0]])\r\n }\r\n }\r\n\r\n error(err, values) {\r\n const { viewModel: { data, AddMemberView: { Headers }, GetMemberReferData } } = this.props;\r\n const error = this.getErrorField(err);\r\n const field = (error[0] || {}).field;\r\n const title = (Headers.find(el => el.FieldName == field) || {}).Title || '';\r\n Message.info(`请输入${title}`);\r\n }\r\n\r\n // 提交\r\n handleSave = () => {\r\n this.formRef.current.submit();\r\n }\r\n\r\n //取消\r\n handleCancel = () => {\r\n this.cancel()\r\n const { isHorizontalSunMi } = platform || {};\r\n isHorizontalSunMi && window.android_setKeyBoard && window.android_setKeyBoard.SetKeyBoardDisplay(0)\r\n };\r\n\r\n finishFailed = (values, errorFields, outOfDate) => {\r\n this.error(errorFields, values);\r\n };\r\n\r\n formFinish = (values) => {\r\n this.saveMember();\r\n };\r\n\r\n render() {\r\n const { viewModel: { data, AddMemberView: { Headers }, GetMemberReferData }, mid } = this.props;\r\n console.log('member_datainfo===', data)\r\n console.log('member_viewinfo===', Headers)\r\n console.log('member_viewinfo-contorl===', Headers.map((el) => el.ControlType))\r\n const imageField = Headers.find((el) => el.FieldName == 'ImageFile');\r\n const isImage = imageField && imageField.Visible;\r\n const isImageRead = imageField && imageField.ReadOnly;\r\n const { showModal } = this.state;\r\n const { ImageFile } = data || {};\r\n const { province, disctrict, city, geoCode } = stores.user.options.get('loginInfo') || {};\r\n let HeadersCopy = Headers.map((el) => {\r\n el.ControlType == 'SelectAddress'? el.defaultValue = { province,city,\"area\":disctrict,geoCode}:'';\r\n return el;\r\n });\r\n return (\r\n <div className='memberadd-container'>\r\n <div className='image' style={{ display: !!isImage ? 'block' : 'none' }}>\r\n <img src={ImageFile || defaultImage} />\r\n </div>\r\n {\r\n !!isImage && !isImageRead &&\r\n <Ticon type=\"bianjixinxi\" className='editIcon' onClick={() => { this.setState({ showModal: true }) }} />\r\n }\r\n <CommonForm\r\n form={this.formRef}\r\n onFinish={this.formFinish}\r\n onFinishFailed={this.finishFailed}\r\n data={data}\r\n viewInfo={HeadersCopy}\r\n changeVal={(changed) => {\r\n this.changeVal(changed)\r\n }}\r\n styles={{\r\n 'height': !!isImage ? '326px' : '376px',\r\n 'overflow': 'auto'\r\n }}\r\n getMemberReferData={GetMemberReferData}\r\n />\r\n\r\n <div className='memberadd-submit'>\r\n <Button onClick={this.handleCancel}>取消</Button>\r\n <Button type='primary' onClick={this.handleSave}>确定</Button>\r\n </div>\r\n\r\n <MemberPhoto titleModal={'头像选择'}\r\n showModal={showModal}\r\n handleModal={() => {\r\n this.setState({ showModal: false })\r\n }}\r\n onOk={(src) => {\r\n this.changeVal({ ImageFile: src || '' })\r\n this.setState({ showModal: false })\r\n }}\r\n />\r\n </div>)\r\n }\r\n}"]}
|
1
|
+
{"version":3,"sources":["tplus-member/views/MemberOrderView.js"],"names":["defaultImage","funcs","sub","route","ck","observer","props","context","formRef","React","createRef","cancel","stores","modalRouter","hide","func","handleSave","current","submit","handleCancel","platform","isHorizontalSunMi","window","android_setKeyBoard","SetKeyBoardDisplay","finishFailed","values","errorFields","outOfDate","error","formFinish","saveMember","save","state","showModal","changed","Assign","_this","changeVal","viewModel","controllerEvent","then","setState","verifyResult","verify","result","Message","success","modals","closeCk","drawerStore","data","selectMemberStore","searchValue","CardCode","setTimeout","init","title","key","subKey","mid","AddMemberView","edit","keys","length","curMemberInfo","editData","err","includes","getErrorField","Headers","GetMemberReferData","field","find","el","FieldName","Title","info","console","log","map","ControlType","imageField","isImage","Visible","isImageRead","ReadOnly","ImageFile","user","options","get","province","disctrict","city","geoCode","HeadersCopy","defaultValue","display","src","Component","action"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;AACA;;AACA;;AACA;;AAEA;;AACA;;AACA;;AACA;;;;AACA;;;;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,IAAMA,eAAe,yDAArB;AACA;;;;;;AAMA,IAAMC,QAAQ;AACZ,UAAQ;AACNC,SAAK,MADC;AAENC,WAAO,YAFD;AAGN;AACAC,QAAI;AAJE,GADI;AAOZ,UAAQ;AACNF,SAAK,MADC;AAENC,WAAO,cAFD;AAGN;AACAC,QAAI;AAJE;AAPI,CAAd;;uBAeC,mCAAgB,SAAhB,C,oBACAC,mB;;;AAGC,oBAAYC,KAAZ,EAAmBC,OAAnB,EAA4B;AAAA;;AAAA,2IACpBD,KADoB,EACbC,OADa;;AAAA,WAK5BC,OAL4B,GAKlBC,gBAAMC,SAAN,E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AAA;AAFF,SAxBF;AA6BE,sCAAC,qBAAD,IAAa,YAAY,MAAzB;AACE,qBAAWkB,SADb;AAEE,uBAAa,uBAAM;AACjB,mBAAKQ,QAAL,CAAc,EAAER,WAAW,KAAb,EAAd;AACD,WAJH;AAKE,gBAAM,cAACgE,GAAD,EAAS;AACb,mBAAK5D,SAAL,CAAe,EAAEiD,WAAWW,OAAO,EAApB,EAAf;AACA,mBAAKxD,QAAL,CAAc,EAAER,WAAW,KAAb,EAAd;AACD;AARH;AA7BF,OADF;AAyCD;;;EA9K0BzB,gBAAM0F,S,+DAShCC,Y","file":"MemberOrderView.js","sourcesContent":["import React from 'react';\nimport { when, action } from 'mobx';\nimport { observer } from 'mobx-react';\nimport { platform } from 'mutants-util';\nimport { Button } from 'antd';\nimport { injectViewModel } from 'mutants-appfx';\nimport { CommonForm, Message,Ticon } from 'tplus-components-touch';\nimport { stores, localStore } from 'mutants-microfx';\nimport MemberPhoto from '../member/MemberPhoto.js';\nimport _clonedeep from 'lodash/cloneDeep';\nimport './memberOrder.less';\n\nconst defaultImage = 'https://newretail.static.chanjet.com/default_avatar.png';\n/**\n * func\n * @prop sub save / edit\n * @prop route\n * @prop ck 回掉函数\n */\nconst funcs = {\n 'save': {\n sub: 'save',\n route: '/AA/MEMBER',\n // tip:'新增会员成功',\n ck: 'jumpToMemberManager'\n },\n 'edit': {\n sub: 'edit',\n route: '/AA/OPENCARD',\n // tip:'开卡成功',\n ck: 'openCardCk'\n }\n};\n\n@injectViewModel('Voucher')\n@observer\nexport default class extends React.Component {\n\n constructor(props, context) {\n super(props, context)\n this.func = funcs.save;\n this.state = { showModal: false };\n }\n formRef = React.createRef();\n\n @action\n async changeVal(changed,Assign=false) {\n const _this = this;\n const { viewModel: { changeVal } } = this.props;\n const { viewModel } = this.props;\n const { controllerEvent } = this.props;\n controllerEvent('change', { changed,Assign }).then(() => {\n _this.setState({})\n });\n }\n\n async saveMember() {\n const { viewModel: { saveMember } } = this.props;\n const _this = this;\n const { viewModel } = this.props;\n const { controllerEvent } = this.props;\n const verifyResult = await controllerEvent('handleData');\n if (!viewModel.verify) return;\n\n saveMember(this.func.save, (result) => {\n //保存或者编辑会员后处理\n _this[_this.func.ck] && _this[_this.func.ck]()\n });\n }\n\n openCardCk() {\n Message.success('开卡成功')\n stores.modalRouter.hide(this.func.route);\n const ck = stores.modalRouter.modals[this.func.route].closeCk;\n ck && ck();\n }\n\n jumpToMemberManager() {\n stores.modalRouter.hide(this.func.route);\n if (!stores.drawerStore) return;\n const { viewModel: { data } } = this.props;\n if (stores.selectMemberStore) {\n stores.selectMemberStore.searchValue = data.CardCode || ''\n }\n setTimeout(() => { stores.drawerStore.init({ title: '会员管理', key: 'member', subKey: 'memberManager' }) }, 300)\n }\n\n componentWillMount() {\n const { mid } = this.props;\n const { viewModel: { data, AddMemberView } } = this.props;\n const { viewModel } = this.props;\n if (mid && mid == 'OPENCARD') {\n this.func = funcs.edit;\n const _this = this;\n when(() => {\n let keys = Object.keys(data);\n return !!keys.length;\n }, () => {\n if (stores.selectMemberStore && stores.selectMemberStore.curMemberInfo) {\n const editData = stores.selectMemberStore.curMemberInfo || {};\n _this.changeVal(_clonedeep(editData),true)\n }\n })\n }\n // if(mid&&mid=='MEMBER'){\n when(() => {\n return !!(viewModel && viewModel.AddMemberView);\n }, () => {\n const { controllerEvent } = this.props;\n controllerEvent('modifyVM', { viewModel });\n })\n // }\n }\n cancel = () => {\n stores.modalRouter.hide(this.func.route)\n }\n\n getErrorField(err) {\n let keys = Object.keys(err) || [];\n if (keys.includes('errors')) {\n return err['errors']\n } else {\n return this.getErrorField(err[keys[0]])\n }\n }\n\n error(err, values) {\n const { viewModel: { data, AddMemberView: { Headers }, GetMemberReferData } } = this.props;\n const error = this.getErrorField(err);\n const field = (error[0] || {}).field;\n const title = (Headers.find(el => el.FieldName == field) || {}).Title || '';\n Message.info(`请输入${title}`);\n }\n\n // 提交\n handleSave = () => {\n this.formRef.current.submit();\n }\n\n //取消\n handleCancel = () => {\n this.cancel()\n const { isHorizontalSunMi } = platform || {};\n isHorizontalSunMi && window.android_setKeyBoard && window.android_setKeyBoard.SetKeyBoardDisplay(0)\n };\n\n finishFailed = (values, errorFields, outOfDate) => {\n this.error(errorFields, values);\n };\n\n formFinish = (values) => {\n this.saveMember();\n };\n\n render() {\n const { viewModel: { data, AddMemberView: { Headers }, GetMemberReferData }, mid } = this.props;\n console.log('member_datainfo===', data)\n console.log('member_viewinfo===', Headers)\n console.log('member_viewinfo-contorl===', Headers.map((el) => el.ControlType))\n const imageField = Headers.find((el) => el.FieldName == 'ImageFile');\n const isImage = imageField && imageField.Visible;\n const isImageRead = imageField && imageField.ReadOnly;\n const { showModal } = this.state;\n const { ImageFile } = data || {};\n const { province, disctrict, city, geoCode } = stores.user.options.get('loginInfo') || {};\n let HeadersCopy = Headers.map((el) => {\n el.ControlType == 'SelectAddress'? el.defaultValue = { province,city,\"area\":disctrict,geoCode}:'';\n return el;\n });\n return (\n <div className='memberadd-container'>\n <div className='image' style={{ display: !!isImage ? 'block' : 'none' }}>\n <img src={ImageFile || defaultImage} />\n </div>\n {\n !!isImage && !isImageRead &&\n <Ticon type=\"bianjixinxi\" className='editIcon' onClick={() => { this.setState({ showModal: true }) }} />\n }\n <CommonForm\n form={this.formRef}\n onFinish={this.formFinish}\n onFinishFailed={this.finishFailed}\n data={data}\n viewInfo={HeadersCopy}\n changeVal={(changed) => {\n this.changeVal(changed)\n }}\n styles={{\n 'height': !!isImage ? '326px' : '376px',\n 'overflow': 'auto'\n }}\n getMemberReferData={GetMemberReferData}\n />\n\n <div className='memberadd-submit'>\n <Button onClick={this.handleCancel}>取消</Button>\n <Button type='primary' onClick={this.handleSave}>确定</Button>\n </div>\n\n <MemberPhoto titleModal={'头像选择'}\n showModal={showModal}\n handleModal={() => {\n this.setState({ showModal: false })\n }}\n onOk={(src) => {\n this.changeVal({ ImageFile: src || '' })\n this.setState({ showModal: false })\n }}\n />\n </div>)\n }\n}"]}
|
@@ -1,143 +1,143 @@
|
|
1
|
-
|
2
|
-
.memberContainer {
|
3
|
-
|
4
|
-
.u-modal-dialog {
|
5
|
-
height: 470px !important;
|
6
|
-
width : 600px !important
|
7
|
-
}
|
8
|
-
.u-modal-body {
|
9
|
-
height: 424px !important;
|
10
|
-
overflow:hidden !important;
|
11
|
-
}
|
12
|
-
|
13
|
-
.u-modal-footer {
|
14
|
-
display: none;
|
15
|
-
}
|
16
|
-
|
17
|
-
.memberstore {
|
18
|
-
.memberstore-head {
|
19
|
-
display : flex;
|
20
|
-
justify-content: center;
|
21
|
-
align-items : center;
|
22
|
-
width : 100%;
|
23
|
-
height : 88px;
|
24
|
-
|
25
|
-
.imageContainer {
|
26
|
-
font-family : PingFang-SC-Regular;
|
27
|
-
display: flex;
|
28
|
-
align-items: center;
|
29
|
-
width: 200px;
|
30
|
-
img {
|
31
|
-
display : inline-block;
|
32
|
-
width : 69px;
|
33
|
-
height : 69px;
|
34
|
-
border-radius: 50%;
|
35
|
-
}
|
36
|
-
|
37
|
-
.imageContainer-message {
|
38
|
-
width : 100px;
|
39
|
-
text-align : left;
|
40
|
-
|
41
|
-
.divText{
|
42
|
-
font-size : 13px;
|
43
|
-
color : #000000;
|
44
|
-
letter-spacing: 0;
|
45
|
-
text-align : left;
|
46
|
-
white-space : nowrap;
|
47
|
-
text-overflow : ellipsis;
|
48
|
-
overflow : hidden;
|
49
|
-
word-break : break-all;
|
50
|
-
height : 16px;
|
51
|
-
line-height : 16px;
|
52
|
-
padding: 0 2px;
|
53
|
-
}
|
54
|
-
|
55
|
-
.divBlank {
|
56
|
-
height: 16px;
|
57
|
-
}
|
58
|
-
}
|
59
|
-
}
|
60
|
-
|
61
|
-
.message {
|
62
|
-
text-align : left;
|
63
|
-
position : relative;
|
64
|
-
width : 180px;
|
65
|
-
height : 56px;
|
66
|
-
box-sizing : border-box;
|
67
|
-
padding-left: 20px;
|
68
|
-
padding-top : 10px;
|
69
|
-
|
70
|
-
span:last-child {
|
71
|
-
font-family: PingFang-SC-Regular;
|
72
|
-
font-size : 12px;
|
73
|
-
color : #666666;
|
74
|
-
line-height: 12px;
|
75
|
-
}
|
76
|
-
|
77
|
-
span:first-child {
|
78
|
-
font-family: PingFang-SC-Semibold;
|
79
|
-
font-size : 16px;
|
80
|
-
color : #FF595E;
|
81
|
-
line-height: 12px;
|
82
|
-
}
|
83
|
-
|
84
|
-
&:before {
|
85
|
-
content : '';
|
86
|
-
position : absolute;
|
87
|
-
top : 13px;
|
88
|
-
left : 0px;
|
89
|
-
width : 1px;
|
90
|
-
height : 25px;
|
91
|
-
background: #C8C8CD;
|
92
|
-
}
|
93
|
-
}
|
94
|
-
}
|
95
|
-
|
96
|
-
.line {
|
97
|
-
height : 8px;
|
98
|
-
width : 100%;
|
99
|
-
background-color: #F4F4F4;
|
100
|
-
}
|
101
|
-
|
102
|
-
.form {
|
103
|
-
height: 277px;
|
104
|
-
padding: 20px;
|
105
|
-
.u-form-item {
|
106
|
-
display : flex;
|
107
|
-
align-items: center;
|
108
|
-
margin : 10px 30px;
|
109
|
-
height: 32px;
|
110
|
-
|
111
|
-
.one {
|
112
|
-
width : 120px;
|
113
|
-
font-size : 14px;
|
114
|
-
color : #000000;
|
115
|
-
text-align : right;
|
116
|
-
padding-right: 20px;
|
117
|
-
}
|
118
|
-
|
119
|
-
.two {
|
120
|
-
font-size : 14px;
|
121
|
-
color : #000000;
|
122
|
-
width: 300px;
|
123
|
-
overflow: hidden;
|
124
|
-
white-space: nowrap;
|
125
|
-
text-overflow: ellipsis;
|
126
|
-
}
|
127
|
-
}
|
128
|
-
}
|
129
|
-
|
130
|
-
.line2 {
|
131
|
-
height : 1px;
|
132
|
-
width : 100%;
|
133
|
-
background-color: #E6E6EB;
|
134
|
-
}
|
135
|
-
.footer {
|
136
|
-
height : 50px;
|
137
|
-
line-height: 50px;
|
138
|
-
padding: 2px 16px;
|
139
|
-
}
|
140
|
-
}
|
141
|
-
}
|
142
|
-
|
143
|
-
|
1
|
+
|
2
|
+
.memberContainer {
|
3
|
+
|
4
|
+
.u-modal-dialog {
|
5
|
+
height: 470px !important;
|
6
|
+
width : 600px !important
|
7
|
+
}
|
8
|
+
.u-modal-body {
|
9
|
+
height: 424px !important;
|
10
|
+
overflow:hidden !important;
|
11
|
+
}
|
12
|
+
|
13
|
+
.u-modal-footer {
|
14
|
+
display: none;
|
15
|
+
}
|
16
|
+
|
17
|
+
.memberstore {
|
18
|
+
.memberstore-head {
|
19
|
+
display : flex;
|
20
|
+
justify-content: center;
|
21
|
+
align-items : center;
|
22
|
+
width : 100%;
|
23
|
+
height : 88px;
|
24
|
+
|
25
|
+
.imageContainer {
|
26
|
+
font-family : PingFang-SC-Regular;
|
27
|
+
display: flex;
|
28
|
+
align-items: center;
|
29
|
+
width: 200px;
|
30
|
+
img {
|
31
|
+
display : inline-block;
|
32
|
+
width : 69px;
|
33
|
+
height : 69px;
|
34
|
+
border-radius: 50%;
|
35
|
+
}
|
36
|
+
|
37
|
+
.imageContainer-message {
|
38
|
+
width : 100px;
|
39
|
+
text-align : left;
|
40
|
+
|
41
|
+
.divText{
|
42
|
+
font-size : 13px;
|
43
|
+
color : #000000;
|
44
|
+
letter-spacing: 0;
|
45
|
+
text-align : left;
|
46
|
+
white-space : nowrap;
|
47
|
+
text-overflow : ellipsis;
|
48
|
+
overflow : hidden;
|
49
|
+
word-break : break-all;
|
50
|
+
height : 16px;
|
51
|
+
line-height : 16px;
|
52
|
+
padding: 0 2px;
|
53
|
+
}
|
54
|
+
|
55
|
+
.divBlank {
|
56
|
+
height: 16px;
|
57
|
+
}
|
58
|
+
}
|
59
|
+
}
|
60
|
+
|
61
|
+
.message {
|
62
|
+
text-align : left;
|
63
|
+
position : relative;
|
64
|
+
width : 180px;
|
65
|
+
height : 56px;
|
66
|
+
box-sizing : border-box;
|
67
|
+
padding-left: 20px;
|
68
|
+
padding-top : 10px;
|
69
|
+
|
70
|
+
span:last-child {
|
71
|
+
font-family: PingFang-SC-Regular;
|
72
|
+
font-size : 12px;
|
73
|
+
color : #666666;
|
74
|
+
line-height: 12px;
|
75
|
+
}
|
76
|
+
|
77
|
+
span:first-child {
|
78
|
+
font-family: PingFang-SC-Semibold;
|
79
|
+
font-size : 16px;
|
80
|
+
color : #FF595E;
|
81
|
+
line-height: 12px;
|
82
|
+
}
|
83
|
+
|
84
|
+
&:before {
|
85
|
+
content : '';
|
86
|
+
position : absolute;
|
87
|
+
top : 13px;
|
88
|
+
left : 0px;
|
89
|
+
width : 1px;
|
90
|
+
height : 25px;
|
91
|
+
background: #C8C8CD;
|
92
|
+
}
|
93
|
+
}
|
94
|
+
}
|
95
|
+
|
96
|
+
.line {
|
97
|
+
height : 8px;
|
98
|
+
width : 100%;
|
99
|
+
background-color: #F4F4F4;
|
100
|
+
}
|
101
|
+
|
102
|
+
.form {
|
103
|
+
height: 277px;
|
104
|
+
padding: 20px;
|
105
|
+
.u-form-item {
|
106
|
+
display : flex;
|
107
|
+
align-items: center;
|
108
|
+
margin : 10px 30px;
|
109
|
+
height: 32px;
|
110
|
+
|
111
|
+
.one {
|
112
|
+
width : 120px;
|
113
|
+
font-size : 14px;
|
114
|
+
color : #000000;
|
115
|
+
text-align : right;
|
116
|
+
padding-right: 20px;
|
117
|
+
}
|
118
|
+
|
119
|
+
.two {
|
120
|
+
font-size : 14px;
|
121
|
+
color : #000000;
|
122
|
+
width: 300px;
|
123
|
+
overflow: hidden;
|
124
|
+
white-space: nowrap;
|
125
|
+
text-overflow: ellipsis;
|
126
|
+
}
|
127
|
+
}
|
128
|
+
}
|
129
|
+
|
130
|
+
.line2 {
|
131
|
+
height : 1px;
|
132
|
+
width : 100%;
|
133
|
+
background-color: #E6E6EB;
|
134
|
+
}
|
135
|
+
.footer {
|
136
|
+
height : 50px;
|
137
|
+
line-height: 50px;
|
138
|
+
padding: 2px 16px;
|
139
|
+
}
|
140
|
+
}
|
141
|
+
}
|
142
|
+
|
143
|
+
|