tplus-components-touch 3.38.3 → 3.38.6

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.
@@ -1 +1 @@
1
- {"version":3,"sources":["tplus-components-touch/components/settlement/prototypeTable/index.js"],"names":["PrototypeTableModal","observer","data1","columns","title","dataIndex","key","align","width","render","showText","record","index","props","badge","height","text","position","className","badgeClassName","badgeClassNames","baseNum","includes","style","ellipsis","data2","find","item","ShowFreeItem","obj","splice","prototypeVisible","discount","dataSource","handleprototypeCancel","isHorizontalPad","isSetInventoryFocus","getColumns","discountRetailTotalAount","discountPrototypeTotalAmount","discountTotalAmount","y","Component"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;AACA;;AACA;;AAEA;;AACA;;;;IAGqBA,mB,OADpBC,wB;;;;;;;;;;+BAGYC,K,EAAO;AAAA;;AAChB,UAAIC,UAAU,CACZ;AACEC,eAAO,MADT;AAEEC,mBAAW,eAFb;AAGEC,aAAK,eAHP;AAIEC,eAAO,QAJT;AAKEC,eAAO,GALT;AAMEC,gBAAQ,gBAACC,QAAD,EAAWC,MAAX,EAAmBC,KAAnB,EAA6B;AACnC;AADmC,uBAEJ,OAAKC,KAFD;AAAA,cAE3BC,KAF2B,UAE3BA,KAF2B;AAAA,qCAEpBC,MAFoB;AAAA,cAEpBA,MAFoB,iCAEX,EAFW;AAAA,8BAGoCJ,MAHpC,CAG3BG,KAH2B;AAAA,wDAG6B,EAH7B;AAAA,cAGlBE,IAHkB,iBAGlBA,IAHkB;AAAA,oDAGZC,QAHY;AAAA,cAGZA,QAHY,yCAGD,SAHC;AAAA,oDAGUC,SAHV;AAAA,cAGUA,SAHV,yCAGsB,EAHtB;;AAInC,cAAMC,iBAAiBC,uBAAgBH,QAAhB,CAAvB;AACA,cAAMI,UAAUJ,SAASK,QAAT,CAAkB,QAAlB,IAA8B,EAA9B,GAAmC,CAAnD;AACA,cAAIC,QAAQ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b;AASE,0BAAgB,IATlB;AAUE,+BAAqBC,mBAVvB;AAWE,kBAAQ;AAAA;AAAA,cAAK,WAAU,QAAf;AACN;AAAA;AAAA,gBAAM,WAAU,gCAAhB;AAAA;AAAA,aADM;AAEN;AAAA;AAAA,gBAAM,WAAU,kBAAhB;AAAA;AAAsC;AAAA;AAAA;AAAA;AAAQJ,yBAASM;AAAjB;AAAtC,aAFM;AAGN;AAAA;AAAA,gBAAM,WAAU,kBAAhB;AAAA;AAAqC;AAAA;AAAA,kBAAM,WAAU,WAAhB;AAAA;AAA8BN,yBAASO;AAAvC;AAArC,aAHM;AAIN;AAAA;AAAA,gBAAM,WAAU,kBAAhB;AAAA;AAAsC;AAAA;AAAA,kBAAM,WAAU,WAAhB;AAAA;AAA8BP,yBAASQ;AAAvC;AAAtC,aAJM;AAKR;AAAA;AAAA,gBAAQ,SAAS;AAAA,yBAAMN,uBAAN;AAAA,iBAAjB;AAAA;AAAA;AALQ;AAXV;AAmBE;AAAA;AAAA,YAAK,WAAU,gBAAf;AACE;AACE,oBAAQ,EAAEO,GAAG,GAAL,EADV;AAEE,uBAAU,OAFZ;AAGE,qBAAStC,OAHX;AAIE,wBAAY,KAJd;AAKE,wBAAY8B;AALd;AADF;AAnBF,OADJ;AA+BD;;;EAxL8CS,gB;;kBAA5B1C,mB","file":"index.js","sourcesContent":["import React, { Component } from 'react';\r\nimport { ModalWraper } from 'tplus-components-touch'\r\nimport { observer } from \"mutants-microfx\"\r\nimport { Table, Button } from 'antd';\r\nimport { badgeClassNames } from './utils'\r\nimport './style.less';\r\n\r\n@observer\r\nexport default class PrototypeTableModal extends Component {\r\n\r\n getColumns(data1) {\r\n let columns = [\r\n {\r\n title: '商品名称',\r\n dataIndex: 'InventoryName',\r\n key: 'InventoryName',\r\n align: 'center',\r\n width: 120,\r\n render: (showText, record, index) => {\r\n // return (<span className='unitPrice'>{text}</span>)\r\n const { badge, height = 50 } = this.props;\r\n const { badge: { text, position = 'leftTop', className = '' } = {} } = record;\r\n const badgeClassName = badgeClassNames[position];\r\n const baseNum = position.includes('Bottom') ? 25 : 0;\r\n let style = {}\r\n // if (type === 'bee'){\r\n // style = {\r\n // top : baseNum + (height * index)\r\n // }\r\n // }\r\n return (\r\n <div className='tplus-table-badge'>\r\n <div className={`badge-item ${className} ${badgeClassName}`} style={style}><span>{text}</span></div>\r\n <div className='row-cell-div row-cell-pad' style={{ width: '100%' }}>{showText}</div>\r\n </div>\r\n )\r\n }\r\n },\r\n {\r\n title: '单位',\r\n dataIndex: 'UnitName',\r\n key: 'UnitName',\r\n ellipsis: true,\r\n align: 'center',\r\n width: 40,\r\n },\r\n {\r\n title: '数量',\r\n dataIndex: 'nQuantity',\r\n key: 'nQuantity',\r\n ellipsis: true,\r\n align: 'center',\r\n width: 70,\r\n render: (showText, record, index) => {\r\n return (\r\n <div className='tplus-table-badge'>\r\n <div className='row-cell-div row-cell-pad' style={{ width: '100%' }}>{showText}</div>\r\n </div>\r\n )\r\n }\r\n },\r\n {\r\n title: '零售价',\r\n dataIndex: 'nRetailPrice',\r\n key: 'nRetailPrice',\r\n ellipsis: true,\r\n align: 'center',\r\n width: 70,\r\n render: (showText, record, index) => {\r\n return (\r\n <div className='tplus-table-badge'>\r\n <div className='row-cell-div row-cell-pad' style={{ width: '100%' }}>{showText}</div>\r\n </div>\r\n )\r\n }\r\n },\r\n {\r\n title: '折扣额',\r\n dataIndex: 'Discount',\r\n key: 'Discount',\r\n ellipsis: true,\r\n align: 'center',\r\n width: 70,\r\n render: (text, record, index) => {\r\n return (<span className='unitPrice row-cell-div'>{text}</span>)\r\n }\r\n },\r\n {\r\n title: '单价',\r\n dataIndex: 'nTaxPrice',\r\n key: 'nTaxPrice',\r\n ellipsis: true,\r\n align: 'center',\r\n width: 70,\r\n render: (showText, record, index) => {\r\n return (\r\n <div className='tplus-table-badge'>\r\n <div className='row-cell-div row-cell-pad' style={{ width: '100%' }}>{showText}</div>\r\n </div>\r\n )\r\n }\r\n },\r\n {\r\n title: '金额',\r\n dataIndex: 'nAmount',\r\n key: 'nAmount',\r\n ellipsis: true,\r\n align: 'center',\r\n width: 70,\r\n render: (showText, record, index) => {\r\n return (\r\n <div className='tplus-table-badge'>\r\n <div className='row-cell-div row-cell-pad' style={{ width: '100%' }}>{showText}</div>\r\n </div>\r\n )\r\n }\r\n },\r\n {\r\n title: '折扣额合计',\r\n dataIndex: 'TotalDiscount',\r\n key: 'TotalDiscount',\r\n ellipsis: true,\r\n align: 'center',\r\n width: 80,\r\n render: (showText, record, index) => {\r\n return (\r\n <div className='tplus-table-badge'>\r\n <div className='row-cell-div row-cell-pad' style={{ width: '100%' }}>{showText}</div>\r\n </div>\r\n )\r\n }\r\n },\r\n ]\r\n\r\n let data2 = data1.find((item) => {\r\n return item.ShowFreeItem === true;\r\n })\r\n let obj = {\r\n title: '属性',\r\n dataIndex: 'FreeItem',\r\n key: 'FreeItem',\r\n ellipsis: true,\r\n align: 'center',\r\n width: 70,\r\n render: (showText, record, index) => {\r\n return (\r\n <div className='tplus-table-badge'>\r\n <div className='row-cell-div row-cell-pad' style={{ width: '100%' }}>{showText}</div>\r\n </div>\r\n )\r\n }\r\n }\r\n if (data2) {\r\n columns.splice(1, 0, obj);\r\n }\r\n return columns;\r\n }\r\n\r\n render() {\r\n const {prototypeVisible,discount, dataSource, handleprototypeCancel, isHorizontalPad, isSetInventoryFocus} = this.props;\r\n let columns = this.getColumns(dataSource);\r\n return (\r\n <ModalWraper\r\n wrapClassName={`protoWraper`}\r\n width=\"800px\"\r\n show={prototypeVisible}\r\n maskClosable={false}\r\n onCancel = { () => handleprototypeCancel() }\r\n centered={ !isHorizontalPad ? true : false}\r\n title={\"优惠明细\"}\r\n maskStyle={{'z-index': '1006'}}\r\n destroyOnClose={true}\r\n isSetInventoryFocus={isSetInventoryFocus}\r\n footer={<div className=\"action\">\r\n <span className='prototypeSummary primary-color'>提示:优惠不包含赠品</span>\r\n <span className='prototypeSummary'>优惠前<span>¥{discount.discountRetailTotalAount}</span></span>\r\n <span className='prototypeSummary'>优惠<span className='unitPrice'>¥{discount.discountPrototypeTotalAmount}</span></span>\r\n <span className='prototypeSummary'>优惠后<span className='unitPrice'>¥{discount.discountTotalAmount}</span></span>\r\n <Button onClick={() => handleprototypeCancel()}>关闭</Button>\r\n </div>}\r\n >\r\n <div className='tableContainer'>\r\n <Table \r\n scroll={{ y: 376 }}\r\n className='table'\r\n columns={columns}\r\n pagination={false}\r\n dataSource={dataSource}\r\n />\r\n </div>\r\n </ModalWraper>\r\n );\r\n }\r\n}\r\n"]}
1
+ {"version":3,"sources":["tplus-components-touch/components/settlement/prototypeTable/index.js"],"names":["PrototypeTableModal","observer","data1","columns","title","dataIndex","key","align","width","render","showText","record","index","props","badge","height","text","position","className","badgeClassName","badgeClassNames","baseNum","includes","style","ellipsis","data2","find","item","ShowFreeItem","obj","splice","prototypeVisible","discount","dataSource","handleprototypeCancel","isHorizontalPad","isNotAutoFocus","getColumns","discountRetailTotalAount","discountPrototypeTotalAmount","discountTotalAmount","y","Component"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;AACA;;AACA;;AAEA;;AACA;;;;IAGqBA,mB,OADpBC,wB;;;;;;;;;;+BAGYC,K,EAAO;AAAA;;AAChB,UAAIC,UAAU,CACZ;AACEC,eAAO,MADT;AAEEC,mBAAW,eAFb;AAGEC,aAAK,eAHP;AAIEC,eAAO,QAJT;AAKEC,eAAO,GALT;AAMEC,gBAAQ,gBAACC,QAAD,EAAWC,MAAX,EAAmBC,KAAnB,EAA6B;AACnC;AADmC,uBAEJ,OAAKC,KAFD;AAAA,cAE3BC,KAF2B,UAE3BA,KAF2B;AAAA,qCAEpBC,MAFoB;AAAA,cAEpBA,MAFoB,iCAEX,EAFW;AAAA,8BAGoCJ,MAHpC,CAG3BG,KAH2B;AAAA,wDAG6B,EAH7B;AAAA,cAGlBE,IAHkB,iBAGlBA,IAHkB;AAAA,oDAGZC,QAHY;AAAA,cAGZA,QA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EE,iBAAM,OAFR;AAGE,gBAAMF,gBAHR;AAIE,wBAAc,KAJhB;AAKE,oBAAa;AAAA,mBAAMG,uBAAN;AAAA,WALf;AAME,oBAAW,CAACC,eAAD,GAAmB,IAAnB,GAA0B,KANvC;AAOE,iBAAO,MAPT;AAQE,qBAAW,EAAC,WAAW,MAAZ,EARb;AASE,0BAAgB,IATlB;AAUE,0BAAgBC,cAVlB;AAWE,kBAAQ;AAAA;AAAA,cAAK,WAAU,QAAf;AACN;AAAA;AAAA,gBAAM,WAAU,gCAAhB;AAAA;AAAA,aADM;AAEN;AAAA;AAAA,gBAAM,WAAU,kBAAhB;AAAA;AAAsC;AAAA;AAAA;AAAA;AAAQJ,yBAASM;AAAjB;AAAtC,aAFM;AAGN;AAAA;AAAA,gBAAM,WAAU,kBAAhB;AAAA;AAAqC;AAAA;AAAA,kBAAM,WAAU,WAAhB;AAAA;AAA8BN,yBAASO;AAAvC;AAArC,aAHM;AAIN;AAAA;AAAA,gBAAM,WAAU,kBAAhB;AAAA;AAAsC;AAAA;AAAA,kBAAM,WAAU,WAAhB;AAAA;AAA8BP,yBAASQ;AAAvC;AAAtC,aAJM;AAKR;AAAA;AAAA,gBAAQ,SAAS;AAAA,yBAAMN,uBAAN;AAAA,iBAAjB;AAAA;AAAA;AALQ;AAXV;AAmBE;AAAA;AAAA,YAAK,WAAU,gBAAf;AACE;AACE,oBAAQ,EAAEO,GAAG,GAAL,EADV;AAEE,uBAAU,OAFZ;AAGE,qBAAStC,OAHX;AAIE,wBAAY,KAJd;AAKE,wBAAY8B;AALd;AADF;AAnBF,OADJ;AA+BD;;;EAxL8CS,gB;;kBAA5B1C,mB","file":"index.js","sourcesContent":["import React, { Component } from 'react';\r\nimport { ModalWraper } from 'tplus-components-touch'\r\nimport { observer } from \"mutants-microfx\"\r\nimport { Table, Button } from 'antd';\r\nimport { badgeClassNames } from './utils'\r\nimport './style.less';\r\n\r\n@observer\r\nexport default class PrototypeTableModal extends Component {\r\n\r\n getColumns(data1) {\r\n let columns = [\r\n {\r\n title: '商品名称',\r\n dataIndex: 'InventoryName',\r\n key: 'InventoryName',\r\n align: 'center',\r\n width: 120,\r\n render: (showText, record, index) => {\r\n // return (<span className='unitPrice'>{text}</span>)\r\n const { badge, height = 50 } = this.props;\r\n const { badge: { text, position = 'leftTop', className = '' } = {} } = record;\r\n const badgeClassName = badgeClassNames[position];\r\n const baseNum = position.includes('Bottom') ? 25 : 0;\r\n let style = {}\r\n // if (type === 'bee'){\r\n // style = {\r\n // top : baseNum + (height * index)\r\n // }\r\n // }\r\n return (\r\n <div className='tplus-table-badge'>\r\n <div className={`badge-item ${className} ${badgeClassName}`} style={style}><span>{text}</span></div>\r\n <div className='row-cell-div row-cell-pad' style={{ width: '100%' }}>{showText}</div>\r\n </div>\r\n )\r\n }\r\n },\r\n {\r\n title: '单位',\r\n dataIndex: 'UnitName',\r\n key: 'UnitName',\r\n ellipsis: true,\r\n align: 'center',\r\n width: 40,\r\n },\r\n {\r\n title: '数量',\r\n dataIndex: 'nQuantity',\r\n key: 'nQuantity',\r\n ellipsis: true,\r\n align: 'center',\r\n width: 70,\r\n render: (showText, record, index) => {\r\n return (\r\n <div className='tplus-table-badge'>\r\n <div className='row-cell-div row-cell-pad' style={{ width: '100%' }}>{showText}</div>\r\n </div>\r\n )\r\n }\r\n },\r\n {\r\n title: '零售价',\r\n dataIndex: 'nRetailPrice',\r\n key: 'nRetailPrice',\r\n ellipsis: true,\r\n align: 'center',\r\n width: 70,\r\n render: (showText, record, index) => {\r\n return (\r\n <div className='tplus-table-badge'>\r\n <div className='row-cell-div row-cell-pad' style={{ width: '100%' }}>{showText}</div>\r\n </div>\r\n )\r\n }\r\n },\r\n {\r\n title: '折扣额',\r\n dataIndex: 'Discount',\r\n key: 'Discount',\r\n ellipsis: true,\r\n align: 'center',\r\n width: 70,\r\n render: (text, record, index) => {\r\n return (<span className='unitPrice row-cell-div'>{text}</span>)\r\n }\r\n },\r\n {\r\n title: '单价',\r\n dataIndex: 'nTaxPrice',\r\n key: 'nTaxPrice',\r\n ellipsis: true,\r\n align: 'center',\r\n width: 70,\r\n render: (showText, record, index) => {\r\n return (\r\n <div className='tplus-table-badge'>\r\n <div className='row-cell-div row-cell-pad' style={{ width: '100%' }}>{showText}</div>\r\n </div>\r\n )\r\n }\r\n },\r\n {\r\n title: '金额',\r\n dataIndex: 'nAmount',\r\n key: 'nAmount',\r\n ellipsis: true,\r\n align: 'center',\r\n width: 70,\r\n render: (showText, record, index) => {\r\n return (\r\n <div className='tplus-table-badge'>\r\n <div className='row-cell-div row-cell-pad' style={{ width: '100%' }}>{showText}</div>\r\n </div>\r\n )\r\n }\r\n },\r\n {\r\n title: '折扣额合计',\r\n dataIndex: 'TotalDiscount',\r\n key: 'TotalDiscount',\r\n ellipsis: true,\r\n align: 'center',\r\n width: 80,\r\n render: (showText, record, index) => {\r\n return (\r\n <div className='tplus-table-badge'>\r\n <div className='row-cell-div row-cell-pad' style={{ width: '100%' }}>{showText}</div>\r\n </div>\r\n )\r\n }\r\n },\r\n ]\r\n\r\n let data2 = data1.find((item) => {\r\n return item.ShowFreeItem === true;\r\n })\r\n let obj = {\r\n title: '属性',\r\n dataIndex: 'FreeItem',\r\n key: 'FreeItem',\r\n ellipsis: true,\r\n align: 'center',\r\n width: 70,\r\n render: (showText, record, index) => {\r\n return (\r\n <div className='tplus-table-badge'>\r\n <div className='row-cell-div row-cell-pad' style={{ width: '100%' }}>{showText}</div>\r\n </div>\r\n )\r\n }\r\n }\r\n if (data2) {\r\n columns.splice(1, 0, obj);\r\n }\r\n return columns;\r\n }\r\n\r\n render() {\r\n const {prototypeVisible,discount, dataSource, handleprototypeCancel, isHorizontalPad, isNotAutoFocus} = this.props;\r\n let columns = this.getColumns(dataSource);\r\n return (\r\n <ModalWraper\r\n wrapClassName={`protoWraper`}\r\n width=\"800px\"\r\n show={prototypeVisible}\r\n maskClosable={false}\r\n onCancel = { () => handleprototypeCancel() }\r\n centered={ !isHorizontalPad ? true : false}\r\n title={\"优惠明细\"}\r\n maskStyle={{'z-index': '1006'}}\r\n destroyOnClose={true}\r\n isNotAutoFocus={isNotAutoFocus}\r\n footer={<div className=\"action\">\r\n <span className='prototypeSummary primary-color'>提示:优惠不包含赠品</span>\r\n <span className='prototypeSummary'>优惠前<span>¥{discount.discountRetailTotalAount}</span></span>\r\n <span className='prototypeSummary'>优惠<span className='unitPrice'>¥{discount.discountPrototypeTotalAmount}</span></span>\r\n <span className='prototypeSummary'>优惠后<span className='unitPrice'>¥{discount.discountTotalAmount}</span></span>\r\n <Button onClick={() => handleprototypeCancel()}>关闭</Button>\r\n </div>}\r\n >\r\n <div className='tableContainer'>\r\n <Table \r\n scroll={{ y: 376 }}\r\n className='table'\r\n columns={columns}\r\n pagination={false}\r\n dataSource={dataSource}\r\n />\r\n </div>\r\n </ModalWraper>\r\n );\r\n }\r\n}\r\n"]}
@@ -258,7 +258,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
258
258
  storageValue: '0.00',
