tplus-portaltouch 3.36.1 → 3.36.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -39,7 +39,7 @@ var _class; /*
39
39
  * @Author: chenlongad
40
40
  * @Date: 2021-05-12 14:40:27
41
41
  * @LastEditors: chenlongad
42
- * @LastEditTime: 2021-06-10 16:37:51
42
+ * @LastEditTime: 2021-11-15 11:13:39
43
43
  */
44
44
 
45
45
  /**打印 */
@@ -100,11 +100,11 @@ var _default = (0, _mobxReact.observer)(_class = function (_Component) {
100
100
  _this.props.onAfterPrint && _this.props.onAfterPrint();
101
101
  };
102
102
 
103
- _this.onPrint = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2() {
103
+ _this.onPrint = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee() {
104
104
  var id, curIndex, isShift;
105
- return _regenerator2.default.wrap(function _callee2$(_context2) {
105
+ return _regenerator2.default.wrap(function _callee$(_context) {
106
106
  while (1) {
107
- switch (_context2.prev = _context2.next) {
107
+ switch (_context.prev = _context.next) {
108
108
  case 0:
109
109
  // 马坚 Add start
110
110
  id = null;
@@ -117,52 +117,24 @@ var _default = (0, _mobxReact.observer)(_class = function (_Component) {
117
117
  // 打印
118
118
 
119
119
  console.log("打印开始:ID:" + id);
120
- (0, _tplusComponentsTouch.printDispatch)(isShift ? _tplusComponentsTouch.DoNameList.DO_DUTY_PRINT : _tplusComponentsTouch.DoNameList.DO_DIALY_PRINT, id, {
121
- electronPrint: function () {
122
- var _ref2 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee() {
123
- return _regenerator2.default.wrap(function _callee$(_context) {
124
- while (1) {
125
- switch (_context.prev = _context.next) {
126
- case 0:
127
- // 桌面端直接打印
128
- console.log("桌面" + isShift + "历史打印后事件开始执行");
129
- _context.next = 3;
130
- return _PrintProcess.PrintProcess.execute(id, isShift);
131
-
132
- case 3:
133
- console.log("桌面" + isShift + "历史打印后事件执行结束");
134
- _this.props.onAfterPrint && _this.props.onAfterPrint();
135
-
136
- case 5:
137
- case 'end':
138
- return _context.stop();
139
- }
140
- }
141
- }, _callee, _this2);
142
- }));
143
-
144
- return function electronPrint() {
145
- return _ref2.apply(this, arguments);
146
- };
147
- }()
148
- }).then(function () {
120
+ (0, _tplusComponentsTouch.printDispatch)(isShift ? _tplusComponentsTouch.DoNameList.DO_DUTY_PRINT : _tplusComponentsTouch.DoNameList.DO_DIALY_PRINT, id).then(function () {
149
121
  _this.props.onAfterPrint && _this.props.onAfterPrint();
150
122
  });
151
123
 
152
124
  case 6:
153
125
  case 'end':
154
- return _context2.stop();
126
+ return _context.stop();
155
127
  }
156
128
  }
157
- }, _callee2, _this2);
129
+ }, _callee, _this2);
158
130
  }));
159
131
 
160
132
  _this.store = new _billHistoryStore2.default();
161
133
  _this.state = { date: (0, _moment2.default)() };
162
134
 
163
- var _ref3 = _mutantsUtil.platform || {},
164
- isHorizontalPad = _ref3.isHorizontalPad,
165
- isHorizontalSunMi = _ref3.isHorizontalSunMi;
135
+ var _ref2 = _mutantsUtil.platform || {},
136
+ isHorizontalPad = _ref2.isHorizontalPad,
137
+ isHorizontalSunMi = _ref2.isHorizontalSunMi;
166
138
 
167
139
  _this.isMobileEnvironment = !!isHorizontalPad || !!isHorizontalSunMi;
168
140
  _this.isHorizontalPad = !!isHorizontalPad;
@@ -1 +1 @@
1
- {"version":3,"sources":["tplus-portaltouch/components/dutyandsettle/dutysettlehistory.js"],"names":["observer","props","onChange","date","dataString","setTimeout","store","getVouchers","format","DateFormat","type","setState","onCancel","onAfterPrint","onPrint","id","curIndex","vouchers","ID","isShift","console","log","DoNameList","DO_DUTY_PRINT","DO_DIALY_PRINT","electronPrint","PrintProcess","execute","then","BillHistoryStore","state","platform","isHorizontalPad","isHorizontalSunMi","isMobileEnvironment","map","voucher","index","setCurIndex","Code","getVoucher","voucherInfo","Component"],"mappings":";;;;;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27\r\n * @LastEditors: chenlongad\r\n * @LastEditTime: 2021-06-10 16:37:51\r\n */\r\nimport React, { Component } from 'react';\r\nimport { DatePicker, Button } from 'antd';\r\nimport { observer } from 'mobx-react';\r\nimport moment from \"moment\";\r\nimport classnames from 'classnames'\r\nimport DutySettleBill from './dutysettlebill';\r\nimport { Ticon, printDispatch,DoNameList } from 'tplus-components-touch';\r\nimport { platform } from 'mutants-util';\r\nimport BillHistoryStore from '../../stores/billHistoryStore';\r\nimport { DateFormat2 as DateFormat } from '../../dutyService';\r\n/**打印 */\r\nimport { PrintProcess } from '../../utils/PrintProcess';\r\n\r\n@observer\r\nexport default class extends Component {\r\n\tconstructor(props) {\r\n\t\tsuper(props);\r\n\t\tthis.store = new BillHistoryStore();\r\n\t\tthis.state = { date: moment() };\r\n\t\tconst { isHorizontalPad, isHorizontalSunMi } = platform || {};\r\n\t\tthis.isMobileEnvironment = !!isHorizontalPad || !!isHorizontalSunMi;\r\n\t\tthis.isHorizontalPad = !!isHorizontalPad;\r\n\t}\r\n\tcomponentDidMount(){\r\n\t\tthis.onChange(moment());\r\n\t}\r\n\tonChange = (date, dataString) => {\r\n\t\tsetTimeout(() => {\r\n\t\t\tthis.store.getVouchers(date && date.format ? date.format(DateFormat) : \"\", this.props.type);\r\n\t\t\tif(dataString) this.setState({ date: date })\r\n\t\t}, 100);\r\n\t}\r\n\r\n\tonCancel = ()=>{\r\n\t\tthis.props.onAfterPrint && this.props.onAfterPrint();\r\n\t}\r\n\r\n\tonPrint = async ()=>{\r\n\t\t// 马坚 Add start\r\n\t\tlet id=null;\r\n\t\tlet curIndex=this.store.curIndex;\r\n\t\tif (this.store.vouchers && curIndex>=0) {\r\n\t\t\tid=this.store.vouchers[curIndex].ID;\r\n\t\t}\r\n\t\tlet isShift= this.props.type=='offDuty';\r\n\t\t// 打印\r\n\t\tconsole.log(\"打印开始:ID:\"+id);\r\n\t\tprintDispatch(isShift ? DoNameList.DO_DUTY_PRINT : DoNameList.DO_DIALY_PRINT, id, {\r\n\t\t\telectronPrint: async () => {\r\n\t\t\t\t// 桌面端直接打印\r\n\t\t\t\tconsole.log(\"桌面\" + isShift + \"历史打印后事件开始执行\");\r\n\t\t\t\tawait PrintProcess.execute(id, isShift);\r\n\t\t\t\tconsole.log(\"桌面\" + isShift + \"历史打印后事件执行结束\");\r\n\t\t\t\tthis.props.onAfterPrint && this.props.onAfterPrint();\r\n\t\t\t}\r\n\t\t}).then(() => {\r\n\t\t\tthis.props.onAfterPrint && this.props.onAfterPrint();\r\n\t\t});\r\n\t}\r\n\r\n\r\n\trender() {\r\n\t\tconst vouchers = (this.store.curIndex>-1?this.store.vouchers:[]).map((voucher,index)=>{\r\n\t\t\treturn <div className={classnames({'selected':index==this.store.curIndex})} key={index+''} onClick={()=>{this.store.setCurIndex(index)}}>{voucher.Code}</div>\r\n\t\t});\r\n\t\treturn (\r\n\t\t<div className=\"history\">\r\n\t\t\t<div className='historybody'>\r\n\t\t\t\t<div className=\"historyleft\">\r\n\t\t\t\t\t\t<div className=\"datepicker\">\r\n\t\t\t\t\t\t\t<DatePicker\r\n\t\t\t\t\t\t\t\tformat={DateFormat}\r\n\t\t\t\t\t\t\t\tonChange={this.onChange}\r\n\t\t\t\t\t\t\t\tvalue={this.state.date}\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t<div className=\"vouchers\">{vouchers}</div>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div className=\"historyright\">\r\n\t\t\t\t\t{this.store.curIndex==-1 &&<div className={classnames({\"emptydata\":true, \"historyempty\":true})}>暂无数据</div>}\r\n\t\t\t\t\t{this.store.curIndex>-1 &&<DutySettleBill type={this.props.type} bhistory={true} bill={this.store.getVoucher(this.store.curIndex)} voucherInfo={this.store.voucherInfo} />}\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t\t<div className='historyfooter'>\r\n\t\t\t\t<Button onClick={ this.onCancel } >取消</Button>\r\n\t\t\t\t<Button type='primary' onClick={this.onPrint}>打印</Button>\r\n\t\t\t</div>\r\n\t\t</div>);\r\n\t}\r\n}\r\n"]}
1
+ {"version":3,"sources":["tplus-portaltouch/components/dutyandsettle/dutysettlehistory.js"],"names":["observer","props","onChange","date","dataString","setTimeout","store","getVouchers","format","DateFormat","type","setState","onCancel","onAfterPrint","onPrint","id","curIndex","vouchers","ID","isShift","console","log","DoNameList","DO_DUTY_PRINT","DO_DIALY_PRINT","then","BillHistoryStore","state","platform","isHorizontalPad","isHorizontalSunMi","isMobileEnvironment","map","voucher","index","setCurIndex","Code","getVoucher","voucherInfo","Component"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAAA;;;;;;;;;AAkBA;;;AAVA;;;;AACA;;AACA;;AACA;;;;AACA;;;;AACA;;;;AACA;;AACA;;AACA;;;;AACA;;AAEA;;;;mBAECA,mB;;;AAEA,mBAAYC,KAAZ,EAAmB;AAAA;;AAAA;;AAAA,wIACZA,KADY;;AAAA,QAWnBC,QAXmB,GAWR,UAACC,IAAD,EAAOC,UAAP,EAAsB;AAChCC,cAAW,YAAM;AAChB,UAAKC,KAAL,CAAWC,WAAX,CAAuBJ,QAAQA,KAAKK,MAAb,GAAsBL,KAAKK,MAAL,CAAYC,wBAAZ,CAAtB,GAAgD,EAAvE,EAA2E,MAAKR,KAAL,CAAWS,IAAtF;AACA,QAAGN,UAAH,EAAe,MAAKO,QAAL,CAAc,EAAER,MAAMA,IAAR,EAAd;AACf,IAHD,EAGG,GAHH;AAIA,GAhBkB;;AAAA,QAkBnBS,QAlBmB,GAkBR,YAAI;AACd,SAAKX,KAAL,CAAWY,YAAX,IAA2B,MAAKZ,KAAL,CAAWY,YAAX,EAA3B;AACA,GApBkB;;AAAA,QAsBnBC,OAtBmB,4EAsBT;AAAA;AAAA;AAAA;AAAA;AAAA;AACT;AACIC,SAFK,GAEF,IAFE;AAGLC,eAHK,GAGI,MAAKV,KAAL,CAAWU,QAHf;;AAIT,WAAI,MAAKV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enlongad\r\n * @LastEditTime: 2021-11-15 11:13:39\r\n */\r\nimport React, { Component } from 'react';\r\nimport { DatePicker, Button } from 'antd';\r\nimport { observer } from 'mobx-react';\r\nimport moment from \"moment\";\r\nimport classnames from 'classnames'\r\nimport DutySettleBill from './dutysettlebill';\r\nimport { Ticon, printDispatch,DoNameList } from 'tplus-components-touch';\r\nimport { platform } from 'mutants-util';\r\nimport BillHistoryStore from '../../stores/billHistoryStore';\r\nimport { DateFormat2 as DateFormat } from '../../dutyService';\r\n/**打印 */\r\nimport { PrintProcess } from '../../utils/PrintProcess';\r\n\r\n@observer\r\nexport default class extends Component {\r\n\tconstructor(props) {\r\n\t\tsuper(props);\r\n\t\tthis.store = new BillHistoryStore();\r\n\t\tthis.state = { date: moment() };\r\n\t\tconst { isHorizontalPad, isHorizontalSunMi } = platform || {};\r\n\t\tthis.isMobileEnvironment = !!isHorizontalPad || !!isHorizontalSunMi;\r\n\t\tthis.isHorizontalPad = !!isHorizontalPad;\r\n\t}\r\n\tcomponentDidMount(){\r\n\t\tthis.onChange(moment());\r\n\t}\r\n\tonChange = (date, dataString) => {\r\n\t\tsetTimeout(() => {\r\n\t\t\tthis.store.getVouchers(date && date.format ? date.format(DateFormat) : \"\", this.props.type);\r\n\t\t\tif(dataString) this.setState({ date: date })\r\n\t\t}, 100);\r\n\t}\r\n\r\n\tonCancel = ()=>{\r\n\t\tthis.props.onAfterPrint && this.props.onAfterPrint();\r\n\t}\r\n\r\n\tonPrint = async ()=>{\r\n\t\t// 马坚 Add start\r\n\t\tlet id=null;\r\n\t\tlet curIndex=this.store.curIndex;\r\n\t\tif (this.store.vouchers && curIndex>=0) {\r\n\t\t\tid=this.store.vouchers[curIndex].ID;\r\n\t\t}\r\n\t\tlet isShift= this.props.type=='offDuty';\r\n\t\t// 打印\r\n\t\tconsole.log(\"打印开始:ID:\"+id);\r\n\t\tprintDispatch(isShift ? DoNameList.DO_DUTY_PRINT : DoNameList.DO_DIALY_PRINT, id).then(() => {\r\n\t\t\tthis.props.onAfterPrint && this.props.onAfterPrint();\r\n\t\t});\r\n\t}\r\n\r\n\r\n\trender() {\r\n\t\tconst vouchers = (this.store.curIndex>-1?this.store.vouchers:[]).map((voucher,index)=>{\r\n\t\t\treturn <div className={classnames({'selected':index==this.store.curIndex})} key={index+''} onClick={()=>{this.store.setCurIndex(index)}}>{voucher.Code}</div>\r\n\t\t});\r\n\t\treturn (\r\n\t\t<div className=\"history\">\r\n\t\t\t<div className='historybody'>\r\n\t\t\t\t<div className=\"historyleft\">\r\n\t\t\t\t\t\t<div className=\"datepicker\">\r\n\t\t\t\t\t\t\t<DatePicker\r\n\t\t\t\t\t\t\t\tformat={DateFormat}\r\n\t\t\t\t\t\t\t\tonChange={this.onChange}\r\n\t\t\t\t\t\t\t\tvalue={this.state.date}\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t<div className=\"vouchers\">{vouchers}</div>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div className=\"historyright\">\r\n\t\t\t\t\t{this.store.curIndex==-1 &&<div className={classnames({\"emptydata\":true, \"historyempty\":true})}>暂无数据</div>}\r\n\t\t\t\t\t{this.store.curIndex>-1 &&<DutySettleBill type={this.props.type} bhistory={true} bill={this.store.getVoucher(this.store.curIndex)} voucherInfo={this.store.voucherInfo} />}\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t\t<div className='historyfooter'>\r\n\t\t\t\t<Button onClick={ this.onCancel } >取消</Button>\r\n\t\t\t\t<Button type='primary' onClick={this.onPrint}>打印</Button>\r\n\t\t\t</div>\r\n\t\t</div>);\r\n\t}\r\n}\r\n"]}
@@ -44,6 +44,11 @@ var Header = _tplusComponentsTouch.Layout.Header; /**
44
44
  */
45
45
 
46
46
  function Head(props) {
47
+ //有些页面并不需要加载Header,例如副屏。
48
+ var pathname = window.location.pathname;
49
+ if ((pathname + '').indexOf('vicescreen') > -1) {
50
+ return '';
51
+ }
47
52
  var businessName = props.businessName,
48
53
  storeName = props.storeName,
49
54
  networkStatus = props.networkStatus,
@@ -1 +1 @@
1
- {"version":3,"sources":["tplus-portaltouch/components/header/index.js"],"names":["Head","Header","Layout","props","businessName","storeName","networkStatus","time","dateFormat","style","solt","logo","className","isPortal","isLogin","menu","onClick","posCode","location","history","classes","propTypes","PropTypes","object","string","number","node","array","onSelect","func"],"mappings":";;;;;kBAyBwBA,I;;AAVxB;;;;AACA;;;;AACA;;AACA;;;;AACA;;AACA;;AACA;;;;IAEOC,M,GAAUC,4B,CAAVD,M,EAvBP;;;AAGA;;;;;;;;;;;;;AAsBe,SAASD,IAAT,CAAcG,KAAd,EAAqB;AAAA,MAC3BC,YAD2B,GAEgCD,KAFhC,CAC3BC,YAD2B;AAAA,MACbC,SADa,GAEgCF,KAFhC,CACbE,SADa;AAAA,MACFC,aADE,GAEgCH,KAFhC,CACFG,aADE;AAAA,MACaC,IADb,GAEgCJ,KAFhC,CACaI,IADb;AAAA,MACmBC,UADnB,GAEgCL,KAFhC,CACmBK,UADnB;AAAA,qBAEgCL,KAFhC,CAC+BM,KAD/B;AAAA,MAC+BA,KAD/B,gCACuC,EADvC;AAAA,MAC2CC,IAD3C,GAEgCP,KAFhC,CAC2CO,IAD3C;AAAA,MACiDC,IADjD,GAEgCR,KAFhC,CACiDQ,IADjD;AAAA,yBAEgCR,KAFhC,CACuDS,SADvD;AAAA,MACuDA,SADvD,oCACmE,EADnE;AAAA,MAEhCC,QAFgC,GAEgCV,KAFhC,CAEhCU,QAFgC;AAAA,MAEtBC,OAFsB,GAEgCX,KAFhC,CAEtBW,OAFsB;AAAA,MAEbC,IAFa,GAEgCZ,KAFhC,CAEbY,IAFa;AAAA,MAEPC,OAFO,GAEgCb,KAFhC,CAEPa,OAFO;AAAA,MAEEC,OAFF,GAEgCd,KAFhC,CAEEc,OAFF;AAAA,MAEWC,QAFX,GAEgCf,KAFhC,CAEWe,QAFX;AAAA,MAEqBC,OAFrB,GAEgChB,KAFhC,CAEqBgB,OAFrB;;AAGlC,MAAMC,UAAU,2BAAe,YAAf,EAA6BR,SAA7B,CAAhB;AACA,SAAQ;AAAC,UAAD;AAAA,MAAQ,WAAWQ,OAAnB;AACN,kCAAC,qBAAD;AACE,YAAMT,IADR;AAEE,oBAAcP,YAFhB;AAGE,iBAAWC,SAHb;AAIE,qBAAeC,aAJjB;AAKE,YAAMC,IALR;AAME,eAASU,OANX;AAOE,kBAAYT,UAPd;AAQE,aAAOC,KART;AASE,YAAMC,IATR;AAUE,YAAMK,IAVR;AAWE,eAASC,OAXX;AAYE,gBAAUH,QAZZ;AAaE,eAASC,OAbX;AAcE,gBAAUI,QAdZ;AAeE,eAASC;AAfX;AADM,GAAR;AAmBD;;AAEDnB,KAAKqB,SAAL,GAAiB;AACfZ,SAAOa,oBAAUC,MADF;AAEfX,aAAWU,oBAAUE,MAFN;AAGfpB,gBAAckB,oBAAUE,MAHT;AAIfnB,aAAWiB,oBAAUE,MAJN;AAKflB,iBAAegB,oBAAUE,MALV;AAMfjB,QAAM,0BAAU,CACde,oBAAUE,MADI,EAEdF,oBAAUG,MAFI,CAAV,CANS;AAUfjB,cAAYc,oBAAUE,MAVP;AAWfb,QAAMW,oBAAUI,IAXD;AAYfX,QAAMO,oBAAUK,KAZD;AAafC,YAAUN,oBAAUO;AAbL,CAAjB","file":"index.js","sourcesContent":["/**\r\n * Created by hzy on 2019/3/25.\r\n */\r\n/**\r\n * @style style\r\n * @logo 商户LOGO\r\n * @businessName 商户名\r\n * @storeName 门店名\r\n * @posCode pos机号\r\n * @networkStatus 网络状态\r\n * @time 时间(时间戳or字符串)\r\n * @dateFormat 格式化时间 'yyyy-MM-dd hh:mm:ss.S'\r\n * @solt render插槽内容\r\n * @infoRender 外层Main容器context上的infoRender方法,传入参数为要渲染的react node内容 // this.context.infoRender(node)\r\n */\r\nimport React from 'react';\r\nimport PropTypes, { oneOfType } from 'prop-types';\r\nimport { Layout } from 'tplus-components-touch';\r\nimport HeadContent from './headContent';\r\nimport { generatorClass } from '../../utils';\r\nimport './style.less';\r\nimport './vertical-touch.less';\r\n\r\nconst {Header} = Layout;\r\n\r\nexport default function Head(props) {\r\n const {businessName, storeName, networkStatus, time, dateFormat, style = {}, solt, logo, className = '',\r\n isPortal, isLogin, menu, onClick, posCode, location, history} = props;\r\n const classes = generatorClass('pos-header', className);\r\n return (<Header className={classes}>\r\n <HeadContent\r\n logo={logo}\r\n businessName={businessName}\r\n storeName={storeName}\r\n networkStatus={networkStatus}\r\n time={time}\r\n posCode={posCode}\r\n dateFormat={dateFormat}\r\n style={style}\r\n solt={solt}\r\n menu={menu}\r\n onClick={onClick}\r\n isPortal={isPortal}\r\n isLogin={isLogin}\r\n location={location}\r\n history={history}\r\n />\r\n </Header>);\r\n}\r\n\r\nHead.propTypes = {\r\n style: PropTypes.object,\r\n className: PropTypes.string,\r\n businessName: PropTypes.string,\r\n storeName: PropTypes.string,\r\n networkStatus: PropTypes.string,\r\n time: oneOfType([\r\n PropTypes.string,\r\n PropTypes.number\r\n ]),\r\n dateFormat: PropTypes.string,\r\n logo: PropTypes.node,\r\n menu: PropTypes.array,\r\n onSelect: PropTypes.func,\r\n};\r\n"]}
1
+ {"version":3,"sources":["tplus-portaltouch/components/header/index.js"],"names":["Head","Header","Layout","props","pathname","window","location","indexOf","businessName","storeName","networkStatus","time","dateFormat","style","solt","logo","className","isPortal","isLogin","menu","onClick","posCode","history","classes","propTypes","PropTypes","object","string","number","node","array","onSelect","func"],"mappings":";;;;;kBAyBwBA,I;;AAVxB;;;;AACA;;;;AACA;;AACA;;;;AACA;;AACA;;AACA;;;;IAEOC,M,GAAUC,4B,CAAVD,M,EAvBP;;;AAGA;;;;;;;;;;;;;AAsBe,SAASD,IAAT,CAAcG,KAAd,EAAqB;AAClC;AACA,MAAMC,WAAWC,OAAOC,QAAP,CAAgBF,QAAjC;AACA,MAAI,CAACA,WAAW,EAAZ,EAAgBG,OAAhB,CAAwB,YAAxB,IAAwC,CAAC,CAA7C,EAAgD;AAC9C,W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AaE,eAASC,OAbX;AAcE,gBAAUZ,QAdZ;AAeE,eAASgB;AAfX;AADM,GAAR;AAmBD;;AAEDtB,KAAKwB,SAAL,GAAiB;AACfX,SAAOY,oBAAUC,MADF;AAEfV,aAAWS,oBAAUE,MAFN;AAGfnB,gBAAciB,oBAAUE,MAHT;AAIflB,aAAWgB,oBAAUE,MAJN;AAKfjB,iBAAee,oBAAUE,MALV;AAMfhB,QAAM,0BAAU,CACdc,oBAAUE,MADI,EAEdF,oBAAUG,MAFI,CAAV,CANS;AAUfhB,cAAYa,oBAAUE,MAVP;AAWfZ,QAAMU,oBAAUI,IAXD;AAYfV,QAAMM,oBAAUK,KAZD;AAafC,YAAUN,oBAAUO;AAbL,CAAjB","file":"index.js","sourcesContent":["/**\r\n * Created by hzy on 2019/3/25.\r\n */\r\n/**\r\n * @style style\r\n * @logo 商户LOGO\r\n * @businessName 商户名\r\n * @storeName 门店名\r\n * @posCode pos机号\r\n * @networkStatus 网络状态\r\n * @time 时间(时间戳or字符串)\r\n * @dateFormat 格式化时间 'yyyy-MM-dd hh:mm:ss.S'\r\n * @solt render插槽内容\r\n * @infoRender 外层Main容器context上的infoRender方法,传入参数为要渲染的react node内容 // this.context.infoRender(node)\r\n */\r\nimport React from 'react';\r\nimport PropTypes, { oneOfType } from 'prop-types';\r\nimport { Layout } from 'tplus-components-touch';\r\nimport HeadContent from './headContent';\r\nimport { generatorClass } from '../../utils';\r\nimport './style.less';\r\nimport './vertical-touch.less';\r\n\r\nconst {Header} = Layout;\r\n\r\nexport default function Head(props) {\r\n //有些页面并不需要加载Header,例如副屏。\r\n const pathname = window.location.pathname;\r\n if ((pathname + '').indexOf('vicescreen') > -1) {\r\n return '';\r\n }\r\n const {\r\n businessName, storeName, networkStatus, time, dateFormat, style = {}, solt, logo, className = '',\r\n isPortal, isLogin, menu, onClick, posCode, location, history\r\n } = props;\r\n const classes = generatorClass('pos-header', className);\r\n return (<Header className={classes}>\r\n <HeadContent\r\n logo={logo}\r\n businessName={businessName}\r\n storeName={storeName}\r\n networkStatus={networkStatus}\r\n time={time}\r\n posCode={posCode}\r\n dateFormat={dateFormat}\r\n style={style}\r\n solt={solt}\r\n menu={menu}\r\n onClick={onClick}\r\n isPortal={isPortal}\r\n isLogin={isLogin}\r\n location={location}\r\n history={history}\r\n />\r\n </Header>);\r\n}\r\n\r\nHead.propTypes = {\r\n style: PropTypes.object,\r\n className: PropTypes.string,\r\n businessName: PropTypes.string,\r\n storeName: PropTypes.string,\r\n networkStatus: PropTypes.string,\r\n time: oneOfType([\r\n PropTypes.string,\r\n PropTypes.number\r\n ]),\r\n dateFormat: PropTypes.string,\r\n logo: PropTypes.node,\r\n menu: PropTypes.array,\r\n onSelect: PropTypes.func,\r\n};\r\n"]}
@@ -96,7 +96,36 @@ var ThemeModal = function (_Component) {
96
96
  isPortal = _props.isPortal,
97
97
  isVertical = _props.isVertical;
98
98
 
99
- return _react2.default.createElement(
99
+ return isVertical ? _react2.default.createElement(
100
+ _tplusComponentsTouch.ModalVertical,
101
+ {
102
+ title: '\u4E3B\u9898',
103
+ visible: visible,
104
+ cancel: this.cancel,
105
+ ok: this.ok,
106
+ closeButton: false,
107
+ modalType: 'big',
108
+ className: 'theme-modal big-modal vertical-theme',
109
+ destroyOnClose: false
110
+ },
111
+ _react2.default.createElement(
112
+ 'div',
113
+ { className: 'theme-body ' + (!isPortal ? 'pos-page' : '') },
114
+ this.themeImgs.map(function (item, index) {
115
+ return _react2.default.createElement(
116
+ 'div',
117
+ { key: index, className: item.className + ' ' + (_this2.state.theme === item.theme ? 'current-theme' : ''), onClick: function onClick() {
118
+ return _this2.toggleTheme(item.theme);
119
+ } },
120
+ _react2.default.createElement(
121
+ 'span',
122
+ null,
123
+ item.name
124
+ )
125
+ );
126
+ })
127
+ )
128
+ ) : _react2.default.createElement(
100
129
  _tplusComponentsTouch.ModalWraper,
101
130
  {
102
131
  title: '\u4E3B\u9898',
@@ -105,7 +134,7 @@ var ThemeModal = function (_Component) {
105
134
  ok: this.ok,
106
135
  closeButton: false,
107
136
  modalType: 'big',
108
- className: 'theme-modal ' + (isVertical ? 'vertical-theme' : ''),
137
+ className: 'theme-modal',
109
138
  destroyOnClose: false
110
139
  },
111
140
  _react2.default.createElement(
@@ -1 +1 @@
1
- {"version":3,"sources":["tplus-portaltouch/components/header/themeModal.js"],"names":["ThemeModal","props","context","toggleTheme","type","console","log","state","theme","document","body","classList","add","themeClass","remove","setState","stores","portalStore","themeChange","cancel","localTheme","localStorage","getItem","closeFn","ok","setItem","themeVisible","orange","blue","dark","pink","isVertical","themeImgs","className","name","visible","isPortal","map","item","index","Component"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;AACA;;AACA;;;;IAEqBA,U;;;AAEjB,wBAAYC,KAAZ,EAAmBC,OAAnB,EAA4B;AAAA;;AAAA,kJAClBD,KADkB,EACXC,OADW;;AAAA,cAkB5BC,WAlB4B,GAkBd,UAACC,IAAD,EAAU;AACpBC,oBAAQC,GAAR,CAAY,SAAZ,EAAuB,MAAKC,KAAL,CAAWC,KAAlC;AACA,gBAAI,MAAKD,KAAL,CAAWC,KAAX,KAAqBJ,IAAzB,EAA+B;AAC/BK,qBAASC,IAAT,CAAcC,SAAd,CAAwBC,GAAxB,CAA4B,MAAKC,UAAL,CAAgBT,IAAhB,CAA5B;AACAK,qBAASC,IAAT,CAAcC,SAAd,CAAwBG,MAAxB,CAA+B,MAAKD,UAAL,CAAgB,MAAKN,KAAL,CAAWC,KAA3B,CAA/B;AACA,kBAAKO,QAAL,CAAc;AACVP,uBAAOJ;AADG,aAAd;AAGAY,mCAAOC,WAAP,CAAmBC,WAAnB,CAA+Bd,IAA/B;AACH,SA3B2B;;AAAA,cA4B5Be,MA5B4B,GA4BnB,YAAM;AACX,gBAAMC,aAAaC,aAAaC,OAAb,CAAqB,OAArB,CAAnB;AACA,kBAAKrB,KAAL,CAAWsB,OAAX,CAAmB,KAAnB;AACA,gBAAIH,eAAe,MAAKb,KAAL,CAAWC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iE,EAAED,WAAW,gBAAb,EAA+BzB,OAAO,MAAtC,EAA8C0B,MAAM,MAApD,EAAjE,EACX,EAAED,WAAW,gBAAb,EAA+BzB,OAAO,MAAtC,EAA8C0B,MAAM,MAApD,EADW,EACkD,EAAED,WAAW,gBAAb,EAA+BzB,OAAO,MAAtC,EAA8C0B,MAAM,MAApD,EADlD,CAAf;AAEH;AAfuB;AAgB3B;;;;iCA4BQ;AAAA;;AAAA,yBACqC,KAAKjC,KAD1C;AAAA,gBACGkC,OADH,UACGA,OADH;AAAA,gBACYC,QADZ,UACYA,QADZ;AAAA,gBACsBL,UADtB,UACsBA,UADtB;;AAEL,mBACI;AAAC,iDAAD;AAAA;AACI,2BAAM,cADV;AAEI,6BAASI,OAFb;AAGI,4BAAQ,KAAKhB,MAHjB;AAII,wBAAI,KAAKK,EAJb;AAKI,iCAAa,KALjB;AAMI,+BAAU,KANd;AAOI,iDAA0BO,aAAa,gBAAb,GAAgC,EAA1D,CAPJ;AAQI,oCAAgB;AARpB;AAUI;AAAA;AAAA,sBAAK,4BAAyB,CAACK,QAAD,GAAY,UAAZ,GAAyB,EAAlD,CAAL;AACK,yBAAKJ,SAAL,CAAeK,GAAf,CAAmB,UAACC,IAAD,EAAOC,KAAP,EAAe;AAC/B,+BAAQ;AAAA;AAAA,8BAAK,KAAKA,KAAV,EAAiB,WAAcD,KAAKL,SAAnB,UAAgC,OAAK1B,KAAL,CAAWC,KAAX,KAAqB8B,KAAK9B,KAA1B,GAAkC,eAAlC,GAAoD,EAApF,CAAjB,EAA2G,SAAS;AAAA,2CAAM,OAAKL,WAAL,CAAiBmC,KAAK9B,KAAtB,CAAN;AAAA,iCAApH;AACJ;AAAA;AAAA;AAAO8B,qCAAKJ;AAAZ;AADI,yBAAR;AAGH,qBAJA;AADL;AAVJ,aADJ;AAqBH;;;EArEmCM,gB;;kBAAnBxC,U","file":"themeModal.js","sourcesContent":["import React, { Component } from 'react';\r\nimport { stores } from 'mutants-microfx';\r\nimport { ModalWraper } from 'tplus-components-touch';\r\n\r\nexport default class ThemeModal extends Component {\r\n\r\n constructor(props, context) {\r\n super(props, context);\r\n this.state = {\r\n themeVisible: false,\r\n theme: localStorage.getItem(\"theme\")\r\n };\r\n\r\n this.themeClass = {orange: 'theme-class', blue: 'blue-theme', dark: 'dark-blue-theme', pink: 'pink-theme'};\r\n\r\n if (props.isVertical){\r\n this.themeImgs=[{ className: 'self-orange self-img', theme: 'orange', name: '热力橙' },{ className: 'self-blue self-img', theme: 'blue', name: '智能科技' },\r\n { className: 'self-pink self-img', theme: 'pink', name: '浪漫樱花' },{ className: 'self-dark self-img', theme: 'dark', name: '商务简洁' }];\r\n } else {\r\n this.themeImgs=[{ className: 'pc-orange pc-img', theme: 'orange', name: '热力橙' },{ className: 'pc-blue pc-img', theme: 'blue', name: '智能科技' },\r\n { className: 'pc-pink pc-img', theme: 'pink', name: '浪漫樱花' },{ className: 'pc-dark pc-img', theme: 'dark', name: '商务简洁' }];\r\n }\r\n }\r\n\r\n toggleTheme = (type) => {\r\n console.log('切换主题333', this.state.theme);\r\n if (this.state.theme === type) return;\r\n document.body.classList.add(this.themeClass[type]);\r\n document.body.classList.remove(this.themeClass[this.state.theme]);\r\n this.setState({\r\n theme: type\r\n });\r\n stores.portalStore.themeChange(type);\r\n }\r\n cancel = () => {\r\n const localTheme = localStorage.getItem(\"theme\");\r\n this.props.closeFn(false);\r\n if (localTheme === this.state.theme) return;\r\n document.body.classList.add(this.themeClass[localTheme]);\r\n document.body.classList.remove(this.themeClass[this.state.theme]);\r\n this.setState({\r\n theme: localTheme\r\n });\r\n stores.portalStore.themeChange(localTheme);\r\n }\r\n ok = () => {\r\n localStorage.setItem(\"theme\", this.state.theme);\r\n this.props.closeFn(false);\r\n }\r\n\r\n render() {\r\n const { visible, isPortal, isVertical } = this.props;\r\n return (\r\n <ModalWraper\r\n title=\"主题\"\r\n visible={visible}\r\n cancel={this.cancel}\r\n ok={this.ok}\r\n closeButton={false}\r\n modalType=\"big\"\r\n className={`theme-modal ${isVertical ? 'vertical-theme' : ''}`}\r\n destroyOnClose={false}\r\n >\r\n <div className={`theme-body ${!isPortal ? 'pos-page' : ''}`}>\r\n {this.themeImgs.map((item, index)=>{\r\n return (<div key={index} className={`${item.className} ${this.state.theme === item.theme ? 'current-theme' : ''}`} onClick={() => this.toggleTheme(item.theme)}>\r\n <span>{item.name}</span>\r\n </div>)\r\n })}\r\n </div>\r\n\r\n </ModalWraper>\r\n )\r\n }\r\n}"]}
1
+ {"version":3,"sources":["tplus-portaltouch/components/header/themeModal.js"],"names":["ThemeModal","props","context","toggleTheme","type","console","log","state","theme","document","body","classList","add","themeClass","remove","setState","stores","portalStore","themeChange","cancel","localTheme","localStorage","getItem","closeFn","ok","setItem","themeVisible","orange","blue","dark","pink","isVertical","themeImgs","className","name","visible","isPortal","map","item","index","Component"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;AACA;;AACA;;;;IAEqBA,U;;;AAEjB,wBAAYC,KAAZ,EAAmBC,OAAnB,EAA4B;AAAA;;AAAA,kJAClBD,KADkB,EACXC,OADW;;AAAA,cAkB5BC,WAlB4B,GAkBd,UAACC,IAAD,EAAU;AACpBC,oBAAQC,GAAR,CAAY,SAAZ,EAAuB,MAAKC,KAAL,CAAWC,KAAlC;AACA,gBAAI,MAAKD,KAAL,CAAWC,KAAX,KAAqBJ,IAAzB,EAA+B;AAC/BK,qBAASC,IAAT,CAAcC,SAAd,CAAwBC,GAAxB,CAA4B,MAAKC,UAAL,CAAgBT,IAAhB,CAA5B;AACAK,qBAASC,IAAT,CAAcC,SAAd,CAAwBG,MAAxB,CAA+B,MAAKD,UAAL,CAAgB,MAAKN,KAAL,CAAWC,KAA3B,CAA/B;AACA,kBAAKO,QAAL,CAAc;AACVP,uBAAOJ;AADG,aAAd;AAGAY,mCAAOC,WAAP,CAAmBC,WAAnB,CAA+Bd,IAA/B;AACH,SA3B2B;;AAAA,cA4B5Be,MA5B4B,GA4BnB,YAAM;A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GAqBA;AAAC,iDAAD;AAAA;AACI,2BAAM,cADV;AAEI,6BAASC,OAFb;AAGI,4BAAQ,KAAKhB,MAHjB;AAII,wBAAI,KAAKK,EAJb;AAKI,iCAAa,KALjB;AAMI,+BAAU,KANd;AAOI,4CAPJ;AAQI,oCAAgB;AARpB;AAUI;AAAA;AAAA,sBAAK,4BAAyB,CAACY,QAAD,GAAY,UAAZ,GAAyB,EAAlD,CAAL;AACK,yBAAKJ,SAAL,CAAeK,GAAf,CAAmB,UAACC,IAAD,EAAOC,KAAP,EAAe;AAC/B,+BAAQ;AAAA;AAAA,8BAAK,KAAKA,KAAV,EAAiB,WAAcD,KAAKL,SAAnB,UAAgC,OAAK1B,KAAL,CAAWC,KAAX,KAAqB8B,KAAK9B,KAA1B,GAAkC,eAAlC,GAAoD,EAApF,CAAjB,EAA2G,SAAS;AAAA,2CAAM,OAAKL,WAAL,CAAiBmC,KAAK9B,KAAtB,CAAN;AAAA,iCAApH;AACJ;AAAA;AAAA;AAAO8B,qCAAKJ;AAAZ;AADI,yBAAR;AAGH,qBAJA;AADL;AAVJ,aAtBJ;AAyCH;;;EAzFmCM,gB;;kBAAnBxC,U","file":"themeModal.js","sourcesContent":["import React, { Component } from 'react';\r\nimport { stores } from 'mutants-microfx';\r\nimport { ModalWraper, ModalVertical } from 'tplus-components-touch';\r\n\r\nexport default class ThemeModal extends Component {\r\n\r\n constructor(props, context) {\r\n super(props, context);\r\n this.state = {\r\n themeVisible: false,\r\n theme: localStorage.getItem(\"theme\")\r\n };\r\n\r\n this.themeClass = {orange: 'theme-class', blue: 'blue-theme', dark: 'dark-blue-theme', pink: 'pink-theme'};\r\n\r\n if (props.isVertical){\r\n this.themeImgs=[{ className: 'self-orange self-img', theme: 'orange', name: '热力橙' },{ className: 'self-blue self-img', theme: 'blue', name: '智能科技' },\r\n { className: 'self-pink self-img', theme: 'pink', name: '浪漫樱花' },{ className: 'self-dark self-img', theme: 'dark', name: '商务简洁' }];\r\n } else {\r\n this.themeImgs=[{ className: 'pc-orange pc-img', theme: 'orange', name: '热力橙' },{ className: 'pc-blue pc-img', theme: 'blue', name: '智能科技' },\r\n { className: 'pc-pink pc-img', theme: 'pink', name: '浪漫樱花' },{ className: 'pc-dark pc-img', theme: 'dark', name: '商务简洁' }];\r\n }\r\n }\r\n\r\n toggleTheme = (type) => {\r\n console.log('切换主题333', this.state.theme);\r\n if (this.state.theme === type) return;\r\n document.body.classList.add(this.themeClass[type]);\r\n document.body.classList.remove(this.themeClass[this.state.theme]);\r\n this.setState({\r\n theme: type\r\n });\r\n stores.portalStore.themeChange(type);\r\n }\r\n cancel = () => {\r\n const localTheme = localStorage.getItem(\"theme\");\r\n this.props.closeFn(false);\r\n if (localTheme === this.state.theme) return;\r\n document.body.classList.add(this.themeClass[localTheme]);\r\n document.body.classList.remove(this.themeClass[this.state.theme]);\r\n this.setState({\r\n theme: localTheme\r\n });\r\n stores.portalStore.themeChange(localTheme);\r\n }\r\n ok = () => {\r\n localStorage.setItem(\"theme\", this.state.theme);\r\n this.props.closeFn(false);\r\n }\r\n\r\n render() {\r\n const { visible, isPortal, isVertical } = this.props;\r\n return (\r\n isVertical?\r\n <ModalVertical\r\n title=\"主题\"\r\n visible={visible}\r\n cancel={this.cancel}\r\n ok={this.ok}\r\n closeButton={false}\r\n modalType=\"big\"\r\n className={`theme-modal big-modal vertical-theme`}\r\n destroyOnClose={false}\r\n >\r\n <div className={`theme-body ${!isPortal ? 'pos-page' : ''}`}>\r\n {this.themeImgs.map((item, index)=>{\r\n return (<div key={index} className={`${item.className} ${this.state.theme === item.theme ? 'current-theme' : ''}`} onClick={() => this.toggleTheme(item.theme)}>\r\n <span>{item.name}</span>\r\n </div>)\r\n })}\r\n </div>\r\n\r\n </ModalVertical>\r\n :\r\n <ModalWraper\r\n title=\"主题\"\r\n visible={visible}\r\n cancel={this.cancel}\r\n ok={this.ok}\r\n closeButton={false}\r\n modalType=\"big\"\r\n className={`theme-modal`}\r\n destroyOnClose={false}\r\n >\r\n <div className={`theme-body ${!isPortal ? 'pos-page' : ''}`}>\r\n {this.themeImgs.map((item, index)=>{\r\n return (<div key={index} className={`${item.className} ${this.state.theme === item.theme ? 'current-theme' : ''}`} onClick={() => this.toggleTheme(item.theme)}>\r\n <span>{item.name}</span>\r\n </div>)\r\n })}\r\n </div>\r\n </ModalWraper>\r\n )\r\n }\r\n}"]}
@@ -203,61 +203,34 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
203
203
  * @returns
204
204
  */
205
205
  value: function () {
206
- var _ref2 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2(dtoID, isPrint, callBack) {
207
- var _this3 = this;
208
-
206
+ var _ref2 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee(dtoID, isPrint, callBack) {
209
207
  var id, isShift;
210
- return _regenerator2.default.wrap(function _callee2$(_context2) {
208
+ return _regenerator2.default.wrap(function _callee$(_context) {
211
209
  while (1) {
212
- switch (_context2.prev = _context2.next) {
210
+ switch (_context.prev = _context.next) {
213
211
  case 0:
214
212
  if (isPrint) {
215
- _context2.next = 3;
213
+ _context.next = 3;
216
214
  break;
217
215
  }
218
216
 
219
217
  callBack();
220
- return _context2.abrupt('return');
218
+ return _context.abrupt('return');
221
219
 
222
220
  case 3:
223
221
  id = dtoID;
224
222
  isShift = this.state.type == 'offDuty';
225
223
 
226
- (0, _tplusComponentsTouch.printDispatch)(isShift ? _tplusComponentsTouch.DoNameList.DO_DUTY_PRINT : _tplusComponentsTouch.DoNameList.DO_DIALY_PRINT, id, {
227
- electronPrint: function () {
228
- var _ref3 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee() {
229
- return _regenerator2.default.wrap(function _callee$(_context) {
230
- while (1) {
231
- switch (_context.prev = _context.next) {
232
- case 0:
233
- _context.next = 2;
234
- return _PrintProcess.PrintProcess.execute(id, isShift);
235
-
236
- case 2:
237
- callBack();
238
-
239
- case 3:
240
- case 'end':
241
- return _context.stop();
242
- }
243
- }
244
- }, _callee, _this3);
245
- }));
246
-
247
- return function electronPrint() {
248
- return _ref3.apply(this, arguments);
249
- };
250
- }()
251
- }).then(function () {
224
+ (0, _tplusComponentsTouch.printDispatch)(isShift ? _tplusComponentsTouch.DoNameList.DO_DUTY_PRINT : _tplusComponentsTouch.DoNameList.DO_DIALY_PRINT, id).then(function () {
252
225
  callBack();
253
226
  });
254
227
 
255
228
  case 6:
256
229
  case 'end':
257
- return _context2.stop();
230
+ return _context.stop();
258
231
  }
259
232
  }
260
- }, _callee2, this);
233
+ }, _callee, this);
261
234
  }));
262
235
 
263
236
  function print(_x, _x2, _x3) {
@@ -269,7 +242,7 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
269
242
  }, {
270
243
  key: 'render',
271
244
  value: function render() {
272
- var _this4 = this,
245
+ var _this3 = this,
273
246
  _React$createElement;
274
247
 
275
248
  return _react2.default.createElement(
@@ -308,14 +281,14 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
308
281
  _react2.default.createElement(
309
282
  _antd.Button,
310
283
  { type: 'primary', onClick: function onClick() {
311
- _this4.offDutyClick(true);
284
+ _this3.offDutyClick(true);
312
285
  } },
313
286
  this.getTitle() + '并打印'
314
287
  ),
315
288
  _react2.default.createElement(
316
289
  _antd.Button,
317
290
  { type: 'primary', onClick: function onClick() {
318
- _this4.offDutyClick((0, _tplusPoslogin.PosInitData)('isAutoPrintShift') == '1');
291
+ _this3.offDutyClick((0, _tplusPoslogin.PosInitData)('isAutoPrintShift') == '1');
319
292
  } },
320
293
  this.getTitle()
321
294
  )
@@ -338,7 +311,7 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
338
311
  {
339
312
  width: '400px',
340
313
  onCancel: function onCancel() {
341
- return _this4.autohrityClose();
314
+ return _this3.autohrityClose();
342
315
  },
343
316
  maskClosable: false,
344
317
  wrapClassName: 'authortyClass',
@@ -350,7 +323,7 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
350
323
  _react2.default.createElement(
351
324
  _antd.Button,
352
325
  { className: 'btn', onClick: function onClick() {
353
- return _this4.autohrityClose();
326
+ return _this3.autohrityClose();
354
327
  }, style: { marginRight: 8 } },
355
328
  '\u53D6\u6D88'
356
329
  ),
@@ -374,7 +347,7 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
374
347
  { label: '\u7528\u6237' },
375
348
  _react2.default.createElement(_antd.Input, {
376
349
  ref: function ref(dom) {
377
- _this4.accountContainer = dom;
350
+ _this3.accountContainer = dom;
378
351
  },
379
352
  style: { width: '252px' },
380
353
  value: this.state.userName,
@@ -383,14 +356,14 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
383
356
  onFocus: function onFocus(e) {
384
357
  var input = e.target;
385
358
  _tplusComponentsTouch.Keyboard.open(function (v) {
386
- var value = _tplusComponentsTouch.Keyboard.getNewValue(input, _this4.sate.userName, v);
387
- _this4.setState({
359
+ var value = _tplusComponentsTouch.Keyboard.getNewValue(input, _this3.sate.userName, v);
360
+ _this3.setState({
388
361
  userName: value
389
362
  });
390
363
  })();
391
364
  },
392
365
  onKeyUp: function onKeyUp(e) {
393
- return _this4.onKeyDown(e, 'userName');
366
+ return _this3.onKeyDown(e, 'userName');
394
367
  }
395
368
  // {...getFieldProps('username', {
396
369
  // validateTrigger: 'onBlur',
@@ -405,19 +378,19 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
405
378
  { label: '\u5BC6\u7801' },
406
379
  _react2.default.createElement(_antd.Input, (_React$createElement = { type: 'password',
407
380
  ref: function ref(dom) {
408
- _this4.pwdContainer = dom;
381
+ _this3.pwdContainer = dom;
409
382
  },
410
383
  value: this.state.password
411
384
  }, (0, _defineProperty3.default)(_React$createElement, 'type', 'password'), (0, _defineProperty3.default)(_React$createElement, 'onChange', this.onChangePassword), (0, _defineProperty3.default)(_React$createElement, 'style', { width: '252px' }), (0, _defineProperty3.default)(_React$createElement, 'onFocus', function onFocus(e) {
412
385
  var input = e.target;
413
386
  _tplusComponentsTouch.Keyboard.open(function (v) {
414
- var value = _tplusComponentsTouch.Keyboard.getNewValue(input, _this4.state.password, v);
415
- _this4.setState({
387
+ var value = _tplusComponentsTouch.Keyboard.getNewValue(input, _this3.state.password, v);
388
+ _this3.setState({
416
389
  password: value
417
390
  });
418
391
  })();
419
392
  }), (0, _defineProperty3.default)(_React$createElement, 'onKeyUp', function onKeyUp(e) {
420
- return _this4.onKeyDown(e, 'password');
393
+ return _this3.onKeyDown(e, 'password');
421
394
  }), _React$createElement))
422
395
  )
423
396
  )
@@ -429,28 +402,28 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
429
402
  }(_react.Component), _class2.contextTypes = {
430
403
  stores: _propTypes2.default.object
431
404
  }, _initialiseProps = function _initialiseProps() {
432
- var _this5 = this;
405
+ var _this4 = this;
433
406
 
434
- this.onSuccess = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee3() {
407
+ this.onSuccess = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2() {
435
408
  var result, that;
436
- return _regenerator2.default.wrap(function _callee3$(_context3) {
409
+ return _regenerator2.default.wrap(function _callee2$(_context2) {
437
410
  while (1) {
438
- switch (_context3.prev = _context3.next) {
411
+ switch (_context2.prev = _context2.next) {
439
412
  case 0:
440
- _context3.next = 2;
413
+ _context2.next = 2;
441
414
  return (0, _tplusApi.tApi)({ 'content': (0, _stringify2.default)({
442
- userName: _this5.state.userName,
443
- passowrd: _this5.state.password,
415
+ userName: _this4.state.userName,
416
+ passowrd: _this4.state.password,
444
417
  authName: 'ReverseOperation'
445
418
  }) }, 'chanjet.RE.INewPos.CheckUserAuth', false, false);
446
419
 
447
420
  case 2:
448
- result = _context3.sent;
421
+ result = _context2.sent;
449
422
 
450
423
  if (result.Success) {
451
- that = _this5;
424
+ that = _this4;
452
425
 
453
- _this5.setState({
426
+ _this4.setState({
454
427
  isShowAuthority: false
455
428
  });
456
429
 
@@ -473,17 +446,17 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
473
446
 
474
447
  case 4:
475
448
  case 'end':
476
- return _context3.stop();
449
+ return _context2.stop();
477
450
  }
478
451
  }
479
- }, _callee3, _this5);
452
+ }, _callee2, _this4);
480
453
  }));
481
454
 
482
455
  this.offDutyAndPrint = function (bprint) {
483
- var title = _this5.getTitle();
484
- _this5.store.handleShift(_this5.state.type, _this5.state.ImprestAmount).then(function (resp) {
456
+ var title = _this4.getTitle();
457
+ _this4.store.handleShift(_this4.state.type, _this4.state.ImprestAmount).then(function (resp) {
485
458
  // 马坚 Add start
486
- _this5.print(resp.ID, bprint, function () {
459
+ _this4.print(resp.ID, bprint, function () {
487
460
  _tplusComponentsTouch.Message.info(title + "成功!");
488
461
  _tplusApi.User.logout();
489
462
  });
@@ -492,26 +465,26 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
492
465
  };
493
466
 
494
467
  this.offDutyClick = function (bprint) {
495
- _this5.setState({
468
+ _this4.setState({
496
469
  userName: '',
497
470
  password: ''
498
471
  });
499
- if (_this5.getTitle() === '交班') {
472
+ if (_this4.getTitle() === '交班') {
500
473
  var status = _AuthProcess.AuthProcess.execute('ReverseOperation');
501
474
  var withOutVoucherDatas = _mutantsMicrofx.localStore.get('posTouch_withOutVoucher_formal') || [];
502
475
  var isClearLimitOrderWhenShift = (0, _tplusPoslogin.PosInitData)('isClearLimitOrderWhenShift');
503
476
  if (!status && withOutVoucherDatas.length && isClearLimitOrderWhenShift === '1') {
504
- _this5.setState({
477
+ _this4.setState({
505
478
  isShowAuthority: true
506
479
  });
507
480
  setTimeout(function () {
508
- _this5.accountContainer.input.focus();
481
+ _this4.accountContainer.input.focus();
509
482
  });
510
- _this5.setState({
483
+ _this4.setState({
511
484
  authorityBPrint: bprint
512
485
  });
513
486
  } else {
514
- var that = _this5;
487
+ var that = _this4;
515
488
  _tplusComponentsTouch.ModalWraper.confirm({
516
489
  className: 'tplus-confirm-modal',
517
490
  title: that.getTitle(),
@@ -523,7 +496,7 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
523
496
  });
524
497
  }
525
498
  } else {
526
- var _that = _this5;
499
+ var _that = _this4;
527
500
  _tplusComponentsTouch.ModalWraper.confirm({
528
501
  className: 'tplus-confirm-modal',
529
502
  title: _that.getTitle(),
@@ -537,21 +510,21 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
537
510
  };
538
511
 
539
512
  this.onImprestAmountChange = function (value) {
540
- _this5.setState({ ImprestAmount: value });
513
+ _this4.setState({ ImprestAmount: value });
541
514
  };
542
515
 
543
516
  this.getTitle = function () {
544
- return _this5.state.type == 'offDuty' ? '交班' : '日结';
517
+ return _this4.state.type == 'offDuty' ? '交班' : '日结';
545
518
  };
546
519
 
547
520
  this.onChange = function (e) {
548
- _this5.setState({
521
+ _this4.setState({
549
522
  userName: e.target.value
550
523
  });
551
524
  };
552
525
 
553
526
  this.onChangePassword = function (e) {
554
- _this5.setState({
527
+ _this4.setState({
555
528
  password: e.target.value
556
529
  });
557
530
  };
@@ -559,9 +532,9 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
559
532
  this.onKeyDown = function (e, params) {
560
533
  if (e.keyCode == 13) {
561
534
  if (params === 'userName') {
562
- _this5.pwdContainer.input.focus();
535
+ _this4.pwdContainer.input.focus();
563
536
  } else if (params === 'password') {
564
- _this5.onSuccess();
537
+ _this4.onSuccess();
565
538
  }
566
539
  }
567
540
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["tplus-portaltouch/pages/dutyandsettle/offDuty.js"],"names":["FormItem","Form","Item","observer","props","state","showModal","type","getQueryString","location","search","ImprestAmount","showBottomOperator","isShowAuthority","userName","password","authorityBPrint","close","bind","open","platform","isHorizontalPad","isHorizontalSunMi","isMobileEnvironment","params","localStore","get","cloudPrintArguments","reg","RegExp","r","substr","match","setState","dutySettleStore","context","stores","store","user","preHandShift","catch","err","Code","preHandShiftOffDutyError","some","item","preHandShiftDailyError","dtoID","isPrint","callBack","id","isShift","DoNameList","DO_DUTY_PRINT","DO_DIALY_PRINT","electronPrint","PrintProcess","execute","then","history","push","getTitle","bOffDuty","shiftVoucher","voucherInfo","onImprestAmountChange","offDutyClick","autohrityClose","marginRight","onSuccess","dom","accountContainer","width","onChange","e","input","target","Keyboard","v","value","getNewValue","sate","onKeyDown","pwdContainer","onChangePassword","Component","contextTypes","PropTypes","object","passowrd","authName","result","Success","that","ModalWraper","confirm","className","title","content","destroyOnClose","onOk","offDutyAndPrint","onCancel","Message","warn","ErrorMsg","bprint","handleShift","resp","print","ID","info","User","logout","status","AuthProcess","withOutVoucherDatas","isClearLimitOrderWhenShift","length","setTimeout","focus","keyCode"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAWA;;;AAXA;;;;AACA;;;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAEA;;;;AACA,IAAMA,WAAWC,WAAKC,IAAtB;;mBACCC,mB;;;AAEA,mBAAYC,KAAZ,EAAmB;AAAA;;AAAA,wIACZA,KADY;;AAAA;;AAElB,QAAKC,KAAL,GAAa;AACZC,cAAW,KADC;AAEZC,SAAK,MAAKC,cAAL,CAAoBJ,MAAMK,QAAN,CAAeC,MAAnC,EAA0C,MAA1C,CAFO;AAGZC,kBAAc,CAHF;AAIZC,uBAAmB,IAJP;AAKZC,oBAAiB,KALL;AAMZC,aAAU,EANE;AAOZC,aAAU,EAPE;AAQZC,oBAAiB;AARL,GAAb;AAUE,QAAKC,KAAL,GAAa,MAAKA,KAAL,CAAWC,IAAX,OAAb;AACF,QAAKC,IAAL,GAAY,MAAKA,IAAL,CAAUD,IAAV,OAAZ;;AAbkB,aAc6BE,yBAAY,EAdzC;AAAA,MAcVC,e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gB,GAAmB,UAACV,CAAD,EAAO;AACzB,SAAKzC,QAAL,CAAc;AACblB,aAAU2D,EAAEE,MAAF,CAASG;AADN,GAAd;AAGA,E;;MAEDG,S,GAAY,UAACR,CAAD,EAAIlD,MAAJ,EAAe;AAC1B,MAAIkD,EAAE+C,OAAF,IAAa,EAAjB,EAAqB;AACpB,OAAIjG,WAAW,UAAf,EAA2B;AAC1B,WAAK2D,YAAL,CAAkBR,KAAlB,CAAwB6C,KAAxB;AACA,IAFD,MAEO,IAAIhG,WAAW,UAAf,EAA2B;AACjC,WAAK6C,SAAL;AACA;AACD;AACD,E","file":"offDuty.js","sourcesContent":["import React, { Component } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { Button, Modal, Form, Input } from 'antd';\r\nimport { observer } from 'mobx-react';\r\nimport { history, localStore } from 'mutants-microfx';\r\nimport { DutySettleBill, DutySettleHistory } from '../../components/dutyandsettle';\r\nimport { User, tApi } from 'tplus-api';\r\nimport { PosInitData } from 'tplus-poslogin';\r\nimport { ModalWraper, Message, printDispatch, Ticon, Keyboard , DoNameList } from 'tplus-components-touch';\r\nimport { platform } from 'mutants-util';\r\nimport { AuthProcess } from './AuthProcess';\r\n/**打印 */\r\nimport { PrintProcess } from '../../utils/PrintProcess';\r\nconst FormItem = Form.Item;\r\n@observer\r\nexport default class extends Component {\r\n\tconstructor(props) {\r\n\t\tsuper(props);\r\n\t\tthis.state = {\r\n\t\t\tshowModal: false,\r\n\t\t\ttype:this.getQueryString(props.location.search,'type'),\r\n\t\t\tImprestAmount:0,\r\n\t\t\tshowBottomOperator:true,\r\n\t\t\tisShowAuthority: false,\r\n\t\t\tuserName: '',\r\n\t\t\tpassword: '',\r\n\t\t\tauthorityBPrint: ''\r\n\t\t};\r\n this.close = this.close.bind(this);\r\n\t\tthis.open = this.open.bind(this);\r\n\t\tconst { isHorizontalPad, isHorizontalSunMi } = platform || {};\r\n\t\tthis.isMobileEnvironment = !!isHorizontalPad || !!isHorizontalSunMi;\r\n\t\tthis.isHorizontalPad = !!isHorizontalPad;\r\n\t\tthis.isHorizontalSunMi = !!isHorizontalSunMi;\r\n\t\t// 打印配置\r\n\t\tlet params = localStore && localStore.get('cloudPrintArguments');\r\n if (params) this.cloudPrintArguments = params\r\n\t}\r\n\r\n\tgetQueryString(search,type) {\r\n\t\tlet reg = new RegExp(\"(^|&)\" + type + \"=([^&]*)(&|$)\",\"i\");\r\n\t\tlet r = search.substr(1).match(reg);\r\n\t\tif (r!=null) return (r[2]); return null;\r\n\t}\r\n\r\n\r\n\tclose(params) {\r\n if (params && params === 'autohrity') {\r\n\t\t\tthis.setState({\r\n\t\t\t\tisShowAuthority: false\r\n\t\t\t});\r\n\t\t} else {\r\n\t\t\tthis.setState({\r\n\t\t\t\tshowModal: false\r\n\t\t\t});\r\n\t\t}\r\n }\r\n open() {\r\n this.setState({\r\n showModal: true\r\n });\r\n\t}\r\n\r\n\tautohrityClose(){\r\n\t\tthis.setState({\r\n\t\t\tisShowAuthority: false\r\n\t\t});\r\n\t}\r\n\r\n\tstatic contextTypes = {\r\n\t\tstores: PropTypes.object\r\n\t};\r\n\r\n\tonSuccess = async () => {\r\n\t\tlet result = await tApi({'content': JSON.stringify({\r\n\t\t\tuserName: this.state.userName,\r\n\t\t\tpassowrd: this.state.password,\r\n\t\t\tauthName: 'ReverseOperation'\r\n\t\t})}, 'chanjet.RE.INewPos.CheckUserAuth', false, false);\r\n\t\tif (result.Success) {\r\n\t\t\tconst that=this;\r\n\t\t\tthis.setState({\r\n\t\t\t\tisShowAuthority: false\r\n\t\t\t})\r\n\r\n\t\t\tModalWraper.confirm({\r\n\t\t\t\tclassName: 'tplus-confirm-modal',\r\n\t\t\t\ttitle: that.getTitle(),\r\n\t\t\t\tcontent: '您确定要'+that.getTitle()+'吗?',\r\n\t\t\t\tdestroyOnClose:true,\r\n\t\t\t\tonOk() {\r\n\t\t\t\t\tthat.offDutyAndPrint(that.state.authorityBPrint);\r\n\t\t\t\t\tthat.setState({\r\n\t\t\t\t\t\tauthorityBPrint: ''\r\n\t\t\t\t\t})\r\n\t\t\t\t},\r\n\t\t\t\tonCancel() {\r\n\r\n\t\t\t\t},\r\n\t\t\t});\r\n\t\t} else {\r\n\t\t\tMessage.warn(result.ErrorMsg);\r\n\t\t}\r\n\t}\r\n\r\n\tcomponentWillMount() {\r\n\t\tlet { dutySettleStore } = this.context.stores;\r\n\t\tthis.store = dutySettleStore;\r\n\t}\r\n\r\n\tcomponentDidMount() {\r\n\t\tlet { user } = this.context.stores;\r\n this.store.preHandShift(user,this.state.type).catch((err)=>{\r\n\t\t\tif(err && err.Code){\r\n\t\t\t\tif('offDuty'===this.state.type){\r\n\t\t\t\t\tthis.setState({\r\n\t\t\t\t\t\tshowBottomOperator:!this.store.preHandShiftOffDutyError.some((item=>{return item === err.Code}))\r\n\t\t\t\t\t});\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.setState({\r\n\t\t\t\t\t\tshowBottomOperator:!this.store.preHandShiftDailyError.some((item=>{return item === err.Code}))\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\t// componentWillUnMount() {\r\n\t// \tthis.setState({\r\n\t// \t\tuserName: '',\r\n\t// \t\tpassword: '',\r\n\t// \t\tisShowAuthority: false\r\n\t// \t})\r\n\t// }\r\n\r\n\t//交班点击事件\r\n\toffDutyAndPrint = (bprint)=>{\r\n\t\tconst title=this.getTitle();\r\n\t\tthis.store.handleShift(this.state.type,this.state.ImprestAmount).then((resp)=>{\r\n\t\t\t// 马坚 Add start\r\n\t\t\tthis.print(resp.ID,bprint,function()\r\n\t\t\t{\r\n\t\t\t\tMessage.info(title+\"成功!\");\r\n\t\t\t\tUser.logout();\r\n\t\t\t});\r\n\t\t\t// 马坚 Add end\r\n\t\t})\r\n\t}\r\n\toffDutyClick = (bprint)=>{\r\n\t\tthis.setState({\r\n\t\t\tuserName: '',\r\n\t\t\tpassword: ''\r\n\t\t})\r\n\t\tif (this.getTitle() === '交班') {\r\n\t\t\tlet status = AuthProcess.execute('ReverseOperation');\r\n\t\t\tlet withOutVoucherDatas = localStore.get('posTouch_withOutVoucher_formal')||[];\r\n\t\t\tlet isClearLimitOrderWhenShift = PosInitData('isClearLimitOrderWhenShift');\r\n\t\t\tif (!status && withOutVoucherDatas.length && isClearLimitOrderWhenShift === '1') {\r\n\t\t\t\tthis.setState({\r\n\t\t\t\t\tisShowAuthority: true\r\n\t\t\t\t})\r\n\t\t\t\tsetTimeout(() => {\r\n\t\t\t\t\tthis.accountContainer.input.focus();\r\n\t\t\t\t})\r\n\t\t\t\tthis.setState({\r\n\t\t\t\t\tauthorityBPrint: bprint\r\n\t\t\t\t})\r\n\t\t\t} else {\r\n\t\t\t\tconst that=this;\r\n\t\t\t\tModalWraper.confirm({\r\n\t\t\t\t\tclassName: 'tplus-confirm-modal',\r\n\t\t\t\t\ttitle: that.getTitle(),\r\n\t\t\t\t\tcontent: '您确定要'+that.getTitle()+'吗?',\r\n\t\t\t\t\tonOk() {\r\n\t\t\t\t\t that.offDutyAndPrint(bprint);\r\n\t\t\t\t\t},\r\n\t\t\t\t\tonCancel() {\r\n\r\n\t\t\t\t\t},\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tconst that=this;\r\n\t\t\tModalWraper.confirm({\r\n\t\t\t\tclassName: 'tplus-confirm-modal',\r\n\t\t\t\ttitle: that.getTitle(),\r\n\t\t\t\tcontent: '您确定要'+that.getTitle()+'吗?',\r\n\t\t\t\tonOk() {\r\n\t\t\t\tthat.offDutyAndPrint(bprint);\r\n\t\t\t\t},\r\n\t\t\t\tonCancel() {\r\n\r\n\t\t\t\t},\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\r\n\r\n\t/**\r\n\t *打印\r\n\t * @auther 马坚\r\n\t * @param {*} dtoID 单据ID\r\n\t * @param {*} isPrint\r\n \t * @param {*} callBack\r\n\t * @returns\r\n\t */\r\n\tasync print(dtoID,isPrint,callBack){\r\n\t\tif (!isPrint) {\r\n\t\t\tcallBack();\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tlet id=dtoID;\r\n\t\tlet isShift = this.state.type=='offDuty';\r\n\t\tprintDispatch(isShift ? DoNameList.DO_DUTY_PRINT : DoNameList.DO_DIALY_PRINT, id, {\r\n\t\t\telectronPrint: async () => {\r\n\t\t\t\t// 桌面端直接打印\r\n\t\t\t\tawait PrintProcess.execute(id, isShift);\r\n\t\t\t\tcallBack();\r\n\t\t\t}\r\n\t\t}).then(() => {\r\n\t\t\tcallBack();\r\n\t\t});\r\n\t}\r\n\r\n\tonImprestAmountChange=(value)=>{\r\n\t\tthis.setState({ImprestAmount:value});\r\n\t}\r\n\r\n\tgetTitle=()=>{\r\n\t\treturn this.state.type=='offDuty'?'交班':'日结'\r\n\t}\r\n\r\n\tonChange = (e) => {\r\n\t\tthis.setState({\r\n\t\t\tuserName: e.target.value\r\n\t\t})\r\n\t}\r\n\r\n\tonChangePassword = (e) => {\r\n\t\tthis.setState({\r\n\t\t\tpassword: e.target.value\r\n\t\t})\r\n\t}\r\n\r\n\tonKeyDown = (e, params) => {\r\n\t\tif (e.keyCode == 13) {\r\n\t\t\tif (params === 'userName') {\r\n\t\t\t\tthis.pwdContainer.input.focus()\r\n\t\t\t} else if (params === 'password') {\r\n\t\t\t\tthis.onSuccess()\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\r\n\trender() {\r\n\t\treturn (<div className=\"handleShift\">\r\n\t\t\t<div className='outerheader'>\r\n\t\t\t\t<span className='outerheader-button' onClick={() => history.push('/')}>\r\n\t\t\t\t\t<Ticon type='zuo2' className='outerheader-button-icon' /> {this.getTitle()}\r\n\t\t\t\t</span>\r\n\t\t\t\t<span className='outerheader-history'><Button onClick={this.open}>历史记录</Button></span>\r\n\t\t\t</div>\r\n\t\t\t<div className=\"outerbody\">\r\n\t\t\t\t<DutySettleBill bOffDuty={this.store.bOffDuty} type={this.state.type} bill={this.store.shiftVoucher} voucherInfo={this.store.voucherInfo} onImprestAmountChange={this.onImprestAmountChange}/>\r\n\t\t\t</div>\r\n\t\t\t{\r\n\t\t\t\tthis.state.showBottomOperator &&\r\n\t\t\t\t<div className=\"outerfooter\">\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t<Button type='primary' onClick={() => { this.offDutyClick(true) }}>{this.getTitle() + '并打印'}</Button>\r\n\t\t\t\t\t}\r\n\t\t\t\t\t<Button type='primary' onClick={() => { this.offDutyClick(PosInitData('isAutoPrintShift') == '1') }}>{this.getTitle()}</Button>\r\n\t\t\t\t</div>\r\n\t\t\t}\r\n\t\t\t<Modal\r\n\t\t\t\twrapClassName=\"historywin\"\r\n\t\t\t\tvisible = { this.state.showModal }\r\n\t\t\t\tmaskClosable= {false}\r\n\t\t\t\twidth='935px'\r\n\t\t\t\tcentered={true}\r\n\t\t\t\tonCancel = { this.close }\r\n\t\t\t\ttitle={this.getTitle() +'历史记录'}\r\n\t\t\t\tfooter={null}>\r\n\t\t\t\t\t<DutySettleHistory type={this.state.type} onAfterPrint={this.close}/>\r\n\t\t\t</Modal>\r\n\t\t\t<Modal\r\n\t\t\t\twidth='400px'\r\n\t\t\t\tonCancel = { () => this.autohrityClose() }\r\n\t\t\t\tmaskClosable= {false}\r\n\t\t\t\twrapClassName='authortyClass'\r\n\t\t\t\tvisible={this.state.isShowAuthority}\r\n\t\t\t\ttitle=\"其他用户授权\"\r\n\t\t\t\tfooter={\r\n\t\t\t\t\t<div>\r\n\t\t\t\t\t\t<Button className='btn' onClick={ () => this.autohrityClose() } style={{marginRight: 8}}>取消</Button>\r\n\t\t\t\t\t\t<Button className='btn' onClick={ this.onSuccess} type=\"primary\">确认</Button>\r\n\t\t\t\t\t</div>}\r\n\t\t\t>\r\n\t\t\t\t\t<div className='bodyClass'>\r\n\t\t\t\t\t\t<div className='tipTitle'>请有权限的用户输入账号及密码!</div>\r\n\t\t\t\t\t\t<FormItem label=\"用户\">\r\n\t\t\t\t\t\t<Input\r\n\t\t\t\t\t\t\tref={(dom) => { this.accountContainer = dom }}\r\n\t\t\t\t\t\t\tstyle={{width: '252px'}}\r\n\t\t\t\t\t\t\tvalue={this.state.userName}\r\n\t\t\t\t\t\t\ttype='username'\r\n\t\t\t\t\t\t\tonChange={this.onChange}\r\n\t\t\t\t\t\t\tonFocus={\r\n\t\t\t\t\t\t\t\t(e) => {\r\n\t\t\t\t\t\t\t\t\tlet input = e.target;\r\n\t\t\t\t\t\t\t\t\tKeyboard.open((v) => {\r\n\t\t\t\t\t\t\t\t\t\tlet value = Keyboard.getNewValue(input, this.sate.userName, v);\r\n\t\t\t\t\t\t\t\t\t\tthis.setState({\r\n\t\t\t\t\t\t\t\t\t\t\tuserName: value\r\n\t\t\t\t\t\t\t\t\t\t})\r\n\t\t\t\t\t\t\t\t\t})()\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tonKeyUp={e => this.onKeyDown(e, 'userName')}\r\n // {...getFieldProps('username', {\r\n // validateTrigger: 'onBlur',\r\n // rules: [{\r\n // required: true, message: <span><Icon type=\"uf-exc-t\"></Icon><span>请输入用户名</span></span>,\r\n // }],\r\n // }) }\r\n />\r\n </FormItem>\r\n <FormItem label=\"密码\">\r\n\t\t\t\t\t\t<Input type='password'\r\n\t\t\t\t\t\t ref={(dom) => { this.pwdContainer = dom }}\r\n\t\t\t\t\t\t\tvalue={this.state.password}\r\n\t\t\t\t\t\t\ttype='password'\r\n\t\t\t\t\t\t\tonChange={this.onChangePassword}\r\n\t\t\t\t\t\t\tstyle={{width: '252px'}}\r\n\t\t\t\t\t\t\tonFocus={\r\n\t\t\t\t\t\t\t\t(e) => {\r\n\t\t\t\t\t\t\t\t\tlet input = e.target;\r\n\t\t\t\t\t\t\t\t\tKeyboard.open((v) => {\r\n\t\t\t\t\t\t\t\t\t\tlet value = Keyboard.getNewValue(input, this.state.password, v);\r\n\t\t\t\t\t\t\t\t\t\tthis.setState({\r\n\t\t\t\t\t\t\t\t\t\t\tpassword: value\r\n\t\t\t\t\t\t\t\t\t\t})\r\n\t\t\t\t\t\t\t\t\t})()\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tonKeyUp={e => this.onKeyDown(e, 'password')}\r\n />\r\n </FormItem>\r\n\t\t\t\t</div>\r\n\t\t\t</Modal>\r\n\t\t</div>);\r\n\t}\r\n}\r\n"]}
1
+ {"version":3,"sources":["tplus-portaltouch/pages/dutyandsettle/offDuty.js"],"names":["FormItem","Form","Item","observer","props","state","showModal","type","getQueryString","location","search","ImprestAmount","showBottomOperator","isShowAuthority","userName","password","authorityBPrint","close","bind","open","platform","isHorizontalPad","isHorizontalSunMi","isMobileEnvironment","params","localStore","get","cloudPrintArguments","reg","RegExp","r","substr","match","setState","dutySettleStore","context","stores","store","user","preHandShift","catch","err","Code","preHandShiftOffDutyError","some","item","preHandShiftDailyError","dtoID","isPrint","callBack","id","isShift","DoNameList","DO_DUTY_PRINT","DO_DIALY_PRINT","then","history","push","getTitle","bOffDuty","shiftVoucher","voucherInfo","onImprestAmountChange","offDutyClick","autohrityClose","marginRight","onSuccess","dom","accountContainer","width","onChange","e","input","target","Keyboard","v","value","getNewValue","sate","onKeyDown","pwdContainer","onChangePassword","Component","contextTypes","PropTypes","object","passowrd","authName","result","Success","that","ModalWraper","confirm","className","title","content","destroyOnClose","onOk","offDutyAndPrint","onCancel","Message","warn","ErrorMsg","bprint","handleShift","resp","print","ID","info","User","logout","status","AuthProcess","execute","withOutVoucherDatas","isClearLimitOrderWhenShift","length","setTimeout","focus","keyCode"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAWA;;;AAXA;;;;AACA;;;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAEA;;;;AACA,IAAMA,WAAWC,WAAKC,IAAtB;;mBACCC,mB;;;AAEA,mBAAYC,KAAZ,EAAmB;AAAA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ACZ,SAAO,OAAKrD,KAAL,CAAWE,IAAX,IAAiB,SAAjB,GAA2B,IAA3B,GAAgC,IAAvC;AACA,E;;MAED+D,Q,GAAW,UAACC,CAAD,EAAO;AACjB,SAAKtC,QAAL,CAAc;AACbnB,aAAUyD,EAAEE,MAAF,CAASG;AADN,GAAd;AAGA,E;;MAEDK,gB,GAAmB,UAACV,CAAD,EAAO;AACzB,SAAKtC,QAAL,CAAc;AACblB,aAAUwD,EAAEE,MAAF,CAASG;AADN,GAAd;AAGA,E;;MAEDG,S,GAAY,UAACR,CAAD,EAAI/C,MAAJ,EAAe;AAC1B,MAAI+C,EAAEgD,OAAF,IAAa,EAAjB,EAAqB;AACpB,OAAI/F,WAAW,UAAf,EAA2B;AAC1B,WAAKwD,YAAL,CAAkBR,KAAlB,CAAwB8C,KAAxB;AACA,IAFD,MAEO,IAAI9F,WAAW,UAAf,EAA2B;AACjC,WAAK0C,SAAL;AACA;AACD;AACD,E","file":"offDuty.js","sourcesContent":["import React, { Component } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { Button, Modal, Form, Input } from 'antd';\r\nimport { observer } from 'mobx-react';\r\nimport { history, localStore } from 'mutants-microfx';\r\nimport { DutySettleBill, DutySettleHistory } from '../../components/dutyandsettle';\r\nimport { User, tApi } from 'tplus-api';\r\nimport { PosInitData } from 'tplus-poslogin';\r\nimport { ModalWraper, Message, printDispatch, Ticon, Keyboard , DoNameList } from 'tplus-components-touch';\r\nimport { platform } from 'mutants-util';\r\nimport { AuthProcess } from './AuthProcess';\r\n/**打印 */\r\nimport { PrintProcess } from '../../utils/PrintProcess';\r\nconst FormItem = Form.Item;\r\n@observer\r\nexport default class extends Component {\r\n\tconstructor(props) {\r\n\t\tsuper(props);\r\n\t\tthis.state = {\r\n\t\t\tshowModal: false,\r\n\t\t\ttype:this.getQueryString(props.location.search,'type'),\r\n\t\t\tImprestAmount:0,\r\n\t\t\tshowBottomOperator:true,\r\n\t\t\tisShowAuthority: false,\r\n\t\t\tuserName: '',\r\n\t\t\tpassword: '',\r\n\t\t\tauthorityBPrint: ''\r\n\t\t};\r\n this.close = this.close.bind(this);\r\n\t\tthis.open = this.open.bind(this);\r\n\t\tconst { isHorizontalPad, isHorizontalSunMi } = platform || {};\r\n\t\tthis.isMobileEnvironment = !!isHorizontalPad || !!isHorizontalSunMi;\r\n\t\tthis.isHorizontalPad = !!isHorizontalPad;\r\n\t\tthis.isHorizontalSunMi = !!isHorizontalSunMi;\r\n\t\t// 打印配置\r\n\t\tlet params = localStore && localStore.get('cloudPrintArguments');\r\n if (params) this.cloudPrintArguments = params\r\n\t}\r\n\r\n\tgetQueryString(search,type) {\r\n\t\tlet reg = new RegExp(\"(^|&)\" + type + \"=([^&]*)(&|$)\",\"i\");\r\n\t\tlet r = search.substr(1).match(reg);\r\n\t\tif (r!=null) return (r[2]); return null;\r\n\t}\r\n\r\n\r\n\tclose(params) {\r\n if (params && params === 'autohrity') {\r\n\t\t\tthis.setState({\r\n\t\t\t\tisShowAuthority: false\r\n\t\t\t});\r\n\t\t} else {\r\n\t\t\tthis.setState({\r\n\t\t\t\tshowModal: false\r\n\t\t\t});\r\n\t\t}\r\n }\r\n open() {\r\n this.setState({\r\n showModal: true\r\n });\r\n\t}\r\n\r\n\tautohrityClose(){\r\n\t\tthis.setState({\r\n\t\t\tisShowAuthority: false\r\n\t\t});\r\n\t}\r\n\r\n\tstatic contextTypes = {\r\n\t\tstores: PropTypes.object\r\n\t};\r\n\r\n\tonSuccess = async () => {\r\n\t\tlet result = await tApi({'content': JSON.stringify({\r\n\t\t\tuserName: this.state.userName,\r\n\t\t\tpassowrd: this.state.password,\r\n\t\t\tauthName: 'ReverseOperation'\r\n\t\t})}, 'chanjet.RE.INewPos.CheckUserAuth', false, false);\r\n\t\tif (result.Success) {\r\n\t\t\tconst that=this;\r\n\t\t\tthis.setState({\r\n\t\t\t\tisShowAuthority: false\r\n\t\t\t})\r\n\r\n\t\t\tModalWraper.confirm({\r\n\t\t\t\tclassName: 'tplus-confirm-modal',\r\n\t\t\t\ttitle: that.getTitle(),\r\n\t\t\t\tcontent: '您确定要'+that.getTitle()+'吗?',\r\n\t\t\t\tdestroyOnClose:true,\r\n\t\t\t\tonOk() {\r\n\t\t\t\t\tthat.offDutyAndPrint(that.state.authorityBPrint);\r\n\t\t\t\t\tthat.setState({\r\n\t\t\t\t\t\tauthorityBPrint: ''\r\n\t\t\t\t\t})\r\n\t\t\t\t},\r\n\t\t\t\tonCancel() {\r\n\r\n\t\t\t\t},\r\n\t\t\t});\r\n\t\t} else {\r\n\t\t\tMessage.warn(result.ErrorMsg);\r\n\t\t}\r\n\t}\r\n\r\n\tcomponentWillMount() {\r\n\t\tlet { dutySettleStore } = this.context.stores;\r\n\t\tthis.store = dutySettleStore;\r\n\t}\r\n\r\n\tcomponentDidMount() {\r\n\t\tlet { user } = this.context.stores;\r\n this.store.preHandShift(user,this.state.type).catch((err)=>{\r\n\t\t\tif(err && err.Code){\r\n\t\t\t\tif('offDuty'===this.state.type){\r\n\t\t\t\t\tthis.setState({\r\n\t\t\t\t\t\tshowBottomOperator:!this.store.preHandShiftOffDutyError.some((item=>{return item === err.Code}))\r\n\t\t\t\t\t});\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.setState({\r\n\t\t\t\t\t\tshowBottomOperator:!this.store.preHandShiftDailyError.some((item=>{return item === err.Code}))\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\t// componentWillUnMount() {\r\n\t// \tthis.setState({\r\n\t// \t\tuserName: '',\r\n\t// \t\tpassword: '',\r\n\t// \t\tisShowAuthority: false\r\n\t// \t})\r\n\t// }\r\n\r\n\t//交班点击事件\r\n\toffDutyAndPrint = (bprint)=>{\r\n\t\tconst title=this.getTitle();\r\n\t\tthis.store.handleShift(this.state.type,this.state.ImprestAmount).then((resp)=>{\r\n\t\t\t// 马坚 Add start\r\n\t\t\tthis.print(resp.ID,bprint,function()\r\n\t\t\t{\r\n\t\t\t\tMessage.info(title+\"成功!\");\r\n\t\t\t\tUser.logout();\r\n\t\t\t});\r\n\t\t\t// 马坚 Add end\r\n\t\t})\r\n\t}\r\n\toffDutyClick = (bprint)=>{\r\n\t\tthis.setState({\r\n\t\t\tuserName: '',\r\n\t\t\tpassword: ''\r\n\t\t})\r\n\t\tif (this.getTitle() === '交班') {\r\n\t\t\tlet status = AuthProcess.execute('ReverseOperation');\r\n\t\t\tlet withOutVoucherDatas = localStore.get('posTouch_withOutVoucher_formal')||[];\r\n\t\t\tlet isClearLimitOrderWhenShift = PosInitData('isClearLimitOrderWhenShift');\r\n\t\t\tif (!status && withOutVoucherDatas.length && isClearLimitOrderWhenShift === '1') {\r\n\t\t\t\tthis.setState({\r\n\t\t\t\t\tisShowAuthority: true\r\n\t\t\t\t})\r\n\t\t\t\tsetTimeout(() => {\r\n\t\t\t\t\tthis.accountContainer.input.focus();\r\n\t\t\t\t})\r\n\t\t\t\tthis.setState({\r\n\t\t\t\t\tauthorityBPrint: bprint\r\n\t\t\t\t})\r\n\t\t\t} else {\r\n\t\t\t\tconst that=this;\r\n\t\t\t\tModalWraper.confirm({\r\n\t\t\t\t\tclassName: 'tplus-confirm-modal',\r\n\t\t\t\t\ttitle: that.getTitle(),\r\n\t\t\t\t\tcontent: '您确定要'+that.getTitle()+'吗?',\r\n\t\t\t\t\tonOk() {\r\n\t\t\t\t\t that.offDutyAndPrint(bprint);\r\n\t\t\t\t\t},\r\n\t\t\t\t\tonCancel() {\r\n\r\n\t\t\t\t\t},\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tconst that=this;\r\n\t\t\tModalWraper.confirm({\r\n\t\t\t\tclassName: 'tplus-confirm-modal',\r\n\t\t\t\ttitle: that.getTitle(),\r\n\t\t\t\tcontent: '您确定要'+that.getTitle()+'吗?',\r\n\t\t\t\tonOk() {\r\n\t\t\t\tthat.offDutyAndPrint(bprint);\r\n\t\t\t\t},\r\n\t\t\t\tonCancel() {\r\n\r\n\t\t\t\t},\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\r\n\r\n\t/**\r\n\t *打印\r\n\t * @auther 马坚\r\n\t * @param {*} dtoID 单据ID\r\n\t * @param {*} isPrint\r\n \t * @param {*} callBack\r\n\t * @returns\r\n\t */\r\n\tasync print(dtoID,isPrint,callBack){\r\n\t\tif (!isPrint) {\r\n\t\t\tcallBack();\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tlet id=dtoID;\r\n\t\tlet isShift = this.state.type=='offDuty';\r\n\t\tprintDispatch(isShift ? DoNameList.DO_DUTY_PRINT : DoNameList.DO_DIALY_PRINT, id ).then(() => {\r\n\t\t\tcallBack();\r\n\t\t});\r\n\t}\r\n\r\n\tonImprestAmountChange=(value)=>{\r\n\t\tthis.setState({ImprestAmount:value});\r\n\t}\r\n\r\n\tgetTitle=()=>{\r\n\t\treturn this.state.type=='offDuty'?'交班':'日结'\r\n\t}\r\n\r\n\tonChange = (e) => {\r\n\t\tthis.setState({\r\n\t\t\tuserName: e.target.value\r\n\t\t})\r\n\t}\r\n\r\n\tonChangePassword = (e) => {\r\n\t\tthis.setState({\r\n\t\t\tpassword: e.target.value\r\n\t\t})\r\n\t}\r\n\r\n\tonKeyDown = (e, params) => {\r\n\t\tif (e.keyCode == 13) {\r\n\t\t\tif (params === 'userName') {\r\n\t\t\t\tthis.pwdContainer.input.focus()\r\n\t\t\t} else if (params === 'password') {\r\n\t\t\t\tthis.onSuccess()\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\r\n\trender() {\r\n\t\treturn (<div className=\"handleShift\">\r\n\t\t\t<div className='outerheader'>\r\n\t\t\t\t<span className='outerheader-button' onClick={() => history.push('/')}>\r\n\t\t\t\t\t<Ticon type='zuo2' className='outerheader-button-icon' /> {this.getTitle()}\r\n\t\t\t\t</span>\r\n\t\t\t\t<span className='outerheader-history'><Button onClick={this.open}>历史记录</Button></span>\r\n\t\t\t</div>\r\n\t\t\t<div className=\"outerbody\">\r\n\t\t\t\t<DutySettleBill bOffDuty={this.store.bOffDuty} type={this.state.type} bill={this.store.shiftVoucher} voucherInfo={this.store.voucherInfo} onImprestAmountChange={this.onImprestAmountChange}/>\r\n\t\t\t</div>\r\n\t\t\t{\r\n\t\t\t\tthis.state.showBottomOperator &&\r\n\t\t\t\t<div className=\"outerfooter\">\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t<Button type='primary' onClick={() => { this.offDutyClick(true) }}>{this.getTitle() + '并打印'}</Button>\r\n\t\t\t\t\t}\r\n\t\t\t\t\t<Button type='primary' onClick={() => { this.offDutyClick(PosInitData('isAutoPrintShift') == '1') }}>{this.getTitle()}</Button>\r\n\t\t\t\t</div>\r\n\t\t\t}\r\n\t\t\t<Modal\r\n\t\t\t\twrapClassName=\"historywin\"\r\n\t\t\t\tvisible = { this.state.showModal }\r\n\t\t\t\tmaskClosable= {false}\r\n\t\t\t\twidth='935px'\r\n\t\t\t\tcentered={true}\r\n\t\t\t\tonCancel = { this.close }\r\n\t\t\t\ttitle={this.getTitle() +'历史记录'}\r\n\t\t\t\tfooter={null}>\r\n\t\t\t\t\t<DutySettleHistory type={this.state.type} onAfterPrint={this.close}/>\r\n\t\t\t</Modal>\r\n\t\t\t<Modal\r\n\t\t\t\twidth='400px'\r\n\t\t\t\tonCancel = { () => this.autohrityClose() }\r\n\t\t\t\tmaskClosable= {false}\r\n\t\t\t\twrapClassName='authortyClass'\r\n\t\t\t\tvisible={this.state.isShowAuthority}\r\n\t\t\t\ttitle=\"其他用户授权\"\r\n\t\t\t\tfooter={\r\n\t\t\t\t\t<div>\r\n\t\t\t\t\t\t<Button className='btn' onClick={ () => this.autohrityClose() } style={{marginRight: 8}}>取消</Button>\r\n\t\t\t\t\t\t<Button className='btn' onClick={ this.onSuccess} type=\"primary\">确认</Button>\r\n\t\t\t\t\t</div>}\r\n\t\t\t>\r\n\t\t\t\t\t<div className='bodyClass'>\r\n\t\t\t\t\t\t<div className='tipTitle'>请有权限的用户输入账号及密码!</div>\r\n\t\t\t\t\t\t<FormItem label=\"用户\">\r\n\t\t\t\t\t\t<Input\r\n\t\t\t\t\t\t\tref={(dom) => { this.accountContainer = dom }}\r\n\t\t\t\t\t\t\tstyle={{width: '252px'}}\r\n\t\t\t\t\t\t\tvalue={this.state.userName}\r\n\t\t\t\t\t\t\ttype='username'\r\n\t\t\t\t\t\t\tonChange={this.onChange}\r\n\t\t\t\t\t\t\tonFocus={\r\n\t\t\t\t\t\t\t\t(e) => {\r\n\t\t\t\t\t\t\t\t\tlet input = e.target;\r\n\t\t\t\t\t\t\t\t\tKeyboard.open((v) => {\r\n\t\t\t\t\t\t\t\t\t\tlet value = Keyboard.getNewValue(input, this.sate.userName, v);\r\n\t\t\t\t\t\t\t\t\t\tthis.setState({\r\n\t\t\t\t\t\t\t\t\t\t\tuserName: value\r\n\t\t\t\t\t\t\t\t\t\t})\r\n\t\t\t\t\t\t\t\t\t})()\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tonKeyUp={e => this.onKeyDown(e, 'userName')}\r\n // {...getFieldProps('username', {\r\n // validateTrigger: 'onBlur',\r\n // rules: [{\r\n // required: true, message: <span><Icon type=\"uf-exc-t\"></Icon><span>请输入用户名</span></span>,\r\n // }],\r\n // }) }\r\n />\r\n </FormItem>\r\n <FormItem label=\"密码\">\r\n\t\t\t\t\t\t<Input type='password'\r\n\t\t\t\t\t\t ref={(dom) => { this.pwdContainer = dom }}\r\n\t\t\t\t\t\t\tvalue={this.state.password}\r\n\t\t\t\t\t\t\ttype='password'\r\n\t\t\t\t\t\t\tonChange={this.onChangePassword}\r\n\t\t\t\t\t\t\tstyle={{width: '252px'}}\r\n\t\t\t\t\t\t\tonFocus={\r\n\t\t\t\t\t\t\t\t(e) => {\r\n\t\t\t\t\t\t\t\t\tlet input = e.target;\r\n\t\t\t\t\t\t\t\t\tKeyboard.open((v) => {\r\n\t\t\t\t\t\t\t\t\t\tlet value = Keyboard.getNewValue(input, this.state.password, v);\r\n\t\t\t\t\t\t\t\t\t\tthis.setState({\r\n\t\t\t\t\t\t\t\t\t\t\tpassword: value\r\n\t\t\t\t\t\t\t\t\t\t})\r\n\t\t\t\t\t\t\t\t\t})()\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tonKeyUp={e => this.onKeyDown(e, 'password')}\r\n />\r\n </FormItem>\r\n\t\t\t\t</div>\r\n\t\t\t</Modal>\r\n\t\t</div>);\r\n\t}\r\n}\r\n"]}
package/package.json CHANGED
@@ -1,37 +1,37 @@
1
- {
2
- "name": "tplus-portaltouch",
3
- "version": "3.36.1",
4
- "description": "touch protal",
5
- "main": "dist/index.js",
6
- "scripts": {
7
- "start": "node node_modules/mutants-devtools/bin/start",
8
- "build": "rm -rf dist && node node_modules/mutants-devtools/bin/build",
9
- "dev": "node node_modules/mutants-devtools/bin/dev ../touch",
10
- "pub": "npm run build && npm publish --registry https://registry.npmjs.org && cnpm sync tplus-portaltouch",
11
- "test": "set DEBUG=tplus:*,-not_this && mocha"
12
- },
13
- "keywords": [
14
- "tplus",
15
- "pos"
16
- ],
17
- "author": "tplus",
18
- "license": "ISC",
19
- "dependencies": {
20
- "antd": "4.10.3",
21
- "react": "^16.8.6",
22
- "rxjs": "^6.5.4"
23
- },
24
- "devDependencies": {
25
- "babel-eslint": "^8.0.3",
26
- "babel-plugin-import-bee": "^1.1.0",
27
- "eslint": "^4.13.1",
28
- "eslint-plugin-react": "^7.12.4",
29
- "mocha": "^5.2.0",
30
- "mutants-devtools": "^1.0.0",
31
- "mutants-microfx": "^1.0.0",
32
- "tplus-api": "~5.0.1",
33
- "tplus-components": "~3.36.1",
34
- "tplus-components-touch": "~3.36.1",
35
- "tplus-poslogin": "~3.36.1"
36
- }
37
- }
1
+ {
2
+ "name": "tplus-portaltouch",
3
+ "version": "3.36.2",
4
+ "description": "touch protal",
5
+ "main": "dist/index.js",
6
+ "scripts": {
7
+ "start": "node node_modules/mutants-devtools/bin/start",
8
+ "build": "rm -rf dist && node node_modules/mutants-devtools/bin/build",
9
+ "dev": "node node_modules/mutants-devtools/bin/dev ../touch",
10
+ "pub": "npm run build && npm publish --registry https://registry.npmjs.org && cnpm sync tplus-portaltouch",
11
+ "test": "set DEBUG=tplus:*,-not_this && mocha"
12
+ },
13
+ "keywords": [
14
+ "tplus",
15
+ "pos"
16
+ ],
17
+ "author": "tplus",
18
+ "license": "ISC",
19
+ "dependencies": {
20
+ "antd": "4.10.3",
21
+ "react": "^16.8.6",
22
+ "rxjs": "^6.5.4"
23
+ },
24
+ "devDependencies": {
25
+ "babel-eslint": "^8.0.3",
26
+ "babel-plugin-import-bee": "^1.1.0",
27
+ "eslint": "^4.13.1",
28
+ "eslint-plugin-react": "^7.12.4",
29
+ "mocha": "^5.2.0",
30
+ "mutants-devtools": "^1.0.0",
31
+ "mutants-microfx": "^1.0.0",
32
+ "tplus-api": "~5.0.1",
33
+ "tplus-components": "~3.36.1",
34
+ "tplus-components-touch": "~3.36.1",
35
+ "tplus-poslogin": "~3.36.1"
36
+ }
37
+ }