tplus-member 3.40.3 → 3.42.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (35) hide show
  1. package/dist/member/MemberCardList.js +2 -4
  2. package/dist/member/MemberCardList.js.map +1 -1
  3. package/dist/member/ShopMember.js +12 -9
  4. package/dist/member/ShopMember.js.map +1 -1
  5. package/dist/member/ShopMember.less +3 -4
  6. package/dist/member/ShopMemberStorage.js +9 -6
  7. package/dist/member/ShopMemberStorage.js.map +1 -1
  8. package/dist/member/api.js +60 -30
  9. package/dist/member/api.js.map +1 -1
  10. package/dist/member/index.js +520 -476
  11. package/dist/member/index.js.map +1 -1
  12. package/dist/member/index.less +1 -2
  13. package/dist/member/memberMenu/index.js +46 -35
  14. package/dist/member/memberMenu/index.js.map +1 -1
  15. package/dist/member/memberMenu/modifyPass/store.js +81 -31
  16. package/dist/member/memberMenu/modifyPass/store.js.map +1 -1
  17. package/dist/member/memberMenuStorage/modifyPass/store.js +111 -43
  18. package/dist/member/memberMenuStorage/modifyPass/store.js.map +1 -1
  19. package/dist/member/memberTab/MemberManager.js +22 -17
  20. package/dist/member/memberTab/MemberManager.js.map +1 -1
  21. package/dist/member/memberTab.js +19 -14
  22. package/dist/member/memberTab.js.map +1 -1
  23. package/dist/stores/MemberStore.js +60 -34
  24. package/dist/stores/MemberStore.js.map +1 -1
  25. package/dist/viewDoMain/CheckMemberProcessorBlock.js +4 -1
  26. package/dist/viewDoMain/CheckMemberProcessorBlock.js.map +1 -1
  27. package/dist/views/MemberOrderView.js +2 -4
  28. package/dist/views/MemberOrderView.js.map +1 -1
  29. package/dist/views/MemberStoreNewView.js +2 -5
  30. package/dist/views/MemberStoreNewView.js.map +1 -1
  31. package/dist/views/MemberStoreView.js +2 -5
  32. package/dist/views/MemberStoreView.js.map +1 -1
  33. package/dist/views/MemberStoreViewContainer.js +4 -1
  34. package/dist/views/MemberStoreViewContainer.js.map +1 -1
  35. package/package.json +29 -28