259
259
  czkValue: null,
260
260
  isInputMember: false,
261
- selectedRowIndex: 0
261
+ selectedRowIndex: 0,
262
+ isNotAutoFocus: true
262
263
  // 复核结算方式快捷键列表
263
264
  };
264
265
  _this2.compoundHotkeysList = (window.$.operationControl[5] ? window.$.operationControl[5].control || [] : []).map(function (key) {
@@ -370,7 +371,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
370
371
  var count = _this2.handleShowPrototype();
371
372
  if (!isReturn && isAutoShowCouponWhenCash && count > 0) {
372
373
  _this2.setState({
373
- prototypeVisible: true
374
+ prototypeVisible: true,
375
+ isNotAutoFocus: false
374
376
  });
375
377
  } else {
376
378
  _this2.payQuick();
@@ -490,7 +492,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
490
492
  var count = _this2.handleShowPrototype();
491
493
  if (!isReturn && isAutoShowCouponWhenCash && count > 0) {
492
494
  _this2.setState({
493
- prototypeVisible: true
495
+ prototypeVisible: true,
496
+ isNotAutoFocus: false
494
497
  });
495
498
  } else {
496
499
  _this2.payFun();
@@ -2525,6 +2528,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
2525
2528
  null,
2526
2529
  _react2.default.createElement(_numkeyboardPassword2.default, {
2527
2530
  className: 'content',
2531
+ placement: 'rightBottom',
2528
2532
  newType: 'positive',
2529
2533
  bordered: true,
2530
2534
  placeholder: '\u8BF7\u8F93\u51656\u4F4D\u6570\u5B57\u5BC6\u7801',
@@ -2903,6 +2907,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
2903
2907
  className: 'content',
2904
2908
  type: 'text',
2905
2909
  bordered: true,
2910
+ placement: 'rightBottom',
2906
2911
  placeholder: '\u8BF7\u8F93\u5165\u4ED8\u6B3E\u91D1\u989D',
2907
2912
  disabled: paymode.value < 0,
2908
2913
  defaultValue: that.getXianjinPayment(paymode.paymentType, paymode.value),
@@ -3201,6 +3206,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
3201
3206
  _this2.handleShowPrototype();
3202
3207
  _this2.setState({
3203
3208
  prototypeVisible: true,
3209
+ isNotAutoFocus: true,
3204
3210
  isPrototypeClick: true
3205
3211
  });
3206
3212
  };
@@ -3500,7 +3506,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
3500
3506
  storageValue = _state2.storageValue,
3501
3507
  czkValue = _state2.czkValue,
3502
3508
  newPassConfirm = _state2.newPassConfirm,
3503
- newPass = _state2.newPass;
3509
+ newPass = _state2.newPass,
3510
+ isNotAutoFocus = _state2.isNotAutoFocus;
3504
3511
 
3505
3512
  var _ref30 = _mutantsUtil.platform || {},
3506
3513
  isNewRetailBCPos = _ref30.isNewRetailBCPos;
@@ -5237,7 +5244,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
5237
5244
  ),
5238
5245
  _react2.default.createElement(_index3.default, { discount: {
5239
5246
  discountTotalAmount: discountTotalAmount, discountRetailTotalAount: discountRetailTotalAount, discountPrototypeTotalAmount: discountPrototypeTotalAmount
5240
- }, handleprototypeCancel: this.handleprototypeCancel, isHorizontalPad: this.isHorizontalPad, dataSource: dataSource, prototypeVisible: this.state.prototypeVisible, isSetInventoryFocus: false })
5247
+ }, handleprototypeCancel: this.handleprototypeCancel, isHorizontalPad: this.isHorizontalPad, dataSource: dataSource, prototypeVisible: this.state.prototypeVisible, isNotAutoFocus: isNotAutoFocus })
5241
5248
  );
5242
5249
  }
5243
5250
  }]);