@@ -1 +1 @@
1
- {"version":3,"sources":["tplus-member/member/ShopMemberStorage.js"],"names":["ShopMemberStorage","props","currentPage","cacheUserRetail","hotKeyListener","nodeName","index","className","indexOf","isHotKeyAction","activeElement","document","blur","observerCard","setTimeout","slideSelected","querySelector","prevSlideSelected","swiperSelectObserver","unobserve","observe","windowOnresize","memberTab","window","removeEventListener","memberTabHeight","state","clientHeight","tabMenuHeight","setState","isNotSetState","Idmember","willUnmount","currentMemberId","getCardList","cardNo","pageSize","key","replace","length","Message","error","Loading","show","target","loadingBtn","ms","getCardInfoByCardNo","then","ret","data","cardList","selected","setCardInfo","memberCardList","resetSlideTop","hide","catch","message","err","includes","ModalWraper","warning","title","content","loadUserInfo","ID","getGetUmemberDTO","stores","selectMemberStore","setCurMemberInfo","memberChange","warn","cardInfo","handleSearchClick","searchValue","userSearch","handleSearchChange","val","keyboardOnOk","keyboardOnClose","searchRef","onKeyPressed","e","keyCode","enterKey","MemberMenuChange","dto","memberList","arr","map","item","push","member","onClear","input","focus","mode","searchStatus","listArr","tabIndex","defaultActiveKey","memberStore","addEventListener","$","on","off","isUserAndroidKey","android_setKeyBoard","initEmpty","isAllAuthority","status","showModal","titleModal","type","onCancel","authProcess","storeKey","showSearch","noList","showSelectBtn","voucherStateType","searchClassName","hotKey","hotKeyNotFilter","memberTabClassName","hotKeyBindClass","value","ref","focusInputName","inputTarget","Keyboard","open","getNewValue","v","close","list","display","Component","defaultProps","contextTypes","viewModel","PropTypes","object","columnInfo","array"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;AACA;;;;AAEA;;AACA;;AACA;;AACA;;;;AACA;;;;AACA;;AACA;;AACA;;;;AACA;;;;;;AAEA;;IAEqBA,iB;;;AASnB,6BAAYC,KAAZ,EAAmB;AAAA;;AAAA,4JACXA,KADW;;AAAA,UAcnBC,WAdmB,GAcL,CAdK;AAAA,UAenBC,eAfmB,GAeD,EAfC;;AAAA,UAsCnBC,cAtCmB,GAsCF,UAACC,QAAD,EAAWC,KAAX,EAAqB;AACpC,UAAID,YA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CF;AAgFE;AAAA;AAAA,YAAK,WAAU,eAAf;AACE;AAAA;AAAA,cAAQ,SAASgE,QAAjB;AAAA;AAAA;AADF;AAhFF,OADF;AAsFD;;;EAlS4CuB,gB,UACtCC,Y,GAAe;AACpBxB,YAAU,oBAAM,CAAE;AADE,C,SAIfyB,Y,GAAe;AACpBC,aAAWC,oBAAUC,MADD;AAEpBC,cAAYF,oBAAUG;AAFF,C;kBALHjJ,iB","file":"ShopMemberStorage.js","sourcesContent":["import React, { Component } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { Button } from 'antd';\r\nimport { ModalWraper, Input, Loading, Message, Ticon, Keyboard, Spin, hotKey } from 'tplus-components-touch';\r\nimport { stores } from 'mutants-microfx';\r\nimport { enumController, platform } from 'mutants-util';\r\nimport memberStore from './api';\r\nimport MemberTab from './memberTab/index.js';\r\nimport './ShopMember.less';\r\nimport { formatPrecision, userInfoFormat, errMessageTip } from '../utils';\r\nimport MemberMenuStorage from './memberMenuStorage/index.js'\r\nimport MemberCardList from './MemberCardList'\r\n\r\n// let swiperSelectObserver;\r\n\r\nexport default class ShopMemberStorage extends Component {\r\n static defaultProps = {\r\n onCancel: () => {}\r\n };\r\n\r\n static contextTypes = {\r\n viewModel: PropTypes.object,\r\n columnInfo: PropTypes.array,\r\n };\r\n constructor(props) {\r\n super(props);\r\n const { mode } = this.props;\r\n this.state = {\r\n searchValue: '',\r\n searchStatus: !!this.props.listArr ? true : false,\r\n tabIndex: this.props.defaultActiveKey,\r\n tabMenuHeight: mode !== 'practice' ? 64 : 0, // 64为table上部操作菜单高度\r\n cardList: [], // 储值卡列表\r\n cardInfo: {}, // 当前被选中的卡信息\r\n };\r\n this.ms = memberStore;\r\n }\r\n\r\n currentPage = 1;\r\n cacheUserRetail = {};\r\n\r\n componentDidMount() {\r\n window.addEventListener('resize', this.windowOnresize);\r\n $.on(this.hotKeyListener);\r\n this.ms.searchValue = '';//初始化完成筛选列表清空数据(会员新增成功——封涛)\r\n }\r\n\r\n componentDidUpdate() {\r\n const {memberTabHeight, tabMenuHeight} = this.state;\r\n const clientHeight = this.memberTab.clientHeight - tabMenuHeight;\r\n if (clientHeight !== memberTabHeight) {\r\n this.setState({memberTabHeight: clientHeight});\r\n }\r\n }\r\n\r\n componentWillUnmount() {\r\n this.willUnmount = true;\r\n window.removeEventListener('resize', this.windowOnresize);\r\n // swiperSelectObserver.disconnect();\r\n $.off(this.hotKeyListener);\r\n }\r\n\r\n hotKeyListener = (nodeName, index) => {\r\n if (nodeName && ~nodeName.className.indexOf('slide-selected')) {\r\n this.isHotKeyAction = true;\r\n const activeElement = document.activeElement;\r\n activeElement && activeElement.blur();\r\n }\r\n }\r\n\r\n observerCard = () => {\r\n setTimeout(() => {\r\n const slideSelected = document.querySelector('.slide-selected');\r\n this.prevSlideSelected && swiperSelectObserver.unobserve(this.prevSlideSelected);\r\n this.prevSlideSelected = slideSelected;\r\n slideSelected && swiperSelectObserver.observe(slideSelected);\r\n })\r\n }\r\n windowOnresize = () => {\r\n if (!this.memberTab) {\r\n return window.removeEventListener('resize', this.windowOnresize);\r\n };\r\n const {memberTabHeight} = this.state;\r\n const clientHeight = this.memberTab.clientHeight - this.state.tabMenuHeight;\r\n if (memberTabHeight !== clientHeight) {\r\n this.setState({memberTabHeight: clientHeight});\r\n }\r\n }\r\n\r\n isNotSetState = (Idmember) => {\r\n if (this.willUnmount || Idmember !== this.currentMemberId) return true;\r\n }\r\n\r\n // 获取储值卡信息\r\n getCardList = (cardNo, currentPage = 1, pageSize = 10, key = 0) => {\r\n cardNo = cardNo.replace(/\\s+/g,\"\")\r\n if (cardNo.length === 0) {\r\n Message.error('请输入卡号')\r\n return\r\n }\r\n Loading.show({ target: '.memberShopContainer' });\r\n this.setState({\r\n loadingBtn: true\r\n })\r\n this.ms.getCardInfoByCardNo(cardNo)\r\n .then(ret => {\r\n const {data = []} = ret || {}\r\n if (data.length) {\r\n this.setState({\r\n cardList: data,\r\n selected: 0,\r\n loadingBtn: false\r\n }, () => {\r\n this.setCardInfo(currentPage === 1 ? 0 : key, data[0])\r\n this.memberCardList.resetSlideTop();\r\n })\r\n } else {\r\n this.setCardInfo(key)\r\n }\r\n \r\n Loading.hide();\r\n })\r\n .catch(err => {\r\n const { message } = err\r\n if (message.includes('code 404')) {\r\n ModalWraper.warning({\r\n title: '提示',\r\n content: `请输入卡号!`\r\n })\r\n }\r\n this.setCardInfo(key)\r\n this.setState({\r\n loadingBtn: false\r\n })\r\n Loading.hide()\r\n });\r\n }\r\n\r\n loadUserInfo = (ID) => {\r\n // this.observerCard();\r\n\r\n this.ms.getGetUmemberDTO(ID)\r\n .then(ret => {\r\n stores.selectMemberStore.setCurMemberInfo(ret);\r\n const { memberChange } = this.props;\r\n memberChange && memberChange(ret);\r\n }).catch(err => {\r\n Message.warn('会员信息更新失败!')\r\n });\r\n }\r\n\r\n // 设置当前被选中的卡信息\r\n setCardInfo = (key, cardInfo = {}) => {\r\n this.setState({\r\n selected: key,\r\n cardInfo\r\n })\r\n }\r\n\r\n handleSearchClick = () => {\r\n const { searchValue, selected } = this.state;\r\n this.userSearch = true;\r\n this.currentPage = 1;\r\n // this.setState({ selected: undefined });\r\n this.getCardList(searchValue, this.currentPage, 10, selected)\r\n }\r\n\r\n handleSearchChange = (val) => {\r\n this.setState({searchValue: val});\r\n }\r\n\r\n keyboardOnOk = () => {\r\n this.handleSearchClick();\r\n }\r\n\r\n keyboardOnClose = () => {\r\n this.searchRef && this.searchRef.blur();\r\n }\r\n\r\n onKeyPressed = (e) => {\r\n const { keyCode } = e;\r\n const enterKey = 13;\r\n if (keyCode === enterKey) {\r\n this.handleSearchClick();\r\n this.keyboardOnClose();\r\n }\r\n }\r\n\r\n MemberMenuChange = (dto) => {\r\n const { memberList } = this.state;\r\n userInfoFormat(dto)\r\n let arr = [];\r\n memberList.map(item => {\r\n if (item.ID == dto.ID) {\r\n arr.push(dto)\r\n } else {\r\n arr.push(item)\r\n }\r\n })\r\n this.setState({ member: dto, memberList: arr })\r\n }\r\n\r\n onClear = (key, input) => {\r\n this.setState({[key]: ''});\r\n input.focus();\r\n }\r\n\r\n render() {\r\n const isUserAndroidKey = !! window.android_setKeyBoard;\r\n const { searchValue, memberTabHeight = 0, initEmpty, loadingBtn, selected, isAllAuthority, cardList, cardInfo } = this.state;\r\n const { status, showModal, titleModal, type, defaultActiveKey, onCancel, authProcess, mode, title, storeKey } = this.props;\r\n const showSearch = ['会员查询'].includes(type);\r\n const noList = !cardList.length;\r\n const showSelectBtn = type === '会员查询' || !!status;\r\n //是否正常开单\r\n let voucherStateType = (mode !== 'practice');\r\n const searchClassName = hotKey.hotKeyNotFilter('search-input')\r\n const memberTabClassName = hotKey.hotKeyBindClass('10', 'member-shop-content')\r\n \r\n return (\r\n <div className='memberShopContainer'>\r\n {\r\n showSearch &&\r\n <div className='search-container'>\r\n <Input\r\n tplusInput\r\n placeholder='卡号/手机号'\r\n prefix='sousuo'\r\n className={`${searchClassName} android_focus_keyboard`}\r\n value={searchValue}\r\n type='native'\r\n onChange={\r\n ({ target: { value: searchValue } }) => this.setState({ searchValue })\r\n }\r\n inputRef={ref => this.searchRef = ref}\r\n onClear={() => this.onClear('searchValue', this.searchRef)}\r\n onFocus={({ target }) => {\r\n if(!isUserAndroidKey ){\r\n this.focusInputName = 'searchValue';\r\n this.inputTarget = target;\r\n Keyboard.open(v => {\r\n const key = this.focusInputName;\r\n const value = Keyboard.getNewValue(this.inputTarget, this.inputTarget.value, v);\r\n this.setState({ [key]: value });\r\n }, this.keyboardOnOk, this.keyboardOnClose)();\r\n }\r\n }}\r\n onBlur={Keyboard.close}\r\n onKeyDown={this.onKeyPressed}\r\n />\r\n <Button className='primary-btn' onClick={this.handleSearchClick}>搜索</Button>\r\n </div>\r\n }\r\n <div \r\n ref={ref => this.memberTab = ref} \r\n className={`${memberTabClassName}`}\r\n >\r\n {\r\n noList && <div className='empty-data-img storage-empty-data-img' />\r\n }\r\n <MemberCardList \r\n ref={list => this.memberCardList = list}\r\n title={title}\r\n storeKey={storeKey}\r\n selected={selected}\r\n cardList={cardList}\r\n setCardInfo={this.setCardInfo}\r\n />\r\n \r\n <div className='member-content-tab content' style={{ display: noList ? 'none' : 'flex' }}>\r\n {\r\n (voucherStateType && !isAllAuthority) &&\r\n <div>\r\n <div className='menu'>\r\n <MemberMenuStorage \r\n storeKey={storeKey}\r\n authProcess={authProcess}\r\n loadingBtn={loadingBtn} \r\n selected={selected} \r\n cardList={cardList}\r\n loadUserInfo={this.loadUserInfo}\r\n getCardList={this.getCardList}\r\n handleChange={this.MemberMenuChange} />\r\n </div>\r\n <div className='line'></div>\r\n </div>\r\n }\r\n <MemberTab\r\n defaultActiveKey={defaultActiveKey}\r\n showModal={showModal}\r\n title={title}\r\n titleModal={titleModal}\r\n storeKey={storeKey}\r\n selected={selected}\r\n memberTabHeight={memberTabHeight}\r\n initEmpty={initEmpty}\r\n cardList={cardList}\r\n />\r\n </div>\r\n </div>\r\n <div className='member-footer'>\r\n <Button onClick={onCancel}>取消</Button>\r\n </div>\r\n </div>\r\n )\r\n }\r\n}\r\n"]}
1
+ {"version":3,"sources":["tplus-member/member/ShopMemberStorage.js"],"names":["ShopMemberStorage","props","currentPage","cacheUserRetail","hotKeyListener","nodeName","index","className","indexOf","isHotKeyAction","activeElement","document","blur","observerCard","setTimeout","slideSelected","querySelector","prevSlideSelected","swiperSelectObserver","unobserve","observe","windowOnresize","memberTab","window","removeEventListener","memberTabHeight","state","clientHeight","tabMenuHeight","setState","isNotSetState","Idmember","willUnmount","currentMemberId","getCardList","cardNo","pageSize","key","replace","length","Message","error","Loading","show","target","loadingBtn","ms","getCardInfoByCardNo","then","ret","data","cardList","selected","setCardInfo","memberCardList","resetSlideTop","hide","catch","message","err","includes","ModalWraper","warning","title","content","loadUserInfo","ID","getGetUmemberDTO","stores","selectMemberStore","setCurMemberInfo","memberChange","warn","cardInfo","handleSearchClick","searchValue","userSearch","handleSearchChange","val","keyboardOnOk","keyboardOnClose","searchRef","onKeyPressed","e","keyCode","enterKey","MemberMenuChange","dto","memberList","arr","map","item","push","member","onClear","input","focus","mode","platform","isNewRetailBCPos","searchStatus","listArr","tabIndex","defaultActiveKey","memberStore","addEventListener","$","on","off","isUserAndroidKey","android_setKeyBoard","initEmpty","isAllAuthority","status","showModal","titleModal","type","onCancel","authProcess","storeKey","showSearch","noList","showSelectBtn","voucherStateType","searchClassName","hotKey","hotKeyNotFilter","memberTabClassName","hotKeyBindClass","value","ref","focusInputName","inputTarget","Keyboard","open","getNewValue","v","close","list","display","Component","defaultProps","contextTypes","viewModel","PropTypes","object","columnInfo","array"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;AACA;;;;AAEA;;AACA;;AACA;;AACA;;;;AACA;;;;AACA;;AACA;;AACA;;;;AACA;;;;;;AAEA;;IAEqBA,iB;;;AASnB,6BAAYC,KAAZ,EAAmB;AAAA;;AAAA,4JACXA,KADW;;AAAA,UAenBC,WAfmB,GAeL,CAfK;AAAA,UAgBnBC,eAhBmB,GAgBD,EAhBC;;AAAA,UAuCnBC,cAvCmB,GAuCF,UAACC,QAAD,EAAWC,KAAX,EAAqB;AACpC,UAAID,YAAY,CAACA,SAASE,SAAT,CAAmBC,OAAnB,CAA2B,gBAA3B,CAAjB,EAA+D;AAC7D,cAAKC,cAAL,GAAsB,IAAtB;AACA,YAAMC,gBAAgBC,SAASD,aAA/B;AACAA,yBAAiBA,cAAcE,IAAd,EAAjB;AACD;AACF,KA7CkB;;AAAA,UA+CnBC,YA/CmB,GA+CJ,YAAM;AACnBC,iBAAW,YAAM;AACf,YAAMC,gBAAgBJ,SAASK,aAAT,CAAuB,iBAAvB,CAAtB;AACA,cAAKC,iBAAL,IAA0BC,qBAAqBC,SAArB,CAA+B,MAAKF,iBAApC,CAA1B;AACA,cAAKA,iBAAL,GAAyBF,aAAzB;AACAA,yBAAiBG,qBAAqBE,OAArB,CAA6BL,aAA7B,CAAjB;AACD,OALD;AAMD,KAtDkB;;AAAA,UAuD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AA,aADP;AAEE,mBAAO3E,KAFT;AAGE,sBAAUwD,QAHZ;AAIE,sBAAUnE,QAJZ;AAKE,sBAAUD,QALZ;AAME,yBAAa,KAAKE;AANpB,YAPF;AAgBE;AAAA;AAAA,cAAK,WAAU,4BAAf,EAA4C,OAAO,EAAEsF,SAASlB,SAAS,MAAT,GAAkB,MAA7B,EAAnD;AAEKE,gCAAoB,CAACX,cAAtB,IACA;AAAA;AAAA;AACE;AAAA;AAAA,kBAAK,WAAU,MAAf;AACE,8CAAC,eAAD;AACE,4BAAUO,QADZ;AAEE,+BAAaD,WAFf;AAGE,8BAAYzE,UAHd;AAIE,4BAAUO,QAJZ;AAKE,4BAAUD,QALZ;AAME,gCAAc,KAAKc,YANrB;AAOE,+BAAa,KAAK/B,WAPpB;AAQE,gCAAc,KAAKoD,gBARrB;AADF,eADF;AAYE,qDAAK,WAAU,MAAf;AAZF,aAHJ;AAkBE,0CAAC,eAAD;AACE,gCAAkBiB,gBADpB;AAEE,yBAAWW,SAFb;AAGE,qBAAOnD,KAHT;AAIE,0BAAYoD,UAJd;AAKE,wBAAUI,QALZ;AAME,wBAAUnE,QANZ;AAOE,+BAAiB3B,eAPnB;AAQE,yBAAWsF,SARb;AASE,wBAAU5D;AATZ;AAlBF;AAhBF,SAjCF;AAgFE;AAAA;AAAA,YAAK,WAAU,eAAf;AACE;AAAA;AAAA,cAAQ,SAASkE,QAAjB;AAAA;AAAA;AADF;AAhFF,OADF;AAsFD;;;EAnS4CuB,gB,UACtCC,Y,GAAe;AACpBxB,YAAU,oBAAM,CAAE;AADE,C,SAIfyB,Y,GAAe;AACpBC,aAAWC,oBAAUC,MADD;AAEpBC,cAAYF,oBAAUG;AAFF,C;kBALHnJ,iB","file":"ShopMemberStorage.js","sourcesContent":["import React, { Component } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { Button } from 'antd';\r\nimport { ModalWraper, Input, Loading, Message, Ticon, Keyboard, Spin, hotKey } from 'tplus-components-touch';\r\nimport { stores } from 'mutants-microfx';\r\nimport { enumController, platform } from 'mutants-util';\r\nimport memberStore from './api';\r\nimport MemberTab from './memberTab/index.js';\r\nimport './ShopMember.less';\r\nimport { formatPrecision, userInfoFormat, errMessageTip } from '../utils';\r\nimport MemberMenuStorage from './memberMenuStorage/index.js'\r\nimport MemberCardList from './MemberCardList'\r\n\r\n// let swiperSelectObserver;\r\n\r\nexport default class ShopMemberStorage extends Component {\r\n static defaultProps = {\r\n onCancel: () => {}\r\n };\r\n\r\n static contextTypes = {\r\n viewModel: PropTypes.object,\r\n columnInfo: PropTypes.array,\r\n };\r\n constructor(props) {\r\n super(props);\r\n const { mode } = this.props;\r\n let { isNewRetailBCPos } = platform || {};\r\n this.state = {\r\n searchValue: '',\r\n searchStatus: !!this.props.listArr ? true : false,\r\n tabIndex: this.props.defaultActiveKey,\r\n tabMenuHeight: mode !== 'practice' ? 64 : 0, // 64为table上部操作菜单高度\r\n cardList: [], // 储值卡列表\r\n cardInfo: {}, // 当前被选中的卡信息\r\n };\r\n this.ms = memberStore;\r\n }\r\n\r\n currentPage = 1;\r\n cacheUserRetail = {};\r\n\r\n componentDidMount() {\r\n window.addEventListener('resize', this.windowOnresize);\r\n $.on(this.hotKeyListener);\r\n this.ms.searchValue = '';//初始化完成筛选列表清空数据(会员新增成功——封涛)\r\n }\r\n\r\n componentDidUpdate() {\r\n const {memberTabHeight, tabMenuHeight} = this.state;\r\n const clientHeight = this.memberTab.clientHeight - tabMenuHeight;\r\n if (clientHeight !== memberTabHeight) {\r\n this.setState({memberTabHeight: clientHeight});\r\n }\r\n }\r\n\r\n componentWillUnmount() {\r\n this.willUnmount = true;\r\n window.removeEventListener('resize', this.windowOnresize);\r\n // swiperSelectObserver.disconnect();\r\n $.off(this.hotKeyListener);\r\n }\r\n\r\n hotKeyListener = (nodeName, index) => {\r\n if (nodeName && ~nodeName.className.indexOf('slide-selected')) {\r\n this.isHotKeyAction = true;\r\n const activeElement = document.activeElement;\r\n activeElement && activeElement.blur();\r\n }\r\n }\r\n\r\n observerCard = () => {\r\n setTimeout(() => {\r\n const slideSelected = document.querySelector('.slide-selected');\r\n this.prevSlideSelected && swiperSelectObserver.unobserve(this.prevSlideSelected);\r\n this.prevSlideSelected = slideSelected;\r\n slideSelected && swiperSelectObserver.observe(slideSelected);\r\n })\r\n }\r\n windowOnresize = () => {\r\n if (!this.memberTab) {\r\n return window.removeEventListener('resize', this.windowOnresize);\r\n };\r\n const {memberTabHeight} = this.state;\r\n const clientHeight = this.memberTab.clientHeight - this.state.tabMenuHeight;\r\n if (memberTabHeight !== clientHeight) {\r\n this.setState({memberTabHeight: clientHeight});\r\n }\r\n }\r\n\r\n isNotSetState = (Idmember) => {\r\n if (this.willUnmount || Idmember !== this.currentMemberId) return true;\r\n }\r\n\r\n // 获取储值卡信息\r\n getCardList = (cardNo, currentPage = 1, pageSize = 10, key = 0) => {\r\n cardNo = cardNo.replace(/\\s+/g,\"\")\r\n if (cardNo.length === 0) {\r\n Message.error('请输入卡号')\r\n return\r\n }\r\n Loading.show({ target: '.memberShopContainer' });\r\n this.setState({\r\n loadingBtn: true\r\n })\r\n this.ms.getCardInfoByCardNo(cardNo)\r\n .then(ret => {\r\n const {data = []} = ret || {}\r\n if (data.length) {\r\n this.setState({\r\n cardList: data,\r\n selected: 0,\r\n loadingBtn: false\r\n }, () => {\r\n this.setCardInfo(currentPage === 1 ? 0 : key, data[0])\r\n this.memberCardList.resetSlideTop();\r\n })\r\n } else {\r\n this.setCardInfo(key)\r\n }\r\n \r\n Loading.hide();\r\n })\r\n .catch(err => {\r\n const { message } = err\r\n if (message.includes('code 404')) {\r\n ModalWraper.warning({\r\n title: '提示',\r\n content: `请输入卡号!`\r\n })\r\n }\r\n this.setCardInfo(key)\r\n this.setState({\r\n loadingBtn: false\r\n })\r\n Loading.hide()\r\n });\r\n }\r\n\r\n loadUserInfo = (ID) => {\r\n // this.observerCard();\r\n\r\n this.ms.getGetUmemberDTO(ID)\r\n .then(ret => {\r\n stores.selectMemberStore.setCurMemberInfo(ret);\r\n const { memberChange } = this.props;\r\n memberChange && memberChange(ret);\r\n }).catch(err => {\r\n Message.warn('会员信息更新失败!')\r\n });\r\n }\r\n\r\n // 设置当前被选中的卡信息\r\n setCardInfo = (key, cardInfo = {}) => {\r\n this.setState({\r\n selected: key,\r\n cardInfo\r\n })\r\n }\r\n\r\n handleSearchClick = () => {\r\n const { searchValue, selected } = this.state;\r\n this.userSearch = true;\r\n this.currentPage = 1;\r\n // this.setState({ selected: undefined });\r\n this.getCardList(searchValue, this.currentPage, 10, selected)\r\n }\r\n\r\n handleSearchChange = (val) => {\r\n this.setState({searchValue: val});\r\n }\r\n\r\n keyboardOnOk = () => {\r\n this.handleSearchClick();\r\n }\r\n\r\n keyboardOnClose = () => {\r\n this.searchRef && this.searchRef.blur();\r\n }\r\n\r\n onKeyPressed = (e) => {\r\n const { keyCode } = e;\r\n const enterKey = 13;\r\n if (keyCode === enterKey) {\r\n this.handleSearchClick();\r\n this.keyboardOnClose();\r\n }\r\n }\r\n\r\n MemberMenuChange = (dto) => {\r\n const { memberList } = this.state;\r\n userInfoFormat(dto)\r\n let arr = [];\r\n memberList.map(item => {\r\n if (item.ID == dto.ID) {\r\n arr.push(dto)\r\n } else {\r\n arr.push(item)\r\n }\r\n })\r\n this.setState({ member: dto, memberList: arr })\r\n }\r\n\r\n onClear = (key, input) => {\r\n this.setState({[key]: ''});\r\n input.focus();\r\n }\r\n\r\n render() {\r\n const isUserAndroidKey = !! window.android_setKeyBoard;\r\n const { searchValue, memberTabHeight = 0, initEmpty, loadingBtn, selected, isAllAuthority, cardList, cardInfo } = this.state;\r\n const { status, showModal, titleModal, type, defaultActiveKey, onCancel, authProcess, mode, title, storeKey } = this.props;\r\n const showSearch = ['会员查询'].includes(type);\r\n const noList = !cardList.length;\r\n const showSelectBtn = type === '会员查询' || !!status;\r\n //是否正常开单\r\n let voucherStateType = (mode !== 'practice');\r\n const searchClassName = hotKey.hotKeyNotFilter('search-input')\r\n const memberTabClassName = hotKey.hotKeyBindClass('10', 'member-shop-content')\r\n \r\n return (\r\n <div className='memberShopContainer'>\r\n {\r\n showSearch &&\r\n <div className='search-container'>\r\n <Input\r\n tplusInput\r\n placeholder='卡号/手机号'\r\n prefix='sousuo'\r\n className={`${searchClassName} android_focus_keyboard`}\r\n value={searchValue}\r\n type='native'\r\n onChange={\r\n ({ target: { value: searchValue } }) => this.setState({ searchValue })\r\n }\r\n inputRef={ref => this.searchRef = ref}\r\n onClear={() => this.onClear('searchValue', this.searchRef)}\r\n onFocus={({ target }) => {\r\n if(!isUserAndroidKey ){\r\n this.focusInputName = 'searchValue';\r\n this.inputTarget = target;\r\n Keyboard.open(v => {\r\n const key = this.focusInputName;\r\n const value = Keyboard.getNewValue(this.inputTarget, this.inputTarget.value, v);\r\n this.setState({ [key]: value });\r\n }, this.keyboardOnOk, this.keyboardOnClose)();\r\n }\r\n }}\r\n onBlur={Keyboard.close}\r\n onKeyDown={this.onKeyPressed}\r\n />\r\n <Button className='primary-btn' onClick={this.handleSearchClick}>搜索</Button>\r\n </div>\r\n }\r\n <div \r\n ref={ref => this.memberTab = ref} \r\n className={`${memberTabClassName}`}\r\n >\r\n {\r\n noList && <div className='empty-data-img storage-empty-data-img' />\r\n }\r\n <MemberCardList \r\n ref={list => this.memberCardList = list}\r\n title={title}\r\n storeKey={storeKey}\r\n selected={selected}\r\n cardList={cardList}\r\n setCardInfo={this.setCardInfo}\r\n />\r\n \r\n <div className='member-content-tab content' style={{ display: noList ? 'none' : 'flex' }}>\r\n {\r\n (voucherStateType && !isAllAuthority) &&\r\n <div>\r\n <div className='menu'>\r\n <MemberMenuStorage \r\n storeKey={storeKey}\r\n authProcess={authProcess}\r\n loadingBtn={loadingBtn} \r\n selected={selected} \r\n cardList={cardList}\r\n loadUserInfo={this.loadUserInfo}\r\n getCardList={this.getCardList}\r\n handleChange={this.MemberMenuChange} />\r\n </div>\r\n <div className='line'></div>\r\n </div>\r\n }\r\n <MemberTab\r\n defaultActiveKey={defaultActiveKey}\r\n showModal={showModal}\r\n title={title}\r\n titleModal={titleModal}\r\n storeKey={storeKey}\r\n selected={selected}\r\n memberTabHeight={memberTabHeight}\r\n initEmpty={initEmpty}\r\n cardList={cardList}\r\n />\r\n </div>\r\n </div>\r\n <div className='member-footer'>\r\n <Button onClick={onCancel}>取消</Button>\r\n </div>\r\n </div>\r\n )\r\n }\r\n}\r\n"]}
@@ -552,25 +552,40 @@ var MemberStore = (_class = function () {
552
552
  key: 'modifyMemberPass',
553
553
  value: function () {
554
554
  var _ref14 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee11(obj, params1) {
555
- var params, resp;
555
+ var _ref15, isNewRetailBCPos, params, resp, _params;
556
+
556
557
  return _regenerator2.default.wrap(function _callee11$(_context11) {
557
558
  while (1) {
558
559
  switch (_context11.prev = _context11.next) {
559
560
  case 0:
561
+ _ref15 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref15.isNewRetailBCPos;
562
+
563
+ if (!isNewRetailBCPos) {
564
+ _context11.next = 9;
565
+ break;
566
+ }
567
+
560
568
  params = {
561
569
  meMemberId: obj.member.ID,
562
570
  oldPassword: _tplusApi.User.pwdEncrypt(obj.oldPass),
563
571
  newPassword: _tplusApi.User.pwdEncrypt(obj.member.Password),
564
572
  dataSource: "POS"
565
573
  };
566
- _context11.next = 3;
574
+ _context11.next = 5;
567
575
  return (0, _tplusApi.ccApi)(params, "/member/MeMemberWallet/setWalletPayPassword", false, false);
568
576
 
569
- case 3:
577
+ case 5:
570
578
  resp = _context11.sent;
571
579
  return _context11.abrupt('return', resp);
572
580
 
573
- case 5:
581
+ case 9:
582
+ _params = {
583
+ dto: obj.member,
584
+ oldPsw: obj.oldPass
585
+ };
586
+ return _context11.abrupt('return', (0, _tplusApi.tApi)(_params, 'chanjet.AA.DR.INewRetailMember.UpdatePsw', false, false));
587
+
588
+ case 11:
574
589
  case 'end':
575
590
  return _context11.stop();
576
591
  }
@@ -587,7 +602,7 @@ var MemberStore = (_class = function () {
587
602
  }, {
588
603
  key: 'updatePwd',
589
604
  value: function () {
590
- var _ref15 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee12(obj) {
605
+ var _ref16 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee12(obj) {
591
606
  var resp;
592
607
  return _regenerator2.default.wrap(function _callee12$(_context12) {
593
608
  while (1) {
@@ -609,7 +624,7 @@ var MemberStore = (_class = function () {
609
624
  }));
610
625
 
611
626
  function updatePwd(_x16) {
612
- return _ref15.apply(this, arguments);
627
+ return _ref16.apply(this, arguments);
613
628
  }
614
629
 
615
630
  return updatePwd;
@@ -620,7 +635,7 @@ var MemberStore = (_class = function () {
620
635
  }, {
621
636
  key: 'setPwd',
622
637
  value: function () {
623
- var _ref16 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee13(obj, params1) {
638
+ var _ref17 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee13(obj, params1) {
624
639
  var idstore, params, resp;
625
640
  return _regenerator2.default.wrap(function _callee13$(_context13) {
626
641
  while (1) {
@@ -650,7 +665,7 @@ var MemberStore = (_class = function () {
650
665
  }));
651
666
 
652
667
  function setPwd(_x17, _x18) {
653
- return _ref16.apply(this, arguments);
668
+ return _ref17.apply(this, arguments);
654
669
  }
655
670
 
656
671
  return setPwd;
@@ -661,26 +676,41 @@ var MemberStore = (_class = function () {
661
676
  }, {
662
677
  key: 'resetMemberPass',
663
678
  value: function () {
664
- var _ref17 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee14(obj, params1) {
665
- var params, resp;
679
+ var _ref18 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee14(obj, params1) {
680
+ var _ref19, isNewRetailBCPos, params, resp, _params2;
681
+
666
682
  return _regenerator2.default.wrap(function _callee14$(_context14) {
667
683
  while (1) {
668
684
  switch (_context14.prev = _context14.next) {
669
685
  case 0:
686
+ _ref19 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref19.isNewRetailBCPos;
687
+
688
+ if (!isNewRetailBCPos) {
689
+ _context14.next = 9;
690
+ break;
691
+ }
692
+
670
693
  params = {
671
694
  meMemberId: obj.member.ID,
672
695
  oldPassword: null,
673
696
  newPassword: _tplusApi.User.pwdEncrypt(obj.newPass),
674
697
  dataSource: "POS"
675
698
  };
676
- _context14.next = 3;
699
+ _context14.next = 5;
677
700
  return (0, _tplusApi.ccApi)(params, "/member/MeMemberWallet/setWalletPayPassword", false, false);
678
701
 
679
- case 3:
702
+ case 5:
680
703
  resp = _context14.sent;
681
704
  return _context14.abrupt('return', resp);
682
705
 
683
- case 5:
706
+ case 9:
707
+ _params2 = {
708
+ memberDTO: obj.member,
709
+ newPwd: obj.newPass
710
+ };
711
+ return _context14.abrupt('return', (0, _tplusApi.tApi)(_params2, 'chanjet.AA.DR.INewRetailMember.ChangePosPwd', false, false));
712
+
713
+ case 11:
684
714
  case 'end':
685
715
  return _context14.stop();
686
716
  }
@@ -689,7 +719,7 @@ var MemberStore = (_class = function () {
689
719
  }));
690
720
 
691
721
  function resetMemberPass(_x19, _x20) {
692
- return _ref17.apply(this, arguments);
722
+ return _ref18.apply(this, arguments);
693
723
  }
694
724
 
695
725
  return resetMemberPass;
@@ -700,7 +730,7 @@ var MemberStore = (_class = function () {
700
730
  }, {
701
731
  key: 'RecordLoss',
702
732
  value: function () {
703
- var _ref18 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee15(member) {
733
+ var _ref20 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee15(member) {
704
734
  return _regenerator2.default.wrap(function _callee15$(_context15) {
705
735
  while (1) {
706
736
  switch (_context15.prev = _context15.next) {
@@ -716,7 +746,7 @@ var MemberStore = (_class = function () {
716
746
  }));
717
747
 
718
748
  function RecordLoss(_x21) {
719
- return _ref18.apply(this, arguments);
749
+ return _ref20.apply(this, arguments);
720
750
  }
721
751
 
722
752
  return RecordLoss;
@@ -727,7 +757,7 @@ var MemberStore = (_class = function () {
727
757
  }, {
728
758
  key: 'UnRecordLoss',
729
759
  value: function () {
730
- var _ref19 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee16(member) {
760
+ var _ref21 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee16(member) {
731
761
  return _regenerator2.default.wrap(function _callee16$(_context16) {
732
762
  while (1) {
733
763
  switch (_context16.prev = _context16.next) {
@@ -743,7 +773,7 @@ var MemberStore = (_class = function () {
743
773
  }));
744
774
 
745
775
  function UnRecordLoss(_x22) {
746
- return _ref19.apply(this, arguments);
776
+ return _ref21.apply(this, arguments);
747
777
  }
748
778
 
749
779
  return UnRecordLoss;
@@ -753,7 +783,7 @@ var MemberStore = (_class = function () {
753
783
  }, {
754
784
  key: 'findMemberLastRetailDetail',
755
785
  value: function () {
756
- var _ref20 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee17(params) {
786
+ var _ref22 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee17(params) {
757
787
  var resp;
758
788
  return _regenerator2.default.wrap(function _callee17$(_context17) {
759
789
  while (1) {
@@ -775,7 +805,7 @@ var MemberStore = (_class = function () {
775
805
  }));
776
806
 
777
807
  function findMemberLastRetailDetail(_x23) {
778
- return _ref20.apply(this, arguments);
808
+ return _ref22.apply(this, arguments);
779
809
  }
780
810
 
781
811
  return findMemberLastRetailDetail;
@@ -786,7 +816,7 @@ var MemberStore = (_class = function () {
786
816
  }, {
787
817
  key: 'getCardInfoByMemberId',
788
818
  value: function () {
789
- var _ref21 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee18(memberId) {
819
+ var _ref23 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee18(memberId) {
790
820
  var resp;
791
821
  return _regenerator2.default.wrap(function _callee18$(_context18) {
792
822
  while (1) {
@@ -808,7 +838,7 @@ var MemberStore = (_class = function () {
808
838
  }));
809
839
 
810
840
  function getCardInfoByMemberId(_x24) {
811
- return _ref21.apply(this, arguments);
841
+ return _ref23.apply(this, arguments);
812
842
  }
813
843
 
814
844
  return getCardInfoByMemberId;
@@ -819,7 +849,7 @@ var MemberStore = (_class = function () {
819
849
  }, {
820
850
  key: 'MeStorageCardBind',
821
851
  value: function () {
822
- var _ref22 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee19(params) {
852
+ var _ref24 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee19(params) {
823
853
  var resp;
824
854
  return _regenerator2.default.wrap(function _callee19$(_context19) {
825
855
  while (1) {
@@ -842,7 +872,7 @@ var MemberStore = (_class = function () {
842
872
  }));
843
873
 
844
874
  function MeStorageCardBind(_x25) {
845
- return _ref22.apply(this, arguments);
875
+ return _ref24.apply(this, arguments);
846
876
  }
847
877
 
848
878
  return MeStorageCardBind;
@@ -853,7 +883,7 @@ var MemberStore = (_class = function () {
853
883
  }, {
854
884
  key: 'getCardInfoByCardNo',
855
885
  value: function () {
856
- var _ref23 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee20(cardNo) {
886
+ var _ref25 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee20(cardNo) {
857
887
  var resp;
858
888
  return _regenerator2.default.wrap(function _callee20$(_context20) {
859
889
  while (1) {
@@ -875,7 +905,7 @@ var MemberStore = (_class = function () {
875
905
  }));
876
906
 
877
907
  function getCardInfoByCardNo(_x26) {
878
- return _ref23.apply(this, arguments);
908
+ return _ref25.apply(this, arguments);
879
909
  }
880
910
 
881
911
  return getCardInfoByCardNo;
@@ -894,7 +924,7 @@ var MemberStore = (_class = function () {
894
924
  }, {
895
925
  key: 'ReturnedStorage',
896
926
  value: function () {
897
- var _ref24 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee21(params) {
927
+ var _ref26 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee21(params) {
898
928
  var resp;
899
929
  return _regenerator2.default.wrap(function _callee21$(_context21) {
900
930
  while (1) {
@@ -916,7 +946,7 @@ var MemberStore = (_class = function () {
916
946
  }));
917
947
 
918
948
  function ReturnedStorage(_x27) {
919
- return _ref24.apply(this, arguments);
949
+ return _ref26.apply(this, arguments);
920
950
  }
921
951
 
922
952
  return ReturnedStorage;
@@ -927,7 +957,7 @@ var MemberStore = (_class = function () {
927
957
  }, {
928
958
  key: 'getLatestStorageAmount',
929
959
  value: function () {
930
- var _ref25 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee22(params) {
960
+ var _ref27 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee22(params) {
931
961
  var resp;
932
962
  return _regenerator2.default.wrap(function _callee22$(_context22) {
933
963
  while (1) {
@@ -949,7 +979,7 @@ var MemberStore = (_class = function () {
949
979
  }));
950
980
 
951
981
  function getLatestStorageAmount(_x28) {
952
- return _ref25.apply(this, arguments);
982
+ return _ref27.apply(this, arguments);
953
983
  }
954
984
 
955
985
  return getLatestStorageAmount;
@@ -1 +1 @@
1
- {"version":3,"sources":["tplus-member/member/api.js"],"names":["MemberStore","curMemberInfo","searchValue","setCurMemberInfo","val","value","isBirth","selectMemberInfo","BirthDate","changeBirthdayShow","setTimeout","birthdayShow","precisionInfo","values","length","forEach","v","info","memberCareInfo","stores","user","options","get","obj","getLoginInfo","IdStore","StoreCode","Message","warn","SearchParams","CurrentPage","currentPage","PageSize","pageSize","Key","key","IsSingleMember","isSingleMember","data","Idmember","CameraType","minutes","orgId","accessToken","CiaToken","CloudServerHost","accountId","enterpriseUniqId","token","SignalRToken","PosId","storeID","appKey","CloudServerAppKey","params","axios","Rid","imageTime","count","undefined","SignalRServerHost","id","src","fileParams","ImagePath","param","voucherViewInfo","params1","meMemberId","member","ID","oldPassword","User","pwdEncrypt","oldPass","newPassword","Password","dataSource","resp","idstore","Idstore","newPass","MemberDTO","method","memberId","storeId","cardNo","observable","action","memberStore","selectMemberStore"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gGAM2B;;;AAN3B;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,qBAAU,IAAV;IACMA,W;;;;;;;;;;;;;;;;SAQJC,a,GAAc,E;SACdC,W,GAAY,E;;SAGZC,gB,GAAiB,UAACC,GAAD,EAAO;AACtB,YAAKH,aAAL,GAAmBG,OAAK,EAAxB;AACD,K;IANiB;AACH;;;;;kCAO0B;AAAA;;AAAA,UAArBC,KAAqB,uEAAb,EAAa;AAAA,UAATC,OAAS;;AACvC,WAAKC,gBAAL,GAAwBF,KAAxB;AACA;AAFuC,UAGjCG,SAHiC,GAGnBH,KAHmB,CAGjCG,SAHiC;;AAIvC,UAAIF,WAAWE,SAAX,IAAwB,wBAAYA,SAAZ,CAA5B,EAAoD;AAClD,aAAKC,kBAAL,CAAwB,IAAxB;AACAC,mBAAW,YAAM;AAAE,iBAAKD,kBAAL,CAAwB,KAAxB;AAAgC,SAAnD,EAAqD,IAArD;AACD;AACF;;;yCAEyC;AAAA,UAAfJ,KAAe,uEAAP,KAAO;;AACxC,WAAKM,YAAL,GAAoBN,KAApB;AACD;;;uCAE0B;AACzB,WAAKE,gBAAL,GAAwB,EAAxB;AACD;;;qCAEwBK,a,EAAe;AACtC,WAAKA,aAAL,GAAqBA,aAArB;AACD;;;mCAEiC;AAAA;;AAAA,UAAbC,MAAa,uEAAJ,EAAI;;AAChC,UAAI,oBAAY,KAAKN,gBAAjB,EAAmCO,MAAvC,EAA+C;AAC7C,4BAAYD,MAAZ,EAAoBE,OA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gB;;;WAA2B,E;;kFAC3BA,gB;;;2EACAA,gB;;;gEAUAC,Y,mKAUAA,Y,wKAIAA,Y,sKAIAA,Y,kKAIAA,Y,kKAMAA,Y,qKAIAA,Y;;;AAuPH,IAAMC,cAAc,IAAIzF,WAAJ,EAApB;;kBAEeyF,W;;;AAEf,oCAAe,EAAEC,mBAAmBD,WAArB,EAAf","file":"api.js","sourcesContent":["import { tApi, ccApi, User } from 'tplus-api';\r\nimport { observable, action, useStrict, extendObservable, runInAction } from 'mobx';\r\nimport { registerStores, stores } from 'mutants-microfx';\r\nimport { platform } from 'mutants-util';\r\nimport { PosInitData } from 'tplus-poslogin';\r\nimport { Message } from 'tplus-components-touch';\r\nimport axios from 'axios'; // cloud server消息推送接口单独使用 不走统一配置\r\nimport { isBirthDate } from '../utils';\r\n\r\nuseStrict(true);\r\nclass MemberStore {\r\n\r\n @observable birthdayShow = false;\r\n @observable selectMemberInfo = {};\r\n @observable precisionInfo = {};\r\n @observable memberCareInfo\r\n @observable isClear\r\n\r\n curMemberInfo={} //开卡-fengtao\r\n searchValue='' //自动搜索会员-会员新增成功-fengtao\r\n\r\n\r\n setCurMemberInfo=(val)=>{\r\n this.curMemberInfo=val||{};\r\n }\r\n\r\n @action seletMember(value = {}, isBirth) {\r\n this.selectMemberInfo = value;\r\n //针对会员生日处理\r\n let { BirthDate } = value;\r\n if (isBirth && BirthDate && isBirthDate(BirthDate)) {\r\n this.changeBirthdayShow(true);\r\n setTimeout(() => { this.changeBirthdayShow(false) }, 3000)\r\n }\r\n }\r\n\r\n @action changeBirthdayShow(value = false) {\r\n this.birthdayShow = value;\r\n }\r\n\r\n @action clearSeletMember() {\r\n this.selectMemberInfo = {};\r\n }\r\n\r\n @action setPrecisionInfo(precisionInfo) {\r\n this.precisionInfo = precisionInfo;\r\n }\r\n\r\n @action setMemberKey(values = {}) {\r\n if (Object.keys(this.selectMemberInfo).length) {\r\n Object.keys(values).forEach(v => this.selectMemberInfo[v] = values[v]);\r\n }\r\n }\r\n\r\n @action changeMemberCare(info) {\r\n this.memberCareInfo = info;\r\n }\r\n\r\n @action clearMemberCare() {\r\n this.memberCareInfo = null;\r\n }\r\n\r\n getLoginInfo() {\r\n return stores.user.options.get('loginInfo');\r\n }\r\n async getSearchMember(obj) {\r\n const { IdStore, StoreCode } = this.getLoginInfo();\r\n if (!IdStore || !StoreCode) {\r\n Message.warn('门店相关信息缺失');\r\n return {};\r\n }\r\n const SearchParams = {\r\n CurrentPage: obj.currentPage,\r\n PageSize: obj.pageSize,\r\n Key: obj.key,\r\n IsSingleMember: obj.isSingleMember,\r\n IdStore: IdStore,\r\n StoreCode: StoreCode\r\n };\r\n const data = await tApi({\r\n SearchParams\r\n }, 'chanjet.AA.DR.INewRetailMember.SearchMember', false, false);\r\n return data;\r\n }\r\n\r\n async getGetUmemberDTO(Idmember) {\r\n const { IdStore, StoreCode } = this.getLoginInfo();\r\n return tApi({ Idmember, IdStore, StoreCode }, 'chanjet.AA.DR.INewRetailMember.GetUmemberDTO', false, false);\r\n }\r\n\r\n async getMemberRetailDetail(Idmember) {\r\n const { IdStore } = this.getLoginInfo();\r\n return tApi({ Idmember, IdStore }, 'chanjet.AA.DR.INewRetailMember.GetMemberRetailDetail', false, false);\r\n }\r\n\r\n async loadInStoreMember(CameraType) {\r\n const { IdStore, StoreCode } = this.getLoginInfo();\r\n const SearchParams = {\r\n CurrentPage: 1,\r\n PageSize: 999,\r\n CameraType,\r\n IdStore,\r\n StoreCode\r\n }\r\n const data = await tApi({\r\n SearchParams\r\n }, 'chanjet.AA.DR.INewRetailMember.LoadInStoreMember', false, false);\r\n return data;\r\n }\r\n\r\n async getInStoreMemberCount(minutes = 30) { // 到店会员数量\r\n const { orgId } = stores.user || {};\r\n const { CiaToken: accessToken, CloudServerHost, enterpriseUniqId: accountId, SignalRToken: token, PosId, storeID, CloudServerAppKey: appKey } = this.getLoginInfo();\r\n const params = { accountId, token, PosId, storeID, orgId, minutes, accessToken, appKey };\r\n\r\n return await axios.get(`${CloudServerHost}/ruiwei/ArrivalCount`, { params });\r\n }\r\n\r\n async getLastSnapImageList(Rid, imageTime = 30, count = 30) { // 到店会员头像列表\r\n Rid = Rid || undefined;\r\n const { orgId } = stores.user || {};\r\n const { CiaToken: accessToken, CloudServerHost, enterpriseUniqId: accountId, SignalRToken: token, PosId, storeID, CloudServerAppKey: appKey } = this.getLoginInfo();\r\n const params = { accountId, token, PosId, storeID, orgId, accessToken, appKey, imageTime, Rid, count };\r\n\r\n return await axios.get(`${CloudServerHost}/ruiwei/ArrivalPhoto`, { params });\r\n }\r\n\r\n async socketAuth() {\r\n const { orgId } = stores.user || {};\r\n const { SignalRServerHost, CiaToken, enterpriseUniqId: accountId, SignalRToken: token, PosId, storeID, CloudServerAppKey: appKey } = this.getLoginInfo();\r\n const params = { accountId, token, PosId, storeID, orgId, appKey, CiaToken };\r\n\r\n return await axios.get(`${SignalRServerHost}/api/auth/GetAccessToken`, { params });\r\n }\r\n\r\n async uploadMemberImage(id, src) {\r\n const fileParams = {\r\n Idmember: id,\r\n ImagePath: src\r\n }\r\n const data = await tApi({\r\n fileParams\r\n }, 'chanjet.AA.DR.INewRetailMember.UploadMemberImage', false, false);\r\n return data;\r\n }\r\n\r\n async getMemberAddViewInfo() {\r\n const param = {\r\n \"voucherName\": \"MemberAdd\"\r\n };\r\n const voucherViewInfo = await tApi({param}, 'chanjet.RE.INewRetailVoucherService.GetNewVoucherViewInfo', false, false);\r\n return voucherViewInfo;\r\n }\r\n\r\n async getStoreMemberStorageViewInfo() {\r\n const param = {\r\n \"voucherName\": \"StoreMemberStorage\"\r\n };\r\n const voucherViewInfo = await tApi({param}, 'chanjet.RE.INewRetailVoucherService.GetNewVoucherViewInfo', false, false);\r\n return voucherViewInfo;\r\n }\r\n\r\n //修改密码 \r\n async modifyMemberPass(obj, params1) {\r\n let params = {\r\n meMemberId: obj.member.ID,\r\n oldPassword: User.pwdEncrypt(obj.oldPass),\r\n newPassword: User.pwdEncrypt(obj.member.Password),\r\n dataSource: \"POS\"\r\n }\r\n let resp = await ccApi(params,\r\n \"/member/MeMemberWallet/setWalletPayPassword\",\r\n false,\r\n false,\r\n );\r\n return resp;\r\n }\r\n\r\n async updatePwd(obj) {\r\n let resp = await ccApi(obj,\r\n \"/marketingtool/MeStorageCard/updateStorageKey\",\r\n false,\r\n false,\r\n );\r\n return resp;\r\n }\r\n\r\n \r\n // 设置密码\r\n async setPwd(obj, params1) {\r\n let idstore = PosInitData('storeID');\r\n let params = {\r\n Idstore: idstore,\r\n meMemberId: obj.member.ID,\r\n oldPassword: null,\r\n newPassword: User.pwdEncrypt(obj.member.Password),\r\n dataSource: \"POS\"\r\n }\r\n let resp = await ccApi(params,\r\n \"/member/MeMemberWallet/setWalletPayPassword\",\r\n false,\r\n false,\r\n );\r\n return resp;\r\n }\r\n\r\n //重置密码\r\n async resetMemberPass(obj, params1) {\r\n let params = {\r\n meMemberId: obj.member.ID,\r\n oldPassword: null,\r\n newPassword: User.pwdEncrypt(obj.newPass),\r\n dataSource: \"POS\"\r\n }\r\n let resp = await ccApi(params,\r\n \"/member/MeMemberWallet/setWalletPayPassword\",\r\n false,\r\n false,\r\n );\r\n return resp;\r\n }\r\n\r\n //挂失\r\n async RecordLoss(member) {\r\n return tApi({ MemberDTO: member }, 'chanjet.AA.DR.INewRetailMember.RecordLoss', false, false);\r\n }\r\n\r\n //取消挂失\r\n async UnRecordLoss(member) {\r\n return tApi({ MemberDTO: member }, 'chanjet.AA.DR.INewRetailMember.UnRecordLoss', false, false);\r\n }\r\n // 最近购买\r\n async findMemberLastRetailDetail(params) {\r\n let resp = await ccApi(params,\r\n \"/member/fundConsume/findMemberLastRetailDetail\",\r\n false,\r\n false,\r\n { method: 'get' }\r\n );\r\n return resp;\r\n }\r\n\r\n // 查看会员的卡信息\r\n async getCardInfoByMemberId (memberId) {\r\n let resp = await ccApi({},\r\n `/marketingtool/MeStorageCard/getCardInfoByMemberId/${memberId}`,\r\n false,\r\n false,\r\n { method: 'get' }\r\n );\r\n return resp;\r\n }\r\n\r\n // 会员绑卡\r\n async MeStorageCardBind (params) {\r\n params.storeId = PosInitData('storeID');\r\n let resp = await ccApi(params,\r\n \"/marketingtool/MeStorageCard/bind\",\r\n false,\r\n false,\r\n );\r\n return resp;\r\n }\r\n \r\n // 储值卡列表\r\n async getCardInfoByCardNo (cardNo) {\r\n let resp = await ccApi({},\r\n `/marketingtool/MeStorageCard/getCardInfoByCardNo/${cardNo}`,\r\n false,\r\n false,\r\n { method: 'get' }\r\n );\r\n return resp;\r\n }\r\n\r\n // 会员解绑\r\n MeStorageCardUnbind (params) {\r\n return ccApi(params,\r\n `/marketingtool/MeStorageCard/unbind`,\r\n false,\r\n false,\r\n );\r\n }\r\n\r\n // 退储值\r\n async ReturnedStorage(params) {\r\n let resp = await ccApi(params,\r\n `/marketingtool/Storage/saveStorageRefundBillFromPos`,\r\n false,\r\n false\r\n );\r\n return resp;\r\n }\r\n\r\n // 最后一次储值金额\r\n async getLatestStorageAmount(params) {\r\n let resp = await ccApi(params,\r\n `/marketingtool/MeStorageCard/getLatestStorageAmount`,\r\n false,\r\n false,\r\n );\r\n return resp;\r\n }\r\n}\r\n\r\nconst memberStore = new MemberStore();\r\n\r\nexport default memberStore;\r\n\r\nregisterStores({ selectMemberStore: memberStore });\r\n"]}
1
+ {"version":3,"sources":["tplus-member/member/api.js"],"names":["MemberStore","curMemberInfo","searchValue","setCurMemberInfo","val","value","isBirth","selectMemberInfo","BirthDate","changeBirthdayShow","setTimeout","birthdayShow","precisionInfo","values","length","forEach","v","info","memberCareInfo","stores","user","options","get","obj","getLoginInfo","IdStore","StoreCode","Message","warn","SearchParams","CurrentPage","currentPage","PageSize","pageSize","Key","key","IsSingleMember","isSingleMember","data","Idmember","CameraType","minutes","orgId","accessToken","CiaToken","CloudServerHost","accountId","enterpriseUniqId","token","SignalRToken","PosId","storeID","appKey","CloudServerAppKey","params","axios","Rid","imageTime","count","undefined","SignalRServerHost","id","src","fileParams","ImagePath","param","voucherViewInfo","params1","platform","isNewRetailBCPos","meMemberId","member","ID","oldPassword","User","pwdEncrypt","oldPass","newPassword","Password","dataSource","resp","dto","oldPsw","idstore","Idstore","newPass","memberDTO","newPwd","MemberDTO","method","memberId","storeId","cardNo","observable","action","memberStore","selectMemberStore"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gGAM2B;;;AAN3B;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,qBAAU,IAAV;IACMA,W;;;;;;;;;;;;;;;;SAQJC,a,GAAc,E;SACdC,W,GAAY,E;;SAGZC,gB,GAAiB,UAACC,GAAD,EAAO;AACtB,YAAKH,aAAL,GAAmBG,OAAK,EAAxB;AACD,K;IANiB;AACH;;;;;kCAO0B;AAAA;;AAAA,UAArBC,KAAqB,uEAAb,EAAa;AAAA,UAATC,OAAS;;AACvC,WAAKC,gBAAL,GAAwBF,KAAxB;AACA;AAFuC,UAGjCG,SAHiC,GAGnBH,KAHmB,CAGjCG,SAHiC;;AAIvC,UAAIF,WAAWE,SAAX,IAAwB,wBAAYA,SAAZ,CAA5B,EAAoD;AAClD,aAAKC,kBAAL,CAAwB,IAAxB;AACAC,mBAAW,YAAM;AAAE,iBAAKD,kBAAL,CAAwB,KAAxB;AAAgC,SAAnD,EAAqD,IAArD;AACD;AACF;;;yCAEyC;AAAA,UAAfJ,KAAe,uEAAP,KAAO;;AACxC,WAAKM,YAAL,GAAoBN,KAApB;AACD;;;uCAE0B;AACzB,WAAKE,gBAAL,GAAwB,EAAxB;AACD;;;qCAEwBK,a,EAAe;AACtC,WAAKA,aAAL,GAAqBA,aAArB;AACD;;;mCAEiC;AAAA;;AAAA,UAAbC,MAAa,uEAAJ,EAAI;;AAChC,UAAI,oBAAY,KAAKN,gBAAjB,EAAmCO,MAAvC,EAA+C;AAC7C,4BAAYD,MAAZ,EAAoBE,OAApB,CAA4B;AAAA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;;;;;;;;;;;AAGT;;;;wCACqB1B,M,EAAQ;AAC3B,aAAO,qBAAMA,MAAN,yCAEL,KAFK,EAGL,KAHK,CAAP;AAKD;;AAED;;;;;+GACsBA,M;;;;;;;uBACH,qBAAMA,MAAN,yDAEf,KAFe,EAGf,KAHe,C;;;AAAb0B,oB;mDAKGA,I;;;;;;;;;;;;;;;;;AAGT;;;;;+GAC6B1B,M;;;;;;;uBACV,qBAAMA,MAAN,yDAEf,KAFe,EAGf,KAHe,C;;;AAAb0B,oB;mDAKGA,I;;;;;;;;;;;;;;;;;;iFAnTRa,gB;;;WAA0B,K;;oFAC1BA,gB;;;WAA8B,E;;iFAC9BA,gB;;;WAA2B,E;;kFAC3BA,gB;;;2EACAA,gB;;;gEAUAC,Y,mKAUAA,Y,wKAIAA,Y,sKAIAA,Y,kKAIAA,Y,kKAMAA,Y,qKAIAA,Y;;;AAyQH,IAAMC,cAAc,IAAI/F,WAAJ,EAApB;;kBAEe+F,W;;;AAEf,oCAAe,EAAEC,mBAAmBD,WAArB,EAAf","file":"api.js","sourcesContent":["import { tApi, ccApi, User } from 'tplus-api';\r\nimport { observable, action, useStrict, extendObservable, runInAction } from 'mobx';\r\nimport { registerStores, stores } from 'mutants-microfx';\r\nimport { platform } from 'mutants-util';\r\nimport { PosInitData } from 'tplus-poslogin';\r\nimport { Message } from 'tplus-components-touch';\r\nimport axios from 'axios'; // cloud server消息推送接口单独使用 不走统一配置\r\nimport { isBirthDate } from '../utils';\r\n\r\nuseStrict(true);\r\nclass MemberStore {\r\n\r\n @observable birthdayShow = false;\r\n @observable selectMemberInfo = {};\r\n @observable precisionInfo = {};\r\n @observable memberCareInfo\r\n @observable isClear\r\n\r\n curMemberInfo={} //开卡-fengtao\r\n searchValue='' //自动搜索会员-会员新增成功-fengtao\r\n\r\n\r\n setCurMemberInfo=(val)=>{\r\n this.curMemberInfo=val||{};\r\n }\r\n\r\n @action seletMember(value = {}, isBirth) {\r\n this.selectMemberInfo = value;\r\n //针对会员生日处理\r\n let { BirthDate } = value;\r\n if (isBirth && BirthDate && isBirthDate(BirthDate)) {\r\n this.changeBirthdayShow(true);\r\n setTimeout(() => { this.changeBirthdayShow(false) }, 3000)\r\n }\r\n }\r\n\r\n @action changeBirthdayShow(value = false) {\r\n this.birthdayShow = value;\r\n }\r\n\r\n @action clearSeletMember() {\r\n this.selectMemberInfo = {};\r\n }\r\n\r\n @action setPrecisionInfo(precisionInfo) {\r\n this.precisionInfo = precisionInfo;\r\n }\r\n\r\n @action setMemberKey(values = {}) {\r\n if (Object.keys(this.selectMemberInfo).length) {\r\n Object.keys(values).forEach(v => this.selectMemberInfo[v] = values[v]);\r\n }\r\n }\r\n\r\n @action changeMemberCare(info) {\r\n this.memberCareInfo = info;\r\n }\r\n\r\n @action clearMemberCare() {\r\n this.memberCareInfo = null;\r\n }\r\n\r\n getLoginInfo() {\r\n return stores.user.options.get('loginInfo');\r\n }\r\n async getSearchMember(obj) {\r\n const { IdStore, StoreCode } = this.getLoginInfo();\r\n if (!IdStore || !StoreCode) {\r\n Message.warn('门店相关信息缺失');\r\n return {};\r\n }\r\n const SearchParams = {\r\n CurrentPage: obj.currentPage,\r\n PageSize: obj.pageSize,\r\n Key: obj.key,\r\n IsSingleMember: obj.isSingleMember,\r\n IdStore: IdStore,\r\n StoreCode: StoreCode\r\n };\r\n const data = await tApi({\r\n SearchParams\r\n }, 'chanjet.AA.DR.INewRetailMember.SearchMember', false, false);\r\n return data;\r\n }\r\n\r\n async getGetUmemberDTO(Idmember) {\r\n const { IdStore, StoreCode } = this.getLoginInfo();\r\n return tApi({ Idmember, IdStore, StoreCode }, 'chanjet.AA.DR.INewRetailMember.GetUmemberDTO', false, false);\r\n }\r\n\r\n async getMemberRetailDetail(Idmember) {\r\n const { IdStore } = this.getLoginInfo();\r\n return tApi({ Idmember, IdStore }, 'chanjet.AA.DR.INewRetailMember.GetMemberRetailDetail', false, false);\r\n }\r\n\r\n async loadInStoreMember(CameraType) {\r\n const { IdStore, StoreCode } = this.getLoginInfo();\r\n const SearchParams = {\r\n CurrentPage: 1,\r\n PageSize: 999,\r\n CameraType,\r\n IdStore,\r\n StoreCode\r\n }\r\n const data = await tApi({\r\n SearchParams\r\n }, 'chanjet.AA.DR.INewRetailMember.LoadInStoreMember', false, false);\r\n return data;\r\n }\r\n\r\n async getInStoreMemberCount(minutes = 30) { // 到店会员数量\r\n const { orgId } = stores.user || {};\r\n const { CiaToken: accessToken, CloudServerHost, enterpriseUniqId: accountId, SignalRToken: token, PosId, storeID, CloudServerAppKey: appKey } = this.getLoginInfo();\r\n const params = { accountId, token, PosId, storeID, orgId, minutes, accessToken, appKey };\r\n\r\n return await axios.get(`${CloudServerHost}/ruiwei/ArrivalCount`, { params });\r\n }\r\n\r\n async getLastSnapImageList(Rid, imageTime = 30, count = 30) { // 到店会员头像列表\r\n Rid = Rid || undefined;\r\n const { orgId } = stores.user || {};\r\n const { CiaToken: accessToken, CloudServerHost, enterpriseUniqId: accountId, SignalRToken: token, PosId, storeID, CloudServerAppKey: appKey } = this.getLoginInfo();\r\n const params = { accountId, token, PosId, storeID, orgId, accessToken, appKey, imageTime, Rid, count };\r\n\r\n return await axios.get(`${CloudServerHost}/ruiwei/ArrivalPhoto`, { params });\r\n }\r\n\r\n async socketAuth() {\r\n const { orgId } = stores.user || {};\r\n const { SignalRServerHost, CiaToken, enterpriseUniqId: accountId, SignalRToken: token, PosId, storeID, CloudServerAppKey: appKey } = this.getLoginInfo();\r\n const params = { accountId, token, PosId, storeID, orgId, appKey, CiaToken };\r\n\r\n return await axios.get(`${SignalRServerHost}/api/auth/GetAccessToken`, { params });\r\n }\r\n\r\n async uploadMemberImage(id, src) {\r\n const fileParams = {\r\n Idmember: id,\r\n ImagePath: src\r\n }\r\n const data = await tApi({\r\n fileParams\r\n }, 'chanjet.AA.DR.INewRetailMember.UploadMemberImage', false, false);\r\n return data;\r\n }\r\n\r\n async getMemberAddViewInfo() {\r\n const param = {\r\n \"voucherName\": \"MemberAdd\"\r\n };\r\n const voucherViewInfo = await tApi({param}, 'chanjet.RE.INewRetailVoucherService.GetNewVoucherViewInfo', false, false);\r\n return voucherViewInfo;\r\n }\r\n\r\n async getStoreMemberStorageViewInfo() {\r\n const param = {\r\n \"voucherName\": \"StoreMemberStorage\"\r\n };\r\n const voucherViewInfo = await tApi({param}, 'chanjet.RE.INewRetailVoucherService.GetNewVoucherViewInfo', false, false);\r\n return voucherViewInfo;\r\n }\r\n\r\n //修改密码 \r\n async modifyMemberPass(obj, params1) {\r\n let { isNewRetailBCPos } = platform || {};\r\n if (isNewRetailBCPos) {\r\n let params = {\r\n meMemberId: obj.member.ID,\r\n oldPassword: User.pwdEncrypt(obj.oldPass),\r\n newPassword: User.pwdEncrypt(obj.member.Password),\r\n dataSource: \"POS\"\r\n }\r\n let resp = await ccApi(params,\r\n \"/member/MeMemberWallet/setWalletPayPassword\",\r\n false,\r\n false,\r\n );\r\n return resp;\r\n } else {\r\n let params = {\r\n dto: obj.member,\r\n oldPsw: obj.oldPass\r\n }\r\n return tApi(params, 'chanjet.AA.DR.INewRetailMember.UpdatePsw', false, false);\r\n }\r\n }\r\n\r\n async updatePwd(obj) {\r\n let resp = await ccApi(obj,\r\n \"/marketingtool/MeStorageCard/updateStorageKey\",\r\n false,\r\n false,\r\n );\r\n return resp;\r\n }\r\n\r\n \r\n // 设置密码\r\n async setPwd(obj, params1) {\r\n let idstore = PosInitData('storeID');\r\n let params = {\r\n Idstore: idstore,\r\n meMemberId: obj.member.ID,\r\n oldPassword: null,\r\n newPassword: User.pwdEncrypt(obj.member.Password),\r\n dataSource: \"POS\"\r\n }\r\n let resp = await ccApi(params,\r\n \"/member/MeMemberWallet/setWalletPayPassword\",\r\n false,\r\n false,\r\n );\r\n return resp;\r\n }\r\n\r\n //重置密码\r\n async resetMemberPass(obj, params1) {\r\n let { isNewRetailBCPos } = platform || {};\r\n if (isNewRetailBCPos) {\r\n let params = {\r\n meMemberId: obj.member.ID,\r\n oldPassword: null,\r\n newPassword: User.pwdEncrypt(obj.newPass),\r\n dataSource: \"POS\"\r\n }\r\n let resp = await ccApi(params,\r\n \"/member/MeMemberWallet/setWalletPayPassword\",\r\n false,\r\n false,\r\n );\r\n return resp;\r\n } else {\r\n let params = {\r\n memberDTO: obj.member,\r\n newPwd: obj.newPass\r\n }\r\n return tApi(params, 'chanjet.AA.DR.INewRetailMember.ChangePosPwd', false, false);\r\n }\r\n }\r\n\r\n //挂失\r\n async RecordLoss(member) {\r\n return tApi({ MemberDTO: member }, 'chanjet.AA.DR.INewRetailMember.RecordLoss', false, false);\r\n }\r\n\r\n //取消挂失\r\n async UnRecordLoss(member) {\r\n return tApi({ MemberDTO: member }, 'chanjet.AA.DR.INewRetailMember.UnRecordLoss', false, false);\r\n }\r\n // 最近购买\r\n async findMemberLastRetailDetail(params) {\r\n let resp = await ccApi(params,\r\n \"/member/fundConsume/findMemberLastRetailDetail\",\r\n false,\r\n false,\r\n { method: 'get' }\r\n );\r\n return resp;\r\n }\r\n\r\n // 查看会员的卡信息\r\n async getCardInfoByMemberId (memberId) {\r\n let resp = await ccApi({},\r\n `/marketingtool/MeStorageCard/getCardInfoByMemberId/${memberId}`,\r\n false,\r\n false,\r\n { method: 'get' }\r\n );\r\n return resp;\r\n }\r\n\r\n // 会员绑卡\r\n async MeStorageCardBind (params) {\r\n params.storeId = PosInitData('storeID');\r\n let resp = await ccApi(params,\r\n \"/marketingtool/MeStorageCard/bind\",\r\n false,\r\n false,\r\n );\r\n return resp;\r\n }\r\n \r\n // 储值卡列表\r\n async getCardInfoByCardNo (cardNo) {\r\n let resp = await ccApi({},\r\n `/marketingtool/MeStorageCard/getCardInfoByCardNo/${cardNo}`,\r\n false,\r\n false,\r\n { method: 'get' }\r\n );\r\n return resp;\r\n }\r\n\r\n // 会员解绑\r\n MeStorageCardUnbind (params) {\r\n return ccApi(params,\r\n `/marketingtool/MeStorageCard/unbind`,\r\n false,\r\n false,\r\n );\r\n }\r\n\r\n // 退储值\r\n async ReturnedStorage(params) {\r\n let resp = await ccApi(params,\r\n `/marketingtool/Storage/saveStorageRefundBillFromPos`,\r\n false,\r\n false\r\n );\r\n return resp;\r\n }\r\n\r\n // 最后一次储值金额\r\n async getLatestStorageAmount(params) {\r\n let resp = await ccApi(params,\r\n `/marketingtool/MeStorageCard/getLatestStorageAmount`,\r\n false,\r\n false,\r\n );\r\n return resp;\r\n }\r\n}\r\n\r\nconst memberStore = new MemberStore();\r\n\r\nexport default memberStore;\r\n\r\nregisterStores({ selectMemberStore: memberStore });\r\n"]}