diff --git a/build/asset-manifest.json b/build/asset-manifest.json index 86292dd2..bd323f96 100644 --- a/build/asset-manifest.json +++ b/build/asset-manifest.json @@ -3,16 +3,16 @@ "static/js/0.98b3c685.chunk.js": "/static/js/0.98b3c685.chunk.js", "static/js/1.6c7742a4.chunk.js": "/static/js/1.6c7742a4.chunk.js", "static/css/2.74e9175c.chunk.css": "/static/css/2.74e9175c.chunk.css", - "static/js/2.507c1081.chunk.js": "/static/js/2.507c1081.chunk.js", + "static/js/2.b9d5522e.chunk.js": "/static/js/2.b9d5522e.chunk.js", "static/css/3.75be5fa1.chunk.css": "/static/css/3.75be5fa1.chunk.css", "static/js/3.b6ba4435.chunk.js": "/static/js/3.b6ba4435.chunk.js", "main.css": "/static/css/main.b0e33980.chunk.css", "main.js": "/static/js/main.a6a3f833.chunk.js", - "runtime-main.js": "/static/js/runtime-main.054f9725.js", + "runtime-main.js": "/static/js/runtime-main.6ffd0551.js", "static/css/6.8da403e1.chunk.css": "/static/css/6.8da403e1.chunk.css", "static/js/6.02d65a0f.chunk.js": "/static/js/6.02d65a0f.chunk.js", "static/css/7.2600bc01.chunk.css": "/static/css/7.2600bc01.chunk.css", - "static/js/7.e0d64947.chunk.js": "/static/js/7.e0d64947.chunk.js", + "static/js/7.0c8f10fc.chunk.js": "/static/js/7.0c8f10fc.chunk.js", "static/css/8.9a9b6f5c.chunk.css": "/static/css/8.9a9b6f5c.chunk.css", "static/js/8.c0e52fb6.chunk.js": "/static/js/8.c0e52fb6.chunk.js", "static/css/9.4e156c5f.chunk.css": "/static/css/9.4e156c5f.chunk.css", @@ -27,12 +27,12 @@ "static/js/10.8bdf2807.chunk.js.LICENSE.txt": "/static/js/10.8bdf2807.chunk.js.LICENSE.txt", "static/js/3.b6ba4435.chunk.js.LICENSE.txt": "/static/js/3.b6ba4435.chunk.js.LICENSE.txt", "static/js/6.02d65a0f.chunk.js.LICENSE.txt": "/static/js/6.02d65a0f.chunk.js.LICENSE.txt", - "static/js/7.e0d64947.chunk.js.LICENSE.txt": "/static/js/7.e0d64947.chunk.js.LICENSE.txt", + "static/js/7.0c8f10fc.chunk.js.LICENSE.txt": "/static/js/7.0c8f10fc.chunk.js.LICENSE.txt", "static/js/8.c0e52fb6.chunk.js.LICENSE.txt": "/static/js/8.c0e52fb6.chunk.js.LICENSE.txt", "static/js/9.85971b89.chunk.js.LICENSE.txt": "/static/js/9.85971b89.chunk.js.LICENSE.txt" }, "entrypoints": [ - "static/js/runtime-main.054f9725.js", + "static/js/runtime-main.6ffd0551.js", "static/css/8.9a9b6f5c.chunk.css", "static/js/8.c0e52fb6.chunk.js", "static/css/main.b0e33980.chunk.css", diff --git a/build/index.html b/build/index.html index 86d9f5ba..d6924ea4 100644 --- a/build/index.html +++ b/build/index.html @@ -1 +1 @@ -营销管理系统
\ No newline at end of file +营销管理系统
\ No newline at end of file diff --git a/build/static/js/2.507c1081.chunk.js b/build/static/js/2.b9d5522e.chunk.js similarity index 64% rename from build/static/js/2.507c1081.chunk.js rename to build/static/js/2.b9d5522e.chunk.js index c75ec118..1a5e8efb 100644 --- a/build/static/js/2.507c1081.chunk.js +++ b/build/static/js/2.b9d5522e.chunk.js @@ -1 +1 @@ -(this.webpackJsonpmarketingsystem=this.webpackJsonpmarketingsystem||[]).push([[2],{109:function(e,t,i){},240:function(e,t,i){"use strict";i.d(t,"a",(function(){return m}));i(36);var s=i(1),n=i.n(s),r=i(167),l=i(199),o=i(201),c=(i(241),i(242),i(243)),a=i(10),u="/Users/zhangds/web/blue-brother/frontend/src/pages/exchangepage/previewEffect/main.js";class m extends n.a.Component{constructor(e){super(e),this.state={setStyle:{width:"375px",height:"667px",transform:"scale(0.75)"},fontSize:1e4/281.25,activeHeight:667,showType:3,pageStep:1,showPage:1,detailType:3}}onClose(){this.props.onCloseFn()}handleSize(e,t){let i={width:e+"px",height:t+"px",transform:"scale(0.75)"};this.setState({setStyle:i,activeHeight:t})}onpageChange(e){this.setState({showPage:e.target.value,pageStep:e.target.value,detailType:3})}ondetailTypeChange(e){this.setState({detailType:e.target.value,pageStep:e.target.value})}render(){return Object(a.jsxDEV)("div",{className:"edittemplate",children:Object(a.jsxDEV)("div",{children:[Object(a.jsxDEV)("div",{className:"modal model44",style:{background:"rgba(0,0,0,0.8)"}},void 0,!1,{fileName:u,lineNumber:45,columnNumber:11},this),Object(a.jsxDEV)("div",{className:"preview-box",children:[Object(a.jsxDEV)(r.a,{type:"close",className:"preview-top-close",onClick:e=>{this.onClose(e)}},void 0,!1,{fileName:u,lineNumber:49,columnNumber:13},this),Object(a.jsxDEV)("div",{style:{height:"100%"},children:Object(a.jsxDEV)("div",{className:"previewComponent",children:[Object(a.jsxDEV)("div",{className:"previewbody",children:Object(a.jsxDEV)("div",{className:"ctorSize",style:this.state.setStyle,children:Object(a.jsxDEV)(c.a,{data:this.props.previewData,pageType:this.props.showType,fontSize:this.state.fontSize,ref:"preview",step:this.state.pageStep},void 0,!1,{fileName:u,lineNumber:60,columnNumber:21},this)},void 0,!1,{fileName:u,lineNumber:59,columnNumber:19},this)},void 0,!1,{fileName:u,lineNumber:58,columnNumber:17},this),Object(a.jsxDEV)("div",{className:"left-choice",children:[Object(a.jsxDEV)("div",{className:"exchange-page",children:[Object(a.jsxDEV)("p",{className:"preview-setting",children:"\u843d\u5730\u9875\u9884\u89c8:"},void 0,!1,{fileName:u,lineNumber:71,columnNumber:21},this),Object(a.jsxDEV)("section",{className:"screen-size-selector",children:[Object(a.jsxDEV)("div",{className:667==this.state.activeHeight?"size active":"size",onClick:()=>this.handleSize(375,667),children:["\u4e3b\u6d41\u673a\u578b",Object(a.jsxDEV)("span",{children:"375x667"},void 0,!1,{fileName:u,lineNumber:80,columnNumber:29},this)]},void 0,!0,{fileName:u,lineNumber:73,columnNumber:23},this),Object(a.jsxDEV)("div",{className:750==this.state.activeHeight?"size active":"size",onClick:()=>this.handleSize(375,750),children:["\u5168\u9762\u5c4f",Object(a.jsxDEV)("span",{children:"375x750"},void 0,!1,{fileName:u,lineNumber:89,columnNumber:28},this)]},void 0,!0,{fileName:u,lineNumber:82,columnNumber:23},this),Object(a.jsxDEV)("div",{className:812==this.state.activeHeight?"size active":"size",onClick:()=>this.handleSize(375,812),children:["\u5218\u6d77\u5c4f",Object(a.jsxDEV)("span",{children:"375x812"},void 0,!1,{fileName:u,lineNumber:98,columnNumber:28},this)]},void 0,!0,{fileName:u,lineNumber:91,columnNumber:23},this),Object(a.jsxDEV)("div",{className:500==this.state.activeHeight?"size active":"size",onClick:()=>this.handleSize(375,500),children:["\u5c0f\u5c4f\u624b\u673a",Object(a.jsxDEV)("span",{children:"375x500"},void 0,!1,{fileName:u,lineNumber:107,columnNumber:29},this)]},void 0,!0,{fileName:u,lineNumber:100,columnNumber:23},this)]},void 0,!0,{fileName:u,lineNumber:72,columnNumber:21},this)]},void 0,!0,{fileName:u,lineNumber:70,columnNumber:19},this),Object(a.jsxDEV)("div",{className:"exchange-page",children:[Object(a.jsxDEV)("p",{children:"\u9875\u9762\u7c7b\u578b:"},void 0,!1,{fileName:u,lineNumber:112,columnNumber:21},this),Object(a.jsxDEV)(l.a,{onChange:e=>{this.onpageChange(e)},value:this.state.showPage,children:[Object(a.jsxDEV)(o.a,{value:1,children:"\u843d\u5730\u9875"},void 0,!1,{fileName:u,lineNumber:118,columnNumber:23},this),Object(a.jsxDEV)(o.a,{value:2,children:"\u5217\u8868\u9875"},void 0,!1,{fileName:u,lineNumber:119,columnNumber:23},this),Object(a.jsxDEV)(o.a,{value:3,children:"\u8be6\u60c5\u9875"},void 0,!1,{fileName:u,lineNumber:120,columnNumber:23},this)]},void 0,!0,{fileName:u,lineNumber:113,columnNumber:21},this)]},void 0,!0,{fileName:u,lineNumber:111,columnNumber:19},this),3==this.state.showPage?Object(a.jsxDEV)("div",{className:"exchange-page",children:[Object(a.jsxDEV)("p",{children:"\u8be6\u60c5\u9875\u5206\u7c7b:"},void 0,!1,{fileName:u,lineNumber:125,columnNumber:23},this),Object(a.jsxDEV)(l.a,{onChange:e=>{this.ondetailTypeChange(e)},value:this.state.detailType,children:[Object(a.jsxDEV)(o.a,{value:3,children:"\u6743\u2003\u76ca"},void 0,!1,{fileName:u,lineNumber:131,columnNumber:25},this),Object(a.jsxDEV)(o.a,{value:4,children:"\u7acb\u51cf\u91d1"},void 0,!1,{fileName:u,lineNumber:132,columnNumber:25},this),Object(a.jsxDEV)(o.a,{value:5,children:"\u7ea2\u5305"},void 0,!1,{fileName:u,lineNumber:133,columnNumber:25},this)]},void 0,!0,{fileName:u,lineNumber:126,columnNumber:23},this)]},void 0,!0,{fileName:u,lineNumber:124,columnNumber:21},this):null]},void 0,!0,{fileName:u,lineNumber:69,columnNumber:17},this)]},void 0,!0,{fileName:u,lineNumber:57,columnNumber:15},this)},void 0,!1,{fileName:u,lineNumber:56,columnNumber:13},this)]},void 0,!0,{fileName:u,lineNumber:48,columnNumber:11},this)]},void 0,!0,{fileName:u,lineNumber:44,columnNumber:9},this)},void 0,!1,{fileName:u,lineNumber:43,columnNumber:7},this)}}},241:function(e,t,i){},242:function(e,t,i){},243:function(e,t,i){"use strict";i.d(t,"a",(function(){return p}));i(36);var s=i(1),n=i.n(s),r=i(365),l=i(367),o=i(368),c=i(369),a=(i(370),i(371)),u=i(372),m=(i(430),i(10)),d="/Users/zhangds/web/blue-brother/frontend/src/pages/exchangepage/template/preview.js";class p extends n.a.Component{constructor(e){super(e),this.state={layout:"list",type:1,top_url:"",activeshow:!1,detailactiveshow:!1,top_image:"https://lsxd-yunshanfu.oss-cn-hangzhou.aliyuncs.com/common_image/20220105/59ba305520d3229e7fc53d5229bfec0c.png",middle_image:"https://lsxd-yunshanfu.oss-cn-hangzhou.aliyuncs.com/common_image/20221107/2c407b6b702ed2217e22f8df8a7c87e6.png"}}showactiveIcon(e){this.setState({activeshow:!1})}opendescFn(){this.setState({activeshow:!0})}showactivedetail(e){this.setState({detailactiveshow:!1})}opendetaildescFn(){this.setState({detailactiveshow:!0})}componentDidUpdate(){2==this.props.step?document.querySelector(".preview-show .goodstemplate").scrollTop=0:3!=this.props.step||this.state.detailactiveshow?document.querySelector("#previewbg").scrollTop=0:document.querySelector(".preview-show .detailstemplate").scrollTop=0}setHeight(){let e="0px",t="0px",i=this.props.data.product_list;return i.search&&1==i.search.iswitch&&(e="60px"),i.bottomBar&&1==i.bottomBar.iswitch&&(t="50px"),`calc(100% - ${e} - ${t})`}render(){let e=this.props.data,t=e.product_list,i=[];return t&&t.bottomBar&&(i=t.bottomBar.navlist.filter((e=>1==e.iswitch))),Object(m.jsxDEV)("div",{className:"preview-show",children:Object(m.jsxDEV)("div",{id:"previewbg",style:{background:2==this.props.step&&t.backgroundImg&&t.backgroundImg.bgImg?`url('${t.backgroundImg.bgImg}') center center /cover`:t.backgroundImg&&t.backgroundImg.bgColor?t.backgroundImg.bgColor:"#F2F7F8"},children:[1==this.props.step?Object(m.jsxDEV)("div",{className:"landpage",style:{background:e.land.bg_color},children:[Object(m.jsxDEV)("div",{className:"top",children:e.land.top_image?Object(m.jsxDEV)("img",{src:e.land.top_image,id:"top"},void 0,!1,{fileName:d,lineNumber:81,columnNumber:19},this):Object(m.jsxDEV)("img",{src:this.state.top_image,id:"top"},void 0,!1,{fileName:d,lineNumber:83,columnNumber:19},this)},void 0,!1,{fileName:d,lineNumber:79,columnNumber:15},this),Object(m.jsxDEV)("div",{className:"center",id:"preview-center",ref:"middleCenter",style:{fontSize:this.props.fontSize},children:[Object(m.jsxDEV)("img",{src:8==this.props.pageType?e.land.white_image?e.land.white_image:this.state.middle_image:e.land.middle_image?e.land.middle_image:this.state.middle_image,id:"preview-center-img"},void 0,!1,{fileName:d,lineNumber:92,columnNumber:17},this),Object(m.jsxDEV)("div",{className:"dflexajc ipt-user",children:[Object(m.jsxDEV)("div",{style:{color:e.land.font_color},children:["\u8bf7\u8f93\u5165",[1,8].includes(this.props.pageType)?"\u624b\u673a\u53f7":"\u5151\u6362\u7801"]},void 0,!0,{fileName:d,lineNumber:105,columnNumber:19},this),Object(m.jsxDEV)("div",{className:"ipt-code",style:{color:e.land.font_color},children:"\u8bf7\u8f93\u5165\u9a8c\u8bc1\u7801"},void 0,!1,{fileName:d,lineNumber:109,columnNumber:19},this)]},void 0,!0,{fileName:d,lineNumber:104,columnNumber:17},this),[1,8].includes(this.props.pageType)?Object(m.jsxDEV)("img",{src:"https://lsxd-yunshanfu.oss-cn-hangzhou.aliyuncs.com/common_image/20220127/22e5d4c1b1190a0a7bc8db43e1490d67.png",className:"verifycode"},void 0,!1,{fileName:d,lineNumber:114,columnNumber:19},this):Object(m.jsxDEV)("img",{src:"https://lsxd-yunshanfu.oss-cn-hangzhou.aliyuncs.com/common_image/20220105/7dafa511638b084f21966b2c3d269a0e.png",className:"verifycode"},void 0,!1,{fileName:d,lineNumber:121,columnNumber:19},this),Object(m.jsxDEV)("div",{className:"submit"},void 0,!1,{fileName:d,lineNumber:128,columnNumber:17},this)]},void 0,!0,{fileName:d,lineNumber:86,columnNumber:15},this),Object(m.jsxDEV)("div",{className:"bottom",children:[e.land.describe.bg_image?Object(m.jsxDEV)("img",{src:e.land.describe.bg_image},void 0,!1,{fileName:d,lineNumber:132,columnNumber:19},this):null,e.land.describe.content?Object(m.jsxDEV)("div",{className:"textTip_land",dangerouslySetInnerHTML:{__html:e.land.describe.content}},void 0,!1,{fileName:d,lineNumber:135,columnNumber:19},this):null]},void 0,!0,{fileName:d,lineNumber:130,columnNumber:15},this)]},void 0,!0,{fileName:d,lineNumber:78,columnNumber:13},this):null,2==this.props.step?this.state.activeshow&&2==e.product_list.describe.type&&e.product_list.describe.content?Object(m.jsxDEV)(c.a,{backPrepage:e=>this.showactiveIcon(e),goodsdata:e.product_list},void 0,!1,{fileName:d,lineNumber:149,columnNumber:15},this):Object(m.jsxDEV)("div",{className:"goodstemplate_view",children:[t.search&&1==t.search.iswitch?Object(m.jsxDEV)(l.a,{searchConfig:t.search},void 0,!1,{fileName:d,lineNumber:156,columnNumber:19},this):null,Object(m.jsxDEV)("div",{className:"goodstemplate",style:{height:this.setHeight()},children:[Object(m.jsxDEV)("img",{src:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/backprepageBtn.png",className:"preBtn",style:{display:t.search&&1==t.search.iswitch?"none":"block"}},void 0,!1,{fileName:d,lineNumber:159,columnNumber:19},this),e.product_list.top_image?Object(m.jsxDEV)("img",{className:"topbanner",src:e.product_list.top_image},void 0,!1,{fileName:d,lineNumber:177,columnNumber:21},this):Object(m.jsxDEV)("img",{className:"topbanner",src:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/goodstop.png"},void 0,!1,{fileName:d,lineNumber:170,columnNumber:21},this),t.picture&&1==t.picture.iswitch?Object(m.jsxDEV)("img",{src:t.picture.img,alt:"",className:"picture"},void 0,!1,{fileName:d,lineNumber:180,columnNumber:21},this):null,t.title&&1==t.title.iswitch&&1==t.title.comstyle?Object(m.jsxDEV)("div",{className:t.title.textAlign+" content-title "+t.title.fontSize,style:{color:t.title.fontColor,fontWeight:"bold"},children:t.title.text},void 0,!1,{fileName:d,lineNumber:185,columnNumber:21},this):null,t.title&&1==t.title.iswitch&&2==t.title.comstyle?Object(m.jsxDEV)("img",{src:t.title.pic,alt:"",className:"title-pic"},void 0,!1,{fileName:d,lineNumber:202,columnNumber:21},this):null,t.title&&1==t.title.iswitch&&t.title.text||t.picture&&1==t.picture.iswitch&&t.picture.img?Object(m.jsxDEV)("div",{className:"parting-line"},void 0,!1,{fileName:d,lineNumber:211,columnNumber:21},this):null,2==e.product_list.list?Object(m.jsxDEV)("img",{className:"swiperType",src:[1,3].includes(this.props.pageType)?"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/swiperview.png":"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/swiperview_coupon.png"},void 0,!1,{fileName:d,lineNumber:215,columnNumber:21},this):3==e.product_list.list?Object(m.jsxDEV)("img",{className:"swiperType",src:[1,3].includes(this.props.pageType)?"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/matrixview.png":"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/matrixview_coupon.png"},void 0,!1,{fileName:d,lineNumber:224,columnNumber:21},this):Object(m.jsxDEV)("img",{className:"swiperType",src:[1,3].includes(this.props.pageType)?"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/listview.png":"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/listview_coupon.png"},void 0,!1,{fileName:d,lineNumber:233,columnNumber:21},this),2==e.product_list.list?Object(m.jsxDEV)("button",{className:"exchageBtn",style:{color:e.product_list.font_color,background:e.product_list.button_color},children:t.search?"\u8d2d\u4e70":"\u7acb\u5373\u5151\u6362"},void 0,!1,{fileName:d,lineNumber:243,columnNumber:21},this):null,1==e.product_list.describe.type?Object(m.jsxDEV)("img",{src:e.product_list.describe.bg_image,alt:"",className:e.product_list.describe.type&&1==e.product_list.list?"bottomTipView":"bottomTip"},void 0,!1,{fileName:d,lineNumber:254,columnNumber:21},this):3==e.product_list.describe.type?Object(m.jsxDEV)("div",{className:"bottomactiveTip",dangerouslySetInnerHTML:{__html:e.product_list.describe.content}},void 0,!1,{fileName:d,lineNumber:264,columnNumber:21},this):null,2==e.product_list.describe.type?Object(m.jsxDEV)("img",{className:"susactive_tip",onClick:this.opendescFn.bind(this),src:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/acticeTextTip.png"},void 0,!1,{fileName:d,lineNumber:272,columnNumber:21},this):null]},void 0,!0,{fileName:d,lineNumber:158,columnNumber:17},this),t.bottomBar&&1==t.bottomBar.iswitch&&i.length>1?Object(m.jsxDEV)(r.a,{bottomBarConfig:t.bottomBar},void 0,!1,{fileName:d,lineNumber:284,columnNumber:19},this):null]},void 0,!0,{fileName:d,lineNumber:154,columnNumber:15},this):null,3==this.props.step?this.state.detailactiveshow&&2==e.product_detail.describe.type&&e.product_detail.describe.content?Object(m.jsxDEV)(c.a,{backPrepage:e=>this.showactivedetail(e),goodsdata:e.product_detail},void 0,!1,{fileName:d,lineNumber:294,columnNumber:15},this):Object(m.jsxDEV)(o.a,{opendesc:e=>this.opendetaildescFn(e),detaildata:e.product_detail,templateType:this.props.pageType,topImgshow:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/goodsbigPic.png",iptImgshow:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/viewIpt.png"},void 0,!1,{fileName:d,lineNumber:299,columnNumber:15},this):null,4==this.props.step&&Object(m.jsxDEV)(u.a,{templateType:this.props.pageType,detaildata:e.product_detail},void 0,!1,{fileName:d,lineNumber:314,columnNumber:13},this),5==this.props.step&&Object(m.jsxDEV)(a.a,{},void 0,!1,{fileName:d,lineNumber:320,columnNumber:36},this)]},void 0,!0,{fileName:d,lineNumber:66,columnNumber:9},this)},void 0,!1,{fileName:d,lineNumber:65,columnNumber:7},this)}}},365:function(e,t,i){"use strict";i.d(t,"a",(function(){return o}));i(36);var s=i(1),n=i.n(s),r=(i(366),i(10)),l="/Users/zhangds/web/blue-brother/frontend/src/pages/exchangepage/edittemplate/couponCard/couponViewConfig/bottomBar.js";class o extends n.a.Component{constructor(e){super(e),this.state={navList:[{id:1,iswitch:1,name:"index",pic:{show:"",selectShow:""},text:"\u9996\u9875"},{id:2,iswitch:1,name:"order",pic:{show:"",selectShow:""},text:"\u8ba2\u5355"},{id:3,iswitch:1,name:"coupon",pic:{show:"",selectShow:""},text:"\u6211\u7684\u5238"}],active:0}}componentWillReceiveProps(e){let t=e.bottomBarConfig.navlist.filter((e=>e.iswitch));this.setState({navList:t})}clickIcon(e,t){this.setState({active:t})}componentDidMount(){let e=JSON.parse(sessionStorage.getItem("editorConfig")),{navlist:t,defaultText:i,selectText:s,background:n,iswitch:r}=this.props.bottomBarConfig?this.props.bottomBarConfig:e.coupon.product_list.bottomBar;this.setState({defaultText:i,selectText:s,background:n,iswitch:r});let l=t.filter((e=>e.iswitch));this.setState({navList:l})}render(){let e=this.state.active;return Object(r.jsxDEV)("ul",{className:"bottomBar-view",style:{background:this.props.bottomBarConfig.background?`url('${this.props.bottomBarConfig.background}') center center /cover`:"#f9f9f9"},children:this.state.navList.map(((t,i)=>Object(r.jsxDEV)("li",{onClick:e=>this.clickIcon(e,i),children:[Object(r.jsxDEV)("img",{src:e==i?t.pic.selectShow:t.pic.show,alt:""},void 0,!1,{fileName:l,lineNumber:74,columnNumber:15},this),Object(r.jsxDEV)("span",{style:{color:e==i?this.props.bottomBarConfig.selectText:this.props.bottomBarConfig.defaultText},children:t.text},void 0,!1,{fileName:l,lineNumber:78,columnNumber:15},this)]},t.id,!0,{fileName:l,lineNumber:73,columnNumber:13},this)))},void 0,!1,{fileName:l,lineNumber:64,columnNumber:7},this)}}},366:function(e,t,i){},367:function(e,t,i){"use strict";i.d(t,"a",(function(){return o}));var s=i(1),n=i.n(s),r=(i(366),i(36),i(10)),l="/Users/zhangds/web/blue-brother/frontend/src/pages/exchangepage/edittemplate/couponCard/couponViewConfig/searchBar.js";class o extends n.a.Component{constructor(e){super(e)}render(){let e=this.props.searchConfig;return Object(r.jsxDEV)("div",{className:"searchBar-container",style:{background:e.bgColor},children:[Object(r.jsxDEV)("img",{src:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/backprepageBtn.png",className:"preBtn"},void 0,!1,{fileName:l,lineNumber:14,columnNumber:9},this),Object(r.jsxDEV)("div",{className:e.shape+" searchBar "+e.textAlign,style:{background:e.borderColor,color:e.fontColor},children:[Object(r.jsxDEV)("i",{className:"marketing marketing-sousuo"},void 0,!1,{fileName:l,lineNumber:28,columnNumber:11},this),Object(r.jsxDEV)("div",{className:"placeholder",children:e.placeholder},void 0,!1,{fileName:l,lineNumber:29,columnNumber:11},this)]},void 0,!0,{fileName:l,lineNumber:20,columnNumber:9},this)]},void 0,!0,{fileName:l,lineNumber:11,columnNumber:7},this)}}},368:function(e,t,i){"use strict";i.d(t,"a",(function(){return o}));i(36);var s=i(1),n=i.n(s),r=(i(109),i(85),i(10)),l="/Users/zhangds/web/blue-brother/frontend/src/pages/exchangepage/edittemplate/detailstemplate.js";class o extends n.a.Component{constructor(e){super(e)}opendescFn(){this.props.opendesc(!0)}render(){let e=this.props.detaildata,{topImgshow:t,iptImgshow:i}=this.props;return Object(r.jsxDEV)("div",{className:"detailstemplate_Xcenter",children:[Object(r.jsxDEV)("div",{className:"detailstemplate",style:{paddingBottom:"80px",boxSizing:"border-box"},children:[Object(r.jsxDEV)("img",{src:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/backprepageBtn.png",className:"preBtn"},void 0,!1,{fileName:l,lineNumber:18,columnNumber:11},this),Object(r.jsxDEV)("img",{className:"topBanner",src:t||"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/detailtop.png"},void 0,!1,{fileName:l,lineNumber:24,columnNumber:11},this),Object(r.jsxDEV)("p",{className:"splitLine"},void 0,!1,{fileName:l,lineNumber:32,columnNumber:11},this),Object(r.jsxDEV)("img",{className:"iptbg",src:i||"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/detailipt.png"},void 0,!1,{fileName:l,lineNumber:33,columnNumber:11},this),Object(r.jsxDEV)("p",{className:"splitLine"},void 0,!1,{fileName:l,lineNumber:41,columnNumber:11},this),e.describe.bg_image&&1==e.describe.type?Object(r.jsxDEV)("img",{className:"detail_bottomImg",src:e.describe.bg_image},void 0,!1,{fileName:l,lineNumber:43,columnNumber:13},this):3==e.describe.type?Object(r.jsxDEV)("div",{className:"bottomactiveTip",dangerouslySetInnerHTML:{__html:e.describe.content}},void 0,!1,{fileName:l,lineNumber:45,columnNumber:13},this):null,2==e.describe.type?Object(r.jsxDEV)("img",{className:"susactive_tip",onClick:this.opendescFn.bind(this),src:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/acticeTextTip.png"},void 0,!1,{fileName:l,lineNumber:53,columnNumber:13},this):null]},void 0,!0,{fileName:l,lineNumber:17,columnNumber:9},this),[1,3].includes(this.props.templateType)?Object(r.jsxDEV)("button",{className:"exchageBtn",style:{background:e.button_color,color:e.font_color},children:"\u7acb\u5373\u5151\u6362"},void 0,!1,{fileName:l,lineNumber:63,columnNumber:11},this):Object(r.jsxDEV)("div",{className:"dflexaj payBtn-view",children:[Object(r.jsxDEV)("div",{className:"coupon-price",children:[Object(r.jsxDEV)("p",{children:["\uffe5",Object(r.jsxDEV)("span",{children:"0.00"},void 0,!1,{fileName:l,lineNumber:76,columnNumber:18},this)]},void 0,!0,{fileName:l,lineNumber:75,columnNumber:15},this),Object(r.jsxDEV)("p",{children:"\u5171\u7701\uffe50.01"},void 0,!1,{fileName:l,lineNumber:78,columnNumber:15},this)]},void 0,!0,{fileName:l,lineNumber:74,columnNumber:13},this),Object(r.jsxDEV)("button",{className:"payBtn",style:{background:e.button_color,color:e.font_color},children:"\u7acb\u5373\u652f\u4ed8"},void 0,!1,{fileName:l,lineNumber:80,columnNumber:13},this)]},void 0,!0,{fileName:l,lineNumber:73,columnNumber:11},this)]},void 0,!0,{fileName:l,lineNumber:16,columnNumber:7},this)}}},369:function(e,t,i){"use strict";i.d(t,"a",(function(){return o}));var s=i(1),n=i.n(s),r=(i(109),i(10)),l="/Users/zhangds/web/blue-brother/frontend/src/pages/exchangepage/edittemplate/goodsdesc.js";class o extends n.a.Component{constructor(e){super(e)}backPre(){this.props.backPrepage(0)}render(){return Object(r.jsxDEV)("div",{className:"editor-main goodstemplate desc-goods",children:[Object(r.jsxDEV)("p",{children:"\u6d3b\u52a8\u89c4\u5219"},void 0,!1,{fileName:l,lineNumber:13,columnNumber:9},this),Object(r.jsxDEV)("img",{onClick:this.backPre.bind(this),src:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/backprepageBtn.png",className:"preBtn"},void 0,!1,{fileName:l,lineNumber:14,columnNumber:9},this),Object(r.jsxDEV)("div",{className:"descript",dangerouslySetInnerHTML:{__html:this.props.goodsdata.describe.content}},void 0,!1,{fileName:l,lineNumber:21,columnNumber:9},this)]},void 0,!0,{fileName:l,lineNumber:12,columnNumber:7},this)}}},370:function(e,t,i){"use strict";i.d(t,"a",(function(){return m}));i(36);var s=i(69),n=i(1),r=i.n(n),l=i(499),o=i(365),c=i(367),a=(i(109),i(85),i(10)),u="/Users/zhangds/web/blue-brother/frontend/src/pages/exchangepage/edittemplate/goodstemplate.js";class m extends r.a.Component{constructor(e){super(e),this.state={clientY:0,selectDom:"",icon:"",comName:""}}opendescFn(){this.props.opendesc(!0)}customComponent(e,t,i,s){let n=this.refs[t].getBoundingClientRect().top;this.setState({clientY:n-125,selectDom:t,icon:i,comName:s}),"searchBar"==t&&this.setState({clientY:0})}deleteFn(){let e=this.state.selectDom;l.a.confirm({title:"\u786e\u8ba4\u4fe1\u606f",content:Object(a.jsxDEV)("p",{children:"\u786e\u8ba4\u5220\u9664\u8be5\u6a21\u5757\uff1f"},void 0,!1,{fileName:u,lineNumber:40,columnNumber:16},this),onConfirm:()=>{this.setState({selectDom:""}),s.a.emit("goodListPage"),s.a.emit("componentLib",{attr:e,value:0})},onCancel:()=>{},parentComponent:this})}setHeight(){let e=0,t=0,i=this.props.goodsdata;return i.search&&1==i.search.iswitch&&(e=60),i.bottomBar&&1==i.bottomBar.iswitch&&(t=50),653-e-t+"px"}render(){let e=this.props.goodsdata,t=[];return e.bottomBar&&(t=e.bottomBar.navlist.filter((e=>1==e.iswitch))),Object(a.jsxDEV)("div",{className:"goodstemplate_Xcenter",children:[e.search&&1==e.search.iswitch?Object(a.jsxDEV)("div",{onClick:e=>this.customComponent(e,"search","marketing-sousuolan-","\u641c\u7d22\u680f"),className:"search"==this.state.selectDom?"selectBorder":"",ref:"search",children:Object(a.jsxDEV)(c.a,{searchConfig:e.search},void 0,!1,{fileName:u,lineNumber:76,columnNumber:13},this)},void 0,!1,{fileName:u,lineNumber:71,columnNumber:11},this):null,Object(a.jsxDEV)("div",{className:"goodstemplate",style:{background:e.backgroundImg&&e.backgroundImg.bgImg?`url('${e.backgroundImg.bgImg}') center center /cover`:e.backgroundImg&&e.backgroundImg.bgColor?e.backgroundImg.bgColor:"#f1f5f7",height:this.setHeight()},children:[Object(a.jsxDEV)("img",{src:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/backprepageBtn.png",className:"preBtn",style:{display:e.search&&1==e.search.iswitch?"none":"block"}},void 0,!1,{fileName:u,lineNumber:91,columnNumber:11},this),e.top_image?Object(a.jsxDEV)("img",{className:"topbanner",src:e.top_image},void 0,!1,{fileName:u,lineNumber:106,columnNumber:13},this):Object(a.jsxDEV)("img",{className:"topbanner",src:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/goodstop.png"},void 0,!1,{fileName:u,lineNumber:101,columnNumber:13},this),e.picture&&1==e.picture.iswitch?Object(a.jsxDEV)("div",{onClick:e=>this.customComponent(e,"picture","marketing-tupian","\u56fe\u7247"),ref:"picture",className:"picture"==this.state.selectDom?"selectBorder":"",children:Object(a.jsxDEV)("img",{src:e.picture.img,alt:"",className:"picture"},void 0,!1,{fileName:u,lineNumber:114,columnNumber:15},this)},void 0,!1,{fileName:u,lineNumber:109,columnNumber:13},this):null,e.title&&1==e.title.iswitch&&1==e.title.comstyle?Object(a.jsxDEV)("div",{onClick:e=>this.customComponent(e,"title","marketing-fuwenbenkuang","\u6807\u9898"),ref:"title",className:"title"==this.state.selectDom?"selectBorder":"",children:Object(a.jsxDEV)("div",{className:e.title.textAlign+" content-title "+e.title.fontSize,style:{color:e.title.fontColor,fontWeight:"bold"},children:e.title.text},void 0,!1,{fileName:u,lineNumber:125,columnNumber:15},this)},void 0,!1,{fileName:u,lineNumber:120,columnNumber:13},this):null,e.title&&1==e.title.iswitch&&2==e.title.comstyle?Object(a.jsxDEV)("div",{onClick:e=>this.customComponent(e,"title","marketing-fuwenbenkuang","\u6807\u9898"),ref:"title",className:"title"==this.state.selectDom?"selectBorder":"",children:Object(a.jsxDEV)("img",{src:e.title.pic,alt:"",className:"title-pic"},void 0,!1,{fileName:u,lineNumber:146,columnNumber:15},this)},void 0,!1,{fileName:u,lineNumber:141,columnNumber:13},this):null,e.title&&1==e.title.iswitch&&e.title.text||e.picture&&1==e.picture.iswitch&&e.picture.img?Object(a.jsxDEV)("div",{className:"parting-line"},void 0,!1,{fileName:u,lineNumber:151,columnNumber:13},this):null,2==e.list?Object(a.jsxDEV)("img",{className:"goodsPic",src:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/swiper.png"},void 0,!1,{fileName:u,lineNumber:154,columnNumber:13},this):3==e.list?Object(a.jsxDEV)("img",{className:"goodsPicMatrax",src:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/matrix.png"},void 0,!1,{fileName:u,lineNumber:159,columnNumber:13},this):Object(a.jsxDEV)("img",{className:"goodsPicMatrax",src:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/listnew.png"},void 0,!1,{fileName:u,lineNumber:164,columnNumber:13},this),2==e.list?Object(a.jsxDEV)("button",{className:"exchageBtn",style:{color:e.font_color,background:e.button_color},children:e.search?"\u8d2d\u4e70":"\u7acb\u5373\u5151\u6362"},void 0,!1,{fileName:u,lineNumber:170,columnNumber:13},this):null,!e.search&&Object(a.jsxDEV)("ul",{className:"redemptionCode-tabs",children:[Object(a.jsxDEV)("li",{children:[Object(a.jsxDEV)("img",{src:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/coupon/bottombar/home.png",alt:!0},void 0,!1,{fileName:u,lineNumber:183,columnNumber:17},this),Object(a.jsxDEV)("p",{children:"\u9996\u9875"},void 0,!1,{fileName:u,lineNumber:187,columnNumber:17},this)]},void 0,!0,{fileName:u,lineNumber:182,columnNumber:15},this),Object(a.jsxDEV)("li",{children:[Object(a.jsxDEV)("img",{src:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/coupon/bottombar/order.png",alt:!0},void 0,!1,{fileName:u,lineNumber:190,columnNumber:17},this),Object(a.jsxDEV)("p",{children:"\u8ba2\u5355"},void 0,!1,{fileName:u,lineNumber:194,columnNumber:17},this)]},void 0,!0,{fileName:u,lineNumber:189,columnNumber:15},this)]},void 0,!0,{fileName:u,lineNumber:181,columnNumber:13},this),1==e.describe.type?Object(a.jsxDEV)("img",{src:e.describe.bg_image,alt:"",className:1==e.list&&e.describe.bg_image?"bottomTip bottomTipview":"bottomTip"},void 0,!1,{fileName:u,lineNumber:199,columnNumber:13},this):3==e.describe.type?Object(a.jsxDEV)("div",{className:"bottomactiveTip",dangerouslySetInnerHTML:{__html:e.describe.content}},void 0,!1,{fileName:u,lineNumber:209,columnNumber:13},this):null,2==e.describe.type?Object(a.jsxDEV)("img",{className:"susactive_tip",onClick:this.opendescFn.bind(this),src:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/acticeTextTip.png"},void 0,!1,{fileName:u,lineNumber:217,columnNumber:13},this):null]},void 0,!0,{fileName:u,lineNumber:79,columnNumber:9},this),e.bottomBar&&1==e.bottomBar.iswitch?Object(a.jsxDEV)("div",{ref:"bottomBar",onClick:e=>this.customComponent(e,"bottomBar","marketing-list","\u5e95\u90e8\u680f"),className:"bottomBar"==this.state.selectDom?"selectBottomBorder":"",children:Object(a.jsxDEV)(o.a,{bottomBarConfig:e.bottomBar},void 0,!1,{fileName:u,lineNumber:232,columnNumber:13},this)},void 0,!1,{fileName:u,lineNumber:227,columnNumber:11},this):null,this.state.selectDom?Object(a.jsxDEV)("div",{className:"delete-component",style:{top:this.state.clientY},children:[Object(a.jsxDEV)("span",{children:this.state.comName},void 0,!1,{fileName:u,lineNumber:237,columnNumber:13},this),Object(a.jsxDEV)("b",{className:"split",children:"|"},void 0,!1,{fileName:u,lineNumber:238,columnNumber:13},this),Object(a.jsxDEV)("span",{className:"del-color",onClick:this.deleteFn.bind(this),children:"\u5220\u9664"},void 0,!1,{fileName:u,lineNumber:239,columnNumber:13},this)]},void 0,!0,{fileName:u,lineNumber:236,columnNumber:11},this):null]},void 0,!0,{fileName:u,lineNumber:69,columnNumber:7},this)}}},371:function(e,t,i){"use strict";i.d(t,"a",(function(){return r}));i(36),i(109),i(85);var s=i(10),n="/Users/zhangds/web/blue-brother/frontend/src/pages/exchangepage/edittemplate/redPackets.jsx";function r(){return Object(s.jsxDEV)("div",{className:"editor-main goodstemplate details-reduce",children:[Object(s.jsxDEV)("img",{src:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/backprepageBtn.png",className:"preBtn"},void 0,!1,{fileName:n,lineNumber:7,columnNumber:7},this),Object(s.jsxDEV)("img",{src:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/redPacktes/redPackets.png",alt:"",className:"reduce-pic"},void 0,!1,{fileName:n,lineNumber:11,columnNumber:7},this)]},void 0,!0,{fileName:n,lineNumber:6,columnNumber:5},this)}},372:function(e,t,i){"use strict";i.d(t,"a",(function(){return o}));i(36);var s=i(1),n=i.n(s),r=(i(109),i(85),i(10)),l="/Users/zhangds/web/blue-brother/frontend/src/pages/exchangepage/edittemplate/reduce.js";class o extends n.a.Component{constructor(e){super(e),this.state={data:{}}}opendescFn(){this.props.opendesc(!0)}render(){return Object(r.jsxDEV)("div",{className:"editor-main goodstemplate details-reduce",children:[Object(r.jsxDEV)("img",{src:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/backprepageBtn.png",className:"preBtn"},void 0,!1,{fileName:l,lineNumber:18,columnNumber:9},this),[4,8].includes(this.props.templateType)?Object(r.jsxDEV)("div",{className:"coupon-reduce",children:[Object(r.jsxDEV)("img",{src:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/coupon/reduce_coupon.png?v=1",alt:"",className:"reduce-pic"},void 0,!1,{fileName:l,lineNumber:26,columnNumber:13},this),Object(r.jsxDEV)("div",{className:"dflexaj payBtn-view",children:[Object(r.jsxDEV)("div",{className:"coupon-price",children:[Object(r.jsxDEV)("p",{children:["\uffe5",Object(r.jsxDEV)("span",{children:"0.00"},void 0,!1,{fileName:l,lineNumber:34,columnNumber:20},this)]},void 0,!0,{fileName:l,lineNumber:33,columnNumber:17},this),Object(r.jsxDEV)("p",{children:"\u5171\u7701\uffe50.01"},void 0,!1,{fileName:l,lineNumber:36,columnNumber:17},this)]},void 0,!0,{fileName:l,lineNumber:32,columnNumber:15},this),Object(r.jsxDEV)("button",{className:"payBtn",style:{background:this.props.detaildata.reduce.button_color,color:this.props.detaildata.reduce.font_color},children:"\u7acb\u5373\u652f\u4ed8"},void 0,!1,{fileName:l,lineNumber:38,columnNumber:15},this)]},void 0,!0,{fileName:l,lineNumber:31,columnNumber:13},this)]},void 0,!0,{fileName:l,lineNumber:25,columnNumber:11},this):Object(r.jsxDEV)("img",{src:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/coupon/reduce_pic.png?v=2",alt:"",className:"reduce-pic"},void 0,!1,{fileName:l,lineNumber:50,columnNumber:11},this)]},void 0,!0,{fileName:l,lineNumber:17,columnNumber:7},this)}}},417:function(e,t,i){},418:function(e,t,i){},421:function(e,t,i){},430:function(e,t,i){},59:function(e,t,i){"use strict";i.d(t,"Tb",(function(){return a})),i.d(t,"sb",(function(){return m})),i.d(t,"gb",(function(){return d})),i.d(t,"ub",(function(){return p})),i.d(t,"rb",(function(){return h})),i.d(t,"d",(function(){return b})),i.d(t,"bb",(function(){return N})),i.d(t,"ad",(function(){return g})),i.d(t,"c",(function(){return f})),i.d(t,"Ec",(function(){return v})),i.d(t,"Zc",(function(){return j})),i.d(t,"fb",(function(){return x})),i.d(t,"dc",(function(){return y})),i.d(t,"m",(function(){return O})),i.d(t,"A",(function(){return E})),i.d(t,"U",(function(){return D})),i.d(t,"T",(function(){return V})),i.d(t,"xc",(function(){return w})),i.d(t,"p",(function(){return k})),i.d(t,"wc",(function(){return C})),i.d(t,"R",(function(){return S})),i.d(t,"q",(function(){return _})),i.d(t,"eb",(function(){return B})),i.d(t,"tb",(function(){return T})),i.d(t,"cd",(function(){return I})),i.d(t,"nb",(function(){return z})),i.d(t,"lb",(function(){return M})),i.d(t,"mb",(function(){return F})),i.d(t,"Dc",(function(){return R})),i.d(t,"ob",(function(){return q})),i.d(t,"Cc",(function(){return P})),i.d(t,"wb",(function(){return $})),i.d(t,"db",(function(){return L})),i.d(t,"Ob",(function(){return A})),i.d(t,"cb",(function(){return H})),i.d(t,"Nb",(function(){return U})),i.d(t,"qb",(function(){return J})),i.d(t,"V",(function(){return W})),i.d(t,"w",(function(){return K})),i.d(t,"Hc",(function(){return Y})),i.d(t,"jc",(function(){return X})),i.d(t,"vb",(function(){return Q})),i.d(t,"Fc",(function(){return G})),i.d(t,"Gc",(function(){return Z})),i.d(t,"M",(function(){return ee})),i.d(t,"sc",(function(){return te})),i.d(t,"o",(function(){return ie})),i.d(t,"Ac",(function(){return se})),i.d(t,"Y",(function(){return ne})),i.d(t,"Z",(function(){return re})),i.d(t,"xb",(function(){return le})),i.d(t,"ec",(function(){return oe})),i.d(t,"uc",(function(){return ce})),i.d(t,"Qb",(function(){return ae})),i.d(t,"fc",(function(){return ue})),i.d(t,"vc",(function(){return me})),i.d(t,"Cb",(function(){return de})),i.d(t,"Rb",(function(){return pe})),i.d(t,"jb",(function(){return he})),i.d(t,"tc",(function(){return be})),i.d(t,"Kc",(function(){return Ne})),i.d(t,"yb",(function(){return ge})),i.d(t,"kb",(function(){return fe})),i.d(t,"x",(function(){return ve})),i.d(t,"qc",(function(){return je})),i.d(t,"zc",(function(){return xe})),i.d(t,"gc",(function(){return ye})),i.d(t,"r",(function(){return Oe})),i.d(t,"hc",(function(){return Ee})),i.d(t,"kc",(function(){return De})),i.d(t,"t",(function(){return Ve})),i.d(t,"lc",(function(){return we})),i.d(t,"mc",(function(){return ke})),i.d(t,"u",(function(){return Ce})),i.d(t,"nc",(function(){return Se})),i.d(t,"N",(function(){return _e})),i.d(t,"ic",(function(){return Be})),i.d(t,"Lc",(function(){return Te})),i.d(t,"v",(function(){return Ie})),i.d(t,"rc",(function(){return ze})),i.d(t,"n",(function(){return Me})),i.d(t,"S",(function(){return Fe})),i.d(t,"Ib",(function(){return Re})),i.d(t,"pc",(function(){return qe})),i.d(t,"Gb",(function(){return Pe})),i.d(t,"z",(function(){return $e})),i.d(t,"Bc",(function(){return Le})),i.d(t,"Fb",(function(){return Ae})),i.d(t,"f",(function(){return He})),i.d(t,"Jc",(function(){return Ue})),i.d(t,"Eb",(function(){return Je})),i.d(t,"Db",(function(){return We})),i.d(t,"Ic",(function(){return Ke})),i.d(t,"e",(function(){return Ye})),i.d(t,"y",(function(){return Xe})),i.d(t,"Hb",(function(){return Qe})),i.d(t,"Pb",(function(){return Ge})),i.d(t,"g",(function(){return Ze})),i.d(t,"P",(function(){return et})),i.d(t,"bd",(function(){return tt})),i.d(t,"Q",(function(){return it})),i.d(t,"Vb",(function(){return st})),i.d(t,"Yb",(function(){return nt})),i.d(t,"Xb",(function(){return rt})),i.d(t,"ac",(function(){return lt})),i.d(t,"hb",(function(){return ot})),i.d(t,"L",(function(){return ct})),i.d(t,"cc",(function(){return at})),i.d(t,"Zb",(function(){return ut})),i.d(t,"oc",(function(){return mt})),i.d(t,"ab",(function(){return dt})),i.d(t,"Jb",(function(){return pt})),i.d(t,"b",(function(){return ht})),i.d(t,"ib",(function(){return bt})),i.d(t,"h",(function(){return Nt})),i.d(t,"k",(function(){return gt})),i.d(t,"j",(function(){return ft})),i.d(t,"i",(function(){return vt})),i.d(t,"J",(function(){return jt})),i.d(t,"Lb",(function(){return xt})),i.d(t,"Nc",(function(){return yt})),i.d(t,"Oc",(function(){return Ot})),i.d(t,"a",(function(){return Et})),i.d(t,"H",(function(){return Dt})),i.d(t,"X",(function(){return Vt})),i.d(t,"s",(function(){return wt})),i.d(t,"yc",(function(){return kt})),i.d(t,"W",(function(){return Ct})),i.d(t,"E",(function(){return St})),i.d(t,"B",(function(){return _t})),i.d(t,"C",(function(){return Bt})),i.d(t,"F",(function(){return Tt})),i.d(t,"Qc",(function(){return It})),i.d(t,"Ub",(function(){return zt})),i.d(t,"Mb",(function(){return Mt})),i.d(t,"I",(function(){return Ft})),i.d(t,"D",(function(){return Rt})),i.d(t,"G",(function(){return qt})),i.d(t,"Uc",(function(){return Pt})),i.d(t,"Sc",(function(){return $t})),i.d(t,"Tc",(function(){return Lt})),i.d(t,"Wb",(function(){return At})),i.d(t,"Rc",(function(){return Ht})),i.d(t,"Xc",(function(){return Ut})),i.d(t,"K",(function(){return Jt})),i.d(t,"Yc",(function(){return Wt})),i.d(t,"Vc",(function(){return Kt})),i.d(t,"Wc",(function(){return Yt})),i.d(t,"Mc",(function(){return Xt})),i.d(t,"Pc",(function(){return Qt})),i.d(t,"Bb",(function(){return Gt})),i.d(t,"Sb",(function(){return Zt})),i.d(t,"dd",(function(){return ei})),i.d(t,"bc",(function(){return ti})),i.d(t,"Ab",(function(){return ii})),i.d(t,"pb",(function(){return si})),i.d(t,"zb",(function(){return ni})),i.d(t,"O",(function(){return ri})),i.d(t,"Kb",(function(){return li})),i.d(t,"l",(function(){return oi}));var s=i(390);let n="http://pre.marketapi.1688sup.com",r="https://ewm.83323.cn";const l=(e,t,i,s)=>{let n={method:e,headers:{Authorization:`Bearer ${sessionStorage.getItem("authorization")}`},body:i};return fetch(t,n).then((e=>{if(200==e.status)return e.json();u(e)})).then((e=>e)).catch((e=>{}))},o=(e,t,i,s)=>{var n={responseType:"blob",headers:{Authorization:`Bearer ${sessionStorage.getItem("authorization")}`}};if("get"==e&&i){let e=[];Object.keys(i).forEach((t=>e.push(t+"="+i[t]))),-1===t.search(/\?/)?t+="?"+e.join("&"):t+="&"+e.join("&")}return fetch(t,n).then((e=>{if(200==e.status)return e.blob();u(e)})).then((e=>e)).catch((e=>{}))},c=(e,t,i,s)=>{const n=`Bearer ${sessionStorage.getItem("authorization")}`;var r=null;if("get"==e&&(r={headers:{Authorization:n}},i)){let e=[];Object.keys(i).forEach((t=>e.push(t+"="+i[t]))),-1===t.search(/\?/)?t+="?"+e.join("&"):t+="&"+e.join("&")}if("unified"===e){r={method:"get",headers:{Authorization:`Bearer ${sessionStorage.getItem("unified-token")}`}}}return"login"==e&&(r={method:"post",body:JSON.stringify(i),headers:new Headers({"Content-Type":"application/json"})}),"post"!=e&&"put"!=e&&"delete"!=e||(r={method:e,body:JSON.stringify(i),headers:{"Content-Type":"application/json",Authorization:n}}),fetch(t,r).then((e=>{if(window.timeshow=e.headers.get("Date-Time"),200==e.status)return e.json();u(e)})).then((e=>e)).catch((e=>{}))},a=(e,t,i)=>{e&&200==e.code?t(e.data,e.message):e&&"function"==typeof i&&(s.a.clear(),i(e.message))};function u(e){switch(e.status){case 401:e.json().then((e=>{s.a.clear(),s.a.error((null===e||void 0===e?void 0:e.message)||(null===e||void 0===e?void 0:e.mes)),setTimeout((()=>{window.location.href="/"}),2e3)})).catch();break;case 403:e.json().then((e=>{s.a.clear(),s.a.error((null===e||void 0===e?void 0:e.message)||(null===e||void 0===e?void 0:e.mes))})).catch();break;default:return}}const m=e=>c("get",n+"/plan",e),d=e=>c("get",n+"/keys",e),p=e=>c("get",n+"/reseller/choice",e),h=e=>c("get",n+"/plan/chose_list",e),b=(e,t)=>{let i=e?"/"+e:"";return c(i?"put":"post",n+"/plan/step"+i,t)},N=(e,t)=>c("get",n+"/plan/draft/"+e,t),g=(e,t)=>c("put",n+"/plan/status/"+e,t),f=(e,t)=>c("post",n+"/plan/"+e+"/keys",t),v=(e,t)=>c("put",n+"/plan/edit/"+e,t),j=(e,t)=>c("put",n+"/keys/status/"+e,t),x=(e,t)=>c("get",n+"/keys/"+e,t),y=(e,t)=>c("put",n+"/plan/send/"+e,t),O=(e,t)=>c("put",n+"/keys/cancel/"+e,t),E=e=>c("delete",n+"/plan/delete/"+e),D=e=>((e,t,i,s)=>{var n=null;if("get"==e&&(n={headers:{Authorization:`Bearer ${sessionStorage.getItem("authorization")}`}},i)){let e=[];Object.keys(i).forEach((t=>e.push(t+"="+i[t]))),-1===t.search(/\?/)?t+="?"+e.join("&"):t+="&"+e.join("&")}return fetch(t,n).then((e=>{if(window.timeshow=e.headers.get("Date-Time"),200==e.status)return e.text();u(e)})).then((e=>e)).catch((e=>{}))})("get",n+"/codes",e),V=e=>c("get",n+"/codes/"+e),w=(e,t)=>c("put",n+"/codes/edit/"+e,t),k=e=>c("delete",n+"/codes/discard/"+e),C=(e,t)=>c("put",n+"/codes/status/"+e,t),S=e=>c("get",n+"/codes/products",e),_=e=>c("delete",n+"/codes/products/"+e),B=(e,t)=>c("post",n+"/codes/"+e+"/is_require_approval",t),T=e=>c("get",n+"/product/market/products",e),I=e=>l("post",n+"/upload/simple",e),z=e=>c("get",n+"/order",e),M=e=>c("get",n+"/order/"+e),F=e=>c("get",n+"/order/export",e),R=e=>c("put",n+"/order/success/"+e),q=(e,t)=>c("get",n+"/order/"+e+"/log",t),P=e=>c("put",n+"/order/cancel/"+e),$=e=>c("get",n+"/reseller",e),L=e=>c("get",n+"/reseller/exist_name?name="+e),A=(e,t)=>c("get",n+"/reseller/exist_name?name="+e,t),H=e=>c("get",n+"/reseller/exist_account/"+e),U=(e,t)=>c("get",n+"/reseller/exist_account/"+e,t),J=()=>c("get",n+"/auth/admin/all"),W=()=>c("get",n+"/auth/company/all"),K=e=>c("delete",n+"/reseller/"+e),Y=(e,t)=>c("put",n+"/reseller/status/"+e,t),X=e=>c("post",n+"/reseller/create",e),Q=e=>c("get",n+"/reseller/"+e),G=(e,t)=>c("put",n+"/reseller/"+e,t),Z=(e,t)=>c("put",n+"/reseller/password/"+e,t),ee=e=>c("get",n+"/auth/admin",e),te=(e,t)=>c("put",n+"/auth/admin/status/"+e,t),ie=e=>c("delete",n+"/auth/admin/"+e),se=(e,t)=>c("put",n+"/auth/admin/password/"+e,t),ne=e=>c("get",n+"/auth/department",e),re=e=>c("get",n+"/auth/departmentJob",e),le=e=>c("get",n+"/auth/adminRole",e),oe=e=>c("post",n+"/auth/admin",e),ce=(e,t)=>c("put",n+"/auth/admin/"+e,t),ae=e=>c("get",n+"/auth/admin/adminRoleRules/"+e),ue=e=>c("post",n+"/auth/admin/createSon",e),me=(e,t)=>c("put",n+"/auth/admin/editSon/"+e,t),de=e=>c("get",n+"/auth/admin/sonIndex",e),pe=(e,t)=>c("get",n+"/auth/admin/accountSonIndex/"+e,t),he=e=>c("get",n+"/auth/admin/roleAccounts/"+e),be=e=>c("put",n+"/auth/admin/downMigration",e),Ne=e=>c("put",n+"/auth/admin/equalMigration",e),ge=e=>c("get",n+"/auth/adminRole",e),fe=e=>c("get",n+"/auth/menu/tree",e),ve=e=>c("delete",n+"/auth/adminRole/"+e),je=e=>c("post",n+"/auth/adminRole",e),xe=(e,t)=>c("put",n+"/auth/adminRole/"+e,t),ye=e=>c("post",n+"/auth/company",e),Oe=e=>c("delete",n+"/auth/company/"+e),Ee=(e,t)=>c("put",n+"/auth/company/"+e,t),De=e=>c("post",n+"/auth/department",e),Ve=e=>c("delete",n+"/auth/department/"+e),we=(e,t)=>c("put",n+"/auth/department/"+e,t),ke=e=>c("post",n+"/auth/departmentJob",e),Ce=e=>c("delete",n+"/auth/departmentJob/"+e),Se=(e,t)=>c("put",n+"/auth/departmentJob/"+e,t),_e=e=>c("get",n+"/enum",e),Be=e=>c("post",n+"/auth/menu",e),Te=(e,t)=>c("put",n+"/auth/menu/"+e,t),Ie=e=>c("delete",n+"/auth/menu/"+e),ze=e=>l("post",n+"/plan/theme/custom",e),Me=(e,t)=>l("put",n+"/plan/theme/clone/"+e,t),Fe=()=>c("get","http://api.gray.user.1688sup.com/v1/menu/myCodes?systemId=2"),Re=e=>c("get",n+"/auth/admin/userinfo",e),qe=e=>c("post",n+"/auth/login/mobile",e),Pe=e=>c("get",n+"/plan/plan_theme",e),$e=e=>c("delete",n+"/plan/theme/"+e),Le=(e,t)=>c("put",n+"/plan/theme/"+e,t),Ae=e=>c("get",n+"/plan/theme/choice",e),He=e=>c("post",n+"/plan/theme",e),Ue=(e,t)=>c("put",n+"/plan/plan_theme/"+e,t),Je=e=>c("get",n+"/plan/theme",e),We=e=>c("get",n+"/plan/theme/system",e),Ke=(e,t)=>c("put",n+"/plan/theme/system/"+e,t),Ye=e=>c("post",n+"/plan/theme/system",e),Xe=e=>c("delete",n+"/plan/theme/system/"+e),Qe=()=>c("get",n+"/plan/theme/getThemeType"),Ge=(e,t)=>c("get",n+"/key/"+e,t),Ze=(e,t)=>c("post",n+"/plan/"+e+"/approvals",t),et=(e,t)=>c("get",n+"/approvals/"+e+"/market_approval_data",t),tt=(e,t)=>c("put",n+"/approvals/"+e+"/terminate",t),it=(e,t)=>c("get",n+"/approvals/"+e+"/status"),st=e=>c("put",n+"/key/batch_cancel",e),nt=e=>c("put",n+"/key/cancel",e),rt=e=>c("put",n+"/key/batch_usage",e),lt=e=>c("put",n+"/key/usage",e),ot=e=>c("get",n+"/key/log/list",e),ct=e=>c("post",n+"/keys/mobileAccessVerification",e),at=e=>c("put",n+"/plan/cancel/"+e),ut=(e,t)=>c("post",n+"/keys/"+e+"/approval",t),mt=e=>c("get",n+"/auth/logout",e),dt=e=>c("get",n+"/reseller/direct",e),pt=()=>c("get",n+"/auth/admin/voucherWarningAccount"),ht=(e,t)=>c("post",`http://pre.marketapi.1688sup.com/codes/voucher/fund/${t}`,e),bt=e=>c("get",n+"/key",e),Nt=(e,t)=>l("post",n+e,t),gt=e=>c("post",n+"/key/batchUploadVoid",e),ft=e=>c("post",n+"/key/batchUploadUsed",e),vt=e=>c("post",n+"/keys/batchSend",e),jt=e=>o("get",n+"/key/export",e),xt=e=>c("get",n+"/plan/get_copy_data/"+e),yt=e=>c("get",n+"/keys/queryKeyBatch",e),Ot=e=>c("get",n+"/plan/queryPlan",e),Et=e=>c("post",n+"/coupon/add",e),Dt=(e,t)=>c("put",`http://pre.marketapi.1688sup.com/coupon/${e}`,t),Vt=e=>c("get",n+"/coupon",e),wt=e=>c("put",`http://pre.marketapi.1688sup.com/coupon/void/${e}`),kt=(e,t)=>c("put",`http://pre.marketapi.1688sup.com/coupon/status/${e}`,t),Ct=e=>c("get",`http://pre.marketapi.1688sup.com/coupon/${e}`),St=e=>c("delete",`http://pre.marketapi.1688sup.com/goods/${e}`),_t=e=>c("delete",`http://pre.marketapi.1688sup.com/codes/delete/${e}`),Bt=e=>c("delete",`http://pre.marketapi.1688sup.com/coupon/delete/${e}`),Tt=e=>c("delete",`http://pre.marketapi.1688sup.com/keybatch/${e}`),It=e=>c("put",`http://pre.marketapi.1688sup.com/order/refund/${e}`),zt=(e,t)=>c("put",`http://pre.marketapi.1688sup.com/order/hand_refund/${e}`,t),Mt=e=>c("get",r+"/export/excel/marketOrder/record",e),Ft=e=>o("get",`https://ewm.83323.cn/export/excel/marketOrder/download/${e}`),Rt=e=>c("get",`https://ewm.83323.cn/export/excel/marketOrder/delete/${e}`),qt=e=>c("post",`http://pre.marketapi.1688sup.com/approvals/${e}/query`),Pt=e=>c("get",n+"/order/searchPendingOrderByObject",e),$t=e=>c("post",n+"/order/searchPendingOrderByHash",e),Lt=e=>c("post",n+"/order/searchPendingOrderByKeys",e),At=e=>((e,t,i,s)=>{var n={responseType:"blob",method:e,body:JSON.stringify(i),headers:{"Content-Type":"application/json",Authorization:`Bearer ${sessionStorage.getItem("authorization")}`}};return fetch(t,n).then((e=>{if(200==e.status)return e.blob();u(e)})).then((e=>e)).catch((e=>{}))})("post",n+"/keybatch/export",e),Ht=e=>c("post",n+"/order/resendCardCode",e),Ut=(e,t)=>c("put",`http://pre.marketapi.1688sup.com/reseller/merchant/${e}`,t),Jt=e=>c("get",n+"/reseller/merchant/generateRsaKey",e),Wt=e=>c("post",n+"/voucher/setResellerConf",e),Kt=e=>c("post",n+"/voucher/setKeyBatchConf",e),Yt=e=>c("post",n+"/voucher/setPlanConf",e),Xt=e=>c("get",n+"/voucher/queryConfig",e),Qt=e=>c("post",n+"/voucher/receiveRetry",e),Gt=()=>c("get",n+"/plan/settlementType"),Zt=e=>c("get",n+"/goods/goodsListByPlanId/"+e),ei=e=>c("post",n+"/order/voucherUsageQuery",e),ti=e=>c("post",n+"/order/notifyReseller",e),ii=e=>c("get",n+"/settlement_order/list",e),si=e=>c("get",n+"/settlement_order/detail/"+e),ni=e=>o("get",n+"/settlement_order/export",e),ri=()=>c("get",n+"/reseller/merchant/getApiMode"),li=e=>c("get",n+"/plan/getPostbankMerNo",e),oi=e=>c("post",n+"/plan/bindPostbankMerNo",e)},61:function(e,t,i){"use strict";i.d(t,"a",(function(){return u}));var s=i(1),n=i.n(s),r=i(11),l=i.n(r),o=(i(421),i(167)),c=i(10),a="/Users/zhangds/web/blue-brother/frontend/src/components/input/main.js";class u extends n.a.Component{constructor(e){super(e);this.clearContent=this.clearContent.bind(this),this.state={iptVal:e.value,errmsg:"",focus:1,iptVallength:0,errshow:!1},this.handleInputChange=this.handleInputChangeFn.bind(this),this.losefofn=this.losefofn.bind(this),this.focusFn=this.focusFn.bind(this),this.sureFns=this.sureFns.bind(this)}handleInputChangeFn(e){""!=e.target.value&&this.setState({errshow:!1})}componentWillMount(){let e=this.props.value?this.props.value:"";if(""!=e&&(this.setState({iptVal:e}),this.setState({iptVallength:String(e).length})),this.props.rule){let e=this.props.rule.message;this.setState({errmsg:e})}}clearContent(e){let t=e.target.value;this.setState({iptVal:t}),this.setState({iptVallength:t.length}),this.props.onChange(t)}clearItem(){this.setState({iptVal:""}),this.setState({iptVallength:0}),this.props.onClearItem()}focusFn(e){this.props.placeholder.length>10&&this.setState({focus:0}),this.props.onfocusFn&&this.props.onfocusFn(e.target.value)}losefofn(e){this.props.placeholder.length>10&&this.setState({focus:1}),""==e.target.value?this.setState({errshow:!0}):this.props.onblurFn&&this.props.onblurFn(e.target.value)}sureFns(e){e.target.value&&13==e.keyCode&&this.props.wordSearch&&this.props.wordSearch()}showpwdFn(e){e.props.markedShow&&("password"==e.props.kind?e.props.markedShow("text"):e.props.markedShow("password"))}render(){const{defalutCls:e,maxLength:t,kind:i,disabled:s,unit:n,front:r,icon:u,value:m,required:d,countShow:p,className:h,onChange:b,labelText:N,alignment:g,placeholder:f,height:v,width:j,clearShow:x,labelWidth:y}=this.props;let O,E;O=" "!=this.state.errmsg&&""==this.state.iptVal?"errorbor":"successbor",d||(O=""==this.state.iptVal?"normolbor":"successbor"),E=0!=this.state.focus||this.props.prolong?"losefocus":"getfocus";const D=l()({[`${e}`]:e,[`${O}`]:`${O}`,[`${E}`]:`${E}`,searchShow:`${u}`,"":{}});return Object(c.jsxDEV)("div",{className:"iptfillself",children:["0px"==this.props.labelWidth?null:Object(c.jsxDEV)("div",{className:"label",style:{width:y,textAlign:g},children:[Object(c.jsxDEV)("span",{className:"labeltip",children:N},void 0,!1,{fileName:a,lineNumber:181,columnNumber:13},this),d?Object(c.jsxDEV)("font",{className:"warning",children:"*"},void 0,!1,{fileName:a,lineNumber:182,columnNumber:25},this):null]},void 0,!0,{fileName:a,lineNumber:178,columnNumber:11},this),Object(c.jsxDEV)("div",{className:"iptlabel",children:[Object(c.jsxDEV)("div",{className:"iptright",children:[r?Object(c.jsxDEV)("font",{className:"front",children:r},void 0,!1,{fileName:a,lineNumber:188,columnNumber:22},this):null,u?Object(c.jsxDEV)(o.a,{type:"search",className:"iconType"},void 0,!1,{fileName:a,lineNumber:189,columnNumber:21},this):null,Object(c.jsxDEV)("input",{autoComplete:"password"==i?"new-password":"off",name:this.props.name,disabled:s,type:i,onBlur:this.losefofn,onFocus:this.focusFn,value:this.props.value,onKeyDown:e=>this.sureFns(e),maxLength:t,onChange:this.clearContent,onInput:this.handleInputChange,style:{resize:"none",height:v,lineHeight:v,width:j,textOverflow:"ellipsis"},className:D,placeholder:f||"\u8bf7\u8f93\u5165"},void 0,!1,{fileName:a,lineNumber:190,columnNumber:13},this),Object(c.jsxDEV)("div",{className:"ipticonR",children:[0==s&&this.props.markedShow?Object(c.jsxDEV)("span",{className:"showpwd",onClick:()=>this.showpwdFn(this),children:"text"==i?Object(c.jsxDEV)(o.a,{type:"eye-o",className:"pwdShow"},void 0,!1,{fileName:a,lineNumber:216,columnNumber:21},this):Object(c.jsxDEV)(o.a,{className:"pwdShow",type:"closed-eye"},void 0,!1,{fileName:a,lineNumber:218,columnNumber:21},this)},void 0,!1,{fileName:a,lineNumber:214,columnNumber:17},this):null,0==s&&1==x&&this.state.iptVal?Object(c.jsxDEV)("svg",{onClick:this.clearItem.bind(this),viewBox:"0 0 16 16",width:"16px",height:"16px",children:[Object(c.jsxDEV)("circle",{fill:"#AAAFBA",fillRule:"evenodd",cx:"8",cy:"8",r:"8"},void 0,!1,{fileName:a,lineNumber:228,columnNumber:19},this),Object(c.jsxDEV)("path",{d:"M5.333 5.333l5.334 5.334M10.667 5.333l-5.334 5.334",stroke:"#FFF",strokeLinecap:"square"},void 0,!1,{fileName:a,lineNumber:234,columnNumber:19},this)]},void 0,!0,{fileName:a,lineNumber:223,columnNumber:17},this):null,0==s&&1==p?Object(c.jsxDEV)("span",{className:"countTip",children:[String(this.props.value).length,"/",t]},void 0,!0,{fileName:a,lineNumber:241,columnNumber:17},this):null,n?Object(c.jsxDEV)("font",{className:"unit",children:n},void 0,!1,{fileName:a,lineNumber:245,columnNumber:23},this):null]},void 0,!0,{fileName:a,lineNumber:212,columnNumber:13},this)]},void 0,!0,{fileName:a,lineNumber:187,columnNumber:11},this),this.state.errshow||" "!=this.state.errmsg&&""==this.state.iptVal?Object(c.jsxDEV)("p",{className:"errtip",children:this.state.errmsg},void 0,!1,{fileName:a,lineNumber:251,columnNumber:13},this):null]},void 0,!0,{fileName:a,lineNumber:186,columnNumber:9},this)]},void 0,!0,{fileName:a,lineNumber:176,columnNumber:7},this)}}u.defaultProps={defalutCls:"keep-ipt",height:"40px",width:"200px",clearShow:!0,alignment:"left",countShow:!0,required:!1,labelWidth:"120px",icon:"",kind:"text",unit:null,front:null,disabled:!1}},62:function(e,t,i){"use strict";i.d(t,"a",(function(){return o}));var s=i(1),n=i.n(s),r=(i(417),i(10)),l="/Users/zhangds/web/blue-brother/frontend/src/components/form-item/main.js";class o extends n.a.Component{constructor(e){super(e)}render(){const{labelname:e,prop:t,labelwidth:i,myClassName:s,id:n,required:o}=this.props;return Object(r.jsxDEV)("div",{className:s?s+" form-Item":"form-Item",id:n||null,children:[Object(r.jsxDEV)("div",{className:"form-label",style:{width:i||"180px"},children:[e,o?Object(r.jsxDEV)("span",{className:"mustwrite",children:"*"},void 0,!1,{fileName:l,lineNumber:22,columnNumber:23},this):null]},void 0,!0,{fileName:l,lineNumber:18,columnNumber:9},this),Object(r.jsxDEV)("div",{className:"form-compontent",children:this.props.children},void 0,!1,{fileName:l,lineNumber:24,columnNumber:9},this),Object(r.jsxDEV)("div",{className:"form-expand",children:this.props.expand},void 0,!1,{fileName:l,lineNumber:25,columnNumber:9},this)]},void 0,!0,{fileName:l,lineNumber:15,columnNumber:7},this)}}o.defaultProps={required:"*"}},63:function(e,t,i){"use strict";i.d(t,"a",(function(){return d}));var s=i(1),n=i.n(s),r=(i(418),i(419)),l=i(510),o=i(81),c=i(24),a=i.n(c),u=i(69),m=i(10);class d extends n.a.Component{constructor(e){super(e),this.state={children:e.children,model:e.model,rules:e.rules}}componentWillReceiveProps(e){this.setState({children:e.children}),this.setState({model:e.model}),this.setState({rules:e.rules})}componentDidMount(){u.a.addListener("change",((e,t)=>{let i=document.getElementById(e).getElementsByClassName("form-compontent"),s=Object(r.a)(this.props.rules,e),n=i[0].firstChild;t?this.removeClass(i[0]):setTimeout((()=>{this.isRequired("",n.className,i[0],s[0].message)}),300)}));let e=this;u.a.addListener("input",((t,i)=>{let s=document.getElementById(t).getElementsByClassName("form-compontent"),n=Object(r.a)(this.props.rules,t),l=s[0].firstChild;if(n)for(let r=0;r{let t=document.getElementById(e).getElementsByClassName("form-compontent"),i=Object(r.a)(this.props.rules,e),s=t[0].firstChild;setTimeout((()=>{this.isRequired("",s.className,t[0],i[0].message)}),300)}));let t=a.a.findDOMNode(this).getElementsByClassName("form-Item"),i=Object(l.a)(this.props.children,(e=>null!=e));for(let l=0;l0&&o&&(i[0].oninput=function(i){for(let r=0;r0;)i[0].remove();t.indexOf("error")>-1&&(e.firstChild.className=t.replace(" error",""))}isRequired(e,t,i,s){if(i.firstChild.className.indexOf("error")<0&&i.lastChild.className.indexOf("error-msg")<0){var n=document.createElement("div");n.className="error-msg",n.innerHTML=""+s+"",i.firstChild.className+=" error",i.appendChild(n)}}componentDidUpdate(e,t){let i=this.props.children[0];Object(r.a)(i,"props.children.props");t.children,this.state.children}cancel(){let e=document.getElementsByClassName("form-Item"),t=this;for(let s=0;snull!=e));for(let l=0;l0&&r[0].focus(),t.removeClass(a),t.isRequired(e.value,p.className,a,s[n].message),i=!1;break}t.removeClass(a)}if("regExp"==s[n].type){c=s[n].reg,u=new RegExp(c);let r=e.value;if(!u.test(r)){i=!1,t.isRequired(e.value,p.className,a,s[n].message);break}t.removeClass(a)}}}}return i}render(){return Object(m.jsxDEV)("div",{className:"form",children:[" ",this.props.children," "]},void 0,!0,{fileName:"/Users/zhangds/web/blue-brother/frontend/src/components/form/main.js",lineNumber:342,columnNumber:12},this)}}},69:function(e,t,i){"use strict";var s=i(413);t.a=new s.EventEmitter},85:function(e,t,i){}}]); \ No newline at end of file +(this.webpackJsonpmarketingsystem=this.webpackJsonpmarketingsystem||[]).push([[2],{109:function(e,t,i){},240:function(e,t,i){"use strict";i.d(t,"a",(function(){return m}));i(36);var s=i(1),n=i.n(s),r=i(167),l=i(199),o=i(201),c=(i(241),i(242),i(243)),a=i(10),u="/Users/zhangds/web/blue-brother/frontend/src/pages/exchangepage/previewEffect/main.js";class m extends n.a.Component{constructor(e){super(e),this.state={setStyle:{width:"375px",height:"667px",transform:"scale(0.75)"},fontSize:1e4/281.25,activeHeight:667,showType:3,pageStep:1,showPage:1,detailType:3}}onClose(){this.props.onCloseFn()}handleSize(e,t){let i={width:e+"px",height:t+"px",transform:"scale(0.75)"};this.setState({setStyle:i,activeHeight:t})}onpageChange(e){this.setState({showPage:e.target.value,pageStep:e.target.value,detailType:3})}ondetailTypeChange(e){this.setState({detailType:e.target.value,pageStep:e.target.value})}render(){return Object(a.jsxDEV)("div",{className:"edittemplate",children:Object(a.jsxDEV)("div",{children:[Object(a.jsxDEV)("div",{className:"modal model44",style:{background:"rgba(0,0,0,0.8)"}},void 0,!1,{fileName:u,lineNumber:45,columnNumber:11},this),Object(a.jsxDEV)("div",{className:"preview-box",children:[Object(a.jsxDEV)(r.a,{type:"close",className:"preview-top-close",onClick:e=>{this.onClose(e)}},void 0,!1,{fileName:u,lineNumber:49,columnNumber:13},this),Object(a.jsxDEV)("div",{style:{height:"100%"},children:Object(a.jsxDEV)("div",{className:"previewComponent",children:[Object(a.jsxDEV)("div",{className:"previewbody",children:Object(a.jsxDEV)("div",{className:"ctorSize",style:this.state.setStyle,children:Object(a.jsxDEV)(c.a,{data:this.props.previewData,pageType:this.props.showType,fontSize:this.state.fontSize,ref:"preview",step:this.state.pageStep},void 0,!1,{fileName:u,lineNumber:60,columnNumber:21},this)},void 0,!1,{fileName:u,lineNumber:59,columnNumber:19},this)},void 0,!1,{fileName:u,lineNumber:58,columnNumber:17},this),Object(a.jsxDEV)("div",{className:"left-choice",children:[Object(a.jsxDEV)("div",{className:"exchange-page",children:[Object(a.jsxDEV)("p",{className:"preview-setting",children:"\u843d\u5730\u9875\u9884\u89c8:"},void 0,!1,{fileName:u,lineNumber:71,columnNumber:21},this),Object(a.jsxDEV)("section",{className:"screen-size-selector",children:[Object(a.jsxDEV)("div",{className:667==this.state.activeHeight?"size active":"size",onClick:()=>this.handleSize(375,667),children:["\u4e3b\u6d41\u673a\u578b",Object(a.jsxDEV)("span",{children:"375x667"},void 0,!1,{fileName:u,lineNumber:80,columnNumber:29},this)]},void 0,!0,{fileName:u,lineNumber:73,columnNumber:23},this),Object(a.jsxDEV)("div",{className:750==this.state.activeHeight?"size active":"size",onClick:()=>this.handleSize(375,750),children:["\u5168\u9762\u5c4f",Object(a.jsxDEV)("span",{children:"375x750"},void 0,!1,{fileName:u,lineNumber:89,columnNumber:28},this)]},void 0,!0,{fileName:u,lineNumber:82,columnNumber:23},this),Object(a.jsxDEV)("div",{className:812==this.state.activeHeight?"size active":"size",onClick:()=>this.handleSize(375,812),children:["\u5218\u6d77\u5c4f",Object(a.jsxDEV)("span",{children:"375x812"},void 0,!1,{fileName:u,lineNumber:98,columnNumber:28},this)]},void 0,!0,{fileName:u,lineNumber:91,columnNumber:23},this),Object(a.jsxDEV)("div",{className:500==this.state.activeHeight?"size active":"size",onClick:()=>this.handleSize(375,500),children:["\u5c0f\u5c4f\u624b\u673a",Object(a.jsxDEV)("span",{children:"375x500"},void 0,!1,{fileName:u,lineNumber:107,columnNumber:29},this)]},void 0,!0,{fileName:u,lineNumber:100,columnNumber:23},this)]},void 0,!0,{fileName:u,lineNumber:72,columnNumber:21},this)]},void 0,!0,{fileName:u,lineNumber:70,columnNumber:19},this),Object(a.jsxDEV)("div",{className:"exchange-page",children:[Object(a.jsxDEV)("p",{children:"\u9875\u9762\u7c7b\u578b:"},void 0,!1,{fileName:u,lineNumber:112,columnNumber:21},this),Object(a.jsxDEV)(l.a,{onChange:e=>{this.onpageChange(e)},value:this.state.showPage,children:[Object(a.jsxDEV)(o.a,{value:1,children:"\u843d\u5730\u9875"},void 0,!1,{fileName:u,lineNumber:118,columnNumber:23},this),Object(a.jsxDEV)(o.a,{value:2,children:"\u5217\u8868\u9875"},void 0,!1,{fileName:u,lineNumber:119,columnNumber:23},this),Object(a.jsxDEV)(o.a,{value:3,children:"\u8be6\u60c5\u9875"},void 0,!1,{fileName:u,lineNumber:120,columnNumber:23},this)]},void 0,!0,{fileName:u,lineNumber:113,columnNumber:21},this)]},void 0,!0,{fileName:u,lineNumber:111,columnNumber:19},this),3==this.state.showPage?Object(a.jsxDEV)("div",{className:"exchange-page",children:[Object(a.jsxDEV)("p",{children:"\u8be6\u60c5\u9875\u5206\u7c7b:"},void 0,!1,{fileName:u,lineNumber:125,columnNumber:23},this),Object(a.jsxDEV)(l.a,{onChange:e=>{this.ondetailTypeChange(e)},value:this.state.detailType,children:[Object(a.jsxDEV)(o.a,{value:3,children:"\u6743\u2003\u76ca"},void 0,!1,{fileName:u,lineNumber:131,columnNumber:25},this),Object(a.jsxDEV)(o.a,{value:4,children:"\u7acb\u51cf\u91d1"},void 0,!1,{fileName:u,lineNumber:132,columnNumber:25},this),Object(a.jsxDEV)(o.a,{value:5,children:"\u7ea2\u5305"},void 0,!1,{fileName:u,lineNumber:133,columnNumber:25},this)]},void 0,!0,{fileName:u,lineNumber:126,columnNumber:23},this)]},void 0,!0,{fileName:u,lineNumber:124,columnNumber:21},this):null]},void 0,!0,{fileName:u,lineNumber:69,columnNumber:17},this)]},void 0,!0,{fileName:u,lineNumber:57,columnNumber:15},this)},void 0,!1,{fileName:u,lineNumber:56,columnNumber:13},this)]},void 0,!0,{fileName:u,lineNumber:48,columnNumber:11},this)]},void 0,!0,{fileName:u,lineNumber:44,columnNumber:9},this)},void 0,!1,{fileName:u,lineNumber:43,columnNumber:7},this)}}},241:function(e,t,i){},242:function(e,t,i){},243:function(e,t,i){"use strict";i.d(t,"a",(function(){return p}));i(36);var s=i(1),n=i.n(s),r=i(365),l=i(367),o=i(368),c=i(369),a=(i(370),i(371)),u=i(372),m=(i(430),i(10)),d="/Users/zhangds/web/blue-brother/frontend/src/pages/exchangepage/template/preview.js";class p extends n.a.Component{constructor(e){super(e),this.state={layout:"list",type:1,top_url:"",activeshow:!1,detailactiveshow:!1,top_image:"https://lsxd-yunshanfu.oss-cn-hangzhou.aliyuncs.com/common_image/20220105/59ba305520d3229e7fc53d5229bfec0c.png",middle_image:"https://lsxd-yunshanfu.oss-cn-hangzhou.aliyuncs.com/common_image/20221107/2c407b6b702ed2217e22f8df8a7c87e6.png"}}showactiveIcon(e){this.setState({activeshow:!1})}opendescFn(){this.setState({activeshow:!0})}showactivedetail(e){this.setState({detailactiveshow:!1})}opendetaildescFn(){this.setState({detailactiveshow:!0})}componentDidUpdate(){2==this.props.step?document.querySelector(".preview-show .goodstemplate").scrollTop=0:3!=this.props.step||this.state.detailactiveshow?document.querySelector("#previewbg").scrollTop=0:document.querySelector(".preview-show .detailstemplate").scrollTop=0}setHeight(){let e="0px",t="0px",i=this.props.data.product_list;return i.search&&1==i.search.iswitch&&(e="60px"),i.bottomBar&&1==i.bottomBar.iswitch&&(t="50px"),`calc(100% - ${e} - ${t})`}render(){let e=this.props.data,t=e.product_list,i=[];return t&&t.bottomBar&&(i=t.bottomBar.navlist.filter((e=>1==e.iswitch))),Object(m.jsxDEV)("div",{className:"preview-show",children:Object(m.jsxDEV)("div",{id:"previewbg",style:{background:2==this.props.step&&t.backgroundImg&&t.backgroundImg.bgImg?`url('${t.backgroundImg.bgImg}') center center /cover`:t.backgroundImg&&t.backgroundImg.bgColor?t.backgroundImg.bgColor:"#F2F7F8"},children:[1==this.props.step?Object(m.jsxDEV)("div",{className:"landpage",style:{background:e.land.bg_color},children:[Object(m.jsxDEV)("div",{className:"top",children:e.land.top_image?Object(m.jsxDEV)("img",{src:e.land.top_image,id:"top"},void 0,!1,{fileName:d,lineNumber:81,columnNumber:19},this):Object(m.jsxDEV)("img",{src:this.state.top_image,id:"top"},void 0,!1,{fileName:d,lineNumber:83,columnNumber:19},this)},void 0,!1,{fileName:d,lineNumber:79,columnNumber:15},this),Object(m.jsxDEV)("div",{className:"center",id:"preview-center",ref:"middleCenter",style:{fontSize:this.props.fontSize},children:[Object(m.jsxDEV)("img",{src:8==this.props.pageType?e.land.white_image?e.land.white_image:this.state.middle_image:e.land.middle_image?e.land.middle_image:this.state.middle_image,id:"preview-center-img"},void 0,!1,{fileName:d,lineNumber:92,columnNumber:17},this),Object(m.jsxDEV)("div",{className:"dflexajc ipt-user",children:[Object(m.jsxDEV)("div",{style:{color:e.land.font_color},children:["\u8bf7\u8f93\u5165",[1,8].includes(this.props.pageType)?"\u624b\u673a\u53f7":"\u5151\u6362\u7801"]},void 0,!0,{fileName:d,lineNumber:105,columnNumber:19},this),Object(m.jsxDEV)("div",{className:"ipt-code",style:{color:e.land.font_color},children:"\u8bf7\u8f93\u5165\u9a8c\u8bc1\u7801"},void 0,!1,{fileName:d,lineNumber:109,columnNumber:19},this)]},void 0,!0,{fileName:d,lineNumber:104,columnNumber:17},this),[1,8].includes(this.props.pageType)?Object(m.jsxDEV)("img",{src:"https://lsxd-yunshanfu.oss-cn-hangzhou.aliyuncs.com/common_image/20220127/22e5d4c1b1190a0a7bc8db43e1490d67.png",className:"verifycode"},void 0,!1,{fileName:d,lineNumber:114,columnNumber:19},this):Object(m.jsxDEV)("img",{src:"https://lsxd-yunshanfu.oss-cn-hangzhou.aliyuncs.com/common_image/20220105/7dafa511638b084f21966b2c3d269a0e.png",className:"verifycode"},void 0,!1,{fileName:d,lineNumber:121,columnNumber:19},this),Object(m.jsxDEV)("div",{className:"submit"},void 0,!1,{fileName:d,lineNumber:128,columnNumber:17},this)]},void 0,!0,{fileName:d,lineNumber:86,columnNumber:15},this),Object(m.jsxDEV)("div",{className:"bottom",children:[e.land.describe.bg_image?Object(m.jsxDEV)("img",{src:e.land.describe.bg_image},void 0,!1,{fileName:d,lineNumber:132,columnNumber:19},this):null,e.land.describe.content?Object(m.jsxDEV)("div",{className:"textTip_land",dangerouslySetInnerHTML:{__html:e.land.describe.content}},void 0,!1,{fileName:d,lineNumber:135,columnNumber:19},this):null]},void 0,!0,{fileName:d,lineNumber:130,columnNumber:15},this)]},void 0,!0,{fileName:d,lineNumber:78,columnNumber:13},this):null,2==this.props.step?this.state.activeshow&&2==e.product_list.describe.type&&e.product_list.describe.content?Object(m.jsxDEV)(c.a,{backPrepage:e=>this.showactiveIcon(e),goodsdata:e.product_list},void 0,!1,{fileName:d,lineNumber:149,columnNumber:15},this):Object(m.jsxDEV)("div",{className:"goodstemplate_view",children:[t.search&&1==t.search.iswitch?Object(m.jsxDEV)(l.a,{searchConfig:t.search},void 0,!1,{fileName:d,lineNumber:156,columnNumber:19},this):null,Object(m.jsxDEV)("div",{className:"goodstemplate",style:{height:this.setHeight()},children:[Object(m.jsxDEV)("img",{src:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/backprepageBtn.png",className:"preBtn",style:{display:t.search&&1==t.search.iswitch?"none":"block"}},void 0,!1,{fileName:d,lineNumber:159,columnNumber:19},this),e.product_list.top_image?Object(m.jsxDEV)("img",{className:"topbanner",src:e.product_list.top_image},void 0,!1,{fileName:d,lineNumber:177,columnNumber:21},this):Object(m.jsxDEV)("img",{className:"topbanner",src:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/goodstop.png"},void 0,!1,{fileName:d,lineNumber:170,columnNumber:21},this),t.picture&&1==t.picture.iswitch?Object(m.jsxDEV)("img",{src:t.picture.img,alt:"",className:"picture"},void 0,!1,{fileName:d,lineNumber:180,columnNumber:21},this):null,t.title&&1==t.title.iswitch&&1==t.title.comstyle?Object(m.jsxDEV)("div",{className:t.title.textAlign+" content-title "+t.title.fontSize,style:{color:t.title.fontColor,fontWeight:"bold"},children:t.title.text},void 0,!1,{fileName:d,lineNumber:185,columnNumber:21},this):null,t.title&&1==t.title.iswitch&&2==t.title.comstyle?Object(m.jsxDEV)("img",{src:t.title.pic,alt:"",className:"title-pic"},void 0,!1,{fileName:d,lineNumber:202,columnNumber:21},this):null,t.title&&1==t.title.iswitch&&t.title.text||t.picture&&1==t.picture.iswitch&&t.picture.img?Object(m.jsxDEV)("div",{className:"parting-line"},void 0,!1,{fileName:d,lineNumber:211,columnNumber:21},this):null,2==e.product_list.list?Object(m.jsxDEV)("img",{className:"swiperType",src:[1,3].includes(this.props.pageType)?"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/swiperview.png":"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/swiperview_coupon.png"},void 0,!1,{fileName:d,lineNumber:215,columnNumber:21},this):3==e.product_list.list?Object(m.jsxDEV)("img",{className:"swiperType",src:[1,3].includes(this.props.pageType)?"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/matrixview.png":"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/matrixview_coupon.png"},void 0,!1,{fileName:d,lineNumber:224,columnNumber:21},this):Object(m.jsxDEV)("img",{className:"swiperType",src:[1,3].includes(this.props.pageType)?"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/listview.png":"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/listview_coupon.png"},void 0,!1,{fileName:d,lineNumber:233,columnNumber:21},this),2==e.product_list.list?Object(m.jsxDEV)("button",{className:"exchageBtn",style:{color:e.product_list.font_color,background:e.product_list.button_color},children:t.search?"\u8d2d\u4e70":"\u7acb\u5373\u5151\u6362"},void 0,!1,{fileName:d,lineNumber:243,columnNumber:21},this):null,1==e.product_list.describe.type?Object(m.jsxDEV)("img",{src:e.product_list.describe.bg_image,alt:"",className:e.product_list.describe.type&&1==e.product_list.list?"bottomTipView":"bottomTip"},void 0,!1,{fileName:d,lineNumber:254,columnNumber:21},this):3==e.product_list.describe.type?Object(m.jsxDEV)("div",{className:"bottomactiveTip",dangerouslySetInnerHTML:{__html:e.product_list.describe.content}},void 0,!1,{fileName:d,lineNumber:264,columnNumber:21},this):null,2==e.product_list.describe.type?Object(m.jsxDEV)("img",{className:"susactive_tip",onClick:this.opendescFn.bind(this),src:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/acticeTextTip.png"},void 0,!1,{fileName:d,lineNumber:272,columnNumber:21},this):null]},void 0,!0,{fileName:d,lineNumber:158,columnNumber:17},this),t.bottomBar&&1==t.bottomBar.iswitch&&i.length>1?Object(m.jsxDEV)(r.a,{bottomBarConfig:t.bottomBar},void 0,!1,{fileName:d,lineNumber:284,columnNumber:19},this):null]},void 0,!0,{fileName:d,lineNumber:154,columnNumber:15},this):null,3==this.props.step?this.state.detailactiveshow&&2==e.product_detail.describe.type&&e.product_detail.describe.content?Object(m.jsxDEV)(c.a,{backPrepage:e=>this.showactivedetail(e),goodsdata:e.product_detail},void 0,!1,{fileName:d,lineNumber:294,columnNumber:15},this):Object(m.jsxDEV)(o.a,{opendesc:e=>this.opendetaildescFn(e),detaildata:e.product_detail,templateType:this.props.pageType,topImgshow:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/goodsbigPic.png",iptImgshow:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/viewIpt.png"},void 0,!1,{fileName:d,lineNumber:299,columnNumber:15},this):null,4==this.props.step&&Object(m.jsxDEV)(u.a,{templateType:this.props.pageType,detaildata:e.product_detail},void 0,!1,{fileName:d,lineNumber:314,columnNumber:13},this),5==this.props.step&&Object(m.jsxDEV)(a.a,{},void 0,!1,{fileName:d,lineNumber:320,columnNumber:36},this)]},void 0,!0,{fileName:d,lineNumber:66,columnNumber:9},this)},void 0,!1,{fileName:d,lineNumber:65,columnNumber:7},this)}}},365:function(e,t,i){"use strict";i.d(t,"a",(function(){return o}));i(36);var s=i(1),n=i.n(s),r=(i(366),i(10)),l="/Users/zhangds/web/blue-brother/frontend/src/pages/exchangepage/edittemplate/couponCard/couponViewConfig/bottomBar.js";class o extends n.a.Component{constructor(e){super(e),this.state={navList:[{id:1,iswitch:1,name:"index",pic:{show:"",selectShow:""},text:"\u9996\u9875"},{id:2,iswitch:1,name:"order",pic:{show:"",selectShow:""},text:"\u8ba2\u5355"},{id:3,iswitch:1,name:"coupon",pic:{show:"",selectShow:""},text:"\u6211\u7684\u5238"}],active:0}}componentWillReceiveProps(e){let t=e.bottomBarConfig.navlist.filter((e=>e.iswitch));this.setState({navList:t})}clickIcon(e,t){this.setState({active:t})}componentDidMount(){let e=JSON.parse(sessionStorage.getItem("editorConfig")),{navlist:t,defaultText:i,selectText:s,background:n,iswitch:r}=this.props.bottomBarConfig?this.props.bottomBarConfig:e.coupon.product_list.bottomBar;this.setState({defaultText:i,selectText:s,background:n,iswitch:r});let l=t.filter((e=>e.iswitch));this.setState({navList:l})}render(){let e=this.state.active;return Object(r.jsxDEV)("ul",{className:"bottomBar-view",style:{background:this.props.bottomBarConfig.background?`url('${this.props.bottomBarConfig.background}') center center /cover`:"#f9f9f9"},children:this.state.navList.map(((t,i)=>Object(r.jsxDEV)("li",{onClick:e=>this.clickIcon(e,i),children:[Object(r.jsxDEV)("img",{src:e==i?t.pic.selectShow:t.pic.show,alt:""},void 0,!1,{fileName:l,lineNumber:74,columnNumber:15},this),Object(r.jsxDEV)("span",{style:{color:e==i?this.props.bottomBarConfig.selectText:this.props.bottomBarConfig.defaultText},children:t.text},void 0,!1,{fileName:l,lineNumber:78,columnNumber:15},this)]},t.id,!0,{fileName:l,lineNumber:73,columnNumber:13},this)))},void 0,!1,{fileName:l,lineNumber:64,columnNumber:7},this)}}},366:function(e,t,i){},367:function(e,t,i){"use strict";i.d(t,"a",(function(){return o}));var s=i(1),n=i.n(s),r=(i(366),i(36),i(10)),l="/Users/zhangds/web/blue-brother/frontend/src/pages/exchangepage/edittemplate/couponCard/couponViewConfig/searchBar.js";class o extends n.a.Component{constructor(e){super(e)}render(){let e=this.props.searchConfig;return Object(r.jsxDEV)("div",{className:"searchBar-container",style:{background:e.bgColor},children:[Object(r.jsxDEV)("img",{src:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/backprepageBtn.png",className:"preBtn"},void 0,!1,{fileName:l,lineNumber:14,columnNumber:9},this),Object(r.jsxDEV)("div",{className:e.shape+" searchBar "+e.textAlign,style:{background:e.borderColor,color:e.fontColor},children:[Object(r.jsxDEV)("i",{className:"marketing marketing-sousuo"},void 0,!1,{fileName:l,lineNumber:28,columnNumber:11},this),Object(r.jsxDEV)("div",{className:"placeholder",children:e.placeholder},void 0,!1,{fileName:l,lineNumber:29,columnNumber:11},this)]},void 0,!0,{fileName:l,lineNumber:20,columnNumber:9},this)]},void 0,!0,{fileName:l,lineNumber:11,columnNumber:7},this)}}},368:function(e,t,i){"use strict";i.d(t,"a",(function(){return o}));i(36);var s=i(1),n=i.n(s),r=(i(109),i(85),i(10)),l="/Users/zhangds/web/blue-brother/frontend/src/pages/exchangepage/edittemplate/detailstemplate.js";class o extends n.a.Component{constructor(e){super(e)}opendescFn(){this.props.opendesc(!0)}render(){let e=this.props.detaildata,{topImgshow:t,iptImgshow:i}=this.props;return Object(r.jsxDEV)("div",{className:"detailstemplate_Xcenter",children:[Object(r.jsxDEV)("div",{className:"detailstemplate",style:{paddingBottom:"80px",boxSizing:"border-box"},children:[Object(r.jsxDEV)("img",{src:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/backprepageBtn.png",className:"preBtn"},void 0,!1,{fileName:l,lineNumber:18,columnNumber:11},this),Object(r.jsxDEV)("img",{className:"topBanner",src:t||"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/detailtop.png"},void 0,!1,{fileName:l,lineNumber:24,columnNumber:11},this),Object(r.jsxDEV)("p",{className:"splitLine"},void 0,!1,{fileName:l,lineNumber:32,columnNumber:11},this),Object(r.jsxDEV)("img",{className:"iptbg",src:i||"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/detailipt.png"},void 0,!1,{fileName:l,lineNumber:33,columnNumber:11},this),Object(r.jsxDEV)("p",{className:"splitLine"},void 0,!1,{fileName:l,lineNumber:41,columnNumber:11},this),e.describe.bg_image&&1==e.describe.type?Object(r.jsxDEV)("img",{className:"detail_bottomImg",src:e.describe.bg_image},void 0,!1,{fileName:l,lineNumber:43,columnNumber:13},this):3==e.describe.type?Object(r.jsxDEV)("div",{className:"bottomactiveTip",dangerouslySetInnerHTML:{__html:e.describe.content}},void 0,!1,{fileName:l,lineNumber:45,columnNumber:13},this):null,2==e.describe.type?Object(r.jsxDEV)("img",{className:"susactive_tip",onClick:this.opendescFn.bind(this),src:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/acticeTextTip.png"},void 0,!1,{fileName:l,lineNumber:53,columnNumber:13},this):null]},void 0,!0,{fileName:l,lineNumber:17,columnNumber:9},this),[1,3].includes(this.props.templateType)?Object(r.jsxDEV)("button",{className:"exchageBtn",style:{background:e.button_color,color:e.font_color},children:"\u7acb\u5373\u5151\u6362"},void 0,!1,{fileName:l,lineNumber:63,columnNumber:11},this):Object(r.jsxDEV)("div",{className:"dflexaj payBtn-view",children:[Object(r.jsxDEV)("div",{className:"coupon-price",children:[Object(r.jsxDEV)("p",{children:["\uffe5",Object(r.jsxDEV)("span",{children:"0.00"},void 0,!1,{fileName:l,lineNumber:76,columnNumber:18},this)]},void 0,!0,{fileName:l,lineNumber:75,columnNumber:15},this),Object(r.jsxDEV)("p",{children:"\u5171\u7701\uffe50.01"},void 0,!1,{fileName:l,lineNumber:78,columnNumber:15},this)]},void 0,!0,{fileName:l,lineNumber:74,columnNumber:13},this),Object(r.jsxDEV)("button",{className:"payBtn",style:{background:e.button_color,color:e.font_color},children:"\u7acb\u5373\u652f\u4ed8"},void 0,!1,{fileName:l,lineNumber:80,columnNumber:13},this)]},void 0,!0,{fileName:l,lineNumber:73,columnNumber:11},this)]},void 0,!0,{fileName:l,lineNumber:16,columnNumber:7},this)}}},369:function(e,t,i){"use strict";i.d(t,"a",(function(){return o}));var s=i(1),n=i.n(s),r=(i(109),i(10)),l="/Users/zhangds/web/blue-brother/frontend/src/pages/exchangepage/edittemplate/goodsdesc.js";class o extends n.a.Component{constructor(e){super(e)}backPre(){this.props.backPrepage(0)}render(){return Object(r.jsxDEV)("div",{className:"editor-main goodstemplate desc-goods",children:[Object(r.jsxDEV)("p",{children:"\u6d3b\u52a8\u89c4\u5219"},void 0,!1,{fileName:l,lineNumber:13,columnNumber:9},this),Object(r.jsxDEV)("img",{onClick:this.backPre.bind(this),src:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/backprepageBtn.png",className:"preBtn"},void 0,!1,{fileName:l,lineNumber:14,columnNumber:9},this),Object(r.jsxDEV)("div",{className:"descript",dangerouslySetInnerHTML:{__html:this.props.goodsdata.describe.content}},void 0,!1,{fileName:l,lineNumber:21,columnNumber:9},this)]},void 0,!0,{fileName:l,lineNumber:12,columnNumber:7},this)}}},370:function(e,t,i){"use strict";i.d(t,"a",(function(){return m}));i(36);var s=i(69),n=i(1),r=i.n(n),l=i(499),o=i(365),c=i(367),a=(i(109),i(85),i(10)),u="/Users/zhangds/web/blue-brother/frontend/src/pages/exchangepage/edittemplate/goodstemplate.js";class m extends r.a.Component{constructor(e){super(e),this.state={clientY:0,selectDom:"",icon:"",comName:""}}opendescFn(){this.props.opendesc(!0)}customComponent(e,t,i,s){let n=this.refs[t].getBoundingClientRect().top;this.setState({clientY:n-125,selectDom:t,icon:i,comName:s}),"searchBar"==t&&this.setState({clientY:0})}deleteFn(){let e=this.state.selectDom;l.a.confirm({title:"\u786e\u8ba4\u4fe1\u606f",content:Object(a.jsxDEV)("p",{children:"\u786e\u8ba4\u5220\u9664\u8be5\u6a21\u5757\uff1f"},void 0,!1,{fileName:u,lineNumber:40,columnNumber:16},this),onConfirm:()=>{this.setState({selectDom:""}),s.a.emit("goodListPage"),s.a.emit("componentLib",{attr:e,value:0})},onCancel:()=>{},parentComponent:this})}setHeight(){let e=0,t=0,i=this.props.goodsdata;return i.search&&1==i.search.iswitch&&(e=60),i.bottomBar&&1==i.bottomBar.iswitch&&(t=50),653-e-t+"px"}render(){let e=this.props.goodsdata,t=[];return e.bottomBar&&(t=e.bottomBar.navlist.filter((e=>1==e.iswitch))),Object(a.jsxDEV)("div",{className:"goodstemplate_Xcenter",children:[e.search&&1==e.search.iswitch?Object(a.jsxDEV)("div",{onClick:e=>this.customComponent(e,"search","marketing-sousuolan-","\u641c\u7d22\u680f"),className:"search"==this.state.selectDom?"selectBorder":"",ref:"search",children:Object(a.jsxDEV)(c.a,{searchConfig:e.search},void 0,!1,{fileName:u,lineNumber:76,columnNumber:13},this)},void 0,!1,{fileName:u,lineNumber:71,columnNumber:11},this):null,Object(a.jsxDEV)("div",{className:"goodstemplate",style:{background:e.backgroundImg&&e.backgroundImg.bgImg?`url('${e.backgroundImg.bgImg}') center center /cover`:e.backgroundImg&&e.backgroundImg.bgColor?e.backgroundImg.bgColor:"#f1f5f7",height:this.setHeight()},children:[Object(a.jsxDEV)("img",{src:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/backprepageBtn.png",className:"preBtn",style:{display:e.search&&1==e.search.iswitch?"none":"block"}},void 0,!1,{fileName:u,lineNumber:91,columnNumber:11},this),e.top_image?Object(a.jsxDEV)("img",{className:"topbanner",src:e.top_image},void 0,!1,{fileName:u,lineNumber:106,columnNumber:13},this):Object(a.jsxDEV)("img",{className:"topbanner",src:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/goodstop.png"},void 0,!1,{fileName:u,lineNumber:101,columnNumber:13},this),e.picture&&1==e.picture.iswitch?Object(a.jsxDEV)("div",{onClick:e=>this.customComponent(e,"picture","marketing-tupian","\u56fe\u7247"),ref:"picture",className:"picture"==this.state.selectDom?"selectBorder":"",children:Object(a.jsxDEV)("img",{src:e.picture.img,alt:"",className:"picture"},void 0,!1,{fileName:u,lineNumber:114,columnNumber:15},this)},void 0,!1,{fileName:u,lineNumber:109,columnNumber:13},this):null,e.title&&1==e.title.iswitch&&1==e.title.comstyle?Object(a.jsxDEV)("div",{onClick:e=>this.customComponent(e,"title","marketing-fuwenbenkuang","\u6807\u9898"),ref:"title",className:"title"==this.state.selectDom?"selectBorder":"",children:Object(a.jsxDEV)("div",{className:e.title.textAlign+" content-title "+e.title.fontSize,style:{color:e.title.fontColor,fontWeight:"bold"},children:e.title.text},void 0,!1,{fileName:u,lineNumber:125,columnNumber:15},this)},void 0,!1,{fileName:u,lineNumber:120,columnNumber:13},this):null,e.title&&1==e.title.iswitch&&2==e.title.comstyle?Object(a.jsxDEV)("div",{onClick:e=>this.customComponent(e,"title","marketing-fuwenbenkuang","\u6807\u9898"),ref:"title",className:"title"==this.state.selectDom?"selectBorder":"",children:Object(a.jsxDEV)("img",{src:e.title.pic,alt:"",className:"title-pic"},void 0,!1,{fileName:u,lineNumber:146,columnNumber:15},this)},void 0,!1,{fileName:u,lineNumber:141,columnNumber:13},this):null,e.title&&1==e.title.iswitch&&e.title.text||e.picture&&1==e.picture.iswitch&&e.picture.img?Object(a.jsxDEV)("div",{className:"parting-line"},void 0,!1,{fileName:u,lineNumber:151,columnNumber:13},this):null,2==e.list?Object(a.jsxDEV)("img",{className:"goodsPic",src:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/swiper.png"},void 0,!1,{fileName:u,lineNumber:154,columnNumber:13},this):3==e.list?Object(a.jsxDEV)("img",{className:"goodsPicMatrax",src:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/matrix.png"},void 0,!1,{fileName:u,lineNumber:159,columnNumber:13},this):Object(a.jsxDEV)("img",{className:"goodsPicMatrax",src:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/listnew.png"},void 0,!1,{fileName:u,lineNumber:164,columnNumber:13},this),2==e.list?Object(a.jsxDEV)("button",{className:"exchageBtn",style:{color:e.font_color,background:e.button_color},children:e.search?"\u8d2d\u4e70":"\u7acb\u5373\u5151\u6362"},void 0,!1,{fileName:u,lineNumber:170,columnNumber:13},this):null,!e.search&&Object(a.jsxDEV)("ul",{className:"redemptionCode-tabs",children:[Object(a.jsxDEV)("li",{children:[Object(a.jsxDEV)("img",{src:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/coupon/bottombar/home.png",alt:!0},void 0,!1,{fileName:u,lineNumber:183,columnNumber:17},this),Object(a.jsxDEV)("p",{children:"\u9996\u9875"},void 0,!1,{fileName:u,lineNumber:187,columnNumber:17},this)]},void 0,!0,{fileName:u,lineNumber:182,columnNumber:15},this),Object(a.jsxDEV)("li",{children:[Object(a.jsxDEV)("img",{src:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/coupon/bottombar/order.png",alt:!0},void 0,!1,{fileName:u,lineNumber:190,columnNumber:17},this),Object(a.jsxDEV)("p",{children:"\u8ba2\u5355"},void 0,!1,{fileName:u,lineNumber:194,columnNumber:17},this)]},void 0,!0,{fileName:u,lineNumber:189,columnNumber:15},this)]},void 0,!0,{fileName:u,lineNumber:181,columnNumber:13},this),1==e.describe.type?Object(a.jsxDEV)("img",{src:e.describe.bg_image,alt:"",className:1==e.list&&e.describe.bg_image?"bottomTip bottomTipview":"bottomTip"},void 0,!1,{fileName:u,lineNumber:199,columnNumber:13},this):3==e.describe.type?Object(a.jsxDEV)("div",{className:"bottomactiveTip",dangerouslySetInnerHTML:{__html:e.describe.content}},void 0,!1,{fileName:u,lineNumber:209,columnNumber:13},this):null,2==e.describe.type?Object(a.jsxDEV)("img",{className:"susactive_tip",onClick:this.opendescFn.bind(this),src:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/acticeTextTip.png"},void 0,!1,{fileName:u,lineNumber:217,columnNumber:13},this):null]},void 0,!0,{fileName:u,lineNumber:79,columnNumber:9},this),e.bottomBar&&1==e.bottomBar.iswitch?Object(a.jsxDEV)("div",{ref:"bottomBar",onClick:e=>this.customComponent(e,"bottomBar","marketing-list","\u5e95\u90e8\u680f"),className:"bottomBar"==this.state.selectDom?"selectBottomBorder":"",children:Object(a.jsxDEV)(o.a,{bottomBarConfig:e.bottomBar},void 0,!1,{fileName:u,lineNumber:232,columnNumber:13},this)},void 0,!1,{fileName:u,lineNumber:227,columnNumber:11},this):null,this.state.selectDom?Object(a.jsxDEV)("div",{className:"delete-component",style:{top:this.state.clientY},children:[Object(a.jsxDEV)("span",{children:this.state.comName},void 0,!1,{fileName:u,lineNumber:237,columnNumber:13},this),Object(a.jsxDEV)("b",{className:"split",children:"|"},void 0,!1,{fileName:u,lineNumber:238,columnNumber:13},this),Object(a.jsxDEV)("span",{className:"del-color",onClick:this.deleteFn.bind(this),children:"\u5220\u9664"},void 0,!1,{fileName:u,lineNumber:239,columnNumber:13},this)]},void 0,!0,{fileName:u,lineNumber:236,columnNumber:11},this):null]},void 0,!0,{fileName:u,lineNumber:69,columnNumber:7},this)}}},371:function(e,t,i){"use strict";i.d(t,"a",(function(){return r}));i(36),i(109),i(85);var s=i(10),n="/Users/zhangds/web/blue-brother/frontend/src/pages/exchangepage/edittemplate/redPackets.jsx";function r(){return Object(s.jsxDEV)("div",{className:"editor-main goodstemplate details-reduce",children:[Object(s.jsxDEV)("img",{src:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/backprepageBtn.png",className:"preBtn"},void 0,!1,{fileName:n,lineNumber:7,columnNumber:7},this),Object(s.jsxDEV)("img",{src:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/redPacktes/redPackets.png",alt:"",className:"reduce-pic"},void 0,!1,{fileName:n,lineNumber:11,columnNumber:7},this)]},void 0,!0,{fileName:n,lineNumber:6,columnNumber:5},this)}},372:function(e,t,i){"use strict";i.d(t,"a",(function(){return o}));i(36);var s=i(1),n=i.n(s),r=(i(109),i(85),i(10)),l="/Users/zhangds/web/blue-brother/frontend/src/pages/exchangepage/edittemplate/reduce.js";class o extends n.a.Component{constructor(e){super(e),this.state={data:{}}}opendescFn(){this.props.opendesc(!0)}render(){return Object(r.jsxDEV)("div",{className:"editor-main goodstemplate details-reduce",children:[Object(r.jsxDEV)("img",{src:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/backprepageBtn.png",className:"preBtn"},void 0,!1,{fileName:l,lineNumber:18,columnNumber:9},this),[4,8].includes(this.props.templateType)?Object(r.jsxDEV)("div",{className:"coupon-reduce",children:[Object(r.jsxDEV)("img",{src:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/coupon/reduce_coupon.png?v=1",alt:"",className:"reduce-pic"},void 0,!1,{fileName:l,lineNumber:26,columnNumber:13},this),Object(r.jsxDEV)("div",{className:"dflexaj payBtn-view",children:[Object(r.jsxDEV)("div",{className:"coupon-price",children:[Object(r.jsxDEV)("p",{children:["\uffe5",Object(r.jsxDEV)("span",{children:"0.00"},void 0,!1,{fileName:l,lineNumber:34,columnNumber:20},this)]},void 0,!0,{fileName:l,lineNumber:33,columnNumber:17},this),Object(r.jsxDEV)("p",{children:"\u5171\u7701\uffe50.01"},void 0,!1,{fileName:l,lineNumber:36,columnNumber:17},this)]},void 0,!0,{fileName:l,lineNumber:32,columnNumber:15},this),Object(r.jsxDEV)("button",{className:"payBtn",style:{background:this.props.detaildata.reduce.button_color,color:this.props.detaildata.reduce.font_color},children:"\u7acb\u5373\u652f\u4ed8"},void 0,!1,{fileName:l,lineNumber:38,columnNumber:15},this)]},void 0,!0,{fileName:l,lineNumber:31,columnNumber:13},this)]},void 0,!0,{fileName:l,lineNumber:25,columnNumber:11},this):Object(r.jsxDEV)("img",{src:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/coupon/reduce_pic.png?v=2",alt:"",className:"reduce-pic"},void 0,!1,{fileName:l,lineNumber:50,columnNumber:11},this)]},void 0,!0,{fileName:l,lineNumber:17,columnNumber:7},this)}}},417:function(e,t,i){},418:function(e,t,i){},421:function(e,t,i){},430:function(e,t,i){},59:function(e,t,i){"use strict";i.d(t,"Tb",(function(){return a})),i.d(t,"sb",(function(){return m})),i.d(t,"gb",(function(){return d})),i.d(t,"ub",(function(){return p})),i.d(t,"rb",(function(){return h})),i.d(t,"d",(function(){return b})),i.d(t,"bb",(function(){return N})),i.d(t,"ad",(function(){return g})),i.d(t,"c",(function(){return f})),i.d(t,"Ec",(function(){return v})),i.d(t,"Zc",(function(){return j})),i.d(t,"fb",(function(){return x})),i.d(t,"dc",(function(){return y})),i.d(t,"m",(function(){return O})),i.d(t,"A",(function(){return E})),i.d(t,"U",(function(){return D})),i.d(t,"T",(function(){return V})),i.d(t,"xc",(function(){return w})),i.d(t,"p",(function(){return k})),i.d(t,"wc",(function(){return C})),i.d(t,"R",(function(){return S})),i.d(t,"q",(function(){return _})),i.d(t,"eb",(function(){return B})),i.d(t,"tb",(function(){return T})),i.d(t,"cd",(function(){return I})),i.d(t,"nb",(function(){return z})),i.d(t,"lb",(function(){return M})),i.d(t,"mb",(function(){return F})),i.d(t,"Dc",(function(){return R})),i.d(t,"ob",(function(){return q})),i.d(t,"Cc",(function(){return P})),i.d(t,"wb",(function(){return $})),i.d(t,"db",(function(){return L})),i.d(t,"Ob",(function(){return A})),i.d(t,"cb",(function(){return H})),i.d(t,"Nb",(function(){return U})),i.d(t,"qb",(function(){return J})),i.d(t,"V",(function(){return W})),i.d(t,"w",(function(){return K})),i.d(t,"Hc",(function(){return Y})),i.d(t,"jc",(function(){return X})),i.d(t,"vb",(function(){return Q})),i.d(t,"Fc",(function(){return G})),i.d(t,"Gc",(function(){return Z})),i.d(t,"M",(function(){return ee})),i.d(t,"sc",(function(){return te})),i.d(t,"o",(function(){return ie})),i.d(t,"Ac",(function(){return se})),i.d(t,"Y",(function(){return ne})),i.d(t,"Z",(function(){return re})),i.d(t,"xb",(function(){return le})),i.d(t,"ec",(function(){return oe})),i.d(t,"uc",(function(){return ce})),i.d(t,"Qb",(function(){return ae})),i.d(t,"fc",(function(){return ue})),i.d(t,"vc",(function(){return me})),i.d(t,"Cb",(function(){return de})),i.d(t,"Rb",(function(){return pe})),i.d(t,"jb",(function(){return he})),i.d(t,"tc",(function(){return be})),i.d(t,"Kc",(function(){return Ne})),i.d(t,"yb",(function(){return ge})),i.d(t,"kb",(function(){return fe})),i.d(t,"x",(function(){return ve})),i.d(t,"qc",(function(){return je})),i.d(t,"zc",(function(){return xe})),i.d(t,"gc",(function(){return ye})),i.d(t,"r",(function(){return Oe})),i.d(t,"hc",(function(){return Ee})),i.d(t,"kc",(function(){return De})),i.d(t,"t",(function(){return Ve})),i.d(t,"lc",(function(){return we})),i.d(t,"mc",(function(){return ke})),i.d(t,"u",(function(){return Ce})),i.d(t,"nc",(function(){return Se})),i.d(t,"N",(function(){return _e})),i.d(t,"ic",(function(){return Be})),i.d(t,"Lc",(function(){return Te})),i.d(t,"v",(function(){return Ie})),i.d(t,"rc",(function(){return ze})),i.d(t,"n",(function(){return Me})),i.d(t,"S",(function(){return Fe})),i.d(t,"Ib",(function(){return Re})),i.d(t,"pc",(function(){return qe})),i.d(t,"Gb",(function(){return Pe})),i.d(t,"z",(function(){return $e})),i.d(t,"Bc",(function(){return Le})),i.d(t,"Fb",(function(){return Ae})),i.d(t,"f",(function(){return He})),i.d(t,"Jc",(function(){return Ue})),i.d(t,"Eb",(function(){return Je})),i.d(t,"Db",(function(){return We})),i.d(t,"Ic",(function(){return Ke})),i.d(t,"e",(function(){return Ye})),i.d(t,"y",(function(){return Xe})),i.d(t,"Hb",(function(){return Qe})),i.d(t,"Pb",(function(){return Ge})),i.d(t,"g",(function(){return Ze})),i.d(t,"P",(function(){return et})),i.d(t,"bd",(function(){return tt})),i.d(t,"Q",(function(){return it})),i.d(t,"Vb",(function(){return st})),i.d(t,"Yb",(function(){return nt})),i.d(t,"Xb",(function(){return rt})),i.d(t,"ac",(function(){return lt})),i.d(t,"hb",(function(){return ot})),i.d(t,"L",(function(){return ct})),i.d(t,"cc",(function(){return at})),i.d(t,"Zb",(function(){return ut})),i.d(t,"oc",(function(){return mt})),i.d(t,"ab",(function(){return dt})),i.d(t,"Jb",(function(){return pt})),i.d(t,"b",(function(){return ht})),i.d(t,"ib",(function(){return bt})),i.d(t,"h",(function(){return Nt})),i.d(t,"k",(function(){return gt})),i.d(t,"j",(function(){return ft})),i.d(t,"i",(function(){return vt})),i.d(t,"J",(function(){return jt})),i.d(t,"Lb",(function(){return xt})),i.d(t,"Nc",(function(){return yt})),i.d(t,"Oc",(function(){return Ot})),i.d(t,"a",(function(){return Et})),i.d(t,"H",(function(){return Dt})),i.d(t,"X",(function(){return Vt})),i.d(t,"s",(function(){return wt})),i.d(t,"yc",(function(){return kt})),i.d(t,"W",(function(){return Ct})),i.d(t,"E",(function(){return St})),i.d(t,"B",(function(){return _t})),i.d(t,"C",(function(){return Bt})),i.d(t,"F",(function(){return Tt})),i.d(t,"Qc",(function(){return It})),i.d(t,"Ub",(function(){return zt})),i.d(t,"Mb",(function(){return Mt})),i.d(t,"I",(function(){return Ft})),i.d(t,"D",(function(){return Rt})),i.d(t,"G",(function(){return qt})),i.d(t,"Uc",(function(){return Pt})),i.d(t,"Sc",(function(){return $t})),i.d(t,"Tc",(function(){return Lt})),i.d(t,"Wb",(function(){return At})),i.d(t,"Rc",(function(){return Ht})),i.d(t,"Xc",(function(){return Ut})),i.d(t,"K",(function(){return Jt})),i.d(t,"Yc",(function(){return Wt})),i.d(t,"Vc",(function(){return Kt})),i.d(t,"Wc",(function(){return Yt})),i.d(t,"Mc",(function(){return Xt})),i.d(t,"Pc",(function(){return Qt})),i.d(t,"Bb",(function(){return Gt})),i.d(t,"Sb",(function(){return Zt})),i.d(t,"dd",(function(){return ei})),i.d(t,"bc",(function(){return ti})),i.d(t,"Ab",(function(){return ii})),i.d(t,"pb",(function(){return si})),i.d(t,"zb",(function(){return ni})),i.d(t,"O",(function(){return ri})),i.d(t,"Kb",(function(){return li})),i.d(t,"l",(function(){return oi}));var s=i(390);let n="http://test.marketapi.1688sup.com",r="https://ewm.83323.cn";const l=(e,t,i,s)=>{let n={method:e,headers:{Authorization:`Bearer ${sessionStorage.getItem("authorization")}`},body:i};return fetch(t,n).then((e=>{if(200==e.status)return e.json();u(e)})).then((e=>e)).catch((e=>{}))},o=(e,t,i,s)=>{var n={responseType:"blob",headers:{Authorization:`Bearer ${sessionStorage.getItem("authorization")}`}};if("get"==e&&i){let e=[];Object.keys(i).forEach((t=>e.push(t+"="+i[t]))),-1===t.search(/\?/)?t+="?"+e.join("&"):t+="&"+e.join("&")}return fetch(t,n).then((e=>{if(200==e.status)return e.blob();u(e)})).then((e=>e)).catch((e=>{}))},c=(e,t,i,s)=>{const n=`Bearer ${sessionStorage.getItem("authorization")}`;var r=null;if("get"==e&&(r={headers:{Authorization:n}},i)){let e=[];Object.keys(i).forEach((t=>e.push(t+"="+i[t]))),-1===t.search(/\?/)?t+="?"+e.join("&"):t+="&"+e.join("&")}if("unified"===e){r={method:"get",headers:{Authorization:`Bearer ${sessionStorage.getItem("unified-token")}`}}}return"login"==e&&(r={method:"post",body:JSON.stringify(i),headers:new Headers({"Content-Type":"application/json"})}),"post"!=e&&"put"!=e&&"delete"!=e||(r={method:e,body:JSON.stringify(i),headers:{"Content-Type":"application/json",Authorization:n}}),fetch(t,r).then((e=>{if(window.timeshow=e.headers.get("Date-Time"),200==e.status)return e.json();u(e)})).then((e=>e)).catch((e=>{}))},a=(e,t,i)=>{e&&200==e.code?t(e.data,e.message):e&&"function"==typeof i&&(s.a.clear(),i(e.message))};function u(e){switch(e.status){case 401:e.json().then((e=>{s.a.clear(),s.a.error((null===e||void 0===e?void 0:e.message)||(null===e||void 0===e?void 0:e.mes)),setTimeout((()=>{window.location.href="/"}),2e3)})).catch();break;case 403:e.json().then((e=>{s.a.clear(),s.a.error((null===e||void 0===e?void 0:e.message)||(null===e||void 0===e?void 0:e.mes))})).catch();break;default:return}}const m=e=>c("get",n+"/plan",e),d=e=>c("get",n+"/keys",e),p=e=>c("get",n+"/reseller/choice",e),h=e=>c("get",n+"/plan/chose_list",e),b=(e,t)=>{let i=e?"/"+e:"";return c(i?"put":"post",n+"/plan/step"+i,t)},N=(e,t)=>c("get",n+"/plan/draft/"+e,t),g=(e,t)=>c("put",n+"/plan/status/"+e,t),f=(e,t)=>c("post",n+"/plan/"+e+"/keys",t),v=(e,t)=>c("put",n+"/plan/edit/"+e,t),j=(e,t)=>c("put",n+"/keys/status/"+e,t),x=(e,t)=>c("get",n+"/keys/"+e,t),y=(e,t)=>c("put",n+"/plan/send/"+e,t),O=(e,t)=>c("put",n+"/keys/cancel/"+e,t),E=e=>c("delete",n+"/plan/delete/"+e),D=e=>((e,t,i,s)=>{var n=null;if("get"==e&&(n={headers:{Authorization:`Bearer ${sessionStorage.getItem("authorization")}`}},i)){let e=[];Object.keys(i).forEach((t=>e.push(t+"="+i[t]))),-1===t.search(/\?/)?t+="?"+e.join("&"):t+="&"+e.join("&")}return fetch(t,n).then((e=>{if(window.timeshow=e.headers.get("Date-Time"),200==e.status)return e.text();u(e)})).then((e=>e)).catch((e=>{}))})("get",n+"/codes",e),V=e=>c("get",n+"/codes/"+e),w=(e,t)=>c("put",n+"/codes/edit/"+e,t),k=e=>c("delete",n+"/codes/discard/"+e),C=(e,t)=>c("put",n+"/codes/status/"+e,t),S=e=>c("get",n+"/codes/products",e),_=e=>c("delete",n+"/codes/products/"+e),B=(e,t)=>c("post",n+"/codes/"+e+"/is_require_approval",t),T=e=>c("get",n+"/product/market/products",e),I=e=>l("post",n+"/upload/simple",e),z=e=>c("get",n+"/order",e),M=e=>c("get",n+"/order/"+e),F=e=>c("get",n+"/order/export",e),R=e=>c("put",n+"/order/success/"+e),q=(e,t)=>c("get",n+"/order/"+e+"/log",t),P=e=>c("put",n+"/order/cancel/"+e),$=e=>c("get",n+"/reseller",e),L=e=>c("get",n+"/reseller/exist_name?name="+e),A=(e,t)=>c("get",n+"/reseller/exist_name?name="+e,t),H=e=>c("get",n+"/reseller/exist_account/"+e),U=(e,t)=>c("get",n+"/reseller/exist_account/"+e,t),J=()=>c("get",n+"/auth/admin/all"),W=()=>c("get",n+"/auth/company/all"),K=e=>c("delete",n+"/reseller/"+e),Y=(e,t)=>c("put",n+"/reseller/status/"+e,t),X=e=>c("post",n+"/reseller/create",e),Q=e=>c("get",n+"/reseller/"+e),G=(e,t)=>c("put",n+"/reseller/"+e,t),Z=(e,t)=>c("put",n+"/reseller/password/"+e,t),ee=e=>c("get",n+"/auth/admin",e),te=(e,t)=>c("put",n+"/auth/admin/status/"+e,t),ie=e=>c("delete",n+"/auth/admin/"+e),se=(e,t)=>c("put",n+"/auth/admin/password/"+e,t),ne=e=>c("get",n+"/auth/department",e),re=e=>c("get",n+"/auth/departmentJob",e),le=e=>c("get",n+"/auth/adminRole",e),oe=e=>c("post",n+"/auth/admin",e),ce=(e,t)=>c("put",n+"/auth/admin/"+e,t),ae=e=>c("get",n+"/auth/admin/adminRoleRules/"+e),ue=e=>c("post",n+"/auth/admin/createSon",e),me=(e,t)=>c("put",n+"/auth/admin/editSon/"+e,t),de=e=>c("get",n+"/auth/admin/sonIndex",e),pe=(e,t)=>c("get",n+"/auth/admin/accountSonIndex/"+e,t),he=e=>c("get",n+"/auth/admin/roleAccounts/"+e),be=e=>c("put",n+"/auth/admin/downMigration",e),Ne=e=>c("put",n+"/auth/admin/equalMigration",e),ge=e=>c("get",n+"/auth/adminRole",e),fe=e=>c("get",n+"/auth/menu/tree",e),ve=e=>c("delete",n+"/auth/adminRole/"+e),je=e=>c("post",n+"/auth/adminRole",e),xe=(e,t)=>c("put",n+"/auth/adminRole/"+e,t),ye=e=>c("post",n+"/auth/company",e),Oe=e=>c("delete",n+"/auth/company/"+e),Ee=(e,t)=>c("put",n+"/auth/company/"+e,t),De=e=>c("post",n+"/auth/department",e),Ve=e=>c("delete",n+"/auth/department/"+e),we=(e,t)=>c("put",n+"/auth/department/"+e,t),ke=e=>c("post",n+"/auth/departmentJob",e),Ce=e=>c("delete",n+"/auth/departmentJob/"+e),Se=(e,t)=>c("put",n+"/auth/departmentJob/"+e,t),_e=e=>c("get",n+"/enum",e),Be=e=>c("post",n+"/auth/menu",e),Te=(e,t)=>c("put",n+"/auth/menu/"+e,t),Ie=e=>c("delete",n+"/auth/menu/"+e),ze=e=>l("post",n+"/plan/theme/custom",e),Me=(e,t)=>l("put",n+"/plan/theme/clone/"+e,t),Fe=()=>c("get","http://api.test.user.1688sup.com/v1/menu/myCodes?systemId=2"),Re=e=>c("get",n+"/auth/admin/userinfo",e),qe=e=>c("post",n+"/auth/login/mobile",e),Pe=e=>c("get",n+"/plan/plan_theme",e),$e=e=>c("delete",n+"/plan/theme/"+e),Le=(e,t)=>c("put",n+"/plan/theme/"+e,t),Ae=e=>c("get",n+"/plan/theme/choice",e),He=e=>c("post",n+"/plan/theme",e),Ue=(e,t)=>c("put",n+"/plan/plan_theme/"+e,t),Je=e=>c("get",n+"/plan/theme",e),We=e=>c("get",n+"/plan/theme/system",e),Ke=(e,t)=>c("put",n+"/plan/theme/system/"+e,t),Ye=e=>c("post",n+"/plan/theme/system",e),Xe=e=>c("delete",n+"/plan/theme/system/"+e),Qe=()=>c("get",n+"/plan/theme/getThemeType"),Ge=(e,t)=>c("get",n+"/key/"+e,t),Ze=(e,t)=>c("post",n+"/plan/"+e+"/approvals",t),et=(e,t)=>c("get",n+"/approvals/"+e+"/market_approval_data",t),tt=(e,t)=>c("put",n+"/approvals/"+e+"/terminate",t),it=(e,t)=>c("get",n+"/approvals/"+e+"/status"),st=e=>c("put",n+"/key/batch_cancel",e),nt=e=>c("put",n+"/key/cancel",e),rt=e=>c("put",n+"/key/batch_usage",e),lt=e=>c("put",n+"/key/usage",e),ot=e=>c("get",n+"/key/log/list",e),ct=e=>c("post",n+"/keys/mobileAccessVerification",e),at=e=>c("put",n+"/plan/cancel/"+e),ut=(e,t)=>c("post",n+"/keys/"+e+"/approval",t),mt=e=>c("get",n+"/auth/logout",e),dt=e=>c("get",n+"/reseller/direct",e),pt=()=>c("get",n+"/auth/admin/voucherWarningAccount"),ht=(e,t)=>c("post",`http://test.marketapi.1688sup.com/codes/voucher/fund/${t}`,e),bt=e=>c("get",n+"/key",e),Nt=(e,t)=>l("post",n+e,t),gt=e=>c("post",n+"/key/batchUploadVoid",e),ft=e=>c("post",n+"/key/batchUploadUsed",e),vt=e=>c("post",n+"/keys/batchSend",e),jt=e=>o("get",n+"/key/export",e),xt=e=>c("get",n+"/plan/get_copy_data/"+e),yt=e=>c("get",n+"/keys/queryKeyBatch",e),Ot=e=>c("get",n+"/plan/queryPlan",e),Et=e=>c("post",n+"/coupon/add",e),Dt=(e,t)=>c("put",`http://test.marketapi.1688sup.com/coupon/${e}`,t),Vt=e=>c("get",n+"/coupon",e),wt=e=>c("put",`http://test.marketapi.1688sup.com/coupon/void/${e}`),kt=(e,t)=>c("put",`http://test.marketapi.1688sup.com/coupon/status/${e}`,t),Ct=e=>c("get",`http://test.marketapi.1688sup.com/coupon/${e}`),St=e=>c("delete",`http://test.marketapi.1688sup.com/goods/${e}`),_t=e=>c("delete",`http://test.marketapi.1688sup.com/codes/delete/${e}`),Bt=e=>c("delete",`http://test.marketapi.1688sup.com/coupon/delete/${e}`),Tt=e=>c("delete",`http://test.marketapi.1688sup.com/keybatch/${e}`),It=e=>c("put",`http://test.marketapi.1688sup.com/order/refund/${e}`),zt=(e,t)=>c("put",`http://test.marketapi.1688sup.com/order/hand_refund/${e}`,t),Mt=e=>c("get",r+"/export/excel/marketOrder/record",e),Ft=e=>o("get",`https://ewm.83323.cn/export/excel/marketOrder/download/${e}`),Rt=e=>c("get",`https://ewm.83323.cn/export/excel/marketOrder/delete/${e}`),qt=e=>c("post",`http://test.marketapi.1688sup.com/approvals/${e}/query`),Pt=e=>c("get",n+"/order/searchPendingOrderByObject",e),$t=e=>c("post",n+"/order/searchPendingOrderByHash",e),Lt=e=>c("post",n+"/order/searchPendingOrderByKeys",e),At=e=>((e,t,i,s)=>{var n={responseType:"blob",method:e,body:JSON.stringify(i),headers:{"Content-Type":"application/json",Authorization:`Bearer ${sessionStorage.getItem("authorization")}`}};return fetch(t,n).then((e=>{if(200==e.status)return e.blob();u(e)})).then((e=>e)).catch((e=>{}))})("post",n+"/keybatch/export",e),Ht=e=>c("post",n+"/order/resendCardCode",e),Ut=(e,t)=>c("put",`http://test.marketapi.1688sup.com/reseller/merchant/${e}`,t),Jt=e=>c("get",n+"/reseller/merchant/generateRsaKey",e),Wt=e=>c("post",n+"/voucher/setResellerConf",e),Kt=e=>c("post",n+"/voucher/setKeyBatchConf",e),Yt=e=>c("post",n+"/voucher/setPlanConf",e),Xt=e=>c("get",n+"/voucher/queryConfig",e),Qt=e=>c("post",n+"/voucher/receiveRetry",e),Gt=()=>c("get",n+"/plan/settlementType"),Zt=e=>c("get",n+"/goods/goodsListByPlanId/"+e),ei=e=>c("post",n+"/order/voucherUsageQuery",e),ti=e=>c("post",n+"/order/notifyReseller",e),ii=e=>c("get",n+"/settlement_order/list",e),si=e=>c("get",n+"/settlement_order/detail/"+e),ni=e=>o("get",n+"/settlement_order/export",e),ri=()=>c("get",n+"/reseller/merchant/getApiMode"),li=e=>c("get",n+"/plan/getPostbankMerNo",e),oi=e=>c("post",n+"/plan/bindPostbankMerNo",e)},61:function(e,t,i){"use strict";i.d(t,"a",(function(){return u}));var s=i(1),n=i.n(s),r=i(11),l=i.n(r),o=(i(421),i(167)),c=i(10),a="/Users/zhangds/web/blue-brother/frontend/src/components/input/main.js";class u extends n.a.Component{constructor(e){super(e);this.clearContent=this.clearContent.bind(this),this.state={iptVal:e.value,errmsg:"",focus:1,iptVallength:0,errshow:!1},this.handleInputChange=this.handleInputChangeFn.bind(this),this.losefofn=this.losefofn.bind(this),this.focusFn=this.focusFn.bind(this),this.sureFns=this.sureFns.bind(this)}handleInputChangeFn(e){""!=e.target.value&&this.setState({errshow:!1})}componentWillMount(){let e=this.props.value?this.props.value:"";if(""!=e&&(this.setState({iptVal:e}),this.setState({iptVallength:String(e).length})),this.props.rule){let e=this.props.rule.message;this.setState({errmsg:e})}}clearContent(e){let t=e.target.value;this.setState({iptVal:t}),this.setState({iptVallength:t.length}),this.props.onChange(t)}clearItem(){this.setState({iptVal:""}),this.setState({iptVallength:0}),this.props.onClearItem()}focusFn(e){this.props.placeholder.length>10&&this.setState({focus:0}),this.props.onfocusFn&&this.props.onfocusFn(e.target.value)}losefofn(e){this.props.placeholder.length>10&&this.setState({focus:1}),""==e.target.value?this.setState({errshow:!0}):this.props.onblurFn&&this.props.onblurFn(e.target.value)}sureFns(e){e.target.value&&13==e.keyCode&&this.props.wordSearch&&this.props.wordSearch()}showpwdFn(e){e.props.markedShow&&("password"==e.props.kind?e.props.markedShow("text"):e.props.markedShow("password"))}render(){const{defalutCls:e,maxLength:t,kind:i,disabled:s,unit:n,front:r,icon:u,value:m,required:d,countShow:p,className:h,onChange:b,labelText:N,alignment:g,placeholder:f,height:v,width:j,clearShow:x,labelWidth:y}=this.props;let O,E;O=" "!=this.state.errmsg&&""==this.state.iptVal?"errorbor":"successbor",d||(O=""==this.state.iptVal?"normolbor":"successbor"),E=0!=this.state.focus||this.props.prolong?"losefocus":"getfocus";const D=l()({[`${e}`]:e,[`${O}`]:`${O}`,[`${E}`]:`${E}`,searchShow:`${u}`,"":{}});return Object(c.jsxDEV)("div",{className:"iptfillself",children:["0px"==this.props.labelWidth?null:Object(c.jsxDEV)("div",{className:"label",style:{width:y,textAlign:g},children:[Object(c.jsxDEV)("span",{className:"labeltip",children:N},void 0,!1,{fileName:a,lineNumber:181,columnNumber:13},this),d?Object(c.jsxDEV)("font",{className:"warning",children:"*"},void 0,!1,{fileName:a,lineNumber:182,columnNumber:25},this):null]},void 0,!0,{fileName:a,lineNumber:178,columnNumber:11},this),Object(c.jsxDEV)("div",{className:"iptlabel",children:[Object(c.jsxDEV)("div",{className:"iptright",children:[r?Object(c.jsxDEV)("font",{className:"front",children:r},void 0,!1,{fileName:a,lineNumber:188,columnNumber:22},this):null,u?Object(c.jsxDEV)(o.a,{type:"search",className:"iconType"},void 0,!1,{fileName:a,lineNumber:189,columnNumber:21},this):null,Object(c.jsxDEV)("input",{autoComplete:"password"==i?"new-password":"off",name:this.props.name,disabled:s,type:i,onBlur:this.losefofn,onFocus:this.focusFn,value:this.props.value,onKeyDown:e=>this.sureFns(e),maxLength:t,onChange:this.clearContent,onInput:this.handleInputChange,style:{resize:"none",height:v,lineHeight:v,width:j,textOverflow:"ellipsis"},className:D,placeholder:f||"\u8bf7\u8f93\u5165"},void 0,!1,{fileName:a,lineNumber:190,columnNumber:13},this),Object(c.jsxDEV)("div",{className:"ipticonR",children:[0==s&&this.props.markedShow?Object(c.jsxDEV)("span",{className:"showpwd",onClick:()=>this.showpwdFn(this),children:"text"==i?Object(c.jsxDEV)(o.a,{type:"eye-o",className:"pwdShow"},void 0,!1,{fileName:a,lineNumber:216,columnNumber:21},this):Object(c.jsxDEV)(o.a,{className:"pwdShow",type:"closed-eye"},void 0,!1,{fileName:a,lineNumber:218,columnNumber:21},this)},void 0,!1,{fileName:a,lineNumber:214,columnNumber:17},this):null,0==s&&1==x&&this.state.iptVal?Object(c.jsxDEV)("svg",{onClick:this.clearItem.bind(this),viewBox:"0 0 16 16",width:"16px",height:"16px",children:[Object(c.jsxDEV)("circle",{fill:"#AAAFBA",fillRule:"evenodd",cx:"8",cy:"8",r:"8"},void 0,!1,{fileName:a,lineNumber:228,columnNumber:19},this),Object(c.jsxDEV)("path",{d:"M5.333 5.333l5.334 5.334M10.667 5.333l-5.334 5.334",stroke:"#FFF",strokeLinecap:"square"},void 0,!1,{fileName:a,lineNumber:234,columnNumber:19},this)]},void 0,!0,{fileName:a,lineNumber:223,columnNumber:17},this):null,0==s&&1==p?Object(c.jsxDEV)("span",{className:"countTip",children:[String(this.props.value).length,"/",t]},void 0,!0,{fileName:a,lineNumber:241,columnNumber:17},this):null,n?Object(c.jsxDEV)("font",{className:"unit",children:n},void 0,!1,{fileName:a,lineNumber:245,columnNumber:23},this):null]},void 0,!0,{fileName:a,lineNumber:212,columnNumber:13},this)]},void 0,!0,{fileName:a,lineNumber:187,columnNumber:11},this),this.state.errshow||" "!=this.state.errmsg&&""==this.state.iptVal?Object(c.jsxDEV)("p",{className:"errtip",children:this.state.errmsg},void 0,!1,{fileName:a,lineNumber:251,columnNumber:13},this):null]},void 0,!0,{fileName:a,lineNumber:186,columnNumber:9},this)]},void 0,!0,{fileName:a,lineNumber:176,columnNumber:7},this)}}u.defaultProps={defalutCls:"keep-ipt",height:"40px",width:"200px",clearShow:!0,alignment:"left",countShow:!0,required:!1,labelWidth:"120px",icon:"",kind:"text",unit:null,front:null,disabled:!1}},62:function(e,t,i){"use strict";i.d(t,"a",(function(){return o}));var s=i(1),n=i.n(s),r=(i(417),i(10)),l="/Users/zhangds/web/blue-brother/frontend/src/components/form-item/main.js";class o extends n.a.Component{constructor(e){super(e)}render(){const{labelname:e,prop:t,labelwidth:i,myClassName:s,id:n,required:o}=this.props;return Object(r.jsxDEV)("div",{className:s?s+" form-Item":"form-Item",id:n||null,children:[Object(r.jsxDEV)("div",{className:"form-label",style:{width:i||"180px"},children:[e,o?Object(r.jsxDEV)("span",{className:"mustwrite",children:"*"},void 0,!1,{fileName:l,lineNumber:22,columnNumber:23},this):null]},void 0,!0,{fileName:l,lineNumber:18,columnNumber:9},this),Object(r.jsxDEV)("div",{className:"form-compontent",children:this.props.children},void 0,!1,{fileName:l,lineNumber:24,columnNumber:9},this),Object(r.jsxDEV)("div",{className:"form-expand",children:this.props.expand},void 0,!1,{fileName:l,lineNumber:25,columnNumber:9},this)]},void 0,!0,{fileName:l,lineNumber:15,columnNumber:7},this)}}o.defaultProps={required:"*"}},63:function(e,t,i){"use strict";i.d(t,"a",(function(){return d}));var s=i(1),n=i.n(s),r=(i(418),i(419)),l=i(510),o=i(81),c=i(24),a=i.n(c),u=i(69),m=i(10);class d extends n.a.Component{constructor(e){super(e),this.state={children:e.children,model:e.model,rules:e.rules}}componentWillReceiveProps(e){this.setState({children:e.children}),this.setState({model:e.model}),this.setState({rules:e.rules})}componentDidMount(){u.a.addListener("change",((e,t)=>{let i=document.getElementById(e).getElementsByClassName("form-compontent"),s=Object(r.a)(this.props.rules,e),n=i[0].firstChild;t?this.removeClass(i[0]):setTimeout((()=>{this.isRequired("",n.className,i[0],s[0].message)}),300)}));let e=this;u.a.addListener("input",((t,i)=>{let s=document.getElementById(t).getElementsByClassName("form-compontent"),n=Object(r.a)(this.props.rules,t),l=s[0].firstChild;if(n)for(let r=0;r{let t=document.getElementById(e).getElementsByClassName("form-compontent"),i=Object(r.a)(this.props.rules,e),s=t[0].firstChild;setTimeout((()=>{this.isRequired("",s.className,t[0],i[0].message)}),300)}));let t=a.a.findDOMNode(this).getElementsByClassName("form-Item"),i=Object(l.a)(this.props.children,(e=>null!=e));for(let l=0;l0&&o&&(i[0].oninput=function(i){for(let r=0;r0;)i[0].remove();t.indexOf("error")>-1&&(e.firstChild.className=t.replace(" error",""))}isRequired(e,t,i,s){if(i.firstChild.className.indexOf("error")<0&&i.lastChild.className.indexOf("error-msg")<0){var n=document.createElement("div");n.className="error-msg",n.innerHTML=""+s+"",i.firstChild.className+=" error",i.appendChild(n)}}componentDidUpdate(e,t){let i=this.props.children[0];Object(r.a)(i,"props.children.props");t.children,this.state.children}cancel(){let e=document.getElementsByClassName("form-Item"),t=this;for(let s=0;snull!=e));for(let l=0;l0&&r[0].focus(),t.removeClass(a),t.isRequired(e.value,p.className,a,s[n].message),i=!1;break}t.removeClass(a)}if("regExp"==s[n].type){c=s[n].reg,u=new RegExp(c);let r=e.value;if(!u.test(r)){i=!1,t.isRequired(e.value,p.className,a,s[n].message);break}t.removeClass(a)}}}}return i}render(){return Object(m.jsxDEV)("div",{className:"form",children:[" ",this.props.children," "]},void 0,!0,{fileName:"/Users/zhangds/web/blue-brother/frontend/src/components/form/main.js",lineNumber:342,columnNumber:12},this)}}},69:function(e,t,i){"use strict";var s=i(413);t.a=new s.EventEmitter},85:function(e,t,i){}}]); \ No newline at end of file diff --git a/build/static/js/7.e0d64947.chunk.js b/build/static/js/7.0c8f10fc.chunk.js similarity index 99% rename from build/static/js/7.e0d64947.chunk.js rename to build/static/js/7.0c8f10fc.chunk.js index 08bc5bf0..0356a5e6 100644 --- a/build/static/js/7.e0d64947.chunk.js +++ b/build/static/js/7.0c8f10fc.chunk.js @@ -1,2 +1,2 @@ -/*! For license information please see 7.e0d64947.chunk.js.LICENSE.txt */ -(this.webpackJsonpmarketingsystem=this.webpackJsonpmarketingsystem||[]).push([[7],{102:function(e,t,i){},136:function(e,t,i){},137:function(e,t,i){},190:function(e,t,i){},191:function(e,t,i){},194:function(e,t,i){},195:function(e,t,i){},215:function(e,t,i){},217:function(e,t,i){},218:function(e,t,i){},219:function(e,t,i){},220:function(e,t,i){},221:function(e,t,i){},222:function(e,t,i){},223:function(e,t,i){},224:function(e,t,i){},225:function(e,t,i){},226:function(e,t,i){},232:function(e,t,i){},233:function(e,t,i){},234:function(e,t,i){},236:function(e,t,i){},237:function(e,t,i){},238:function(e,t,i){},239:function(e,t,i){},244:function(e,t,i){},245:function(e,t,i){},246:function(e,t,i){},247:function(e,t,i){},248:function(e,t,i){},249:function(e,t,i){},250:function(e,t,i){},251:function(e,t,i){},252:function(e,t,i){},253:function(e,t,i){},254:function(e,t,i){},255:function(e,t,i){},257:function(e,t,i){},258:function(e,t,i){},259:function(e,t,i){},260:function(e,t,i){},261:function(e,t,i){},262:function(e,t,i){},263:function(e,t,i){},264:function(e,t,i){},265:function(e,t,i){},266:function(e,t,i){},267:function(e,t,i){},268:function(e,t,i){},269:function(e,t,i){},270:function(e,t,i){},271:function(e,t,i){},272:function(e,t,i){},273:function(e,t,i){},274:function(e,t,i){},275:function(e,t,i){},276:function(e,t,i){"use strict";i.d(t,"a",(function(){return dn})),i.d(t,"b",(function(){return cn})),i.d(t,"c",(function(){return un}));var a=i(59),s=i(62),l=i(63),n=i(61),o=i(490),r=i(1),m=i.n(r),c=i(390),d=i(453),u=i(177),h=i(10),b="/Users/zhangds/web/blue-brother/frontend/src/pages/callbackMessage/index.jsx";var p=i(24),N=i.n(p),j=(i(190),i(196)),v=i(454),g=i(167),f=i(512),_=i(510),x=i(419),y=(i(191),i(511)),O=i(501),D=i(423),E="/Users/zhangds/web/blue-brother/frontend/src/components/pagination/main.js";class V extends m.a.Component{constructor(e){super(e),this.state={count:10,page:1|e.page,visible:!1,jump_page:"",page_num:"",dataCount:this.props.data}}getPageArr(e,t,i){var a,s=[].concat(e),l=s.length,n="\u2026";if(t=Math.max(1,Math.min(t,l)),l<=i)return s[t-1]=""+s[t-1],s;for(s=[""+t],a=(i=Math.max(5,i||7))-1;;){var o=+s[0],r=+s[s.length-1];if(o>1&&(s.unshift(o-1),!--a))break;if(rt?t:e.target.value;this.setState({jump_page:i})}onJumpPage(e){""!=e&&(this.setState({page:e}),this.props.onJumpPage(e),this.setState({jump_page:""}))}onMenuClick(e,t){switch(this.onJumpPage(1),t){case"1":this.setState({count:10}),this.props.onCountChange(10);break;case"2":this.setState({count:20}),this.props.onCountChange(20);break;case"3":this.setState({count:50}),this.props.onCountChange(50);break;case"4":this.setState({count:100}),this.props.onCountChange(100);break;case"5":this.setState({count:200}),this.props.onCountChange(200)}this.setState({visible:!1})}componentWillMount(){}componentWillReceiveProps(e){e.page&&this.setState({page:e.page})}render(){const{data:e}=this.props;let t=Math.ceil(e.count/this.state.count),i=[];for(let s=1;sthis.setState({visible:e}),children:[Object(h.jsxDEV)(y.b,{children:Object(h.jsxDEV)("div",{className:"show-count",children:[Object(h.jsxDEV)("span",{className:"count-value",children:[" ",this.state.count]},void 0,!0,{fileName:E,lineNumber:179,columnNumber:19},this)," ",Object(h.jsxDEV)(g.a,{type:"down"},void 0,!1,{fileName:E,lineNumber:179,columnNumber:76},this)," "]},void 0,!0,{fileName:E,lineNumber:178,columnNumber:17},this)},void 0,!1,{fileName:E,lineNumber:177,columnNumber:15},this),Object(h.jsxDEV)(y.c,{children:Object(h.jsxDEV)(O.a,{onClick:(e,t)=>{this.onMenuClick(e,t)},className:"mymenu",children:[Object(h.jsxDEV)(D.a,{children:"10"},1,!1,{fileName:E,lineNumber:189,columnNumber:19},this),Object(h.jsxDEV)(D.a,{children:"20"},2,!1,{fileName:E,lineNumber:190,columnNumber:19},this),Object(h.jsxDEV)(D.a,{children:"50"},3,!1,{fileName:E,lineNumber:191,columnNumber:19},this),Object(h.jsxDEV)(D.a,{children:"100"},4,!1,{fileName:E,lineNumber:192,columnNumber:19},this),Object(h.jsxDEV)(D.a,{children:"200"},5,!1,{fileName:E,lineNumber:193,columnNumber:19},this)]},void 0,!0,{fileName:E,lineNumber:183,columnNumber:17},this)},void 0,!1,{fileName:E,lineNumber:182,columnNumber:15},this)]},void 0,!0,{fileName:E,lineNumber:172,columnNumber:13},this)},void 0,!1,{fileName:E,lineNumber:171,columnNumber:11},this),Object(h.jsxDEV)("span",{children:"\u6761"},void 0,!1,{fileName:E,lineNumber:198,columnNumber:11},this),Object(h.jsxDEV)("div",{className:"page-btn-group",children:[Object(h.jsxDEV)(g.a,{onClick:()=>{this.onPrevClick()},type:"left",className:this.state.page>1?"page-prev":"page-prev disabled"},void 0,!1,{fileName:E,lineNumber:200,columnNumber:13},this),"undefined"!=a?a.map(((e,t)=>Object(h.jsxDEV)("div",{onClick:()=>{this.onPageClick(e)},className:e==this.state.page?"btn-page active":"btn-page",children:e},t,!1,{fileName:E,lineNumber:210,columnNumber:21},this))):1,Object(h.jsxDEV)(g.a,{onClick:()=>{this.onNextClick()},type:"right",className:this.state.page>=t?"page-next disabled":"page-next"},void 0,!1,{fileName:E,lineNumber:222,columnNumber:13},this),Object(h.jsxDEV)("div",{className:"jump-button",children:[Object(h.jsxDEV)("div",{className:"jump-button-left",children:Object(h.jsxDEV)("input",{type:"text",value:this.state.jump_page,onChange:e=>{this.onInputChange(e,t)}},void 0,!1,{fileName:E,lineNumber:232,columnNumber:17},this)},void 0,!1,{fileName:E,lineNumber:231,columnNumber:15},this),Object(h.jsxDEV)("div",{className:"jump-button-right",onClick:e=>{this.onJumpPage(this.state.jump_page)},children:"\u8df3\u8f6c"},void 0,!1,{fileName:E,lineNumber:240,columnNumber:15},this)]},void 0,!0,{fileName:E,lineNumber:230,columnNumber:13},this)]},void 0,!0,{fileName:E,lineNumber:199,columnNumber:11},this)]},void 0,!0,{fileName:E,lineNumber:169,columnNumber:9},this)},void 0,!1,{fileName:E,lineNumber:168,columnNumber:7},this)}}i(194),i(195);var k="/Users/zhangds/web/blue-brother/frontend/src/components/inputborder/main.js";class S extends m.a.Component{constructor(e){super(e),this.state={text:e.text,length:e.text.length,maxlength:24}}onChange(e){this.setState({text:e.target.value}),this.inputdoing||this.setState({length:this.state.text.length}),this.props.onChange(e.target.value)}compositionstart(e){this.inputdoing=!0}compositionend(e){this.inputdoing=!1,this.setState({length:this.state.text.length})}render(){return Object(h.jsxDEV)("div",{className:"border-input",children:[Object(h.jsxDEV)("input",{value:this.state.text,onCompositionStart:e=>{this.compositionstart(e)},onCompositionEnd:e=>{this.compositionend(e)},onInput:e=>{this.onChange(e)},maxlength:this.state.maxlength,type:"text"},void 0,!1,{fileName:k,lineNumber:31,columnNumber:9},this),Object(h.jsxDEV)("div",{className:"input-label",children:[this.state.length,"/",this.state.maxlength]},void 0,!0,{fileName:k,lineNumber:45,columnNumber:9},this)]},void 0,!0,{fileName:k,lineNumber:30,columnNumber:7},this)}}var w="/Users/zhangds/web/blue-brother/frontend/src/components/gridEdit/main.js";class C extends m.a.Component{constructor(e){super(e);let t=JSON.parse(JSON.stringify(e.row));this.state={visible:e.visible,row:t,column:e.column,text:e.row[e.column]}}onCancel(){this.props.onCancel()}onOk(){this.props.onOk(this.state.row)}textChange(e){let t=this.state.row;t[this.props.column]=e,this.setState({row:t})}render(){const{pos:e}=this.props;return e.y+156>window.innerHeight&&(e.y=e.y-156),e.x+412>window.innerWidth&&(e.x=e.x-412),Object(h.jsxDEV)("div",{className:"gridEdit",id:"gridEdit",style:{position:"absolute",top:e.y+10,left:e.x+10},children:[",",Object(h.jsxDEV)("div",{className:"gridEdit-title",children:["\u4fee\u6539",this.props.title]},void 0,!0,{fileName:w,lineNumber:44,columnNumber:10},this),Object(h.jsxDEV)("div",{className:"gridEdit-content",children:Object(h.jsxDEV)(S,{text:this.state.text,onChange:e=>{this.textChange(e)}},void 0,!1,{fileName:w,lineNumber:46,columnNumber:11},this)},void 0,!1,{fileName:w,lineNumber:45,columnNumber:9},this),Object(h.jsxDEV)("div",{className:"btn-group",children:[Object(h.jsxDEV)("div",{className:"btn-cancel",onClick:e=>{this.onCancel()},children:"\u53d6\u6d88"},void 0,!1,{fileName:w,lineNumber:54,columnNumber:11},this),Object(h.jsxDEV)("div",{className:"btn-current",onClick:e=>{this.onOk()},children:"\u786e\u5b9a"},void 0,!1,{fileName:w,lineNumber:61,columnNumber:11},this)]},void 0,!0,{fileName:w,lineNumber:53,columnNumber:9},this)]},void 0,!0,{fileName:w,lineNumber:40,columnNumber:7},this)}}var T="/Users/zhangds/web/blue-brother/frontend/src/components/gird/main.js";class I extends m.a.Component{constructor(e){super(e),this.scrollFunc=function(e){},this.AllCheckChange=e=>{if(0==this.state.tableData.length)return;this.setState({indeterminate:!1}),this.setState({allChecked:e.target.checked});Object(f.a)(this.state.tableData,(t=>t.checked=e.target.checked&&!t.disabled));this.setState({tableData:this.state.tableData});let t=Object(_.a)(this.state.tableData,(e=>1==e.checked));this.props.checkChange(t)},this.onConfirm=()=>{},this.onCancel=()=>{},this.total=e=>{let t=0;if(!e.total)return"";for(let i=0;i(e.checked=!1,e)));this.setState({indeterminate:!1}),this.setState({tableData:t})}gridPageLoad(){this.setState({pageLoading:!0}),setTimeout((()=>{this.setState({pageLoading:!1})}),800)}checkChange(e,t){this.state.tableData[e].checked=t.target.checked,this.setState({tableData:this.state.tableData});let i=Object(_.a)(this.state.tableData,(e=>1==e.checked));this.props.checkChange(i),i.length==this.state.tableData.length?(this.setState({indeterminate:!1}),this.setState({allChecked:!0})):0==i.length?(this.setState({indeterminate:!1}),this.setState({allChecked:!1})):this.setState({indeterminate:!0})}getCellValue(e,t){let i=Object(x.a)(t,e);return i||0==i?i:"-"}switchChange(e,t){this.state.tableData[e].switched=t,this.setState({tableData:this.state.tableData})}editRow(e,t,i){this.setState({edit_title:t.title}),this.setState({edit_column:t.prop}),this.setState({curRow:i});let a={};a.x=e.clientX,a.y=e.clientY,this.setState({postion:a}),this.state.historyrow_id==i.id?this.setState({editShow:!this.state.editShow}):(this.setState({editShow:!0}),this.setState({historyrow_id:i.id}))}componentWillReceiveProps(e){this.state.Column!=e.Column&&this.setState({Column:e.Column}),this.state.tableData!=e.tableData&&(this.setState({tableData:e.tableData}),this.setState({page:e.page}),this.setState({page:e.page,emptyText:e.emptyText}),this.setState({dataCount:e.dataCount}),this.scrollPosition())}scrollPosition(){document.getElementById("grid").scrollLeft=0,document.getElementById("grid").scrollTop=0}onCountChange(e){this.props.countChange(e),this.setState({pageCount:e})}pageShow(e){}gridEditChange(e){}getSelectData(){let e=this.state.tableData.filter((e=>1==e.checked));return e=Object(f.a)(e,(e=>Object(o.a)(e,["checked"]))),e}rowItemClick(e){this.setState({curIndex:e})}render(){const{data:e,ComponentHandler:t}=this.props;var i=0;let a=this.state.Column.length>12?"100px":100/(this.state.Column.length-2)+"%";return Object(h.jsxDEV)("div",{children:[Object(h.jsxDEV)("div",{className:"gird",style:{border:this.props.isBorder?"1px solid #dfe1e6":"none"},id:"grid",children:[Object(h.jsxDEV)("div",{className:"th-head",children:[" ",this.props.isMultiple?Object(h.jsxDEV)("div",{className:"th-td",style:{width:"30px",textAlign:"left",background:this.props.headBackgroud},children:[Object(h.jsxDEV)(j.a,{checked:this.state.allChecked,indeterminate:this.state.indeterminate,onChange:this.AllCheckChange,children:" "},void 0,!1,{fileName:T,lineNumber:359,columnNumber:17},this)," "]},void 0,!0,{fileName:T,lineNumber:351,columnNumber:15},this):null," ",this.props.isSwitch?Object(h.jsxDEV)("div",{className:"th-td",style:{width:"30px",textAlign:"left",visibility:"hidden",background:this.props.headBackgroud},children:[Object(h.jsxDEV)(v.a,{size:"small",checked:!0,onChange:()=>{this.switchChange()},children:" "},void 0,!1,{fileName:T,lineNumber:378,columnNumber:17},this)," "]},void 0,!0,{fileName:T,lineNumber:369,columnNumber:15},this):null,this.state.Column.map(((e,t)=>(i="auto"==e.width?a:e.width,Object(h.jsxDEV)("div",{className:"th-td",style:{width:i,justifyContent:e.textAlign,background:this.props.headBackgroud},children:[" ",e.title,e.sort?Object(h.jsxDEV)(g.a,{type:"arrow-down"},void 0,!1,{fileName:T,lineNumber:403,columnNumber:32},this):null," "]},t,!0,{fileName:T,lineNumber:392,columnNumber:17},this))))," "]},void 0,!0,{fileName:T,lineNumber:348,columnNumber:11},this),Object(h.jsxDEV)("div",{className:this.state.pageLoading?"grid-loading show":"grid-loading",children:[Object(h.jsxDEV)("div",{className:"loading-bar"},void 0,!1,{fileName:T,lineNumber:410,columnNumber:13},this),Object(h.jsxDEV)("div",{className:"loading-txt",children:"\u6570\u636e\u52a0\u8f7d\u4e2d,\u8bf7\u8010\u5fc3\u7b49\u5f85"},void 0,!1,{fileName:T,lineNumber:411,columnNumber:13},this)]},void 0,!0,{fileName:T,lineNumber:409,columnNumber:11},this),Object(h.jsxDEV)("div",{className:this.state.pageLoading?"th-body hide":"th-body",style:{maxHeight:this.props.maxheight+"px"},children:[" ",0==this.state.tableData.length?Object(h.jsxDEV)("div",{className:"empty-text",children:[" ",this.state.emptyText," "]},void 0,!0,{fileName:T,lineNumber:419,columnNumber:15},this):this.state.tableData.map(((e,s)=>Object(h.jsxDEV)("div",{className:this.state.curIndex==s?"tr active":"tr",onClick:e=>{this.rowItemClick(s)},style:{background:s%2==0?this.props.spliteColor:"#ffffff"},children:[" ",this.props.isMultiple?Object(h.jsxDEV)("div",{className:"td",style:{width:"30px",textAlign:"left"},children:[Object(h.jsxDEV)(j.a,{checked:e.checked,disabled:e.disabled,onChange:e=>{this.checkChange(s,e)},children:" "},void 0,!1,{fileName:T,lineNumber:442,columnNumber:25},this)," "]},void 0,!0,{fileName:T,lineNumber:435,columnNumber:23},this):null,this.props.isSwitch?Object(h.jsxDEV)("div",{className:"td",style:{width:"30px",textAlign:"left"},children:[Object(h.jsxDEV)(v.a,{size:"small",checked:e.switched,onChange:e=>{this.switchChange(s,e)},loading:this.state.switchLoading,children:" "},void 0,!1,{fileName:T,lineNumber:461,columnNumber:25},this)," "]},void 0,!0,{fileName:T,lineNumber:454,columnNumber:23},this):null,this.state.Column.map(((l,n)=>(i="auto"==l.width?a:l.width,"normal"==l.type?Object(h.jsxDEV)("div",{className:"td",style:{width:i,justifyContent:l.textAlign},children:[" ",this.getCellValue(l.prop,e)]},n,!0,{fileName:T,lineNumber:476,columnNumber:25},this):Object(h.jsxDEV)("div",{className:"td",style:{width:i,justifyContent:l.textAlign},children:[" ",t(l.prop,e,s)," "]},n,!0,{fileName:T,lineNumber:496,columnNumber:25},this))))," "]},s,!0,{fileName:T,lineNumber:423,columnNumber:19},this))),this.state.editShow?Object(h.jsxDEV)(C,{pos:this.state.postion,title:this.state.edit_title,column:this.state.edit_column,onCancel:()=>{this.setState({editShow:!1})},onOk:e=>{this.setState({editShow:!1})},row:this.state.curRow},void 0,!1,{fileName:T,lineNumber:514,columnNumber:15},this):null,Object(h.jsxDEV)("div",{className:"sortbar"},void 0,!1,{fileName:T,lineNumber:528,columnNumber:13},this)]},void 0,!0,{fileName:T,lineNumber:413,columnNumber:11},this),Object(h.jsxDEV)("div",{className:!this.state.pageLoading&&this.props.countbarVisible?"tfoot":"tfoot hide",style:{background:this.props.spliteColor},children:[" ",Object(h.jsxDEV)("div",{className:"th-td-total",style:{width:"130px"},children:["\u603b\u8ba1(",this.state.tableData.length,"\u6761\u6570\u636e):"]},void 0,!0,{fileName:T,lineNumber:540,columnNumber:13},this),this.state.Column.map(((e,t)=>(i="auto"==e.width?a:e.width,Object(h.jsxDEV)("div",{className:"td total",style:{width:i,textAlign:e.textAlign},children:[" ",this.total(e)," "]},t,!0,{fileName:T,lineNumber:552,columnNumber:17},this))))," "]},void 0,!0,{fileName:T,lineNumber:531,columnNumber:11},this)]},void 0,!0,{fileName:T,lineNumber:343,columnNumber:9},this),this.props.isShowPageBar?Object(h.jsxDEV)("div",{className:this.state.pageLoading?"pagebar hide":"pagebar",children:Object(h.jsxDEV)(V,{data:{count:this.props.dataCount},onPrevClick:e=>{this.gridPageLoad(),this.props.pageChange(e)},page:this.props.page,pageFn:e=>this.setState({page:e}),onNextClick:e=>{this.gridPageLoad(),this.props.pageChange(e)},onJumpPage:e=>{this.gridPageLoad(),this.props.pageChange(e)},onCountChange:e=>{this.onCountChange(e)}},void 0,!1,{fileName:T,lineNumber:570,columnNumber:13},this)},void 0,!1,{fileName:T,lineNumber:569,columnNumber:11},this):null]},void 0,!0,{fileName:T,lineNumber:342,columnNumber:7},this)}}I.defaultProps={isShowPageBar:!0,isMultiple:!0,isSwitch:!0,page:"",headBackgroud:"",spliteColor:"#f9fafc",countbarVisible:!0,maxheight:400,isBorder:!1,Column:[{title:"\u63a8\u5e7f\u8ba1\u5212\u540d\u79f0",prop:"name",width:"300px",textAlign:"flex-start",type:"normal",sort:!1,total:!1,valueType:"text"},{title:"\u64cd\u4f5c",prop:"edit",width:"220px",textAlign:"flex-start",type:"slot",sort:!1,total:!1,valueType:"text"},{title:"\u66dd\u5149\u91cf",prop:"num1",width:"auto",textAlign:"left",type:"normal",sort:!0,total:!0,valueType:"number"},{title:"\u70b9\u51fb\u91cf",prop:"num2",width:"auto",textAlign:"left",type:"normal",sort:!0,total:!0,valueType:"number"},{title:"\u70b9\u51fb\u7387",prop:"num3",width:"auto",textAlign:"left",type:"normal",sort:!0,total:!0,valueType:"percentage"},{title:"\u70b9\u51fb\u5747\u4ef7",prop:"price",width:"auto",textAlign:"left",type:"normal",sort:!0,total:!0,valueType:"price"},{title:"\u82b1\u8d39",prop:"totalprice",width:"auto",textAlign:"left",type:"normal",sort:!0,total:!0,valueType:"price"}],tableData:[{id:0,name:"\u63a8\u5e7f\u8ba1\u5212-2021-10-19 17:43",num1:0,num2:0,num3:0,price:0,totalprice:0}],emptyText:"\u62b1\u6b49\uff0c\u6682\u65e0\u76f8\u5173\u6570\u636e\u8bb0\u5f55",dataCount:0,curIndex:0};const F=(e,t)=>{var i=0,a=e.toString(),s=t.toString();try{i+=a.split(".")[1].length}catch(l){}try{i+=s.split(".")[1].length}catch(l){}return Number(a.replace(".",""))*Number(s.replace(".",""))/Math.pow(10,i)},L=(e,t)=>{var i,a,s=0,l=0;try{s=e.toString().split(".")[1].length}catch(n){}try{l=t.toString().split(".")[1].length}catch(n){}return i=Number(e.toString().replace(".","")),a=Number(t.toString().replace(".","")),F(i/a,Math.pow(10,l-s))},H=e=>{let t=sessionStorage.getItem("KeyPcType");const i=parseInt(L(e.all_budget,F(e.reduce_amount,e.send_num)));return"2"===t||"3"===t?i:e.stock?e.stock:i},q=e=>{let t={type:2};return t.upstream=P(e.channel),t.only=e,t.product_id=e.goods_id?e.goods_id:e.channel_activity_id,t.product_name=e.batch_goods_name,t.official_price=e.reduce_amount,t.contract_price=e.price,t.quantity=H(e),t.stock=H(e),t.channel_activity_id=e.channel_activity_id,t.all_budget=Number(e.all_budget),t.effectDate=`${e.time_limit.effect_time.start_time} \u81f3 ${e.time_limit.effect_time.end_time}`,t.create_time=e.create_time,t},M=e=>{let t={};const i="1"===e.cash_amount_type?e.denomination:`${e.min_denomination}~${e.max_denomination}`;return t.type=3,t.upstream=P(e.channel),t.only=e,t.product_id=e.goods_id||e.id||e.cash_activity_id,t.product_name=e.batch_goods_name,t.official_price=i,t.contract_price=(e.total_contract_price/e.num).toFixed(2),t.cost_price=i,t.quantity=e.num,t.stock=e.stock||e.num,t.channel_activity_id=e.cash_activity_id,t.all_budget=Number(e.all_budget),t.effectDate=`${e.begin_time} \u81f3 ${e.end_time}`,t};function P(e){switch(Number(e)){case 1:return"\u652f\u4ed8\u5b9d";case 2:return"\u5fae\u4fe1";case 3:return"\u4e91\u95ea\u4ed8"}}function B(){let e=sessionStorage.getItem("phone_number_all")?JSON.parse(sessionStorage.getItem("phone_number_all")):void 0;if(e){const t=e.reduce(((e,t)=>(t.phone_number.forEach((t=>{e.push(t)})),e)),[]),i=new Set(t);return t.length!==i.size}}const A="1\u3001\u7acb\u51cf\u91d1\u81ea\u9886\u53d6\u4e4b\u65e5\u8d7730\u5929\u6709\u6548\uff0c\u8bf7\u5728\u6709\u6548\u671f\u5185\u4f7f\u7528\n
2\u3001\u5fae\u4fe1\u7acb\u51cf\u91d1\u81ea\u9886\u53d6\u540e\u6bcf\u4e2a\u7acb\u51cf\u91d1\u4e00\u6b21\u6027\u4f7f\u7528\uff0c\u4e0d\u5151\u6362\uff0c\u4e0d\u627e\u96f6\uff0c\u5230\u671f\u540e\u81ea\u52a8\u5931\u6548\uff0c\u903e\u671f\u672a\u4f7f\u7528\u4e0d\u518d\u8865\u53d1\u3002\u4f7f\u7528\u5fae\u4fe1\u652f\u4ed8\u8fdb\u884c\u4ed8\u6b3e\uff08\u5927\u4e8e\u7acb\u51cf\u91d1\u9762\u989d0.01\u5143\u4ee5\u4e0a\uff09\u5373\u53ef\u81ea\u52a8\u62b5\u6263\n
3\u3001\u591a\u5f20\u7acb\u51cf\u91d1\u53ef\u5728\u5355\u7b14\u5fae\u4fe1\u652f\u4ed8\u8ba2\u5355\u4e2d\u4e00\u8d77\u4f7f\u7528\uff0c\u4f46\u5f53\u7528\u6237\u7684\u7acb\u51cf\u91d1\u8d85\u8fc78\u5f20\u65f6\uff0c\u7cfb\u7edf\u4f1a\u9009\u53d6\u5176\u4e2d\u4e00\u90e8\u5206\u4f7f\u7528\uff0c\u4e0d\u4fdd\u8bc1\u5728\u4e00\u5f20\u8ba2\u5355\u4e2d\u5168\u90e8\u4f7f\u7528\n
4\u3001\u5728\u4e2d\u56fd\u5883\u5185\u5546\u6237\u4f7f\u7528\u5fae\u4fe1\u652f\u4ed8\u5373\u53ef\u4f7f\u7528\uff0c\u5c11\u6570\u7279\u5b9a\u5546\u6237\uff08\u5305\u62ec\u4f46\u4e0d\u9650\u4e8e\uff1aCoCo\u5976\u8336\u3001\u4f18\u8863\u5e93\u3001\u661f\u5df4\u514b\u3001\u80af\u5fb7\u57fa\u3001\u5fc5\u80dc\u5ba2\u3001\u540c\u7a0b\u827a\u9f99\u3001\u70ed\u98ce\u3001\u592a\u5e73\u9e1f\u3001\u5b69\u5b50\u738b\u3001\u822a\u8054\u4fdd\u9669\u3001\u534e\u4e3a\u5546\u57ce\u3001Miss Sixty\u3001Ochirly\u3001Apple\u5546\u57ce\u3001FivePlus\u3001\u4fe1\u7528\u5361\u8fd8\u6b3e\u3001\u96f6\u94b1\u901a\u3001\u7406\u8d22\u901a\u7b49\uff09\u3001\u4ee5\u53ca\u793e\u4ea4\u652f\u4ed8\uff08\u5982\u8f6c\u8d26\u3001\u7ea2\u5305\u3001\u4e2a\u4eba\u6536\u6b3e\u7801\u652f\u4ed8\u7b49\uff09\u53ca\u5408\u5355\u652f\u4ed8\uff08\u5fae\u4fe1\u652f\u4ed8\u8ba2\u5355\u53f7\u4e3a44\u5f00\u5934\u7684\u4ea4\u6613\uff09\u65e0\u6cd5\u4f7f\u7528\u7acb\u51cf\u91d1'\n
5\u3001\u4f7f\u7528\u7acb\u51cf\u91d1\u7684\u5fae\u4fe1\u652f\u4ed8\u8ba2\u5355\uff0c\u5982\u53d1\u751f\u5168\u989d\u9000\u6b3e\uff0c\u4e14\u7acb\u51cf\u91d1\u4ecd\u5728\u6709\u6548\u671f\u5185\uff0c\u7acb\u51cf\u91d1\u5c06\u81ea\u52a8\u9000\u8fd8\u7ed9\u7528\u6237\uff0c\u5982\u7acb\u51cf\u91d1\u5df2\u8fc7\u671f\uff0c\u5219\u4e0d\u9000\u8fd8\u7ed9\u7528\u6237\uff1b\u5982\u53d1\u751f\u90e8\u5206\u9000\u6b3e\uff0c\u7528\u6237\u652f\u4ed8\u91d1\u989d\u5c06\u6309\u6bd4\u4f8b\u539f\u8def\u9000\u8fd8\uff0c\u7acb\u51cf\u91d1\u5c06\u4e0d\u9000\u8fd8\u7ed9\u7528\u6237",z="1\u3001\u7acb\u51cf\u91d1\u81ea\u9886\u53d6\u4e4b\u65e5\u8d777\u5929\u6709\u6548\uff0c\u8bf7\u5728\u6709\u6548\u671f\u5185\u4f7f\u7528\n
2\u3001\u652f\u4ed8\u5b9d\u7acb\u51cf\u91d1\u81ea\u9886\u53d6\u540e\u6bcf\u4e2a\u7acb\u51cf\u91d1\u4e00\u6b21\u6027\u4f7f\u7528\uff0c\u4e0d\u5151\u6362\u3001\u4e0d\u627e\u96f6\uff0c\u5230\u671f\u540e\u81ea\u52a8\u5931\u6548\uff0c\u903e\u671f\u672a\u4f7f\u7528\u4e0d\u518d\u8865\u53d1\u3002\u4f7f\u7528\u652f\u4ed8\u5b9d\u652f\u4ed8\u8fdb\u884c\u4ed8\u6b3e(\u5927\u4e8e\u7acb\u51cf\u91d1\u9762\u989d0.01\u5143\u4ee5\u4e0a)\u5373\u53ef\u81ea\u52a8\u62b5\u6263\n
3\u3001\u591a\u5f20\u7acb\u51cf\u91d1\u53ef\u5728\u5355\u7b14\u652f\u4ed8\u5b9d\u652f\u4ed8\u8ba2\u5355\u4e2d\u4e00\u8d77\u4f7f\u7528\uff0c\u4f46\u5f53\u7528\u6237\u7684\u7acb\u51cf\u91d1\u8d85\u8fc78\u5f20\u65f6\uff0c\u7cfb\u7edf\u4f1a\u9009\u53d6\u5176\u4e2d\u4e00\u90e8\u5206\u4f7f\u7528\uff0c\u4e0d\u4fdd\u8bc1\u5728\u4e00\u5f20\u8ba2\u5355\u4e2d\u5168\u90e8\u4f7f\u7528\n
4\u3001\u4f7f\u7528\u7acb\u51cf\u91d1\u7684\u652f\u4ed8\u5b9d\u652f\u4ed8\u8ba2\u5355\uff0c\u5982\u53d1\u751f\u5168\u989d\u9000\u6b3e\uff0c\u4e14\u7acb\u51cf\u91d1\u4ecd\u5728\u6709\u6548\u671f\u5185\uff0c\u7acb\u51cf\u91d1\u5c06\u81ea\u52a8\u9000\u8fd8\u7ed9\u7528\u6237\uff0c\u5982\u7acb\u51cf\u91d1\u5df2\u8fc7\u671f\uff0c\u5219\u4e0d\u9000\u8fd8\u7ed9\u7528\u6237;\u5982\u53d1\u751f\u90e8\u5206\u9000\u6b3e\uff0c\u7528\u6237\u652f\u4ed8\u91d1\u989d\u5c06\u6309\u6bd4\u4f8b\u539f\u8def\u9000\u8fd8\uff0c\u7acb\u51cf\u91d1\u5c06\u4e0d\u9000\u8fd8\u7ed9\u7528\u6237",J="\u6e29\u99a8\u63d0\u793a\uff1a\u5355\u7b14\u4ea4\u6613\u5927\u4e8eX.01\u5143\u53ef\u7528\u7acb\u51cfX\u5143\uff01\u540c\u4e00\u6279\u6b21\u6d3b\u52a8\uff08\u540c\u4e00\u5238\u7f16\u7801\u4e3a\u540c\u4e00\u6279\u6b21\u6d3b\u52a8\uff09\u5355\u65e5\u9886\u53d6\u4e0a\u9650\u4e3a10\u5f20\uff0c\u603b\u9886\u53d6\u4e0a\u9650\u4e3a30\u5f20\uff01\n
1.\u5f53\u4ea4\u6613\u65f6\u4f7f\u7528\u4e91\u95ea\u4ed8\u6d88\u8d39\u5238\u62b5\u6263\uff0c\u5982\u53d1\u751f\u64a4\u9500\u3001\u9000\u8d27\u7b49\u64cd\u4f5c\u65f6\uff0c\u7528\u6237\u5b9e\u9645\u652f\u4ed8\u91d1\u989d\u539f\u8def\u9000\u56de\u81f3\u652f\u4ed8\u94f6\u884c\u5361\uff0c\u4ec5\u5168\u989d\u9000\u6b3e\u6d88\u8d39\u5361\u5238\u4f1a\u9000\u8fd8\u81f3\u7528\u6237\uff08\u90e8\u5206\u9000\u6b3e\u5361\u5238\u4e0d\u4f1a\u9000\u56de\uff09\uff0c\u5238\u9000\u56de\u65e5\u671f\u4e3aD+1\u4e2a\u5de5\u4f5c\u65e5\uff0c\u903e\u671f\u4f5c\u5e9f\uff1b\n
2.\u672c\u5238\u9700\u7ed1\u5b9a\u4f17\u90a6\u94f6\u884c\u5361\u4f7f\u7528\uff0c\u4e0d\u53ef\u4e0e\u5176\u4ed6\u4f18\u60e0\u540c\u4eab\uff0c\u8bf7\u4e00\u6b21\u6027\u4f7f\u7528\uff0c\u4e0d\u627e\u96f6\u3001\u4e0d\u5151\u6362\u3001\u4e0d\u63d0\u73b0\u3001\u4e0d\u53ef\u53e0\u52a0\u4f7f\u7528\uff0c\u4e0d\u53ef\u7528\u4e8e\u8d2d\u4e70\u6d3b\u671f\uff0b\u6216\u8005\u5176\u4ed6\u7406\u8d22\u4ea7\u54c1\uff1b\n
3.\u7528\u6237\u4e3b\u626b\u65f6\uff0c\u53ef\u81ea\u4e3b\u9009\u62e9\u662f\u5426\u4f7f\u7528\u6d88\u8d39\u5238\u53ca\u5177\u4f53\u4f7f\u7528\u54ea\u4e00\u5f20\uff1b\u88ab\u626b\u65f6\uff0c\u9ed8\u8ba4\u4f18\u5148\u4f7f\u7528\u7b26\u5408\u89c4\u5219\u4e14\u4f18\u60e0\u6700\u5927\u7684\u6d88\u8d39\u5238\uff1b\n
4.\u7528\u6237\u540c\u4e00\u8d26\u53f7\u6709\u591a\u7c7b\u4e91\u95ea\u4ed8\u6d88\u8d39\u5238\u65f6\uff0c\u4f18\u5148\u4f7f\u7528\u53ef\u62b5\u6263\u91d1\u989d\u5927\u7684\u6d88\u8d39\u5238\u8fdb\u884c\u62b5\u6263\uff1b\u53ef\u62b5\u6263\u91d1\u989d\u76f8\u540c\u65f6\uff0c\u4f18\u5148\u4f7f\u7528\u5148\u83b7\u53d6\u7684\u6d88\u8d39\u5238\u8fdb\u884c\u62b5\u6263\uff1b\u5f53\u540c\u4e00\u7c7b\u4e91\u95ea\u4ed8\u6d88\u8d39\u5238\u6709\u4e0d\u540c\u6709\u6548\u671f\u7684\u91d1\u989d\u65f6\uff0c\u4f18\u5148\u4f7f\u7528\u5373\u5c06\u5230\u671f\u7684\u6d88\u8d39\u5238\u8fdb\u884c\u62b5\u6263\uff1b\n
5.\u5bf9\u4f7f\u7528\u6216\u6d89\u5acc\u4f7f\u7528\u8fdd\u53cd\u6d3b\u52a8\u89c4\u5219\u6216\u4e0d\u6b63\u5f53\u65b9\u5f0f\u5957\u53d6\u94f6\u8054\u4f18\u60e0\u7684\u7528\u6237\u53ca\u5176\u6240\u4f7f\u7528\u7684\u5de5\u5177\uff0c\u5305\u62ec\u4f46\u4e0d\u9650\u4e8e\u624b\u673a\u53f7\u3001\u94f6\u884c\u5361\u53f7\u3001APP\u8d26\u53f7\u7b49\uff0c\u4e2d\u56fd\u94f6\u8054\u548c\u5546\u6237\u6709\u6743\u4e0d\u4e88\u5176\u4f7f\u7528\u4e91\u95ea\u4ed8\u6d88\u8d39\u5238\u3001\u8ffd\u56de\u5df1\u53d1\u653e\u7684\u4e91\u95ea\u4ed8\u6d88\u8d39\u5238\uff1b\n
6.\u7528\u6237\u4f7f\u7528\u6d88\u8d39\u5238\u65f6\uff0c\u8bf7\u5c06 APP \u66f4\u65b0\u5230\u6700\u65b0\u7248\u672c\u3002\u7531\u4e8e\u7528\u6237\u7535\u5b50\u8bbe\u5907\u4e0d\u652f\u6301\u3001APP \u672a\u66f4\u65b0\u5230\u6700\u65b0\u7248\u672c\u3001\u5361\u7247\u6302\u5931\u3001\u6362\u5361\u3001\u8d26\u53f7\u8f93\u9519\u7b49\u81ea\u8eab\u539f\u56e0\u5bfc\u81f4\u65e0\u6cd5\u4eab\u53d7\u4f18\u60e0\u7684\uff0c\u8be5\u4f18\u60e0\u540e\u7eed\u4e0d\u4e88\u8865\u53d1\u3002\n
7.\u672c\u5546\u54c1\u4f7f\u7528\u8fc7\u7a0b\u4e2d\u5982\u6709\u4e0d\u660e\u4e4b\u5904\uff0c\u8bf7\u8054\u7cfb\u4f9b\u5e94\u5546\u6210\u90fd\u84dd\u8272\u5144\u5f1f\u7f51\u7edc\u79d1\u6280\u6709\u9650\u516c\u53f8\u5ba2\u670d\uff1a4001181216";function U(e){return/^[0-9][0-9]*([.][0-9]{1,2})?$/.test(e)}var W=i(521),R=i(456),K=i(67),Y=i.n(K),$=i(164),G=i(499),Q=i(199),Z=i(210),X=i(280),ee=i(506);function te(e,t){let i=new Map;for(let a of e)i.has(a[t])||i.set(a[t],a);return[...i.values()]}function ie(e,t){var i,a,s="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),l=[];if(t=t||s.length,e)for(i=0;it.filter((t=>t.name===e||t.id==e)))).flat(1/0).sort(((e,t)=>e.id-t.id));const a=[];if(function(e){let t=[];t=e instanceof Array?[...e]:Array.from(e.toString());var i=t[0],a=!0;for(var s in t){if(t[s]!=i){a=!1;break}i++}return a}(i.map((e=>e.id)))&&i.length>1)a.push(`${i[0].name} \u81f3 ${i.slice(-1)[0].name}`);else for(var s=0;s{const[i,o]=Object(r.useState)({addNew:""}),[m,d]=Object(r.useState)(!1),b=Object(r.useRef)();return Object(r.useEffect)((()=>{o({...e})}),[e]),Object(h.jsxDEV)(h.Fragment,{children:[Object(h.jsxDEV)("div",{className:"dialog_p",children:[Object(h.jsxDEV)("p",{children:["\u9884\u4f30\u5f53\u524d\u6d88\u8017\u4f59\u989d\u4e3a",Object(h.jsxDEV)("span",{className:"red",children:[" ",Number(null===i||void 0===i?void 0:i.used_amount).toFixed(2)," "]},void 0,!0,{fileName:he,lineNumber:73,columnNumber:11},void 0),"\u5143"]},void 0,!0,{fileName:he,lineNumber:71,columnNumber:9},void 0),Object(h.jsxDEV)("p",{children:["\u9884\u4f30\u5f53\u524d\u5269\u4f59\u4f59\u989d\u4e3a",Object(h.jsxDEV)("span",{className:"green",children:[" ",((null===i||void 0===i?void 0:i.recharge_amount)-(null===i||void 0===i?void 0:i.used_amount)).toFixed(2)," "]},void 0,!0,{fileName:he,lineNumber:77,columnNumber:11},void 0),"\u5143"]},void 0,!0,{fileName:he,lineNumber:75,columnNumber:9},void 0),Object(h.jsxDEV)(l.a,{ref:b,model:i,rules:ue.addNew,children:[Object(h.jsxDEV)(s.a,{id:"addNew",prop:"addNew",labelname:"\u52a0\u6b3e",labelwidth:"60px",children:Object(h.jsxDEV)(n.a,{className:"addNew",onChange:e=>{o({...i,addNew:e})},onClearItem:()=>{o({...i,addNew:""})},kind:"number",value:i.addNew,placeholder:"",labelWidth:"0px",maxLength:16,height:"36px",unit:"\u5143",countShow:!1,width:"260px",alignment:"left"},void 0,!1,{fileName:he,lineNumber:85,columnNumber:13},void 0)},void 0,!1,{fileName:he,lineNumber:84,columnNumber:11},void 0),Object(h.jsxDEV)(s.a,{id:"addNew1",labelname:"\u52a0\u6b3e",labelwidth:"60px",children:Object(h.jsxDEV)(n.a,{className:"addNew",onChange:e=>{},onClearItem:()=>{},kind:"number",value:"",placeholder:"",labelWidth:"0px",maxLength:16,height:"36px",unit:"\u5143",countShow:!1,width:"240px",alignment:"left"},void 0,!1,{fileName:he,lineNumber:106,columnNumber:13},void 0)},void 0,!1,{fileName:he,lineNumber:105,columnNumber:11},void 0)]},void 0,!0,{fileName:he,lineNumber:83,columnNumber:9},void 0),Object(h.jsxDEV)("p",{children:["\u9884\u4f30\u5145\u503c\u540e\u603b\u5145\u503c\u6279\u6b21\u91d1\u989d\u4e3a",Object(h.jsxDEV)("span",{className:"blue",children:[" ",((null===i||void 0===i?void 0:i.recharge_amount)-0+(null!==i&&void 0!==i&&i.addNew?(null===i||void 0===i?void 0:i.addNew)-0:0)).toFixed(2)," "]},void 0,!0,{fileName:he,lineNumber:125,columnNumber:11},void 0),"\u5143"]},void 0,!0,{fileName:he,lineNumber:123,columnNumber:9},void 0),Object(h.jsxDEV)("p",{children:["\u9884\u4f30\u5145\u503c\u540e\u5269\u4f59\u4f59\u989d\u4e3a",Object(h.jsxDEV)("span",{className:"blue",children:[" ",(100*((null===i||void 0===i?void 0:i.recharge_amount)-(null===i||void 0===i?void 0:i.used_amount))/100+(null!==i&&void 0!==i&&i.addNew?i.addNew-0:0)).toFixed(2)," "]},void 0,!0,{fileName:he,lineNumber:137,columnNumber:11},void 0),"\u5143"]},void 0,!0,{fileName:he,lineNumber:135,columnNumber:9},void 0)]},void 0,!0,{fileName:he,lineNumber:70,columnNumber:7},void 0),Object(h.jsxDEV)("p",{className:"dflexajce",children:[Object(h.jsxDEV)(u.a,{onClick:()=>{t(!1,m?Number(i.addNew):0)},children:"\u53d6\u6d88"},void 0,!1,{fileName:he,lineNumber:148,columnNumber:9},void 0),Object(h.jsxDEV)(u.a,{type:"primary",onClick:function(){b.current.validator()&&(Number(null===i||void 0===i?void 0:i.recharge_amount)+Number(i.addNew)<=Number(null===i||void 0===i?void 0:i.all_budget)?Object(a.b)({recharge_amount:i.addNew},e.goods_id).then((e=>{Object(a.Tb)(e,((e,a)=>{c.a.success("\u52a0\u6b3e\u6210\u529f"),d(!0),setTimeout((()=>{!function(){const e=Object(de.a)(i);e.recharge_amount=(Number(i.addNew)+Number(i.recharge_amount)).toFixed(2);let t=[];sessionStorage.getItem("addMoneyData")&&(t=JSON.parse(sessionStorage.getItem("addMoneyData")));let a=t.findIndex((t=>t.channel_activity_id==e.channel_activity_id));-1!==a?t[a]=e:t.push(e);sessionStorage.setItem("addMoneyData",JSON.stringify(t))}(),t(!1,Number(i.addNew))}),1e3)}),(e=>{c.a.error(e)}))})):c.a.error("\u52a0\u6b3e\u5931\u8d25\uff0c\u52a0\u6b3e\u540e\u603b\u5145\u503c\u6279\u6b21\u91d1\u989d\u4e0d\u5141\u8bb8\u5927\u4e8e\u603b\u9884\u7b97"))},htmlType:"submit",children:"\u63d0\u4ea4"},void 0,!1,{fileName:he,lineNumber:155,columnNumber:9},void 0)]},void 0,!0,{fileName:he,lineNumber:147,columnNumber:7},void 0)]},void 0,!0)},pe=i(443),Ne="/Users/zhangds/web/blue-brother/frontend/src/components/knockGold/timeComponent.jsx",je=({data:e})=>{const[t,i]=Object(r.useState)([]);return Object(r.useEffect)((()=>{i(se(e.ruleWeek))}),[e.ruleWeek]),function(){return"received"===e.usable_time?Object(h.jsxDEV)("div",{className:"available_time",children:[Object(h.jsxDEV)("h3",{children:"\u53ef\u7528\u65f6\u95f4"},void 0,!1,{fileName:Ne,lineNumber:13,columnNumber:11},this),Object(h.jsxDEV)("p",{className:"r-f",children:["\u9886\u53d6\u540e",e.effect_date_type.text,",\u6709\u6548\u671f ",e.effect_date," \u5929"]},void 0,!0,{fileName:Ne,lineNumber:14,columnNumber:11},this)]},void 0,!0,{fileName:Ne,lineNumber:12,columnNumber:9},this):"fiexd"===e.usable_time?Object(h.jsxDEV)("div",{className:"available_time",children:[Object(h.jsxDEV)("h3",{children:"\u53ef\u7528\u65f6\u95f4"},void 0,!1,{fileName:Ne,lineNumber:23,columnNumber:11},this),Object(h.jsxDEV)("p",{className:"r-f",children:[e.fixed_time[0]," ~ ",e.fixed_time[1]]},void 0,!0,{fileName:Ne,lineNumber:24,columnNumber:11},this)]},void 0,!0,{fileName:Ne,lineNumber:22,columnNumber:9},this):"week"===e.usable_time?Object(h.jsxDEV)("div",{className:"available_time",children:[Object(h.jsxDEV)("h3",{children:"\u53ef\u7528\u65f6\u95f4"},void 0,!1,{fileName:Ne,lineNumber:33,columnNumber:11},this),Object(h.jsxDEV)("ul",{className:"timeList",children:null===t||void 0===t?void 0:t.map(((t,i)=>Object(h.jsxDEV)("li",{children:[t,e.ruleDate.map((e=>{if(e[1])return Object(h.jsxDEV)("p",{style:{textAlign:"center",marginTop:"5px"},children:[e[0],"~",e[1]]},void 0,!0,{fileName:Ne,lineNumber:41,columnNumber:23},this)}))]},i,!0,{fileName:Ne,lineNumber:36,columnNumber:15},this)))},void 0,!1,{fileName:Ne,lineNumber:34,columnNumber:11},this)]},void 0,!0,{fileName:Ne,lineNumber:32,columnNumber:9},this):"irregular"===e.usable_time?Object(h.jsxDEV)("div",{className:"available_time",children:[Object(h.jsxDEV)("h3",{children:"\u53ef\u7528\u65f6\u95f4"},void 0,!1,{fileName:Ne,lineNumber:54,columnNumber:11},this),Object(h.jsxDEV)("ul",{className:"timeList flex",children:null===(i=e.irregularDate)||void 0===i?void 0:i.map(((t,i)=>Object(h.jsxDEV)("li",{children:[t.join(" \u81f3 "),e.irregularTime.map(((e,t)=>{if(e[1])return Object(h.jsxDEV)("p",{style:{marginTop:"5px"},children:[e[0],"~",e[1]]},t,!0,{fileName:Ne,lineNumber:62,columnNumber:23},this)}))]},i,!0,{fileName:Ne,lineNumber:57,columnNumber:15},this)))},void 0,!1,{fileName:Ne,lineNumber:55,columnNumber:11},this)]},void 0,!0,{fileName:Ne,lineNumber:53,columnNumber:9},this):Object(h.jsxDEV)(h.Fragment,{},void 0,!1);var i}()},ve="/Users/zhangds/web/blue-brother/frontend/src/components/knockGold/mobileComponent.jsx";const ge=[24,100,100,100,80,24,100,100,100,80,100,100,100,80];var fe=({data:e})=>{function t(){const{reduce_amount:t}=e,i={b:"20px",a:"36px"},a=String(parseFloat(t)).length+1;return a>3?{a:36-2.5*(a-3)+"px",b:20-(a-3)+"px"}:i}return Object(h.jsxDEV)("div",{id:"reduceKnockGold",className:"mobile",children:[Object(h.jsxDEV)("div",{className:"couponShow",children:[Object(h.jsxDEV)("div",{className:"coupon-left",children:[Object(h.jsxDEV)("p",{className:"coupon_money",style:{fontSize:t().a},children:[Object(h.jsxDEV)("span",{style:{fontSize:t().b},children:"\uffe5"},void 0,!1,{fileName:ve,lineNumber:26,columnNumber:13},void 0),e.reduce_amount?e.reduce_amount:"0.00"]},void 0,!0,{fileName:ve,lineNumber:25,columnNumber:11},void 0),Object(h.jsxDEV)("p",{className:"full_money",children:["\u6ee1",e.denomination?e.denomination:"0.00","\u53ef\u7528"]},void 0,!0,{fileName:ve,lineNumber:29,columnNumber:11},void 0)]},void 0,!0,{fileName:ve,lineNumber:24,columnNumber:9},void 0),Object(h.jsxDEV)("div",{className:"coupon-right",children:[Object(h.jsxDEV)("p",{className:e.batch_goods_name.length<20?"title":"isTitle",children:[e.batch_goods_name?e.batch_goods_name:"\u7acb\u51cf\u91d1",e.send_num>1?Object(h.jsxDEV)("span",{className:"send_num",children:["x",e.send_num]},void 0,!0,{fileName:ve,lineNumber:34,columnNumber:34},void 0):null]},void 0,!0,{fileName:ve,lineNumber:32,columnNumber:11},void 0),Object(h.jsxDEV)("p",{children:[(null===e||void 0===e?void 0:e.card_type.length)>0?e.card_type.map((e=>("1"===e?"\u501f\u8bb0\u5361":"\u4fe1\u7528\u5361")+" ")):"xxx xxx xxx"," ","\u53ef\u7528"]},void 0,!0,{fileName:ve,lineNumber:36,columnNumber:11},void 0),1==e.timer_show?Object(h.jsxDEV)("p",{className:"validity",children:["\u6709\u6548\u671f:",e.entry_time[0]||"xxxx-xx-xx xx:xx:xx","\u81f3",e.entry_time[1]||"xxxx-xx-xx xx:xx:xx"]},void 0,!0,{fileName:ve,lineNumber:43,columnNumber:13},void 0):null]},void 0,!0,{fileName:ve,lineNumber:31,columnNumber:9},void 0)]},void 0,!0,{fileName:ve,lineNumber:23,columnNumber:7},void 0),Object(h.jsxDEV)("div",{className:"receiveBtn",children:"\u7acb\u5373\u9886\u53d6"},void 0,!1,{fileName:ve,lineNumber:51,columnNumber:7},void 0),Object(h.jsxDEV)("div",{className:"coupon_explain",children:[Object(h.jsxDEV)("h1",{children:"- \u5151\u6362\u8bf4\u660e -"},void 0,!1,{fileName:ve,lineNumber:53,columnNumber:9},void 0),Object(h.jsxDEV)(je,{data:e},void 0,!1,{fileName:ve,lineNumber:54,columnNumber:9},void 0),e.instruction?Object(h.jsxDEV)(h.Fragment,{children:[Object(h.jsxDEV)("div",{className:"content",children:[Object(h.jsxDEV)("h3",{children:"\u4f7f\u7528\u987b\u77e5"},void 0,!1,{fileName:ve,lineNumber:58,columnNumber:15},void 0),Object(h.jsxDEV)("p",{children:["1\u3001\u5728","1"===e.channel?"\u652f\u4ed8\u5b9d":"\u5fae\u4fe1","APP\u5185\u6253\u5f00\u94fe\u63a5\uff0c\u70b9\u51fb\u3010\u4e00\u952e\u9886\u53d6\u3011\u5b8c\u6210\u9886\u53d6","1"===e.channel?"\u652f\u4ed8\u5b9d":"\u5fae\u4fe1","\u7acb\u51cf\u91d1",Object(h.jsxDEV)("br",{},void 0,!1,{fileName:ve,lineNumber:63,columnNumber:17},void 0),"2\u3001","1"===e.channel?"\u652f\u4ed8\u5b9d":"\u5fae\u4fe1","\u91cc\u7acb\u51cf\u91d1\u4e00\u65e6\u9886\u53d6\u4e0d\u53ef\u64a4\u9500\u3001\u4e0d\u53ef\u8f6c\u8ba9\u3002\u6ce8\u610f\u4e0d\u8981\u5c06\u5151\u6362\u5238\u6cc4\u9732\u7ed9\u4ed6\u4eba"]},void 0,!0,{fileName:ve,lineNumber:59,columnNumber:15},void 0)]},void 0,!0,{fileName:ve,lineNumber:57,columnNumber:13},void 0),Object(h.jsxDEV)("div",{className:"content",children:[Object(h.jsxDEV)("h3",{children:"\u4f7f\u7528\u89c4\u5219"},void 0,!1,{fileName:ve,lineNumber:69,columnNumber:15},void 0),Object(h.jsxDEV)("div",{dangerouslySetInnerHTML:{__html:e.instruction}},void 0,!1,{fileName:ve,lineNumber:70,columnNumber:15},void 0)]},void 0,!0,{fileName:ve,lineNumber:68,columnNumber:13},void 0)]},void 0,!0):Object(h.jsxDEV)(pe.a.TextBlock,{className:"TextBlock",animate:!0,widths:ge,rows:14,dashed:!1},void 0,!1,{fileName:ve,lineNumber:78,columnNumber:11},void 0)]},void 0,!0,{fileName:ve,lineNumber:52,columnNumber:7},void 0)]},void 0,!0,{fileName:ve,lineNumber:22,columnNumber:5},void 0)},_e=i(99),xe=i.n(_e),ye="/Users/zhangds/web/blue-brother/frontend/src/components/knockGold/wangEditor.jsx";class Oe extends m.a.Component{constructor(e){super(e),this.state={editorHtml:"",count:0}}componentDidMount(){let e=this;const t=new xe.a("#wangeditorDom");this.setState({editor:t}),t.config.colors=["#696969","#9093a2","#fgddbb","#e3e7eb"],t.config.pasteText=!0,t.config.height=200,t.config.showFullScreen=!1,t.config.menus=["bold","foreColor","italic","indent","link","justify"],t.config.onchange=function(i){var a=t.txt.text();if(0==a.length&&e.props.setEdittext(""),a.length>e.props.limitLength){let i=a.slice(0,e.props.limitLength);return e.setState({editorHtml:i}),t.txt.html(i),void e.props.setEdittext(i)}e.setState({count:a.length}),e.setState({editorHtml:i}),e.props.setEdittext(i)},t.create();const i=setTimeout((()=>{t.txt.html(this.props.text),clearTimeout(i)}),500)}render(){return Object(h.jsxDEV)("div",{className:"countBox_par",children:[Object(h.jsxDEV)("div",{id:"wangeditorDom",style:{width:this.props.width}},void 0,!1,{fileName:ye,lineNumber:54,columnNumber:9},this),Object(h.jsxDEV)("p",{className:"countBox",children:this.state.count+"/"+this.props.limitLength},void 0,!1,{fileName:ye,lineNumber:55,columnNumber:9},this)]},void 0,!0,{fileName:ye,lineNumber:53,columnNumber:7},this)}}var De="/Users/zhangds/web/blue-brother/frontend/src/components/knockGold/ysf-mobileComponent.jsx";const Ee=[24,100,100,100,80,100,100,100,80,100,100,100,80,100,100,100,100];var Ve=({data:e})=>Object(h.jsxDEV)("div",{id:"ysf-knockGoldViews",className:"mobile",children:[Object(h.jsxDEV)("img",{className:"bubble",src:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/ysf-logo.png",alt:""},void 0,!1,{fileName:De,lineNumber:23,columnNumber:7},void 0),Object(h.jsxDEV)("div",{className:"content",children:[Object(h.jsxDEV)("p",{className:"title",children:[e.batch_goods_name||"\u4e91\u95ea\u4ed8\u7acb\u51cf\u91d1",e.send_num>1?Object(h.jsxDEV)("span",{className:"send_num",children:["x",e.send_num]},void 0,!0,{fileName:De,lineNumber:31,columnNumber:32},void 0):null]},void 0,!0,{fileName:De,lineNumber:29,columnNumber:9},void 0),Object(h.jsxDEV)("div",{className:"information",children:[Object(h.jsxDEV)("p",{className:"money",style:{fontSize:function(){const{denomination:t,reduce_amount:i}=e,a={a:"30px"},s=String(parseFloat(t)).length+String(parseFloat(i)).length+1;return s>12?{a:30-1.8*(s-12)+"px"}:a}().a},children:["\u6ee1",e.denomination?parseFloat(e.denomination):100.1,"\u5143\u51cf",e.reduce_amount?parseFloat(e.reduce_amount):99.99,"\u5143"]},void 0,!0,{fileName:De,lineNumber:34,columnNumber:11},void 0),1==e.timer_show?Object(h.jsxDEV)("p",{className:"information-p2",children:["\u8bf7\u5728\xa0",e.entry_time[0]||"2023-12-30 59:59:59"," ~"," ",e.entry_time[1]||"2023-12-30 59:59:59","\xa0\u5185\u9886\u53d6"]},void 0,!0,{fileName:De,lineNumber:39,columnNumber:13},void 0):null,Object(h.jsxDEV)("p",{className:"type",children:Object(h.jsxDEV)("span",{children:(null===e||void 0===e?void 0:e.card_type.length)>0?e.card_type.map((e=>("1"===e?"\u501f\u8bb0\u5361":"\u4fe1\u7528\u5361")+" ")):"xxx"},void 0,!1,{fileName:De,lineNumber:47,columnNumber:13},void 0)},void 0,!1,{fileName:De,lineNumber:46,columnNumber:11},void 0)]},void 0,!0,{fileName:De,lineNumber:33,columnNumber:9},void 0),Object(h.jsxDEV)("div",{className:"form","v-if":"coupon.status===3",children:[Object(h.jsxDEV)("p",{className:"form-label",children:"\u4e91\u95ea\u4ed8\u8d26\u53f7"},void 0,!1,{fileName:De,lineNumber:55,columnNumber:11},void 0),Object(h.jsxDEV)("input",{className:"form-input",disabled:!0,type:"text",placeholder:"\u8bf7\u8f93\u5165\u624b\u673a\u53f7"},void 0,!1,{fileName:De,lineNumber:56,columnNumber:11},void 0),Object(h.jsxDEV)("input",{className:"form-input mt0",disabled:!0,type:"text",placeholder:"\u8bf7\u518d\u6b21\u8f93\u5165\u624b\u673a\u53f7"},void 0,!1,{fileName:De,lineNumber:57,columnNumber:11},void 0),Object(h.jsxDEV)("p",{className:"form-note",children:["\u6e29\u99a8\u63d0\u793a\uff1a\u5355\u7b14\u4ea4\u6613\u5927\u4e8e",e.denomination?parseFloat(e.denomination):100.1,"\u5143\u53ef\u7acb\u51cf",e.reduce_amount?parseFloat(e.reduce_amount):99.99,"\u5143"]},void 0,!0,{fileName:De,lineNumber:58,columnNumber:11},void 0),Object(h.jsxDEV)("button",{className:"form-button",children:"\u7acb\u5373\u9886\u53d6"},void 0,!1,{fileName:De,lineNumber:63,columnNumber:11},void 0)]},void 0,!0,{fileName:De,lineNumber:54,columnNumber:9},void 0),Object(h.jsxDEV)("div",{className:"segmentation",children:[Object(h.jsxDEV)("i",{className:"left"},void 0,!1,{fileName:De,lineNumber:66,columnNumber:11},void 0),Object(h.jsxDEV)("i",{className:"middle"},void 0,!1,{fileName:De,lineNumber:67,columnNumber:11},void 0),Object(h.jsxDEV)("i",{className:"right"},void 0,!1,{fileName:De,lineNumber:68,columnNumber:11},void 0)]},void 0,!0,{fileName:De,lineNumber:65,columnNumber:9},void 0),Object(h.jsxDEV)("div",{className:"illustrate",children:e.instruction||e.usable_time?Object(h.jsxDEV)(h.Fragment,{children:[Object(h.jsxDEV)(je,{data:e},void 0,!1,{fileName:De,lineNumber:73,columnNumber:15},void 0),Object(h.jsxDEV)("h3",{className:"illustrate-title",children:"\u6d3b\u52a8\u8bf4\u660e"},void 0,!1,{fileName:De,lineNumber:74,columnNumber:15},void 0),Object(h.jsxDEV)("p",{className:"illustrate-text",dangerouslySetInnerHTML:{__html:e.instruction}},void 0,!1,{fileName:De,lineNumber:75,columnNumber:15},void 0)]},void 0,!0):Object(h.jsxDEV)(pe.a.TextBlock,{className:"TextBlock",animate:!0,widths:Ee,rows:12,dashed:!1},void 0,!1,{fileName:De,lineNumber:83,columnNumber:13},void 0)},void 0,!1,{fileName:De,lineNumber:70,columnNumber:9},void 0)]},void 0,!0,{fileName:De,lineNumber:28,columnNumber:7},void 0)]},void 0,!0,{fileName:De,lineNumber:22,columnNumber:5},void 0),ke="/Users/zhangds/web/blue-brother/frontend/src/components/knockGold/zfb-mobileComponent.jsx";const Se=[24,100,100,100,80,100,100,100,80,100,100,100,80,100,100,100,100];var we=({data:e})=>Object(h.jsxDEV)("div",{id:"ysf-knockGoldViews",className:"mobile zfb-knockGoldViews",children:[Object(h.jsxDEV)("img",{className:"bubble",src:"https://lsxd-zfb-reduction.oss-cn-hangzhou.aliyuncs.com/img/logo.png",alt:""},void 0,!1,{fileName:ke,lineNumber:23,columnNumber:7},void 0),Object(h.jsxDEV)("div",{className:"content",children:[Object(h.jsxDEV)("p",{className:"title",children:[e.batch_goods_name||"\u652f\u4ed8\u5b9d\u7acb\u51cf\u91d1",e.send_num>1?Object(h.jsxDEV)("span",{className:"send_num",children:["x",e.send_num]},void 0,!0,{fileName:ke,lineNumber:31,columnNumber:32},void 0):null]},void 0,!0,{fileName:ke,lineNumber:29,columnNumber:9},void 0),Object(h.jsxDEV)("div",{className:"information",children:[Object(h.jsxDEV)("p",{className:"money",style:{fontSize:function(){const{denomination:t,reduce_amount:i}=e,a={a:"30px"},s=String(parseFloat(t)).length+String(parseFloat(i)).length+1;return s>12?{a:30-1.8*(s-12)+"px"}:a}().a},children:["\u6ee1",e.denomination?parseFloat(e.denomination):100.1,"\u5143\u51cf",e.reduce_amount?parseFloat(e.reduce_amount):99.99,"\u5143"]},void 0,!0,{fileName:ke,lineNumber:34,columnNumber:11},void 0),1==e.timer_show?Object(h.jsxDEV)("p",{className:"information-p2",children:["\u8bf7\u5728\xa0",e.entry_time[0]||"2023-12-30 59:59:59"," ~"," ",e.entry_time[1]||"2023-12-30 59:59:59","\xa0\u5185\u9886\u53d6"]},void 0,!0,{fileName:ke,lineNumber:39,columnNumber:13},void 0):null,Object(h.jsxDEV)("p",{className:"type",children:Object(h.jsxDEV)("span",{children:(null===e||void 0===e?void 0:e.card_type.length)>0?e.card_type.map((e=>("1"===e?"\u501f\u8bb0\u5361":"\u4fe1\u7528\u5361")+" ")):"xxx"},void 0,!1,{fileName:ke,lineNumber:47,columnNumber:13},void 0)},void 0,!1,{fileName:ke,lineNumber:46,columnNumber:11},void 0)]},void 0,!0,{fileName:ke,lineNumber:33,columnNumber:9},void 0),Object(h.jsxDEV)("div",{className:"form",children:[Object(h.jsxDEV)("p",{className:"form-label",children:"\u652f\u4ed8\u5b9d\u8d26\u53f7"},void 0,!1,{fileName:ke,lineNumber:55,columnNumber:11},void 0),Object(h.jsxDEV)("input",{className:"form-input",disabled:!0,type:"text",placeholder:"\u8bf7\u8f93\u5165\u652f\u4ed8\u5b9d\u8d26\u53f7"},void 0,!1,{fileName:ke,lineNumber:56,columnNumber:11},void 0),Object(h.jsxDEV)("input",{className:"form-input mt0",disabled:!0,type:"text",placeholder:"\u8bf7\u518d\u6b21\u8f93\u5165\u652f\u4ed8\u5b9d\u8d26\u53f7"},void 0,!1,{fileName:ke,lineNumber:57,columnNumber:11},void 0),Object(h.jsxDEV)("p",{className:"form-note",children:"\u60a8\u53ef\u5728\u652f\u4ed8\u5b9d\u7684\u4e2a\u4eba\u4fe1\u606f\u4e2d\u67e5\u770b\u3010\u652f\u4ed8\u5b9d\u8d26\u53f7\u3011"},void 0,!1,{fileName:ke,lineNumber:63,columnNumber:11},void 0),Object(h.jsxDEV)("button",{className:"form-button",children:"\u7acb\u5373\u9886\u53d6"},void 0,!1,{fileName:ke,lineNumber:64,columnNumber:11},void 0)]},void 0,!0,{fileName:ke,lineNumber:54,columnNumber:9},void 0),Object(h.jsxDEV)("div",{className:"segmentation",children:[Object(h.jsxDEV)("i",{className:"left"},void 0,!1,{fileName:ke,lineNumber:67,columnNumber:11},void 0),Object(h.jsxDEV)("i",{className:"middle"},void 0,!1,{fileName:ke,lineNumber:68,columnNumber:11},void 0),Object(h.jsxDEV)("i",{className:"right"},void 0,!1,{fileName:ke,lineNumber:69,columnNumber:11},void 0)]},void 0,!0,{fileName:ke,lineNumber:66,columnNumber:9},void 0),Object(h.jsxDEV)("div",{className:"illustrate",children:e.instruction||e.usable_time?Object(h.jsxDEV)(h.Fragment,{children:[Object(h.jsxDEV)(je,{data:e},void 0,!1,{fileName:ke,lineNumber:74,columnNumber:15},void 0),Object(h.jsxDEV)("h3",{className:"illustrate-title",children:"\u6d3b\u52a8\u8bf4\u660e"},void 0,!1,{fileName:ke,lineNumber:75,columnNumber:15},void 0),Object(h.jsxDEV)("p",{className:"illustrate-text",dangerouslySetInnerHTML:{__html:e.instruction}},void 0,!1,{fileName:ke,lineNumber:76,columnNumber:15},void 0)]},void 0,!0):Object(h.jsxDEV)(pe.a.TextBlock,{className:"TextBlock",animate:!0,widths:Se,rows:12,dashed:!1},void 0,!1,{fileName:ke,lineNumber:84,columnNumber:13},void 0)},void 0,!1,{fileName:ke,lineNumber:71,columnNumber:9},void 0)]},void 0,!0,{fileName:ke,lineNumber:28,columnNumber:7},void 0)]},void 0,!0,{fileName:ke,lineNumber:22,columnNumber:5},void 0),Ce="/Users/zhangds/web/blue-brother/frontend/src/components/knockGold/index.jsx";const Te=[{key:"1",text:"\u501f\u8bb0\u5361"},{key:"2",text:"\u4fe1\u7528\u5361"}],Ie=[{key:"all",text:"\u603b\u5171"},{key:"month",text:"\u6bcf\u6708"},{key:"week",text:"\u6bcf\u5468"},{key:"day",text:"\u6bcf\u65e5"}],Fe=[{key:"Mon",text:"\u5468\u4e00"},{key:"Tue",text:"\u5468\u4e8c"},{key:"Wed",text:"\u5468\u4e09"},{key:"Thu",text:"\u5468\u56db"},{key:"Fri",text:"\u5468\u4e94"},{key:"Sat",text:"\u5468\u516d"},{key:"Sun",text:"\u5468\u65e5"}],Le=["70","50","30","20"],He=e=>Array.from({length:e},((e,t)=>t));class qe extends r.Component{constructor(e){super(e),this.onDisabledRange=(e,t)=>{let i=!1;return"end"==t&&(i=Y()(e.getTime()).add(1,"days")<=(new Date).getTime()),"start"==t&&(i=e.getTime()<=(new Date).getTime()),i},this.onDisabledRange1=(e,t)=>{let i=JSON.parse(sessionStorage.getItem("knockGold_effectDate")),a=!1,s=Y()(e).format("YYYY-MM-DD HH:mm:ss");const l=Y()(i.end_time).format("HH:mm:ss");return"start"==t&&(a=l<"23:59:59"?Y()(s).isBefore(i.begin_time)||Y()(s).subtract(1,"days").isAfter(i.end_time):Y()(s).isBefore(i.begin_time)||Y()(s).isAfter(i.end_time)),"end"==t&&(a=Y()(s).add(1,"days").isBefore(i.begin_time)||Y()(s).isAfter(i.end_time)),a},this.onDisabledRange2=(e,t)=>{let i=!1,a=Y()(e).format("YYYY-MM-DD HH:mm:ss");const s=Y()(this.state.model.entry_time[1]).format("HH:mm:ss");return"start"==t&&(i=s<"23:59:59"?Y()(a).isBefore(this.state.model.entry_time[0])||Y()(a).subtract(1,"days").isAfter(this.state.model.entry_time[1]):Y()(a).isBefore(this.state.model.entry_time[0])||Y()(a).isAfter(this.state.model.entry_time[1])),"end"==t&&(i=Y()(a).add(1,"days").isBefore(this.state.model.entry_time[0])||Y()(a).isAfter(this.state.model.entry_time[1])),i},this.onDisabledTime=(e,t)=>{let i=JSON.parse(sessionStorage.getItem("knockGold_effectDate"));const a=new Date(i.begin_time),s=a.getHours(),l=a.getMinutes(),n=a.getSeconds();return Object(R.a)(e,a)?{disabledHours:()=>He(s),disabledMinutes:e=>e===s?He(l):[],disabledSeconds:(e,t)=>e===s&&t===l?He(n):[]}:{}},this.onDisabledTime1=(e,t)=>{const i=new Date(this.state.model.entry_time[0]),a=i.getHours(),s=i.getMinutes(),l=i.getSeconds();return Object(R.a)(e,i)?{disabledHours:()=>He(a),disabledMinutes:e=>e===a?He(s):[],disabledSeconds:(e,t)=>e===a&&t===s?He(l):[]}:{}},this.state={model:{channel:"1",entry_time:[],batch_goods_name:"",channel_activity_id:"",temp_no:"",weight:"0",price:"",recharge_amount:"",denomination:"",reduce_amount:"",all_budget:"",day_budget:"",card_type:[],natural_limit:"1",brush_limit:"1",instruction:z,early_per:[],early_notifier:[],receive_number:"",receive_type:"all",usable_time:"",fixed_time:[],timer:[],timer_type:"1",effect_date_type:"",effect_date:"",irregularDate:[[]],irregularTime:[[]],ruleDate:[[]],ruleWeek:[],send_num:1,provider:"lsxd",receive_mode:1,is_webview:0,timer_show:1},TimeDiffer:"",visible:!1,warningInput:"",input_early_per:"",getTimeList:[{key:"0",text:"\u7acb\u5373\u751f\u6548",disabled:!1},{key:"1",text:"\u6b21\u65e5\u751f\u6548",disabled:!1}],userSelectList:[],form_data:{}}}componentWillMount(){if(this.props.data){var e,t;let n=this.state.model;var i,a,s,l;if(n.entry_time[0]=this.props.data.time_limit.effect_time.start_time,n.entry_time[1]=this.props.data.time_limit.effect_time.end_time,n.timer_show=Number(this.props.data.time_limit.timer_show)||1,n.instruction=this.props.data.instruction,n.fixed_time[0]=null===(e=this.props.data.time_limit.use_time.fiexd_time)||void 0===e?void 0:e.start_time,n.fixed_time[1]=null===(t=this.props.data.time_limit.use_time.fiexd_time)||void 0===t?void 0:t.end_time,"week"===this.props.data.time_limit.use_time.type)n.ruleWeek=null===(i=this.props.data.time_limit.use_time)||void 0===i?void 0:i.week,n.ruleDate=null===(a=this.props.data.time_limit.use_time)||void 0===a?void 0:a.time;if("irregular"===this.props.data.time_limit.use_time.type)n.irregularDate=null===(s=this.props.data.time_limit.use_time)||void 0===s?void 0:s.day,n.irregularTime=null===(l=this.props.data.time_limit.use_time)||void 0===l?void 0:l.time;this.setState({model:n})}if(this.props.combining){const e=this.state.model;e.channel=this.props.combining.channel,e.receive_mode=this.props.combining.receive_mode,e.entry_time=this.props.combining.date_time,this.setState({model:e}),this.onHandleChangeChannel(this.props.combining.channel)}this.getUserSelectList(),this.getTimeDiff()}addOrMoveFunction(e,t,i,a,s){var l;if(null===(l=this.props.data)||void 0===l||!l.id)return Object(h.jsxDEV)(h.Fragment,{children:[0!==e?Object(h.jsxDEV)("p",{className:"move",onClick:()=>{const a=i;a.splice(e,1),this.setState({[t]:a})},children:"\u5220\u9664"},void 0,!1,{fileName:Ce,lineNumber:168,columnNumber:11},this):null,e===i.length-1?Object(h.jsxDEV)("p",{className:"add",onClick:()=>{if(a||i.length<3){const e=i;e.push([]),this.setState({[t]:e})}else s&&c.a.warn(s)},children:"\u6dfb\u52a0"},void 0,!1,{fileName:Ce,lineNumber:180,columnNumber:11},this):null]},void 0,!0)}echoFun(e){if(this.props.data){var t,i,a;let s=this.state.model;for(let e in this.props.data)s[e]=this.props.data[e];s.weight=String(this.props.data.weight),s.is_webview=Number(this.props.data.is_webview)||0,s.early_per=this.props.data.early_per.map((e=>String(e))),s.channel=String(this.props.data.channel),s.natural_limit=String(this.props.data.natural_limit),s.brush_limit=String(this.props.data.brush_limit),s.card_type=this.props.data.card_type.map((e=>String(e))),s.receive_number=this.props.data.receive_conf.num,s.receive_type=this.props.data.receive_conf.type,s.receive_mode=this.props.data.receive_mode,s.timer[0]=this.props.data.time_limit.receive_time.start_time,s.timer[1]=this.props.data.time_limit.receive_time.end_time,s.timer_type=null!==(t=this.props.data.time_limit.receive_time)&&void 0!==t&&t.start_time?"2":"1",s.effect_date_type=this.state.getTimeList[Number(this.props.data.time_limit.use_time.effect_date_type)],s.effect_date=this.props.data.time_limit.use_time.effect_day,s.usable_time=this.props.data.time_limit.use_time.type,s.early_notifier=null===(i=this.props.data.early_notifier)||void 0===i?void 0:i.map((t=>null===e||void 0===e?void 0:e.map((e=>{if((null===t||void 0===t?void 0:t.mobile)===e.key||(null===t||void 0===t?void 0:t.real_name)===e.text)return e})).filter((e=>e))[0])).filter((e=>e)),s.origin=this.props.data;((null===(a=this.props.data)||void 0===a?void 0:a.early_per)||[]).map((e=>-1===Le.indexOf(e)?this.setState({input_early_per:e,model:s}):this.setState({model:s})))}}getUserSelectList(e){Object(a.Jb)().then((e=>Object(a.Tb)(e,((e,t)=>{const i=e.default.map((e=>e.real_name)),a=e.default.map((e=>e.mobile)),s=[],l=e.data.map((e=>{if(-1!==i.indexOf(e.real_name)||-1!==a.indexOf(e.mobile)){const t={key:e.mobile,text:e.real_name,disabled:!0,closable:!1};return s.push(t),t}return{key:e.mobile,text:e.real_name,closable:!0}}));this.onHandleChange(s,"early_notifier"),this.setState({userSelectList:l}),this.echoFun(l)}),(e=>{c.a.error(e)}))))}filterEarlyPer(){const e=this.state.model.early_per.filter((e=>e!==this.state.input_early_per));this.onHandleChange(e,"early_per")}async submit(){if(this.refs.form.validator()&&this.refs.form1.validator()&&this.refs.form2.validator()&&this.refs.form4.validator()){if(this.props.data){var e;let t=[];sessionStorage.getItem("knockGoldData")&&(t=JSON.parse(sessionStorage.getItem("knockGoldData")));let i=t.findIndex((e=>e.channel_activity_id===this.props.data.channel_activity_id));return!1!==this.limitFunction()&&(null!==(e=this.props.data)&&void 0!==e&&e.goods_id?t[i]=Object.assign({...this.state.model.origin,...this.transformDataCode()}):t[i]=this.transformDataCode(),sessionStorage.setItem("knockGoldData",JSON.stringify(t)),this.setState({form_data:t[i]}),!0)}{if(!1===this.limitFunction())return!1;let e=[];sessionStorage.getItem("knockGoldData")&&(e=JSON.parse(sessionStorage.getItem("knockGoldData")));let t=e||[];const i=this.transformDataCode();return t.find((e=>e.channel_activity_id===i.channel_activity_id))?(c.a.error("\u4e0d\u5141\u8bb8\u8f93\u5165\u91cd\u590d\u7684\u5e73\u53f0\u6279\u6b21\u53f7"),!1):(t.push(i),sessionStorage.setItem("knockGoldData",JSON.stringify(t)),this.setState({form_data:i}),!0)}}}detectTimeConflict(e){for(var t=0;t=l&&il}}transformDataCode(){var e;const t={};return t.channel=this.state.model.channel,t.provider=this.state.model.provider,t.receive_mode=this.state.model.receive_mode,1==t.channel?t.temp_no=this.state.model.temp_no:t.temp_no="",t.batch_goods_name=this.state.model.batch_goods_name,t.channel_activity_id=this.state.model.channel_activity_id,t.price=this.state.model.price,t.recharge_amount=this.state.model.recharge_amount,t.send_num=this.state.model.send_num,t.denomination=this.state.model.denomination,t.reduce_amount=this.state.model.reduce_amount,t.all_budget=this.state.model.all_budget,t.day_budget=this.state.model.day_budget,t.card_type=this.state.model.card_type,t.natural_limit=this.state.model.natural_limit,t.brush_limit=this.state.model.brush_limit,t.instruction=this.state.model.instruction,t.early_per=this.state.model.early_per.filter((e=>e)),t.early_notifier=this.state.model.early_notifier.map((({text:e,key:t})=>({real_name:e,mobile:t}))),t.is_webview=this.state.model.is_webview,t.weight=this.state.model.weight,t.receive_conf={type:this.state.model.receive_type,num:this.state.model.receive_number},t.time_limit={effect_time:{start_time:this.state.model.entry_time[0],end_time:this.state.model.entry_time[1]},timer_show:this.state.model.timer_show,receive_time:{start_time:this.state.model.timer[0],end_time:this.state.model.timer[1]},use_time:{type:this.state.model.usable_time,...this.withTimeFunction(this.state.model.usable_time),effect_day:this.state.model.effect_date,effect_date_type:null===(e=this.state.model.effect_date_type)||void 0===e?void 0:e.key}},t}withTimeFunction(e){let t={};switch(e){case"week":t.time=this.state.model.ruleDate,t.week=this.state.model.ruleWeek;break;case"irregular":t.time=this.state.model.irregularTime,t.day=this.state.model.irregularDate;break;default:t.fiexd_time={start_time:this.state.model.fixed_time[0],end_time:this.state.model.fixed_time[1]}}return t}testDateFunction(e){return e.map((e=>this.setTime(e))).filter((e=>e))}limitFunction(){if(!this.state.model.card_type.length)return c.a.error("\u8bf7\u9009\u62e9\u5361\u79cd"),!1;if(this.state.model.early_per.filter((e=>e)).length<1)return c.a.error("\u8bf7\u9009\u9884\u8b66\u767e\u5206\u6bd4"),!1;if(!this.state.model.usable_time)return c.a.error("\u8bf7\u9009\u62e9\u53ef\u7528\u65f6\u95f4\u6bb5\u7c7b\u578b"),!1;var e;if("received"===this.state.model.usable_time&&(null===(e=this.state.model.effect_date_type)||void 0===e||!e.key||!this.state.model.effect_date))return c.a.error("\u8bf7\u5b8c\u6574\u7684\u586b\u5199\u6216\u9009\u62e9\u53ef\u7528\u65f6\u95f4\u6bb5"),!1;if((this.state.TimeDifferNumber(this.state.model.effect_date))&&"received"===this.state.model.usable_time)return c.a.error(`\u6709\u9650\u671f\u4e0d\u5141\u8bb8\u5927\u4e8e\u751f\u6548\u65f6\u95f4\u6bb5 \u6ce8\uff1a\u5f53\u524d\u6709\u6548\u671f\u6700\u5c0f\u65f6\u95f4\u4e3a 1 \u5929\uff0c\u6700\u5927\u65f6\u95f4\u4e3a ${this.state.TimeDiffer} \u5929`),!1;if("fiexd"===this.state.model.usable_time&&this.setTime(this.state.model.fixed_time))return c.a.error("\u8bf7\u5b8c\u6574\u7684\u9009\u62e9\u56fa\u5b9a\u65f6\u95f4\u6bb5"),!1;if("fiexd"===this.state.model.usable_time&&this.state.model.fixed_time[0]>this.state.model.entry_time[1]||"fiexd"===this.state.model.usable_time&&this.state.model.fixed_time[1]>this.state.model.entry_time[1])return c.a.error("\u56fa\u5b9a\u5f00\u59cb\u65f6\u95f4\u6216\u7ed3\u675f\u65f6\u95f4\u4e0d\u5141\u8bb8\u5927\u4e8e\u751f\u6548\u7ed3\u675f\u65f6\u95f4"),!1;if("week"===this.state.model.usable_time&&(this.testDateFunction(this.state.model.ruleDate).length>0||this.state.model.ruleWeek.length<1))return c.a.error("\u8bf7\u5b8c\u6574\u7684\u9009\u62e9\u89c4\u5219\u65e5\u671f\u548c\u65f6\u95f4"),!1;if("irregular"===this.state.model.usable_time&&(this.testDateFunction(this.state.model.irregularDate).length>0||this.testDateFunction(this.state.model.irregularTime).length>0))return c.a.error("\u8bf7\u5b8c\u6574\u7684\u9009\u62e9\u4e0d\u89c4\u5219\u65e5\u671f\u548c\u65f6\u95f4"),!1;if(this.detectTimeConflict(this.state.model.ruleDate))return c.a.error("\u6709\u6548\u671f\u5185\uff0c\u89c4\u5219\u65f6\u95f4\u5b58\u5728\u4ea4\u96c6"),!1;if(this.detectTimeConflict(this.state.model.irregularDate))return c.a.error("\u6709\u6548\u671f\u5185\uff0c\u4e0d\u89c4\u5219\u65e5\u671f\u5b58\u5728\u4ea4\u96c6"),!1;if(this.detectTimeConflict(this.state.model.irregularTime))return c.a.error("\u6709\u6548\u671f\u5185\uff0c\u4e0d\u89c4\u5219\u65f6\u95f4\u5b58\u5728\u4ea4\u96c6"),!1;const t=/^-?\d+\.?\d{0,2}$/;return t.test(this.state.model.denomination)&&t.test(this.state.model.reduce_amount)?this.state.model.denomination-0this.state.model.all_budget-0?(c.a.error("\u5145\u503c\u6279\u6b21\u91d1\u989d\u4e0d\u5141\u8bb8\u5927\u4e8e\u603b\u9884\u7b97"),!1):this.state.model.all_budget-014?(c.a.error("\u76ee\u524d\u4ec5\u652f\u6301\u65b0\u589e10\u4e2a\u9884\u8b66\u901a\u77e5\u4eba"),!1):void 0:(c.a.error("\u8bf7\u8f93\u5165\u6b63\u786e\u7684\u9762\u989d\u91d1\u989d\u6216\u7acb\u51cf\u91d1\u989d\uff08\u4fdd\u7559\u4e24\u4f4d\u5c0f\u6570\uff09"),!1)}setTime(e){if(!Object(le.a)(e)||0===(null===e||void 0===e?void 0:e.length))return!0;const t=e.map((e=>Boolean(e)));let i=null;return t.map((e=>{e||(i=!0)})),i}onHandleChange(e,t,i){let a=this.state.model;i?a[t][i]=e:a[t]=e,this.setState({model:a})}getTimeDiff(){if(this.state.model.entry_time[1]){const e=function(e,t){let i=new Date(e).getTime()/1e3,a=new Date(t).getTime()/1e3;var s="",l="";i("1"===(null===t||void 0===t?void 0:t.key)&&(t.disabled=e<2),t)));this.setState({TimeDiffer:e,getTimeList:t})}}closeCallback(e){const t=this.state.model.early_notifier.filter((t=>t.key!==e.key));this.onHandleChange(t,"early_notifier"),t.length<1&&this.setState({warningInput:""})}switchComponents(){return 1==this.state.model.channel&&2===this.state.model.receive_mode?Object(h.jsxDEV)(we,{data:this.state.model},void 0,!1,{fileName:Ce,lineNumber:759,columnNumber:14},this):3==this.state.model.channel?Object(h.jsxDEV)(Ve,{data:this.state.model},void 0,!1,{fileName:Ce,lineNumber:762,columnNumber:14},this):Object(h.jsxDEV)(fe,{data:this.state.model},void 0,!1,{fileName:Ce,lineNumber:764,columnNumber:12},this)}onHandleChangeChannel(e){this.onHandleChange(e,"channel"),1==e?this.onHandleChange(z,"instruction"):2==e?this.onHandleChange(A,"instruction"):this.onHandleChange(J,"instruction"),1!=e&&this.onHandleChange(1,"receive_mode"),2!=e&&3!=e||this.onHandleChange("voucher_wechat_lsxd","provider"),1==e&&this.onHandleChange("lsxd","provider")}render(){var e,t,i,a,o,r,m,c,b,p,N,v,g,f,_,x,y,O,D,E,V,k,S,w,C,T,I,F,L,H,q,M;return Object(h.jsxDEV)("div",{id:"addKnockGold",children:[Object(h.jsxDEV)(d.a,{style:{width:"70%",margin:"10px 0"},title:"\u57fa\u672c\u4fe1\u606f",children:Object(h.jsxDEV)(l.a,{model:this.state.model,rules:ue.basic,ref:"form",children:[Object(h.jsxDEV)(s.a,{labelname:"\u6e20\u9053",prop:"channel",id:"type",children:Object(h.jsxDEV)(Q.a,{disabled:!(null===(e=this.props.data)||void 0===e||!e.id)||!!this.props.combining,onChange:({target:e})=>{this.onHandleChangeChannel(e.value),this.onHandleChange(0,"is_webview")},value:this.state.model.channel,children:[Object(h.jsxDEV)(ne.a,{value:"1",children:"\u652f\u4ed8\u5b9d"},void 0,!1,{fileName:Ce,lineNumber:803,columnNumber:17},this),Object(h.jsxDEV)(ne.a,{value:"2",children:"\u5fae\u4fe1"},void 0,!1,{fileName:Ce,lineNumber:804,columnNumber:17},this),this.props.ysf?null:Object(h.jsxDEV)(ne.a,{value:"3",children:"\u4e91\u95ea\u4ed8"},void 0,!1,{fileName:Ce,lineNumber:805,columnNumber:36},this)]},void 0,!0,{fileName:Ce,lineNumber:795,columnNumber:15},this)},void 0,!1,{fileName:Ce,lineNumber:794,columnNumber:13},this),Object(h.jsxDEV)(s.a,{labelname:"\u4e3b\u4f53\u540d\u79f0",prop:"provider",id:"provider",children:Object(h.jsxDEV)(Q.a,{disabled:!(null===(t=this.props.data)||void 0===t||!t.id)||3==this.state.model.channel,onChange:({target:e})=>{this.onHandleChange(e.value,"provider")},value:this.state.model.provider,children:1==this.state.model.channel?Object(h.jsxDEV)(h.Fragment,{children:[Object(h.jsxDEV)(ne.a,{value:"lsxd",children:"\u84dd\u8272\u5144\u5f1f"},void 0,!1,{fileName:Ce,lineNumber:818,columnNumber:21},this),Object(h.jsxDEV)(ne.a,{value:"fjxw",children:"\u798f\u5efa\u5174\u65fa"},void 0,!1,{fileName:Ce,lineNumber:819,columnNumber:21},this)]},void 0,!0):Object(h.jsxDEV)(h.Fragment,{children:[Object(h.jsxDEV)(ne.a,{value:"voucher_wechat_lsxd",children:"\u84dd\u8272\u5144\u5f1f"},void 0,!1,{fileName:Ce,lineNumber:823,columnNumber:21},this),Object(h.jsxDEV)(ne.a,{value:"voucher_wechat_fjxw",children:"\u798f\u5efa\u5174\u65fa"},void 0,!1,{fileName:Ce,lineNumber:824,columnNumber:21},this)]},void 0,!0)},void 0,!1,{fileName:Ce,lineNumber:809,columnNumber:15},this)},"provider",!1,{fileName:Ce,lineNumber:808,columnNumber:13},this),2!=this.state.model.channel||this.props.combining?null:Object(h.jsxDEV)(s.a,{labelname:"\u6253\u5f00\u65b9\u5f0f",prop:"is_webview",id:"is_webview",children:Object(h.jsxDEV)(Q.a,{onChange:({target:e})=>{this.onHandleChange(e.value,"is_webview")},value:this.state.model.is_webview,disabled:!(null===(i=this.props.data)||void 0===i||!i.id),children:[Object(h.jsxDEV)(ne.a,{value:0,children:"\u5c0f\u7a0b\u5e8f"},void 0,!1,{fileName:Ce,lineNumber:838,columnNumber:19},this),Object(h.jsxDEV)(ne.a,{value:1,disabled:2===Number(sessionStorage.getItem("keyType")),children:"\u516c\u4f17\u53f7"},void 0,!1,{fileName:Ce,lineNumber:839,columnNumber:19},this)]},void 0,!0,{fileName:Ce,lineNumber:831,columnNumber:17},this)},"is_webview",!1,{fileName:Ce,lineNumber:830,columnNumber:15},this),1!=this.state.model.channel||this.props.ysf?null:Object(h.jsxDEV)(s.a,{labelname:"\u9886\u53d6\u65b9\u5f0f",prop:"receive_mode",id:"receive_mode",children:Object(h.jsxDEV)(Q.a,{disabled:!!this.props.combining,onChange:({target:e})=>{this.onHandleChange(e.value,"receive_mode")},value:this.state.model.receive_mode,children:[Object(h.jsxDEV)(ne.a,{value:1,children:"\u5b98\u65b9\u9886\u53d6"},void 0,!1,{fileName:Ce,lineNumber:862,columnNumber:19},this),Object(h.jsxDEV)(ne.a,{value:2,children:"\u8d26\u53f7\u9886\u53d6"},void 0,!1,{fileName:Ce,lineNumber:863,columnNumber:19},this)]},void 0,!0,{fileName:Ce,lineNumber:855,columnNumber:17},this)},"receive_mode",!1,{fileName:Ce,lineNumber:849,columnNumber:15},this),Object(h.jsxDEV)(s.a,{labelname:"\u7acb\u51cf\u91d1\u5e73\u53f0\u6279\u6b21\u53f7",prop:"channel_activity_id",id:"batch_number",children:Object(h.jsxDEV)(n.a,{onChange:e=>{this.onHandleChange(e,"channel_activity_id")},onClearItem:()=>{this.onHandleChange("","channel_activity_id")},disabled:!(null===(a=this.props.data)||void 0===a||!a.id),value:this.state.model.channel_activity_id,placeholder:"\u8bf7\u8f93\u5165",labelWidth:"0px",maxLength:50,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:Ce,lineNumber:868,columnNumber:15},this)},void 0,!1,{fileName:Ce,lineNumber:867,columnNumber:13},this),1==this.state.model.channel?Object(h.jsxDEV)(s.a,{labelname:"\u5238\u6a21\u677f\u7f16\u53f7",prop:"temp_no",id:"batch_number",children:Object(h.jsxDEV)(n.a,{onChange:e=>{this.onHandleChange(e,"temp_no")},onClearItem:()=>{this.onHandleChange("","temp_no")},disabled:!(null===(o=this.props.data)||void 0===o||!o.id),value:this.state.model.temp_no,placeholder:"\u8bf7\u8f93\u5165",labelWidth:"0px",maxLength:50,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:Ce,lineNumber:887,columnNumber:17},this)},"temp_no",!1,{fileName:Ce,lineNumber:886,columnNumber:15},this):null,Object(h.jsxDEV)(s.a,{labelname:"\u6279\u6b21\u5546\u54c1\u540d\u79f0",prop:"batch_goods_name",id:"batch_goods_name",children:Object(h.jsxDEV)(n.a,{onChange:e=>{this.onHandleChange(e,"batch_goods_name")},onClearItem:()=>{this.onHandleChange("","batch_goods_name")},value:this.state.model.batch_goods_name,disabled:!(null===(r=this.props.data)||void 0===r||!r.id),placeholder:"\u8bf7\u8f93\u5165",labelWidth:"0px",maxLength:30,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:Ce,lineNumber:907,columnNumber:15},this)},void 0,!1,{fileName:Ce,lineNumber:906,columnNumber:13},this),this.props.combining?null:Object(h.jsxDEV)(s.a,{labelname:"\u5546\u54c1\u6743\u91cd",prop:"weight",id:"weight",children:Object(h.jsxDEV)(n.a,{onChange:e=>{this.onHandleChange(e,"weight")},onClearItem:()=>{this.onHandleChange("","weight")},value:this.state.model.weight,placeholder:"\u8bf7\u8f93\u5165",labelWidth:"0px",maxLength:3,height:"36px",width:"520px",countShow:!1,alignment:"left"},void 0,!1,{fileName:Ce,lineNumber:926,columnNumber:17},this)},void 0,!1,{fileName:Ce,lineNumber:925,columnNumber:15},this),Object(h.jsxDEV)(s.a,{labelname:"\u5408\u540c\u5355\u4ef7",prop:"price",id:"contract_price",children:Object(h.jsxDEV)(n.a,{onChange:e=>{this.onHandleChange(e,"price")},onClearItem:()=>{this.onHandleChange("","price")},value:this.state.model.price,placeholder:"\u8bf7\u8f93\u5165",labelWidth:"0px",maxLength:7,height:"36px",disabled:!(null===(m=this.props.data)||void 0===m||!m.id),width:"520px",unit:"\u5143",countShow:!1,alignment:"left"},void 0,!1,{fileName:Ce,lineNumber:945,columnNumber:15},this)},void 0,!1,{fileName:Ce,lineNumber:944,columnNumber:13},this),Object(h.jsxDEV)(s.a,{labelname:"\u5145\u503c\u6279\u6b21\u91d1\u989d",prop:"recharge_amount",id:"money",children:[Object(h.jsxDEV)(n.a,{onChange:e=>{this.onHandleChange(e,"recharge_amount")},onClearItem:()=>{this.onHandleChange("","recharge_amount")},value:this.state.model.recharge_amount,disabled:!(null===(c=this.props.data)||void 0===c||!c.id),placeholder:"\u8bf7\u8f93\u5165",unit:"\u5143",countShow:!1,labelWidth:"0px",maxLength:9,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:Ce,lineNumber:965,columnNumber:15},this),this.state.model.id?Object(h.jsxDEV)(u.a,{onClick:e=>{this.setState({visible:!0})},children:"\u52a0\u6b3e"},void 0,!1,{fileName:Ce,lineNumber:984,columnNumber:17},this):null]},void 0,!0,{fileName:Ce,lineNumber:964,columnNumber:13},this)]},void 0,!0,{fileName:Ce,lineNumber:793,columnNumber:11},this)},void 0,!1,{fileName:Ce,lineNumber:792,columnNumber:9},this),Object(h.jsxDEV)(d.a,{style:{width:"70%",margin:"10px 0"},title:"\u53d1\u653e\u89c4\u5219",children:Object(h.jsxDEV)(l.a,{model:this.state.model,rules:ue.grant,ref:"form1",children:[Object(h.jsxDEV)(s.a,{id:"denomination",labelname:"\u9762\u989d",children:[Object(h.jsxDEV)("span",{children:"\u6ee1"},void 0,!1,{fileName:Ce,lineNumber:998,columnNumber:15},this),Object(h.jsxDEV)(n.a,{onChange:e=>{this.onHandleChange(e,"denomination")},onClearItem:()=>{this.onHandleChange("","denomination")},value:this.state.model.denomination,placeholder:"\u8bf7\u8f93\u5165",labelWidth:"0px",unit:"\u5143",disabled:!(null===(b=this.props.data)||void 0===b||!b.id),countShow:!1,maxLength:7,height:"36px",width:"231px",alignment:"left"},void 0,!1,{fileName:Ce,lineNumber:999,columnNumber:15},this),Object(h.jsxDEV)("span",{className:"JIan",children:"\u51cf"},void 0,!1,{fileName:Ce,lineNumber:1017,columnNumber:15},this),Object(h.jsxDEV)(n.a,{onChange:e=>{this.onHandleChange(e,"reduce_amount")},onClearItem:()=>{this.onHandleChange("","reduce_amount")},value:this.state.model.reduce_amount,placeholder:"\u8bf7\u8f93\u5165",labelWidth:"0px",unit:"\u5143",disabled:!(null===(p=this.props.data)||void 0===p||!p.id),countShow:!1,maxLength:7,height:"36px",width:"231px",alignment:"left"},void 0,!1,{fileName:Ce,lineNumber:1018,columnNumber:15},this)]},void 0,!0,{fileName:Ce,lineNumber:997,columnNumber:13},this),Object(h.jsxDEV)(s.a,{id:"all_budget",labelname:"\u603b\u9884\u7b97",prop:"all_budget",children:Object(h.jsxDEV)(n.a,{onChange:e=>{this.onHandleChange(e,"all_budget")},onClearItem:()=>{this.onHandleChange("","all_budget")},value:this.state.model.all_budget,placeholder:"\u8bf7\u8f93\u5165",disabled:!(null===(N=this.props.data)||void 0===N||!N.id),labelWidth:"0px",maxLength:9,height:"36px",unit:"\u5143",countShow:!1,width:"520px",alignment:"left"},void 0,!1,{fileName:Ce,lineNumber:1038,columnNumber:15},this)},void 0,!1,{fileName:Ce,lineNumber:1037,columnNumber:13},this),Object(h.jsxDEV)(s.a,{id:"day_budget",labelname:"\u5355\u5929\u9884\u7b97\u53d1\u653e\u4e0a\u9650",prop:"day_budget",children:Object(h.jsxDEV)(n.a,{onChange:e=>{this.onHandleChange(e,"day_budget")},onClearItem:()=>{this.onHandleChange("","day_budget")},disabled:!(null===(v=this.props.data)||void 0===v||!v.id),value:this.state.model.day_budget,placeholder:"\u8bf7\u8f93\u5165",labelWidth:"0px",maxLength:9,height:"36px",unit:"\u5143",countShow:!1,width:"520px",alignment:"left"},void 0,!1,{fileName:Ce,lineNumber:1059,columnNumber:15},this)},void 0,!1,{fileName:Ce,lineNumber:1058,columnNumber:13},this),Object(h.jsxDEV)(s.a,{id:"send_num",labelname:"\u5355\u6b21\u5230\u8d26",prop:"send_num",children:Object(h.jsxDEV)(n.a,{onChange:e=>{this.onHandleChange(e,"send_num")},onClearItem:()=>{this.onHandleChange("","send_num")},disabled:!(null===(g=this.props.data)||void 0===g||!g.id),value:this.state.model.send_num,placeholder:"\u8bf7\u8f93\u5165",labelWidth:"0px",maxLength:9,height:"36px",unit:"\u5f20",countShow:!1,width:"520px",alignment:"left"},void 0,!1,{fileName:Ce,lineNumber:1079,columnNumber:15},this)},void 0,!1,{fileName:Ce,lineNumber:1078,columnNumber:13},this),Object(h.jsxDEV)(s.a,{id:"receive_number",labelname:"\u7528\u6237\u53ef\u9886\u4e2a\u6570",prop:"receive_number",children:[Object(h.jsxDEV)(n.a,{onChange:e=>{this.onHandleChange(e,"receive_number")},onClearItem:()=>{this.onHandleChange("","receive_number")},disabled:!(null===(f=this.props.data)||void 0===f||!f.id),value:this.state.model.receive_number,placeholder:"\u8bf7\u8f93\u5165",labelWidth:"0px",maxLength:4,height:"36px",unit:"\u4e2a",countShow:!1,width:"304px",alignment:"left"},void 0,!1,{fileName:Ce,lineNumber:1099,columnNumber:15},this),Object(h.jsxDEV)(Q.a,{disabled:!(null===(_=this.props.data)||void 0===_||!_.id),onChange:({target:e})=>{this.onHandleChange(e.value,"receive_type")},value:this.state.model.receive_type,children:Ie.map((({key:e,text:t})=>Object(h.jsxDEV)(ne.a,{value:e,children:t},e,!1,{fileName:Ce,lineNumber:1125,columnNumber:19},this)))},void 0,!1,{fileName:Ce,lineNumber:1117,columnNumber:15},this)]},void 0,!0,{fileName:Ce,lineNumber:1098,columnNumber:13},this),Object(h.jsxDEV)(s.a,{id:"card_type",labelname:"\u5361\u79cd",prop:"card_type",children:Object(h.jsxDEV)(oe.a,{disabled:!(null===(x=this.props.data)||void 0===x||!x.id),value:this.state.model.card_type,onChange:e=>{this.onHandleChange(e,"card_type")},children:Te.map((e=>Object(h.jsxDEV)(j.a,{value:e.key,children:e.text},e.key,!1,{fileName:Ce,lineNumber:1140,columnNumber:19},this)))},void 0,!1,{fileName:Ce,lineNumber:1132,columnNumber:15},this)},void 0,!1,{fileName:Ce,lineNumber:1131,columnNumber:13},this),Object(h.jsxDEV)(s.a,{id:"natural_limit",labelname:"\u662f\u5426\u5f00\u542f\u81ea\u7136\u4eba\u9650\u5236",prop:"natural_limit",children:Object(h.jsxDEV)(Q.a,{disabled:!(null===(y=this.props.data)||void 0===y||!y.id),onChange:({target:e})=>{this.onHandleChange(e.value,"natural_limit")},value:this.state.model.natural_limit,children:[Object(h.jsxDEV)(ne.a,{value:"1",children:"\u662f"},void 0,!1,{fileName:Ce,lineNumber:1154,columnNumber:17},this),Object(h.jsxDEV)(ne.a,{value:"5",children:"\u5426"},void 0,!1,{fileName:Ce,lineNumber:1155,columnNumber:17},this)]},void 0,!0,{fileName:Ce,lineNumber:1147,columnNumber:15},this)},void 0,!1,{fileName:Ce,lineNumber:1146,columnNumber:13},this),Object(h.jsxDEV)(s.a,{id:"brush_limit",labelname:"\u662f\u5426\u5f00\u542f\u9632\u5237\u62e6\u622a",prop:"brush_limit",children:Object(h.jsxDEV)(Q.a,{disabled:!(null===(O=this.props.data)||void 0===O||!O.id),onChange:({target:e})=>{this.onHandleChange(e.value,"brush_limit")},value:this.state.model.brush_limit,children:[Object(h.jsxDEV)(ne.a,{value:"1",children:"\u662f"},void 0,!1,{fileName:Ce,lineNumber:1166,columnNumber:17},this),Object(h.jsxDEV)(ne.a,{value:"5",children:"\u5426"},void 0,!1,{fileName:Ce,lineNumber:1167,columnNumber:17},this)]},void 0,!0,{fileName:Ce,lineNumber:1159,columnNumber:15},this)},void 0,!1,{fileName:Ce,lineNumber:1158,columnNumber:13},this)]},void 0,!0,{fileName:Ce,lineNumber:996,columnNumber:11},this)},void 0,!1,{fileName:Ce,lineNumber:995,columnNumber:9},this),Object(h.jsxDEV)(d.a,{style:{width:"70%",margin:"10px 0"},title:"\u65f6\u95f4\u9650\u5236",children:Object(h.jsxDEV)(l.a,{model:this.state.model,rules:ue.time,ref:"form2",children:[this.props.combining?null:Object(h.jsxDEV)(s.a,{id:"entry_time",labelname:"\u751f\u6548\u65f6\u95f4\u6bb5",prop:"entry_time",children:[Object(h.jsxDEV)(ee.a,{className:"zent-datepicker-plan",showTime:{format:"HH:mm:ss",defaultTime:["00:00:00","23:59:59"]},format:"YYYY-MM-DD HH:mm:ss",disabled:[!(null===(D=this.props.data)||void 0===D||!D.id),!(null===(E=this.props.data)||void 0===E||!E.id)],width:245,value:this.state.model.entry_time,onChange:e=>{this.onHandleChange(e,"entry_time"),this.getTimeDiff()},disabledTime:this.onDisabledTime,disabledDate:this.onDisabledRange1},void 0,!1,{fileName:Ce,lineNumber:1177,columnNumber:17},this),Object(h.jsxDEV)(Q.a,{style:{marginLeft:"20px"},onChange:({target:e})=>{this.onHandleChange(e.value,"timer_show")},value:this.state.model.timer_show,children:[Object(h.jsxDEV)(ne.a,{value:1,children:"\u663e\u793a"},void 0,!1,{fileName:Ce,lineNumber:1201,columnNumber:19},this),Object(h.jsxDEV)(ne.a,{value:2,children:"\u9690\u85cf"},void 0,!1,{fileName:Ce,lineNumber:1202,columnNumber:19},this)]},void 0,!0,{fileName:Ce,lineNumber:1194,columnNumber:17},this)]},void 0,!0,{fileName:Ce,lineNumber:1176,columnNumber:15},this),this.props.combining?null:Object(h.jsxDEV)(h.Fragment,{children:"2"===this.state.model.timer_type?Object(h.jsxDEV)(s.a,{id:"timer",labelname:"\u9886\u53d6\u65f6\u95f4\u6bb5",prop:"timer",children:[Object(h.jsxDEV)(re.a,{disabled:!(null===(V=this.props.data)||void 0===V||!V.id),className:"zent-datepicker-plan",showTime:{format:"HH:mm:ss",defaultTime:[Y()().format("HH:mm:ss"),"23:59:59"]},value:this.state.model.timer,onChange:e=>{this.onHandleChange(e,"timer")},width:"240px",disabledTime:this.onDisabledRange},void 0,!1,{fileName:Ce,lineNumber:1210,columnNumber:21},this),Object(h.jsxDEV)(Q.a,{onChange:({target:e})=>{this.onHandleChange(e.value,"timer_type"),"1"===e.value&&this.onHandleChange("","timer")},disabled:!(null===(k=this.props.data)||void 0===k||!k.id),value:this.state.model.timer_type,children:[Object(h.jsxDEV)(ne.a,{value:"1",children:"\u4e0d\u8bbe\u7f6e"},void 0,!1,{fileName:Ce,lineNumber:1234,columnNumber:23},this),Object(h.jsxDEV)(ne.a,{value:"2",children:"\u6bcf\u65e5"},void 0,!1,{fileName:Ce,lineNumber:1235,columnNumber:23},this)]},void 0,!0,{fileName:Ce,lineNumber:1224,columnNumber:21},this)]},void 0,!0,{fileName:Ce,lineNumber:1209,columnNumber:19},this):Object(h.jsxDEV)(s.a,{id:"timer",labelname:"\u9886\u53d6\u65f6\u95f4\u6bb5",children:Object(h.jsxDEV)(Q.a,{onChange:({target:e})=>{this.onHandleChange(e.value,"timer_type")},disabled:!(null===(S=this.props.data)||void 0===S||!S.id),value:this.state.model.timer_type,children:[Object(h.jsxDEV)(ne.a,{value:"1",children:"\u4e0d\u8bbe\u7f6e"},void 0,!1,{fileName:Ce,lineNumber:1247,columnNumber:23},this),Object(h.jsxDEV)(ne.a,{value:"2",children:"\u6bcf\u65e5"},void 0,!1,{fileName:Ce,lineNumber:1248,columnNumber:23},this)]},void 0,!0,{fileName:Ce,lineNumber:1240,columnNumber:21},this)},void 0,!1,{fileName:Ce,lineNumber:1239,columnNumber:19},this)},void 0,!1),Object(h.jsxDEV)(s.a,{id:"usable_time",labelname:"\u53ef\u7528\u65f6\u95f4\u6bb5",prop:"official_price",children:[Object(h.jsxDEV)("div",{className:"boxTime",children:[Object(h.jsxDEV)(Q.a,{value:this.state.model.usable_time,disabled:!(null===(w=this.props.data)||void 0===w||!w.id),onChange:({target:e})=>{this.onHandleChange(e.value,"usable_time"),this.onHandleChange([],"fixed_time"),this.onHandleChange([[]],"irregularDate"),this.onHandleChange([[]],"irregularTime"),this.onHandleChange([],"ruleWeek"),this.onHandleChange([[]],"ruleDate")},children:Object(h.jsxDEV)(Z.a,{value:"received",children:"\u9886\u53d6\u540e"},void 0,!1,{fileName:Ce,lineNumber:1269,columnNumber:19},this)},void 0,!1,{fileName:Ce,lineNumber:1257,columnNumber:17},this),"received"===this.state.model.usable_time?Object(h.jsxDEV)(h.Fragment,{children:[Object(h.jsxDEV)("div",{className:"zent-demo-select-basic select-basic",children:Object(h.jsxDEV)(X.a,{clearable:!0,options:this.state.getTimeList,placeholder:"\u9009\u62e9\u4e00\u9879",onChange:e=>{this.onHandleChange(e,"effect_date_type")},value:this.state.model.effect_date_type,className:"select-basic",disabled:!(null===(C=this.props.data)||void 0===C||!C.id),width:"195px",popupWidth:"195px",disableSearch:!0},void 0,!1,{fileName:Ce,lineNumber:1274,columnNumber:23},this)},void 0,!1,{fileName:Ce,lineNumber:1273,columnNumber:21},this),Object(h.jsxDEV)("span",{className:"effect_dates",children:"\u6709\u6548\u671f"},void 0,!1,{fileName:Ce,lineNumber:1289,columnNumber:21},this),Object(h.jsxDEV)(n.a,{onChange:e=>{this.onHandleChange(e,"effect_date")},onClearItem:()=>{this.onHandleChange("","effect_date")},disabled:!(null===(T=this.props.data)||void 0===T||!T.id),value:this.state.model.effect_date,placeholder:"\u8bf7\u8f93\u5165",labelWidth:"0px",maxLength:3,height:"36px",unit:"\u5929",countShow:!1,width:"172px",alignment:"left"},void 0,!1,{fileName:Ce,lineNumber:1290,columnNumber:21},this)]},void 0,!0):null]},void 0,!0,{fileName:Ce,lineNumber:1256,columnNumber:15},this),Object(h.jsxDEV)("div",{className:"boxTime",style:{marginTop:"15px"},children:[Object(h.jsxDEV)(Q.a,{disabled:!(null===(I=this.props.data)||void 0===I||!I.id),value:this.state.model.usable_time,onChange:({target:e})=>{this.onHandleChange(e.value,"usable_time"),this.onHandleChange("","effect_date_type"),this.onHandleChange("","effect_date"),this.onHandleChange([[]],"irregularDate"),this.onHandleChange([[]],"irregularTime"),this.onHandleChange([],"ruleWeek"),this.onHandleChange([[]],"ruleDate")},children:Object(h.jsxDEV)(Z.a,{value:"fiexd",children:"\u56fa\u5b9a\u65f6\u95f4"},void 0,!1,{fileName:Ce,lineNumber:1325,columnNumber:19},this)},void 0,!1,{fileName:Ce,lineNumber:1312,columnNumber:17},this),"fiexd"===this.state.model.usable_time?Object(h.jsxDEV)(ee.a,{className:"zent-datepicker-plan",showTime:{format:"HH:mm:ss",defaultTime:[Y()().format("HH:mm:ss"),"23:59:59"]},format:"YYYY-MM-DD HH:mm:ss",disabled:[!(null===(F=this.props.data)||void 0===F||!F.id),!(null===(L=this.props.data)||void 0===L||!L.id)],width:195,value:this.state.model.fixed_time,onChange:e=>{this.onHandleChange(e,"fixed_time")},disabledDate:this.onDisabledRange2,disabledTime:this.onDisabledTime1},void 0,!1,{fileName:Ce,lineNumber:1328,columnNumber:19},this):null]},void 0,!0,{fileName:Ce,lineNumber:1311,columnNumber:15},this),Object(h.jsxDEV)("div",{className:"boxTime column",children:[Object(h.jsxDEV)(Q.a,{className:"column_label",disabled:!(null===(H=this.props.data)||void 0===H||!H.id),value:this.state.model.usable_time,onChange:({target:e})=>{this.onHandleChange(e.value,"usable_time"),this.onHandleChange("","effect_date_type"),this.onHandleChange("","effect_date"),this.onHandleChange([[]],"fixed_time"),this.onHandleChange([[]],"irregularDate"),this.onHandleChange([[]],"irregularTime")},children:Object(h.jsxDEV)(Z.a,{value:"week",children:"\u6709\u6548\u671f\u5185\uff0c\u89c4\u5219\u65e5\u671f\u53ef\u7528"},void 0,!1,{fileName:Ce,lineNumber:1360,columnNumber:19},this)},void 0,!1,{fileName:Ce,lineNumber:1347,columnNumber:17},this),"week"===this.state.model.usable_time?Object(h.jsxDEV)(h.Fragment,{children:[Object(h.jsxDEV)(j.a.Group,{value:this.state.model.ruleWeek,onChange:e=>this.onHandleChange(e,"ruleWeek"),style:{marginLeft:"25px",marginTop:"20px"},children:Fe.map((e=>{var t;return Object(h.jsxDEV)(j.a,{className:"checkbox",disabled:!(null===(t=this.props.data)||void 0===t||!t.id),value:e.text,children:e.text},e.key,!1,{fileName:Ce,lineNumber:1370,columnNumber:25},this)}))},void 0,!1,{fileName:Ce,lineNumber:1364,columnNumber:21},this),this.state.model.ruleDate.map(((e,t)=>{var i;return Object(h.jsxDEV)("div",{className:"options_time",children:[Object(h.jsxDEV)(re.a,{disabled:!(null===(i=this.props.data)||void 0===i||!i.id),className:"zent-datepicker-plan column_datepicker",showTime:{format:"HH:mm:ss",defaultTime:[Y()().format("HH:mm:ss"),"23:59:59"]},value:this.state.model.ruleDate[t],onChange:e=>{const i=this.state.model.ruleDate;i[t]=e,this.onHandleChange(i,"ruleDate")},width:205,disabledTime:this.onDisabledRange},void 0,!1,{fileName:Ce,lineNumber:1382,columnNumber:25},this),this.addOrMoveFunction(t,"ruleDate",this.state.model.ruleDate,!1,"\u6700\u591a\u8bbe\u7f6e3\u4e2a\u65f6\u6bb5")]},t,!0,{fileName:Ce,lineNumber:1381,columnNumber:23},this)})),Object(h.jsxDEV)("p",{className:"notice",children:"\u8bf7\u6309\u716724\u5c0f\u65f6\u5236\u8f93\u5165\u53ef\u7528\u65f6\u6bb5\uff0c\u6700\u591a\u8bbe\u7f6e3\u4e2a\u65f6\u6bb5"},void 0,!1,{fileName:Ce,lineNumber:1407,columnNumber:21},this)]},void 0,!0):null]},void 0,!0,{fileName:Ce,lineNumber:1346,columnNumber:15},this),Object(h.jsxDEV)("div",{className:"boxTime column",style:{marginTop:"15px"},children:[Object(h.jsxDEV)(Q.a,{disabled:!(null===(q=this.props.data)||void 0===q||!q.id),value:this.state.model.usable_time,onChange:({target:e})=>{this.onHandleChange(e.value,"usable_time"),this.onHandleChange("","effect_date_type"),this.onHandleChange("","effect_date"),this.onHandleChange([[]],"fixed_time"),this.onHandleChange([],"ruleWeek"),this.onHandleChange([[]],"ruleDate")},children:Object(h.jsxDEV)(Z.a,{value:"irregular",children:"\u6709\u6548\u671f\u5185\uff0c\u4e0d\u89c4\u5219\u65e5\u671f\u53ef\u7528"},void 0,!1,{fileName:Ce,lineNumber:1424,columnNumber:19},this)},void 0,!1,{fileName:Ce,lineNumber:1412,columnNumber:17},this),"irregular"===this.state.model.usable_time?Object(h.jsxDEV)(h.Fragment,{children:[Object(h.jsxDEV)("p",{className:"notice",style:{width:"500px"},children:"\u53ef\u5728\u6709\u6548\u671f\u5185\u4efb\u610f\u9009\u62e9\u65f6\u95f4\u5929\u6570\uff0c\u4ee5\u53ca\u53ef\u7528\u65f6\u6bb5\u3002 \u56e0\u5f53\u524d\u5fae\u4fe1\u652f\u6301\u95ee\u9898\uff0c\u5982\u9009\u62e9\u4e0d\u89c4\u5219\u65f6\u95f4\uff0c\u5fae\u4fe1\u5361\u5305\u5185\u5f53\u524d\u4ec5\u4f1a\u5c55\u793a\u6709\u6548\u671f\uff0c\u5efa\u8bae \u5c06\u5177\u4f53\u53ef\u7528\u65e5\u671f\u4ee5\u53ca\u65f6\u95f4\u6bb5\u586b\u5199\u5728\u4f7f\u7528\u8bf4\u660e\u5185\u3002"},void 0,!1,{fileName:Ce,lineNumber:1428,columnNumber:21},this),this.state.model.irregularDate.map(((e,t)=>{var i,a;return Object(h.jsxDEV)("div",{className:"options_time",children:[Object(h.jsxDEV)(ee.a,{className:"zent-datepicker-plan column_datepicker",format:"YYYY-MM-DD",disabled:[!(null===(i=this.props.data)||void 0===i||!i.id),!(null===(a=this.props.data)||void 0===a||!a.id)],width:205,value:this.state.model.irregularDate[t],onChange:e=>{const i=this.state.model.irregularDate;i[t]=e,this.onHandleChange(i,"irregularDate")},disabledDate:this.onDisabledRange2,disabledTime:this.onDisabledTime1},void 0,!1,{fileName:Ce,lineNumber:1435,columnNumber:25},this),this.addOrMoveFunction(t,"irregularDate",this.state.model.irregularDate,!0)]},t,!0,{fileName:Ce,lineNumber:1434,columnNumber:23},this)})),this.state.model.irregularTime.map(((e,t)=>{var i;return Object(h.jsxDEV)("div",{className:"options_time",children:[Object(h.jsxDEV)(re.a,{disabled:!(null===(i=this.props.data)||void 0===i||!i.id),className:"zent-datepicker-plan column_datepicker",showTime:{format:"HH:mm:ss",defaultTime:[Y()().format("HH:mm:ss"),"23:59:59"]},value:this.state.model.irregularTime[t],onChange:e=>{const i=this.state.model.irregularTime;i[t]=e,this.onHandleChange(i,"irregularTime")},width:205,disabledTime:this.onDisabledRange},void 0,!1,{fileName:Ce,lineNumber:1459,columnNumber:25},this),this.addOrMoveFunction(t,"irregularTime",this.state.model.irregularTime,!1,"\u6700\u591a\u8bbe\u7f6e3\u4e2a\u65f6\u6bb5")]},t,!0,{fileName:Ce,lineNumber:1458,columnNumber:23},this)}))]},void 0,!0):null]},void 0,!0,{fileName:Ce,lineNumber:1411,columnNumber:15},this)]},void 0,!0,{fileName:Ce,lineNumber:1255,columnNumber:13},this)]},void 0,!0,{fileName:Ce,lineNumber:1174,columnNumber:11},this)},void 0,!1,{fileName:Ce,lineNumber:1173,columnNumber:9},this),Object(h.jsxDEV)(d.a,{style:{width:"70%",margin:"10px 0"},title:"\u9884\u8b66\u89c4\u5219",children:[Object(h.jsxDEV)(l.a,{model:this.state.model,rules:ue.warning,ref:"form4",children:[Object(h.jsxDEV)(s.a,{id:"early_per",labelname:"\u9884\u8b66\u767e\u5206\u6bd4",children:[Object(h.jsxDEV)(oe.a,{value:this.state.model.early_per,onChange:e=>{this.onHandleChange(e,"early_per")},children:[Le.map((e=>Object(h.jsxDEV)(j.a,{value:e,children:[e,"%"]},e,!0,{fileName:Ce,lineNumber:1501,columnNumber:19},this))),Object(h.jsxDEV)(j.a,{value:this.state.input_early_per},void 0,!1,{fileName:Ce,lineNumber:1505,columnNumber:17},this)]},void 0,!0,{fileName:Ce,lineNumber:1494,columnNumber:15},this),Object(h.jsxDEV)(n.a,{className:"percent",onChange:e=>{this.filterEarlyPer(),this.setState({input_early_per:e})},onClearItem:()=>{this.filterEarlyPer(),this.setState({input_early_per:""})},value:this.state.input_early_per,placeholder:"",labelWidth:"0px",maxLength:3,height:"36px",unit:"%",countShow:!1,width:"190px",alignment:"left"},void 0,!1,{fileName:Ce,lineNumber:1507,columnNumber:15},this)]},void 0,!0,{fileName:Ce,lineNumber:1493,columnNumber:13},this),Object(h.jsxDEV)(s.a,{id:"early_notifier",labelname:"\u9884\u8b66\u901a\u77e5\u4eba",children:[Object(h.jsxDEV)("div",{className:"bt_se",children:Object(h.jsxDEV)(X.a,{className:"bt_se_select",options:this.state.userSelectList,placeholder:"\u9009\u62e9\u4e00\u9879",size:"xl",value:this.state.warningInput,onChange:e=>{const t=this.state.model;e&&(t.early_notifier.push(e),t.early_notifier=te(t.early_notifier,"key")),this.setState({warningInput:e,model:t})}},void 0,!1,{fileName:Ce,lineNumber:1530,columnNumber:17},this)},void 0,!1,{fileName:Ce,lineNumber:1529,columnNumber:15},this),Object(h.jsxDEV)("div",{className:"userSelect",children:Object(h.jsxDEV)("ol",{children:Object(le.a)(this.state.model.early_notifier)&&(null===(M=this.state.model.early_notifier)||void 0===M?void 0:M.map((e=>Object(h.jsxDEV)(me.a,{closable:null===e||void 0===e?void 0:e.closable,onClose:()=>this.closeCallback(e),children:null===e||void 0===e?void 0:e.text},null===e||void 0===e?void 0:e.key,!1,{fileName:Ce,lineNumber:1551,columnNumber:23},this))))},void 0,!1,{fileName:Ce,lineNumber:1548,columnNumber:17},this)},void 0,!1,{fileName:Ce,lineNumber:1547,columnNumber:15},this)]},void 0,!0,{fileName:Ce,lineNumber:1528,columnNumber:13},this)]},void 0,!0,{fileName:Ce,lineNumber:1492,columnNumber:11},this),Object(h.jsxDEV)(ce.a,{visible:this.state.visible,className:"questModal",onClose:()=>this.setState({visible:!1}),title:"\u52a0\u6b3e",children:Object(h.jsxDEV)(be,{data:this.state.model,onChangeMoney:(e,t=0)=>{const i=this.state.model;i.recharge_amount=(t+Number(i.recharge_amount)).toFixed(2),this.setState({visible:e,model:i})}},void 0,!1,{fileName:Ce,lineNumber:1569,columnNumber:13},this)},void 0,!1,{fileName:Ce,lineNumber:1563,columnNumber:11},this)]},void 0,!0,{fileName:Ce,lineNumber:1491,columnNumber:9},this),Object(h.jsxDEV)(d.a,{style:{width:"70%",margin:"10px 0"},title:"\u6837\u5f0f\u8bbe\u7f6e",children:Object(h.jsxDEV)(l.a,{ref:"form3",children:Object(h.jsxDEV)(s.a,{id:"instruction",labelname:"\u4f7f\u7528\u8bf4\u660e",required:"",children:Object(h.jsxDEV)(Oe,{pageType:"detaileditor",setEdittext:e=>{this.onHandleChange(e,"instruction")},width:"520px",text:this.state.model.instruction,limitLength:5e3},this.state.model.channel,!1,{fileName:Ce,lineNumber:1583,columnNumber:15},this)},void 0,!1,{fileName:Ce,lineNumber:1582,columnNumber:13},this)},void 0,!1,{fileName:Ce,lineNumber:1581,columnNumber:11},this)},void 0,!1,{fileName:Ce,lineNumber:1580,columnNumber:9},this),this.switchComponents()]},void 0,!0,{fileName:Ce,lineNumber:790,columnNumber:7},this)}}var Me=i(469),Pe=i(445),Be=(i(87),"/Users/zhangds/web/blue-brother/frontend/src/components/redPackets/timeComponent.jsx"),Ae=({data:e})=>{const[t,i]=Object(r.useState)([]);return Object(r.useEffect)((()=>{i(se(e.receive_rule.week))}),[e.receive_rule.week,e.receive_irregular]),function(){var i,a;switch(e.receive_type){case 1:return Object(h.jsxDEV)("div",{className:"available_time",children:[Object(h.jsxDEV)("p",{className:"available_time_text",children:"\u9886\u53d6\u65f6\u95f4"},void 0,!1,{fileName:Be,lineNumber:14,columnNumber:13},this),Object(h.jsxDEV)("ul",{className:"timeList",children:null===t||void 0===t?void 0:t.map((t=>Object(h.jsxDEV)("li",{children:[t,e.receive_rule.time.map(((e,t)=>{if(e[1])return Object(h.jsxDEV)("p",{style:{textAlign:"center",marginTop:"5px"},children:[e[0],"~",e[1]]},t,!0,{fileName:Be,lineNumber:22,columnNumber:25},this)}))]},t,!0,{fileName:Be,lineNumber:17,columnNumber:17},this)))},void 0,!1,{fileName:Be,lineNumber:15,columnNumber:13},this)]},void 0,!0,{fileName:Be,lineNumber:13,columnNumber:11},this);case 2:return Object(h.jsxDEV)("div",{className:"available_time",children:[Object(h.jsxDEV)("p",{className:"available_time_text",children:"\u9886\u53d6\u65f6\u95f4"},void 0,!1,{fileName:Be,lineNumber:35,columnNumber:13},this),Object(h.jsxDEV)("ul",{className:"timeList",children:null===(i=e.receive_irregular)||void 0===i?void 0:i.map((e=>Object(h.jsxDEV)("li",{children:[e.date,e.time.map((e=>{if(e[1])return Object(h.jsxDEV)("p",{style:{marginTop:"5px"},children:[e[0],"~",e[1]]},e[1],!0,{fileName:Be,lineNumber:43,columnNumber:25},this)}))]},e.data,!0,{fileName:Be,lineNumber:38,columnNumber:17},this)))},void 0,!1,{fileName:Be,lineNumber:36,columnNumber:13},this)]},void 0,!0,{fileName:Be,lineNumber:34,columnNumber:11},this);case 3:return Object(h.jsxDEV)("div",{className:"available_time",children:[Object(h.jsxDEV)("p",{className:"available_time_text",children:"\u9886\u53d6\u65f6\u95f4"},void 0,!1,{fileName:Be,lineNumber:56,columnNumber:13},this),Object(h.jsxDEV)("ul",{className:"timeList",children:null===(a=e.receive_day)||void 0===a?void 0:a.map((e=>Object(h.jsxDEV)("li",{children:e.join(" ~ ")},e.item,!1,{fileName:Be,lineNumber:59,columnNumber:17},this)))},void 0,!1,{fileName:Be,lineNumber:57,columnNumber:13},this)]},void 0,!0,{fileName:Be,lineNumber:55,columnNumber:11},this);default:return Object(h.jsxDEV)(h.Fragment,{},void 0,!1)}}()},ze="/Users/zhangds/web/blue-brother/frontend/src/components/redPackets/mobileComponent.jsx";const Je=[24,100,100,100,80,100,100,100,80,100,100,100,80,100,100,100,100];var Ue=({data:e})=>{function t(){const{cash_amount_type:t,min_denomination:i,max_denomination:a}=e,s={b:"20px",a:"40px"};if("2"===t){const e=String(parseFloat(i)).length+String(parseFloat(a)).length+1;return e>6?{a:32-1.1*(e-6)+"px",b:20-(e-6)+"px"}:s}return s}return Object(h.jsxDEV)("div",{id:"redPacketsViews",className:"mobile",children:Object(h.jsxDEV)("div",{className:"box",children:[Object(h.jsxDEV)("div",{className:"top",children:[Object(h.jsxDEV)("p",{className:"title",children:e.batch_goods_name||Object(h.jsxDEV)("span",{children:"\u798f\u5229\u6765\u88ad \xa0\u7ea2\u5305\u5151\u6362"},void 0,!1,{fileName:ze,lineNumber:32,columnNumber:58},void 0)},void 0,!1,{fileName:ze,lineNumber:32,columnNumber:11},void 0),Object(h.jsxDEV)("p",{className:"effect_date",children:Object(h.jsxDEV)("span",{children:["\u7ea2\u5305\u6709\u9650\u671f\u622a\u6b62:",e.effect_date[1]||"2023-12-30 23:59:59"]},void 0,!0,{fileName:ze,lineNumber:34,columnNumber:13},void 0)},void 0,!1,{fileName:ze,lineNumber:33,columnNumber:11},void 0),Object(h.jsxDEV)("p",{className:"money",style:{fontSize:t().a},children:[Object(h.jsxDEV)("span",{className:"tag",style:{fontSize:t().b},children:"\uffe5"},void 0,!1,{fileName:ze,lineNumber:40,columnNumber:13},void 0),"1"===e.cash_amount_type?parseFloat(e.denomination||.01):`${parseFloat(e.min_denomination||.01)}~${parseFloat(e.max_denomination||88.88)}`]},void 0,!0,{fileName:ze,lineNumber:39,columnNumber:11},void 0),Object(h.jsxDEV)("p",{className:"type",children:Object(h.jsxDEV)("span",{children:"1"===e.cash_amount_type?"\u56fa\u989d\u7ea2\u5305":"\u968f\u673a\u7ea2\u5305"},void 0,!1,{fileName:ze,lineNumber:50,columnNumber:13},void 0)},void 0,!1,{fileName:ze,lineNumber:49,columnNumber:11},void 0),Object(h.jsxDEV)("img",{src:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/redPacktes/common_btn_receive.png",className:"bt",alt:""},void 0,!1,{fileName:ze,lineNumber:52,columnNumber:11},void 0)]},void 0,!0,{fileName:ze,lineNumber:31,columnNumber:9},void 0),Object(h.jsxDEV)("div",{className:"instruction-box",children:[Object(h.jsxDEV)("div",{className:"instruction-header"},void 0,!1,{fileName:ze,lineNumber:59,columnNumber:11},void 0),Object(h.jsxDEV)("div",{className:"instruction",children:Object(h.jsxDEV)("div",{className:"instruction-1",children:[Object(h.jsxDEV)("p",{className:"center",children:Object(h.jsxDEV)("img",{className:"notice",src:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/redPacktes/common_title_notice.png",alt:""},void 0,!1,{fileName:ze,lineNumber:63,columnNumber:17},void 0)},void 0,!1,{fileName:ze,lineNumber:62,columnNumber:15},void 0),e.instruction||[1,2,3].includes(e.receive_type)?Object(h.jsxDEV)(h.Fragment,{children:[Object(h.jsxDEV)(Ae,{data:e},void 0,!1,{fileName:ze,lineNumber:72,columnNumber:19},void 0),Object(h.jsxDEV)("h3",{className:"instruction-text",children:"\u4f7f\u7528\u89c4\u5219"},void 0,!1,{fileName:ze,lineNumber:73,columnNumber:19},void 0),Object(h.jsxDEV)("p",{className:"scroll",dangerouslySetInnerHTML:{__html:e.instruction}},void 0,!1,{fileName:ze,lineNumber:74,columnNumber:19},void 0)]},void 0,!0):Object(h.jsxDEV)(pe.a.TextBlock,{className:"TextBlock",animate:!0,widths:Je,rows:20,dashed:!1},void 0,!1,{fileName:ze,lineNumber:82,columnNumber:17},void 0)]},void 0,!0,{fileName:ze,lineNumber:61,columnNumber:13},void 0)},void 0,!1,{fileName:ze,lineNumber:60,columnNumber:11},void 0)]},void 0,!0,{fileName:ze,lineNumber:58,columnNumber:9},void 0)]},void 0,!0,{fileName:ze,lineNumber:30,columnNumber:7},void 0)},void 0,!1,{fileName:ze,lineNumber:29,columnNumber:5},void 0)},We=i(502);const Re=/^\d+(\.\d{1,2})?$/,Ke={type:"regExp",message:"\u6700\u591a\u4fdd\u75592\u4f4d\u5c0f\u6570",reg:Re};var Ye={basic:{batch_goods_name:[{type:"required",message:"\u8bf7\u8f93\u5165\u6279\u6b21\u5546\u54c1\u540d\u79f0"}],wishing:[{type:"required",message:"\u8bf7\u8f93\u5165"},{type:"regExp",message:"\u4e0d\u5141\u8bb8\u8f93\u5165\u7a7a\u683c\uff0c\u8bf7\u91cd\u65b0\u8f93\u5165",reg:/^\S*$/}]},grant:{num:[{type:"required",message:"\u8bf7\u8f93\u5165\u7ea2\u5305\u4e2a\u6570"},{type:"regExp",message:"\u8bf7\u8f93\u51651 ~ 100000\u4e2a\u6b63\u6574\u6570\u7ea2\u5305",reg:/^[1-9]\d{0,4}$|^100000$/}],denomination:[{type:"required",message:"\u8bf7\u8f93\u5165\u652f\u4ed8\u5b9d\uff080.01\uff09/ \u5fae\u4fe1\uff080.1\uff09 ~ 200\u9762\u989d"},{...Ke}],total_contract_price:[{type:"required",message:"\u8bf7\u8f93\u5165\u5408\u540c\u603b\u4ef7"},{...Ke}],all_budget:[{type:"required",message:"\u8bf7\u8f93\u5165\u603b\u9884\u7b97"},{...Ke}],day_budget:[{type:"required",message:"\u8bf7\u8f93\u5165\u5355\u5929\u9884\u7b97"},{...Ke}],receive_num:[{type:"required",message:"\u8bf7\u8f93\u5165\u7528\u6237\u53ef\u9886\u4e2a\u6570"},{type:"regExp",message:"\u8bf7\u8f93\u51651 ~ 100000\u4e2a\u6b63\u6574\u6570\u7ea2\u5305",reg:/^[1-9]\d{0,4}$|^100000$/}]},time:{effect_date:[{type:"required",message:"\u8bf7\u9009\u62e9\u751f\u6548\u65f6\u95f4\u6bb5"}]}};function $e(e,t,i){const a=Object(de.a)(e.model);if(a.all_budget=Number(a.all_budget),a.day_budget=Number(a.day_budget),a.receive_num=Number(a.receive_num),a.num=Number(a.num),a.min_denomination=Number(a.min_denomination),a.max_denomination=Number(a.max_denomination),a.denomination=Number(a.denomination),3===a.receive_type){if(a.receive_day.length<1)return c.a.error("\u8bf7\u9009\u62e9\u6bcf\u65e5\u53ef\u9886\u65f6\u95f4"),!1;if(Ze(a.receive_day))return c.a.error("\u6bcf\u65e5\u53ef\u9886\u65f6\u95f4\u5b58\u5728\u4ea4\u96c6"),!1}if(1===a.receive_type){if(a.receive_rule.time.length<1||a.receive_rule.week.length<1)return c.a.error("\u8bf7\u5b8c\u6574\u7684\u9009\u62e9\u89c4\u5219\u65e5\u671f\u548c\u65f6\u95f4"),!1;if(Ze(a.receive_rule.time))return c.a.error("\u6709\u6548\u671f\u5185\uff0c\u89c4\u5219\u65f6\u95f4\u5b58\u5728\u4ea4\u96c6"),!1}if(2===a.receive_type){let e=!1,t=!1,i=[];if(a.receive_irregular.map((a=>{a.date||(e=!0),a.date&&i.push(a.date),Ze(a.time)&&(t=!0),a.time.map((t=>{t.length<2&&(e=!0)}))})),e)return c.a.error("\u8bf7\u5b8c\u6574\u7684\u9009\u62e9\u4e0d\u89c4\u5219\u65e5\u671f\u548c\u65f6\u95f4"),!1;if(Object(We.a)(i).length!==a.receive_irregular.length)return c.a.error("\u6709\u6548\u671f\u5185\uff0c\u4e0d\u89c4\u5219\u65e5\u671f\u5b58\u5728\u4ea4\u96c6"),!1;if(t)return c.a.error("\u6709\u6548\u671f\u5185\uff0c\u4e0d\u89c4\u5219\u65f6\u95f4\u5b58\u5728\u4ea4\u96c6"),!1}if(a.early_per.filter((e=>e)).length<1)return c.a.error("\u8bf7\u9009\u9884\u8b66\u767e\u5206\u6bd4"),!1;if(a.numa.day_budget)return c.a.error("\u5355\u5929\u9884\u7b97\u53d1\u653e\u4e0a\u9650\u5e94\u8be5\u5927\u4e8e\u6216\u7b49\u4e8e\u9762\u989d"),!1;if(a.day_budget>a.all_budget)return c.a.error("\u5355\u5929\u9884\u7b97\u53d1\u653e\u4e0a\u9650\u9700\u8981\u5c0f\u4e8e\u6216\u7b49\u4e8e\u603b\u9884\u7b97"),!1;if(1===a.receive_every&&a.receive_num>10)return c.a.error("\u6bcf\u65e5\u7ea2\u5305\u6700\u9ad8\u4e0a\u9650\u4e3a10\u4e2a"),!1;if(2===a.receive_every&&a.receive_num>70)return c.a.error("\u6bcf\u5468\u7ea2\u5305\u6700\u9ad8\u4e0a\u9650\u4e3a70\u4e2a"),!1;if(3===a.receive_every&&a.receive_num>310)return c.a.error("\u6bcf\u6708\u7ea2\u5305\u6700\u9ad8\u4e0a\u9650\u4e3a310\u4e2a"),!1;if(a.early_notifier.length>14)return c.a.error("\u76ee\u524d\u4ec5\u652f\u6301\u65b0\u589e10\u4e2a\u9884\u8b66\u901a\u77e5\u4eba"),!1;if("2"===a.cash_amount_type){if(2===a.channel&&Ge(a,.1))return!1;if([1,3].includes(a.channel)&&Ge(a,.01))return!1;if(a.all_budgeta.max_denomination)return c.a.error("\u968f\u673a\u6700\u5927\u9762\u989d\u4e0d\u80fd\u5c0f\u4e8e\u6700\u5927\u9762\u989d\u7684\u6700\u5c0f\u503c"),!1;if(a.all_budgeta.day_budget)return c.a.error("\u5355\u5929\u9884\u7b97\u53d1\u653e\u4e0a\u9650\u5e94\u8be5\u5927\u4e8e\u6216\u7b49\u4e8e\u6700\u5c0f\u9762\u989d"),!1;if(a.day_budgeta.all_budget)return c.a.error("\u5355\u65e5\u53d1\u653e\u9884\u7b97\u4e0d\u5f97\u5c0f\u4e8e\u9762\u989d\u4e14\u4e0d\u5927\u4e8e\u603b\u9884\u7b97"),!1}if("1"===a.cash_amount_type){if(2===a.channel&&Qe(a,.1))return!1;if([1,3].includes(a.channel)&&Qe(a,.01))return!1;if(a.all_budgeta.all_budget)return c.a.error("\u5355\u65e5\u53d1\u653e\u9884\u7b97\u4e0d\u5f97\u5c0f\u4e8e\u9762\u989d\u4e14\u4e0d\u5927\u4e8e\u603b\u9884\u7b97"),!1}}function Ge(e,t){if(e.min_denomination200||!Re.test(e.max_denomination)||!Re.test(e.min_denomination))return e.min_denomination>e.max_denomination?(c.a.error("\u968f\u673a\u7ea2\u5305\u6700\u5c0f\u9762\u989d\u4e0d\u5f97\u5927\u4e8e\u6700\u5927\u9762\u989d"),!0):(c.a.error(`\u8bf7\u8f93\u5165${t} ~ 200\u7684\u9762\u989d\u4e14\u4fdd\u75592\u4f4d\u5c0f\u6570`),!0)}function Qe(e,t){if(e.denomination200||!Re.test(e.denomination))return c.a.error(`\u8bf7\u8f93\u5165${t} ~ 200\u7684\u9762\u989d\u4e14\u4fdd\u75592\u4f4d\u5c0f\u6570`),!0}function Ze(e){for(var t=0;t=l&&il}}const Xe=[{key:1,text:"\u6bcf\u65e5"},{key:2,text:"\u6bcf\u5468"},{key:3,text:"\u6bcf\u6708"},{key:0,text:"\u603b\u5171"}],et=[{key:"1",text:"\u5468\u4e00"},{key:"2",text:"\u5468\u4e8c"},{key:"3",text:"\u5468\u4e09"},{key:"4",text:"\u5468\u56db"},{key:"5",text:"\u5468\u4e94"},{key:"6",text:"\u5468\u516d"},{key:"7",text:"\u5468\u65e5"}],tt=["70","50","30","20"];function it({data:e}){return{model:{channel:1,cash_amount_type:"1",cash_activity_id:ie(8),batch_goods_name:"",num:"",denomination:"",min_denomination:"",max_denomination:"",all_budget:"",total_contract_price:"",day_budget:"",receive_num:"",receive_every:1,early_per:[],early_notifier:[],instruction:"",effect_date:[],begin_time:"",end_time:"",receive_type:0,wishing:"",receive_mode:1,receive_irregular:[{date:"",time:[[]]}],receive_rule:{week:[],time:[[]]},receive_day:[[]]},TimeDiffer:"",warningInput:[],input_early_per:"",userSelectList:[],form_data:{},isEdit:!(null===e||void 0===e||!e.id),computeMax:""}}var at="/Users/zhangds/web/blue-brother/frontend/src/components/redPackets/wangEditor.jsx";class st extends m.a.Component{constructor(e){super(e),this.state={editorHtml:"",count:0}}componentDidMount(){let e=this;const t=new xe.a("#wangeditorDom");this.setState({editor:t}),t.config.colors=["#696969","#9093a2","#fgddbb","#e3e7eb"],t.config.pasteText=!0,t.config.height=200,t.config.showFullScreen=!1,t.config.menus=["bold","foreColor","italic","indent","link","justify"],t.config.onchange=function(i){var a=t.txt.text();if(0==a.length&&e.props.setEdittext(""),a.length>e.props.limitLength){let i=a.slice(0,e.props.limitLength);return e.setState({editorHtml:i}),t.txt.html(i),void e.props.setEdittext(i)}e.setState({count:a.length}),e.setState({editorHtml:i}),e.props.setEdittext(i)},t.create();const i=setTimeout((()=>{t.txt.html(this.props.text),clearTimeout(i)}),500)}render(){return Object(h.jsxDEV)("div",{className:"countBox_par",children:[Object(h.jsxDEV)("div",{id:"wangeditorDom",style:{width:this.props.width}},void 0,!1,{fileName:at,lineNumber:54,columnNumber:9},this),Object(h.jsxDEV)("p",{className:"countBox",children:this.state.count+"/"+this.props.limitLength},void 0,!1,{fileName:at,lineNumber:55,columnNumber:9},this)]},void 0,!0,{fileName:at,lineNumber:53,columnNumber:7},this)}}var lt="/Users/zhangds/web/blue-brother/frontend/src/components/redPackets/ysf-mobileComponent.jsx";const nt=[24,100,100,100,80,100,100,100,80,100,100,100,80,100,100,100,100];var ot=({data:e})=>Object(h.jsxDEV)("div",{id:"ysf-redPacketsViews",className:"mobile",children:[Object(h.jsxDEV)("img",{className:"bubble",src:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/ysf-logo.png",alt:""},void 0,!1,{fileName:lt,lineNumber:8,columnNumber:7},void 0),Object(h.jsxDEV)("div",{className:"content",children:[Object(h.jsxDEV)("p",{className:"title",children:e.batch_goods_name||"\u4e91\u95ea\u4ed8"},void 0,!1,{fileName:lt,lineNumber:14,columnNumber:9},void 0),Object(h.jsxDEV)("div",{className:"information",children:[Object(h.jsxDEV)("p",{className:"money",style:{fontSize:"32px"},children:[Object(h.jsxDEV)("span",{className:"tag",style:{fontSize:"20px"},children:"\uffe5"},void 0,!1,{fileName:lt,lineNumber:17,columnNumber:13},void 0),"1"===e.cash_amount_type?parseFloat(e.denomination||.01):`${parseFloat(e.min_denomination||.01)} ~ ${parseFloat(e.max_denomination||88.88)}`]},void 0,!0,{fileName:lt,lineNumber:16,columnNumber:11},void 0),Object(h.jsxDEV)("p",{className:"information-p2",children:["\u8bf7\u5728\xa0",e.effect_date[1]||"2023-12-30 23:59:59","\xa0\u5185\u9886\u53d6"]},void 0,!0,{fileName:lt,lineNumber:26,columnNumber:11},void 0),Object(h.jsxDEV)("p",{className:"type",children:Object(h.jsxDEV)("span",{children:"1"===e.cash_amount_type?"\u56fa\u989d\u7ea2\u5305":"\u968f\u673a\u7ea2\u5305"},void 0,!1,{fileName:lt,lineNumber:32,columnNumber:13},void 0)},void 0,!1,{fileName:lt,lineNumber:31,columnNumber:11},void 0)]},void 0,!0,{fileName:lt,lineNumber:15,columnNumber:9},void 0),Object(h.jsxDEV)("div",{className:"form","v-if":"coupon.status===3",children:[Object(h.jsxDEV)("p",{className:"form-label",children:"\u4e91\u95ea\u4ed8\u8d26\u53f7"},void 0,!1,{fileName:lt,lineNumber:36,columnNumber:11},void 0),Object(h.jsxDEV)("input",{className:"form-input",disabled:!0,type:"text",placeholder:"\u8bf7\u8f93\u5165\u624b\u673a\u53f7"},void 0,!1,{fileName:lt,lineNumber:37,columnNumber:11},void 0),Object(h.jsxDEV)("input",{className:"form-input mt0",disabled:!0,type:"text",placeholder:"\u8bf7\u518d\u6b21\u8f93\u5165\u624b\u673a\u53f7"},void 0,!1,{fileName:lt,lineNumber:38,columnNumber:11},void 0),Object(h.jsxDEV)("p",{className:"form-note",children:"\u60a8\u53ef\u5728\u4e91\u95ea\u4ed8\u7684\u4e2a\u4eba\u4fe1\u606f\u4e2d\u67e5\u770b\u3010\u4e91\u95ea\u4ed8\u8d26\u53f7\u3011"},void 0,!1,{fileName:lt,lineNumber:39,columnNumber:11},void 0),Object(h.jsxDEV)("button",{className:"form-button",children:"\u7acb\u5373\u9886\u53d6"},void 0,!1,{fileName:lt,lineNumber:40,columnNumber:11},void 0)]},void 0,!0,{fileName:lt,lineNumber:35,columnNumber:9},void 0),Object(h.jsxDEV)("div",{className:"segmentation",children:[Object(h.jsxDEV)("i",{className:"left"},void 0,!1,{fileName:lt,lineNumber:43,columnNumber:11},void 0),Object(h.jsxDEV)("i",{className:"middle"},void 0,!1,{fileName:lt,lineNumber:44,columnNumber:11},void 0),Object(h.jsxDEV)("i",{className:"right"},void 0,!1,{fileName:lt,lineNumber:45,columnNumber:11},void 0)]},void 0,!0,{fileName:lt,lineNumber:42,columnNumber:9},void 0),Object(h.jsxDEV)("div",{className:"illustrate",children:e.instruction||[1,2,3].includes(e.receive_type)?Object(h.jsxDEV)(h.Fragment,{children:[Object(h.jsxDEV)(Ae,{data:e},void 0,!1,{fileName:lt,lineNumber:50,columnNumber:15},void 0),Object(h.jsxDEV)("p",{className:"illustrate-title",children:"\u6d3b\u52a8\u8bf4\u660e"},void 0,!1,{fileName:lt,lineNumber:51,columnNumber:15},void 0),Object(h.jsxDEV)("p",{className:"illustrate-text",dangerouslySetInnerHTML:{__html:e.instruction}},void 0,!1,{fileName:lt,lineNumber:52,columnNumber:15},void 0)]},void 0,!0):Object(h.jsxDEV)(pe.a.TextBlock,{className:"TextBlock",animate:!0,widths:nt,rows:12,dashed:!1},void 0,!1,{fileName:lt,lineNumber:60,columnNumber:13},void 0)},void 0,!1,{fileName:lt,lineNumber:47,columnNumber:9},void 0)]},void 0,!0,{fileName:lt,lineNumber:13,columnNumber:7},void 0)]},void 0,!0,{fileName:lt,lineNumber:7,columnNumber:5},void 0),rt="/Users/zhangds/web/blue-brother/frontend/src/components/redPackets/zfb-mobileComponent.jsx";const mt=[24,100,100,100,80,100,100,100,80,100,100,100,80,100,100,100,100];var ct=({data:e})=>{function t(){const{cash_amount_type:t,min_denomination:i,max_denomination:a}=e,s={b:"20px",a:"40px"};if("2"===t){const e=String(parseFloat(i)).length+String(parseFloat(a)).length+1;return e>6?{a:32-1.1*(e-6)+"px",b:20-(e-6)+"px"}:s}return s}return Object(h.jsxDEV)("div",{id:"zfb-mobileComponent",className:"mobile",children:Object(h.jsxDEV)("div",{className:"box",children:[Object(h.jsxDEV)("div",{className:"top",children:[Object(h.jsxDEV)("p",{className:"title",children:e.batch_goods_name||Object(h.jsxDEV)("span",{children:"\u798f\u5229\u6765\u88ad \xa0\u7ea2\u5305\u5151\u6362"},void 0,!1,{fileName:rt,lineNumber:32,columnNumber:58},void 0)},void 0,!1,{fileName:rt,lineNumber:32,columnNumber:11},void 0),Object(h.jsxDEV)("p",{className:"effect_date",children:Object(h.jsxDEV)("span",{children:["\u7ea2\u5305\u6709\u9650\u671f\u622a\u6b62:",e.effect_date[1]||"2023-12-30 23:59:59"]},void 0,!0,{fileName:rt,lineNumber:34,columnNumber:13},void 0)},void 0,!1,{fileName:rt,lineNumber:33,columnNumber:11},void 0),Object(h.jsxDEV)("p",{className:"money",style:{fontSize:t().a},children:[Object(h.jsxDEV)("span",{className:"tag",style:{fontSize:t().b},children:"\uffe5"},void 0,!1,{fileName:rt,lineNumber:40,columnNumber:13},void 0),"1"===e.cash_amount_type?parseFloat(e.denomination||.01):`${parseFloat(e.min_denomination||.01)}~${parseFloat(e.max_denomination||88.88)}`]},void 0,!0,{fileName:rt,lineNumber:39,columnNumber:11},void 0),Object(h.jsxDEV)("p",{className:"type",children:Object(h.jsxDEV)("span",{children:"1"===e.cash_amount_type?"\u56fa\u989d\u7ea2\u5305":"\u968f\u673a\u7ea2\u5305"},void 0,!1,{fileName:rt,lineNumber:50,columnNumber:13},void 0)},void 0,!1,{fileName:rt,lineNumber:49,columnNumber:11},void 0)]},void 0,!0,{fileName:rt,lineNumber:31,columnNumber:9},void 0),Object(h.jsxDEV)("div",{className:"form",children:[Object(h.jsxDEV)("input",{className:"form-input",disabled:!0,type:"text",placeholder:"\u8bf7\u8f93\u5165\u771f\u5b9e\u59d3\u540d"},void 0,!1,{fileName:rt,lineNumber:54,columnNumber:11},void 0),Object(h.jsxDEV)("input",{className:"form-input mt0",disabled:!0,type:"text",placeholder:"\u8bf7\u8f93\u5165\u652f\u4ed8\u5b9d\u8d26\u53f7"},void 0,!1,{fileName:rt,lineNumber:55,columnNumber:11},void 0),Object(h.jsxDEV)("p",{className:"form-note",children:"\u60a8\u53ef\u5728\u652f\u4ed8\u5b9d\u7684\u4e2a\u4eba\u4fe1\u606f\u4e2d\u67e5\u770b\u3010\u652f\u4ed8\u5b9d\u8d26\u53f7\u3011"},void 0,!1,{fileName:rt,lineNumber:56,columnNumber:11},void 0),Object(h.jsxDEV)("img",{src:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/zfb-red-but.png",className:"but",alt:""},void 0,!1,{fileName:rt,lineNumber:57,columnNumber:11},void 0)]},void 0,!0,{fileName:rt,lineNumber:53,columnNumber:9},void 0),Object(h.jsxDEV)("div",{className:"instruction-box",children:[Object(h.jsxDEV)("div",{className:"instruction-header"},void 0,!1,{fileName:rt,lineNumber:64,columnNumber:11},void 0),Object(h.jsxDEV)("div",{className:"instruction",children:Object(h.jsxDEV)("div",{className:"instruction-1",children:[Object(h.jsxDEV)("p",{className:"center",children:Object(h.jsxDEV)("img",{className:"notice",src:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/redPacktes/common_title_notice.png",alt:""},void 0,!1,{fileName:rt,lineNumber:68,columnNumber:17},void 0)},void 0,!1,{fileName:rt,lineNumber:67,columnNumber:15},void 0),e.instruction||[1,2,3].includes(e.receive_type)?Object(h.jsxDEV)(h.Fragment,{children:[Object(h.jsxDEV)(Ae,{data:e},void 0,!1,{fileName:rt,lineNumber:77,columnNumber:19},void 0),Object(h.jsxDEV)("h3",{className:"instruction-text",children:"\u4f7f\u7528\u89c4\u5219"},void 0,!1,{fileName:rt,lineNumber:78,columnNumber:19},void 0),Object(h.jsxDEV)("p",{className:"scroll",dangerouslySetInnerHTML:{__html:e.instruction}},void 0,!1,{fileName:rt,lineNumber:79,columnNumber:19},void 0)]},void 0,!0):Object(h.jsxDEV)(pe.a.TextBlock,{className:"TextBlock",animate:!0,widths:mt,rows:20,dashed:!1},void 0,!1,{fileName:rt,lineNumber:87,columnNumber:17},void 0)]},void 0,!0,{fileName:rt,lineNumber:66,columnNumber:13},void 0)},void 0,!1,{fileName:rt,lineNumber:65,columnNumber:11},void 0)]},void 0,!0,{fileName:rt,lineNumber:63,columnNumber:9},void 0)]},void 0,!0,{fileName:rt,lineNumber:30,columnNumber:7},void 0)},void 0,!1,{fileName:rt,lineNumber:29,columnNumber:5},void 0)},dt="/Users/zhangds/web/blue-brother/frontend/src/components/redPackets/index.jsx";const ut=e=>Array.from({length:e},((e,t)=>t));class ht extends r.Component{constructor(e){super(e),this.onDisabledRange1=(e,t)=>{let i=JSON.parse(sessionStorage.getItem("redPackets_effectDate")),a=!1,s=Y()(e).format("YYYY-MM-DD HH:mm:ss");const l=Y()(i.end_time).format("HH:mm:ss");return"start"==t&&(a=l<"23:59:59"?Y()(s).isBefore(i.begin_time)||Y()(s).subtract(1,"days").isAfter(i.end_time):Y()(s).isBefore(i.begin_time)||Y()(s).isAfter(i.end_time)),"end"==t&&(a=Y()(s).add(1,"days").isBefore(i.begin_time)||Y()(s).isAfter(i.end_time)),a},this.onDisabledTime=(e,t)=>{let i=JSON.parse(sessionStorage.getItem("redPackets_effectDate"));const a=new Date(i.begin_time),s=a.getHours(),l=a.getMinutes(),n=a.getSeconds();return Object(R.a)(e,a)?{disabledHours:()=>ut(s),disabledMinutes:e=>e===s?ut(l):[],disabledSeconds:(e,t)=>e===s&&t===l?ut(n):[]}:{}},this.state={...it(this.props)}}componentWillMount(){this.getUserSelectList()}ruleComponents(e){return Object(h.jsxDEV)(h.Fragment,{children:[e>0&&Object(h.jsxDEV)("p",{className:"move",onClick:()=>{const t=this.state.model;t.receive_rule.time.splice(e,1),this.setState({model:t})},children:"\u5220\u9664"},void 0,!1,{fileName:dt,lineNumber:55,columnNumber:11},this),e===this.state.model.receive_rule.time.length-1&&Object(h.jsxDEV)("p",{className:"add",onClick:()=>{if(this.state.model.receive_rule.time.length<3){const e=this.state.model;e.receive_rule.time.push([]),this.setState({model:e})}else c.a.warn("\u6700\u591a\u8bbe\u7f6e3\u4e2a\u65f6\u6bb5")},children:"\u6dfb\u52a0"},void 0,!1,{fileName:dt,lineNumber:67,columnNumber:11},this)]},void 0,!0)}ruleDayComponents(e){return Object(h.jsxDEV)(h.Fragment,{children:[e>0&&Object(h.jsxDEV)("p",{className:"move",onClick:()=>{const t=this.state.model;t.receive_day.splice(e,1),this.setState({model:t})},children:"\u5220\u9664"},void 0,!1,{fileName:dt,lineNumber:91,columnNumber:11},this),e===this.state.model.receive_day.length-1&&Object(h.jsxDEV)("p",{className:"add",onClick:()=>{if(this.state.model.receive_day.length<3){const e=this.state.model;e.receive_day.push([]),this.setState({model:e})}else c.a.warn("\u6700\u591a\u8bbe\u7f6e3\u4e2a\u65f6\u6bb5")},children:"\u6dfb\u52a0"},void 0,!1,{fileName:dt,lineNumber:103,columnNumber:11},this)]},void 0,!0)}irregularComponents(){return Object(h.jsxDEV)(h.Fragment,{children:this.state.model.receive_irregular.map(((e,t)=>Object(h.jsxDEV)("div",{children:[Object(h.jsxDEV)(Me.a,{className:"item-time",title:`\u7b2c${0===t?"\u4e00":1===t?"\u4e8c":"\u4e09"}\u7ec4\u4e0d\u89c4\u5219\u65e5\u671f`},void 0,!1,{fileName:dt,lineNumber:128,columnNumber:13},this),Object(h.jsxDEV)("div",{className:"options_time",children:[Object(h.jsxDEV)(Pe.a,{className:"zent-datepicker-plan column_datepicker",format:"YYYY-MM-DD",width:205,value:e.date,onChange:e=>{const i=this.state.model.receive_irregular;i[t].date=e,this.onHandleChange(i,"receive_irregular")},disabledDate:{min:this.state.model.effect_date[0],max:this.state.model.effect_date[1]}},void 0,!1,{fileName:dt,lineNumber:133,columnNumber:15},this),t>0&&Object(h.jsxDEV)("p",{className:"move",onClick:()=>{const e=this.state.model;e.receive_irregular.splice(t,1),this.setState({model:e})},children:"\u5220\u9664"},void 0,!1,{fileName:dt,lineNumber:149,columnNumber:17},this),t===this.state.model.receive_irregular.length-1&&Object(h.jsxDEV)("p",{className:"add",onClick:()=>{if(this.state.model.receive_irregular.length<3){const e=this.state.model;e.receive_irregular.push({date:"",time:[[]]}),this.setState({model:e})}else c.a.warn("\u6700\u591a\u8bbe\u7f6e3\u4e2a\u65e5\u671f")},children:"\u6dfb\u52a0"},void 0,!1,{fileName:dt,lineNumber:161,columnNumber:17},this)]},t,!0,{fileName:dt,lineNumber:132,columnNumber:13},this),e.time.map(((i,a)=>Object(h.jsxDEV)("div",{className:"options_time",children:[Object(h.jsxDEV)(re.a,{className:"zent-datepicker-plan column_datepicker",showTime:{format:"HH:mm:ss",defaultTime:[Y()().format("HH:mm:ss"),"23:59:59"]},value:i,onChange:e=>{const i=this.state.model;i.receive_irregular[t].time[a]=e,this.setState({model:i})},width:205},void 0,!1,{fileName:dt,lineNumber:182,columnNumber:17},this),a>0&&Object(h.jsxDEV)("p",{className:"move",onClick:()=>{const e=this.state.model;e.receive_irregular[t].time.splice(a,1),this.setState({model:e})},children:"\u5220\u9664"},void 0,!1,{fileName:dt,lineNumber:198,columnNumber:19},this),a===e.time.length-1&&Object(h.jsxDEV)("p",{className:"add",onClick:()=>{if(e.time.length<3){const e=this.state.model;e.receive_irregular[t].time.push([]),this.setState({model:e})}else c.a.warn("\u6700\u591a\u8bbe\u7f6e3\u4e2a\u65f6\u6bb5")},children:"\u6dfb\u52a0"},void 0,!1,{fileName:dt,lineNumber:211,columnNumber:19},this)]},a,!0,{fileName:dt,lineNumber:181,columnNumber:15},this)))]},t,!0,{fileName:dt,lineNumber:127,columnNumber:11},this)))},void 0,!1)}echoFun(e=[]){const t=Object(de.a)(this.props.data);if(t){const{early_notifier:i,early_per:a,begin_time:s,end_time:l,receive_mode:n}=t;t.early_notifier=i.map((t=>e.map((e=>{if((null===t||void 0===t?void 0:t.mobile)===e.key||(null===t||void 0===t?void 0:t.real_name)===e.text)return e})).filter((e=>e))[0])).filter((e=>e)),t.effect_date=[],t.effect_date[0]=s,t.receive_mode=n||1,t.effect_date[1]=l,t.copy&&(t.cash_activity_id=ie(8));(a||[]).map((e=>-1===tt.indexOf(e)?this.setState({input_early_per:e,model:t}):this.setState({model:t})))}}getUserSelectList(){Object(a.Jb)().then((e=>Object(a.Tb)(e,((e,t)=>{const i=e.default.map((e=>e.real_name)),a=e.default.map((e=>e.mobile)),s=[],l=e.data.map((e=>{if(-1!==i.indexOf(e.real_name)||-1!==a.indexOf(e.mobile)){const t={key:e.mobile,text:e.real_name,disabled:!0,closable:!1};return s.push(t),t}return{key:e.mobile,text:e.real_name,closable:!0}}));this.onHandleChange(s,"early_notifier"),this.setState({userSelectList:l}),this.echoFun(l)}),(e=>{c.a.error(e)}))))}filterEarlyPer(){const e=this.state.model.early_per.filter((e=>e!==this.state.input_early_per));this.onHandleChange(e,"early_per")}async submit(){if(this.refs.form.validator()&&this.refs.form1.validator()&&this.refs.form2.validator()&&this.refs.form4.validator()){let e=[];const t=sessionStorage.getItem("redPacketsData");if(t&&(e=JSON.parse(t)),this.props.data){let t=e.findIndex((e=>e.cash_activity_id===this.props.data.cash_activity_id));return!1!==$e(this.state,this.computeMin(),this.computeMax_Min(!1))&&(this.props.data.cash_activity_id?e[t]=Object.assign(this.props.data,this.transformDataCode()):e[t]=this.transformDataCode(),sessionStorage.setItem("redPacketsData",JSON.stringify(e)),this.setState({form_data:e[t]}),!0)}{if(!1===$e(this.state,this.computeMin(),this.computeMax_Min(!1)))return!1;let t=e||[];const i=this.transformDataCode();return t.find((e=>e.cash_activity_id===i.cash_activity_id))?(c.a.error("\u4e0d\u5141\u8bb8\u8f93\u5165\u91cd\u590d\u7684\u5e73\u53f0\u6279\u6b21\u53f7"),!1):(t.push(i),sessionStorage.setItem("redPacketsData",JSON.stringify(t)),this.setState({form_data:i}),!0)}}}transformDataCode(){const{model:e}=this.state,t=Object(de.a)(e);t.begin_time=e.effect_date[0],t.end_time=e.effect_date[1];const{receive_num:i,num:a,early_notifier:s}=e;return t.receive_num=Number(i),t.num=Number(a),t.early_notifier=s.map((({text:e,key:t})=>({real_name:e,mobile:t}))),Object(o.a)(t,["effect_date"])}onHandleChange(e,t,i){let a=this.state.model;i?a[t][i]=e:a[t]=e,this.setState({model:a})}computeAllBudget(){const{num:e,cash_amount_type:t,denomination:i}=this.state.model;"1"===t&&this.onHandleChange((i*e).toFixed(2),"all_budget")}computeMax_Min(e=!0){const{min_denomination:t,num:i,all_budget:a}=this.state.model,s=1===this.state.model.channel?.01:.1,l=a-(i-1)*t;let n=0;return n=l>200?200:l200?200:i}else e=t;return e.toFixed(2)}closeCallback(e){const t=this.state.model.early_notifier.filter((t=>t.key!==e.key));this.onHandleChange(t,"early_notifier"),t.length<1&&this.setState({warningInput:[]})}dynamicPlaceholder(){return this.state.model.min_denomination*this.state.model.num>this.state.model.all_budget?"\u8bf7\u8f93\u5165":this.state.computeMax?`\u6700\u5927\u9762\u989d\u4e3a${this.computeMin()} ~ ${this.state.computeMax}`:"\u8bf7\u8f93\u5165"}switchComponents(){return 1==this.state.model.channel&&2===this.state.model.receive_mode?Object(h.jsxDEV)(ct,{data:this.state.model},void 0,!1,{fileName:dt,lineNumber:513,columnNumber:14},this):3==this.state.model.channel?Object(h.jsxDEV)(ot,{data:this.state.model},void 0,!1,{fileName:dt,lineNumber:516,columnNumber:14},this):Object(h.jsxDEV)(Ue,{data:this.state.model},void 0,!1,{fileName:dt,lineNumber:518,columnNumber:12},this)}render(){var e;return Object(h.jsxDEV)("div",{id:"redPackets",children:[Object(h.jsxDEV)(d.a,{style:{width:"70%",margin:"10px 0"},title:"\u57fa\u672c\u4fe1\u606f",children:Object(h.jsxDEV)(l.a,{model:this.state.model,rules:Ye.basic,ref:"form",children:[Object(h.jsxDEV)(s.a,{labelname:"\u6e20\u9053\u5e73\u53f0",prop:"channel",id:"type",children:Object(h.jsxDEV)(Q.a,{disabled:this.state.isEdit,onChange:({target:e})=>{this.onHandleChange(e.value,"channel"),3===e.value?this.onHandleChange("\u7528\u6237\u53ef\u5728\u4e91\u95ea\u4ed8APP-\u6211\u7684\u7ea2\u5305\u4e2d\u67e5\u770b\u6700\u8fd160\u5929\u5185\u5373\u5c06\u8fc7\u671f\u7684\u4e91\u95ea\u4ed8\u7ea2\u5305\u91d1\u989d\u53ca\u5230\u671f\u65f6\u95f4\u3002\u7528\u6237\u53c2\u52a0\u6d3b\u52a8 (\u5982\u5929\u5929\u9886\u7ea2\u5305\u3001\u79fb\u52a8\u79ef\u5206\u5151\u6362\u7ea2\u5305\u7b49\u6d3b\u52a8)\u83b7\u5f97\u7684\u4e91\u95ea\u4ed8\u7ea2\u5305\u6709\u6548\u671f\u4ee5\u8425\u9500\u6d3b\u52a8\u9875\u9762\u89c4\u5219\u8bf4\u660e\u4e3a\u51c6\uff0c\u5230\u671f\u540e\u81ea\u52a8\u5931\u6548\u3002\n
(\u4e00)\u5728\u4e91\u95ea\u4ed8\u7ea2\u5305\u7684\u6709\u6548\u671f\u5185\u4e0d\u9650\u4f7f\u7528\u65f6\u95f4\n
(\u4e8c) \u4f7f\u7528\u5546\u6237:\u4e13\u4eab\u7ea2\u5305\u652f\u6301\u4e91\u95ea\u4ed8APP\u5185\u624b\u673a\u5145\u503c\u3001\u6c34\u7535\u7164\u7f34\u8d39\u5546\u57ce\u8d2d\u7269\u7b49\u591a\u573a\u666f\u62b5\u6263\u652f\u4ed8\u3002\u4e5f\u53ef\u901a\u8fc7\u4e91\u95ea\u4ed8APP\u5728\u4e91\u95ea\u4ed8\u7ebf\u4e0b\u53d7\u7406\u5546\u6237\u8fdb\u884c\u4e8c\u7ef4\u7801\u4e3b\u626b\u6216\u88ab\u626b\u652f\u4ed8\u65f6\u62b5\u6263\u3002\u4e2a\u522b\u5546\u6237\u4e0d\u652f\u6301\u7ea2\u5305\u62b5\u6263\uff0c\u5177\u4f53\u4ee5\u652f\u4ed8\u7ed3\u679c\u4e3a\u51c6\u3002\n
(\u4e09) \u4f7f\u7528\u89c4\u5219:\n
1\u3001\u7ebf\u4e0b\u5546\u6237:\u7528\u6237\u5728\u4e91\u95ea\u4ed8\u7ebf\u4e0b\u53d7\u7406\u5546\u6237\u4f7f\u7528\u4e91\u95ea\u4ed8APP\uff0c\u51fa\u793a\u4ed8\u6b3e\u7801\u652f\u4ed8\u65f6\uff0c\u53ef\u4f7f\u7528\u4e91\u95ea\u4ed8\u7ea2\u5305\u62b5\u6263\u8ba2\u5355\u91d1\u989d\uff0c\u5982\u80af\u5fb7\u57fa\u3001\u5168\u5bb6\u4fbf\u5229\u5e97\u3001\u661f\u5df4\u514b\u3001\u5c48\u81e3\u6c0f\u3001\u7f57\u68ee\u4fbf\u5229\u5e97\u3001DQ\u3001\u6765\u4f0a\u4efd\u7b49\u3002\n
2\u3001\u7ebf\u4e0a\u5546\u6237:\u5728\u4e91\u95ea\u4ed8APP\u5185\u6216\u7ebf\u4e0a\u5546\u6237\uff0c\u9009\u62e9\u4e91\u95ea\u4ed8APP\u652f\u4ed8\u65f6\uff0c\u53ef\u4f7f\u7528\u4e91\u95ea\u4ed8\u7ea2\u5305\u62b5\u6263\u8ba2\u5355\u91d1\u989d\uff0c\u598212306\u3001\u4eac\u4e1c\u5230\u5bb6\u3001\u672c\u6765\u751f\u6d3b\u7b49\u3002\n
3\u30011\u5143\u4e91\u95ea\u4ed8\u7ea2\u5305\u53ef\u62b5\u62631\u5143\u4eba\u6c11\u5e01\u8ba2\u5355\u91d1\u989d\u3002\n
4\u3001\u8ba2\u5355\u91d1\u989d\u6ee10.01\u5143\u65f6\uff0c\u65b9\u53ef\u4f7f\u7528\u4e91\u95ea\u4ed8\u7ea2\u5305;\u62b5\u6263\u8ba2\u5355\u91d1\u989d\u65f6\uff0c\u9700\u81f3\u5c11\u652f\u4ed80.01\u5143\u3002\n
5\u3001\u4e91\u95ea\u4ed8\u7ea2\u5305\u4e0d\u53ef\u7528\u4e8e\u63d0\u73b0\u3001\u8d2d\u4e70\u6d3b\u671f+\u6216\u8005\u5176\u4ed6\u7406\u8d22\u4ea7\u54c1\u3002","instruction"):this.onHandleChange("","instruction"),1!==e.value&&this.onHandleChange(1,"receive_mode")},value:this.state.model.channel,children:[Object(h.jsxDEV)(ne.a,{value:1,children:"\u652f\u4ed8\u5b9d"},void 0,!1,{fileName:dt,lineNumber:543,columnNumber:17},this),Object(h.jsxDEV)(ne.a,{value:2,children:"\u5fae\u4fe1"},void 0,!1,{fileName:dt,lineNumber:544,columnNumber:17},this),Object(h.jsxDEV)(ne.a,{value:3,children:"\u4e91\u95ea\u4ed8"},void 0,!1,{fileName:dt,lineNumber:545,columnNumber:17},this)]},void 0,!0,{fileName:dt,lineNumber:528,columnNumber:15},this)},void 0,!1,{fileName:dt,lineNumber:527,columnNumber:13},this),Object(h.jsxDEV)(s.a,{labelname:"\u7ea2\u5305\u7c7b\u578b",prop:"cash_amount_type",id:"type",children:Object(h.jsxDEV)(Q.a,{disabled:this.state.isEdit,onChange:({target:e})=>{this.onHandleChange(e.value,"cash_amount_type"),this.onHandleChange("","all_budget"),this.onHandleChange("","max_denomination"),this.onHandleChange("","min_denomination"),this.onHandleChange("","denomination"),this.onHandleChange("","total_contract_price")},value:this.state.model.cash_amount_type,children:[Object(h.jsxDEV)(ne.a,{value:"1",children:"\u56fa\u989d"},void 0,!1,{fileName:dt,lineNumber:561,columnNumber:17},this),Object(h.jsxDEV)(ne.a,{value:"2",children:"\u968f\u673a"},void 0,!1,{fileName:dt,lineNumber:562,columnNumber:17},this)]},void 0,!0,{fileName:dt,lineNumber:549,columnNumber:15},this)},void 0,!1,{fileName:dt,lineNumber:548,columnNumber:13},this),1===this.state.model.channel?Object(h.jsxDEV)(s.a,{labelname:"\u9886\u53d6\u65b9\u5f0f",prop:"receive_mode",id:"receive_mode",children:Object(h.jsxDEV)(Q.a,{onChange:({target:e})=>{this.onHandleChange(e.value,"receive_mode")},value:this.state.model.receive_mode,children:[Object(h.jsxDEV)(ne.a,{value:1,children:"\u5b98\u65b9\u9886\u53d6"},void 0,!1,{fileName:dt,lineNumber:578,columnNumber:19},this),Object(h.jsxDEV)(ne.a,{value:2,children:"\u8d26\u53f7\u9886\u53d6"},void 0,!1,{fileName:dt,lineNumber:579,columnNumber:19},this)]},void 0,!0,{fileName:dt,lineNumber:572,columnNumber:17},this)},"receive_mode",!1,{fileName:dt,lineNumber:566,columnNumber:15},this):null,Object(h.jsxDEV)(s.a,{labelname:"\u7ea2\u5305\u6279\u6b21\u53f7",prop:"channel_activity_id",id:"batch_number",children:[Object(h.jsxDEV)(n.a,{disabled:!0,onChange:e=>{this.onHandleChange(e,"cash_activity_id")},onClearItem:()=>{this.onHandleChange("","cash_activity_id")},value:this.state.model.cash_activity_id,placeholder:"\u8bf7\u8f93\u5165",labelWidth:"0px",maxLength:50,height:"36px",width:"452px",alignment:"left"},void 0,!1,{fileName:dt,lineNumber:584,columnNumber:15},this),Object(h.jsxDEV)(u.a,{type:"icon",icon:"refresh",onClick:()=>this.onHandleChange(ie(8),"cash_activity_id"),disabled:this.state.isEdit},void 0,!1,{fileName:dt,lineNumber:600,columnNumber:15},this)]},void 0,!0,{fileName:dt,lineNumber:583,columnNumber:13},this),Object(h.jsxDEV)(s.a,{labelname:"\u6279\u6b21\u5546\u54c1\u540d\u79f0",prop:"batch_goods_name",id:"batch_goods_name",children:Object(h.jsxDEV)(n.a,{onChange:e=>{this.onHandleChange(e,"batch_goods_name")},onClearItem:()=>{this.onHandleChange("","batch_goods_name")},value:this.state.model.batch_goods_name,placeholder:"\u8bf7\u8f93\u5165",labelWidth:"0px",maxLength:12,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:dt,lineNumber:608,columnNumber:15},this)},void 0,!1,{fileName:dt,lineNumber:607,columnNumber:13},this),Object(h.jsxDEV)(s.a,{labelname:3===this.state.model.channel?"\u53d1\u653e\u5907\u6ce8":"\u795d\u798f\u8bed",prop:"wishing",id:"wishing",children:Object(h.jsxDEV)(n.a,{onChange:e=>{this.onHandleChange(e,"wishing")},onClearItem:()=>{this.onHandleChange("","wishing")},value:this.state.model.wishing,placeholder:"\u8bf7\u8f93\u5165",labelWidth:"0px",maxLength:32,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:dt,lineNumber:629,columnNumber:15},this)},void 0,!1,{fileName:dt,lineNumber:624,columnNumber:13},this)]},void 0,!0,{fileName:dt,lineNumber:526,columnNumber:11},this)},void 0,!1,{fileName:dt,lineNumber:525,columnNumber:9},this),Object(h.jsxDEV)(d.a,{style:{width:"70%",margin:"10px 0"},title:"\u53d1\u653e\u89c4\u5219",children:Object(h.jsxDEV)(l.a,{model:this.state.model,rules:Ye.grant,ref:"form1",children:[Object(h.jsxDEV)(s.a,{id:"all_budget",labelname:"\u603b\u9884\u7b97",prop:"all_budget",children:Object(h.jsxDEV)(n.a,{value:this.state.model.all_budget,placeholder:"\u8bf7\u8f93\u5165",disabled:this.state.isEdit||"1"===this.state.model.cash_amount_type,onChange:e=>{this.onHandleChange(e,"all_budget"),this.onHandleChange("","min_denomination"),this.onHandleChange("","num"),"2"===this.state.model.cash_amount_type&&this.computeMax_Min()},onClearItem:()=>{this.onHandleChange("","all_budget"),this.onHandleChange("","min_denomination"),this.onHandleChange("","num"),"2"===this.state.model.cash_amount_type&&this.computeMax_Min()},labelWidth:"0px",maxLength:9,height:"36px",unit:"\u5143",countShow:!1,width:"520px",alignment:"left"},void 0,!1,{fileName:dt,lineNumber:650,columnNumber:15},this)},void 0,!1,{fileName:dt,lineNumber:649,columnNumber:13},this),Object(h.jsxDEV)(s.a,{id:"redPackets_number",labelname:"\u7ea2\u5305\u4e2a\u6570",prop:"num",children:Object(h.jsxDEV)(n.a,{onChange:e=>{this.onHandleChange(e,"num"),"1"===this.state.model.cash_amount_type?this.computeAllBudget():this.computeMax_Min()},onClearItem:()=>{this.onHandleChange("","num"),"1"===this.state.model.cash_amount_type?this.computeAllBudget():this.computeMax_Min()},value:this.state.model.num,placeholder:"\u8bf7\u8f93\u5165",disabled:this.state.isEdit,labelWidth:"0px",maxLength:9,height:"36px",unit:"\u4e2a",countShow:!1,width:"520px",alignment:"left"},void 0,!1,{fileName:dt,lineNumber:680,columnNumber:15},this)},void 0,!1,{fileName:dt,lineNumber:679,columnNumber:13},this),"1"===this.state.model.cash_amount_type?Object(h.jsxDEV)(s.a,{labelname:"\u9762\u989d",prop:"denomination",children:Object(h.jsxDEV)(n.a,{onChange:e=>{this.onHandleChange(e,"denomination"),this.computeAllBudget()},onClearItem:()=>{this.onHandleChange("","denomination"),this.computeAllBudget()},value:this.state.model.denomination,placeholder:"\u8bf7\u8f93\u5165",disabled:this.state.isEdit,labelWidth:"0px",maxLength:6,height:"36px",unit:"\u5143",countShow:!1,width:"520px",alignment:"left"},void 0,!1,{fileName:dt,lineNumber:711,columnNumber:17},this)},"denomination",!1,{fileName:dt,lineNumber:710,columnNumber:15},this):Object(h.jsxDEV)(s.a,{id:"denomination",labelname:"\u9762\u989d",children:[Object(h.jsxDEV)(n.a,{onChange:e=>{this.onHandleChange(e,"min_denomination"),this.computeMax_Min()},onClearItem:()=>{this.onHandleChange("","min_denomination"),this.computeMax_Min()},value:this.state.model.min_denomination,placeholder:"\u8bf7\u8f93\u5165",labelWidth:"0px",unit:"\u5143",disabled:this.state.isEdit,countShow:!1,maxLength:6,height:"36px",width:"245px",alignment:"left"},void 0,!1,{fileName:dt,lineNumber:734,columnNumber:17},this),Object(h.jsxDEV)("span",{className:"JIan",children:"~"},void 0,!1,{fileName:dt,lineNumber:754,columnNumber:17},this),Object(h.jsxDEV)(n.a,{id:"denomination",onChange:e=>{this.onHandleChange(e,"max_denomination")},onClearItem:()=>{this.onHandleChange("","max_denomination")},value:this.state.model.max_denomination,prolong:!0,placeholder:this.dynamicPlaceholder(),labelWidth:"0px",unit:"\u5143",disabled:this.state.isEdit||!this.state.model.min_denomination||this.state.model.min_denomination*this.state.model.num>this.state.model.all_budget,countShow:!1,maxLength:6,height:"36px",width:"245px",alignment:"left"},void 0,!1,{fileName:dt,lineNumber:755,columnNumber:17},this)]},"random-denomination",!0,{fileName:dt,lineNumber:733,columnNumber:15},this),Object(h.jsxDEV)(s.a,{id:"all_budget",labelname:"\u5408\u540c\u603b\u4ef7",prop:"total_contract_price",children:Object(h.jsxDEV)(n.a,{value:this.state.model.total_contract_price,onChange:e=>{this.onHandleChange(e,"total_contract_price")},onClearItem:()=>{this.onHandleChange("","total_contract_price")},placeholder:"\u8bf7\u8f93\u5165",disabled:this.state.isEdit,labelWidth:"0px",maxLength:9,height:"36px",unit:"\u5143",countShow:!1,width:"520px",alignment:"left"},void 0,!1,{fileName:dt,lineNumber:788,columnNumber:15},this)},"amount",!1,{fileName:dt,lineNumber:782,columnNumber:13},this),Object(h.jsxDEV)(s.a,{id:"day_budget",labelname:"\u5355\u5929\u9884\u7b97\u53d1\u653e\u4e0a\u9650",prop:"day_budget",children:Object(h.jsxDEV)(n.a,{onChange:e=>{this.onHandleChange(e,"day_budget")},onClearItem:()=>{this.onHandleChange("","day_budget")},disabled:this.state.isEdit,value:this.state.model.day_budget,placeholder:"\u8bf7\u8f93\u5165",labelWidth:"0px",maxLength:9,height:"36px",unit:"\u5143",countShow:!1,width:"520px",alignment:"left"},void 0,!1,{fileName:dt,lineNumber:808,columnNumber:15},this)},void 0,!1,{fileName:dt,lineNumber:807,columnNumber:13},this),Object(h.jsxDEV)(s.a,{id:"receive_number",labelname:"\u7528\u6237\u53ef\u9886\u4e2a\u6570",prop:"receive_num",children:[Object(h.jsxDEV)(n.a,{onChange:e=>{this.onHandleChange(e,"receive_num")},onClearItem:()=>{this.onHandleChange("","receive_num")},disabled:this.state.isEdit,value:this.state.model.receive_num,placeholder:"\u8bf7\u8f93\u5165",labelWidth:"0px",height:"36px",unit:"\u4e2a",countShow:!1,width:"304px",alignment:"left"},void 0,!1,{fileName:dt,lineNumber:828,columnNumber:15},this),Object(h.jsxDEV)(Q.a,{disabled:this.state.isEdit,onChange:({target:e})=>{this.onHandleChange(e.value,"receive_every")},value:Number(this.state.model.receive_every),children:Xe.map((({key:e,text:t})=>Object(h.jsxDEV)(ne.a,{value:e,children:t},e,!1,{fileName:dt,lineNumber:853,columnNumber:19},this)))},void 0,!1,{fileName:dt,lineNumber:845,columnNumber:15},this)]},void 0,!0,{fileName:dt,lineNumber:827,columnNumber:13},this)]},void 0,!0,{fileName:dt,lineNumber:648,columnNumber:11},this)},void 0,!1,{fileName:dt,lineNumber:647,columnNumber:9},this),Object(h.jsxDEV)(d.a,{style:{width:"70%",margin:"10px 0"},title:"\u65f6\u95f4\u9650\u5236",children:Object(h.jsxDEV)(l.a,{model:this.state.model,rules:Ye.time,ref:"form2",children:[Object(h.jsxDEV)(s.a,{id:"entry_time",labelname:"\u751f\u6548\u65f6\u95f4\u6bb5",prop:"effect_date",children:Object(h.jsxDEV)(ee.a,{className:"zent-datepicker-plan",showTime:{format:"HH:mm:ss",defaultTime:["00:00:00","23:59:59"]},format:"YYYY-MM-DD HH:mm:ss",disabled:[this.state.isEdit,this.state.isEdit],width:245,value:this.state.model.effect_date,onChange:e=>{this.onHandleChange(e,"effect_date")},disabledTime:this.onDisabledTime,disabledDate:this.onDisabledRange1},void 0,!1,{fileName:dt,lineNumber:865,columnNumber:15},this)},void 0,!1,{fileName:dt,lineNumber:864,columnNumber:13},this),Object(h.jsxDEV)(s.a,{id:"usable_time",labelname:"\u9886\u53d6\u65f6\u95f4\u6bb5",prop:"official_price",children:[Object(h.jsxDEV)("div",{className:"boxTime",children:Object(h.jsxDEV)(Q.a,{value:this.state.model.receive_type,onChange:({target:e})=>{this.onHandleChange(e.value,"receive_type"),this.onHandleChange([[]],"receive_day"),this.onHandleChange([{date:"",time:[[]]}],"receive_irregular"),this.onHandleChange({week:[],time:[[]]},"receive_rule")},children:Object(h.jsxDEV)(Z.a,{value:0,children:"\u4e0d\u8bbe\u7f6e"},void 0,!1,{fileName:dt,lineNumber:907,columnNumber:19},this)},void 0,!1,{fileName:dt,lineNumber:884,columnNumber:17},this)},void 0,!1,{fileName:dt,lineNumber:883,columnNumber:15},this),Object(h.jsxDEV)("div",{className:"boxTime column ",style:{marginTop:"15px"},children:[Object(h.jsxDEV)(Q.a,{value:this.state.model.receive_type,onChange:({target:e})=>{this.onHandleChange(e.value,"receive_type"),this.onHandleChange([{date:"",time:[[]]}],"receive_irregular"),this.onHandleChange({week:[],time:[[]]},"receive_rule")},children:Object(h.jsxDEV)(Z.a,{value:3,children:"\u6bcf\u65e5\u53ef\u9886"},void 0,!1,{fileName:dt,lineNumber:933,columnNumber:19},this)},void 0,!1,{fileName:dt,lineNumber:911,columnNumber:17},this),3===this.state.model.receive_type?Object(h.jsxDEV)(h.Fragment,{children:this.state.model.receive_day.map(((e,t)=>Object(h.jsxDEV)("div",{className:"options_time",children:[Object(h.jsxDEV)(re.a,{className:"zent-datepicker-plan column_datepicker",showTime:{format:"HH:mm:ss",defaultTime:[Y()().format("HH:mm:ss"),"23:59:59"]},width:195,value:e,onChange:e=>{const i=this.state.model;i.receive_day[t]=e,this.setState({model:i})}},void 0,!1,{fileName:dt,lineNumber:939,columnNumber:25},this),this.ruleDayComponents(t)]},t,!0,{fileName:dt,lineNumber:938,columnNumber:23},this)))},void 0,!1):null]},void 0,!0,{fileName:dt,lineNumber:910,columnNumber:15},this),Object(h.jsxDEV)("div",{className:"boxTime column",children:[Object(h.jsxDEV)(Q.a,{className:"column_label",value:this.state.model.receive_type,onChange:({target:e})=>{this.onHandleChange(e.value,"receive_type"),this.onHandleChange([{date:"",time:[[]]}],"receive_irregular"),this.onHandleChange([[]],"receive_day")},children:Object(h.jsxDEV)(Z.a,{value:1,children:"\u6709\u6548\u671f\u5185\uff0c\u89c4\u5219\u65e5\u671f\u53ef\u9886"},void 0,!1,{fileName:dt,lineNumber:978,columnNumber:19},this)},void 0,!1,{fileName:dt,lineNumber:961,columnNumber:17},this),1===this.state.model.receive_type?Object(h.jsxDEV)(h.Fragment,{children:[Object(h.jsxDEV)(j.a.Group,{value:this.state.model.receive_rule.week,onChange:e=>this.onHandleChange(e,"receive_rule","week"),style:{marginLeft:"25px",marginTop:"20px"},children:et.map((e=>Object(h.jsxDEV)(j.a,{className:"checkbox",value:e.key,children:e.text},e.key,!1,{fileName:dt,lineNumber:988,columnNumber:25},this)))},void 0,!1,{fileName:dt,lineNumber:982,columnNumber:21},this),this.state.model.receive_rule.time.map(((e,t)=>Object(h.jsxDEV)("div",{className:"options_time",children:[Object(h.jsxDEV)(re.a,{className:"zent-datepicker-plan column_datepicker",showTime:{format:"HH:mm:ss",defaultTime:[Y()().format("HH:mm:ss"),"23:59:59"]},value:e,onChange:e=>{const i=this.state.model;i.receive_rule.time[t]=e,this.setState({model:i})},width:205},void 0,!1,{fileName:dt,lineNumber:995,columnNumber:25},this),this.ruleComponents(t)]},t,!0,{fileName:dt,lineNumber:994,columnNumber:23},this))),Object(h.jsxDEV)("p",{className:"notice",children:"\u8bf7\u6309\u716724\u5c0f\u65f6\u5236\u8f93\u5165\u53ef\u7528\u65f6\u6bb5\uff0c\u6700\u591a\u8bbe\u7f6e3\u4e2a\u65f6\u6bb5"},void 0,!1,{fileName:dt,lineNumber:1013,columnNumber:21},this)]},void 0,!0):null]},void 0,!0,{fileName:dt,lineNumber:960,columnNumber:15},this),Object(h.jsxDEV)("div",{className:"boxTime column",style:{marginTop:"15px"},children:[Object(h.jsxDEV)(Q.a,{value:this.state.model.receive_type,onChange:({target:e})=>{this.onHandleChange(e.value,"receive_type"),this.onHandleChange({week:[],time:[[]]},"receive_rule"),this.onHandleChange([[]],"receive_day")},children:Object(h.jsxDEV)(Z.a,{value:2,children:"\u6709\u6548\u671f\u5185\uff0c\u4e0d\u89c4\u5219\u65e5\u671f\u53ef\u9886"},void 0,!1,{fileName:dt,lineNumber:1026,columnNumber:19},this)},void 0,!1,{fileName:dt,lineNumber:1018,columnNumber:17},this),2===this.state.model.receive_type?Object(h.jsxDEV)(h.Fragment,{children:[Object(h.jsxDEV)("p",{className:"notice",style:{width:"500px"},children:"\u53ef\u5728\u6709\u6548\u671f\u5185\u4efb\u610f\u9009\u62e9\u65f6\u95f4\u5929\u6570\uff0c\u4ee5\u53ca\u53ef\u7528\u65f6\u6bb5\u3002 \u56e0\u5f53\u524d\u5fae\u4fe1\u652f\u6301\u95ee\u9898\uff0c\u5982\u9009\u62e9\u4e0d\u89c4\u5219\u65f6\u95f4\uff0c\u5fae\u4fe1\u5361\u5305\u5185\u5f53\u524d\u4ec5\u4f1a\u5c55\u793a\u6709\u6548\u671f\uff0c\u5efa\u8bae \u5c06\u5177\u4f53\u53ef\u7528\u65e5\u671f\u4ee5\u53ca\u65f6\u95f4\u6bb5\u586b\u5199\u5728\u4f7f\u7528\u8bf4\u660e\u5185\u3002"},void 0,!1,{fileName:dt,lineNumber:1030,columnNumber:21},this),this.irregularComponents()]},void 0,!0):null]},void 0,!0,{fileName:dt,lineNumber:1017,columnNumber:15},this)]},void 0,!0,{fileName:dt,lineNumber:882,columnNumber:13},this)]},void 0,!0,{fileName:dt,lineNumber:863,columnNumber:11},this)},void 0,!1,{fileName:dt,lineNumber:862,columnNumber:9},this),Object(h.jsxDEV)(d.a,{style:{width:"70%",margin:"10px 0"},title:"\u9884\u8b66\u89c4\u5219",children:Object(h.jsxDEV)(l.a,{model:this.state.model,rules:Ye.warning,ref:"form4",children:[Object(h.jsxDEV)(s.a,{id:"early_per",labelname:"\u9884\u8b66\u767e\u5206\u6bd4",children:[Object(h.jsxDEV)(oe.a,{value:this.state.model.early_per,onChange:e=>{this.onHandleChange(e,"early_per")},children:[tt.map((e=>Object(h.jsxDEV)(j.a,{value:e,children:[e,"%"]},e,!0,{fileName:dt,lineNumber:1053,columnNumber:19},this))),Object(h.jsxDEV)(j.a,{value:this.state.input_early_per},void 0,!1,{fileName:dt,lineNumber:1057,columnNumber:17},this)]},void 0,!0,{fileName:dt,lineNumber:1046,columnNumber:15},this),Object(h.jsxDEV)(n.a,{className:"percent",onChange:e=>{this.filterEarlyPer(),this.setState({input_early_per:e})},onClearItem:()=>{this.filterEarlyPer(),this.setState({input_early_per:""})},value:this.state.input_early_per,placeholder:"",labelWidth:"0px",maxLength:3,height:"36px",unit:"%",countShow:!1,width:"190px",alignment:"left"},void 0,!1,{fileName:dt,lineNumber:1059,columnNumber:15},this)]},void 0,!0,{fileName:dt,lineNumber:1045,columnNumber:13},this),Object(h.jsxDEV)(s.a,{id:"early_notifier",labelname:"\u9884\u8b66\u901a\u77e5\u4eba",children:[Object(h.jsxDEV)("div",{className:"bt_se",children:Object(h.jsxDEV)(X.a,{className:"bt_se_select",options:this.state.userSelectList,placeholder:"\u9009\u62e9\u4e00\u9879",size:"xl",value:this.state.warningInput,onChange:e=>{const t=this.state.model;e&&(t.early_notifier.push(e),t.early_notifier=te(t.early_notifier,"key")),this.setState({warningInput:e,model:t})}},void 0,!1,{fileName:dt,lineNumber:1082,columnNumber:17},this)},void 0,!1,{fileName:dt,lineNumber:1081,columnNumber:15},this),Object(h.jsxDEV)("div",{className:"userSelect",children:Object(h.jsxDEV)("ol",{children:Object(le.a)(this.state.model.early_notifier)?null===(e=this.state.model.early_notifier)||void 0===e?void 0:e.map((e=>Object(h.jsxDEV)(me.a,{closable:null===e||void 0===e?void 0:e.closable,onClose:()=>this.closeCallback(e),children:null===e||void 0===e?void 0:e.text},null===e||void 0===e?void 0:e.key,!1,{fileName:dt,lineNumber:1103,columnNumber:25},this))):null},void 0,!1,{fileName:dt,lineNumber:1100,columnNumber:17},this)},void 0,!1,{fileName:dt,lineNumber:1099,columnNumber:15},this)]},void 0,!0,{fileName:dt,lineNumber:1080,columnNumber:13},this)]},void 0,!0,{fileName:dt,lineNumber:1044,columnNumber:11},this)},void 0,!1,{fileName:dt,lineNumber:1043,columnNumber:9},this),Object(h.jsxDEV)(d.a,{style:{width:"70%",margin:"10px 0"},title:"\u6837\u5f0f\u8bbe\u7f6e",children:Object(h.jsxDEV)(l.a,{ref:"form3",children:Object(h.jsxDEV)(s.a,{id:"instruction",labelname:"\u4f7f\u7528\u8bf4\u660e",required:"",children:Object(h.jsxDEV)(st,{pageType:"detaileditor",setEdittext:e=>{this.onHandleChange(e,"instruction")},width:"520px",text:this.state.model.instruction,limitLength:5e3},this.state.model.channel,!1,{fileName:dt,lineNumber:1121,columnNumber:15},this)},void 0,!1,{fileName:dt,lineNumber:1120,columnNumber:13},this)},void 0,!1,{fileName:dt,lineNumber:1119,columnNumber:11},this)},void 0,!1,{fileName:dt,lineNumber:1118,columnNumber:9},this),this.switchComponents()]},void 0,!0,{fileName:dt,lineNumber:523,columnNumber:7},this)}}var bt=i(491),pt=i(522),Nt=(i(346),i(347)),jt=i.n(Nt),vt=i(211),gt=i(488),ft=(i(215),"/Users/zhangds/web/blue-brother/frontend/src/components/UseProductPop/index.jsx");const _t={product_id:[{type:"required",message:"\u8bf7\u9009\u62e9\u6620\u5c04\u5546\u54c1"}],quantity:[{type:"required",message:"\u8bf7\u8f93\u5165\u5546\u54c1\u5e93\u5b58"},{type:"regExp",message:"\u8bf7\u8f93\u5165\u5c0f\u4e8e100\u4e07\u7684\u6574\u6570",reg:"^(?!0)(?:[0-9]{1,6}|1000000)$"}],contract_price:[{type:"required",message:"\u8bf7\u8f93\u5165\u5408\u540c\u4ef7"},{type:"regExp",message:"\u6700\u591a\u4fdd\u75594\u4f4d\u5c0f\u6570",reg:"^[0-9]+(.[0-9]{1,4})?$"}],product_name:[{type:"required",message:"\u8bf7\u8f93\u5165\u5546\u54c1\u540d\u79f0"}],weight:[{type:"required",message:"\u8bf7\u8f93\u5165\u6743\u91cd"},{type:"regExp",message:"\u8bf7\u8f93\u51650~100\u6743\u91cd\u6570\u5b57",reg:"^([0-9]{0,2}|100)$"}],end_time:[{type:"required",message:"\u8bf7\u9009\u62e9\u5151\u6362\u7ed3\u675f\u65f6\u95f4"}],card_show:[{type:"required",message:"\u8bf7\u9009\u62e9\u5361\u5bc6\u53d1\u653e\u7c7b\u578b"}]};var xt=Object(r.forwardRef)(((e,t)=>{const{productData:i,checkedProduct:o,directResellerId:m,productType:d}=e,u=Object(r.useRef)(null),b=Object(r.useRef)(null);Object(r.useImperativeHandle)(t,(()=>({submit:O,getFormModel:y})));const[p,N]=Object(W.a)({productOption:[],productDataAll:[],productPic:[],isUpdatePic:!1,loading:!0}),[j,v]=Object(W.a)({cur_product:void 0,code_batch_id:"",product_type:Number(d),cost_price:"",weight:"0",quantity:"",contract_price:"",product_name:"",official_price:"",show_url:[],describe_url:[],detail_url:[],product_id:"",account_type:"",map_product_name:"",end_time:"",card_show:2});Object(r.useEffect)((()=>{_().then((e=>{if(i){let t=e.find((e=>e.key===Number(i.product_id)));t&&v({cur_product:t})}x()}))}),[]),Object(pt.a)((()=>{_()}),[j.product_type]),Object(r.useEffect)((()=>{N({productPic:j.describe_url})}),[p.isUpdatePic]);let[g,f]=Object(r.useState)(null);Object(r.useEffect)((()=>{let e=new jt.a(".swiper-container",{slidesPerView:1,centeredSlides:!0,loop:!0,autoplay:3e3,initialSlide:0,observer:!0,observeParents:!1,pagination:".swiper-pagination",paginationClickable:!0});f(e)}),[]);const _=()=>(N({loading:!0}),new Promise(((e,t)=>{if(m){const i=3===j.product_type;let s={reseller_id:m,type:i?1:j.product_type};Object(a.tb)(s).then((i=>{Object(a.Tb)(i,((t,i)=>{let a=t.data.map((e=>({key:e.id,text:e.title,disabled:-1!==o.indexOf(e.id)})));N({productOption:a,loading:!1,productDataAll:t.data}),e(a)}),(e=>{N({loading:!1}),t(!1)}))}))}else e(!1)}))),x=()=>new Promise(((e,t)=>{i?(v({goods_id:i.goods_id,cost_price:i.cost_price,weight:String(i.weight),quantity:i.quantity,contract_price:i.contract_price,product_name:i.product_name,official_price:i.official_price,product_id:i.product_id,account_type:i.account_type,map_product_name:i.map_product_name,product_type:i.is_e_card?3:j.product_type,card_show:Number(i.card_show),code_batch_id:i.code_batch_id,end_time:i.end_time,show_url:[{id:(new Date).getTime(),src:i.show_url,name:"\u5546\u54c1Logo"}],detail_url:i.detail_url?[{id:(new Date).getTime(),src:i.detail_url,name:"\u5546\u54c1\u8be6\u60c5"}]:[],describe_url:i.describe_url.map(((e,t)=>({id:`${(new Date).getTime()}-${t}`,src:e,name:`${t}`})))}),setTimeout((()=>{N({isUpdatePic:!p.isUpdatePic})}),300),e(!0)):e(!1)})),y=()=>{const t=3===j.product_type;return{product_id:j.product_id,product_type:t?1:j.product_type,is_e_card:Number(t),product_name:j.product_name,contract_price:j.contract_price,cost_price:j.cost_price,official_price:j.official_price,quantity:j.quantity,weight:j.weight,show_url:1!==e.isSettlement?j.show_url[0].src:"https://lsxd-customcard-h5.oss-cn-hangzhou.aliyuncs.com/vip.png",describe_url:j.describe_url.map((e=>e.src)),detail_url:j.detail_url[0]?j.detail_url[0].src:"",account_type:j.account_type,map_product_name:j.product_name,goods_id:j.goods_id,end_time:j.end_time,card_show:j.card_show}},O=async()=>{let t=!1;if(u.current.validator()){if(j.show_url.length<=0&&1!==e.isSettlement)return void c.a.error("\u8bf7\u4e0a\u4f20\u5546\u54c1Logo");if(j.describe_url.length<=0)return void c.a.error("\u8bf7\u4e0a\u4f20\u5546\u54c1\u56fe\u7247");t=!0}return t},D=e=>{v({cur_product:void 0,code_batch_id:"",cost_price:"",weight:"0",quantity:"",contract_price:"",product_name:"",product_type:1,product_id:"",official_price:"",show_url:[],describe_url:[],detail_url:[],account_type:"",map_product_name:"",end_time:"",card_show:2}),setTimeout((()=>{N({isUpdatePic:!p.isUpdatePic})}),300),v({product_type:e.target.value}),3==e.target.value&&v({show_url:[{id:(new Date).getTime(),src:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/commonproductlogo/goods-pic/jd_logo.png",name:"common-pic.png"}],describe_url:[{id:(new Date).getTime(),src:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/commonproductlogo/goods-pic/jd_card.png",name:"common-pic.png"}]})},E=(e,t)=>{"overMaxAmount"===e?c.a.error(`\u6700\u591a\u53ef\u4e0a\u4f20 ${t.maxAmount} \u5f20\u56fe\u7247`):"overMaxSize"===e&&c.a.error(`\u56fe\u7247\u5927\u5c0f\u4e0d\u80fd\u8d85\u8fc7 ${t.formattedMaxSize}`)},V=e=>new Promise(((t,i)=>{try{let s=new FormData;s.append("file",e),s.append("path","common_image"),Object(a.cd)(s).then((e=>{Object(a.Tb)(e,((e,i)=>{t(e.path)}),(e=>{c.a.error(e),i(e)}))}))}catch(s){i(s)}})),k=(e,t)=>{e.length>0?V(e[0].file).then((i=>{v(0===t?{show_url:[{src:i,id:`${(new Date).getTime()}-0`,name:e[0].file.name}]}:{detail_url:[{src:i,id:`${(new Date).getTime()}-0`,name:e[0].file.name}]})})):v(0===t?{show_url:[]}:{detail_url:[]})};return Object(h.jsxDEV)("div",{className:"addProduct",children:Object(h.jsxDEV)(vt.a,{loading:p.loading,iconSize:16,textSize:12,icon:"circle",iconText:"\u52a0\u8f7d\u4e2d",children:[Object(h.jsxDEV)(l.a,{model:j,rules:_t,ref:u,children:[Object(h.jsxDEV)(s.a,{labelname:"\u5546\u54c1\u7c7b\u578b",prop:"type",id:"type",children:Object(h.jsxDEV)(Q.a,{onChange:e=>{D(e)},value:j.product_type,disabled:!!j.code_batch_id,children:[Object(h.jsxDEV)(ne.a,{value:1,disabled:1===e.isSettlement&&e.settlementData&&(8===e.settlementData.key||9===e.settlementData.key),children:"\u76f4\u5145"},void 0,!1,{fileName:ft,lineNumber:533,columnNumber:15},void 0),Object(h.jsxDEV)(ne.a,{value:2,disabled:1===e.isSettlement&&e.settlementData&&7===e.settlementData.key,children:"\u5361\u5bc6"},void 0,!1,{fileName:ft,lineNumber:543,columnNumber:15},void 0),Object(h.jsxDEV)(ne.a,{value:3,disabled:1===e.isSettlement&&e.settlementData&&(8===e.settlementData.key||9===e.settlementData.key),children:"\u4eac\u4e1cE\u5361"},void 0,!1,{fileName:ft,lineNumber:551,columnNumber:15},void 0)]},void 0,!0,{fileName:ft,lineNumber:526,columnNumber:13},void 0)},void 0,!1,{fileName:ft,lineNumber:525,columnNumber:11},void 0),2===j.product_type?Object(h.jsxDEV)(s.a,{labelname:"\u53d1\u653e\u7c7b\u578b",prop:"card_show",id:"type",children:Object(h.jsxDEV)(Q.a,{onChange:e=>{v({card_show:e.target.value})},value:j.card_show,disabled:!!j.code_batch_id,children:[Object(h.jsxDEV)(ne.a,{value:2,children:"\u5e73\u53f0\u67e5\u770b"},void 0,!1,{fileName:ft,lineNumber:572,columnNumber:17},void 0),Object(h.jsxDEV)(ne.a,{value:1,children:"\u77ed\u4fe1\u4e0b\u53d1"},void 0,!1,{fileName:ft,lineNumber:573,columnNumber:17},void 0)]},void 0,!0,{fileName:ft,lineNumber:565,columnNumber:15},void 0)},void 0,!1,{fileName:ft,lineNumber:564,columnNumber:13},void 0):null,Object(h.jsxDEV)(s.a,{labelname:"\u6620\u5c04\u5546\u54c1",prop:"product_id",id:"product",children:Object(h.jsxDEV)(X.a,{clearable:!0,width:520,options:p.productOption,placeholder:"\u8bf7\u9009\u62e9\u5546\u54c1",value:j.cur_product,disabled:!!j.code_batch_id,onChange:e=>{(e=>{v({cur_product:e});let t=e?p.productDataAll.find((t=>t.id===e.key)):{},i=window.goods.find((e=>Number(e.id)===Number(t.product_category_id)));v({product_id:t.id||"",official_price:t.official_price||"",cost_price:t.cost_price||"",product_name:t.title||"",account_type:t.account_type||0,quantity:"",contract_price:""});const a=[{id:(new Date).getTime(),src:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/commonproductlogo/goods-pic/common-pic.png",name:"common-pic.png"}];if(i){let e=[];const s=i.products.find((e=>Number(e.id)===Number(t.id)));null===s||void 0===s||s.pic.map(((t,i)=>{e.push({id:(new Date).getTime(),src:t,name:s.title+i})})),v({show_url:[{id:(new Date).getTime(),src:i.pic,name:i.name}],describe_url:e.length?e:a,map_product_name:t.title})}else v({show_url:[],describe_url:a});setTimeout((()=>{N({isUpdatePic:!p.isUpdatePic})}),300)})(e)}},void 0,!1,{fileName:ft,lineNumber:579,columnNumber:13},void 0)},void 0,!1,{fileName:ft,lineNumber:578,columnNumber:11},void 0),2===j.product_type?Object(h.jsxDEV)(s.a,{id:"end_time",labelname:"\u5361\u5bc6\u6709\u6548\u671f\u81f3",prop:"end_time",children:Object(h.jsxDEV)(Pe.a,{className:"zent-datepicker-plan",showTime:{defaultTime:"23:59:59"},value:j.end_time,width:520,format:"YYYY-MM-DD HH:mm:ss",onChange:e=>{v({end_time:e})}},void 0,!1,{fileName:ft,lineNumber:593,columnNumber:15},void 0)},void 0,!1,{fileName:ft,lineNumber:592,columnNumber:13},void 0):null,Object(h.jsxDEV)(s.a,{labelname:"\u9884\u4f30\u6210\u672c\u4ef7",prop:"cost_price",id:"cost_price",children:Object(h.jsxDEV)(n.a,{onChange:e=>{},onClearItem:e=>{},value:j.cost_price,placeholder:"\u8bf7\u8f93\u5165",labelWidth:"0px",maxLength:3,height:"36px",countShow:!1,width:"520px",alignment:"left",disabled:!0},void 0,!1,{fileName:ft,lineNumber:610,columnNumber:13},void 0)},void 0,!1,{fileName:ft,lineNumber:609,columnNumber:11},void 0),Object(h.jsxDEV)(s.a,{labelname:"\u5546\u54c1\u6743\u91cd",prop:"weight",id:"weight",children:Object(h.jsxDEV)(n.a,{onChange:e=>{v({weight:e})},onClearItem:e=>{v({weight:0})},value:j.weight,placeholder:"\u8bf7\u8f93\u5165",labelWidth:"0px",maxLength:3,height:"36px",countShow:!1,width:"520px",alignment:"left"},void 0,!1,{fileName:ft,lineNumber:625,columnNumber:13},void 0)},void 0,!1,{fileName:ft,lineNumber:624,columnNumber:11},void 0),Object(h.jsxDEV)(s.a,{labelname:"\u5546\u54c1\u5e93\u5b58",prop:"quantity",id:"quantity",children:Object(h.jsxDEV)(n.a,{onChange:e=>{v({quantity:e})},onClearItem:e=>{v({quantity:""})},value:j.quantity,placeholder:"\u8bf7\u8f93\u5165",labelWidth:"0px",maxLength:7,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:ft,lineNumber:643,columnNumber:13},void 0)},void 0,!1,{fileName:ft,lineNumber:642,columnNumber:11},void 0),Object(h.jsxDEV)(s.a,{id:"contract_price",labelname:"\u5408\u540c\u4ef7",prop:"contract_price",children:Object(h.jsxDEV)(n.a,{onChange:e=>{v({contract_price:e})},onClearItem:e=>{v({contract_price:""})},value:j.contract_price,placeholder:"\u8bf7\u8f93\u5165",labelWidth:"0px",maxLength:16,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:ft,lineNumber:661,columnNumber:13},void 0)},void 0,!1,{fileName:ft,lineNumber:660,columnNumber:11},void 0),Object(h.jsxDEV)(s.a,{id:"product_name",labelname:"\u5546\u54c1\u540d\u79f0",prop:"product_name",children:Object(h.jsxDEV)(n.a,{onChange:e=>{v({product_name:e})},onClearItem:e=>{v({product_name:""})},value:j.product_name,placeholder:"\u8bf7\u8f93\u5165",labelWidth:"0px",maxLength:20,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:ft,lineNumber:678,columnNumber:13},void 0)},void 0,!1,{fileName:ft,lineNumber:677,columnNumber:11},void 0),Object(h.jsxDEV)(s.a,{id:"official_price",labelname:"\u5546\u54c1\u5b98\u65b9\u4ef7",prop:"official_price",children:Object(h.jsxDEV)(n.a,{onChange:e=>{},onClearItem:e=>{},value:j.official_price,placeholder:"\u8bf7\u8f93\u5165",labelWidth:"0px",maxLength:3,height:"36px",countShow:!1,width:"520px",alignment:"left",disabled:!0},void 0,!1,{fileName:ft,lineNumber:696,columnNumber:13},void 0)},void 0,!1,{fileName:ft,lineNumber:695,columnNumber:11},void 0),1!==e.isSettlement?Object(h.jsxDEV)(s.a,{id:"show_url",prop:"show_url",labelname:"\u5546\u54c1Logo",children:Object(h.jsxDEV)(gt.a,{className:"zent-image-upload-demo",maxSize:5242880,tips:"\u56fe\u7247\u4e0d\u8d85\u8fc7 5M",maxAmount:1,onError:E,onChange:e=>{k(e,0)},fileList:j.show_url},void 0,!1,{fileName:ft,lineNumber:713,columnNumber:15},void 0)},void 0,!1,{fileName:ft,lineNumber:712,columnNumber:13},void 0):null,Object(h.jsxDEV)(s.a,{prop:"describe_url",labelname:"\u5546\u54c1\u56fe",id:"describe_url",children:Object(h.jsxDEV)(gt.a,{className:"good-image-upload-demo",maxSize:5242880,tips:"\u56fe\u7247\u4e0d\u8d85\u8fc7 5M",maxAmount:9,onError:E,onChange:(e,t)=>{((e,t)=>{if(t)if("add"===t.type)V(t.item.file).then((e=>{let i=j.describe_url;i.push({id:t.item.id,name:t.item.name,src:e}),v({describe_url:i})}));else{let e=j.describe_url.filter((e=>e.id!==t.item.id));v({describe_url:e})}else v({describe_url:e});setTimeout((()=>{N({isUpdatePic:!p.isUpdatePic})}),300)})(e,t)},sortable:!0,fileList:j.describe_url,multiple:!0},void 0,!1,{fileName:ft,lineNumber:728,columnNumber:13},void 0)},void 0,!1,{fileName:ft,lineNumber:727,columnNumber:11},void 0),Object(h.jsxDEV)(s.a,{prop:"detail_url",labelname:"\u5546\u54c1\u8be6\u60c5",id:"detail_url",required:!1,children:Object(h.jsxDEV)(gt.a,{className:"zent-image-upload-demo",maxSize:5242880,tips:"\u56fe\u7247\u4e0d\u8d85\u8fc7 5M",maxAmount:1,onError:E,fileList:j.detail_url,onChange:e=>{k(e,1)}},void 0,!1,{fileName:ft,lineNumber:743,columnNumber:13},void 0)},void 0,!1,{fileName:ft,lineNumber:742,columnNumber:11},void 0)]},void 0,!0,{fileName:ft,lineNumber:524,columnNumber:9},void 0),Object(h.jsxDEV)("div",{className:"mobile",children:[Object(h.jsxDEV)("div",{className:"mobile_top",children:p.productPic?Object(h.jsxDEV)("div",{className:"swiper-container",children:[Object(h.jsxDEV)("div",{className:"swiper-wrapper",ref:b,children:p.productPic.map(((e,t)=>Object(h.jsxDEV)("div",{className:"swiper-slide",children:Object(h.jsxDEV)("img",{src:e.src,alt:""},void 0,!1,{fileName:ft,lineNumber:765,columnNumber:25},void 0)},t,!1,{fileName:ft,lineNumber:764,columnNumber:23},void 0)))},void 0,!1,{fileName:ft,lineNumber:761,columnNumber:17},void 0),Object(h.jsxDEV)("div",{className:"swiper-pagination"},void 0,!1,{fileName:ft,lineNumber:770,columnNumber:17},void 0)]},void 0,!0,{fileName:ft,lineNumber:760,columnNumber:15},void 0):null},void 0,!1,{fileName:ft,lineNumber:758,columnNumber:11},void 0),Object(h.jsxDEV)("div",{children:[Object(h.jsxDEV)("div",{className:"mobile_center"},void 0,!1,{fileName:ft,lineNumber:508,columnNumber:9},void 0),Object(h.jsxDEV)("div",{className:"mobile_bottom",children:j.detail_url.length>0?Object(h.jsxDEV)("img",{src:j.detail_url[0].src,alt:""},void 0,!1,{fileName:ft,lineNumber:510,columnNumber:42},void 0):null},void 0,!1,{fileName:ft,lineNumber:509,columnNumber:9},void 0)]},void 0,!0,{fileName:ft,lineNumber:507,columnNumber:7},void 0)]},void 0,!0,{fileName:ft,lineNumber:757,columnNumber:9},void 0)]},void 0,!0,{fileName:ft,lineNumber:517,columnNumber:7},void 0)},void 0,!1,{fileName:ft,lineNumber:516,columnNumber:5},void 0)})),yt="/Users/zhangds/web/blue-brother/frontend/src/components/UseGoodsScopePop/index.jsx";var Ot=Object(r.forwardRef)(((e,t)=>{const{product_title:i,drawerVisible:a,onClose:s,type:l,productData:n,submit:o,tableData:m,table_index:c,directResellerId:b,productType:p,checkedProduct:N,isCoupon:j}=e,v=Object(r.useRef)(null),g=Object(r.useRef)(null),f=Object(r.useRef)(null),_=async()=>{try{let e=!1;if(e="addProduct"===l?await v.current.submit():"addKnockGold"===l?await g.current.submit():await f.current.submit(),e){let e={};e="addProduct"===l?(()=>{let e=m,t=v.current.getFormModel();if(t.upstream="\u76f4\u8fde\u5929\u4e0b",t.type=1,t.stock=t.quantity,t.all_budget=F(Number(t.contract_price),Number(t.quantity)),t.effectDate="-","\u7f16\u8f91\u5546\u54c1"===i){if(-1!==c){let i=e[c].checked;e[c]=t,e[c].checked=i}}else e.push(t);return e})():"addKnockGold"===l?(()=>{let e=m,t=g.current.state.form_data,a=q(t);if("\u7f16\u8f91\u7acb\u51cf\u91d1"===i){if(-1!==c){let i=e[c].checked;e[c]=a,e[c].only=t,e[c].checked=i}}else e.push(a);return e})():(()=>{let e=m,t=f.current.state.form_data,a=M(t);if(a.only.copy=!1,"\u7f16\u8f91\u7ea2\u5305"===i){if(-1!==c){let i=e[c].checked;e[c]=a,e[c].only=t,e[c].checked=i}}else e.push(a);return e})(),o(e),s()}}catch(e){}};return Object(h.jsxDEV)(bt.a,{className:"draw",width:"86%",title:i,footer:Object(h.jsxDEV)("div",{style:{textAlign:"center"},children:[Object(h.jsxDEV)(u.a,{type:"primary",onClick:e=>{_()},children:"\u63d0\u4ea4"},void 0,!1,{fileName:yt,lineNumber:161,columnNumber:11},void 0),Object(h.jsxDEV)(u.a,{onClick:e=>s(),children:"\u53d6\u6d88"},void 0,!1,{fileName:yt,lineNumber:169,columnNumber:11},void 0)]},void 0,!0,{fileName:yt,lineNumber:160,columnNumber:9},void 0),visible:a,onClose:e=>s(),maskClosable:!1,children:Object(h.jsxDEV)("div",{className:"draw2",children:Object(h.jsxDEV)(d.a,{className:"borderNone",style:{width:"95%",margin:"10px auto"},children:function(){switch(l){case"addKnockGold":return Object(h.jsxDEV)(qe,{className:"addKnockGold",data:n,ref:g,ysf:j&&!0},void 0,!1,{fileName:yt,lineNumber:128,columnNumber:11},this);case"addProduct":return Object(h.jsxDEV)(xt,{ref:v,checkedProduct:N,productData:n,directResellerId:b,productType:p,isSettlement:e.isSettlement,settlementData:e.settlementData},void 0,!1,{fileName:yt,lineNumber:137,columnNumber:11},this);case"redPackets":return Object(h.jsxDEV)(ht,{ref:f,data:n},void 0,!1,{fileName:yt,lineNumber:148,columnNumber:16},this)}}()},void 0,!1,{fileName:yt,lineNumber:177,columnNumber:9},void 0)},void 0,!1,{fileName:yt,lineNumber:176,columnNumber:7},void 0)},void 0,!1,{fileName:yt,lineNumber:155,columnNumber:5},void 0)})),Dt=(i(217),"/Users/zhangds/web/blue-brother/frontend/src/components/UseCouponAddEdit/index.jsx");const Et=e=>Array.from({length:e},((e,t)=>t)),Vt=[{title:"\u5546\u54c1\u7f16\u53f7",name:"product_id",prop:"product_id",type:"slot",width:"auto"},{title:"\u5546\u54c1\u540d\u79f0",name:"product_name",prop:"product_name",type:"normal",width:"auto"},{title:"\u5b98\u65b9\u4ef7",name:"official_price",prop:"official_price",type:"normal",width:"auto"},{title:"\u5408\u540c\u5355\u4ef7",name:"contract_price",prop:"contract_price",type:"normal",width:"auto"},{title:"\u5e93\u5b58\u6570\u91cf",name:"stock",prop:"stock",type:"normal",width:"auto"},{title:"\u6279\u6b21\u53f7",name:"channel_activity_id",prop:"channel_activity_id",type:"normal",width:"auto"},{title:"\u603b\u9884\u7b97",name:"all_budget",prop:"all_budget",type:"normal",width:"auto"},{title:"\u6709\u6548\u65f6\u95f4\u6bb5",width:"300px",name:"effectDate",prop:"effectDate",type:"normal"},{title:"\u521b\u5efa\u65f6\u95f4",width:"350px",name:"create_time",prop:"create_time",type:"normal"},{title:"\u7c7b\u578b",name:"type",prop:"type",type:"slot",width:"auto"},{title:"\u4e0a\u6e38\u5e73\u53f0",name:"upstream",prop:"upstream",type:"normal",width:"auto"},{title:"",name:"",prop:"",type:"",width:""},{title:"\u64cd\u4f5c",name:"opearo",prop:"opearo",type:"slot",width:"auto"}],kt={plan_id:[{type:"required",message:"\u8bf7\u9009\u62e9\u5f52\u5c5e\u8ba1\u5212"}],key_batch_id:[{type:"required",message:"\u8bf7\u9009\u62e9\u5f52\u5c5ekey"}],title:[{type:"required",message:"\u8bf7\u8f93\u5165\u6279\u6b21\u540d\u79f0"}],date_time:[{type:"required",message:"\u8bf7\u9009\u62e9\u65f6\u95f4"}]},St={full:[{type:"required",message:"\u8bf7\u8f93\u5165\u9762\u989d"},{type:"regExp",message:"\u8bf7\u8f93\u5165\u4e24\u4f4d\u5c0f\u6570",reg:"^[0-9][0-9]*([.][0-9]{1,2})?$"}],reduce:[{type:"required",message:"\u8bf7\u8f93\u5165\u51cf"},{type:"regExp",message:"\u8bf7\u8f93\u5165\u4e24\u4f4d\u5c0f\u6570",reg:"^[0-9][0-9]*([.][0-9]{1,2})?$"}],quantity:[{type:"required",message:"\u8bf7\u8f93\u5165\u53d1\u653e\u603b\u91cf"},{type:"regExp",message:"\u8bf7\u8f93\u5165\u6b63\u6574\u6570",reg:"^[1-9][0-9]*$"}],restrict:[{type:"required",message:"\u8bf7\u8f93\u5165\u7ed1\u5b9a\u6570"},{type:"regExp",message:"\u8bf7\u8f93\u5165\u6b63\u6574\u6570",reg:"^[1-9][0-9]*$"}]};var wt=Object(r.forwardRef)(((e,t)=>{const{couponType:i=0,direct_reseller_id:o,editData:m}=e,[b,p]=Object(W.a)({setup1_title:"\u57fa\u672c\u4fe1\u606f",setup2_title:"\u53d1\u653e\u89c4\u5219",setup3_title:"\u5546\u54c1\u8303\u56f4",tableData:[],tableHeight:500,page:1,dataCount:0,rankOptions:[],rank:[],newGoodsBtnLoading:!1,newGoldLoading:!1,lodgingTable:!0,isQuantity:!0,plan_OPTIONS:[],key_OPTIONS:[],product_title:"",showScopePop:!1,scopePopType:"",productData:{},direct_reseller_id:o||0,table_index:-1,examinePopShow:!1,payType:3,payment_direction:["\u5bf9\u79c1\u8d26\u6237","\u5bf9\u516c\u8d26\u6237","\u9884\u4ed8\u6b3e\u6263\u9664"],coupon_batch_id:"",oldProduct:{},id:"",status:-1,statusDisabled:!1,productType:1,checkedProduct:[],KeyPcType:sessionStorage.getItem("KeyPcType"),isLoadingBtn:!1}),[N,j]=Object(W.a)({plan_id:"",key_batch_id:"",title:"",date_time:""}),v=Object(r.useRef)(null),[_,x]=Object(W.a)({full:"",reduce:"",quantity:"",budget:"",restrict:""}),y=Object(r.useRef)(null),O=Object(r.useRef)(null);Object(r.useEffect)((()=>{!async function(){sessionStorage.getItem("KeyPcType");if(0===i)m&&""!==m?await V().then((e=>{let t=e.find((e=>e.text===m.plan_title));t&&void 0!==t&&"undefined"!==t&&(j({plan_id:t}),sessionStorage.setItem("knockGold_effectDate",JSON.stringify({begin_time:t.key.dateTime[0],end_time:t.key.dateTime[1]})),T(t.key.reseller_id),j({key_batch_id:{key:m.key_batch_id,text:m.key_batch_name}}),D(),"2"===b.KeyPcType&&j({title:`${m.title}_${m.copy_count+1}`.substring(0,12)}),"1"===b.KeyPcType&&p({oldProduct:m.product}),E(m.status))})):await V();else if(m&&""!==m)p({id:m.id,status:m.status}),D(),E(m.status);else{let e=sessionStorage.getItem("knockGold_effectDate");if(e){let t=JSON.parse(e);j({date_time:[t.begin_time,t.end_time]})}}}()}),[]);const D=()=>{try{j({title:m.title,date_time:[m.begin_time,m.end_time]}),x({full:m.full,reduce:m.reduce,quantity:m.quantity,budget:F(Number(m.reduce),Number(m.quantity)),restrict:m.restrict});let e=m.product.legal.map((e=>("2"===b.KeyPcType&&delete e.id,{...e,type:1,upstream:"\u76f4\u8fde\u5929\u4e0b",all_budget:F(Number(e.contract_price),Number(e.quantity)),effectDate:"-"}))),t=m.product.reduce.map((e=>("2"===b.KeyPcType&&(delete e.id,delete e.goods_id),q(e)))),i=e.concat(t);i=Object(f.a)(i,(e=>(2===e.type?e.only.is_delete?e.checked=!1:e.checked=!0:e.is_delete?e.checked=!1:e.checked=!0,e)));let a=Object(f.a)(i,(e=>{let t={};return t.key=e.product_id,t.text=e.product_name,t}));p({rankOptions:a,rank:a,tableData:i})}catch(e){}},E=e=>{"2"!==b.KeyPcType&&[1,2,3].includes(e)&&p({statusDisabled:!0})},V=()=>new Promise(((e,t)=>{try{Object(a.Oc)({bind_object:"2"}).then((t=>{Object(a.Tb)(t,((t,i)=>{let a=t.map((e=>({key:{key:e.id,reseller_id:e.reseller_id,dateTime:[e.begin_time,e.end_time]},text:e.title})));p({plan_OPTIONS:a}),e(a)}))}))}catch(i){t(i)}}));Object(r.useEffect)((()=>{A()}),[_.reduce,_.full]),Object(r.useEffect)((()=>{z()}),[_.reduce,_.quantity]);const k=Object(r.useRef)(null);Object(r.useImperativeHandle)(t,(()=>({submit:S,getModel:w,clearCouponForm:C})));const S=()=>{let e=!1;if(!v.current.validator())return e=!1,e;if(e=!0,!y.current.validator())return e=!1,e;if(e=!0,e){if(!(b.rank.length>0))return c.a.error("\u8bf7\u9009\u62e9\u5546\u54c1\u8303\u56f4"),!1;{let e=b.tableData.filter((e=>e.checked)),t=0;if(e.map((e=>{t+=parseInt(e.quantity)})),t{let e={id:b.id,status:b.status,title:N.title,begin_time:N.date_time[0],end_time:N.date_time[1],quantity:_.quantity,budget:_.budget,full:_.full,reduce:_.reduce,restrict:_.restrict,product:{legal:[],reduce:[]}},t=b.tableData.filter((e=>e.checked));e.product.legal=t.filter((e=>1===e.type));let i=t.filter((e=>2===e.type));return e.product.reduce=i.map((e=>({...e.only}))),e},C=()=>{p({id:"",status:""}),x({full:"",reduce:"",quantity:"",budget:"",restrict:""}),j({plan_id:"",key_batch_id:"",title:""}),p({rank:[],rankOptions:[],tableData:[]})},T=e=>{Object(a.vb)(e).then((e=>{Object(a.Tb)(e,((e,t)=>{p({direct_reseller_id:e.direct_reseller_id})}),(e=>{c.a.error(e)}))}))},L=async e=>{var t;sessionStorage.setItem("knockGold_effectDate",JSON.stringify({begin_time:e.key.dateTime[0],end_time:e.key.dateTime[1]})),j({plan_id:e,key_batch_id:"",date_time:e.key.dateTime}),T(e.key.reseller_id),await(t=e.key.key,new Promise(((e,i)=>{try{Object(a.Nc)({status:"4,5",plan_id:t,bind_object:2}).then((t=>{Object(a.Tb)(t,((t,i)=>{let a=t.map((e=>({key:e.id,text:e.batch_name})));p({key_OPTIONS:a}),e(a)}))}))}catch(s){i(s)}})))},H=()=>{b.tableData.length<=0&&(sessionStorage.setItem("productData",""),sessionStorage.setItem("knockGoldData",""));let e=b.tableData.filter((e=>1===e.type));e.length<=0?sessionStorage.setItem("productData",""):sessionStorage.setItem("productData",JSON.stringify(e));let t=b.tableData.filter((e=>2===e.type));t.length<=0?sessionStorage.setItem("knockGoldData",""):sessionStorage.setItem("knockGoldData",JSON.stringify(t))},M=()=>b.tableData.map((e=>Number(e.product_id))),P=e=>{try{const t=b.direct_reseller_id;if(!N.plan_id&&0===i)return void c.a.error("\u8bf7\u9009\u62e9\u5f52\u5c5e\u8ba1\u5212");if(t<=0)return void c.a.error("\u8bf7\u6dfb\u52a0\u6620\u5c04\u5206\u9500\u5546");H(),"addProduct"===e?p({product_title:"\u65b0\u5efa\u5546\u54c1",scopePopType:"addProduct",checkedProduct:M(),productData:null,table_index:-1,productType:1,showScopePop:!0}):(sessionStorage.setItem("knockGold_effectDate",JSON.stringify({begin_time:N.date_time[0],end_time:N.date_time[1]})),p({product_title:"\u65b0\u589e\u7acb\u51cf\u91d1",scopePopType:"addKnockGold",productData:null,showScopePop:!0}))}catch(t){}},B=(e,t)=>Object(h.jsxDEV)($.a,{height:272,itemCount:e.length,itemSize:32,width:240,children:({index:i,style:a})=>Object(h.jsxDEV)("div",{style:a,children:t(e[i],i)},void 0,!1,{fileName:Dt,lineNumber:954,columnNumber:32},void 0)},void 0,!1,{fileName:Dt,lineNumber:953,columnNumber:7},void 0),A=()=>{U(_.reduce)&&U(_.full)?p({isQuantity:!1}):p({isQuantity:!0})},z=()=>{if(U(_.reduce)&&U(_.quantity)){let e=F(Number(_.reduce),Number(_.quantity));x({budget:e})}else x({budget:""})};return Object(h.jsxDEV)("div",{className:"coupon-box",children:[Object(h.jsxDEV)(d.a,{style:{margin:"10px auto"},title:b.setup1_title,children:Object(h.jsxDEV)(l.a,{model:N,rules:kt,ref:v,children:[0===i?Object(h.jsxDEV)(s.a,{labelname:"\u5f52\u5c5e\u8ba1\u5212",prop:"plan_id",children:Object(h.jsxDEV)(X.a,{clearable:!0,placeholder:"\u9009\u62e9\u4e00\u9879",renderOptionList:B,options:b.plan_OPTIONS,value:N.plan_id,disabled:"2"===b.KeyPcType||"1"===b.KeyPcType,onChange:e=>{L(e)}},void 0,!1,{fileName:Dt,lineNumber:1115,columnNumber:15},void 0)},void 0,!1,{fileName:Dt,lineNumber:1114,columnNumber:13},void 0):null,0===i?Object(h.jsxDEV)(s.a,{labelname:"\u5f52\u5c5ekey",prop:"key_batch_id",children:Object(h.jsxDEV)(X.a,{clearable:!0,placeholder:"\u9009\u62e9\u4e00\u9879",renderOptionList:B,options:b.key_OPTIONS,value:N.key_batch_id,disabled:"2"===b.KeyPcType||"1"===b.KeyPcType,onChange:e=>{j({key_batch_id:e})}},void 0,!1,{fileName:Dt,lineNumber:1131,columnNumber:15},void 0)},void 0,!1,{fileName:Dt,lineNumber:1130,columnNumber:13},void 0):null,Object(h.jsxDEV)(s.a,{labelname:"\u6279\u6b21\u540d\u79f0",prop:"title",children:Object(h.jsxDEV)(n.a,{onChange:e=>{j({title:e})},onClearItem:()=>{j({title:""})},value:N.title,placeholder:"\u8bf7\u8f93\u5165",labelWidth:"0px",maxLength:20,height:"36px",countShow:!0,width:"520px",alignment:"left"},void 0,!1,{fileName:Dt,lineNumber:1146,columnNumber:13},void 0)},void 0,!1,{fileName:Dt,lineNumber:1145,columnNumber:11},void 0),Object(h.jsxDEV)(s.a,{labelname:"\u751f\u6548\u65f6\u95f4\u6bb5",prop:"date_time",children:Object(h.jsxDEV)(ee.a,{className:"zent-datepicker-plan",showTime:{format:"HH:mm:ss",defaultTime:["00:00:00","23:59:59"]},format:"YYYY-MM-DD HH:mm:ss",disabled:["2"!==b.KeyPcType&&(1===m.status||2===m.status||3===m.status||void 0),!1],value:N.date_time,onChange:e=>{(e=>{j({date_time:e}),sessionStorage.setItem("knockGold_effectDate",JSON.stringify({begin_time:e[0],end_time:e[1]}))})(e)},disabledTime:e=>{let t=JSON.parse(sessionStorage.getItem("knockGold_effectDate"));const i=new Date(t.begin_time),a=i.getHours(),s=i.getMinutes(),l=i.getSeconds();return Object(R.a)(e,i)?{disabledHours:()=>Et(a),disabledMinutes:e=>e===a?Et(s):[],disabledSeconds:(e,t)=>e===a&&t===s?Et(l):[]}:{}},disabledDate:(e,t)=>{let i=JSON.parse(sessionStorage.getItem("knockGold_effectDate")),a=!1,s=Y()(e).format("YYYY-MM-DD HH:mm:ss");const l=Y()(i.end_time).format("HH:mm:ss");return"start"==t&&(a=l<"23:59:59"?Y()(s).isBefore(i.begin_time)||Y()(s).subtract(1,"days").isAfter(i.end_time):Y()(s).isBefore(i.begin_time)||Y()(s).isAfter(i.end_time)),"end"==t&&(a=Y()(s).add(1,"days").isBefore(i.begin_time)||Y()(s).isAfter(i.end_time)),a}},void 0,!1,{fileName:Dt,lineNumber:1165,columnNumber:13},void 0)},void 0,!1,{fileName:Dt,lineNumber:1164,columnNumber:11},void 0)]},void 0,!0,{fileName:Dt,lineNumber:1112,columnNumber:9},void 0)},void 0,!1,{fileName:Dt,lineNumber:1111,columnNumber:7},void 0),Object(h.jsxDEV)(d.a,{style:{margin:"10px auto"},title:b.setup2_title,children:Object(h.jsxDEV)(l.a,{model:_,rules:St,ref:y,children:[Object(h.jsxDEV)(s.a,{labelname:"\u9762\u989d",prop:"full",myClassName:"sel1 coupon-form-box",children:Object(h.jsxDEV)(n.a,{onChange:e=>{x({full:e})},onClearItem:()=>{x({full:""})},value:_.full,placeholder:"\u8bf7\u8f93\u5165",labelWidth:"0px",maxLength:20,height:"36px",countShow:!1,width:"234px",alignment:"left",front:"\u6ee1",disabled:b.statusDisabled},void 0,!1,{fileName:Dt,lineNumber:1187,columnNumber:13},void 0)},void 0,!1,{fileName:Dt,lineNumber:1186,columnNumber:11},void 0),Object(h.jsxDEV)(s.a,{labelname:"",labelwidth:"0px",prop:"reduce",myClassName:"sel2",required:!1,children:Object(h.jsxDEV)(n.a,{onChange:e=>{x({reduce:e})},onClearItem:()=>{x({reduce:""})},value:_.reduce,placeholder:"\u8bf7\u8f93\u5165",labelWidth:"0px",maxLength:20,height:"36px",countShow:!1,width:"234px",alignment:"left",front:"\u51cf",unit:"\u5143",disabled:b.statusDisabled},void 0,!1,{fileName:Dt,lineNumber:1208,columnNumber:13},void 0)},void 0,!1,{fileName:Dt,lineNumber:1207,columnNumber:11},void 0),Object(h.jsxDEV)(s.a,{labelname:"\u53d1\u653e\u603b\u91cf",prop:"quantity",children:Object(h.jsxDEV)(n.a,{onChange:e=>{x({quantity:e})},onClearItem:()=>{x({quantity:""})},disabled:b.isQuantity||b.statusDisabled,value:_.quantity,placeholder:"\u8bf7\u8f93\u5165",labelWidth:"0px",maxLength:20,height:"36px",countShow:!1,width:"520px",alignment:"left",unit:"\u4e2a"},void 0,!1,{fileName:Dt,lineNumber:1230,columnNumber:13},void 0)},void 0,!1,{fileName:Dt,lineNumber:1229,columnNumber:11},void 0),Object(h.jsxDEV)(s.a,{labelname:"\u603b\u9884\u7b97",prop:"budget",children:Object(h.jsxDEV)(n.a,{disabled:!0,value:_.budget,placeholder:"\u8bf7\u8f93\u5165",labelWidth:"0px",maxLength:20,height:"36px",countShow:!1,width:"520px",alignment:"left",unit:"\u5143"},void 0,!1,{fileName:Dt,lineNumber:1252,columnNumber:13},void 0)},void 0,!1,{fileName:Dt,lineNumber:1251,columnNumber:11},void 0),Object(h.jsxDEV)(s.a,{labelname:"\u7ed1\u5b9a\u6570",prop:"restrict",children:Object(h.jsxDEV)(n.a,{onChange:e=>{x({restrict:e})},onClearItem:()=>{x({restrict:""})},value:_.restrict,placeholder:"\u8bf7\u8f93\u5165",labelWidth:"0px",maxLength:20,height:"36px",countShow:!1,width:"520px",alignment:"left",disabled:b.statusDisabled},void 0,!1,{fileName:Dt,lineNumber:1266,columnNumber:13},void 0)},void 0,!1,{fileName:Dt,lineNumber:1265,columnNumber:11},void 0)]},void 0,!0,{fileName:Dt,lineNumber:1185,columnNumber:9},void 0)},void 0,!1,{fileName:Dt,lineNumber:1184,columnNumber:7},void 0),Object(h.jsxDEV)(d.a,{style:{margin:"10px auto"},title:b.setup3_title,children:[Object(h.jsxDEV)(s.a,{labelname:"\u5546\u54c1\u8303\u56f4",prop:"rank",id:"rank",children:Object(h.jsxDEV)("div",{className:"goods-boxs",children:[Object(h.jsxDEV)(X.a,{options:b.rankOptions,multiple:!0,value:b.rank,placeholder:"\u9009\u62e9\u4e00\u9879",width:405,onChange:e=>{(e=>{let t=b.tableData.map((t=>(t.checked=e.findIndex((e=>e.key==t.product_id))>-1,t)));p({tableData:t,rank:e})})(e)}},void 0,!1,{fileName:Dt,lineNumber:1292,columnNumber:13},void 0),Object(h.jsxDEV)(u.a,{type:"primary",style:{marginLeft:"20px"},onClick:()=>{P("addProduct")},children:"\u65b0\u5efa\u5546\u54c1"},void 0,!1,{fileName:Dt,lineNumber:1302,columnNumber:13},void 0),Object(h.jsxDEV)(u.a,{type:"primary",style:{marginLeft:"20px"},onClick:()=>{P("addKnockGold")},disabled:!JSON.parse(sessionStorage.getItem("isEarlyWarningMan")),children:"\u65b0\u5efa\u7acb\u51cf\u91d1"},void 0,!1,{fileName:Dt,lineNumber:1311,columnNumber:13},void 0)]},void 0,!0,{fileName:Dt,lineNumber:1291,columnNumber:11},void 0)},void 0,!1,{fileName:Dt,lineNumber:1290,columnNumber:9},void 0),Object(h.jsxDEV)(s.a,{labelname:"",prop:"range",id:"range",children:Object(h.jsxDEV)(I,{headBackgroud:"#f9fafc",maxheight:200,isBorder:!0,spliteColor:"#fff",tableData:b.tableData,Column:Vt,countbarVisible:!1,isSwitch:!1,isShowPageBar:!1,page:b.page,ref:k,dataCount:b.dataCount,pageChange:e=>{},emptyText:"\u62b1\u6b49\uff0c\u6682\u65e0\u76f8\u5173\u6570\u636e\u8bb0\u5f55",countChange:e=>{},checkChange:e=>(e=>{let t=[];Object(f.a)(e,(e=>{let i={};return i.key=e.product_id,i.text=e.product_name,t.push(i),i})),p({rank:t})})(e),ComponentHandler:(e,t,i)=>"opearo"===e?Object(h.jsxDEV)("div",{children:Object(h.jsxDEV)("span",{className:"grid-link",onClick:()=>((e,t)=>{try{if(b.direct_reseller_id<=0)return void c.a.error("\u8bf7\u6dfb\u52a0\u6620\u5c04\u5206\u9500\u5546");if(H(),1===e.type){p({product_title:"\u7f16\u8f91\u5546\u54c1",scopePopType:"addProduct",table_index:t,checkedProduct:M(),productType:e.product_type});let i=sessionStorage.getItem("plan_status");"2"!==b.KeyPcType&&"0"!==i||delete e.code_batch_id,p({productData:e,showScopePop:!0})}else{let i=e.only;"2"===b.KeyPcType&&delete i.id,p({product_title:"\u7f16\u8f91\u7acb\u51cf\u91d1",productData:i,scopePopType:"addKnockGold",showScopePop:!0,table_index:t})}}catch(i){}})(t,i),children:"\u7f16\u8f91"},void 0,!1,{fileName:Dt,lineNumber:1346,columnNumber:21},void 0)},void 0,!1,{fileName:Dt,lineNumber:1345,columnNumber:19},void 0):"product_id"===e?Object(h.jsxDEV)("span",{children:"2"===b.KeyPcType&&2===t.type?"-":t.product_id},void 0,!1,{fileName:Dt,lineNumber:1355,columnNumber:19},void 0):"type"===e?Object(h.jsxDEV)("span",{children:1===t.type?"\u5546\u54c1":"\u7acb\u51cf\u91d1"},void 0,!1,{fileName:Dt,lineNumber:1362,columnNumber:24},void 0):void 0},void 0,!1,{fileName:Dt,lineNumber:1325,columnNumber:11},void 0)},void 0,!1,{fileName:Dt,lineNumber:1324,columnNumber:9},void 0)]},void 0,!0,{fileName:Dt,lineNumber:1289,columnNumber:7},void 0),0===i?Object(h.jsxDEV)("div",{className:"step-btn-group",children:[Object(h.jsxDEV)(u.a,{type:"primary",onClick:()=>S(),children:"\u63d0\u4ea4\u5ba1\u6838"},void 0,!1,{fileName:Dt,lineNumber:1371,columnNumber:11},void 0),Object(h.jsxDEV)(u.a,{type:"normal",onClick:()=>{G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:" \u662f\u5426\u8fd4\u56de?"},void 0,!1,{fileName:Dt,lineNumber:764,columnNumber:16},void 0),onConfirm:()=>{window.history.back()},onCancel(){},className:"questModal",parentComponent:void 0})},children:"\u53d6\u6d88"},void 0,!1,{fileName:Dt,lineNumber:1374,columnNumber:11},void 0)]},void 0,!0,{fileName:Dt,lineNumber:1370,columnNumber:9},void 0):null,b.examinePopShow?Object(h.jsxDEV)("div",{className:"audit",children:[Object(h.jsxDEV)("div",{className:"modal",children:" "},void 0,!1,{fileName:Dt,lineNumber:1059,columnNumber:9},void 0),Object(h.jsxDEV)("div",{className:"audit-box",style:{zIndex:99},children:[Object(h.jsxDEV)(g.a,{type:"close",className:"audit-close",onClick:e=>{p({examinePopShow:!1})}},void 0,!1,{fileName:Dt,lineNumber:1061,columnNumber:11},void 0),Object(h.jsxDEV)("div",{className:"audit-box-title",children:"\u63d0\u4ea4\u5ba1\u6838"},void 0,!1,{fileName:Dt,lineNumber:1070,columnNumber:11},void 0),Object(h.jsxDEV)("div",{className:"payType",children:Object(h.jsxDEV)(Q.a,{onChange:e=>{p({payType:e.target.value})},value:b.payType,className:"audit-obj",children:[Object(h.jsxDEV)(Z.a,{value:3,children:"\u9884\u4ed8\u6b3e\u6263\u9664"},void 0,!1,{fileName:Dt,lineNumber:1079,columnNumber:15},void 0),Object(h.jsxDEV)(Z.a,{value:1,children:"\u5bf9\u79c1\u8d26\u6237"},void 0,!1,{fileName:Dt,lineNumber:1080,columnNumber:15},void 0),Object(h.jsxDEV)(Z.a,{value:2,children:"\u5bf9\u516c\u8d26\u6237"},void 0,!1,{fileName:Dt,lineNumber:1081,columnNumber:15},void 0)]},void 0,!0,{fileName:Dt,lineNumber:1072,columnNumber:13},void 0)},void 0,!1,{fileName:Dt,lineNumber:1071,columnNumber:11},void 0),Object(h.jsxDEV)("div",{className:"audit-btn-group",children:[Object(h.jsxDEV)(u.a,{onClick:e=>{p({examinePopShow:!1})},children:"\u53d6\u6d88"},void 0,!1,{fileName:Dt,lineNumber:1085,columnNumber:13},void 0),Object(h.jsxDEV)(u.a,{type:"primary",loading:b.isLoadingBtn,onClick:e=>{(()=>{if(p({isLoadingBtn:!0}),"1"===b.KeyPcType){let e={payment_direction:b.payment_direction[b.payType-1],title:N.title,begin_time:N.date_time[0],end_time:N.date_time[1],new_product:{},update_product:{},delete_product:[]},t=b.tableData.filter((e=>e.checked&&1===e.type)),i=b.tableData.filter((e=>e.checked&&2===e.type));e.new_product.legal=t.filter((e=>e.checked&&!e.goods_id)),e.update_product.legal=t.filter((e=>e.checked&&e.goods_id)),e.new_product.reduce=i.filter((e=>e.checked&&!e.only.goods_id)).map((e=>e.only)),e.update_product.reduce=i.filter((e=>e.checked&&e.only.goods_id)).map((e=>e.only)),e.delete_product=b.tableData.filter((e=>!e.checked&&(e.goods_id||e.only))).map((e=>e.only?e.only.goods_id:e.goods_id)),Object(a.H)(m.id,e).then((e=>{Object(a.Tb)(e,((t,i)=>{c.a.success(e.message),setTimeout((()=>{p({isLoadingBtn:!1}),window.history.back()}),500)}),(e=>{p({isLoadingBtn:!1}),c.a.error(e)}))}))}else{let e={plan_id:N.plan_id.key.key,key_batch_id:N.key_batch_id.key,title:N.title,begin_time:N.date_time[0],end_time:N.date_time[1],full:_.full,reduce:_.reduce,quantity:_.quantity,budget:_.budget,restrict:_.restrict,payment_direction:"",product:{legal:[],reduce:[]}};e.payment_direction=b.payment_direction[b.payType-1];let t=b.tableData.filter((e=>e.checked));e.product.legal=t.filter((e=>1===e.type));let i=t.filter((e=>2===e.type));if(e.product.reduce=i.map((e=>({...e.only}))),"2"===b.KeyPcType&&(e.copy_code_batch_id=m.id,e.product.legal=e.product.legal.map((e=>(delete e.code_batch_id,delete e.goods_id,e))),e.product.reduce=e.product.reduce.map((e=>(delete e.goods_id,e)))),!1===(e.product.legal,!0))return void p({isLoadingBtn:!1});Object(a.a)(e).then((e=>{Object(a.Tb)(e,((t,i)=>{c.a.success(e.message),setTimeout((()=>{p({isLoadingBtn:!1}),window.history.back()}),500)}),(e=>{p({isLoadingBtn:!1}),c.a.error(e)}))}))}})()},children:"\u786e\u5b9a"},void 0,!1,{fileName:Dt,lineNumber:1094,columnNumber:13},void 0)]},void 0,!0,{fileName:Dt,lineNumber:1084,columnNumber:11},void 0)]},void 0,!0,{fileName:Dt,lineNumber:1060,columnNumber:9},void 0)]},void 0,!0,{fileName:Dt,lineNumber:1058,columnNumber:7},void 0):null,Object(h.jsxDEV)(Ot,{ref:O,product_title:b.product_title,drawerVisible:b.showScopePop,type:b.scopePopType,productData:b.productData,onClose:()=>{p({showScopePop:!1})},tableData:b.tableData,checkedProduct:b.checkedProduct,table_index:b.table_index,directResellerId:b.direct_reseller_id,productType:b.productType,isCoupon:!0,submit:e=>(e=>{try{let t=e,i=[];t.map((e=>{let t={};t.key=e.product_id,t.text=e.product_name,i.push(t)}));let a=[];t.map((e=>{let t={};e.checked&&(t.key=e.product_id,t.text=e.product_name,a.push(t))})),p({tableData:t,rankOptions:i,rank:a})}catch(t){}})(e)},void 0,!1,{fileName:Dt,lineNumber:1382,columnNumber:7},void 0)]},void 0,!0,{fileName:Dt,lineNumber:1110,columnNumber:5},void 0)})),Ct="/Users/zhangds/web/blue-brother/frontend/src/pages/coupon/addEdit/index.jsx";var Tt=()=>{const e=Object(r.useRef)(null),[t,i]=Object(W.a)({isShow:!1,editModel:"",direct_reseller_id:0,comType:0});return Object(r.useEffect)((()=>{const e=sessionStorage.getItem("code_id");e&&"undefined"!==e&&void 0!==e?Object(a.W)(e).then((e=>{Object(a.Tb)(e,((e,t)=>{i({editModel:e,isShow:!0})}))})):i({isShow:!0})}),[]),Object(h.jsxDEV)("div",{className:"coupon-add-edit",children:t.isShow?Object(h.jsxDEV)(wt,{couponType:0,editData:t.editModel,isAuditButton:!1,ref:e,direct_reseller_id:t.direct_reseller_id},void 0,!1,{fileName:Ct,lineNumber:32,columnNumber:9},void 0):null},void 0,!1,{fileName:Ct,lineNumber:30,columnNumber:5},void 0)},It=(i(218),"/Users/zhangds/web/blue-brother/frontend/src/components/tabPage/main.js");class Ft extends m.a.Component{constructor(e){super(e),this.state={activeIndex:0,tabList:e.tabs,width:e.width?e.width:220}}componentDidMount(){if(this.props.first){this.setState({activeIndex:0});let e=[];for(let t=0;t1&&this.props.tabChange(e)}render(){const{tabs:e}=this.props;return Object(h.jsxDEV)("div",{className:"tabpage",children:[Object(h.jsxDEV)("div",{className:"tabbar-group",children:[this.state.tabList.map(((e,t)=>Object(h.jsxDEV)("div",{className:e.className,style:{width:this.state.width},onClick:()=>{this.tabChange(t)},children:Object(h.jsxDEV)("div",{className:"tabbar-title",children:[" ",e.title," "]},void 0,!0,{fileName:It,lineNumber:69,columnNumber:17},this)},t,!1,{fileName:It,lineNumber:62,columnNumber:15},this))),Object(h.jsxDEV)("div",{className:"tabbar-slot",children:this.props.slot},void 0,!1,{fileName:It,lineNumber:74,columnNumber:11},this)]},void 0,!0,{fileName:It,lineNumber:59,columnNumber:9},this),Object(h.jsxDEV)("div",{className:"tab-body",children:this.props.children},void 0,!1,{fileName:It,lineNumber:76,columnNumber:9},this)]},void 0,!0,{fileName:It,lineNumber:58,columnNumber:7},this)}}var Lt=i(515),Ht=i(516),qt=i(470),Mt="/Users/zhangds/web/blue-brother/frontend/src/pages/coupon/commodity/index.jsx";const Pt=[{title:"\u5546\u54c1\u7f16\u53f7",name:"product_id",prop:"product_id",className:"name",type:"normal",width:"auto"},{title:"\u5546\u54c1\u540d\u79f0",prop:"product_name",name:"product_name",width:"200px",type:"normal"},{title:"\u7acb\u51cf\u91d1\u5e73\u53f0\u6279\u6b21\u53f7",width:"200px",prop:"channel_activity_id",name:"channel_activity_id",type:"normal"},{title:"\u4e0a\u6e38\u5e73\u53f0",width:"auto",prop:"upstream",name:"upstream",type:"normal"},{title:"\u5546\u54c1\u6743\u91cd",width:"auto",prop:"weight",name:"weight",type:"normal"},{title:"\u6709\u6548\u65f6\u95f4\u6bb5",width:"500px",prop:"effectDate",name:"effectDate",type:"normal"},{title:"\u5b98\u65b9\u4ef7\u683c",name:"official_price",prop:"official_price",type:"normal",width:"auto"},{title:"\u5408\u540c\u4ef7",name:"contract_price",type:"normal",prop:"contract_price",width:"auto"},{title:"\u521b\u5efa\u65f6\u95f4",name:"create_time",type:"normal",prop:"create_time",width:"250px"},{title:"\u7c7b\u578b",name:"product_type_text",type:"normal",prop:"product_type_text",width:"auto"},{title:"\u64cd\u4f5c",prop:"opearo",name:"opearo",type:"slot",width:"200px"}];var Bt=()=>{const[e,t]=Object(W.a)({tabList:[{title:"\u5546\u54c1\u8303\u56f4\u5217\u8868",index:0}],tableData:[],tableHeight:500,lodgingTable:!0,combinedValue:[],key_word:"",page:1,limit:10,total:0,isQuery:!1}),i=Object(r.useRef)(null),s=()=>{let i=(()=>{let t={key_word:e.key_word||null,code_batch_id:sessionStorage.getItem("code_id"),page:e.page,limit:e.limit};return t=Object(Lt.a)({...t},(e=>Object(Ht.a)(e)||Object(qt.a)(e))),t})();Object(a.R)(i).then((e=>{Object(a.Tb)(e,((e,i)=>{let a=[];e.data.map((e=>{1===e.type?(e.entity.upstream="\u76f4\u8fde\u5929\u4e0b",e.entity.only=e.entity.product_id,e.entity.id=e.id,e.entity.weight=e.weight,e.entity.all_budget=Number(e.entity.contract_price)*Number(e.entity.quantity),e.entity.type=1,a.push(e.entity)):2===e.type&&a.push({product_id:e.entity.goods_id,product_type_text:"\u7acb\u51cf\u91d1",only:e.entity.channel_activity_id,id:e.id,upstream:P(e.entity.channel),code_batch_id:e.code_batch_id,contract_price:e.entity.price,create_time:e.create_time,official_price:e.entity.reduce_amount,channel_activity_id:e.entity.channel_activity_id,product_name:e.entity.batch_goods_name,quantity:e.stock,weight:e.weight,effectDate:e.entity.time_limit.effect_time.start_time+" \u81f3 "+e.entity.time_limit.effect_time.end_time})})),t({tableData:a})}))}))};Object(r.useEffect)((()=>{s()}),[e.isQuery]);return Object(h.jsxDEV)("div",{className:"table-box-app",children:[Object(h.jsxDEV)(Ft,{tabs:e.tabList,tabChange:i=>(i=>{t({page:1,limit:10,status:i,isQuery:!e.isQuery})})(i)},void 0,!1,{fileName:Mt,lineNumber:219,columnNumber:7},void 0),Object(h.jsxDEV)("div",{className:"query-box",children:[Object(h.jsxDEV)("div",{},void 0,!1,{fileName:Mt,lineNumber:221,columnNumber:9},void 0),Object(h.jsxDEV)(n.a,{onChange:e=>t({key_word:e}),value:e.key_word,wordSearch:()=>s(),icon:"search",placeholder:"\u8bf7\u8f93\u5165\u5546\u54c1\u540d\u79f0\u8fdb\u884c\u5339\u914d\u67e5\u8be2",countShow:!1,height:"36px",width:"260px",onClearItem:i=>t({key_word:"",isQuery:!e.isQuery}),alignment:"left"},void 0,!1,{fileName:Mt,lineNumber:222,columnNumber:9},void 0)]},void 0,!0,{fileName:Mt,lineNumber:220,columnNumber:7},void 0),Object(h.jsxDEV)(I,{spliteColor:"#fff",tableData:e.tableData,Column:Pt,maxheight:e.tableHeight,isSwitch:!1,isShowPageBar:!1,countbarVisible:!1,page:e.page,ref:i,dataCount:e.total,pageChange:i=>{t({page:i,isQuery:!e.isQuery})},emptyText:e.lodgingTable?"\u62b1\u6b49\uff0c\u6682\u65e0\u76f8\u5173\u6570\u636e\u8bb0\u5f55":"\u67e5\u8be2 \u8bf7\u8f93\u5165\u3010\u5206\u9500\u5546\u3011\u6216\u3010\u8ba1\u5212\u540d\u79f0\u3011\u6216\u3010key\u3011\u8fdb\u884c\u67e5\u8be2",countChange:i=>{t({limit:i,isQuery:!e.isQuery})},ComponentHandler:(i,s)=>"dates"===i?Object(h.jsxDEV)("span",{children:[s.begin_time," \u81f3 ",s.end_time]},void 0,!0,{fileName:Mt,lineNumber:256,columnNumber:15},void 0):"opearo"===i?Object(h.jsxDEV)("div",{children:Object(h.jsxDEV)("span",{style:{color:"red"},className:"grid-link",onClick:()=>{return i=s,void G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:"\u4f60\u786e\u5b9a\u8981\u5220\u9664\u6539\u6761\u6570\u636e?"},void 0,!1,{fileName:Mt,lineNumber:193,columnNumber:16},void 0),onConfirm(){Object(a.E)(i.id).then((i=>{Object(a.Tb)(i,((i,a)=>{c.a.clear(),c.a.success(a),t({isQuery:!e.isQuery})}),(e=>{c.a.error(e)}))})).catch((e=>{}))},onCancel(){},className:"questModal",parentComponent:void 0});var i},children:"\u5220\u9664"},void 0,!1,{fileName:Mt,lineNumber:265,columnNumber:17},void 0)},void 0,!1,{fileName:Mt,lineNumber:264,columnNumber:15},void 0):void 0},void 0,!1,{fileName:Mt,lineNumber:235,columnNumber:7},void 0)]},void 0,!0,{fileName:Mt,lineNumber:218,columnNumber:5},void 0)};var At={exchangeStatus(e){switch(e){case 0:return"\u672a\u5f00\u59cb";case 1:return"\u8fdb\u884c\u4e2d";case-1:return"\u6682\u505c";case 2:return"\u5df2\u7ed3\u675f";case 5:return"\u5df2\u4f5c\u5e9f"}},exchangeStatusBg(e){switch(e){case 0:return"#BFBFBF";case 1:return"#3575C7";case-1:return"#F6C041";case 2:return"#43A65D";case 5:return"#DC4F40"}},orderStatus(e){switch(e){case 0:return"\u5f85\u652f\u4ed8";case 1:return"\u5145\u503c\u4e2d";case 2:return"\u5df2\u5b8c\u6210";case 3:return"\u5145\u503c\u5931\u8d25"}},orderStatusBg(e){if(1===e.status&&2===e.type)return"#43A65D";switch(e.status){case 0:case 1:return"#3575C7";case 2:return"#43A65D";case 3:return"#ff0000";case 4:return"#c9c9c9";case 5:case 6:return"#ca6b61";case 7:return"#9655b4";case 8:return"#9f19dd";default:return"transparent"}},orderPayStatusBg(e){switch(e){case 1:return"#3575C7";case 2:return"#43A65D";case 3:return"#ff0000";default:return"transparent"}},orderVoucherStatusBg(e){switch(e){case 1:case 5:case 6:return"#3575C7";case 2:return"#43A65D";case 3:return"#ff0000";case 4:return"#0026ff";case 7:return"#9655b4";case 8:return"#9f19dd";default:return"transparent"}},planStatus(e){switch(e){case 0:return"\u521b\u5efa\u4e2d";case 2:return"\u5ba1\u6838\u4e2d";case 3:return"\u5f85\u751f\u6548";case 4:return"\u8fdb\u884c\u4e2d";case 5:return"\u6682\u505c\u4e2d";case 6:return"\u5df2\u5b8c\u7ed3";case 7:return"\u672a\u901a\u8fc7"}},planStatusBg(e){switch(e){case 0:return"#BFBFBF";case 2:return"#ffaa00";case 3:return"#3575C7";case 4:return"#55ff7f";case 5:return"#55aaff";case 6:return"#e64c00";case 7:return"#b6bcb8"}},keyStatus(e){switch(e){case 1:return"\u5f85\u4f7f\u7528";case 2:return"\u5df2\u4f7f\u7528";case 3:return"\u5df2\u5931\u6548";case 4:return"\u5df2\u4f5c\u5e9f";case 5:return"\u4f7f\u7528\u9501\u5b9a\u4e2d"}},keyStatusBg(e){switch(e){case 1:return"#BFBFBF";case 2:return"#43A65D";case 3:return"#ffaa00";case 4:return"#e64c00";case 5:return"#3575C7"}},pageStatus(e){switch(e){case 1:return"H5";case 2:return"\u5fae\u4fe1";case 4:return"\u652f\u4ed8\u5b9d"}},pageStatusBg(e){switch(e){case 1:return"#ffaa00";case 2:return"#55ff7f";case 4:return"#55aaff"}},pageTypeStatus(e){switch(e){case 3:return"\u5151\u6362\u7801";case 1:return"\u767d\u540d\u5355";case 2:return"\u7acb\u51cf\u91d1";case 4:return"\u4f18\u60e0\u5238";case 8:return"\u4f18\u60e0\u5238\u767d\u540d\u5355"}},pageTypeStatusBg(e){switch(e){case 1:return"#ffaa00";case 2:return"#e64c00";case 3:return"#55aaff";case 4:return"#79AF83";case 8:return"#F2A505"}},keysStatus(e){switch(e){case 1:return"\u521b\u5efa\u4e2d";case 2:return"\u5ba1\u6838\u4e2d";case 4:return"\u8fdb\u884c\u4e2d";case 5:return"\u5df2\u6682\u505c";case 6:return"\u5df2\u5b8c\u7ed3";case 7:return"\u5df2\u4f5c\u5e9f";case 8:return"\u5ba1\u6279\u9a73\u56de"}},keysStatusBg(e){switch(e){case 1:return"#ffaa00";case 2:return"#55ff7f";case 5:case 8:return"#e64c00";case 4:return"#55aaff";case 6:return"#555500";case 7:return"#3575C7"}}},zt=i(5),Jt=i(495);i(219);const Ut=(e,t=3)=>new Promise((async(i,s)=>{let l=null;l=1===t?await Object(a.Sc)(e):2===t?await Object(a.Tc)(e):await Object(a.Uc)(e),200===l.code?!0===l.data.have?G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:["\u8be5key\u6279\u6b21(key\u3001\u5151\u6362\u7801)\uff0c\u4e0b\u9762\u6709",l.data.order.status_text,"\u8ba2\u5355\uff0c\u662f\u5426\u7ee7\u7eed\u4f5c\u5e9f \uff1f"]},void 0,!0,{fileName:"/Users/zhangds/web/blue-brother/frontend/src/tools/apiTools.js",lineNumber:34,columnNumber:13},void 0),onConfirm(){i(2)},onCancel(){i(0)},className:"questModal",parentComponent:void 0}):i(1):s(l)}));var Wt="/Users/zhangds/web/blue-brother/frontend/src/pages/coupon/list/index.jsx";const Rt=[{title:"\u4f18\u60e0\u5238-\u6279\u6b21ID",name:"id",prop:"id",type:"normal",width:"auto"},{title:"\u4f18\u60e0\u5238\u6279\u6b21\u540d\u79f0",width:"auto",type:"slot",prop:"title",name:"title"},{title:"\u6709\u6548\u671f",type:"slot",prop:"dates",name:"dates",width:"250px"},{title:"\u5f52\u5c5e\u8425\u9500\u8ba1\u5212\u540d\u79f0",width:"auto",type:"normal",prop:"plan_title",name:"plan_title"},{title:"\u5f52\u5c5ekey\u6279\u6b21id",width:"auto",type:"normal",prop:"key_batch_id",name:"key_batch_id"},{title:"\u542f\u7528/\u6682\u505c",width:"auto",type:"slot",prop:"switch"},{title:"\u64cd\u4f5c",prop:"opearo",name:"opearo",type:"slot",width:"250px"},{title:"\u72b6\u6001",width:"auto",type:"slot",prop:"status",name:"status"},{title:"\u5238\u603b\u6570(\u5df2\u53d1\u653e)",width:"auto",type:"normal",prop:"quantity",name:"quantity"},{title:"\u5df2\u9886\u53d6",width:"auto",type:"normal",prop:"received",name:"received"},{title:"\u5df2\u4f7f\u7528",width:"auto",type:"normal",prop:"usage",name:"usage"},{title:"\u5269\u4f59\u6570",width:"auto",type:"normal",prop:"stock",name:"stock"},{title:"\u5df2\u5931\u6548",width:"auto",type:"normal",prop:"expired",name:"expired"},{title:"\u5df2\u4f5c\u5e9f",width:"auto",type:"normal",prop:"invalid",name:"invalid"}];var Kt=()=>{const[e,t]=Object(W.a)({tabList:[{title:"\u5168\u90e8",index:0},{title:"\u521b\u5efa\u4e2d",index:-1},{title:"\u672a\u5f00\u59cb",index:3},{title:"\u5ba1\u6838\u4e2d",index:6},{title:"\u672a\u901a\u8fc7",index:7},{title:"\u8fdb\u884c\u4e2d",index:1},{title:"\u751f\u6210\u4e2d",index:8},{title:"\u6682\u505c\u4e2d",index:2},{title:"\u5df2\u7ed3\u675f",index:4},{title:"\u5df2\u4f5c\u5e9f",index:5}],tableData:[],tableHeight:500,lodgingTable:!0,search:{plan_title:"",key_batch_id:"",code_batch_id:"",code_batch_name:""},planOptions:[],combinedValue:[],begin_time:"",end_time:"",status:"",page:1,limit:10,total:0,isQuery:!1}),i=Object(r.useRef)(null),o=Object(zt.f)(),m=()=>{let i=(()=>{var t;const i=Object(de.a)(e.search);i.plan_title=(null===(t=i.plan_title)||void 0===t?void 0:t.text)||"";let a={...i,begin_time:e.begin_time||null,end_time:e.end_time||null,status:999!==e.status&&""!==e.status?e.status:null,page:e.page,limit:e.limit};return a=Object(Lt.a)({...a},(e=>Object(Ht.a)(e)||Object(qt.a)(e))),a})();Object(a.X)(i).then((e=>{Object(a.Tb)(e,((e,i)=>{t({page:e.page,total:e.total,tableData:e.data})}))}))};function d(i,a){const s=e.search;s[i]=a,t({search:s})}Object(r.useEffect)((()=>{Object(a.rb)().then((e=>Object(a.Tb)(e,((e,i)=>{const a=e.map((e=>({key:e.id,text:e.title})));t({planOptions:a})}),(e=>{}))))}),[]),Object(r.useEffect)((()=>{m()}),[e.isQuery]);const b=(e,t)=>{let i="3";sessionStorage.setItem("knockGold_effectDate",JSON.stringify({}));let a=[{pagetitle:"\u65b0\u5efa\u5151\u6362\u7801",items:[{path:"/home/coupon-list",name:"\u4f18\u60e0\u5238\u7ba1\u7406"},{path:"/home/coupon-add-edit",name:"\u65b0\u5efa\u4f18\u60e0\u5238"}]}];1===e?(a[0].pagetitle="\u590d\u5236",a[0].items[1].name=`\u590d\u5236:${t.title}`,sessionStorage.setItem("knockGold_effectDate",JSON.stringify(t.keyBatch.plan)),sessionStorage.setItem("keyBatch_id",t.key_batch_id),i="2"):2===e?(a[0].pagetitle="\u7f16\u8f91",a[0].items[1].name=`\u7f16\u8f91:${t.title}`,sessionStorage.setItem("approval_id",t.approval_id),sessionStorage.setItem("approval_status",t.status),sessionStorage.setItem("knockGold_effectDate",JSON.stringify(t.keyBatch.plan)),i="1"):(i="3",sessionStorage.setItem("knockGold_effectDate","")),sessionStorage.setItem("code_id",null===t||void 0===t?void 0:t.id),sessionStorage.setItem("breaknav",JSON.stringify(a)),sessionStorage.setItem("pathname2","/home/coupon-add-edit"),sessionStorage.setItem("keyType","2"),sessionStorage.setItem("KeyPcType",i),o.push("/home/coupon-add-edit")},p=i=>{Object(a.s)(i).then((i=>{Object(a.Tb)(i,((i,a)=>{c.a.clear(),c.a.success(a),t({isQuery:!e.isQuery})}),(e=>{c.a.error(e)}))})).catch((e=>{}))},N=(i,s)=>{switch(i){case 1:return[4,5,6,8].includes(s.status)?Object(h.jsxDEV)("span",{style:{color:"#d8dbdd"},className:"grid-link",children:"\u7f16\u8f91"},void 0,!1,{fileName:Wt,lineNumber:469,columnNumber:13},void 0):Object(h.jsxDEV)("span",{className:"grid-link",onClick:e=>b(2,s),children:"\u7f16\u8f91"},void 0,!1,{fileName:Wt,lineNumber:475,columnNumber:13},void 0);case 2:let i="";return i=[1,2,3].includes(s.status)||[4,5].includes(s.status)&&[4,5,8].includes(s.keyBatch.status)&&[3,5,4].includes(s.keyBatch.plan.status)?Object(h.jsxDEV)("span",{className:"grid-link",style:{},onClick:e=>b(1,s),children:"\u590d\u5236"},void 0,!1,{fileName:Wt,lineNumber:494,columnNumber:13},void 0):Object(h.jsxDEV)("span",{style:{paddingRight:"10px",color:"#d8dbdd"},children:"\u590d\u5236"},void 0,!1,{fileName:Wt,lineNumber:500,columnNumber:13},void 0),i;case 3:return-1===s.status||7===s.status&&-1===s.old_status?Object(h.jsxDEV)("span",{className:"grid-link",style:{color:"red"},onClick:()=>{return i=s,void G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:"\u4f60\u786e\u5b9a\u8981\u5220\u9664\u8be5\u6761\u6570\u636e?"},void 0,!1,{fileName:Wt,lineNumber:396,columnNumber:16},void 0),onConfirm:()=>{Object(a.C)(i.id).then((i=>{Object(a.Tb)(i,((i,a)=>{c.a.clear(),c.a.success(a),t({isQuery:!e.isQuery})}),(e=>{c.a.error(e)}))}))},onCancel(){},className:"questModal",parentComponent:void 0});var i},children:"\u5220\u9664"},void 0,!1,{fileName:Wt,lineNumber:515,columnNumber:13},void 0):[1,2,3].includes(s.old_status)?1===s.approval_status?Object(h.jsxDEV)("span",{style:{paddingRight:"10px",color:"#d8dbdd"},children:"\u4f5c\u5e9f"},void 0,!1,{fileName:Wt,lineNumber:529,columnNumber:15},void 0):Object(h.jsxDEV)("span",{className:"grid-link",onClick:e=>((e,t)=>{if(6==t.status)return void c.a.error("\u5ba1\u6838\u4e2d\u7684\u6570\u636e\u4e0d\u5141\u8bb8\u4f5c\u5e9f");let i={type:3,object_value:t.id};try{Ut(i).then((e=>{2===e?p(t.id):1===e&&G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:["\u786e\u5b9a\u4f5c\u5e9f",t.title,"\uff1f"]},void 0,!0,{fileName:Wt,lineNumber:375,columnNumber:22},void 0),onConfirm(){p(t.id)},onCancel(){},className:"questModal",parentComponent:void 0})}))}catch(a){}})(0,s),children:"\u4f5c\u5e9f"},void 0,!1,{fileName:Wt,lineNumber:540,columnNumber:13},void 0):Object(h.jsxDEV)("span",{style:{paddingRight:"10px",color:"#d8dbdd"},children:"\u4f5c\u5e9f"},void 0,!1,{fileName:Wt,lineNumber:546,columnNumber:13},void 0);case 4:return 6===s.status&&Number(s.approval_id)>0?Object(h.jsxDEV)("span",{className:"grid-link",onClick:e=>j(e,s),children:"\u64a4\u9500\u5ba1\u6279"},void 0,!1,{fileName:Wt,lineNumber:560,columnNumber:13},void 0):Object(h.jsxDEV)("span",{style:{color:"#d8dbdd"},children:"\u64a4\u9500\u5ba1\u6279"},void 0,!1,{fileName:Wt,lineNumber:565,columnNumber:18},void 0);default:return}},j=(i,s)=>{let l=s.approval_id;G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:"\u8be5\u6570\u636e\u6b63\u5728\u5ba1\u6279\u4e2d,\u662f\u5426\u786e\u8ba4\u64a4\u9500\u5ba1\u6279\uff1f"},void 0,!1,{fileName:Wt,lineNumber:579,columnNumber:16},void 0),onConfirm:()=>{Object(a.bd)(l).then((i=>{Object(a.Tb)(i,((i,a)=>{c.a.success("\u64a4\u9500\u5ba1\u6279\u6210\u529f"),setTimeout((()=>{t({isQuery:!e.isQuery})}),3e3)}),(e=>{c.a.error(e)}))}))},onCancel:()=>{},className:"questModal",parentComponent:void 0})},g=Object(h.jsxDEV)(Jt.a,{className:"zent-datepicker-demo",value:e.combinedValue,showTime:{format:"HH:mm:ss",defaultTime:["00:00:00","23:59:59"]},format:"YYYY-MM-DD HH:mm:ss",onChange:i=>(i=>{if(i[0]){if(Y()(i[1]).diff(Y()(i[0]),"years")>2)return void c.a.error("\u67e5\u8be2\u65f6\u95f4\u4e0d\u80fd\u8d85\u8fc73\u5e74");t({begin_time:i[0],end_time:i[1],isQuery:!e.isQuery,combinedValue:i})}else t({combinedValue:i,begin_time:"",end_time:"",isQuery:!e.isQuery})})(i)},void 0,!1,{fileName:Wt,lineNumber:622,columnNumber:5},void 0);return Object(h.jsxDEV)("div",{className:"table-box-app",children:[Object(h.jsxDEV)(Ft,{tabs:e.tabList,tabChange:i=>(i=>{let a=e.tabList[i].index;t({page:1,limit:10,status:a,isQuery:!e.isQuery})})(i),width:130,first:!0,slot:g},void 0,!1,{fileName:Wt,lineNumber:635,columnNumber:7},void 0),Object(h.jsxDEV)("div",{className:"query-box",children:[Object(h.jsxDEV)(u.a,{type:"primary",icon:"plus",onClick:()=>b(),children:"\u65b0\u589e\u4f18\u60e0\u5238"},void 0,!1,{fileName:Wt,lineNumber:643,columnNumber:9},void 0),Object(h.jsxDEV)("div",{className:"codesFind",children:Object(h.jsxDEV)(l.a,{children:[Object(h.jsxDEV)(s.a,{labelname:"\u8ba1\u5212\u540d\u79f0\uff1a",required:"",labelwidth:"90px",children:Object(h.jsxDEV)(X.a,{name:"state",value:e.search.plan_title,options:e.planOptions,placeholder:"\u8bf7\u8f93\u5165",width:204,clearable:!0,onChange:e=>{d("plan_title",e)}},void 0,!1,{fileName:Wt,lineNumber:649,columnNumber:15},void 0)},void 0,!1,{fileName:Wt,lineNumber:648,columnNumber:13},void 0),Object(h.jsxDEV)(s.a,{labelname:"key\u6279\u6b21ID\uff1a",required:"",labelwidth:"100px",children:Object(h.jsxDEV)(n.a,{value:e.search.key_batch_id,countShow:!1,labelWidth:"0px",placeholder:"\u8bf7\u8f93\u5165",width:204,onChange:e=>{d("key_batch_id",e)},onClearItem:e=>{d("key_batch_id","")}},void 0,!1,{fileName:Wt,lineNumber:662,columnNumber:15},void 0)},void 0,!1,{fileName:Wt,lineNumber:661,columnNumber:13},void 0),Object(h.jsxDEV)(s.a,{labelname:"\u4f18\u60e0\u5238\u6279\u6b21\u540d\u79f0\uff1a",required:"",labelwidth:"155px",children:Object(h.jsxDEV)(n.a,{value:e.search.code_batch_name,countShow:!1,labelWidth:"0px",placeholder:"\u8bf7\u8f93\u5165",width:204,onChange:e=>{d("code_batch_name",e)},onClearItem:e=>{d("code_batch_name","")}},void 0,!1,{fileName:Wt,lineNumber:677,columnNumber:15},void 0)},void 0,!1,{fileName:Wt,lineNumber:676,columnNumber:13},void 0),Object(h.jsxDEV)(s.a,{labelname:"\u4f18\u60e0\u5238\u6279\u6b21ID\uff1a",required:"",labelwidth:"130px",children:Object(h.jsxDEV)(n.a,{value:e.search.code_batch_id,countShow:!1,labelWidth:"0px",placeholder:"\u8bf7\u8f93\u5165",width:204,onChange:e=>{d("code_batch_id",e)},onClearItem:e=>{d("code_batch_id","")}},void 0,!1,{fileName:Wt,lineNumber:692,columnNumber:15},void 0)},void 0,!1,{fileName:Wt,lineNumber:691,columnNumber:13},void 0),Object(h.jsxDEV)("div",{className:"button_box",children:[Object(h.jsxDEV)(u.a,{type:"primary",onClick:()=>m(),children:"\u67e5\u8be2"},void 0,!1,{fileName:Wt,lineNumber:707,columnNumber:15},void 0),Object(h.jsxDEV)(u.a,{onClick:()=>{t({search:{plan_title:"",key_batch_id:"",code_batch_id:"",code_batch_name:""},isQuery:!e.isQuery})},children:"\u91cd\u7f6e"},void 0,!1,{fileName:Wt,lineNumber:710,columnNumber:15},void 0)]},void 0,!0,{fileName:Wt,lineNumber:706,columnNumber:13},void 0)]},void 0,!0,{fileName:Wt,lineNumber:647,columnNumber:11},void 0)},void 0,!1,{fileName:Wt,lineNumber:646,columnNumber:9},void 0)]},void 0,!0,{fileName:Wt,lineNumber:642,columnNumber:7},void 0),Object(h.jsxDEV)(I,{spliteColor:"#fff",tableData:e.tableData,Column:Rt,maxheight:e.tableHeight,isSwitch:!1,isMultiple:!1,countbarVisible:!1,page:e.page,ref:i,dataCount:e.total,pageChange:i=>{t({page:i,isQuery:!e.isQuery})},emptyText:e.lodgingTable?"\u62b1\u6b49\uff0c\u6682\u65e0\u76f8\u5173\u6570\u636e\u8bb0\u5f55":"\u67e5\u8be2 \u8bf7\u8f93\u5165\u3010\u5206\u9500\u5546\u3011\u6216\u3010\u8ba1\u5212\u540d\u79f0\u3011\u6216\u3010key\u3011\u8fdb\u884c\u67e5\u8be2",countChange:i=>{t({limit:i,isQuery:!e.isQuery})},ComponentHandler:(i,s)=>"title"===i?Object(h.jsxDEV)("span",{className:"grid-link",onClick:e=>((e,t)=>{sessionStorage.setItem("pathname2","/home/coupon-commodity");let i=[{pagetitle:"\u7f16\u8f91",items:[{path:"/home/coupon-list",name:"\u4f18\u60e0\u5238\u7ba1\u7406"},{path:"/home/coupon-add-edit",name:t.title+"\u4f18\u60e0\u5238\u7684\u5546\u54c1\u8303\u56f4\u5217\u8868"}]}];sessionStorage.setItem("code_id",t.id),sessionStorage.setItem("breaknav",JSON.stringify(i)),window.open("#/home/coupon-commodity")})(0,s),children:s.title},void 0,!1,{fileName:Wt,lineNumber:742,columnNumber:15},void 0):"dates"===i?Object(h.jsxDEV)("span",{children:[s.begin_time," \u81f3 ",s.end_time]},void 0,!0,{fileName:Wt,lineNumber:749,columnNumber:15},void 0):"switch"==i?Object(h.jsxDEV)(v.a,{size:"small",checked:2!=s.old_status,onChange:i=>{return l=s,void G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:["\u662f\u5426",2==l.old_status?"\u542f\u7528":"\u505c\u7528","\u8be5\u4f18\u60e0\u5238\u6279\u6b21\uff1f"]},void 0,!0,{fileName:Wt,lineNumber:425,columnNumber:16},void 0),onConfirm:()=>{Object(a.yc)(l.id,{operation:1==l.old_status?"2":"1"}).then((i=>{Object(a.Tb)(i,((i,a)=>{c.a.clear(),c.a.success(a),t({isQuery:!e.isQuery})}),(e=>{c.a.error(e)}))})).catch((e=>{}))},onCancel(){},className:"questModal",parentComponent:void 0});var l},disabled:4==s.status||5==s.status},void 0,!1,{fileName:Wt,lineNumber:757,columnNumber:15},void 0):"status"==i?Object(h.jsxDEV)("p",{className:"dflexa",children:Object(h.jsxDEV)("span",{children:[Object(h.jsxDEV)("font",{className:"icon",style:{background:At.exchangeStatusBg(parseInt(s.status))}},void 0,!1,{fileName:Wt,lineNumber:770,columnNumber:19},void 0),s.status_text]},void 0,!0,{fileName:Wt,lineNumber:769,columnNumber:17},void 0)},void 0,!1,{fileName:Wt,lineNumber:768,columnNumber:15},void 0):"opearo"==i?Object(h.jsxDEV)("div",{children:[N(1,s),N(2,s),N(3,s),s.approval_id&&6===s.status?Object(h.jsxDEV)("span",{className:"grid-link",onClick:i=>{return l=s.approval_id,void Object(a.G)(l).then((i=>{Object(a.Tb)(i,((i,a)=>{c.a.success(a),t({isQuery:!e.isQuery})}),(e=>{c.a.error(e)}))}));var l},children:"\u9489\u9489\u5ba1\u6279\u67e5\u8be2"},void 0,!1,{fileName:Wt,lineNumber:789,columnNumber:19},void 0):Object(h.jsxDEV)("span",{className:"grid-link disabled",children:"\u9489\u9489\u5ba1\u6279\u67e5\u8be2"},void 0,!1,{fileName:Wt,lineNumber:793,columnNumber:19},void 0),N(4,s)]},void 0,!0,{fileName:Wt,lineNumber:784,columnNumber:15},void 0):void 0},void 0,!1,{fileName:Wt,lineNumber:721,columnNumber:7},void 0)]},void 0,!0,{fileName:Wt,lineNumber:634,columnNumber:5},void 0)},Yt=(i(36),i(220),i(500)),$t=i(69),Gt=i(471),Qt=i(343),Zt=(i(221),"/Users/zhangds/web/blue-brother/frontend/src/components/UseLazyLoadingSelect/index.js");var Xt=({options:e,clearable:t=!1,placeholder:i="\u8bf7\u8f93\u5165",value:a,onChange:s,width:l,onChangePage:n,disabled:o=!1,onKeywordChange:m,keyword:c=""})=>{let d=!0;const[u,b]=Object(r.useState)(!0),[p,N]=Object(r.useState)(!1),j=e=>{setTimeout((()=>{n(e)}),2e3)};return Object(h.jsxDEV)("div",{children:Object(h.jsxDEV)(X.a,{options:e,placeholder:i,value:a,onChange:s,width:l,loading:u,open:p,disabled:o,onOpenChange:e=>{N(e),e&&d&&(d=!1,b(!0),setTimeout((()=>{b(!1)}),2e3))},renderOptionList:(e,t)=>Object(h.jsxDEV)(Gt.a,{hasMore:!0,skipLoadOnMount:!0,loadMore:j,className:"infinite-scroller-demo",loader:Object(h.jsxDEV)("div",{className:"loading-text",children:Object(h.jsxDEV)(Qt.a,{iconSize:18,loading:!0,icon:"circle",iconText:"\u52a0\u8f7d\u4e2d\u2026",textPosition:"right",colorPreset:"grey"},void 0,!1,{fileName:Zt,lineNumber:50,columnNumber:13},void 0)},void 0,!1,{fileName:Zt,lineNumber:49,columnNumber:11},void 0),children:e.map(((e,i)=>t(e,i)))},void 0,!1,{fileName:Zt,lineNumber:43,columnNumber:7},void 0),onKeywordChange:m,keyword:c},void 0,!1,{fileName:Zt,lineNumber:67,columnNumber:7},void 0)},void 0,!1,{fileName:Zt,lineNumber:66,columnNumber:5},void 0)},ei="/Users/zhangds/web/blue-brother/frontend/src/pages/distributor/adddistributorinfo/adddistributorinfo.js";const ti=[{type:"required",message:"\u8bf7\u8f93\u5165\u8054\u7cfb\u4eba\u624b\u673a\u53f7"},{type:"regExp",message:"\u624b\u673a\u53f7\u683c\u5f0f\u4e0d\u5bf9",reg:/^[1][3,4,5,6,7,8,9][0-9]{9}$/}],ii=[{type:"required",message:"\u8bf7\u8f93\u5165\u8054\u7cfb\u4eba\u90ae\u7bb1"}];class ai extends m.a.Component{constructor(e){super(e),this.onUploadError=(e,t)=>{"overMaxAmount"===e?(c.a.clear(),c.a.error(`\u6700\u591a\u53ef\u4e0a\u4f20 ${t.maxAmount} \u5f20\u56fe\u7247`)):"overMaxSize"===e&&(c.a.clear(),c.a.error(`\u56fe\u7247\u5927\u5c0f\u4e0d\u80fd\u8d85\u8fc7 ${t.formattedMaxSize}b`))},this.state={phone_nums:1,id:"",headImg:"",uploadimgFile:"",email_nums:1,disabled:!1,pwdtype:"text",phoneSwitch:[!1,!1,!1,!1],emailSwitch:[!1,!1,!1,!1],defaultFileList:[{src:""}],isSelectDirect:!1,model:{name:"",account:"",password:"",subject:"",contact_name:"",contact_phone:"",contact_email:"",salesman_id:"",company_id:"",identity_type:"",phone1:"",phone2:"",phone3:"",phone4:"",email1:"",email2:"",email3:"",email4:"",direct_reseller_id:""},rules:{fullname:[{type:"required",message:"\u8bf7\u8f93\u5165\u5206\u9500\u5546\u5168\u79f0"}],subject:[{type:"required",message:"\u8bf7\u8f93\u5165\u5206\u9500\u5546\u4e3b\u4f53"}],account:[{type:"required",message:"\u8bf7\u8f93\u5165\u767b\u5f55\u8d26\u53f7"}],pwd:[{type:"required",message:"\u8bf7\u8f93\u5165\u5bc6\u7801"},{type:"regExp",message:"6-16\u4f4d\u5b57\u7b26,\u6570\u5b57+\u5b57\u6bcd\u7ec4\u6210\uff0c(\u5b57\u6bcd\u533a\u5206\u5927\u5c0f\u5199)",reg:/^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,16}$/}],contacts:[{type:"required",message:"\u8bf7\u8f93\u5165\u8054\u7cfb\u4eba"},{type:"regExp",message:"2-16\u5b57\u6c49\u5b57/\u5b57\u6bcd\u7ec4\u6210",reg:/^([\u4e00-\u9fa5]|[a-zA-Z]){2,16}$/}],contacts_phone:ti,contacts_email:[{type:"required",message:"\u8bf7\u8f93\u5165\u8054\u7cfb\u4eba\u90ae\u7bb1"}],sale:[{type:"required",message:"\u8bf7\u9009\u62e9\u9500\u552e\u4eba\u5458"}],identity:[{type:"required",message:"\u8bf7\u9009\u62e9\u8eab\u4efd\u7c7b\u578b"}],sign:[{type:"required",message:"\u8bf7\u9009\u62e9\u7b7e\u7ea6\u516c\u53f8"}],phone1:ti,phone2:ti,phone3:ti,phone4:ti,email1:ii,email2:ii,email3:ii,email4:ii,direct_reseller_id:[{type:"required",message:"\u8bf7\u9009\u62e9\u6620\u5c04\u5206\u9500\u5546"}]},companyList:[],directList:[],personnelList:[],fieldArr:[],fieldTitle:"",addfield:{},identityType:[{key:1,text:"\u76f4\u5ba2"},{key:2,text:"\u53cb\u5546"}],limit:15,page:1,keyword:""}}setZentOpt(e){return e.map((e=>({key:e.id,text:e.name,disabled:e.disabled})))}componentDidMount(){let e={limit:this.state.limit,page:this.state.page};this.directList(e)}directList(e){Object(a.ab)(e).then((e=>{if(200===e.code){let t=this.state.directList;t=t.concat(this.setZentOpt(e.data.data)),this.setState({directList:t})}}))}submit(){return this.refs.form1.validator()}onUploadChange(e){let t=this;if(e&&e.length>0){let i=new FormData;i.append("file",e[0].file),i.append("path","reseller_avatar"),Object(a.cd)(i).then((e=>{Object(a.Tb)(e,((e,i)=>{t.setState({headImg:e.path}),c.a.clear(),c.a.success(i)}),(e=>{c.a.error(e)}))})).catch((e=>{}))}else t.setState({headImg:""})}onSetAll(e,t){let i=this.state.model;i[e]=t,this.setState({model:i})}onDirectChange(e){let t=this.state.model;t.direct_reseller_id=e,this.setState({page:1,model:t})}onChangePageSelect(e){let t=this.state.page;this.setState({page:t+1});let i={limit:this.state.limit,page:t+1};this.directList(i),e&&e()}NameblurFn(e){if(0==this.props.enumer)Object(a.db)(e).then((e=>{Object(a.Tb)(e,((e,t)=>{}),(e=>{c.a.error(e)}))})).catch((e=>{}));else{let t={id:JSON.parse(sessionStorage.getItem("dataInfo")).id};Object(a.Ob)(e,t).then((e=>{Object(a.Tb)(e,((e,t)=>{}),(e=>{c.a.error(e)}))})).catch((e=>{}))}}AccountblurFn(e){if(0==this.props.enumer)Object(a.cb)(e).then((e=>{Object(a.Tb)(e,((e,t)=>{}),(e=>{c.a.error(e)}))})).catch((e=>{}));else{let t={id:JSON.parse(sessionStorage.getItem("dataInfo")).id};Object(a.Nb)(e,t).then((e=>{Object(a.Tb)(e,((e,t)=>{}),(e=>{c.a.error(e)}))})).catch((e=>{}))}}cancel(){this.setState({model:{}}),this.refs.form1.cancel()}componentWillMount(){if(this.getPersonnelFn(),this.getCompanyFn(),1==this.props.enumer){let e=JSON.parse(sessionStorage.getItem("dataInfo")),t="",i="";e&&(t=0===e.direct_reseller_id?"":{key:e.direct_reseller_id,text:e.direct_reseller_name},i=0!==e.direct_reseller_id);let a=Object(de.a)(e),s={name:a.name,password:"yxtx2021",account:a.account,contact_name:a.contact_name,company_id:{key:a.company_id,text:a.company_name},identity_type:{key:a.identity_type,text:a.identity_type_text},salesman_id:{key:a.salesman_id,text:a.salesman_name},subject:a.subject,direct_reseller_id:t},l=a.contact_phone,n=this.state.phoneSwitch;for(let c=0;c0){n[c-1]=!0,s["phone"+c]=l[c]}this.setState({pwdtype:"password"}),this.setState({phoneSwitch:n});let o=this.state.emailSwitch,r=a.contact_email;for(let c=0;c0){o[c-1]=!0,s["email"+c]=r[c]}this.setState({emailSwitch:o});let m={};m.src=a.head_img,this.setState({id:a.id,phone_nums:l.length,email_nums:r.length,model:s,disabled:!0,isSelectDirect:i,defaultFileList:[m],id:a.id,headImg:a.head_img})}}getPersonnelFn(){let e=this;Object(a.qb)().then((t=>{Object(a.Tb)(t,((t,i)=>{let a=t.map((e=>({key:e.id,text:e.real_name})));e.setState({personnelList:a})}),(e=>{c.a.error(e)}))})).catch((e=>{}))}getCompanyFn(){let e=this;Object(a.V)().then((t=>{Object(a.Tb)(t,((t,i)=>{let a=t.map((e=>({key:e.id,text:e.company_name})));e.setState({companyList:a})}),(e=>{c.a.error(e)}))})).catch((e=>{}))}addfieldArr(){if(4==this.state.phoneSwitch.filter((e=>1==e)).length)c.a.clear(),c.a.error("\u6dfb\u52a0\u7684\u624b\u673a\u53f7\u7801\u6570\u91cf\u5df2\u7ecf\u8fbe\u5230\u4e0a\u9650\uff01");else{let e=this.state.phoneSwitch;for(let t=0;t<4;t++)if(0==e[t]){e[t]=!0;break}this.setState({phoneSwicth:e})}}addEmailArr(){if(4==this.state.emailSwitch.filter((e=>1==e)).length)c.a.clear(),c.a.error("\u6dfb\u52a0\u7684\u90ae\u7bb1\u53f7\u7801\u6570\u91cf\u5df2\u7ecf\u8fbe\u5230\u4e0a\u9650\uff01");else{let e=this.state.emailSwitch;for(let t=0;t<4;t++)if(0==e[t]){e[t]=!0;break}this.setState({emailSwitch:e})}}changeType(e){this.setState({pwdtype:e})}changeKind(){this.setState({pwdtype:"password"})}onKeywordChange(e){this.setState({keyword:e});let t={limit:this.state.limit,page:1,key_word:e};t.key_word||delete t.key_word,Object(a.ab)(t).then((e=>{if(200===e.code){let t=this.state.directList;t=this.setZentOpt(e.data.data),this.setState({directList:t})}}))}render(){return Object(h.jsxDEV)("div",{id:"addaccinfo",className:"addreseller",children:[Object(h.jsxDEV)(l.a,{model:this.state.model,rules:this.state.rules,ref:"form1",className:"addform",children:[Object(h.jsxDEV)(s.a,{labelname:"\u5206\u9500\u5546\u5168\u79f0",prop:"fullname",children:Object(h.jsxDEV)(n.a,{onChange:e=>{this.onSetAll("name",e)},onClearItem:e=>{this.onSetAll("name","")},onblurFn:e=>{this.NameblurFn(e)},countShow:!1,value:this.state.model.name,placeholder:"\u8bf7\u8f93\u5165\u5206\u9500\u5546\u5168\u79f0",labelWidth:"0px",maxLength:32,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:ei,lineNumber:503,columnNumber:13},this)},void 0,!1,{fileName:ei,lineNumber:502,columnNumber:11},this),Object(h.jsxDEV)(s.a,{labelname:"\u4e3b\u4f53\u540d\u79f0",prop:"subject",children:Object(h.jsxDEV)(n.a,{onChange:e=>{this.onSetAll("subject",e)},onClearItem:e=>{this.onSetAll("subject","")},countShow:!1,value:this.state.model.subject,placeholder:"\u8bf7\u8f93\u5165\u4e3b\u4f53\u5168\u79f0",labelWidth:"0px",maxLength:32,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:ei,lineNumber:524,columnNumber:13},this)},void 0,!1,{fileName:ei,lineNumber:523,columnNumber:11},this),Object(h.jsxDEV)(s.a,{labelname:"\u767b\u5f55\u8d26\u53f7",prop:"account",children:Object(h.jsxDEV)("div",{className:"phonet",children:[Object(h.jsxDEV)(n.a,{onChange:e=>{this.onSetAll("account",e)},disabled:this.state.disabled,onblurFn:e=>{this.AccountblurFn(e)},onClearItem:e=>{this.onSetAll("account","")},countShow:!1,value:this.state.model.account,placeholder:"\u8bf7\u8f93\u5165\u767b\u5f55\u8d26\u53f7",labelWidth:"0px",maxLength:32,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:ei,lineNumber:544,columnNumber:15},this),0==this.props.enumer?Object(h.jsxDEV)(Yt.a,{text:"\u8d26\u53f7\uff1a"+this.state.model.account+";\u5bc6\u7801\uff1a"+this.state.model.password,onCopySuccess:()=>{c.a.clear(),c.a.success("\u590d\u5236\u6210\u529f\uff01")},children:Object(h.jsxDEV)(u.a,{type:"info",disabled:!this.state.model.account||this.state.model.password.length<6,children:"\u590d\u5236\u8d26\u53f7\u5bc6\u7801"},void 0,!1,{fileName:ei,lineNumber:572,columnNumber:19},this)},void 0,!1,{fileName:ei,lineNumber:565,columnNumber:17},this):null]},void 0,!0,{fileName:ei,lineNumber:543,columnNumber:13},this)},void 0,!1,{fileName:ei,lineNumber:542,columnNumber:11},this),Object(h.jsxDEV)(s.a,{labelname:"\u5bc6\u7801",prop:"pwd",children:Object(h.jsxDEV)(n.a,{markedShow:e=>{this.changeType(e)},kind:this.state.pwdtype,onChange:e=>{this.onSetAll("password",e)},disabled:this.state.disabled,countShow:!0,onfocusFn:e=>this.changeKind(),onClearItem:e=>{this.onSetAll("password","")},value:this.state.model.password,placeholder:"\u8bf7\u8f93\u5165\u5bc6\u7801",labelWidth:"0px",maxLength:16,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:ei,lineNumber:584,columnNumber:13},this)},void 0,!1,{fileName:ei,lineNumber:583,columnNumber:11},this),Object(h.jsxDEV)(s.a,{labelname:"\u8054\u7cfb\u4eba",prop:"contacts",children:Object(h.jsxDEV)(n.a,{onChange:e=>{this.onSetAll("contact_name",e)},onClearItem:e=>{this.onSetAll("contact_name","")},countShow:!0,value:this.state.model.contact_name,placeholder:"\u8bf7\u8f93\u5165\u8054\u7cfb\u4eba",labelWidth:"0px",maxLength:16,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:ei,lineNumber:608,columnNumber:13},this)},void 0,!1,{fileName:ei,lineNumber:607,columnNumber:11},this),Object(h.jsxDEV)(s.a,{labelname:"\u8054\u7cfb\u4eba\u624b\u673a\u53f7",prop:"contacts_phone",children:Object(h.jsxDEV)("div",{className:"phonet",children:[Object(h.jsxDEV)(n.a,{onChange:e=>{this.onSetAll("contact_phone",e)},onClearItem:e=>{this.onSetAll("contact_phone","")},countShow:!1,value:this.state.model.contact_phone,placeholder:"\u8bf7\u8f93\u5165\u8054\u7cfb\u4eba\u624b\u673a\u53f7",labelWidth:"0px",maxLength:11,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:ei,lineNumber:627,columnNumber:15},this),Object(h.jsxDEV)(u.a,{onClick:()=>this.addfieldArr(),children:"\u6dfb\u52a0\u53f7\u7801"},void 0,!1,{fileName:ei,lineNumber:643,columnNumber:15},this)]},void 0,!0,{fileName:ei,lineNumber:626,columnNumber:13},this)},void 0,!1,{fileName:ei,lineNumber:625,columnNumber:11},this),1==this.state.phoneSwitch[0]?Object(h.jsxDEV)(s.a,{labelname:"\u8054\u7cfb\u4eba\u624b\u673a\u53f71",prop:"phone1",id:"phone1",children:Object(h.jsxDEV)("div",{className:"phonet",children:[Object(h.jsxDEV)(n.a,{onChange:e=>{this.onSetAll("phone1",e),$t.a.emit("input","phone1",e)},onClearItem:e=>{this.onSetAll("phone1","")},countShow:!1,value:this.state.model.phone1,placeholder:"\u8bf7\u8f93\u5165\u8054\u7cfb\u4eba\u624b\u673a\u53f7",labelWidth:"0px",maxLength:11,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:ei,lineNumber:650,columnNumber:17},this),Object(h.jsxDEV)(u.a,{type:"danger",onClick:e=>{this.onSetAll("phone1","");let t=this.state.phoneSwitch;t[0]=!1,this.setState({phoneSwitch:t});let i=this.state.phone_nums-1;this.setState({phone_nums:i})},children:"\u5220\u9664\u6b64\u9879"},void 0,!1,{fileName:ei,lineNumber:667,columnNumber:17},this)]},void 0,!0,{fileName:ei,lineNumber:649,columnNumber:15},this)},void 0,!1,{fileName:ei,lineNumber:648,columnNumber:13},this):null,1==this.state.phoneSwitch[1]?Object(h.jsxDEV)(s.a,{labelname:"\u8054\u7cfb\u4eba\u624b\u673a\u53f72",prop:"phone2",id:"phone2",children:Object(h.jsxDEV)("div",{className:"phonet",children:[Object(h.jsxDEV)(n.a,{onChange:e=>{this.onSetAll("phone2",e),$t.a.emit("input","phone2",e)},onClearItem:e=>{this.onSetAll("phone2","")},countShow:!1,value:this.state.model.phone2,placeholder:"\u8bf7\u8f93\u5165\u8054\u7cfb\u4eba\u624b\u673a\u53f7",labelWidth:"0px",maxLength:11,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:ei,lineNumber:686,columnNumber:17},this),Object(h.jsxDEV)(u.a,{type:"danger",onClick:e=>{this.onSetAll("phone2","");let t=this.state.phoneSwitch;t[1]=!1,this.setState({phoneSwitch:t});let i=this.state.phone_nums-1;this.setState({phone_nums:i})},children:"\u5220\u9664\u6b64\u9879"},void 0,!1,{fileName:ei,lineNumber:703,columnNumber:17},this)]},void 0,!0,{fileName:ei,lineNumber:685,columnNumber:15},this)},void 0,!1,{fileName:ei,lineNumber:684,columnNumber:13},this):null,1==this.state.phoneSwitch[2]?Object(h.jsxDEV)(s.a,{labelname:"\u8054\u7cfb\u4eba\u624b\u673a\u53f73",prop:"phone3",id:"phone3",children:Object(h.jsxDEV)("div",{className:"phonet",children:[Object(h.jsxDEV)(n.a,{onChange:e=>{this.onSetAll("phone3",e),$t.a.emit("input","phone3",e)},onClearItem:e=>{this.onSetAll("phone3","")},countShow:!1,value:this.state.model.phone3,placeholder:"\u8bf7\u8f93\u5165\u8054\u7cfb\u4eba\u624b\u673a\u53f7",labelWidth:"0px",maxLength:11,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:ei,lineNumber:722,columnNumber:17},this),Object(h.jsxDEV)(u.a,{type:"danger",onClick:e=>{this.onSetAll("phone3","");let t=this.state.phoneSwitch;t[2]=!1,this.setState({phoneSwitch:t});let i=this.state.phone_nums-1;this.setState({phone_nums:i})},children:"\u5220\u9664\u6b64\u9879"},void 0,!1,{fileName:ei,lineNumber:739,columnNumber:17},this)]},void 0,!0,{fileName:ei,lineNumber:721,columnNumber:15},this)},void 0,!1,{fileName:ei,lineNumber:720,columnNumber:13},this):null,1==this.state.phoneSwitch[3]?Object(h.jsxDEV)(s.a,{labelname:"\u8054\u7cfb\u4eba\u624b\u673a\u53f74",prop:"phone4",id:"phone4",children:Object(h.jsxDEV)("div",{className:"phonet",children:[Object(h.jsxDEV)(n.a,{onChange:e=>{this.onSetAll("phone4",e),$t.a.emit("input","phone4",e)},onClearItem:e=>{this.onSetAll("phone4","")},countShow:!1,value:this.state.model.phone4,placeholder:"\u8bf7\u8f93\u5165\u8054\u7cfb\u4eba\u624b\u673a\u53f7",labelWidth:"0px",maxLength:11,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:ei,lineNumber:758,columnNumber:17},this),Object(h.jsxDEV)(u.a,{type:"danger",onClick:e=>{this.onSetAll("phone4","");let t=this.state.phoneSwitch;t[3]=!1,this.setState({phoneSwitch:t});let i=this.state.phone_nums-1;this.setState({phone_nums:i})},children:"\u5220\u9664\u6b64\u9879"},void 0,!1,{fileName:ei,lineNumber:775,columnNumber:17},this)]},void 0,!0,{fileName:ei,lineNumber:757,columnNumber:15},this)},void 0,!1,{fileName:ei,lineNumber:756,columnNumber:13},this):null,Object(h.jsxDEV)(s.a,{labelname:"\u8054\u7cfb\u4eba\u90ae\u7bb1",prop:"contacts_email",id:"contacts_email",children:Object(h.jsxDEV)("div",{className:"phonet",children:[Object(h.jsxDEV)(n.a,{onChange:e=>{this.onSetAll("contact_email",e)},onClearItem:e=>{this.onSetAll("contact_email","")},countShow:!1,value:this.state.model.contact_email,placeholder:"\u8bf7\u8f93\u5165\u8054\u7cfb\u4eba\u90ae\u7bb1",labelWidth:"0px",maxLength:50,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:ei,lineNumber:794,columnNumber:15},this),Object(h.jsxDEV)(u.a,{onClick:()=>this.addEmailArr(),children:"\u6dfb\u52a0\u90ae\u7bb1"},void 0,!1,{fileName:ei,lineNumber:811,columnNumber:15},this)]},void 0,!0,{fileName:ei,lineNumber:793,columnNumber:13},this)},void 0,!1,{fileName:ei,lineNumber:792,columnNumber:11},this),1==this.state.emailSwitch[0]?Object(h.jsxDEV)(s.a,{labelname:"\u8054\u7cfb\u4eba\u90ae\u7bb11",prop:"email1",id:"email1",children:Object(h.jsxDEV)("div",{className:"phonet",children:[Object(h.jsxDEV)(n.a,{onChange:e=>{this.onSetAll("email1",e),$t.a.emit("input","email1",e)},onClearItem:e=>{this.onSetAll("email1","")},countShow:!1,value:this.state.model.email1,placeholder:"\u8bf7\u8f93\u5165\u8054\u7cfb\u4eba\u90ae\u7bb1",labelWidth:"0px",maxLength:50,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:ei,lineNumber:817,columnNumber:17},this),Object(h.jsxDEV)(u.a,{type:"danger",onClick:e=>{this.onSetAll("email1","");let t=this.state.emailSwitch;t[0]=!1,this.setState({emailSwitch:t})},children:"\u5220\u9664\u6b64\u9879"},void 0,!1,{fileName:ei,lineNumber:834,columnNumber:17},this)]},void 0,!0,{fileName:ei,lineNumber:816,columnNumber:15},this)},void 0,!1,{fileName:ei,lineNumber:815,columnNumber:13},this):null,1==this.state.emailSwitch[1]?Object(h.jsxDEV)(s.a,{labelname:"\u8054\u7cfb\u4eba\u90ae\u7bb12",prop:"email2",id:"email2",children:Object(h.jsxDEV)("div",{className:"phonet",children:[Object(h.jsxDEV)(n.a,{onChange:e=>{this.onSetAll("email2",e),$t.a.emit("input","email2",e)},onClearItem:e=>{this.onSetAll("email2",e)},countShow:!1,value:this.state.model.email2,placeholder:"\u8bf7\u8f93\u5165\u8054\u7cfb\u4eba\u90ae\u7bb1",labelWidth:"0px",maxLength:50,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:ei,lineNumber:851,columnNumber:17},this),Object(h.jsxDEV)(u.a,{type:"danger",onClick:e=>{this.onSetAll("email2","");let t=this.state.emailSwitch;t[1]=!1,this.setState({emailSwitch:t})},children:"\u5220\u9664\u6b64\u9879"},void 0,!1,{fileName:ei,lineNumber:868,columnNumber:17},this)]},void 0,!0,{fileName:ei,lineNumber:850,columnNumber:15},this)},void 0,!1,{fileName:ei,lineNumber:849,columnNumber:13},this):null,1==this.state.emailSwitch[2]?Object(h.jsxDEV)(s.a,{labelname:"\u8054\u7cfb\u4eba\u90ae\u7bb13",prop:"email3",id:"email3",children:Object(h.jsxDEV)("div",{className:"phonet",children:[Object(h.jsxDEV)(n.a,{onChange:e=>{this.onSetAll("email3",e),$t.a.emit("input","email3",e)},onClearItem:e=>{this.onSetAll("email3","")},countShow:!1,value:this.state.model.email3,placeholder:"\u8bf7\u8f93\u5165\u8054\u7cfb\u4eba\u90ae\u7bb1",labelWidth:"0px",maxLength:50,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:ei,lineNumber:885,columnNumber:17},this),Object(h.jsxDEV)(u.a,{type:"danger",onClick:e=>{this.onSetAll("email3","");let t=this.state.emailSwitch;t[2]=!1,this.setState({emailSwitch:t})},children:"\u5220\u9664\u6b64\u9879"},void 0,!1,{fileName:ei,lineNumber:902,columnNumber:17},this)]},void 0,!0,{fileName:ei,lineNumber:884,columnNumber:15},this)},void 0,!1,{fileName:ei,lineNumber:883,columnNumber:13},this):null,1==this.state.emailSwitch[3]?Object(h.jsxDEV)(s.a,{labelname:"\u8054\u7cfb\u4eba\u90ae\u7bb14",prop:"email4",id:"email4",children:Object(h.jsxDEV)("div",{className:"phonet",children:[Object(h.jsxDEV)(n.a,{onChange:e=>{this.onSetAll("email4",e),$t.a.emit("input","email4",e)},onClearItem:e=>{this.onSetAll("email4","")},countShow:!1,value:this.state.model.email4,placeholder:"\u8bf7\u8f93\u5165\u8054\u7cfb\u4eba\u90ae\u7bb1",labelWidth:"0px",maxLength:50,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:ei,lineNumber:919,columnNumber:17},this),Object(h.jsxDEV)(u.a,{type:"danger",onClick:e=>{this.onSetAll("email4","");let t=this.state.emailSwitch;t[3]=!1,this.setState({emailSwitch:t})},children:"\u5220\u9664\u6b64\u9879"},void 0,!1,{fileName:ei,lineNumber:936,columnNumber:17},this)]},void 0,!0,{fileName:ei,lineNumber:918,columnNumber:15},this)},void 0,!1,{fileName:ei,lineNumber:917,columnNumber:13},this):null,Object(h.jsxDEV)(s.a,{prop:"sale",labelname:"\u9500\u552e\u4eba\u5458",id:"sale",children:Object(h.jsxDEV)(X.a,{options:this.state.personnelList,clearable:!0,placeholder:"\u8bf7\u9009\u62e9\u9500\u552e\u4eba\u5458",value:this.state.model.salesman_id,onChange:e=>{this.onSetAll("salesman_id",e),$t.a.emit("change","sale",e)},popupWidth:"360px",width:"520px"},void 0,!1,{fileName:ei,lineNumber:951,columnNumber:13},this)},void 0,!1,{fileName:ei,lineNumber:950,columnNumber:11},this),Object(h.jsxDEV)(s.a,{prop:"identity",labelname:"\u8eab\u4efd\u7c7b\u578b",id:"identity",children:Object(h.jsxDEV)(X.a,{options:this.state.identityType,clearable:!0,placeholder:"\u8bf7\u9009\u62e9\u8eab\u4efd\u7c7b\u578b",value:this.state.model.identity_type,onChange:e=>{this.onSetAll("identity_type",e),$t.a.emit("change","identity",e)},popupWidth:"360px",width:"520px"},void 0,!1,{fileName:ei,lineNumber:965,columnNumber:13},this)},void 0,!1,{fileName:ei,lineNumber:964,columnNumber:11},this),Object(h.jsxDEV)(s.a,{prop:"sign",labelname:"\u7b7e\u7ea6\u516c\u53f8",id:"sign",children:Object(h.jsxDEV)(X.a,{options:this.state.companyList,clearable:!0,placeholder:"\u8bf7\u9009\u62e9\u7b7e\u7ea6\u516c\u53f8",value:this.state.model.company_id,onChange:e=>{this.onSetAll("company_id",e),$t.a.emit("change","sign",e)},popupWidth:"520px",width:"520px"},void 0,!1,{fileName:ei,lineNumber:979,columnNumber:13},this)},void 0,!1,{fileName:ei,lineNumber:978,columnNumber:11},this),Object(h.jsxDEV)(s.a,{prop:"direct_reseller_id",labelname:"\u6620\u5c04\u5206\u9500\u5546",id:"direct_reseller_id",children:[Object(h.jsxDEV)(Xt,{options:this.state.directList,clearable:!0,page:this.state.page,placeholder:"\u8bf7\u9009\u62e9\u6620\u5c04\u5206\u9500\u5546",value:this.state.model.direct_reseller_id,onChangePage:this.onChangePageSelect.bind(this),disabled:this.state.isSelectDirect,keyword:this.state.keyword,onKeywordChange:this.onKeywordChange.bind(this),onChange:e=>{this.onDirectChange(e),$t.a.emit("change","direct_reseller_id",e)},width:"520px"},void 0,!1,{fileName:ei,lineNumber:994,columnNumber:13},this),Object(h.jsxDEV)("p",{className:"tip-reseller",children:"\u63d0\u793a\uff1a\u6620\u5c04\u5206\u9500\u5546\u4fdd\u5b58\u540e\u4e0d\u53ef\u7f16\u8f91\uff0c\u8bf7\u8c28\u614e\u9009\u62e9\uff01"},void 0,!1,{fileName:ei,lineNumber:1010,columnNumber:13},this)]},void 0,!0,{fileName:ei,lineNumber:993,columnNumber:11},this)]},void 0,!0,{fileName:ei,lineNumber:501,columnNumber:9},this),Object(h.jsxDEV)("div",{className:"mypic",children:[Object(h.jsxDEV)("b",{children:"\u5206\u9500\u5546\u5934\u50cf"},void 0,!1,{fileName:ei,lineNumber:1014,columnNumber:11},this),Object(h.jsxDEV)("div",{className:"changepic dflexac",children:this.state.defaultFileList[0].src.includes("lsxd")?Object(h.jsxDEV)(gt.a,{className:"zent-image-upload-demo",maxSize:512e3,tips:"\u5efa\u8bae\u5c3a\u5bf8 80*80\uff0c\u56fe\u7247\u4e0d\u8d85\u8fc7 500kb",maxAmount:1,onChange:e=>{this.onUploadChange(e)},onUpload:this.onUpload,defaultFileList:this.state.defaultFileList,onError:this.onUploadError},void 0,!1,{fileName:ei,lineNumber:1017,columnNumber:15},this):Object(h.jsxDEV)(gt.a,{className:"zent-image-upload-demo",maxSize:512e3,tips:"\u5efa\u8bae\u5c3a\u5bf8 80*80\uff0c\u56fe\u7247\u4e0d\u8d85\u8fc7 500kb",maxAmount:1,onChange:e=>{this.onUploadChange(e)},onUpload:this.onUpload,onError:this.onUploadError},void 0,!1,{fileName:ei,lineNumber:1030,columnNumber:15},this)},void 0,!1,{fileName:ei,lineNumber:1015,columnNumber:11},this)]},void 0,!0,{fileName:ei,lineNumber:1013,columnNumber:9},this)]},void 0,!0,{fileName:ei,lineNumber:500,columnNumber:7},this)}}i(222);var si="/Users/zhangds/web/blue-brother/frontend/src/pages/distributor/add/add.js";class li extends m.a.Component{constructor(e){super(e),this.state={enumer:0}}activeFn(){let e=this.refs.disbutorForm.submit(),t=this.refs.disbutorForm.state.model,i=this;e?G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:0==i.state.enumer?Object(h.jsxDEV)("p",{children:["\u662f\u5426\u65b0\u589e",Object(h.jsxDEV)("b",{children:["[",t.name,"]"]},void 0,!0,{fileName:si,lineNumber:30,columnNumber:19},this),"\u5206\u9500\u5546\uff1f"]},void 0,!0,{fileName:si,lineNumber:29,columnNumber:13},this):Object(h.jsxDEV)("p",{children:["\u662f\u5426\u4fee\u6539",Object(h.jsxDEV)("b",{children:["[",t.name,"]"]},void 0,!0,{fileName:si,lineNumber:34,columnNumber:19},this),"\u5206\u9500\u5546\u4fe1\u606f\uff1f"]},void 0,!0,{fileName:si,lineNumber:33,columnNumber:13},this),onConfirm:()=>{let e=Object(de.a)(t);i.refs.disbutorForm.state.headImg&&(e.head_img=i.refs.disbutorForm.state.headImg),e.salesman_id=t.salesman_id.key,e.salesman_name=t.salesman_id.text,e.company_id=t.company_id.key,e.company_name=t.company_id.text,e.identity_type=t.identity_type.key;let s=[t.contact_phone];s.push(e.phone1),s.push(e.phone2),s.push(e.phone3),s.push(e.phone4);let l=s.filter((e=>e));e.contact_phone=l.join(",");let n=[t.contact_email];n.push(e.email1),n.push(e.email2),n.push(e.email3),n.push(e.email4);let r=n.filter((e=>e));if(e.contact_email=r.join(","),e=Object(o.a)(e,["phone1","phone2","phone3","phone4","email1","email2","email3","email4"]),e.direct_reseller_id=t.direct_reseller_id.key,0==i.state.enumer)Object(a.jc)(e).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.clear(),c.a.success(t),setTimeout((()=>{window.location.replace("#/home/distributor-list")}),1e3)}),(e=>{c.a.error(e)}))})).catch((e=>{}));else{let t=i.refs.disbutorForm.state.id;delete e.account,delete e.password,e.head=i.state.headImg,Object(a.Fc)(t,e).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.clear(),c.a.success(t),setTimeout((()=>{window.location.replace("#/home/distributor-list")}),1e3)}),(e=>{c.a.error(e)}))})).catch((e=>{}))}},onCancel:this.onCancel,className:"questModal",parentComponent:this}):(c.a.clear(),c.a.error("\u8bf7\u5b8c\u5584\u8868\u5355\u6570\u636e"))}componentWillMount(){let e=JSON.parse(sessionStorage.getItem("breaknav"))[0].pagetitle,t=e.includes("\u65b0\u5efa")?0:1;this.setState({pagetitle:e+"\u5206\u9500\u5546",enumer:t})}cancel(){G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:"\u662f\u5426\u53d6\u6d88\u672c\u6b21\u64cd\u4f5c\uff1f"},void 0,!1,{fileName:si,lineNumber:138,columnNumber:16},this),onConfirm:()=>{window.location.replace("#/home/distributor-list")},onCancel:this.onCancel,className:"questModal",parentComponent:this})}render(){return Object(h.jsxDEV)("div",{className:"maincenter",children:[Object(h.jsxDEV)(d.a,{style:{width:"100%"},title:this.state.pagetitle,children:Object(h.jsxDEV)("div",{className:"adddistributor",children:Object(h.jsxDEV)(ai,{ref:"disbutorForm",enumer:this.state.enumer},void 0,!1,{fileName:si,lineNumber:153,columnNumber:13},this)},void 0,!1,{fileName:si,lineNumber:152,columnNumber:11},this)},void 0,!1,{fileName:si,lineNumber:151,columnNumber:9},this),Object(h.jsxDEV)("div",{className:"distributorbtn",children:[Object(h.jsxDEV)(u.a,{type:"primary",onClick:this.activeFn.bind(this),children:"\u63d0\u4ea4"},void 0,!1,{fileName:si,lineNumber:157,columnNumber:11},this),Object(h.jsxDEV)(u.a,{type:"normal",onClick:this.cancel.bind(this),children:"\u53d6\u6d88"},void 0,!1,{fileName:si,lineNumber:160,columnNumber:11},this)]},void 0,!0,{fileName:si,lineNumber:156,columnNumber:9},this)]},void 0,!0,{fileName:si,lineNumber:150,columnNumber:7},this)}}i(223),i(224);var ni=i(517),oi=(i(225),i(444)),ri="/Users/zhangds/web/blue-brother/frontend/src/components/menu/main.js";class mi extends m.a.Component{constructor(e){super(e),this.state={checkVisble:!0,visible:e.visible,data:e.data}}componentDidUpdate(e,t){e.data.length!==t.data.length&&this.setState({data:e.data})}clearAllCheck(){}clearIndexCheck(e){let t=Object(oi.a)(this.props.data,(function(t){return t.id==e}));this.state.data[t].check=!1,this.setState({data:this.state.data})}checkChange(e,t){e.stopPropagation(),e.nativeEvent.stopImmediatePropagation();let i=[];if(this.props.multiple)i=this.state.data;else{for(let e=0;eObject(h.jsxDEV)("div",{className:e.check?"menu-item active":"menu-item",onClick:t=>{this.checkChange(t,e.id)},children:[Object(h.jsxDEV)("div",{className:"check-box",children:e.check?Object(h.jsxDEV)(g.a,{type:"check",className:"check-icon"},void 0,!1,{fileName:ri,lineNumber:86,columnNumber:31},this):null},void 0,!1,{fileName:ri,lineNumber:85,columnNumber:15},this),Object(h.jsxDEV)("div",{className:"menu-name",children:[" ",e.name]},void 0,!0,{fileName:ri,lineNumber:88,columnNumber:15},this)]},t,!0,{fileName:ri,lineNumber:78,columnNumber:13},this)))},void 0,!1,{fileName:ri,lineNumber:75,columnNumber:7},this):null}}i(226);var ci="/Users/zhangds/web/blue-brother/frontend/src/components/filterSelect/main.js";class di extends m.a.Component{constructor(e){super(e);let t=Object(f.a)(e.data.menuList,(e=>(e.check=!1,e)));this.state={id:e.data.id,label:e.data.label,selectedMenu:e.data.menuList[0],multiple:!1|e.multiple,menuList:t,visible:!0,menuShow:!0,propName:e.data.prop,selectList:[],text:""}}onHandlerClick(){let e=!this.state.menuShow;this.setState({menuShow:e})}mouseLeaveFn(){this.setState({menuShow:!1})}mouseMenuFn(){this.setState({menuShow:!0})}onMenuClick(e,t){if(this.state.multiple){let e=Object(de.a)(this.state.selectList);e.includes(t)?e=e.filter((e=>e!=t)):e.push(t),this.setState({selectList:e});let i=Object(_.a)(this.state.menuList,(function(t){return e.includes(t.id)})),a=i.map((e=>e.id)),s=i.map((e=>e.name));this.props.selectFn(a,this.state.propName),this.setState({text:s.join(",")})}else{let e=Object(ni.a)(this.state.menuList,(function(e){return e.id==t}));this.setState({selectedMenu:e}),this.setState({text:e.name}),this.props.selectFn(t,this.state.propName),this.setState({menuShow:!1})}}onMenuHide(){this.setState({menuShow:!1})}onselectFn(e){}onClose(e,t){this.props.onClose(e,this.state.id,this.state.propName);let i=Object(f.a)(this.state.menuList,(e=>(e.check=!1,e)));this.setState({menuList:i})}componentDidMount(){window.document.addEventListener("click",(()=>{this.setState({menuShow:!1})}))}render(){return Object(h.jsxDEV)("div",{className:"filterComponent",children:[Object(h.jsxDEV)("div",{className:"filterSelect",children:Object(h.jsxDEV)("span",{className:"filter-item",onClick:()=>{this.onHandlerClick()},onMouseEnter:()=>this.mouseMenuFn(),children:[Object(h.jsxDEV)("span",{className:"filter-label",children:this.state.label},void 0,!1,{fileName:ci,lineNumber:98,columnNumber:13},this),Object(h.jsxDEV)("span",{className:"filter-maohao",children:":"},void 0,!1,{fileName:ci,lineNumber:99,columnNumber:13},this),Object(h.jsxDEV)("span",{className:"filter-placeholder",children:this.state.text||"\u8bf7\u9009\u62e9"},void 0,!1,{fileName:ci,lineNumber:100,columnNumber:13},this),Object(h.jsxDEV)(g.a,{type:"down",className:"icon-down-arrow"},void 0,!1,{fileName:ci,lineNumber:101,columnNumber:13},this),Object(h.jsxDEV)(g.a,{type:"close",className:"icon-del",onClick:e=>{this.onClose(e,this.state.id)}},void 0,!1,{fileName:ci,lineNumber:102,columnNumber:13},this)]},void 0,!0,{fileName:ci,lineNumber:90,columnNumber:11},this)},void 0,!1,{fileName:ci,lineNumber:89,columnNumber:9},this),this.state.menuShow?Object(h.jsxDEV)("div",{onMouseLeave:()=>this.mouseLeaveFn(),children:Object(h.jsxDEV)(mi,{onItemClick:(e,t)=>{this.onMenuClick(e,t)},className:"menu",ref:"menu",data:this.state.menuList,multiple:this.state.multiple,visible:this.state.menuShow,selectFn:e=>{this.onselectFn(e)},onClose:()=>{this.onMenuHide()}},void 0,!1,{fileName:ci,lineNumber:114,columnNumber:13},this)},void 0,!1,{fileName:ci,lineNumber:113,columnNumber:11},this):null]},void 0,!0,{fileName:ci,lineNumber:88,columnNumber:7},this)}}var ui="/Users/zhangds/web/blue-brother/frontend/src/components/filterbar/main.js";class hi extends m.a.Component{constructor(e){super(e),this.state={filterList:e.filterList,menuList:e.menuList,showItemList:[],menuShow:!1,multiple:!1|e.multiple},this.hideMenu=this.hideMenu.bind(this),this.onselectFn=this.onselectFn.bind(this)}componentDidMount(){document.addEventListener("click",this.hideMenu)}componentWillUnmount(){document.removeEventListener("click",this.hideMenu,!1)}componentDidUpdate(e,t){e.menuList.length!==t.menuList.length&&(t.menuList.map((t=>{e.menuList.map((e=>{t.id==e.id&&(e.check=t.check)}))})),this.setState({menuList:e.menuList}))}onCloseSelect(e,t,i){this.removeItem(e,t,i),this.refs.menu.clearIndexCheck(t),this.props.onClose(i)}removeItem(e,t,i){this.state.showItemList.forEach(((e,a,s)=>{e.id===t&&(this.props.onClose(i),delete this.state.showItemList[a])})),this.setState({showItemList:this.state.showItemList})}addItem(e){e.nativeEvent.stopImmediatePropagation(),this.setState({menuShow:!this.state.menuShow})}onselectFn(e,t){this.props.selectFn(e,t)}onMenuClick(e,t){let i=Object(ni.a)(this.state.filterList,(function(e){return e.id==t}));this.state.showItemList.indexOf(i)<0?this.state.showItemList.push(i):this.removeItem(e,t,i.prop),this.setState({showItemList:this.state.showItemList}),this.setState({menuShow:!1})}onSelect(e){this.props.onSelect(e)}hideMenu(e,t){this.setState({menuShow:!1})}onClose(){this.setState({menuShow:!1});let e=Object(f.a)(this.state.menuList,(e=>(e.check=!1,e)));this.setState({menuList:e})}render(){return Object(h.jsxDEV)("div",{className:"filterbar",children:[Object(h.jsxDEV)(g.a,{type:"filter-o",className:"filter-icon"},void 0,!1,{fileName:ui,lineNumber:104,columnNumber:9},this),this.state.showItemList.map(((e,t)=>Object(h.jsxDEV)(di,{data:e,selectFn:(e,t)=>{this.onselectFn(e,t)},multiple:this.state.multiple,onClose:(e,t,i)=>{this.onCloseSelect(e,t,i)}},t,!1,{fileName:ui,lineNumber:107,columnNumber:13},this))),Object(h.jsxDEV)("div",{className:this.state.menuShow?"add-filter active":"add-filter",onClick:e=>this.addItem(e),children:[Object(h.jsxDEV)(g.a,{type:"plus"},void 0,!1,{fileName:ui,lineNumber:124,columnNumber:11},this),"\u6dfb\u52a0\u7b5b\u9009\u9879",Object(h.jsxDEV)(mi,{onItemClick:(e,t)=>{this.onMenuClick(e,t)},className:"menu",ref:"menu",data:this.state.menuList,multiple:!0,visible:this.state.menuShow,tt:3,onClose:(e,t)=>{this.onClose(e,t)}},void 0,!1,{fileName:ui,lineNumber:126,columnNumber:11},this)]},void 0,!0,{fileName:ui,lineNumber:120,columnNumber:9},this)]},void 0,!0,{fileName:ui,lineNumber:103,columnNumber:7},this)}}var bi=i(486),pi=i(474),Ni=i(493),ji=i(162),vi="/Users/zhangds/web/blue-brother/frontend/src/pages/distributor/list/modifydispwd.js";function gi(e,t){return e!==t.getSectionValue("password").password?{name:"passwordEqual",message:"\u4e24\u6b21\u586b\u5199\u7684\u5bc6\u7801\u4e0d\u4e00\u81f4"}:null}var fi=e=>{const t=bi.a.useForm(pi.b.View),i=m.a.useCallback((t=>{const i=t.getValue();if(i){let t=Object(de.a)(i),s=e.id;Object(a.Gc)(s,t).then((t=>{Object(a.Tb)(t,((t,i)=>{c.a.clear(),c.a.success(i),e.visibleShow(!1)}),(e=>{c.a.error(e)}))})).catch((e=>{}))}}),[]);return Object(h.jsxDEV)(bi.a,{form:t,layout:"horizontal",scrollToError:!0,onSubmit:i,children:[Object(h.jsxDEV)(Ni.a,{name:"password",label:"\u65b0\u5bc6\u7801",required:!0,helpDesc:"",validators:[ji.b.required("\u8bf7\u8f93\u5165\u65b0\u5bc6\u7801"),ji.b.pattern(/^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,16}$/,"6-16\u4f4d\u5b57\u7b26,\u6570\u5b57+\u5b57\u6bcd\u7ec4\u6210\uff0c(\u5b57\u6bcd\u533a\u5206\u5927\u5c0f\u5199)")],notice:"6-16\u4f4d\u5b57\u7b26,\u6570\u5b57+\u5b57\u6bcd\u7ec4\u6210\uff0c\u5b57\u6bcd(\u533a\u5206\u5927\u5c0f\u5199)",props:{type:"password"}},void 0,!1,{fileName:vi,lineNumber:46,columnNumber:7},void 0),Object(h.jsxDEV)(Ni.a,{name:"re_password",label:"\u786e\u8ba4\u5bc6\u7801",required:!0,notice:"\u5fc5\u987b\u4e0e\u65b0\u5bc6\u7801\u8f93\u5165\u4e00\u81f4",validators:[ji.b.required("\u8bf7\u786e\u8ba4\u5bc6\u7801"),gi],props:{type:"password"}},void 0,!1,{fileName:vi,lineNumber:63,columnNumber:7},void 0),Object(h.jsxDEV)("p",{className:"dflexajce",children:[Object(h.jsxDEV)(u.a,{type:"primary",htmlType:"submit",children:"\u786e\u5b9a"},void 0,!1,{fileName:vi,lineNumber:74,columnNumber:9},void 0),",",Object(h.jsxDEV)(u.a,{onClick:()=>{e.visibleShow(!1)},children:"\u53d6\u6d88"},void 0,!1,{fileName:vi,lineNumber:77,columnNumber:10},void 0)]},void 0,!0,{fileName:vi,lineNumber:73,columnNumber:7},void 0)]},void 0,!0,{fileName:vi,lineNumber:45,columnNumber:5},void 0)},_i="/Users/zhangds/web/blue-brother/frontend/src/pages/distributor/list/list.js";const xi=[{title:"\u7f16\u53f7",name:"code",prop:"code",type:"normal",width:"20%"},{title:"\u5546\u6237\u7f16\u53f7",name:"merchant",prop:"merchant[merchant_id]",type:"normal",width:"20%"},{title:"\u5206\u9500\u5546\u540d\u79f0",prop:"name",name:"name",width:"20%",type:"normal"},{title:"\u767b\u5f55\u8d26\u53f7",name:"account",prop:"account",type:"normal",width:"20%"},{title:"\u4e3b\u4f53\u540d\u79f0",name:"subject",type:"normal",prop:"subject",width:"auto"},{title:"\u72b6\u6001",width:"20%",type:"slot",prop:"name"},{title:"\u64cd\u4f5c",prop:"opearo",name:"opearo",type:"slot",width:"20%",defaultText:0}],yi=[{title:"\u64cd\u4f5c\u4eba",name:"reseller.name",prop:"reseller.name",type:"normal",width:"33%"},{title:"\u521b\u5efa\u65f6\u95f4",prop:"create_time",name:"create_time",width:"33%",type:"normal"},{title:"\u8be6\u60c5",name:"detail",prop:"detail",type:"normal",width:"33%"}];class Oi extends m.a.Component{constructor(e){super(e),this.state={tabList:[{title:"\u5206\u9500\u5546\u5217\u8868"}],logVisible:!1,pwdVisible:!1,status:null,resellid:null,key_word:"",limit:10,page:1,total:0,resellerList:[],menuList:[{id:0,name:"\u5206\u9500\u5546\u72b6\u6001",check:!1}],filterList:[{id:0,label:"\u5206\u9500\u5546\u72b6\u6001",prop:"status",menuList:[{id:999,name:"\u5168\u90e8"},{id:1,name:"\u5f00\u542f"},{id:2,name:"\u5173\u95ed"}]}]}}clickFn(){sessionStorage.setItem("pathname2","/home/system/distributor-add");sessionStorage.setItem("breaknav",JSON.stringify([{pagetitle:"\u65b0\u5efa",items:[{path:"distributor-list",name:"\u5206\u9500\u5546\u7ba1\u7406"},{path:"distributor-add",name:"\u65b0\u5efa\u5206\u9500\u5546"}]}])),window.open("#/home/distributor-add")}delFn(e,t){let i=this;G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:["\u662f\u5426\u5220\u9664",Object(h.jsxDEV)("b",{children:["[",t.name,"]"]},void 0,!0,{fileName:_i,lineNumber:167,columnNumber:15},this),"\u5206\u9500\u5546\uff1f"]},void 0,!0,{fileName:_i,lineNumber:166,columnNumber:9},this),onConfirm:()=>{Object(a.w)(t.id).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.clear(),c.a.success(t),i.getReseller()}),(e=>{c.a.error(e)}))})).catch((e=>{}))},onCancel:this.onCancel,className:"questModal",parentComponent:this})}editFn(e,t){Object(a.vb)(t.id).then((e=>{Object(a.Tb)(e,((e,t)=>{sessionStorage.setItem("dataInfo",JSON.stringify(e)),sessionStorage.setItem("pathname2","distributor-add"),sessionStorage.getItem("distributor-data");sessionStorage.setItem("breaknav",JSON.stringify([{pagetitle:"\u7f16\u8f91",items:[{path:"distributor-list",name:"\u5206\u9500\u5546\u7ba1\u7406"},{path:"distributor-add",name:"\u7f16\u8f91\u5206\u9500\u5546"}]}])),window.open("#/home/distributor-edit")}),(e=>{c.a.error(e)}))})).catch((e=>{}))}openInformation(e){sessionStorage.setItem("merchant",JSON.stringify(e)),sessionStorage.setItem("pathname2","distributor-merchant");sessionStorage.setItem("breaknav",JSON.stringify([{pagetitle:"\u7f16\u8f91",items:[{path:"distributor-list",name:"\u5206\u9500\u5546\u7ba1\u7406"},{path:"distributor-merchant",name:"\u66f4\u65b0\u5546\u6237"}]}])),sessionStorage.setItem("linkshowname","\u5206\u9500\u5546\u7ba1\u7406"),this.props.history.push("/home/distributor-merchant")}callBack(e){sessionStorage.setItem("callBackId",JSON.stringify(e.id)),sessionStorage.setItem("callBackType",JSON.stringify(1)),sessionStorage.setItem("pathname2","callback-message");let t=[{pagetitle:"\u56de\u8c03\u5730\u5740",items:[{path:"distributor-list",name:"\u5206\u9500\u5546\u4e00"+e.name},{path:"callback-message",name:"\u8bbe\u7f6e\u56de\u8c03\u901a\u77e5\u5730\u5740"}]}];sessionStorage.setItem("breaknav",JSON.stringify(t)),sessionStorage.setItem("linkshowname","\u5206\u9500\u5546\u7ba1\u7406"),this.props.history.push("/home/callback-message")}onSwitchChange(e,t){let i=this;G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:["\u662f\u5426",1==t.status?"\u505c\u7528":"\u542f\u7528",Object(h.jsxDEV)("b",{children:["[",t.name,"]"]},void 0,!0,{fileName:_i,lineNumber:287,columnNumber:11},this),"\u5206\u9500\u5546\u72b6\u6001\uff1f"]},void 0,!0,{fileName:_i,lineNumber:285,columnNumber:9},this),onConfirm:()=>{Object(a.Hc)(t.id,{operation:1==t.status?2:1}).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.clear(),c.a.success(t),i.getReseller()}),(e=>{c.a.error(e)}))})).catch((e=>{}))},onCancel:this.onCancel,className:"questModal",parentComponent:this})}onMenuItemClick(e,t,i){switch(Number(t)){case 1:this.setState({pwdVisible:!0,resellid:i.id});break;case 2:this.setState({logVisible:!0});break;case 3:this.openInformation(i)}}setLogVisible(e){this.setState({logVisible:!1})}setVisible(e){this.setState({pwdVisible:!1})}pageChange(e){this.setState({page:e}),setTimeout((()=>{this.getReseller()}),0)}onFilterClose(e){let t={};t[e]=null,this.setState(t)}selectedId(e,t){let i={};i[t]=999==e?null:e,this.setState(i)}countChange(e){this.setState({page:1,limit:e}),setTimeout((()=>{this.getReseller()}),0)}sureFn(){this.setState({page:1}),setTimeout((()=>{this.getReseller()}),300)}getReseller(){let e=this,{page:t,limit:i,key_word:s,status:l}=e.state,n={page:t,limit:i};s&&(n.key_word=s),l&&(n.status=l),Object(a.wb)(n).then((t=>{Object(a.Tb)(t,((t,i)=>{const a=t.data,{total:s}=t;e.setState({resellerList:a,total:s})}),(e=>{c.a.error(e)}))})).catch((e=>{}))}componentWillMount(){this.getReseller()}componentDidUpdate(e,t){t.key_word==this.state.key_word||this.state.key_word||this.getReseller(),t.status!=this.state.status&&this.getReseller()}render(){const{current:e,pageSize:t}=this.state;return Object(h.jsxDEV)("div",{id:"dislist",children:Object(h.jsxDEV)(Ft,{tabs:this.state.tabList,children:[Object(h.jsxDEV)("div",{className:"distable dflexj",children:[Object(h.jsxDEV)(u.a,{type:"primary",icon:"plus",onClick:this.clickFn.bind(this),children:"\u65b0\u5efa\u5206\u9500\u5546"},void 0,!1,{fileName:_i,lineNumber:428,columnNumber:13},this),Object(h.jsxDEV)(n.a,{onClearItem:e=>{this.setState({key_word:""})},wordSearch:this.sureFn.bind(this),onChange:e=>this.setState({key_word:e}),value:this.state.key_word,icon:"search",placeholder:"\u8bf7\u8f93\u5165\u5206\u9500\u5546\u540d\u79f0\u3001\u767b\u5f55\u8d26\u53f7\u3001\u8054\u7cfb\u4eba\u3001\u624b\u673a\u53f7\u8fdb\u884c\u641c\u7d22",countShow:!1,height:"36px",width:"260px",alignment:"left"},void 0,!1,{fileName:_i,lineNumber:432,columnNumber:13},this)]},void 0,!0,{fileName:_i,lineNumber:427,columnNumber:11},this),Object(h.jsxDEV)(hi,{onClose:e=>{this.onFilterClose(e)},selectFn:(e,t)=>{this.selectedId(e,t)},filterList:this.state.filterList,menuList:this.state.menuList},void 0,!1,{fileName:_i,lineNumber:447,columnNumber:11},this),Object(h.jsxDEV)("div",{children:[Object(h.jsxDEV)(I,{spliteColor:"#fff",tableData:this.state.resellerList,Column:xi,dataCount:this.state.total,isMultiple:!1,countbarVisible:!1,isSwitch:!1,pageChange:e=>{this.pageChange(e)},countChange:e=>{this.countChange(e)},checkChange:e=>{},ComponentHandler:(e,t)=>"name"==e?Object(h.jsxDEV)(v.a,{size:"small",checked:2!=t.status,onChange:e=>{this.onSwitchChange(e,t)}},void 0,!1,{fileName:_i,lineNumber:476,columnNumber:21},this):"opearo"==e?Object(h.jsxDEV)("span",{children:[Object(h.jsxDEV)("a",{className:"grid-link",onClick:e=>{this.editFn(e,t)},children:"\u7f16\u8f91"},void 0,!1,{fileName:_i,lineNumber:488,columnNumber:23},this),Object(h.jsxDEV)("a",{className:"grid-link",onClick:e=>{this.callBack(t)},children:"\u8bbe\u7f6e\u56de\u8c03"},void 0,!1,{fileName:_i,lineNumber:496,columnNumber:23},this),Object(h.jsxDEV)(y.a,{position:y.d.RightTop,children:[Object(h.jsxDEV)(y.b,{children:Object(h.jsxDEV)("div",{className:"linkmore",children:[" ","\u66f4\u591a ",Object(h.jsxDEV)(g.a,{type:"down"},void 0,!1,{fileName:_i,lineNumber:508,columnNumber:32},this)," "]},void 0,!0,{fileName:_i,lineNumber:506,columnNumber:27},this)},void 0,!1,{fileName:_i,lineNumber:505,columnNumber:25},this),Object(h.jsxDEV)(y.c,{children:Object(h.jsxDEV)(O.a,{onClick:(e,i)=>{this.onMenuItemClick(e,i,t)},children:[Object(h.jsxDEV)(D.a,{children:"\u91cd\u7f6e\u5bc6\u7801"},"1",!1,{fileName:_i,lineNumber:517,columnNumber:29},this),Object(h.jsxDEV)(D.a,{children:"\u66f4\u65b0\u5546\u6237"},"3",!1,{fileName:_i,lineNumber:518,columnNumber:29},this)]},void 0,!0,{fileName:_i,lineNumber:512,columnNumber:27},this)},void 0,!1,{fileName:_i,lineNumber:511,columnNumber:25},this)]},void 0,!0,{fileName:_i,lineNumber:504,columnNumber:23},this)]},void 0,!0,{fileName:_i,lineNumber:487,columnNumber:21},this):void 0},void 0,!1,{fileName:_i,lineNumber:458,columnNumber:13},this),Object(h.jsxDEV)(ce.a,{visible:this.state.pwdVisible,className:"questModal",onClose:()=>this.setVisible(!1),title:"\u91cd\u7f6e\u5bc6\u7801",children:Object(h.jsxDEV)("div",{children:Object(h.jsxDEV)(fi,{visibleShow:e=>this.setVisible(e),id:this.state.resellid},void 0,!1,{fileName:_i,lineNumber:535,columnNumber:17},this)},void 0,!1,{fileName:_i,lineNumber:534,columnNumber:15},this)},void 0,!1,{fileName:_i,lineNumber:528,columnNumber:13},this),Object(h.jsxDEV)(ce.a,{visible:this.state.logVisible,onClose:()=>this.setLogVisible(!1),footer:Object(h.jsxDEV)(u.a,{onClick:()=>this.setLogVisible(!1),style:{width:"100px"},children:"\u5173\u95ed"},void 0,!1,{fileName:_i,lineNumber:546,columnNumber:17},this),title:"\u65e5\u5fd7",style:{width:"60%"},children:Object(h.jsxDEV)(I,{spliteColor:"#fff",tableData:this.state.distdata2,Column:yi,isMultiple:!1,isShowPageBar:!1,countbarVisible:!1,isSwitch:!1,pageChange:e=>{this.pageChange(e)},checkChange:e=>{},ComponentHandler:(e,t)=>{}},void 0,!1,{fileName:_i,lineNumber:553,columnNumber:15},this)},void 0,!1,{fileName:_i,lineNumber:542,columnNumber:13},this)]},void 0,!0,{fileName:_i,lineNumber:457,columnNumber:11},this)]},void 0,!0,{fileName:_i,lineNumber:426,columnNumber:9},this)},void 0,!1,{fileName:_i,lineNumber:425,columnNumber:7},this)}}var Di=i(503),Ei=i(288),Vi=(i(232),"/Users/zhangds/web/blue-brother/frontend/src/pages/distributor/merchant/index.jsx");var ki=i(518),Si=(i(233),"/Users/zhangds/web/blue-brother/frontend/src/pages/exchangecode/commodity/commodity.js");const wi=[{title:"\u5546\u54c1\u7f16\u53f7",name:"product_id",prop:"product_id",className:"name",type:"normal",width:"auto"},{title:"\u5546\u54c1\u540d\u79f0",prop:"product_name",name:"product_name",width:"auto",type:"normal"},{title:"\u5e73\u53f0\u6279\u6b21\u53f7",width:"auto",prop:"channel_activity_id",name:"channel_activity_id",type:"normal"},{title:"\u4e0a\u6e38\u5e73\u53f0",width:"auto",prop:"upstream",name:"upstream",type:"normal"},{title:"\u5546\u54c1\u6743\u91cd",width:"auto",prop:"weight",name:"weight",type:"normal"},{title:"\u6709\u6548\u65f6\u95f4\u6bb5",width:"auto",prop:"effectDate",name:"effectDate",type:"normal"},{title:"\u5b98\u65b9\u4ef7\u683c",name:"official_price",prop:"official_price",type:"normal",width:"auto"},{title:"\u5408\u540c\u4ef7",name:"contract_price",type:"normal",prop:"contract_price",width:"auto"},{title:"\u521b\u5efa\u65f6\u95f4",name:"create_time",type:"normal",prop:"create_time",width:"auto"},{title:"\u7c7b\u578b",name:"product_type_text",type:"normal",prop:"product_type_text",width:"auto"},{title:"\u64cd\u4f5c",prop:"opearo",name:"opearo",type:"slot",width:"200px"}];class Ci extends m.a.Component{constructor(e){super(e),this.state={dataCount:0,page:1,tabList:[{title:"\u5546\u54c1\u8303\u56f4\u5217\u8868"}],tableData:[],selectionData:[],isCombining:sessionStorage.getItem("isCombining"),limit:10,tableHeight:500,contractPrice:0,totalPrice:0}}onPageChange(e){let t={code_batch_id:sessionStorage.getItem("code_id"),page:e,limit:this.state.limit};this.getTableList(t)}componentDidMount(e){let t={code_batch_id:sessionStorage.getItem("code_id"),page:1,limit:10};this.getTableList(t)}getTableList(e){Object(a.R)(e).then((e=>{Object(a.Tb)(e,((e,t)=>{const i=[];e.data.map((e=>{if(1===e.type)e.entity.upstream="\u76f4\u8fde\u5929\u4e0b",e.entity.weight=e.weight,e.entity.product_id=e.entity.goods_id,i.push(e.entity);else if(2===e.type)i.push({product_id:e.entity.goods_id,product_type_text:"\u7acb\u51cf\u91d1",upstream:P(e.entity.channel),contract_price:e.entity.price,create_time:e.entity.create_time,official_price:e.entity.reduce_amount,channel_activity_id:e.entity.channel_activity_id,product_name:e.entity.batch_goods_name,weight:e.weight,effectDate:e.entity.time_limit.effect_time.start_time+" \u81f3 "+e.entity.time_limit.effect_time.end_time});else{const t="1"===e.entity.cash_amount_type?e.entity.denomination:`${e.entity.min_denomination}~${e.entity.max_denomination}`;i.push({product_id:e.entity.goods_id,product_type_text:"2"===e.entity.cash_amount_type?"\u968f\u673a\u7ea2\u5305":"\u56fa\u989d\u7ea2\u5305",upstream:P(e.entity.channel),contract_price:(e.entity.total_contract_price/e.entity.num).toFixed(2),create_time:e.entity.create_time,official_price:t,channel_activity_id:e.entity.cash_activity_id,product_name:e.entity.batch_goods_name,weight:e.weight,effectDate:e.entity.begin_time+" \u81f3 "+e.entity.end_time})}})),this.setState({tableData:i}),this.setState({dataCount:e.total})}),(e=>{}))})).catch((e=>{}))}selection(e){this.setState({selectionData:e});let t=0,i=0;e.forEach((e=>{t+=Number(e.official_price),i+=Number(e.contract_price)})),this.setState({contractPrice:t,totalPrice:i})}deleteFn(e,t){let i=this;G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:"\u662f\u5426\u5220\u9664\u8be5\u5546\u54c1\uff1f"},void 0,!1,{fileName:Si,lineNumber:203,columnNumber:16},this),onConfirm(){Object(a.q)(t.product_id).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.clear(),c.a.success(t);let a={code_batch_id:sessionStorage.getItem("code_id"),page:i.state.page,limit:i.state.limit};i.getTableList(a)}),(e=>{c.a.error(e)}))})).catch((e=>{}))},onCancel(){},className:"questModal",parentComponent:this})}sureFn(){let e={code_batch_id:sessionStorage.getItem("code_id"),page:this.state.page,limit:this.state.limit,key_word:this.state.key_word};this.getTableList(e)}componentWillMount(){this.setState({tableHeight:window.innerHeight-430})}onCountChange(e){this.setState({page:1,limit:e}),setTimeout((()=>{this.getTableList()}),200)}render(){return Object(h.jsxDEV)("div",{id:"exchangecodeaboutlist",children:Object(h.jsxDEV)(Ft,{tabs:this.state.tabList,children:[Object(h.jsxDEV)("div",{className:"codetable dflexj",children:[Object(h.jsxDEV)("span",{},void 0,!1,{fileName:Si,lineNumber:264,columnNumber:13},this),Object(h.jsxDEV)(n.a,{icon:"search",placeholder:"\u8bf7\u8f93\u5165\u5546\u54c1\u540d\u79f0\u8fdb\u884c\u5339\u914d\u67e5\u8be2",countShow:!1,height:"36px",width:"260px",value:this.state.key_word,onChange:e=>this.setState({key_word:e}),wordSearch:this.sureFn.bind(this),alignment:"left"},void 0,!1,{fileName:Si,lineNumber:265,columnNumber:13},this)]},void 0,!0,{fileName:Si,lineNumber:263,columnNumber:11},this),Object(h.jsxDEV)("div",{},void 0,!1,{fileName:Si,lineNumber:277,columnNumber:11},this),this.state.selectionData.length>0?Object(h.jsxDEV)(ki.a,{type:"info",extraContent:Object(h.jsxDEV)(u.a,{type:"primary",onClick:()=>{const e=this.state.tableData.map((e=>(e.checked=!1,e)));this.setState({selectionData:[],tableData:e})},children:"\u6e05\u7a7a"},void 0,!1,{fileName:Si,lineNumber:282,columnNumber:17},this),children:["\u5df2\u9009\u62e9",Object(h.jsxDEV)("font",{color:"#296bef",style:{fontWeight:"bold"},children:this.state.selectionData.length},void 0,!1,{fileName:Si,lineNumber:298,columnNumber:15},this),"\u9879\uff0c\u5b98\u65b9\u4ef7\u683c\u603b\u8ba1:",this.state.contractPrice.toFixed(4),"\uff0c\u5408\u540c\u4ef7\u603b\u8ba1\uff1a",this.state.totalPrice.toFixed(4)]},void 0,!0,{fileName:Si,lineNumber:279,columnNumber:13},this):null,Object(h.jsxDEV)("div",{className:"code-table",children:Object(h.jsxDEV)(I,{isMultiple:!0,spliteColor:"#fff",dataCount:this.state.dataCount,tableData:this.state.tableData,Column:wi,countbarVisible:!1,isSwitch:!1,maxheight:this.state.tableHeight,pageChange:e=>{this.onPageChange(e)},countChange:e=>{this.onCountChange(e)},checkChange:this.selection.bind(this),ComponentHandler:(e,t)=>"status"==e?Object(h.jsxDEV)(me.a,{theme:"blue",outline:!0,children:t.status},void 0,!1,{fileName:Si,lineNumber:325,columnNumber:21},this):"opearo"==e?Object(h.jsxDEV)(h.Fragment,{children:1==this.state.isCombining?Object(h.jsxDEV)("span",{className:"grid-link",style:{color:"red"},onClick:e=>this.deleteFn(e,t),children:"\u5220\u9664"},void 0,!1,{fileName:Si,lineNumber:334,columnNumber:25},this):Object(h.jsxDEV)("span",{className:"grid-link",style:{color:"rgb(216, 219, 221)"},children:"\u5220\u9664"},void 0,!1,{fileName:Si,lineNumber:342,columnNumber:25},this)},void 0,!1):void 0},void 0,!1,{fileName:Si,lineNumber:306,columnNumber:13},this)},void 0,!1,{fileName:Si,lineNumber:305,columnNumber:11},this)]},void 0,!0,{fileName:Si,lineNumber:262,columnNumber:9},this)},void 0,!1,{fileName:Si,lineNumber:261,columnNumber:7},this)}}var Ti=i(519),Ii=i(520),Fi=i(478);i(234);const Li={code_name:[{type:"required",message:"\u8bf7\u8f93\u5165\u5151\u6362\u7801\u540d\u79f0"}],planSelect:[{type:"required",message:"\u8bf7\u9009\u62e9\u5f52\u5c5e\u8ba1\u5212"}],keyBatchSelect:[{type:"required",message:"\u8bf7\u9009\u62e9\u5f52\u5c5eKey"}],issued:[{type:"required",message:"\u8bf7\u8f93\u5165\u53d1\u653e\u603b\u91cf"}],restrict:[{type:"required",message:"\u8bf7\u8f93\u5165\u7ed1\u5b9a\u6570\u91cf"},{type:"regExp",message:"\u8bf7\u8f93\u5165\u5927\u4e8e0\u7684\u6b63\u6574\u6570",reg:"^[0-9]*[1-9][0-9]*$"}]},Hi={date_time:[{type:"required",message:"\u8bf7\u9009\u62e9\u751f\u6548\u65f6\u95f4\u6bb5"}]},qi=[{title:"\u5546\u54c1ID",name:"product_id",prop:"product_id",width:"auto",type:"normal"},{title:"\u5546\u54c1\u540d\u79f0",width:"auto",prop:"product_name",name:"product_name",type:"normal"},{title:"\u603b\u9884\u7b97",name:"all_budget",prop:"all_budget",type:"normal",width:"auto"},{title:"\u5408\u540c\u5355\u4ef7",name:"contract_price",prop:"contract_price",type:"normal",width:"auto"},{title:"\u5546\u54c1\u5b98\u65b9\u4ef7",type:"normal",prop:"official_price",width:"auto"},{title:"\u7c7b\u578b",width:"auto",prop:"type",name:"type",type:"slot"},{title:"\u4e0a\u6e38\u5e73\u53f0",width:"auto",prop:"upstream",name:"upstream",type:"normal"},{title:"\u6279\u6b21\u53f7",width:"auto",prop:"channel_activity_id",name:"channel_activity_id",type:"normal"},{title:"\u6709\u6548\u65f6\u95f4\u6bb5",width:"auto",prop:"effectDate",name:"effectDate",type:"normal"},{title:"\u5f53\u524d\u6210\u672c\u4ef7\u683c",prop:"cost_price",name:"cost_price",width:"auto",type:"slot"},{title:"\u5e93\u5b58\u603b\u6570\u91cf",prop:"quantity",name:"quantity",type:"normal",width:"auto"},{title:"\u5269\u4f59\u6570\u91cf",prop:"stock",name:"stock",type:"normal",width:"auto"},{title:"\u5df2\u4f7f\u7528\u6570\u91cf",prop:"usage",name:"usage",type:"normal",width:"auto"},{title:"\u64cd\u4f5c",prop:"edit",name:"edit",type:"slot",width:"auto"}];function Mi(e){const t={},i="1"===e.cash_amount_type?e.denomination:`${e.min_denomination}~${e.max_denomination}`;return t.product_name=e.batch_goods_name,t.channel_activity_id=e.cash_activity_id,t.cash_activity_id=e.cash_activity_id,t.only=e.cash_activity_id,t.type=3,t.checked=null===e||void 0===e?void 0:e.checked,t.upstream=P(e.channel),t.edit="edit",t.all_budget=e.all_budget,t.effectDate=e.begin_time+" \u81f3 "+e.end_time,t.contract_price=(e.total_contract_price/e.num).toFixed(2),t.cost_price=i,t.official_price=i,t.quantity=e.total_stock||e.num,t.stock=e.stock||e.num,t.usage=e.usage||0,t.id=e.goods_id||e.id,t.product_id=e.goods_id||"-",t.origin=e,t}function Pi(e){var t,i;const a=parseInt(L(e.all_budget,F(e.reduce_amount,e.send_num))),s={};return s.product_name=e.batch_goods_name||e.product_name,s.channel_activity_id=e.channel_activity_id,s.only=e.channel_activity_id,s.type=2,s.checked=null===e||void 0===e?void 0:e.checked,s.upstream=P(e.channel),s.edit="edit",s.all_budget=e.all_budget,s.effectDate=e.effectDate||(null===(t=e.time_limit)||void 0===t?void 0:t.effect_time.start_time)+" \u81f3 "+(null===(i=e.time_limit)||void 0===i?void 0:i.effect_time.end_time),s.contract_price=e.contract_price||e.price,s.official_price=e.official_price||e.reduce_amount,s.quantity=e.quantity||a,s.stock=e.stock||a,s.usage=e.usage||0,s.origin=e,s.id=e.goods_id||e.id,s.product_id=e.goods_id||"-",s}var Bi="/Users/zhangds/web/blue-brother/frontend/src/pages/exchangecode/exchangecodeAdd/index.jsx";const Ai=e=>Array.from({length:e},((e,t)=>t));let zi="";class Ji extends m.a.Component{constructor(e){super(e),this.onDisabledTime=e=>{let t=JSON.parse(sessionStorage.getItem("knockGold_effectDate"));const i=new Date(t.begin_time),a=i.getHours(),s=i.getMinutes(),l=i.getSeconds();return Object(R.a)(e,i)?{disabledHours:()=>Ai(a),disabledMinutes:e=>e===a?Ai(s):[],disabledSeconds:(e,t)=>e===a&&t===s?Ai(l):[]}:{}},this.onDisabledRange=(e,t)=>{let i=!1,a=Y()(e).format("YYYY-MM-DD HH:mm:ss");const s=Y()(this.state.plan_time[1]).format("HH:mm:ss");return"start"===t&&(i=s<"23:59:59"?Y()(a).isBefore(this.state.plan_time[0])||Y()(a).subtract(1,"days").isAfter(this.state.plan_time[1]):Y()(a).isBefore(this.state.plan_time[0])||Y()(a).isAfter(this.state.plan_time[1])),"end"===t&&(i=Y()(a).add(1,"days").isBefore(this.state.plan_time[0])||Y()(a).isAfter(this.state.plan_time[1])),i},this.state={uploading:!1,model:{product_id:"",product_type:"1",contract_price:"",official_price:"",cost_price:"",quantity:"",product_name:"",show_url:"",describe_url:"",detail_url:"",weight:"0"},codeInfo:{code_name:"",issued:"",describe:"",date_time:"",range:"",stock:"",planSelect:"",keyBatchSelect:"",restrict:""},isload:!1,tempdata:[],oldProduct:[],deleteProduct:[],new_product:[],cur_product:null,productOption:[],rankoptions:[],rank:[],recall_visible:!1,approvalLoading:!1,timer:3,payType:3,reseller:null,payment_direction:["\u5bf9\u79c1\u8d26\u6237","\u5bf9\u516c\u8d26\u6237","\u9884\u4ed8\u6b3e\u6263\u9664"],isAudit:!1,approvalsStatus:!1,oldTable:[],product_title:"\u65b0\u5efa\u5546\u54c1",plan_time:"",direct_reseller_id:0,newGoodsBtnLoading:!1,tableLoading:!1,addIsType:1,isState:0,planSelectData:[],keyBatchSelectData:[],codeStatus:"",productData:null,settlement_type:0,isSettlement:2,settlementData:null}}componentDidMount(){const e=~~sessionStorage.getItem("isState");zi=~~sessionStorage.getItem("code_id"),this.setState({isState:e}),e&&this.getDetailFunction(e),2!==e&&(sessionStorage.setItem("productData",[]),sessionStorage.setItem("knockGoldData",[]),sessionStorage.setItem("redPacketsData",[]),this.getPlanSelect())}getPlanSelect(){Object(a.Oc)({bind_object:"1"}).then((e=>{Object(a.Tb)(e,((e,t)=>{const i=e.filter((e=>e.settlement_type<=0)).map((e=>({key:e.id,text:e.title,...e})));this.setState({planSelectData:i})}),(e=>{c.a.error(e)}))}))}getKeyBatchSelect(e){Object(a.Nc)({status:"4,5",plan_id:e,bind_object:1}).then((e=>{Object(a.Tb)(e,((e,t)=>{const i=e.map((e=>({key:e.id,text:e.batch_name,...e})));this.setState({keyBatchSelectData:i})}),(e=>{c.a.error(e)}))}))}getResellerFunction(e){Object(a.vb)(e).then((e=>{Object(a.Tb)(e,((e,t)=>{let i={id:e.id,name:e.name,company_name:e.company_name,receive_email:e.contact_email[0]};this.setState({direct_reseller_id:e.direct_reseller_id,reseller:i})}))}))}getDetailFunction(){Object(a.T)(zi).then((e=>{Object(a.Tb)(e,(e=>{let t=Object(de.a)(e);this.codeStatus=e.status;const i=this.transFormData(t.goods);t.goods=i;let a={code_name:t.title,issued:t.quantity,stock:t.stock,restrict:t.restrict,describe:t.describe,date_time:[t.begin_time,t.end_time],range:[],planSelect:{key:e.plan.id,text:e.plan.title},keyBatchSelect:{key:e.key_batch_id,text:e.key_batch.batch_name}};const s=[];if(i.length>0){let e=[],t=[];a.range=i.map((i=>{null!==i&&void 0!==i&&i.id?(s.push({key:i.only,text:i.product_name,id:i.id}),i.checked=!0,t.push(i.id)):(i.checked=!1,e.push(i.only))})),this.setState({new_product:e,oldProduct:t})}1===this.state.isState&&(a.code_name=`${t.title}_${t.copy_count+1}`.substring(0,12)),this.getResellerFunction(t.plan.reseller_id);let l=[];Object(f.a)(t.goods,(e=>{let t={};return t.key=e.only,t.text=e.product_name,t.id=e.id,l.push(t),t})),this.setState({codeInfo:a,isload:!0,tempdata:t.goods||[],plan_time:[t.plan.begin_time,t.plan.end_time],rank:s,rankoptions:l,settlement_type:t.plan.settlement_type,isSettlement:t.plan.settlement_type>0?1:2,settlementData:t.plan.settlement_type>0?{key:t.plan.settlement_type}:null})}),(e=>{}))})).catch((e=>{}))}getTableList(){if(sessionStorage.getItem("addMoneyData")){const e=JSON.parse(sessionStorage.getItem("addMoneyData")),t=Object(de.a)(this.state.tempdata).map((t=>(e.map((e=>{t.channel_activity_id===e.channel_activity_id&&(t.origin.recharge_amount=e.recharge_amount)})),t)));this.setState({tempdata:t})}}transFormData(e){const t=[],i=[],a=[],s=[];return e.legal.map((e=>{var a;e.type=1,e.only=e.product_id,e.upstream="\u76f4\u8fde\u5929\u4e0b",[0,1].includes(this.state.isState)&&(e.stock=e.quantity,e.usage=0),2===this.state.isState&&(e.stock=e.stock||e.quantity,e.usage=e.usage||0),null!==(a=e)&&void 0!==a&&a.goods_id&&(e.id=e.goods_id),1===this.state.isState&&(e=Object(o.a)(e,["code_batch_id"])),t.push(e),i.push(e)})),e.reduce.map((e=>{2===this.state.isState&&(e.quantity=e.total_stock,e.usage=e.use_stock);let i=Pi(e);if(1===this.state.isState){const t=parseInt(L(e.all_budget,F(e.reduce_amount,e.send_num)));i.quantity=t,i.stock=t,i.usage=0,i.origin=Object(o.a)(e,["id","total_stock","use_stock","stock","goods_id"]),i=Object(o.a)(i,["product_id"])}if(2===this.state.isState){i.stock=e.stock,i.quantity=e.total_stock;const t=["total_stock","use_stock"];i.origin=Object(o.a)(e,t),i=Object(o.a)(i,t)}t.push(i),a.push(i.origin)})),e.cash.map((e=>{2===this.state.isState&&(e.quantity=e.total_stock,e.usage=e.use_stock);let i=Mi(e);if(1===this.state.isState&&(i.stock=e.num,i.usage=0,i.origin.copy=!0,i.origin=Object(o.a)(e,["id","total_stock","use_stock","stock","goods_id","update_time","delete_time"]),i=Object(o.a)(i,["product_id"])),2===this.state.isState){i.stock=e.stock,i.quantity=e.total_stock;const t=["total_stock","use_stock"];i.origin=Object(o.a)(e,t),i=Object(o.a)(i,t)}t.push(i),s.push(i.origin)})),sessionStorage.setItem("productData",JSON.stringify(i)),sessionStorage.setItem("knockGoldData",JSON.stringify(a)),sessionStorage.setItem("redPacketsData",JSON.stringify(s)),t}onRankChange(e){Object(Ti.a)(this.state.tempdata,(t=>{t.checked=e.findIndex((e=>e.key==t.only))>-1})),this.setState({tempdata:this.state.tempdata}),this.setState({rank:e})}cancel(){G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:"\u662f\u5426\u53d6\u6d88\u672c\u6b21\u64cd\u4f5c\uff1f"},void 0,!1,{fileName:Bi,lineNumber:361,columnNumber:16},this),onConfirm:()=>{window.location.replace("#/home/exchangecode-list")},onCancel:this.onCancel,className:"questModal",parentComponent:this})}buildData(){let e=[];Object(f.a)(this.state.rank,(t=>{e.push(t.text)}));let t=this.refs.tempdata.getSelectData(),i=t.filter((e=>this.state.oldProduct.indexOf(e.id)<0)),a=[],s=[];Object(f.a)(t,(e=>{if(this.state.oldProduct.indexOf(e.id)>-1){a.push(e.id);let t={};1===e.type?(t.contract_price=e.contract_price,t.cost_price=e.cost_price,t.describe_url=e.describe_url,t.official_price=e.official_price,t.product_id=e.product_id,t.account_type=e.account_type,t.product_name=e.product_name,t.product_type=e.product_type,t.weight=e.weight,t.quantity=e.quantity,t.show_url=e.show_url,t.end_time=e.end_time,t.detail_url=e.detail_url,t.map_product_name=e.map_product_name,t.goods_id=e.goods_id,t.type=e.type):t={...e.origin,type:e.type},s.push(t)}}));let l=Object(Ii.a)(this.state.oldProduct,a,Fi.a);l=l.filter((e=>this.state.new_product.indexOf(e)<0)),this.state.deleteProduct.length>0&&(l=l.concat(this.state.deleteProduct).map(Number)),a=Object(f.a)(s,(e=>e.only)),l=Object(_.a)(l,(e=>a.indexOf(e)<0));const n={legal:[],reduce:[],cash:[]};i.map((e=>{2===e.type?e.origin&&n.reduce.push(e.origin):3===e.type?n.cash.push(e.origin):n.legal.push(e)}));const o={legal:[],reduce:[],cash:[]};return s.map((e=>{2===e.type?o.reduce.push(e):3===e.type?o.cash.push(e):o.legal.push(e)})),{data:{reseller_id:this.state.reseller.id,reseller_name:this.state.reseller.name,company_name:this.state.reseller.company_name,receive_email:this.state.reseller.receive_email,payment_direction:this.state.payment_direction[this.state.payType-1],title:this.state.codeInfo.code_name,recharge_type:1,range:e,describe:this.state.codeInfo.describe,begin_time:this.state.codeInfo.date_time[0],end_time:this.state.codeInfo.date_time[1],quantity:this.state.codeInfo.issued,new_product:n,update_product:o,delete_product:l},addProduct:i,updateProduct:s}}copyOrAddBuildData(){let e=[];Object(f.a)(this.state.rank,(t=>{e.push(t.text)}));let t=this.refs.tempdata.getSelectData();const i={begin_time:this.state.codeInfo.date_time[0],end_time:this.state.codeInfo.date_time[1],describe:this.state.codeInfo.describe,quantity:this.state.codeInfo.issued,range:e.join(),recharge_type:1,title:this.state.codeInfo.code_name,restrict:this.state.codeInfo.restrict,product:{legal:t.filter((e=>{if(1==e.type)return Object(o.a)(e,["type","only","id","goods_id"])})),reduce:t.filter((e=>2===e.type)).map((e=>Object(o.a)(e.origin,["goods_id"]))),cash:t.filter((e=>3===e.type)).map((e=>e.origin))}};return 1===this.state.isState&&(i.copy_code_batch_id=zi),{code_batch:[i],reseller_id:this.state.reseller.id,reseller_name:this.state.reseller.name,company_name:this.state.reseller.company_name,receive_email:this.state.reseller.receive_email,payment_direction:this.state.payment_direction[this.state.payType-1],addCode:!0}}submitCodeData(){if(!this.state.reseller)return void c.a.error("\u8be5\u5151\u6362\u7801\u5bf9\u5e94\u5206\u9500\u5546\u4e0d\u5b58\u5728");let{data:e}=this.buildData();Object(a.xc)(zi,e).then((e=>{Object(a.Tb)(e,((e,t)=>{let i=this.state.model;i.show_url=e.path,this.setState({model:i}),c.a.clear(),c.a.success(t),setTimeout((()=>{window.location.replace("#/home/exchangecode-list")}),1e3)}),(e=>{c.a.error(e)}))}))}submitCopyOrAddCodeData(){let e=this.copyOrAddBuildData(),t=sessionStorage.getItem("keyBatch_id");Object(a.Zb)(t,e).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.success("\u6210\u529f\u53d1\u8d77\u5ba1\u6279"),setTimeout((()=>{window.history.back()}),1e3)}),(e=>{c.a.error(e)}))}))}submit(){if(this.refs.code_info.validator()&&this.refs.code_rule.validator())if(2===this.state.isState){if(this.state.uploading)return void c.a.error("\u8fd8\u6709\u56fe\u7247\u4e0a\u4f20\u4e2d\uff0c\u4e0d\u53ef\u63d0\u4ea4");let{data:e,addProduct:t,updateProduct:i}=this.buildData();if([...i,...t].length<1)return c.a.error("\u8bf7\u7ed1\u5b9a\u5bf9\u8c61");if(this.state.settlement_type>0){if([...i,...t].length>1)return void c.a.error("\u5305\u7801\u53ea\u80fd\u521b\u5efa\u4e00\u4e2a\u5546\u54c1")}let s=sessionStorage.getItem("approval_id");Number(s)<=0?Object(a.eb)(zi,e).then((e=>{Object(a.Tb)(e,((e,t)=>{e.is_require_approval?this.setState({audit_visible:!0}):this.submitCodeData()}),(e=>{c.a.error(e)}))})):Object(a.Q)(s).then((t=>{Object(a.Tb)(t,((t,i)=>{0==t.status&&(this.setState({approvalsStatus:!0}),this.setState({recall_visible:!0})),1!=t.status&&2!=t.status&&3!=t.status||Object(a.eb)(zi,e).then((e=>{Object(a.Tb)(e,((e,t)=>{e.is_require_approval?this.setState({audit_visible:!0}):this.submitCodeData()}),(e=>{c.a.error(e)}))}))}),(e=>{c.a.error(e)}))}))}else{let e=this.refs.tempdata.getSelectData();if(this.state.uploading)return c.a.error("\u8fd8\u6709\u56fe\u7247\u4e0a\u4f20\u4e2d\uff0c\u4e0d\u53ef\u63d0\u4ea4");if(e.length<1)return c.a.error("\u8bf7\u7ed1\u5b9a\u5bf9\u8c61");if(!this.state.reseller)return c.a.error("\u8be5\u5151\u6362\u7801\u5bf9\u5e94\u5206\u9500\u5546\u4e0d\u5b58\u5728");this.setState({audit_visible:!0})}}onConfirm(){this.setState({audit_visible:!1}),2!==this.state.isState?this.submitCopyOrAddCodeData():this.submitCodeData()}addProduct(e){let t=this.state.direct_reseller_id;if(!this.state.isState&&!this.state.codeInfo.planSelect.key)return c.a.error("\u8bf7\u9009\u62e9\u5f52\u5c5e\u8ba1\u5212");if(!t)return c.a.error("\u8bf7\u6dfb\u52a0\u6620\u5c04\u5206\u9500\u5546");let i="";switch(e){case 1:i="\u65b0\u5efa\u5546\u54c1";break;case 2:i="\u65b0\u589e\u7acb\u51cf\u91d1";break;case 3:i="\u65b0\u589e\u7ea2\u5305"}this.setState({productData:null,drawerVisible:!0,addIsType:e,product_title:i})}async productEditShow(e){if(!this.state.direct_reseller_id)return c.a.error("\u8bf7\u6dfb\u52a0\u6620\u5c04\u5206\u9500\u5546");1===e.type?this.setState({product_title:"\u7f16\u8f91\u5546\u54c1",productData:e,addIsType:1}):2===e.type?this.setState({product_title:"\u7f16\u8f91\u7acb\u51cf\u91d1",productData:e.origin,addIsType:2}):this.setState({product_title:"\u7f16\u8f91\u7ea2\u5305",productData:e.origin,addIsType:3}),this.setState({drawerVisible:!0})}switchProductType(){switch(this.state.addIsType){case 1:const{tempdata:e,productData:t,direct_reseller_id:i}=this.state,a=e.map((e=>1===e.type&&e.product_id)),s=t?t.product_type:1;return Object(h.jsxDEV)(xt,{ref:"product",checkedProduct:a,productData:t,directResellerId:i,productType:s,isSettlement:this.state.isSettlement,settlementData:this.state.settlementData},void 0,!1,{fileName:Bi,lineNumber:744,columnNumber:11},this);case 2:return Object(h.jsxDEV)(qe,{ref:"knockGold",data:this.state.productData},void 0,!1,{fileName:Bi,lineNumber:755,columnNumber:16},this);case 3:return Object(h.jsxDEV)(ht,{ref:"redPackets",data:this.state.productData},void 0,!1,{fileName:Bi,lineNumber:757,columnNumber:16},this)}}onChangeCombinedDate(e){let t=this.state.codeInfo;t.date_time=e,this.setState({codeInfo:t})}async productSubmit(){let e="";if(e=1===this.state.addIsType?await this.refs.product.submit():2===this.state.addIsType?await this.refs.knockGold.submit():await this.refs.redPackets.submit(),e){this.setState({drawerVisible:!1});let e=[],t=[],i=[];if(1===this.state.addIsType){const e=await this.refs.product.getFormModel();i=this.state.tempdata;let a=this.state.tempdata.findIndex((t=>t.product_id==e.product_id));a>-1?(e.stock=e.quantity-i[a].usage,i[a]=Object.assign(i[a],e)):(e.type=1,e.upstream="\u76f4\u8fde\u5929\u4e0b",e.only=e.product_id,e.stock=e.quantity,e.usage=0,t.push(e))}else 2===this.state.addIsType?(e=JSON.parse(sessionStorage.getItem("knockGoldData")),i=this.state.tempdata.filter((e=>2!==e.type)),t=Object(f.a)(e,(e=>{let t=this.state.tempdata.findIndex((t=>t.channel_activity_id===e.channel_activity_id));return t>-1&&(e.checked=this.state.tempdata[t].checked),Pi(e)}))):(e=JSON.parse(sessionStorage.getItem("redPacketsData")),i=this.state.tempdata.filter((e=>3!==e.type)),t=Object(f.a)(e,((e,t)=>{let i=this.state.tempdata.findIndex((t=>t.cash_activity_id===e.cash_activity_id));return i>-1&&(e.checked=this.state.tempdata[i].checked),e.copy=!1,Mi(e)})));let a=te(t.concat(i),"only"),s=[],l=[];Object(f.a)(a,(e=>{s.push({key:e.only,text:e.product_name}),e.checked&&l.push({key:e.only,text:e.product_name})})),s=te(s,"key"),this.setState({tempdata:a,rankoptions:s,rank:l}),this.getTableList()}}onReCall(){let e=sessionStorage.getItem("approval_id");this.setState({recall_visible:!1}),Object(a.bd)(e).then((e=>{Object(a.Tb)(e,((e,t)=>{this.setState({approvalLoading:!0});let i=setInterval((()=>{this.state.timer<=0&&(clearInterval(i),this.setState({approvalLoading:!1}),c.a.success("\u64a4\u9500\u6210\u529f,\u8bf7\u91cd\u65b0\u63d0\u4ea4\u5ba1\u6838"));let e=this.state.timer-1;this.setState({timer:e})}),1e3)}),(e=>{c.a.error(e)}))}))}handleChange(e,t){let i=this.state.codeInfo;i[t]=e,this.setState({codeInfo:i})}vestingPlanFunction(e){if(null===e||void 0===e||!e.key)return;this.getKeyBatchSelect(e.key),this.getResellerFunction(e.reseller_id),this.handleChange("","keyBatchSelect"),this.setState({plan_time:[e.begin_time,e.end_time]});const t={begin_time:e.begin_time,end_time:e.end_time};sessionStorage.setItem("knockGold_effectDate",JSON.stringify(t)),sessionStorage.setItem("redPackets_effectDate",JSON.stringify(t))}render(){return Object(h.jsxDEV)("div",{id:"editcode",children:[Object(h.jsxDEV)("div",{children:Object(h.jsxDEV)(d.a,{style:{width:"90%",margin:"10px auto"},title:"\u57fa\u672c\u4fe1\u606f",children:Object(h.jsxDEV)("div",{className:"addcode",children:Object(h.jsxDEV)(l.a,{model:this.state.codeInfo,rules:Li,ref:"code_info",className:"addform",children:[Object(h.jsxDEV)(s.a,{labelname:"\u5f52\u5c5e\u8ba1\u5212",prop:"planSelect",id:"planSelect",children:Object(h.jsxDEV)(X.a,{onChange:e=>{this.handleChange(e,"planSelect"),this.vestingPlanFunction(e)},clearable:!0,value:this.state.codeInfo.planSelect,options:this.state.planSelectData,placeholder:"\u8bf7\u9009\u62e9",labelWidth:"0px",height:"36px",width:"520px",disabled:this.state.isState,alignment:"left"},void 0,!1,{fileName:Bi,lineNumber:953,columnNumber:19},this)},void 0,!1,{fileName:Bi,lineNumber:952,columnNumber:17},this),Object(h.jsxDEV)(s.a,{labelname:"\u5f52\u5c5ekey",prop:"keyBatchSelect",id:"keyBatchSelect",children:Object(h.jsxDEV)(X.a,{onChange:e=>{this.handleChange(e,"keyBatchSelect"),sessionStorage.setItem("keyBatch_id",null===e||void 0===e?void 0:e.id)},clearable:!0,value:this.state.codeInfo.keyBatchSelect,options:this.state.keyBatchSelectData,placeholder:"\u8bf7\u9009\u62e9",labelWidth:"0px",height:"36px",width:"520px",disabled:this.state.isState,alignment:"left"},void 0,!1,{fileName:Bi,lineNumber:971,columnNumber:19},this)},void 0,!1,{fileName:Bi,lineNumber:970,columnNumber:17},this),Object(h.jsxDEV)(s.a,{labelname:"\u5151\u6362\u7801\u540d\u79f0",prop:"code_name",id:"code_name",children:Object(h.jsxDEV)(n.a,{onChange:e=>this.handleChange(e,"code_name"),onClearItem:()=>this.handleChange("","code_name"),value:this.state.codeInfo.code_name,placeholder:"\u8bf7\u8f93\u5165\u5151\u6362\u7801\u540d\u79f0",labelWidth:"0px",maxLength:12,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:Bi,lineNumber:990,columnNumber:19},this)},void 0,!1,{fileName:Bi,lineNumber:989,columnNumber:17},this),2!==this.state.isState?Object(h.jsxDEV)(s.a,{labelname:"\u7ed1\u5b9a\u6570",prop:"restrict",id:"restrict",children:Object(h.jsxDEV)(n.a,{onChange:e=>this.handleChange(e,"restrict"),onClearItem:()=>this.handleChange("","restrict"),value:this.state.codeInfo.restrict,placeholder:"\u8bf7\u8f93\u5165\u7ed1\u5b9a\u6570\u91cf",labelWidth:"0px",maxLength:6,countShow:!1,unit:"\u6761",height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:Bi,lineNumber:1005,columnNumber:21},this)},void 0,!1,{fileName:Bi,lineNumber:1004,columnNumber:19},this):null,2===this.state.isState?Object(h.jsxDEV)(h.Fragment,{children:[Object(h.jsxDEV)(s.a,{labelname:"\u53d1\u653e\u603b\u91cf",prop:"issued",id:"issued",children:Object(h.jsxDEV)("div",{className:"line",children:this.state.codeInfo.issued},void 0,!1,{fileName:Bi,lineNumber:1024,columnNumber:23},this)},void 0,!1,{fileName:Bi,lineNumber:1023,columnNumber:21},this),Object(h.jsxDEV)(s.a,{labelname:"\u5269\u4f59\u5e93\u5b58\u91cf",prop:"stock",id:"stock",children:Object(h.jsxDEV)("div",{className:"line",children:this.state.codeInfo.stock},void 0,!1,{fileName:Bi,lineNumber:1027,columnNumber:23},this)},void 0,!1,{fileName:Bi,lineNumber:1026,columnNumber:21},this)]},void 0,!0):Object(h.jsxDEV)(s.a,{labelname:"\u53d1\u653e\u603b\u91cf",prop:"issued",id:"issued",children:Object(h.jsxDEV)(n.a,{onChange:e=>this.handleChange(e,"issued"),onClearItem:()=>this.handleChange("","issued"),value:this.state.codeInfo.issued,placeholder:"\u8bf7\u8f93\u5165\u53d1\u653e\u603b\u91cf",labelWidth:"0px",maxLength:6,countShow:!1,unit:"\u6761",height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:Bi,lineNumber:1032,columnNumber:21},this)},void 0,!1,{fileName:Bi,lineNumber:1031,columnNumber:19},this),Object(h.jsxDEV)(s.a,{labelname:"\u4f7f\u7528\u8bf4\u660e",prop:"describe",id:"describe",required:!1,children:Object(h.jsxDEV)(Di.a,{type:"textarea",autoSize:!0,width:"520px",maxLength:100,value:this.state.codeInfo.describe,onChange:e=>this.handleChange(e.target.value,"describe"),maxCharacterCount:100,showCount:!0},void 0,!1,{fileName:Bi,lineNumber:1049,columnNumber:19},this)},void 0,!1,{fileName:Bi,lineNumber:1048,columnNumber:17},this)]},void 0,!0,{fileName:Bi,lineNumber:946,columnNumber:15},this)},void 0,!1,{fileName:Bi,lineNumber:945,columnNumber:13},this)},void 0,!1,{fileName:Bi,lineNumber:944,columnNumber:11},this)},void 0,!1,{fileName:Bi,lineNumber:943,columnNumber:9},this),Object(h.jsxDEV)("div",{children:Object(h.jsxDEV)(d.a,{style:{width:"90%",margin:"10px auto"},title:"\u57fa\u672c\u89c4\u5219",children:Object(h.jsxDEV)("div",{children:Object(h.jsxDEV)(l.a,{model:this.state.codeInfo,rules:Hi,ref:"code_rule",className:"addform",children:[Object(h.jsxDEV)(s.a,{labelname:"\u751f\u6548\u65f6\u95f4\u6bb5",prop:"date_time",id:"date_time",children:Object(h.jsxDEV)(ee.a,{className:"zent-datepicker-plan",showTime:{format:"HH:mm:ss",defaultTime:["00:00:00","23:59:59"]},disabled:[2===this.state.isState&&[1,2,3,7].includes(this.codeStatus),!1],format:"YYYY-MM-DD HH:mm:ss",value:this.state.codeInfo.date_time,onChange:e=>{$t.a.emit("change","date_time",e),this.onChangeCombinedDate(e)},width:245,disabledTime:this.onDisabledTime,disabledDate:this.onDisabledRange},void 0,!1,{fileName:Bi,lineNumber:1074,columnNumber:19},this)},void 0,!1,{fileName:Bi,lineNumber:1073,columnNumber:17},this),Object(h.jsxDEV)(s.a,{labelname:"\u5546\u54c1\u8303\u56f4",prop:"rank",id:"rank",children:Object(h.jsxDEV)("div",{className:"goods-boxs",children:[Object(h.jsxDEV)(X.a,{options:this.state.rankoptions,multiple:!0,value:this.state.rank,placeholder:"\u9009\u62e9\u4e00\u9879",width:410,onChange:e=>{this.onRankChange(e)}},void 0,!1,{fileName:Bi,lineNumber:1097,columnNumber:21},this),Object(h.jsxDEV)(u.a,{type:"primary",style:{marginLeft:"20px"},onClick:()=>{this.addProduct(1)},disabled:1===this.state.isSettlement&&this.state.settlementData&&(8===this.state.settlementData.key||9===this.state.settlementData.key),children:"\u65b0\u5efa\u5546\u54c1"},void 0,!1,{fileName:Bi,lineNumber:1107,columnNumber:21},this),Object(h.jsxDEV)(u.a,{type:"primary",style:{marginLeft:"20px"},onClick:()=>{this.addProduct(2)},disabled:!JSON.parse(sessionStorage.getItem("isEarlyWarningMan"))||1===this.state.isSettlement&&this.state.settlementData&&7===this.state.settlementData.key,children:"\u65b0\u5efa\u7acb\u51cf\u91d1"},void 0,!1,{fileName:Bi,lineNumber:1121,columnNumber:21},this),Object(h.jsxDEV)(u.a,{type:"primary",style:{marginLeft:"20px"},onClick:()=>{this.addProduct(3)},disabled:!JSON.parse(sessionStorage.getItem("isEarlyWarningMan"))||1===this.state.isSettlement&&this.state.settlementData&&(7===this.state.settlementData.key||8===this.state.settlementData.key),children:"\u65b0\u5efa\u7ea2\u5305"},void 0,!1,{fileName:Bi,lineNumber:1136,columnNumber:21},this)]},void 0,!0,{fileName:Bi,lineNumber:1096,columnNumber:19},this)},void 0,!1,{fileName:Bi,lineNumber:1095,columnNumber:17},this),Object(h.jsxDEV)(s.a,{labelname:"",prop:"range",id:"range",children:Object(h.jsxDEV)(I,{ref:"tempdata",headBackgroud:"#f9fafc",isShowPageBar:!1,spliteColor:"#fff",tableData:this.state.tempdata,value:this.state.tempdata,Column:qi,maxheight:200,countbarVisible:!1,isBorder:!0,isSwitch:!1,pageChange:e=>{this.pageChange(e)},checkChange:e=>{let t=[];Object(f.a)(e,(e=>{let i={};return i.key=e.only,i.text=e.product_name,t.push(i),i})),this.setState({rank:t})},ComponentHandler:(e,t)=>"type"==e?Object(h.jsxDEV)(h.Fragment,{children:2===t.type?"\u7acb\u51cf\u91d1":3===t.type?"2"===t.origin.cash_amount_type?"\u968f\u673a\u7ea2\u5305":"\u56fa\u989d\u7ea2\u5305":"\u5546\u54c1"},void 0,!1):"cost_price"==e?Object(h.jsxDEV)(h.Fragment,{children:2===t.type?t.official_price:t.cost_price},void 0,!1):"edit"==e?Object(h.jsxDEV)("a",{className:"grid-link",onClick:e=>{this.productEditShow(t)},children:"\u7f16\u8f91"},void 0,!1,{fileName:Bi,lineNumber:1202,columnNumber:27},this):void 0},void 0,!1,{fileName:Bi,lineNumber:1155,columnNumber:19},this)},void 0,!1,{fileName:Bi,lineNumber:1154,columnNumber:17},this)]},void 0,!0,{fileName:Bi,lineNumber:1067,columnNumber:15},this)},void 0,!1,{fileName:Bi,lineNumber:1066,columnNumber:13},this)},void 0,!1,{fileName:Bi,lineNumber:1065,columnNumber:11},this)},void 0,!1,{fileName:Bi,lineNumber:1064,columnNumber:9},this),Object(h.jsxDEV)(bt.a,{className:"draw",width:"86%",title:this.state.product_title,footer:Object(h.jsxDEV)("div",{style:{textAlign:"center"},children:[Object(h.jsxDEV)(u.a,{type:"primary",onClick:e=>{this.productSubmit()},children:"\u63d0\u4ea4"},void 0,!1,{fileName:Bi,lineNumber:1225,columnNumber:15},this),Object(h.jsxDEV)(u.a,{onClick:e=>{this.setState({drawerVisible:!1}),this.getTableList()},children:"\u53d6\u6d88"},void 0,!1,{fileName:Bi,lineNumber:1233,columnNumber:15},this)]},void 0,!0,{fileName:Bi,lineNumber:1224,columnNumber:13},this),visible:this.state.drawerVisible,onClose:e=>{this.setState({drawerVisible:!1})},maskClosable:!1,children:Object(h.jsxDEV)("div",{className:"draw2",children:Object(h.jsxDEV)(d.a,{style:{width:"95%",margin:"10px auto",border:0},children:this.switchProductType()},void 0,!1,{fileName:Bi,lineNumber:1250,columnNumber:13},this)},void 0,!1,{fileName:Bi,lineNumber:1249,columnNumber:11},this)},void 0,!1,{fileName:Bi,lineNumber:1219,columnNumber:9},this),this.state.audit_visible?Object(h.jsxDEV)("div",{className:"audit",children:[Object(h.jsxDEV)("div",{className:"modal",children:" "},void 0,!1,{fileName:Bi,lineNumber:1258,columnNumber:13},this),Object(h.jsxDEV)("div",{className:"audit-box",children:[Object(h.jsxDEV)(g.a,{type:"close",className:"audit-close",onClick:e=>{this.setState({audit_visible:!1})}},void 0,!1,{fileName:Bi,lineNumber:1260,columnNumber:15},this),Object(h.jsxDEV)("div",{className:"audit-box-title",children:"\u63d0\u4ea4\u5ba1\u6838"},void 0,!1,{fileName:Bi,lineNumber:1267,columnNumber:15},this),Object(h.jsxDEV)("div",{className:"payType",children:Object(h.jsxDEV)(Q.a,{onChange:e=>this.setState({payType:e.target.value}),value:this.state.payType,className:"audit-obj",children:[Object(h.jsxDEV)(Z.a,{value:3,children:"\u9884\u4ed8\u6b3e\u6263\u9664"},void 0,!1,{fileName:Bi,lineNumber:1274,columnNumber:19},this),Object(h.jsxDEV)(Z.a,{value:1,children:"\u5bf9\u79c1\u8d26\u6237"},void 0,!1,{fileName:Bi,lineNumber:1275,columnNumber:19},this),Object(h.jsxDEV)(Z.a,{value:2,children:"\u5bf9\u516c\u8d26\u6237"},void 0,!1,{fileName:Bi,lineNumber:1276,columnNumber:19},this)]},void 0,!0,{fileName:Bi,lineNumber:1269,columnNumber:17},this)},void 0,!1,{fileName:Bi,lineNumber:1268,columnNumber:15},this),Object(h.jsxDEV)("div",{className:"audit-btn-group",children:[Object(h.jsxDEV)(u.a,{onClick:e=>{this.setState({audit_visible:!1})},children:"\u53d6\u6d88"},void 0,!1,{fileName:Bi,lineNumber:1280,columnNumber:17},this),Object(h.jsxDEV)(u.a,{type:"primary",onClick:e=>{this.onConfirm(e)},children:"\u786e\u5b9a"},void 0,!1,{fileName:Bi,lineNumber:1287,columnNumber:17},this)]},void 0,!0,{fileName:Bi,lineNumber:1279,columnNumber:15},this)]},void 0,!0,{fileName:Bi,lineNumber:1259,columnNumber:13},this)]},void 0,!0,{fileName:Bi,lineNumber:1257,columnNumber:11},this):null,this.state.recall_visible?Object(h.jsxDEV)("div",{className:"audit",children:[Object(h.jsxDEV)("div",{className:"modal",children:" "},void 0,!1,{fileName:Bi,lineNumber:1301,columnNumber:13},this),Object(h.jsxDEV)("div",{className:"audit-box",children:[Object(h.jsxDEV)(g.a,{type:"close",className:"audit-close",onClick:e=>{this.setState({recall_visible:!1})}},void 0,!1,{fileName:Bi,lineNumber:1303,columnNumber:15},this),Object(h.jsxDEV)("div",{className:"audit-box-title",children:"\u5f53\u524d\u6b63\u5728\u5ba1\u6838\u4e2d"},void 0,!1,{fileName:Bi,lineNumber:1310,columnNumber:15},this),Object(h.jsxDEV)("div",{className:"audit-box-txt",children:"\u63d0\u4ea4\u5ba1\u6838\u4f1a\u5c06\u539f\u6765\u5ba1\u6279\u64a4\u56de\u624d\u53ef\u8fdb\u884c\u63d0\u4ea4,\u662f\u5426\u64a4\u56de?"},void 0,!1,{fileName:Bi,lineNumber:1311,columnNumber:15},this),Object(h.jsxDEV)("div",{className:"audit-btn-group",children:[Object(h.jsxDEV)(u.a,{onClick:e=>{this.setState({recall_visible:!1})},children:"\u53d6\u6d88"},void 0,!1,{fileName:Bi,lineNumber:1313,columnNumber:17},this),Object(h.jsxDEV)(u.a,{type:"primary",onClick:e=>{this.onReCall(e)},children:"\u786e\u5b9a"},void 0,!1,{fileName:Bi,lineNumber:1320,columnNumber:17},this)]},void 0,!0,{fileName:Bi,lineNumber:1312,columnNumber:15},this)]},void 0,!0,{fileName:Bi,lineNumber:1302,columnNumber:13},this)]},void 0,!0,{fileName:Bi,lineNumber:1300,columnNumber:11},this):null,this.state.approvalLoading?Object(h.jsxDEV)("div",{className:"audit",children:[Object(h.jsxDEV)("div",{className:"modal",children:" "},void 0,!1,{fileName:Bi,lineNumber:1334,columnNumber:13},this),Object(h.jsxDEV)("div",{className:"audit-box",children:[Object(h.jsxDEV)("div",{className:"audit-box-title",children:"\u64a4\u9500\u5ba1\u6279\u4e2d"},void 0,!1,{fileName:Bi,lineNumber:1336,columnNumber:15},this),Object(h.jsxDEV)("div",{className:"audit-box-txt",children:["\u6b63\u5728\u53d1\u8d77\u64a4\u9500...,\u8bf7\u7b49\u5f85 ",Object(h.jsxDEV)("span",{style:{color:"red"},children:[" ",this.state.timer]},void 0,!0,{fileName:Bi,lineNumber:1338,columnNumber:31},this)," \u79d2"]},void 0,!0,{fileName:Bi,lineNumber:1337,columnNumber:15},this)]},void 0,!0,{fileName:Bi,lineNumber:1335,columnNumber:13},this)]},void 0,!0,{fileName:Bi,lineNumber:1333,columnNumber:11},this):null,Object(h.jsxDEV)("div",{className:"edit-btnList",children:[Object(h.jsxDEV)(u.a,{type:"primary",onClick:()=>this.submit(),children:"\u63d0\u4ea4\u5ba1\u6838"},void 0,!1,{fileName:Bi,lineNumber:1345,columnNumber:11},this),Object(h.jsxDEV)(u.a,{type:"normal",onClick:()=>this.cancel(),children:"\u53d6\u6d88"},void 0,!1,{fileName:Bi,lineNumber:1348,columnNumber:11},this)]},void 0,!0,{fileName:Bi,lineNumber:1344,columnNumber:9},this)]},void 0,!0,{fileName:Bi,lineNumber:942,columnNumber:7},this)}}i(136);var Ui="/Users/zhangds/web/blue-brother/frontend/src/components/combining/wangEditor.jsx";class Wi extends m.a.Component{constructor(e){super(e),this.state={editorHtml:"",count:0}}componentDidMount(){let e=this;const t=new xe.a("#wangeditorCombining");this.setState({editor:t}),t.config.colors=["#696969","#9093a2","#fgddbb","#e3e7eb"],t.config.pasteText=!0,t.config.height=200,t.config.showFullScreen=!1,t.config.menus=["bold","foreColor","italic","indent","link","justify"],t.config.onchange=function(i){var a=t.txt.text();if(0==a.length&&e.props.setEdittext(""),a.length>e.props.limitLength){let i=a.slice(0,e.props.limitLength);return e.setState({editorHtml:i}),t.txt.html(i),void e.props.setEdittext(i)}e.setState({count:a.length}),e.setState({editorHtml:i}),e.props.setEdittext(i)},t.create();const i=setTimeout((()=>{t.txt.html(this.props.text),clearTimeout(i)}),500)}render(){return Object(h.jsxDEV)("div",{className:"countBox_par",children:[Object(h.jsxDEV)("div",{id:"wangeditorCombining",style:{width:this.props.width}},void 0,!1,{fileName:Ui,lineNumber:54,columnNumber:9},this),Object(h.jsxDEV)("p",{className:"countBox",children:this.state.count+"/"+this.props.limitLength},void 0,!1,{fileName:Ui,lineNumber:55,columnNumber:9},this)]},void 0,!0,{fileName:Ui,lineNumber:53,columnNumber:7},this)}}i(236);var Ri="/Users/zhangds/web/blue-brother/frontend/src/components/combiningMobile/index.jsx";const Ki=[80,100,100,100,80,24,100,100,100];var Yi=({data:e,products:t})=>{function i(){switch(Number(e.channel)){case 1:return{bg:"#4989f5",title_color:"#fff",banner:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/combining/zfb_common_img_banner.png",goods_bg:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/combining/zfb_redenvelope_img.png",footer_top:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/combining/zfb_common_img_top.png",footer_middle:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/combining/zfb_common_img_middle.png",footer_bottom:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/combining/zfb_common_img_d.png",footer_color:"#4989F5",notis_color:"#FF486D",goods_a:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/combining/zfb_redenvelope_tobeused.png",goods_b:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/combining/zfb_redenvelope_overdue.png"};case 2:return{bg:"#cee5be",title_color:"#239700",banner:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/combining/wx_common_img_banner.png",goods_bg:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/combining/wx_redenvelope_img.png",footer_top:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/combining/wx_common_img_top.png",footer_middle:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/combining/wx_common_img_middle.png",footer_bottom:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/combining/wx_common_img_d.png",footer_color:"#5eb145",time_color:"#5eb145",notis_color:"#239700",goods_a:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/combining/zfb_redenvelope_tobeused.png",goods_b:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/combining/zfb_redenvelope_overdue.png"};case 3:return{bg:"#ff4830",title_color:"#FF3024",banner:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/combining/ysf_common_img_banner.png",goods_bg:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/combining/ysf_redenvelope_img.png",footer_top:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/combining/ysf_common_img_top.png",footer_middle:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/combining/ysf_common_img_middle.png",footer_bottom:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/combining/ysf_common_img_d.png",footer_color:"#FF4901",notis_color:"#FFD3D8",goods_a:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/combining/ysf_redenvelope_tobeused.png",goods_b:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/combining/ysf_redenvelope_overdue.png"};default:return{}}}return Object(h.jsxDEV)("div",{id:"combiningMobile",children:Object(h.jsxDEV)("div",{className:"content",style:{background:i().bg},children:[Object(h.jsxDEV)("img",{className:"banner",src:i().banner,alt:""},void 0,!1,{fileName:Ri,lineNumber:107,columnNumber:9},void 0),Object(h.jsxDEV)("div",{className:"box",children:[Object(h.jsxDEV)("div",{className:"box-cotent",children:[Object(h.jsxDEV)("div",{className:"goods-box",style:{backgroundImage:`url(${i().goods_bg})`,paddingTop:1==e.channel?"28px":2==e.channel?"16px":"20px"},children:[Object(h.jsxDEV)("p",{className:"title",style:{color:i().title_color},children:e.code_name||"\u7acb\u51cf\u91d1\u7ec4\u5408\u5546\u54c1"},void 0,!1,{fileName:Ri,lineNumber:117,columnNumber:15},void 0),Object(h.jsxDEV)("ul",{className:"g-b-u",style:{marginLeft:1==e.channel?"12px":"14px",marginTop:2==e.channel?"12px":"28px"},children:t.map((e=>Object(h.jsxDEV)("li",{style:{backgroundImage:`url(${i().goods_b})`},"v-for":"item in goods.product",children:[Object(h.jsxDEV)("p",{className:"g-b-u-t",children:"\u7acb\u51cf\u91d1"},void 0,!1,{fileName:Ri,lineNumber:135,columnNumber:21},void 0),Object(h.jsxDEV)("p",{className:"money",children:[Object(h.jsxDEV)("span",{children:"\uffe5"},void 0,!1,{fileName:Ri,lineNumber:137,columnNumber:23},void 0),e.origin.reduce_amount]},void 0,!0,{fileName:Ri,lineNumber:136,columnNumber:21},void 0),Object(h.jsxDEV)("p",{className:"reduce",children:["\u6ee1",e.origin.denomination,"\u53ef\u7528"]},void 0,!0,{fileName:Ri,lineNumber:140,columnNumber:21},void 0),Object(h.jsxDEV)("p",{className:"g-b-but","v-if":"goods.receive_status==1",children:["\u5f85\u9886\u53d6(0/",e.send_num,")"]},void 0,!0,{fileName:Ri,lineNumber:141,columnNumber:21},void 0)]},e.channel_activity_id,!0,{fileName:Ri,lineNumber:128,columnNumber:19},void 0)))},void 0,!1,{fileName:Ri,lineNumber:120,columnNumber:15},void 0),Object(h.jsxDEV)("p",{className:"notis",style:{color:i().notis_color,marginBottom:1!=e.channel&&"18px"},children:"\u6ed1\u52a8\u67e5\u770b\u66f4\u591a"},void 0,!1,{fileName:Ri,lineNumber:147,columnNumber:15},void 0)]},void 0,!0,{fileName:Ri,lineNumber:110,columnNumber:13},void 0),3==e.channel||1==e.channel&&2==e.receive_mode?Object(h.jsxDEV)("p",{className:"g_b_title",children:[Object(h.jsxDEV)("img",{src:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/combining/ysf_title_icon.png",alt:""},void 0,!1,{fileName:Ri,lineNumber:160,columnNumber:17},void 0),1==e.channel?"\u652f\u4ed8\u5b9d\u8d26\u53f7":"\u4e91\u95ea\u4ed8\u8d26\u53f7",Object(h.jsxDEV)("img",{src:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/combining/ysf_title_icon.png",alt:""},void 0,!1,{fileName:Ri,lineNumber:165,columnNumber:17},void 0)]},void 0,!0,{fileName:Ri,lineNumber:159,columnNumber:15},void 0):null,3==e.channel||1==e.channel&&2==e.receive_mode?Object(h.jsxDEV)(h.Fragment,{children:[Object(h.jsxDEV)("input",{type:"text",maxlength:"50",readOnly:!0,placeholder:3==e.channel?"\u8bf7\u8f93\u5165\u624b\u673a\u53f7":"\u8bf7\u8f93\u5165\u8d26\u53f7","v-model":"form.confirm"},void 0,!1,{fileName:Ri,lineNumber:173,columnNumber:17},void 0),Object(h.jsxDEV)("input",{type:"text",maxlength:"50",readOnly:!0,placeholder:3==e.channel?"\u8bf7\u518d\u6b21\u8f93\u5165\u624b\u673a\u53f7":"\u8bf7\u518d\u6b21\u8f93\u5165\u8d26\u53f7","v-model":"form.receive_account"},void 0,!1,{fileName:Ri,lineNumber:180,columnNumber:17},void 0)]},void 0,!0):null,Object(h.jsxDEV)("img",{className:"but",style:{marginTop:2==e.channel||1==e.channel&&1==e.receive_mode&&"12px"},src:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/combining/ysf_but.png",alt:""},void 0,!1,{fileName:Ri,lineNumber:190,columnNumber:13},void 0),1==e.timer_show?Object(h.jsxDEV)("p",{className:"time",style:{marginTop:0},children:["\u751f\u6548\u65f6\u95f4\uff1a",e.date_time.length>1?`${e.date_time[0]} ~ ${e.date_time[1]}`:"2024-01-01 00:00:00 ~ 2029-01-01 00:00:00"]},void 0,!0,{fileName:Ri,lineNumber:201,columnNumber:15},void 0):null,e.timer.length>1?Object(h.jsxDEV)("p",{className:"time",style:{marginTop:"10px"},children:["\u9886\u53d6\u65f6\u95f4\uff1a",`${e.timer[0]} ~ ${e.timer[1]}`]},void 0,!0,{fileName:Ri,lineNumber:210,columnNumber:15},void 0):null]},void 0,!0,{fileName:Ri,lineNumber:109,columnNumber:11},void 0),Object(h.jsxDEV)("div",{className:"box-footer",children:[Object(h.jsxDEV)("img",{className:"b-f-img",src:i().footer_top,alt:""},void 0,!1,{fileName:Ri,lineNumber:218,columnNumber:13},void 0),Object(h.jsxDEV)("div",{className:"b-f-b",style:{backgroundImage:`url(${i().footer_middle})`},children:function(){var t;return 2==e.instructionType&&e.group_image[0]?Object(h.jsxDEV)("img",{className:"group_image",src:null===(t=e.group_image[0])||void 0===t?void 0:t.src},void 0,!1,{fileName:Ri,lineNumber:8,columnNumber:14},this):1==e.instructionType&&e.instruction?Object(h.jsxDEV)("div",{className:"b-f-i",dangerouslySetInnerHTML:{__html:e.instruction},style:{color:i().footer_color},"v-if":"data.instructionType==1"},void 0,!1,{fileName:Ri,lineNumber:11,columnNumber:9},this):Object(h.jsxDEV)(pe.a.TextBlock,{className:"TextBlock",animate:!0,widths:Ki,rows:8,dashed:!1},void 0,!1,{fileName:Ri,lineNumber:22,columnNumber:9},this)}()},void 0,!1,{fileName:Ri,lineNumber:219,columnNumber:13},void 0),Object(h.jsxDEV)("img",{className:"b-f-img",src:i().footer_bottom,alt:""},void 0,!1,{fileName:Ri,lineNumber:225,columnNumber:13},void 0)]},void 0,!0,{fileName:Ri,lineNumber:217,columnNumber:11},void 0)]},void 0,!0,{fileName:Ri,lineNumber:108,columnNumber:9},void 0)]},void 0,!0,{fileName:Ri,lineNumber:106,columnNumber:7},void 0)},void 0,!1,{fileName:Ri,lineNumber:105,columnNumber:5},void 0)};i(237);const $i={code_name:[{type:"required",message:"\u8bf7\u8f93\u5165\u5151\u6362\u7801\u540d\u79f0"}],planSelect:[{type:"required",message:"\u8bf7\u9009\u62e9\u5f52\u5c5e\u8ba1\u5212"}],keyBatchSelect:[{type:"required",message:"\u8bf7\u9009\u62e9\u5f52\u5c5eKey"}],issued:[{type:"required",message:"\u8bf7\u8f93\u5165\u53d1\u653e\u603b\u91cf"},{type:"regExp",message:"\u8bf7\u8f93\u5165\u6b63\u6574\u6570",reg:"^([1-9][0-9]*){1,3}$"}]},Gi={date_time:[{type:"required",message:"\u8bf7\u9009\u62e9\u751f\u6548\u65f6\u95f4\u6bb5"}],timer:[{type:"required",message:"\u8bf7\u9009\u62e9\u9886\u53d6\u65f6\u95f4\u6bb5"}]},Qi=[{title:"\u5546\u54c1ID",name:"product_id",prop:"product_id",width:"auto",type:"normal"},{title:"\u5546\u54c1\u540d\u79f0",width:"auto",prop:"product_name",name:"product_name",type:"normal"},{title:"\u603b\u9884\u7b97",name:"all_budget",prop:"all_budget",type:"normal",width:"auto"},{title:"\u5408\u540c\u5355\u4ef7",name:"contract_price",prop:"contract_price",type:"normal",width:"auto"},{title:"\u5546\u54c1\u5b98\u65b9\u4ef7",type:"normal",prop:"official_price",width:"auto"},{title:"\u7c7b\u578b",width:"auto",prop:"type",name:"type",type:"slot"},{title:"\u4e0a\u6e38\u5e73\u53f0",width:"auto",prop:"upstream",name:"upstream",type:"normal"},{title:"\u6279\u6b21\u53f7",width:"auto",prop:"channel_activity_id",name:"channel_activity_id",type:"normal"},{title:"\u6709\u6548\u65f6\u95f4\u6bb5",width:"300px",prop:"effectDate",name:"effectDate",type:"slot"},{title:"\u5f53\u524d\u6210\u672c\u4ef7\u683c",prop:"cost_price",name:"cost_price",width:"auto",type:"slot"},{title:"\u5e93\u5b58\u603b\u6570\u91cf",prop:"quantity",name:"quantity",type:"normal",width:"auto"},{title:"\u5269\u4f59\u6570\u91cf",prop:"stock",name:"stock",type:"normal",width:"auto"},{title:"\u5355\u6b21\u5230\u8d26",prop:"send_num",name:"send_num",type:"normal",width:"auto"},{title:"\u5df2\u4f7f\u7528\u6570\u91cf",prop:"usage",name:"usage",type:"normal",width:"auto"},{title:"\u64cd\u4f5c",prop:"edit",name:"edit",type:"slot",width:"auto"}];function Zi(e){const t=parseInt(L(e.all_budget,F(e.reduce_amount,e.send_num))),i={};return i.product_name=e.batch_goods_name||e.product_name,i.channel_activity_id=e.channel_activity_id,i.only=e.channel_activity_id,i.type=2,i.checked=e.checked||!1,i.disabled=e.disabled||!1,i.upstream=P(e.channel),i.edit="edit",i.all_budget=e.all_budget,i.send_num=e.send_num||1,i.contract_price=e.contract_price||e.price,i.official_price=e.official_price||e.reduce_amount,i.quantity=e.quantity||t,i.stock=e.stock||t,i.usage=e.usage||0,i.origin=e,i.id=e.goods_id||e.id,i.product_id=e.goods_id||"-",i}var Xi="/Users/zhangds/web/blue-brother/frontend/src/pages/exchangecode/combiningAdd/index.jsx";const ea=e=>Array.from({length:e},((e,t)=>t));let ta="";class ia extends m.a.Component{constructor(e){super(e),this.onDisabledTime=e=>{let t=JSON.parse(sessionStorage.getItem("knockGold_effectDate"));const i=new Date(t.begin_time),a=i.getHours(),s=i.getMinutes(),l=i.getSeconds();return Object(R.a)(e,i)?{disabledHours:()=>ea(a),disabledMinutes:e=>e===a?ea(s):[],disabledSeconds:(e,t)=>e===a&&t===s?ea(l):[]}:{}},this.onDisabledRange=(e,t)=>{let i=!1,a=Y()(e).format("YYYY-MM-DD HH:mm:ss");const s=Y()(this.state.plan_time[1]).format("HH:mm:ss");return"start"===t&&(i=s<"23:59:59"?Y()(a).isBefore(this.state.plan_time[0])||Y()(a).subtract(1,"days").isAfter(this.state.plan_time[1]):Y()(a).isBefore(this.state.plan_time[0])||Y()(a).isAfter(this.state.plan_time[1])),"end"===t&&(i=Y()(a).add(1,"days").isBefore(this.state.plan_time[0])||Y()(a).isAfter(this.state.plan_time[1])),i},this.state={uploading:!1,model:{product_id:"",product_type:"1",contract_price:"",official_price:"",cost_price:"",quantity:"",product_name:"",show_url:"",describe_url:"",detail_url:"",weight:"0"},codeInfo:{code_name:"",issued:"",describe:"",date_time:[],range:"",stock:"",instruction:z,planSelect:"",keyBatchSelect:"",restrict:1,group_cover:"",group_image:[],timer:[],timer_type:1,channel:"1",receive_mode:1,instructionType:1,is_webview:0,timer_show:1},isload:!1,tempdata:[],oldProduct:[],deleteProduct:[],new_product:[],cur_product:null,productOption:[],rankoptions:[],rank:[],recall_visible:!1,approvalLoading:!1,timer:3,payType:3,reseller:null,payment_direction:["\u5bf9\u79c1\u8d26\u6237","\u5bf9\u516c\u8d26\u6237","\u9884\u4ed8\u6b3e\u6263\u9664"],isAudit:!1,approvalsStatus:!1,oldTable:[],product_title:"\u65b0\u5efa\u5546\u54c1",plan_time:"",direct_reseller_id:0,newGoodsBtnLoading:!1,tableLoading:!1,addIsType:1,isState:0,planSelectData:[],keyBatchSelectData:[],codeStatus:"",productData:null}}componentDidMount(){const e=~~sessionStorage.getItem("isState");ta=~~sessionStorage.getItem("code_id"),this.setState({isState:e}),e&&this.getDetailFunction(e),2!==e&&(sessionStorage.setItem("knockGoldData",[]),this.getPlanSelect())}getPlanSelect(){Object(a.Oc)({bind_object:"1"}).then((e=>{Object(a.Tb)(e,((e,t)=>{const i=e.map((e=>({key:e.id,text:e.title,...e})));this.setState({planSelectData:i})}),(e=>{c.a.error(e)}))}))}getKeyBatchSelect(e){Object(a.Nc)({status:"4,5",plan_id:e,bind_object:1}).then((e=>{Object(a.Tb)(e,((e,t)=>{const i=e.map((e=>({key:e.id,text:e.batch_name,...e})));this.setState({keyBatchSelectData:i})}),(e=>{c.a.error(e)}))}))}getResellerFunction(e){Object(a.vb)(e).then((e=>{Object(a.Tb)(e,((e,t)=>{let i={id:e.id,name:e.name,company_name:e.company_name,receive_email:e.contact_email[0]};this.setState({direct_reseller_id:e.direct_reseller_id,reseller:i})}))}))}getDetailFunction(){Object(a.T)(ta).then((e=>{Object(a.Tb)(e,(e=>{let t=Object(de.a)(e);this.codeStatus=e.status;const i=this.transFormData(t.goods),{channel:a,receive_mode:s,instruction:l,group_image:n,time_limit:o,is_webview:r,timer_show:m}=t.group_info;this.handleChange(l,"instruction"),t.goods=i;let c={code_name:t.title,is_webview:Number(r)||0,timer_show:Number(m)||1,issued:t.quantity,instructionType:Number(t.group_info.instructionType)||1,stock:t.stock,restrict:t.restrict,instruction:l,date_time:[t.begin_time,t.end_time],group_image:n?[{id:(new Date).getTime(),src:n,name:"\u5546\u54c1\u63cf\u8ff0"}]:[],timer:o.receive_time.start_time?[o.receive_time.start_time,o.receive_time.end_time]:[],timer_type:o.receive_time.end_time?2:1,channel:a,receive_mode:Number(s),range:[],planSelect:{key:e.plan.id,text:e.plan.title},keyBatchSelect:{key:e.key_batch_id,text:e.key_batch.batch_name}};const d=[];if(i.length>0){let e=[],t=[];c.range=i.map((i=>{null!==i&&void 0!==i&&i.id?(d.push({key:i.only,text:i.product_name,id:i.id}),i.checked=!0,t.push(i.id)):(i.checked=!1,e.push(i.only))})),this.setState({new_product:e,oldProduct:t})}1===this.state.isState&&(c.code_name=`${t.title}_${t.copy_count+1}`.substring(0,12)),this.getResellerFunction(t.plan.reseller_id);let u=[];Object(f.a)(t.goods,(e=>{let t={};return t.key=e.only,t.text=e.product_name,t.id=e.id,u.push(t),t})),this.setState({codeInfo:c,isload:!0,tempdata:t.goods||[],plan_time:[t.plan.begin_time,t.plan.end_time],rank:d,rankoptions:u})}),(e=>{}))})).catch((e=>{}))}getTableList(){if(sessionStorage.getItem("addMoneyData")){const e=JSON.parse(sessionStorage.getItem("addMoneyData")),t=Object(de.a)(this.state.tempdata).map((t=>(e.map((e=>{t.channel_activity_id===e.channel_activity_id&&(t.origin.recharge_amount=e.recharge_amount)})),t)));this.setState({tempdata:t})}}transFormData(e){const t=[],i=[];return e.reduce.map((e=>{2===this.state.isState&&(e.quantity=e.total_stock,e.usage=e.use_stock);let a=Zi(e);if(1===this.state.isState){const t=parseInt(L(e.all_budget,F(e.reduce_amount,e.send_num)));a.quantity=t,a.stock=t,a.usage=0,a.origin=Object(o.a)(e,["id","total_stock","use_stock","stock","goods_id"]),a=Object(o.a)(a,["product_id"])}if(2===this.state.isState){a.disabled=-1!==this.codeStatus,a.stock=e.stock,a.quantity=e.total_stock;const t=["total_stock","use_stock"];a.origin=Object(o.a)(e,t),a=Object(o.a)(a,t)}a.send_num=e.send_num,t.push(a),i.push(a.origin)})),sessionStorage.setItem("knockGoldData",JSON.stringify(i)),t}onRankChange(e){Object(Ti.a)(this.state.tempdata,(t=>{t.checked=e.findIndex((e=>e.key==t.only))>-1})),this.setState({tempdata:this.state.tempdata}),this.setState({rank:e})}cancel(){G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:"\u662f\u5426\u53d6\u6d88\u672c\u6b21\u64cd\u4f5c\uff1f"},void 0,!1,{fileName:Xi,lineNumber:319,columnNumber:16},this),onConfirm:()=>{window.location.replace("#/home/exchangecode-list")},onCancel:this.onCancel,className:"questModal",parentComponent:this})}buildData(){let e=[];Object(f.a)(this.state.rank,(t=>{e.push(t.text)}));let t=this.refs.tempdata.getSelectData(),i=t.filter((e=>this.state.oldProduct.indexOf(e.id)<0)),a=[],s=[];Object(f.a)(t,(e=>{if(this.state.oldProduct.indexOf(e.id)>-1){a.push(e.id);let t={};1===e.type?(t.contract_price=e.contract_price,t.cost_price=e.cost_price,t.describe_url=e.describe_url,t.official_price=e.official_price,t.product_id=e.product_id,t.account_type=e.account_type,t.product_name=e.product_name,t.product_type=e.product_type,t.weight=e.weight,t.quantity=e.quantity,t.show_url=e.show_url,t.end_time=e.end_time,t.detail_url=e.detail_url,t.map_product_name=e.map_product_name,t.goods_id=e.goods_id,t.type=e.type):t={...e.origin,type:e.type},s.push(t)}}));let l=Object(Ii.a)(this.state.oldProduct,a,Fi.a);l=l.filter((e=>this.state.new_product.indexOf(e)<0)),this.state.deleteProduct.length>0&&(l=l.concat(this.state.deleteProduct).map(Number)),a=Object(f.a)(s,(e=>e.only)),l=Object(_.a)(l,(e=>a.indexOf(e)<0));const n={legal:[],reduce:[],cash:[]};i.map((e=>{2===e.type?e.origin&&n.reduce.push(e.origin):3===e.type?n.cash.push(e.origin):n.legal.push(e)}));const o={legal:[],reduce:[],cash:[]};s.map((e=>{2===e.type?o.reduce.push(e):3===e.type?o.cash.push(e):o.legal.push(e)}));const{codeInfo:r}=this.state;return{data:{reseller_id:this.state.reseller.id,reseller_name:this.state.reseller.name,company_name:this.state.reseller.company_name,receive_email:this.state.reseller.receive_email,payment_direction:this.state.payment_direction[this.state.payType-1],title:r.code_name,range:e,recharge_type:2,restrict:1,group_info:{type:2,is_webview:r.is_webview,quantity:r.quantity,instructionType:r.instructionType,group_cover:"",group_image:r.group_image[0]?r.group_image[0].src:"",instruction:r.instruction,receive_mode:r.receive_mode,channel:r.channel,time_limit:{timer_show:r.timer_show,effect_time:{end_time:r.date_time[1],start_time:r.date_time[0]},receive_time:{end_time:r.timer[1]||"",start_time:r.timer[0]||""}}},instruction:r.instruction,begin_time:r.date_time[0],end_time:r.date_time[1],quantity:r.issued,new_product:n,update_product:o,delete_product:l},addProduct:i,updateProduct:s}}copyOrAddBuildData(){let e=[];Object(f.a)(this.state.rank,(t=>{e.push(t.text)}));let t=this.refs.tempdata.getSelectData();const{codeInfo:i}=this.state,a={begin_time:i.date_time[0],end_time:i.date_time[1],instruction:i.instruction,quantity:i.issued,range:e.join(),title:i.code_name,restrict:i.restrict,recharge_type:2,group_info:{type:2,is_webview:i.is_webview,quantity:i.quantity,instructionType:i.instructionType,group_cover:"",group_image:i.group_image[0]?i.group_image[0].src:"",instruction:i.instruction,receive_mode:i.receive_mode,channel:i.channel,time_limit:{timer_show:i.timer_show,effect_time:{end_time:i.date_time[1],start_time:i.date_time[0]},receive_time:{end_time:i.timer[1]||"",start_time:i.timer[0]||""}}},product:{legal:[],reduce:t.filter((e=>2===e.type)).map((e=>Object(o.a)(e.origin,["goods_id"]))),cash:[]}};return 1===this.state.isState&&(a.copy_code_batch_id=ta),{code_batch:[a],reseller_id:this.state.reseller.id,reseller_name:this.state.reseller.name,company_name:this.state.reseller.company_name,receive_email:this.state.reseller.receive_email,payment_direction:this.state.payment_direction[this.state.payType-1],addCode:!0}}submitCodeData(){if(!this.state.reseller)return void c.a.error("\u8be5\u5151\u6362\u7801\u5bf9\u5e94\u5206\u9500\u5546\u4e0d\u5b58\u5728");let{data:e}=this.buildData();Object(a.xc)(ta,e).then((e=>{Object(a.Tb)(e,((e,t)=>{let i=this.state.model;i.show_url=e.path,this.setState({model:i}),c.a.clear(),c.a.success(t),setTimeout((()=>{window.location.replace("#/home/exchangecode-list")}),1e3)}),(e=>{c.a.error(e)}))}))}submitCopyOrAddCodeData(){let e=this.copyOrAddBuildData(),t=sessionStorage.getItem("keyBatch_id");Object(a.Zb)(t,e).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.success("\u6210\u529f\u53d1\u8d77\u5ba1\u6279"),setTimeout((()=>{window.history.back()}),1e3)}),(e=>{c.a.error(e)}))}))}submit(){if(!this.refs.code_info.validator()||!this.refs.code_rule.validator())return;let e=this.state.tempdata.filter((e=>e.checked)),t=!1;if(e.map((e=>{e.quantity{Object(a.Tb)(e,((e,t)=>{e.is_require_approval?this.setState({audit_visible:!0}):this.submitCodeData()}),(e=>{c.a.error(e)}))})):Object(a.Q)(s).then((t=>{Object(a.Tb)(t,((t,i)=>{0==t.status&&(this.setState({approvalsStatus:!0}),this.setState({recall_visible:!0})),1!=t.status&&2!=t.status&&3!=t.status||Object(a.eb)(ta,e).then((e=>{Object(a.Tb)(e,((e,t)=>{e.is_require_approval?this.setState({audit_visible:!0}):this.submitCodeData()}),(e=>{c.a.error(e)}))}))}),(e=>{c.a.error(e)}))}))}else{let e=this.refs.tempdata.getSelectData();if(this.state.uploading)return c.a.error("\u8fd8\u6709\u56fe\u7247\u4e0a\u4f20\u4e2d\uff0c\u4e0d\u53ef\u63d0\u4ea4");if(e.length<1)return c.a.error("\u8bf7\u7ed1\u5b9a\u5bf9\u8c61");if(!this.state.reseller)return c.a.error("\u8be5\u5151\u6362\u7801\u5bf9\u5e94\u5206\u9500\u5546\u4e0d\u5b58\u5728");this.setState({audit_visible:!0})}}onConfirm(){this.setState({audit_visible:!1}),2!==this.state.isState?this.submitCopyOrAddCodeData():this.submitCodeData()}addProduct(e){let t=this.state.direct_reseller_id;return this.state.isState||this.state.codeInfo.planSelect.key?this.state.codeInfo.date_time.filter((e=>e)).length<2?c.a.error("\u8bf7\u9009\u62e9\u751f\u6548\u65f6\u95f4\u6bb5"):t?void this.setState({productData:null,drawerVisible:!0,addIsType:e,product_title:"\u65b0\u589e\u7acb\u51cf\u91d1"}):c.a.error("\u8bf7\u6dfb\u52a0\u6620\u5c04\u5206\u9500\u5546"):c.a.error("\u8bf7\u9009\u62e9\u5f52\u5c5e\u8ba1\u5212")}async productEditShow(e){if(!this.state.direct_reseller_id)return c.a.error("\u8bf7\u6dfb\u52a0\u6620\u5c04\u5206\u9500\u5546");this.setState({product_title:"\u7f16\u8f91\u7acb\u51cf\u91d1",productData:e.origin,addIsType:2,drawerVisible:!0})}onChangeCombinedDate(e){let t=this.state.codeInfo;t.date_time=e,this.setState({codeInfo:t}),this.state.tempdata.map((e=>{e.origin.time_limit.effect_time.start_time=this.state.codeInfo.date_time[0],e.origin.time_limit.effect_time.end_time=this.state.codeInfo.date_time[1]}))}async productSubmit(){if(await this.refs.knockGold.submit()){this.setState({drawerVisible:!1});let e=[],t=[],i=[];e=JSON.parse(sessionStorage.getItem("knockGoldData")),i=this.state.tempdata.filter((e=>2!==e.type)),t=Object(f.a)(e,(e=>{let t=this.state.tempdata.findIndex((t=>t.channel_activity_id===e.channel_activity_id));return t>-1&&(e.checked=this.state.tempdata[t].checked),e.id&&(e.disabled=!0),Zi(e)}));let a=te(t.concat(i),"only"),s=[],l=[];Object(f.a)(a,(e=>{s.push({key:e.only,text:e.product_name}),e.checked&&l.push({key:e.only,text:e.product_name})})),s=te(s,"key"),this.setState({tempdata:a,rankoptions:s,rank:l}),this.getTableList()}}onReCall(){let e=sessionStorage.getItem("approval_id");this.setState({recall_visible:!1}),Object(a.bd)(e).then((e=>{Object(a.Tb)(e,((e,t)=>{this.setState({approvalLoading:!0});let i=setInterval((()=>{this.state.timer<=0&&(clearInterval(i),this.setState({approvalLoading:!1}),c.a.success("\u64a4\u9500\u6210\u529f,\u8bf7\u91cd\u65b0\u63d0\u4ea4\u5ba1\u6838"));let e=this.state.timer-1;this.setState({timer:e})}),1e3)}),(e=>{c.a.error(e)}))}))}handleChange(e,t){let i=this.state.codeInfo;i[t]=e,this.setState({codeInfo:i})}vestingPlanFunction(e){if(null===e||void 0===e||!e.key)return;this.getKeyBatchSelect(e.key),this.getResellerFunction(e.reseller_id),this.handleChange("","keyBatchSelect"),this.setState({plan_time:[e.begin_time,e.end_time]});const t={begin_time:e.begin_time,end_time:e.end_time};sessionStorage.setItem("knockGold_effectDate",JSON.stringify(t))}onUploadError(e,t){"overMaxAmount"===e?c.a.error(`\u6700\u591a\u53ef\u4e0a\u4f20 ${t.maxAmount} \u5f20\u56fe\u7247`):"overMaxSize"===e&&c.a.error(`\u56fe\u7247\u5927\u5c0f\u4e0d\u80fd\u8d85\u8fc7 ${t.formattedMaxSize}`)}imgUpload(e){return new Promise(((t,i)=>{try{let s=new FormData;s.append("file",e),s.append("path","common_image"),Object(a.cd)(s).then((e=>{Object(a.Tb)(e,((e,i)=>{t(e.path)}),(e=>{c.a.error(e),i(e)}))}))}catch(s){i(s)}}))}onUploadChangeGoods(e){e.length>0?this.imgUpload(e[0].file).then((t=>{this.handleChange([{src:t,id:`${(new Date).getTime()}-0`,name:e[0].file.name}],"group_image")})):this.handleChange([],"group_image")}onDisabledRange1(e,t){let i=!1;return"end"==t&&(i=Y()(e.getTime()).add(1,"days")<=(new Date).getTime()),"start"==t&&(i=e.getTime()<=(new Date).getTime()),i}render(){return Object(h.jsxDEV)("div",{id:"combiningAdd",children:[Object(h.jsxDEV)("div",{children:Object(h.jsxDEV)(d.a,{className:"card1",title:"\u57fa\u672c\u4fe1\u606f",children:[Object(h.jsxDEV)("div",{className:"addcode",children:Object(h.jsxDEV)(l.a,{model:this.state.codeInfo,rules:$i,ref:"code_info",className:"addform",children:[Object(h.jsxDEV)(s.a,{labelname:"\u5f52\u5c5e\u8ba1\u5212",prop:"planSelect",id:"planSelect",children:Object(h.jsxDEV)(X.a,{onChange:e=>{this.handleChange(e,"planSelect"),this.vestingPlanFunction(e)},clearable:!0,value:this.state.codeInfo.planSelect,options:this.state.planSelectData,placeholder:"\u8bf7\u9009\u62e9",labelWidth:"0px",height:"36px",width:"520px",disabled:this.state.isState,alignment:"left"},void 0,!1,{fileName:Xi,lineNumber:954,columnNumber:19},this)},void 0,!1,{fileName:Xi,lineNumber:953,columnNumber:17},this),Object(h.jsxDEV)(s.a,{labelname:"\u5f52\u5c5ekey",prop:"keyBatchSelect",id:"keyBatchSelect",children:Object(h.jsxDEV)(X.a,{onChange:e=>{this.handleChange(e,"keyBatchSelect"),sessionStorage.setItem("keyBatch_id",null===e||void 0===e?void 0:e.id)},clearable:!0,value:this.state.codeInfo.keyBatchSelect,options:this.state.keyBatchSelectData,placeholder:"\u8bf7\u9009\u62e9",labelWidth:"0px",height:"36px",width:"520px",disabled:this.state.isState,alignment:"left"},void 0,!1,{fileName:Xi,lineNumber:972,columnNumber:19},this)},void 0,!1,{fileName:Xi,lineNumber:971,columnNumber:17},this),Object(h.jsxDEV)(s.a,{labelname:"\u7ec4\u5408\u5546\u54c1\u540d\u79f0",prop:"code_name",id:"code_name",children:Object(h.jsxDEV)(n.a,{onChange:e=>this.handleChange(e,"code_name"),onClearItem:()=>this.handleChange("","code_name"),value:this.state.codeInfo.code_name,placeholder:"\u8bf7\u8f93\u5165\u7ec4\u5408\u5546\u54c1\u540d\u79f0",labelWidth:"0px",maxLength:12,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:Xi,lineNumber:991,columnNumber:19},this)},void 0,!1,{fileName:Xi,lineNumber:990,columnNumber:17},this),Object(h.jsxDEV)(s.a,{labelname:"\u7ed1\u5b9a\u6570",prop:"restrict",id:"restrict",children:Object(h.jsxDEV)("div",{className:"line",children:this.state.codeInfo.restrict},void 0,!1,{fileName:Xi,lineNumber:1005,columnNumber:19},this)},void 0,!1,{fileName:Xi,lineNumber:1004,columnNumber:17},this),2===this.state.isState&&-1!==this.codeStatus?Object(h.jsxDEV)(h.Fragment,{children:[Object(h.jsxDEV)(s.a,{labelname:"\u53d1\u653e\u603b\u91cf",prop:"issued",id:"issued",children:Object(h.jsxDEV)("div",{className:"line",children:this.state.codeInfo.issued},void 0,!1,{fileName:Xi,lineNumber:1011,columnNumber:23},this)},void 0,!1,{fileName:Xi,lineNumber:1010,columnNumber:21},this),Object(h.jsxDEV)(s.a,{labelname:"\u5269\u4f59\u5e93\u5b58\u91cf",prop:"stock",id:"stock",children:Object(h.jsxDEV)("div",{className:"line",children:this.state.codeInfo.stock},void 0,!1,{fileName:Xi,lineNumber:1014,columnNumber:23},this)},void 0,!1,{fileName:Xi,lineNumber:1013,columnNumber:21},this)]},void 0,!0):Object(h.jsxDEV)(s.a,{labelname:"\u53d1\u653e\u603b\u91cf",prop:"issued",id:"issued",children:Object(h.jsxDEV)(n.a,{onChange:e=>this.handleChange(e,"issued"),onClearItem:()=>this.handleChange("","issued"),value:this.state.codeInfo.issued,placeholder:"\u8bf7\u8f93\u5165\u53d1\u653e\u603b\u91cf",labelWidth:"0px",maxLength:6,countShow:!1,unit:"\u6761",height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:Xi,lineNumber:1019,columnNumber:21},this)},void 0,!1,{fileName:Xi,lineNumber:1018,columnNumber:19},this),Object(h.jsxDEV)(s.a,{labelname:"\u53d1\u653e\u6e20\u9053",prop:"channel",id:"type",children:Object(h.jsxDEV)(Q.a,{disabled:!!this.state.tempdata.length&&1!==this.state.isState,onChange:({target:e})=>{this.handleChange(e.value,"channel"),"3"===e.value?this.handleChange(2,"receive_mode"):this.handleChange(1,"receive_mode"),"1"===e.value?this.handleChange(z,"instruction"):"2"===e.value?this.handleChange(A,"instruction"):this.handleChange(J,"instruction"),1===this.state.isState&&(this.setState({tempdata:[],tempdata:[],rankoptions:[],rank:[]}),sessionStorage.setItem("knockGoldData",JSON.stringify([]))),this.handleChange(0,"is_webview")},value:this.state.codeInfo.channel,children:Object(h.jsxDEV)(Ei.a,{trigger:"hover",content:"\u53ea\u80fd\u7ec4\u5408\u540c\u4e00\u79cd\u6e20\u9053\u7acb\u51cf\u91d1",children:[Object(h.jsxDEV)(ne.a,{value:"1",children:"\u652f\u4ed8\u5b9d"},void 0,!1,{fileName:Xi,lineNumber:1062,columnNumber:23},this),Object(h.jsxDEV)(ne.a,{value:"2",children:"\u5fae\u4fe1"},void 0,!1,{fileName:Xi,lineNumber:1063,columnNumber:23},this),Object(h.jsxDEV)(ne.a,{value:"3",children:"\u4e91\u95ea\u4ed8"},void 0,!1,{fileName:Xi,lineNumber:1064,columnNumber:23},this)]},void 0,!0,{fileName:Xi,lineNumber:1061,columnNumber:21},this)},void 0,!1,{fileName:Xi,lineNumber:1036,columnNumber:19},this)},void 0,!1,{fileName:Xi,lineNumber:1035,columnNumber:17},this),2==this.state.codeInfo.channel?Object(h.jsxDEV)(s.a,{labelname:"\u6253\u5f00\u65b9\u5f0f",prop:"is_webview",id:"is_webview",children:Object(h.jsxDEV)(Q.a,{disabled:2===this.state.isState,onChange:({target:e})=>{this.handleChange(e.value,"is_webview")},value:this.state.codeInfo.is_webview,children:[Object(h.jsxDEV)(ne.a,{value:0,children:"\u5c0f\u7a0b\u5e8f"},void 0,!1,{fileName:Xi,lineNumber:1077,columnNumber:23},this),Object(h.jsxDEV)(ne.a,{value:1,children:"\u516c\u4f17\u53f7"},void 0,!1,{fileName:Xi,lineNumber:1078,columnNumber:23},this)]},void 0,!0,{fileName:Xi,lineNumber:1070,columnNumber:21},this)},"is_webview",!1,{fileName:Xi,lineNumber:1069,columnNumber:19},this):null,1==this.state.codeInfo.channel?Object(h.jsxDEV)(s.a,{labelname:"\u9886\u53d6\u65b9\u5f0f",prop:"receive_mode",id:"receive_mode",children:Object(h.jsxDEV)(Q.a,{disabled:!!this.state.tempdata.length&&1!==this.state.isState,onChange:({target:e})=>{this.handleChange(e.value,"receive_mode"),1===this.state.isState&&(this.setState({tempdata:[],rankoptions:[],rank:[]}),sessionStorage.setItem("knockGoldData",JSON.stringify([])))},value:this.state.codeInfo.receive_mode,children:Object(h.jsxDEV)(Ei.a,{trigger:"hover",content:"\u53ea\u80fd\u7ec4\u5408\u540c\u4e00\u79cd\u9886\u53d6\u65b9\u5f0f\u7acb\u51cf\u91d1",children:[Object(h.jsxDEV)(ne.a,{value:1,children:"\u5b98\u65b9\u9886\u53d6"},void 0,!1,{fileName:Xi,lineNumber:1096,columnNumber:25},this),Object(h.jsxDEV)(ne.a,{value:2,children:"\u8d26\u53f7\u9886\u53d6"},void 0,!1,{fileName:Xi,lineNumber:1097,columnNumber:25},this)]},void 0,!0,{fileName:Xi,lineNumber:1095,columnNumber:23},this)},void 0,!1,{fileName:Xi,lineNumber:1084,columnNumber:21},this)},void 0,!1,{fileName:Xi,lineNumber:1083,columnNumber:19},this):null,Object(h.jsxDEV)(s.a,{labelname:"\u63cf\u8ff0\u7c7b\u578b",prop:"instructionType",id:"instructionType",children:Object(h.jsxDEV)(Q.a,{onChange:({target:e})=>{this.handleChange(e.value,"instructionType")},value:this.state.codeInfo.instructionType,children:[Object(h.jsxDEV)(ne.a,{value:1,children:"\u6587\u5b57\u63cf\u8ff0"},void 0,!1,{fileName:Xi,lineNumber:1109,columnNumber:21},this),Object(h.jsxDEV)(ne.a,{value:2,children:"\u56fe\u7247\u63cf\u8ff0"},void 0,!1,{fileName:Xi,lineNumber:1110,columnNumber:21},this)]},void 0,!0,{fileName:Xi,lineNumber:1103,columnNumber:19},this)},void 0,!1,{fileName:Xi,lineNumber:1102,columnNumber:17},this),2===this.state.codeInfo.instructionType?Object(h.jsxDEV)(s.a,{prop:"group_image",labelname:"\u5546\u54c1\u63cf\u8ff0",id:"group_image",required:"",children:Object(h.jsxDEV)(gt.a,{className:"good-image-upload-demo",maxSize:5242880,tips:"\u56fe\u7247\u4e0d\u8d85\u8fc7 5M",maxAmount:1,onError:this.onUploadError,onChange:(e,t)=>{this.onUploadChangeGoods(e,t)},sortable:!0,fileList:this.state.codeInfo.group_image,multiple:!0},void 0,!1,{fileName:Xi,lineNumber:1115,columnNumber:21},this)},void 0,!1,{fileName:Xi,lineNumber:1114,columnNumber:19},this):Object(h.jsxDEV)(s.a,{labelname:"\u4f7f\u7528\u8bf4\u660e",prop:"instruction",id:"instruction",required:!1,children:Object(h.jsxDEV)(Wi,{pageType:"detaileditor",setEdittext:e=>{this.handleChange(e,"instruction")},width:"520px",text:this.state.codeInfo.instruction,limitLength:5e3},this.state.codeInfo.channel,!1,{fileName:Xi,lineNumber:1136,columnNumber:21},this)},void 0,!1,{fileName:Xi,lineNumber:1130,columnNumber:19},this)]},void 0,!0,{fileName:Xi,lineNumber:947,columnNumber:15},this)},void 0,!1,{fileName:Xi,lineNumber:946,columnNumber:13},this),Object(h.jsxDEV)(Yi,{data:this.state.codeInfo,products:this.state.tempdata},void 0,!1,{fileName:Xi,lineNumber:1150,columnNumber:13},this)]},void 0,!0,{fileName:Xi,lineNumber:945,columnNumber:11},this)},void 0,!1,{fileName:Xi,lineNumber:944,columnNumber:9},this),Object(h.jsxDEV)("div",{children:Object(h.jsxDEV)(d.a,{style:{width:"90%",margin:"10px auto"},title:"\u57fa\u672c\u89c4\u5219",children:Object(h.jsxDEV)("div",{children:Object(h.jsxDEV)(l.a,{model:this.state.codeInfo,rules:Gi,ref:"code_rule",className:"addform",children:[Object(h.jsxDEV)(s.a,{labelname:"\u751f\u6548\u65f6\u95f4\u6bb5",prop:"date_time",id:"date_time",children:[Object(h.jsxDEV)(ee.a,{className:"zent-datepicker-plan",showTime:{format:"HH:mm:ss",defaultTime:["00:00:00","23:59:59"]},disabled:[2===this.state.isState&&[1,2,3,7].includes(this.codeStatus),!1],format:"YYYY-MM-DD HH:mm:ss",value:this.state.codeInfo.date_time,onChange:e=>{$t.a.emit("change","date_time",e),this.onChangeCombinedDate(e)},width:245,disabledTime:this.onDisabledTime,disabledDate:this.onDisabledRange},void 0,!1,{fileName:Xi,lineNumber:1163,columnNumber:19},this),Object(h.jsxDEV)(Q.a,{style:{marginLeft:"20px"},onChange:({target:e})=>{this.handleChange(e.value,"timer_show")},value:this.state.codeInfo.timer_show,children:[Object(h.jsxDEV)(ne.a,{value:1,children:"\u663e\u793a"},void 0,!1,{fileName:Xi,lineNumber:1190,columnNumber:21},this),Object(h.jsxDEV)(ne.a,{value:2,children:"\u9690\u85cf"},void 0,!1,{fileName:Xi,lineNumber:1191,columnNumber:21},this)]},void 0,!0,{fileName:Xi,lineNumber:1183,columnNumber:19},this)]},void 0,!0,{fileName:Xi,lineNumber:1162,columnNumber:17},this),2===this.state.codeInfo.timer_type?Object(h.jsxDEV)(s.a,{id:"timer",labelname:"\u9886\u53d6\u65f6\u95f4\u6bb5",prop:"timer",children:[Object(h.jsxDEV)(re.a,{className:"zent-datepicker-plan",showTime:{format:"HH:mm:ss",defaultTime:[Y()().format("HH:mm:ss"),"23:59:59"]},value:this.state.codeInfo.timer,onChange:e=>{this.handleChange(e,"timer")},width:"240px",disabledTime:this.onDisabledRange1},void 0,!1,{fileName:Xi,lineNumber:1196,columnNumber:21},this),Object(h.jsxDEV)(Q.a,{style:{marginLeft:"15px"},onChange:({target:e})=>{this.handleChange(e.value,"timer_type"),1===e.value&&this.handleChange([],"timer")},value:this.state.codeInfo.timer_type,children:[Object(h.jsxDEV)(ne.a,{value:1,children:"\u4e0d\u8bbe\u7f6e"},void 0,!1,{fileName:Xi,lineNumber:1219,columnNumber:23},this),Object(h.jsxDEV)(ne.a,{value:2,children:"\u6bcf\u65e5"},void 0,!1,{fileName:Xi,lineNumber:1220,columnNumber:23},this)]},void 0,!0,{fileName:Xi,lineNumber:1209,columnNumber:21},this)]},void 0,!0,{fileName:Xi,lineNumber:1195,columnNumber:19},this):Object(h.jsxDEV)(s.a,{id:"timer",labelname:"\u9886\u53d6\u65f6\u95f4\u6bb5",children:Object(h.jsxDEV)(Q.a,{onChange:({target:e})=>{this.handleChange(e.value,"timer_type")},value:this.state.codeInfo.timer_type,children:[Object(h.jsxDEV)(ne.a,{value:1,children:"\u4e0d\u8bbe\u7f6e"},void 0,!1,{fileName:Xi,lineNumber:1231,columnNumber:23},this),Object(h.jsxDEV)(ne.a,{value:2,children:"\u6bcf\u65e5"},void 0,!1,{fileName:Xi,lineNumber:1232,columnNumber:23},this)]},void 0,!0,{fileName:Xi,lineNumber:1225,columnNumber:21},this)},void 0,!1,{fileName:Xi,lineNumber:1224,columnNumber:19},this),Object(h.jsxDEV)(s.a,{labelname:"\u5546\u54c1\u8303\u56f4",prop:"rank",id:"rank",children:Object(h.jsxDEV)("div",{className:"goods-boxs",children:[Object(h.jsxDEV)(X.a,{options:this.state.rankoptions,multiple:!0,value:this.state.rank,placeholder:"\u9009\u62e9\u4e00\u9879",disabled:2==this.state.isState&&-1!==this.codeStatus,width:410,onChange:e=>{this.onRankChange(e)}},void 0,!1,{fileName:Xi,lineNumber:1238,columnNumber:21},this),2!==this.state.isState||-1===this.codeStatus?Object(h.jsxDEV)(u.a,{type:"primary",style:{marginLeft:"20px"},onClick:()=>{this.addProduct()},disabled:!JSON.parse(sessionStorage.getItem("isEarlyWarningMan")),children:"\u65b0\u5efa\u7acb\u51cf\u91d1"},void 0,!1,{fileName:Xi,lineNumber:1250,columnNumber:23},this):null]},void 0,!0,{fileName:Xi,lineNumber:1237,columnNumber:19},this)},void 0,!1,{fileName:Xi,lineNumber:1236,columnNumber:17},this),Object(h.jsxDEV)(s.a,{labelname:"",prop:"range",id:"range",children:Object(h.jsxDEV)(I,{ref:"tempdata",headBackgroud:"#f9fafc",isShowPageBar:!1,spliteColor:"#fff",tableData:this.state.tempdata,value:this.state.tempdata,Column:Qi,maxheight:200,countbarVisible:!1,isBorder:!0,isSwitch:!1,pageChange:e=>{this.pageChange(e)},checkChange:e=>{let t=[];Object(f.a)(e,(e=>{let i={};return i.key=e.only,i.text=e.product_name,t.push(i),i})),this.setState({rank:t})},ComponentHandler:(e,t)=>"type"==e?Object(h.jsxDEV)(h.Fragment,{children:"\u7acb\u51cf\u91d1"},void 0,!1):"effectDate"==e?Object(h.jsxDEV)(h.Fragment,{children:[this.state.codeInfo.date_time[0]," \u81f3 ",this.state.codeInfo.date_time[1]]},void 0,!0):"cost_price"==e?Object(h.jsxDEV)(h.Fragment,{children:2===t.type?t.official_price:t.cost_price},void 0,!1):"edit"==e?Object(h.jsxDEV)("a",{className:"grid-link",onClick:e=>{this.productEditShow(t)},children:"\u7f16\u8f91"},void 0,!1,{fileName:Xi,lineNumber:1308,columnNumber:27},this):void 0},void 0,!1,{fileName:Xi,lineNumber:1264,columnNumber:19},this)},void 0,!1,{fileName:Xi,lineNumber:1263,columnNumber:17},this)]},void 0,!0,{fileName:Xi,lineNumber:1156,columnNumber:15},this)},void 0,!1,{fileName:Xi,lineNumber:1155,columnNumber:13},this)},void 0,!1,{fileName:Xi,lineNumber:1154,columnNumber:11},this)},void 0,!1,{fileName:Xi,lineNumber:1153,columnNumber:9},this),Object(h.jsxDEV)(bt.a,{className:"draw",width:"86%",title:this.state.product_title,footer:Object(h.jsxDEV)("div",{style:{textAlign:"center"},children:[Object(h.jsxDEV)(u.a,{type:"primary",onClick:e=>{this.productSubmit()},children:"\u63d0\u4ea4"},void 0,!1,{fileName:Xi,lineNumber:1331,columnNumber:15},this),Object(h.jsxDEV)(u.a,{onClick:e=>{this.setState({drawerVisible:!1}),this.getTableList()},children:"\u53d6\u6d88"},void 0,!1,{fileName:Xi,lineNumber:1339,columnNumber:15},this)]},void 0,!0,{fileName:Xi,lineNumber:1330,columnNumber:13},this),visible:this.state.drawerVisible,onClose:e=>{this.setState({drawerVisible:!1})},maskClosable:!1,children:Object(h.jsxDEV)("div",{className:"draw2",children:Object(h.jsxDEV)(d.a,{style:{width:"95%",margin:"10px auto",border:0},children:Object(h.jsxDEV)(qe,{ref:"knockGold",data:this.state.productData,combining:this.state.codeInfo},void 0,!1,{fileName:Xi,lineNumber:1357,columnNumber:15},this)},void 0,!1,{fileName:Xi,lineNumber:1356,columnNumber:13},this)},void 0,!1,{fileName:Xi,lineNumber:1355,columnNumber:11},this)},void 0,!1,{fileName:Xi,lineNumber:1325,columnNumber:9},this),this.state.audit_visible?Object(h.jsxDEV)("div",{className:"audit",children:[Object(h.jsxDEV)("div",{className:"modal",children:" "},void 0,!1,{fileName:Xi,lineNumber:1368,columnNumber:13},this),Object(h.jsxDEV)("div",{className:"audit-box",children:[Object(h.jsxDEV)(g.a,{type:"close",className:"audit-close",onClick:e=>{this.setState({audit_visible:!1})}},void 0,!1,{fileName:Xi,lineNumber:1370,columnNumber:15},this),Object(h.jsxDEV)("div",{className:"audit-box-title",children:"\u63d0\u4ea4\u5ba1\u6838"},void 0,!1,{fileName:Xi,lineNumber:1377,columnNumber:15},this),Object(h.jsxDEV)("div",{className:"payType",children:Object(h.jsxDEV)(Q.a,{onChange:e=>this.setState({payType:e.target.value}),value:this.state.payType,className:"audit-obj",children:[Object(h.jsxDEV)(Z.a,{value:3,children:"\u9884\u4ed8\u6b3e\u6263\u9664"},void 0,!1,{fileName:Xi,lineNumber:1384,columnNumber:19},this),Object(h.jsxDEV)(Z.a,{value:1,children:"\u5bf9\u79c1\u8d26\u6237"},void 0,!1,{fileName:Xi,lineNumber:1385,columnNumber:19},this),Object(h.jsxDEV)(Z.a,{value:2,children:"\u5bf9\u516c\u8d26\u6237"},void 0,!1,{fileName:Xi,lineNumber:1386,columnNumber:19},this)]},void 0,!0,{fileName:Xi,lineNumber:1379,columnNumber:17},this)},void 0,!1,{fileName:Xi,lineNumber:1378,columnNumber:15},this),Object(h.jsxDEV)("div",{className:"audit-btn-group",children:[Object(h.jsxDEV)(u.a,{onClick:e=>{this.setState({audit_visible:!1})},children:"\u53d6\u6d88"},void 0,!1,{fileName:Xi,lineNumber:1390,columnNumber:17},this),Object(h.jsxDEV)(u.a,{type:"primary",onClick:e=>{this.onConfirm(e)},children:"\u786e\u5b9a"},void 0,!1,{fileName:Xi,lineNumber:1397,columnNumber:17},this)]},void 0,!0,{fileName:Xi,lineNumber:1389,columnNumber:15},this)]},void 0,!0,{fileName:Xi,lineNumber:1369,columnNumber:13},this)]},void 0,!0,{fileName:Xi,lineNumber:1367,columnNumber:11},this):null,this.state.recall_visible?Object(h.jsxDEV)("div",{className:"audit",children:[Object(h.jsxDEV)("div",{className:"modal",children:" "},void 0,!1,{fileName:Xi,lineNumber:1411,columnNumber:13},this),Object(h.jsxDEV)("div",{className:"audit-box",children:[Object(h.jsxDEV)(g.a,{type:"close",className:"audit-close",onClick:e=>{this.setState({recall_visible:!1})}},void 0,!1,{fileName:Xi,lineNumber:1413,columnNumber:15},this),Object(h.jsxDEV)("div",{className:"audit-box-title",children:"\u5f53\u524d\u6b63\u5728\u5ba1\u6838\u4e2d"},void 0,!1,{fileName:Xi,lineNumber:1420,columnNumber:15},this),Object(h.jsxDEV)("div",{className:"audit-box-txt",children:"\u63d0\u4ea4\u5ba1\u6838\u4f1a\u5c06\u539f\u6765\u5ba1\u6279\u64a4\u56de\u624d\u53ef\u8fdb\u884c\u63d0\u4ea4,\u662f\u5426\u64a4\u56de?"},void 0,!1,{fileName:Xi,lineNumber:1421,columnNumber:15},this),Object(h.jsxDEV)("div",{className:"audit-btn-group",children:[Object(h.jsxDEV)(u.a,{onClick:e=>{this.setState({recall_visible:!1})},children:"\u53d6\u6d88"},void 0,!1,{fileName:Xi,lineNumber:1423,columnNumber:17},this),Object(h.jsxDEV)(u.a,{type:"primary",onClick:e=>{this.onReCall(e)},children:"\u786e\u5b9a"},void 0,!1,{fileName:Xi,lineNumber:1430,columnNumber:17},this)]},void 0,!0,{fileName:Xi,lineNumber:1422,columnNumber:15},this)]},void 0,!0,{fileName:Xi,lineNumber:1412,columnNumber:13},this)]},void 0,!0,{fileName:Xi,lineNumber:1410,columnNumber:11},this):null,this.state.approvalLoading?Object(h.jsxDEV)("div",{className:"audit",children:[Object(h.jsxDEV)("div",{className:"modal",children:" "},void 0,!1,{fileName:Xi,lineNumber:1444,columnNumber:13},this),Object(h.jsxDEV)("div",{className:"audit-box",children:[Object(h.jsxDEV)("div",{className:"audit-box-title",children:"\u64a4\u9500\u5ba1\u6279\u4e2d"},void 0,!1,{fileName:Xi,lineNumber:1446,columnNumber:15},this),Object(h.jsxDEV)("div",{className:"audit-box-txt",children:["\u6b63\u5728\u53d1\u8d77\u64a4\u9500...,\u8bf7\u7b49\u5f85 ",Object(h.jsxDEV)("span",{style:{color:"red"},children:[" ",this.state.timer]},void 0,!0,{fileName:Xi,lineNumber:1448,columnNumber:31},this)," \u79d2"]},void 0,!0,{fileName:Xi,lineNumber:1447,columnNumber:15},this)]},void 0,!0,{fileName:Xi,lineNumber:1445,columnNumber:13},this)]},void 0,!0,{fileName:Xi,lineNumber:1443,columnNumber:11},this):null,Object(h.jsxDEV)("div",{className:"edit-btnList",children:[Object(h.jsxDEV)(u.a,{type:"primary",onClick:()=>this.submit(),children:"\u63d0\u4ea4\u5ba1\u6838"},void 0,!1,{fileName:Xi,lineNumber:1455,columnNumber:11},this),Object(h.jsxDEV)(u.a,{type:"normal",onClick:()=>this.cancel(),children:"\u53d6\u6d88"},void 0,!1,{fileName:Xi,lineNumber:1458,columnNumber:11},this)]},void 0,!0,{fileName:Xi,lineNumber:1454,columnNumber:9},this)]},void 0,!0,{fileName:Xi,lineNumber:943,columnNumber:7},this)}}i(238);const aa=[{title:"\u5151\u6362\u7801-\u6279\u6b21ID",name:"id",prop:"id",type:"normal",width:"auto"},{title:"\u5151\u6362\u7801\u540d\u79f0",prop:"title",name:"title",width:"auto",type:"solt"},{title:"\u6709\u6548\u671f",name:"time",prop:"time",type:"slot",width:"250px"},{title:"\u8425\u9500\u8ba1\u5212\u5f52\u5c5e",name:"plan_title",type:"normal",prop:"plan_title",width:"auto"},{title:"\u5f52\u5c5eKEY\u6279\u6b21ID",name:"key_batch_id",type:"normal",prop:"key_batch_id",width:"auto"},{title:"\u542f\u7528/\u6682\u505c",width:"auto",type:"slot",prop:"switch"},{title:"\u64cd\u4f5c",prop:"opearo",name:"opearo",type:"slot",width:"280px"},{title:"\u72b6\u6001",name:"status",type:"slot",prop:"status",width:"auto"},{title:"\u5238\u603b\u6570(\u5df2\u53d1\u653e)",name:"quantity",type:"normal",prop:"quantity",width:"auto"},{title:"\u5df2\u9886\u53d6",name:"received",type:"normal",prop:"received",width:"auto"},{title:"\u5df2\u4f7f\u7528",name:"usage",type:"normal",prop:"usage",width:"auto"},{title:"\u5269\u4f59\u6570",name:"stock",type:"normal",prop:"stock",width:"auto"},{title:"\u5df2\u5931\u6548",name:"expired",type:"normal",prop:"expired",width:"auto"},{title:"\u5df2\u4f5c\u5e9f",name:"invalid",type:"normal",prop:"invalid",width:"auto"}],sa=[{title:"\u5168\u90e8",index:0},{title:"\u521b\u5efa\u4e2d",index:-1},{title:"\u672a\u5f00\u59cb",index:3},{title:"\u5ba1\u6838\u4e2d",index:6},{title:"\u672a\u901a\u8fc7",index:7},{title:"\u8fdb\u884c\u4e2d",index:1},{title:"\u6682\u505c\u4e2d",index:2},{title:"\u751f\u6210\u4e2d",index:8},{title:"\u5df2\u7ed3\u675f",index:4},{title:"\u5df2\u4f5c\u5e9f",index:5}];var la="/Users/zhangds/web/blue-brother/frontend/src/pages/exchangecode/list/list.js";class na extends m.a.Component{constructor(e){super(e),this.state={codeList:[],total:0,page:1,limit:10,tabList:[...sa],combinedValue:[],DateTime:"",search:this.initSearch(),status:0,tableHeight:600,tabIndex:0,planOptions:[]}}addCodeFunction(e,t){sessionStorage.setItem("knockGold_effectDate",JSON.stringify({})),sessionStorage.setItem("redPackets_effectDate",JSON.stringify({}));let i=[{pagetitle:"\u65b0\u5efa\u5151\u6362\u7801",items:[{path:"/home/exchangecode-list",name:"\u5151\u6362\u7801\u7ba1\u7406"},{path:"/home/exchangecode-exchangecodeAdd",name:"\u65b0\u5efa\u5151\u6362\u7801"}]}];1===e?(i[0].pagetitle="\u590d\u5236",i[0].items[1].name=`\u590d\u5236:${t.title}`,sessionStorage.setItem("keyBatch_id",t.key_batch_id)):2===e&&(i[0].pagetitle="\u7f16\u8f91",i[0].items[1].name=`\u7f16\u8f91:${t.title}\u5151\u6362\u7801\u7684\u5546\u54c1\u8303\u56f4\u5217\u8868`,sessionStorage.setItem("approval_id",t.approval_id),sessionStorage.setItem("approval_status",t.status)),e&&(sessionStorage.setItem("knockGold_effectDate",JSON.stringify(t.keyBatch.plan)),sessionStorage.setItem("redPackets_effectDate",JSON.stringify(t.keyBatch.plan))),sessionStorage.setItem("keyType","1"),sessionStorage.setItem("code_id",null===t||void 0===t?void 0:t.id),sessionStorage.setItem("isState",e),sessionStorage.setItem("breaknav",JSON.stringify(i)),sessionStorage.setItem("pathname2","/home/exchangecode-exchangecodeAdd"),this.props.history.push("/home/exchangecode-exchangecodeAdd")}aboutFn(e,t){sessionStorage.setItem("pathname2","/home/exchange-addcommodity");let i=[{pagetitle:"\u7f16\u8f91",items:[{path:"/home/exchangecode-list",name:"\u5151\u6362\u7801\u7ba1\u7406"},{path:"/home/exchange-addcommodity",name:t.title+"\u5151\u6362\u7801\u7684\u5546\u54c1\u8303\u56f4\u5217\u8868"}]}];sessionStorage.setItem("code_id",t.id),sessionStorage.setItem("isCombining",t.recharge_type),sessionStorage.setItem("breaknav",JSON.stringify(i)),window.open("#/home/exchange-addcommodity")}initSearch(){return{plan_title:"",key_batch_id:"",code_batch_id:"",code_batch_name:""}}searchChange(e,t){const i=this.state.search;i[e]=t,this.setState({search:i})}getPlan(){Object(a.rb)().then((e=>Object(a.Tb)(e,((e,t)=>{const i=e.map((e=>({key:e.id,text:e.title})));this.setState({planOptions:i})}),(e=>{}))))}copyElementFunction(e){var t,i;let a="";return a=([1,2,3].includes(null===e||void 0===e?void 0:e.status)||[4,5].includes(null===e||void 0===e?void 0:e.status)&&[4,5,8].includes(null===(t=e.keyBatch)||void 0===t?void 0:t.status)&&[3,5,4].includes(null===(i=e.keyBatch.plan)||void 0===i?void 0:i.status))&&0===e.keyBatch.plan.settlement_type?Object(h.jsxDEV)("span",{className:"grid-link",style:{},onClick:t=>this.addCodeFunction(1,e),children:"\u590d\u5236"},void 0,!1,{fileName:la,lineNumber:161,columnNumber:9},this):Object(h.jsxDEV)("span",{style:{paddingRight:"10px",color:"#d8dbdd"},children:"\u590d\u5236"},void 0,!1,{fileName:la,lineNumber:167,columnNumber:9},this),a}deleteCodeFunction(e){const t=this;G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:"\u662f\u5426\u5220\u9664\u8be5\u5151\u6362\u7801\uff1f"},void 0,!1,{fileName:la,lineNumber:187,columnNumber:16},this),onConfirm(){Object(a.B)(e.id).then((e=>{Object(a.Tb)(e,((e,i)=>{c.a.clear(),c.a.success(i),t.getCodeListFn()}),(e=>{c.a.error(e)}))})).catch((e=>{}))},onCancel:this.onCancel,className:"questModal",parentComponent:this})}tabFn(e){this.setState({tabIndex:e,search:this.initSearch(),page:1,limit:10}),setTimeout((()=>{this.getCodeListFn({},e)}),10)}pageChange(e){this.setState({page:e}),setTimeout((()=>{this.getCodeListFn()}),10)}countChange(e){this.setState({page:1,limit:e}),setTimeout((()=>{this.getCodeListFn()}),10)}sureFn(){this.setState({page:1,limit:10},(()=>{this.getCodeListFn()}))}delCodeFun(e){let t=this;Object(a.p)(e).then((e=>{Object(a.Tb)(e,((e,i)=>{c.a.clear(),c.a.success(i),t.getCodeListFn()}),(e=>{c.a.error(e)}))})).catch((e=>{}))}delFn(e,t){if(6==t.status)return void c.a.error("\u5ba1\u6838\u4e2d\u7684\u6570\u636e\u4e0d\u5141\u8bb8\u4f5c\u5e9f");let i=this,a={type:2,object_value:t.id};try{Ut(a).then((e=>{2===e?i.delCodeFun(t.id):1===e&&G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:["\u786e\u5b9a\u4f5c\u5e9f",t.title,"\uff1f"]},void 0,!0,{fileName:la,lineNumber:281,columnNumber:22},this),onConfirm(){i.delCodeFun(t.id)},onCancel(){},className:"questModal",parentComponent:this})}))}catch(s){}}changestatus(e,t){let i=this;G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:["\u662f\u5426",1==t.old_status?"\u505c\u7528":"\u542f\u7528","\u8be5\u5151\u6362\u7801\u6279\u6b21\uff1f"]},void 0,!0,{fileName:la,lineNumber:301,columnNumber:16},this),onConfirm:()=>{Object(a.wc)(t.id,{operation:1==t.old_status?"2":"1"}).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.clear(),c.a.success(t),i.getCodeListFn()}),(e=>{c.a.error(e)}))})).catch((e=>{}))},onCancel:this.onCancel,className:"questModal",parentComponent:this})}onChangeCombinedDate(e){this.setState({combinedValue:e}),this.getCodeListFn(e)}getCodeListFn(e={},t=this.state.tabIndex){var i;let s=this,{page:l,limit:n,search:o}=Object(de.a)(s.state);o.plan_title=(null===(i=o.plan_title)||void 0===i?void 0:i.text)||"";let r={page:l,limit:n,...o};this.state.combinedValue&&this.state.combinedValue[0]&&(r.begin_time=this.state.combinedValue[0],r.end_time=this.state.combinedValue[1]),e&&e[0]&&(r.begin_time=e[0],r.end_time=e[1]),e&&null==e[0]&&e.length>1&&r.begin_time&&(delete r.begin_time,delete r.end_time),t&&(r.status=this.state.tabList[t].index,0==t&&(r.status=null)),Object(a.U)(r).then((e=>{let t=JSON.parse(e);if(200==t.code){const e=t.data.data,{total:i}=t.data;s.setState({codeList:e,total:i})}})).catch((e=>{}))}componentWillMount(){this.setState({tableHeight:window.innerHeight-390}),this.getPlan()}onReCall(e,t){let i=t.approval_id;G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:"\u8be5\u6570\u636e\u6b63\u5728\u5ba1\u6279\u4e2d,\u662f\u5426\u786e\u8ba4\u64a4\u9500\u5ba1\u6279\uff1f"},void 0,!1,{fileName:la,lineNumber:384,columnNumber:16},this),onConfirm:()=>{Object(a.bd)(i).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.success("\u64a4\u9500\u5ba1\u6279\u6210\u529f"),setTimeout((()=>{this.getCodeListFn()}),3e3)}),(e=>{c.a.error(e)}))}))},onCancel:this.onCancel,className:"questModal",parentComponent:this})}dingTask(e){Object(a.G)(e).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.success(t),this.getCodeListFn()}),(e=>{c.a.error(e)}))}))}render(){const e=Object(h.jsxDEV)(Jt.a,{showTime:{format:"HH:mm:ss",defaultTime:["00:00:00","23:59:59"]},format:"YYYY-MM-DD HH:mm:ss",className:"zent-datepicker-demo",value:this.state.combinedValue,onChange:e=>{this.onChangeCombinedDate(e)}},void 0,!1,{fileName:la,lineNumber:425,columnNumber:7},this);return Object(h.jsxDEV)("div",{id:"exchangecodelist",children:Object(h.jsxDEV)(Ft,{slot:e,tabs:this.state.tabList,tabChange:this.tabFn.bind(this),width:130,children:[Object(h.jsxDEV)("div",{className:"codetable ",children:[Object(h.jsxDEV)(u.a,{type:"primary",icon:"plus",onClick:()=>this.addCodeFunction(),children:"\u65b0\u5efa\u5151\u6362\u7801"},void 0,!1,{fileName:la,lineNumber:447,columnNumber:13},this),Object(h.jsxDEV)("div",{className:"codesFind",children:Object(h.jsxDEV)(l.a,{children:[Object(h.jsxDEV)(s.a,{labelname:"\u8ba1\u5212\u540d\u79f0\uff1a",required:"",labelwidth:"90px",children:Object(h.jsxDEV)(X.a,{name:"state",value:this.state.search.plan_title,options:this.state.planOptions,placeholder:"\u8bf7\u8f93\u5165",width:204,clearable:!0,onChange:e=>{this.searchChange("plan_title",e)}},void 0,!1,{fileName:la,lineNumber:453,columnNumber:19},this)},void 0,!1,{fileName:la,lineNumber:452,columnNumber:17},this),Object(h.jsxDEV)(s.a,{labelname:"key\u6279\u6b21ID\uff1a",required:"",labelwidth:"100px",children:Object(h.jsxDEV)(n.a,{value:this.state.search.key_batch_id,countShow:!1,labelWidth:"0px",placeholder:"\u8bf7\u8f93\u5165",width:204,onChange:e=>{this.searchChange("key_batch_id",e)},onClearItem:e=>{this.searchChange("key_batch_id","")}},void 0,!1,{fileName:la,lineNumber:466,columnNumber:19},this)},void 0,!1,{fileName:la,lineNumber:465,columnNumber:17},this),Object(h.jsxDEV)(s.a,{labelname:"\u5151\u6362\u7801\u6279\u6b21\u540d\u79f0\uff1a",required:"",labelwidth:"155px",children:Object(h.jsxDEV)(n.a,{value:this.state.search.code_batch_name,countShow:!1,labelWidth:"0px",placeholder:"\u8bf7\u8f93\u5165",width:204,onChange:e=>{this.searchChange("code_batch_name",e)},onClearItem:e=>{this.searchChange("code_batch_name","")}},void 0,!1,{fileName:la,lineNumber:481,columnNumber:19},this)},void 0,!1,{fileName:la,lineNumber:480,columnNumber:17},this),Object(h.jsxDEV)(s.a,{labelname:"\u5151\u6362\u7801\u6279\u6b21ID\uff1a",required:"",labelwidth:"130px",children:Object(h.jsxDEV)(n.a,{value:this.state.search.code_batch_id,countShow:!1,labelWidth:"0px",placeholder:"\u8bf7\u8f93\u5165",width:204,onChange:e=>{this.searchChange("code_batch_id",e)},onClearItem:e=>{this.searchChange("code_batch_id","")}},void 0,!1,{fileName:la,lineNumber:496,columnNumber:19},this)},void 0,!1,{fileName:la,lineNumber:495,columnNumber:17},this),Object(h.jsxDEV)("div",{className:"button_box",children:[Object(h.jsxDEV)(u.a,{type:"primary",onClick:()=>this.getCodeListFn(),children:"\u67e5\u8be2"},void 0,!1,{fileName:la,lineNumber:511,columnNumber:19},this),Object(h.jsxDEV)(u.a,{onClick:()=>this.setState({search:this.initSearch()},(()=>this.getCodeListFn())),children:"\u91cd\u7f6e"},void 0,!1,{fileName:la,lineNumber:514,columnNumber:19},this)]},void 0,!0,{fileName:la,lineNumber:510,columnNumber:17},this)]},void 0,!0,{fileName:la,lineNumber:451,columnNumber:15},this)},void 0,!1,{fileName:la,lineNumber:450,columnNumber:13},this)]},void 0,!0,{fileName:la,lineNumber:446,columnNumber:11},this),Object(h.jsxDEV)("div",{className:"code-table",children:Object(h.jsxDEV)(I,{spliteColor:"#fff",tableData:this.state.codeList,Column:aa,maxheight:this.state.tableHeight,countbarVisible:!1,isSwitch:!1,page:this.state.page,dataCount:this.state.total,isMultiple:!1,pageChange:e=>{this.pageChange(e)},countChange:e=>{this.countChange(e)},checkChange:e=>{},ComponentHandler:(e,t)=>"time"==e?Object(h.jsxDEV)("span",{children:[t.begin_time,"\u81f3",t.end_time]},void 0,!0,{fileName:la,lineNumber:546,columnNumber:21},this):"title"==e?Object(h.jsxDEV)("span",{className:"grid-link",onClick:e=>this.aboutFn(e,t),children:t.title},void 0,!1,{fileName:la,lineNumber:553,columnNumber:21},this):"switch"==e?Object(h.jsxDEV)(v.a,{size:"small",checked:2!=t.old_status,onChange:e=>this.changestatus(e,t),disabled:4==t.status||5==t.status},void 0,!1,{fileName:la,lineNumber:560,columnNumber:21},this):"status"==e?Object(h.jsxDEV)("p",{className:"dflexa",children:Object(h.jsxDEV)("span",{children:[Object(h.jsxDEV)("font",{className:"icon",style:{background:At.exchangeStatusBg(parseInt(t.status))}},void 0,!1,{fileName:la,lineNumber:572,columnNumber:25},this),t.status_text]},void 0,!0,{fileName:la,lineNumber:571,columnNumber:23},this)},void 0,!1,{fileName:la,lineNumber:570,columnNumber:21},this):"opearo"==e?Object(h.jsxDEV)("div",{children:[4!=t.status&&5!=t.status&&8!=t.status&&6!=t.status?Object(h.jsxDEV)("span",{className:"grid-link",onClick:e=>this.addCodeFunction(2,t),children:"\u7f16\u8f91"},void 0,!1,{fileName:la,lineNumber:590,columnNumber:25},this):Object(h.jsxDEV)("span",{style:{color:"#d8dbdd"},className:"grid-link",children:"\u7f16\u8f91"},void 0,!1,{fileName:la,lineNumber:597,columnNumber:25},this),this.copyElementFunction(t),[4,5,8,6,-1].includes(t.status)||7===t.status&&-1===t.old_status?Object(h.jsxDEV)("span",{style:{paddingRight:"10px",color:"#d8dbdd"},children:"\u4f5c\u5e9f"},void 0,!1,{fileName:la,lineNumber:604,columnNumber:25},this):Object(h.jsxDEV)("span",{className:"grid-link",onClick:e=>this.delFn(e,t),children:"\u4f5c\u5e9f"},void 0,!1,{fileName:la,lineNumber:613,columnNumber:25},this),6==t.status&&Number(t.approval_id)>0?Object(h.jsxDEV)("span",{className:"grid-link",onClick:e=>this.onReCall(e,t),children:"\u64a4\u9500\u5ba1\u6279"},void 0,!1,{fileName:la,lineNumber:618,columnNumber:25},this):Object(h.jsxDEV)("span",{style:{color:"#d8dbdd",marginRight:"12px"},children:"\u64a4\u9500\u5ba1\u6279"},void 0,!1,{fileName:la,lineNumber:622,columnNumber:25},this),t.approval_id&&6===t.status?Object(h.jsxDEV)("span",{className:"grid-link",onClick:e=>{this.dingTask(t.approval_id)},children:"\u9489\u9489\u5ba1\u6279\u67e5\u8be2"},void 0,!1,{fileName:la,lineNumber:625,columnNumber:25},this):Object(h.jsxDEV)("span",{className:"grid-link disabled",children:"\u9489\u9489\u5ba1\u6279\u67e5\u8be2"},void 0,!1,{fileName:la,lineNumber:634,columnNumber:25},this),[-1,7].includes(t.status)&&-1==t.old_status?Object(h.jsxDEV)("span",{className:"grid-link",style:{color:"red"},onClick:e=>this.deleteCodeFunction(t),children:"\u5220\u9664"},void 0,!1,{fileName:la,lineNumber:638,columnNumber:25},this):Object(h.jsxDEV)("span",{style:{color:"#d8dbdd"},className:"grid-link",children:"\u5220\u9664"},void 0,!1,{fileName:la,lineNumber:646,columnNumber:25},this)]},void 0,!0,{fileName:la,lineNumber:585,columnNumber:21},this):void 0},void 0,!1,{fileName:la,lineNumber:526,columnNumber:13},this)},void 0,!1,{fileName:la,lineNumber:525,columnNumber:11},this)]},void 0,!0,{fileName:la,lineNumber:440,columnNumber:9},this)},void 0,!1,{fileName:la,lineNumber:439,columnNumber:7},this)}}i(239);const oa=[{title:"\u5151\u6362\u7801-\u6279\u6b21ID",name:"id",prop:"id",type:"normal",width:"auto"},{title:"\u5151\u6362\u7801\u540d\u79f0",prop:"title",name:"title",width:"auto",type:"solt"},{title:"\u6709\u6548\u671f",name:"time",prop:"time",type:"slot",width:"250px"},{title:"\u8425\u9500\u8ba1\u5212\u5f52\u5c5e",name:"plan_title",type:"normal",prop:"plan_title",width:"auto"},{title:"\u5f52\u5c5eKEY\u6279\u6b21ID",name:"key_batch_id",type:"normal",prop:"key_batch_id",width:"auto"},{title:"\u542f\u7528/\u6682\u505c",width:"auto",type:"slot",prop:"switch"},{title:"\u64cd\u4f5c",prop:"opearo",name:"opearo",type:"slot",width:"280px"},{title:"\u72b6\u6001",name:"status",type:"slot",prop:"status",width:"auto"},{title:"\u5238\u603b\u6570(\u5df2\u53d1\u653e)",name:"quantity",type:"normal",prop:"quantity",width:"auto"},{title:"\u5df2\u9886\u53d6",name:"received",type:"normal",prop:"received",width:"auto"},{title:"\u5df2\u4f7f\u7528",name:"usage",type:"normal",prop:"usage",width:"auto"},{title:"\u5269\u4f59\u6570",name:"stock",type:"normal",prop:"stock",width:"auto"},{title:"\u5df2\u5931\u6548",name:"expired",type:"normal",prop:"expired",width:"auto"},{title:"\u5df2\u4f5c\u5e9f",name:"invalid",type:"normal",prop:"invalid",width:"auto"}],ra=[{title:"\u5168\u90e8",index:0},{title:"\u521b\u5efa\u4e2d",index:-1},{title:"\u672a\u5f00\u59cb",index:3},{title:"\u5ba1\u6838\u4e2d",index:6},{title:"\u672a\u901a\u8fc7",index:7},{title:"\u8fdb\u884c\u4e2d",index:1},{title:"\u6682\u505c\u4e2d",index:2},{title:"\u751f\u6210\u4e2d",index:8},{title:"\u5df2\u7ed3\u675f",index:4},{title:"\u5df2\u4f5c\u5e9f",index:5}];var ma="/Users/zhangds/web/blue-brother/frontend/src/pages/exchangecode/combiningList/list.js";class ca extends m.a.Component{constructor(e){super(e),this.state={codeList:[],total:0,page:1,limit:10,tabList:[...ra],combinedValue:[],DateTime:"",search:this.initSearch(),status:0,tableHeight:600,tabIndex:0,planOptions:[]}}addCodeFunction(e,t){sessionStorage.setItem("knockGold_effectDate",JSON.stringify({})),sessionStorage.setItem("redPackets_effectDate",JSON.stringify({}));let i=[{pagetitle:"\u65b0\u5efa\u7ec4\u5408\u5546\u54c1",items:[{path:"/home/combining-list",name:"\u7ec4\u5408\u5546\u54c1\u7ba1\u7406"},{path:"/home/combiningAdd",name:"\u65b0\u5efa\u7ec4\u5408\u5546\u54c1"}]}];1===e?(i[0].pagetitle="\u590d\u5236",i[0].items[1].name=`\u590d\u5236:${t.title}`,sessionStorage.setItem("keyBatch_id",t.key_batch_id)):2===e&&(i[0].pagetitle="\u7f16\u8f91",i[0].items[1].name=`\u7f16\u8f91:${t.title}\u5151\u6362\u7801\u7684\u5546\u54c1\u8303\u56f4\u5217\u8868`,sessionStorage.setItem("approval_id",t.approval_id),sessionStorage.setItem("approval_status",t.status)),e&&(sessionStorage.setItem("knockGold_effectDate",JSON.stringify(t.keyBatch.plan)),sessionStorage.setItem("redPackets_effectDate",JSON.stringify(t.keyBatch.plan))),sessionStorage.setItem("code_id",null===t||void 0===t?void 0:t.id),sessionStorage.setItem("isState",e),sessionStorage.setItem("breaknav",JSON.stringify(i)),sessionStorage.setItem("pathname2","/home/combiningAdd"),this.props.history.push("/home/combiningAdd")}aboutFn(e,t){sessionStorage.setItem("pathname2","/home/exchange-addcommodity");let i=[{pagetitle:"\u7f16\u8f91",items:[{path:"/home/exchangecode-list",name:"\u5151\u6362\u7801\u7ba1\u7406"},{path:"/home/exchange-addcommodity",name:t.title+"\u5151\u6362\u7801\u7684\u5546\u54c1\u8303\u56f4\u5217\u8868"}]}];sessionStorage.setItem("code_id",t.id),sessionStorage.setItem("breaknav",JSON.stringify(i)),window.open("#/home/exchange-addcommodity")}initSearch(){return{plan_title:"",key_batch_id:"",code_batch_id:"",code_batch_name:""}}searchChange(e,t){const i=this.state.search;i[e]=t,this.setState({search:i})}getPlan(){Object(a.rb)().then((e=>Object(a.Tb)(e,((e,t)=>{const i=e.map((e=>({key:e.id,text:e.title})));this.setState({planOptions:i})}),(e=>{}))))}copyElementFunction(e){var t,i;let a="";return a=([1,2,3].includes(null===e||void 0===e?void 0:e.status)||[4,5].includes(null===e||void 0===e?void 0:e.status)&&[4,5,8].includes(null===(t=e.keyBatch)||void 0===t?void 0:t.status)&&[3,5,4].includes(null===(i=e.keyBatch.plan)||void 0===i?void 0:i.status))&&0===e.keyBatch.plan.settlement_type?Object(h.jsxDEV)("span",{className:"grid-link",style:{},onClick:t=>this.addCodeFunction(1,e),children:"\u590d\u5236"},void 0,!1,{fileName:ma,lineNumber:159,columnNumber:9},this):Object(h.jsxDEV)("span",{style:{paddingRight:"10px",color:"#d8dbdd"},children:"\u590d\u5236"},void 0,!1,{fileName:ma,lineNumber:165,columnNumber:9},this),a}deleteCodeFunction(e){const t=this;G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:"\u662f\u5426\u5220\u9664\u8be5\u5151\u6362\u7801\uff1f"},void 0,!1,{fileName:ma,lineNumber:185,columnNumber:16},this),onConfirm(){Object(a.B)(e.id).then((e=>{Object(a.Tb)(e,((e,i)=>{c.a.clear(),c.a.success(i),t.getCodeListFn()}),(e=>{c.a.error(e)}))})).catch((e=>{}))},onCancel:this.onCancel,className:"questModal",parentComponent:this})}tabFn(e){this.setState({tabIndex:e,search:this.initSearch(),page:1,limit:10}),setTimeout((()=>{this.getCodeListFn({},e)}),10)}pageChange(e){this.setState({page:e}),setTimeout((()=>{this.getCodeListFn()}),10)}countChange(e){this.setState({page:1,limit:e}),setTimeout((()=>{this.getCodeListFn()}),10)}sureFn(){this.setState({page:1,limit:10},(()=>{this.getCodeListFn()}))}delCodeFun(e){let t=this;Object(a.p)(e).then((e=>{Object(a.Tb)(e,((e,i)=>{c.a.clear(),c.a.success(i),t.getCodeListFn()}),(e=>{c.a.error(e)}))})).catch((e=>{}))}delFn(e,t){if(6==t.status)return void c.a.error("\u5ba1\u6838\u4e2d\u7684\u6570\u636e\u4e0d\u5141\u8bb8\u4f5c\u5e9f");let i=this,a={type:2,object_value:t.id};try{Ut(a).then((e=>{2===e?i.delCodeFun(t.id):1===e&&G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:["\u786e\u5b9a\u4f5c\u5e9f",t.title,"\uff1f"]},void 0,!0,{fileName:ma,lineNumber:279,columnNumber:22},this),onConfirm(){i.delCodeFun(t.id)},onCancel(){},className:"questModal",parentComponent:this})}))}catch(s){}}changestatus(e,t){let i=this;G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:["\u662f\u5426",1==t.old_status?"\u505c\u7528":"\u542f\u7528","\u8be5\u5151\u6362\u7801\u6279\u6b21\uff1f"]},void 0,!0,{fileName:ma,lineNumber:299,columnNumber:16},this),onConfirm:()=>{Object(a.wc)(t.id,{operation:1==t.old_status?"2":"1"}).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.clear(),c.a.success(t),i.getCodeListFn()}),(e=>{c.a.error(e)}))})).catch((e=>{}))},onCancel:this.onCancel,className:"questModal",parentComponent:this})}onChangeCombinedDate(e){this.setState({combinedValue:e}),this.getCodeListFn(e)}getCodeListFn(e={},t=this.state.tabIndex){var i;let s=this,{page:l,limit:n,search:o}=Object(de.a)(s.state);o.plan_title=(null===(i=o.plan_title)||void 0===i?void 0:i.text)||"";let r={page:l,limit:n,...o,recharge_type:2};this.state.combinedValue&&this.state.combinedValue[0]&&(r.begin_time=this.state.combinedValue[0],r.end_time=this.state.combinedValue[1]),e&&e[0]&&(r.begin_time=e[0],r.end_time=e[1]),e&&null==e[0]&&e.length>1&&r.begin_time&&(delete r.begin_time,delete r.end_time),t&&(r.status=this.state.tabList[t].index,0==t&&(r.status=null)),Object(a.U)(r).then((e=>{let t=JSON.parse(e);if(200==t.code){const e=t.data.data,{total:i}=t.data;s.setState({codeList:e,total:i})}})).catch((e=>{}))}componentWillMount(){this.setState({tableHeight:window.innerHeight-390}),this.getPlan()}onReCall(e,t){let i=t.approval_id;G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:"\u8be5\u6570\u636e\u6b63\u5728\u5ba1\u6279\u4e2d,\u662f\u5426\u786e\u8ba4\u64a4\u9500\u5ba1\u6279\uff1f"},void 0,!1,{fileName:ma,lineNumber:382,columnNumber:16},this),onConfirm:()=>{Object(a.bd)(i).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.success("\u64a4\u9500\u5ba1\u6279\u6210\u529f"),setTimeout((()=>{this.getCodeListFn()}),3e3)}),(e=>{c.a.error(e)}))}))},onCancel:this.onCancel,className:"questModal",parentComponent:this})}dingTask(e){Object(a.G)(e).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.success(t),this.getCodeListFn()}),(e=>{c.a.error(e)}))}))}render(){const e=Object(h.jsxDEV)(Jt.a,{showTime:{format:"HH:mm:ss",defaultTime:["00:00:00","23:59:59"]},format:"YYYY-MM-DD HH:mm:ss",className:"zent-datepicker-demo",value:this.state.combinedValue,onChange:e=>{this.onChangeCombinedDate(e)}},void 0,!1,{fileName:ma,lineNumber:423,columnNumber:7},this);return Object(h.jsxDEV)("div",{id:"exchangecodelist",children:Object(h.jsxDEV)(Ft,{slot:e,tabs:this.state.tabList,tabChange:this.tabFn.bind(this),width:130,children:[Object(h.jsxDEV)("div",{className:"codetable ",children:[Object(h.jsxDEV)(u.a,{type:"primary",icon:"plus",onClick:()=>this.addCodeFunction(),children:"\u65b0\u5efa\u7ec4\u5408\u5546\u54c1"},void 0,!1,{fileName:ma,lineNumber:445,columnNumber:13},this),Object(h.jsxDEV)("div",{className:"codesFind",children:Object(h.jsxDEV)(l.a,{children:[Object(h.jsxDEV)(s.a,{labelname:"\u8ba1\u5212\u540d\u79f0\uff1a",required:"",labelwidth:"90px",children:Object(h.jsxDEV)(X.a,{name:"state",value:this.state.search.plan_title,options:this.state.planOptions,placeholder:"\u8bf7\u8f93\u5165",width:204,clearable:!0,onChange:e=>{this.searchChange("plan_title",e)}},void 0,!1,{fileName:ma,lineNumber:451,columnNumber:19},this)},void 0,!1,{fileName:ma,lineNumber:450,columnNumber:17},this),Object(h.jsxDEV)(s.a,{labelname:"key\u6279\u6b21ID\uff1a",required:"",labelwidth:"100px",children:Object(h.jsxDEV)(n.a,{value:this.state.search.key_batch_id,countShow:!1,labelWidth:"0px",placeholder:"\u8bf7\u8f93\u5165",width:204,onChange:e=>{this.searchChange("key_batch_id",e)},onClearItem:e=>{this.searchChange("key_batch_id","")}},void 0,!1,{fileName:ma,lineNumber:464,columnNumber:19},this)},void 0,!1,{fileName:ma,lineNumber:463,columnNumber:17},this),Object(h.jsxDEV)(s.a,{labelname:"\u5151\u6362\u7801\u6279\u6b21\u540d\u79f0\uff1a",required:"",labelwidth:"155px",children:Object(h.jsxDEV)(n.a,{value:this.state.search.code_batch_name,countShow:!1,labelWidth:"0px",placeholder:"\u8bf7\u8f93\u5165",width:204,onChange:e=>{this.searchChange("code_batch_name",e)},onClearItem:e=>{this.searchChange("code_batch_name","")}},void 0,!1,{fileName:ma,lineNumber:479,columnNumber:19},this)},void 0,!1,{fileName:ma,lineNumber:478,columnNumber:17},this),Object(h.jsxDEV)(s.a,{labelname:"\u5151\u6362\u7801\u6279\u6b21ID\uff1a",required:"",labelwidth:"130px",children:Object(h.jsxDEV)(n.a,{value:this.state.search.code_batch_id,countShow:!1,labelWidth:"0px",placeholder:"\u8bf7\u8f93\u5165",width:204,onChange:e=>{this.searchChange("code_batch_id",e)},onClearItem:e=>{this.searchChange("code_batch_id","")}},void 0,!1,{fileName:ma,lineNumber:494,columnNumber:19},this)},void 0,!1,{fileName:ma,lineNumber:493,columnNumber:17},this),Object(h.jsxDEV)("div",{className:"button_box",children:[Object(h.jsxDEV)(u.a,{type:"primary",onClick:()=>this.getCodeListFn(),children:"\u67e5\u8be2"},void 0,!1,{fileName:ma,lineNumber:509,columnNumber:19},this),Object(h.jsxDEV)(u.a,{onClick:()=>this.setState({search:this.initSearch()},(()=>this.getCodeListFn())),children:"\u91cd\u7f6e"},void 0,!1,{fileName:ma,lineNumber:512,columnNumber:19},this)]},void 0,!0,{fileName:ma,lineNumber:508,columnNumber:17},this)]},void 0,!0,{fileName:ma,lineNumber:449,columnNumber:15},this)},void 0,!1,{fileName:ma,lineNumber:448,columnNumber:13},this)]},void 0,!0,{fileName:ma,lineNumber:444,columnNumber:11},this),Object(h.jsxDEV)("div",{className:"code-table",children:Object(h.jsxDEV)(I,{spliteColor:"#fff",tableData:this.state.codeList,Column:oa,maxheight:this.state.tableHeight,countbarVisible:!1,isSwitch:!1,page:this.state.page,dataCount:this.state.total,isMultiple:!1,pageChange:e=>{this.pageChange(e)},countChange:e=>{this.countChange(e)},checkChange:e=>{},ComponentHandler:(e,t)=>"time"==e?Object(h.jsxDEV)("span",{children:[t.begin_time,"\u81f3",t.end_time]},void 0,!0,{fileName:ma,lineNumber:544,columnNumber:21},this):"title"==e?Object(h.jsxDEV)("span",{className:"grid-link",onClick:e=>this.aboutFn(e,t),children:t.title},void 0,!1,{fileName:ma,lineNumber:551,columnNumber:21},this):"switch"==e?Object(h.jsxDEV)(v.a,{size:"small",checked:2!=t.old_status,onChange:e=>this.changestatus(e,t),disabled:4==t.status||5==t.status},void 0,!1,{fileName:ma,lineNumber:558,columnNumber:21},this):"status"==e?Object(h.jsxDEV)("p",{className:"dflexa",children:Object(h.jsxDEV)("span",{children:[Object(h.jsxDEV)("font",{className:"icon",style:{background:At.exchangeStatusBg(parseInt(t.status))}},void 0,!1,{fileName:ma,lineNumber:570,columnNumber:25},this),t.status_text]},void 0,!0,{fileName:ma,lineNumber:569,columnNumber:23},this)},void 0,!1,{fileName:ma,lineNumber:568,columnNumber:21},this):"opearo"==e?Object(h.jsxDEV)("div",{children:[4!=t.status&&5!=t.status&&8!=t.status&&6!=t.status?Object(h.jsxDEV)("span",{className:"grid-link",onClick:e=>this.addCodeFunction(2,t),children:"\u7f16\u8f91"},void 0,!1,{fileName:ma,lineNumber:588,columnNumber:25},this):Object(h.jsxDEV)("span",{style:{color:"#d8dbdd"},className:"grid-link",children:"\u7f16\u8f91"},void 0,!1,{fileName:ma,lineNumber:595,columnNumber:25},this),this.copyElementFunction(t),[4,5,8,6,-1].includes(t.status)||7===t.status&&-1===t.old_status?Object(h.jsxDEV)("span",{style:{paddingRight:"10px",color:"#d8dbdd"},children:"\u4f5c\u5e9f"},void 0,!1,{fileName:ma,lineNumber:602,columnNumber:25},this):Object(h.jsxDEV)("span",{className:"grid-link",onClick:e=>this.delFn(e,t),children:"\u4f5c\u5e9f"},void 0,!1,{fileName:ma,lineNumber:611,columnNumber:25},this),6==t.status&&Number(t.approval_id)>0?Object(h.jsxDEV)("span",{className:"grid-link",onClick:e=>this.onReCall(e,t),children:"\u64a4\u9500\u5ba1\u6279"},void 0,!1,{fileName:ma,lineNumber:616,columnNumber:25},this):Object(h.jsxDEV)("span",{style:{color:"#d8dbdd",marginRight:"12px"},children:"\u64a4\u9500\u5ba1\u6279"},void 0,!1,{fileName:ma,lineNumber:620,columnNumber:25},this),t.approval_id&&6===t.status?Object(h.jsxDEV)("span",{className:"grid-link",onClick:e=>{this.dingTask(t.approval_id)},children:"\u9489\u9489\u5ba1\u6279\u67e5\u8be2"},void 0,!1,{fileName:ma,lineNumber:623,columnNumber:25},this):Object(h.jsxDEV)("span",{className:"grid-link disabled",children:"\u9489\u9489\u5ba1\u6279\u67e5\u8be2"},void 0,!1,{fileName:ma,lineNumber:632,columnNumber:25},this),[-1,7].includes(t.status)&&-1==t.old_status?Object(h.jsxDEV)("span",{className:"grid-link",style:{color:"red"},onClick:e=>this.deleteCodeFunction(t),children:"\u5220\u9664"},void 0,!1,{fileName:ma,lineNumber:636,columnNumber:25},this):Object(h.jsxDEV)("span",{style:{color:"#d8dbdd"},className:"grid-link",children:"\u5220\u9664"},void 0,!1,{fileName:ma,lineNumber:644,columnNumber:25},this)]},void 0,!0,{fileName:ma,lineNumber:583,columnNumber:21},this):void 0},void 0,!1,{fileName:ma,lineNumber:524,columnNumber:13},this)},void 0,!1,{fileName:ma,lineNumber:523,columnNumber:11},this)]},void 0,!0,{fileName:ma,lineNumber:438,columnNumber:9},this)},void 0,!1,{fileName:ma,lineNumber:437,columnNumber:7},this)}}var da=i(240),ua=(i(241),"/Users/zhangds/web/blue-brother/frontend/src/pages/exchangepage/main/main.js"),ha=i(155);let ba={1:"access_conf",3:"exchange",4:"coupon",8:"coupon"};const pa=[{title:"\u57fa\u672c\u4fe1\u606f",name:"thumb",prop:"thumb",className:"name",type:"slot",width:"10%"},{title:"\u6807\u9898",prop:"title",name:"title",width:"200px",type:"normal"},{title:"\u843d\u5730\u9875\u7c7b\u578b",name:"page",prop:"page",type:"slot",defaultText:0,width:"auto"},{title:"\u66f4\u65b0\u65f6\u95f4",name:"update_time",type:"normal",prop:"update_time",defaultText:"PM",width:"auto"},{title:"\u5f52\u5c5e\u8ba1\u5212",name:"plan.title",type:"normal",prop:"plan.title",defaultText:0,width:"auto",type:"normal"},{title:"\u94fe\u63a5\u5730\u5740",name:"href",type:"slot",prop:"href",defaultText:0,width:"auto"},{title:"\u521b\u5efa\u4eba",width:"auto",type:"normal",prop:"user_name",name:"user_name"},{title:"\u64cd\u4f5c",prop:"edit",name:"edit",type:"slot",width:"300px",defaultText:0}];class Na extends m.a.Component{constructor(e){super(e),this.state={tabList:[{title:"\u5168\u90e8"},{title:"\u672a\u5f00\u59cb"},{title:"\u8fdb\u884c\u4e2d"},{title:"\u6682\u505c\u4e2d"},{title:"\u5df2\u7ed3\u675f"}],distdata:[],tableHeight:500,filterList:[{id:0,label:"\u5206\u9500\u5546\u72b6\u6001",menuList:[{id:0,name:"\u5f00"},{id:1,name:"\u5173"}]}],menuList:[{id:0,name:"\u5206\u9500\u5546\u72b6\u6001",check:!1}],page:1,limit:10,key_word:"",status:null,dataCount:0,preview_visible:!1,preview_url:"",previewData:{},showType:1}}getTableList(e){this.state.key_word&&(e.title=this.state.key_word);let t=Object(Lt.a)(e,(e=>Object(Ht.a)(e)||Object(qt.a)(e)));Object(a.Gb)(t).then((e=>{Object(a.Tb)(e,((e,t)=>{this.setState({dataCount:e.total}),this.setState({distdata:e.data})}))}))}countChange(e){this.setState({limit:e});let t={page:this.state.page,limit:e,title:this.state.key_word};this.getTableList(t)}pageChange(e){this.setState({page:e});let t={page:e,limit:this.state.limit,title:this.state.key_word,status:this.state.status};this.getTableList(t)}editFn(e,t){sessionStorage.setItem("mouldType",2),sessionStorage.setItem("pageChange",1),sessionStorage.setItem("pageInfo",JSON.stringify(t)),window.location.href="/#/edittemplate"}delFn(e,t){let i=this;G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:["\u662f\u5426\u5220\u9664",Object(h.jsxDEV)("b",{children:["[",t.plan.title,"]"]},void 0,!0,{fileName:ua,lineNumber:195,columnNumber:15},this),"\uff1f"]},void 0,!0,{fileName:ua,lineNumber:194,columnNumber:9},this),onConfirm:()=>{Object(a.z)(t.id).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.clear(),c.a.success(t),i.getAccountFn()}),(e=>{}))})).catch((e=>{}))},onCancel:this.onCancel,className:"questModal",parentComponent:this})}tabChange(e){this.setState({page:1}),this.setState({limit:10}),this.setState({key_word:""});let t={page:1,limit:10},i=null;i=e>0?3==e?5:4==e?3:e:null,t.status=i,this.setState({status:i}),setTimeout((()=>{this.getTableList(t)}),10)}onPreview(e,t){let i=t[ba[t.page]];this.setState({preview_visible:!0,previewData:i,showType:t.page})}closePhone(e){this.setState({preview_visible:!1})}sureFn(){this.setState({page:1}),this.setState({limit:10});let e={page:1,limit:10,title:this.state.key_word,status:this.state.status};this.getTableList(e)}componentDidUpdate(e,t){t.key_word==this.state.key_word||this.state.key_word||this.sureFn()}componentWillMount(){this.setState({tableHeight:window.innerHeight-430})}onBack(){this.refs.preview.popPage()}onClose(){this.setState({preview_visible:!1})}render(){const{current:e,pageSize:t}=this.state;return Object(h.jsxDEV)("div",{id:"dislist",children:[Object(h.jsxDEV)(Ft,{tabs:this.state.tabList,tabChange:e=>this.tabChange(e),children:[Object(h.jsxDEV)("div",{className:"distable dflexj",children:[Object(h.jsxDEV)("div",{children:" "},void 0,!1,{fileName:ua,lineNumber:294,columnNumber:13},this),Object(h.jsxDEV)(n.a,{icon:"search",placeholder:"\u8bf7\u8f93\u5165\u5173\u952e\u5b57\u8fdb\u884c\u641c\u7d22",countShow:!1,value:this.state.key_word,height:"36px",width:"260px",alignment:"left",onClearItem:e=>{this.setState({key_word:""})},onChange:e=>{this.setState({key_word:e})},wordSearch:e=>{this.sureFn()}},void 0,!1,{fileName:ua,lineNumber:295,columnNumber:13},this)]},void 0,!0,{fileName:ua,lineNumber:293,columnNumber:11},this),Object(h.jsxDEV)("div",{children:Object(h.jsxDEV)(I,{isBorder:!0,spliteColor:"#fff",page:this.state.page,maxheight:this.state.tableHeight,tableData:this.state.distdata,Column:pa,isMultiple:!1,countbarVisible:!1,isSwitch:!1,dataCount:this.state.dataCount,countChange:e=>{this.countChange(e)},pageChange:e=>{this.pageChange(e)},checkChange:e=>{},ComponentHandler:(e,t)=>{if("thumb"==e)return Object(h.jsxDEV)(Ei.a,{trigger:"hover",position:"right-center",content:Object(h.jsxDEV)("img",{src:t.thumb,alt:"",style:{width:"375px",transform:"scale(.8)"}},void 0,!1,{fileName:ua,lineNumber:340,columnNumber:25},this),children:Object(h.jsxDEV)("img",{src:t.thumb,alt:"",style:{width:"30px",height:"30px"}},void 0,!1,{fileName:ua,lineNumber:347,columnNumber:23},this)},void 0,!1,{fileName:ua,lineNumber:336,columnNumber:21},this);if("name"==e)return Object(h.jsxDEV)(v.a,{size:"small",checked:!0},void 0,!1,{fileName:ua,lineNumber:352,columnNumber:26},this);if("client"==e)return Object(h.jsxDEV)("span",{children:[Object(h.jsxDEV)("font",{className:"icon",style:{background:At.pageStatusBg(parseInt(t.client))}},void 0,!1,{fileName:ua,lineNumber:358,columnNumber:23},this),At.pageStatus(parseInt(t.client))]},void 0,!0,{fileName:ua,lineNumber:357,columnNumber:21},this);if("page"==e)return Object(h.jsxDEV)("span",{children:[Object(h.jsxDEV)("font",{className:"icon",style:{background:At.pageTypeStatusBg(parseInt(t.page))}},void 0,!1,{fileName:ua,lineNumber:371,columnNumber:23},this),At.pageTypeStatus(parseInt(t.page))]},void 0,!0,{fileName:ua,lineNumber:370,columnNumber:21},this);if("edit"==e)return Object(h.jsxDEV)("span",{children:[Object(h.jsxDEV)("a",{className:"grid-link",onClick:e=>{this.editFn(e,t)},children:"\u7f16\u8f91"},void 0,!1,{fileName:ua,lineNumber:384,columnNumber:23},this),Object(h.jsxDEV)("a",{onClick:e=>{this.onPreview(e,t)},className:"grid-link",children:"\u9884\u89c8"},void 0,!1,{fileName:ua,lineNumber:392,columnNumber:23},this)]},void 0,!0,{fileName:ua,lineNumber:383,columnNumber:21},this);if("href"==e){const e=Object(h.jsxDEV)(ha,{value:t.href},void 0,!1,{fileName:ua,lineNumber:404,columnNumber:35},this);return Object(h.jsxDEV)(Ei.a,{trigger:"hover",content:e,children:Object(h.jsxDEV)("a",{href:t.href,children:t.href},void 0,!1,{fileName:ua,lineNumber:408,columnNumber:23},this)},void 0,!1,{fileName:ua,lineNumber:407,columnNumber:21},this)}}},void 0,!1,{fileName:ua,lineNumber:315,columnNumber:13},this)},void 0,!1,{fileName:ua,lineNumber:314,columnNumber:11},this)]},void 0,!0,{fileName:ua,lineNumber:292,columnNumber:9},this),this.state.preview_visible?Object(h.jsxDEV)(da.a,{previewData:this.state.previewData,showType:this.state.showType,onCloseFn:this.onClose.bind(this)},void 0,!1,{fileName:ua,lineNumber:417,columnNumber:11},this):null]},void 0,!0,{fileName:ua,lineNumber:291,columnNumber:7},this)}}i(244);var ja="/Users/zhangds/web/blue-brother/frontend/src/pages/exchangepage/mytemplate/main.js";const va=[{title:"\u7f29\u7565\u56fe",name:"thumb",prop:"thumb",type:"slot",width:"10%"},{title:"\u6807\u9898",prop:"title",name:"title",width:"auto",type:"normal"},{title:"\u843d\u5730\u9875\u7c7b\u578b",prop:"client",name:"client",type:"slot",width:"auto"},{title:"\u66f4\u65b0\u65f6\u95f4",prop:"update_time",name:"update_time",type:"normal",width:"auto"},{title:"\u521b\u5efa\u4eba",prop:"user_name",name:"user_name",type:"normal",width:"auto"},{title:"\u64cd\u4f5c",prop:"edit",name:"edit",type:"slot",width:"auto"}];class ga extends m.a.Component{constructor(e){super(e),this.state={distdata:[],total:0,combinedValue:[],page:1,limit:10,tabList:[{title:"\u6211\u7684\u6a21\u677f\u5217\u8868"}],DateTime:"",key_word:"",tableHeight:600,dataCount:0}}componentDidUpdate(e,t){t.key_word==this.state.key_word||this.state.key_word||this.sureFn()}sureFn(){this.setState({page:1}),this.setState({limit:10});let e={page:1,limit:10,title:this.state.key_word};this.getTableList(e)}editFn(e,t){if(0==t.creator)return c.a.clear(),void c.a.error("\u7cfb\u7edf\u6a21\u677f\u4e0d\u53ef\u7f16\u8f91");sessionStorage.setItem("pageInfo",JSON.stringify(t)),sessionStorage.setItem("mouldType",1),sessionStorage.setItem("pageChange",1),window.location.href="/#/edittemplate"}getTableList(e){Object(a.Eb)(e).then((e=>{Object(a.Tb)(e,((e,t)=>{this.setState({dataCount:e.total}),this.setState({distdata:e.data})}),(e=>{}))})).catch((e=>{}))}componentWillMount(){this.setState({tableHeight:window.innerHeight-390});let e={page:this.state.page,limit:this.state.limit};this.state.combinedValue&&this.state.combinedValue[0]&&(e.begin_time=this.state.combinedValue[0],e.end_time=this.state.combinedValue[1]),this.getTableList(e)}countChange(e){this.setState({page:1,limit:e});let t={page:e,limit:this.state.limit};this.getTableList(t)}pageChange(e){this.setState({page:e});let t={page:e,limit:this.state.limit};this.state.key_word&&(t.title=this.state.key_word),this.getTableList(t)}newTemplate(e){sessionStorage.setItem("pageInfo",null);let t=window.location.href.replace(window.location.hash,"#/home/mytempMould");window.open(t,"_blank")}delFn(e,t){if(0==t.creator)return void c.a.error("\u7cfb\u7edf\u6a21\u677f\u4e0d\u53ef\u5220\u9664");let i=this;G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:[" ","\u662f\u5426\u5220\u9664 ",Object(h.jsxDEV)("b",{children:[" [",t.title,"] "]},void 0,!0,{fileName:ja,lineNumber:197,columnNumber:16},this),"\uff1f"]},void 0,!0,{fileName:ja,lineNumber:195,columnNumber:9},this),onConfirm:()=>{Object(a.z)(t.id).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.clear(),c.a.success(t);let a={page:this.state.page,limit:this.state.limit,title:this.state.key_word};i.getTableList(a)}),(e=>{}))})).catch((e=>{}))},onCancel:this.onCancel,className:"questModal",parentComponent:this})}render(){const{current:e,pageSize:t}=this.state;return Object(h.jsxDEV)("div",{id:"exchangecodelist",children:[Object(h.jsxDEV)(Ft,{tabs:this.state.tabList,children:[Object(h.jsxDEV)("div",{className:"codetable dflexj",children:[Object(h.jsxDEV)(u.a,{type:"primary",icon:"plus",onClick:e=>{this.newTemplate(e)},children:["\u65b0\u589e\u6a21\u677f"," "]},void 0,!0,{fileName:ja,lineNumber:232,columnNumber:13},this)," "," ",Object(h.jsxDEV)(n.a,{onClearItem:e=>{this.setState({key_word:""})},wordSearch:this.sureFn.bind(this),onChange:e=>this.setState({key_word:e}),value:this.state.key_word,icon:"search",placeholder:"\u8bf7\u8f93\u5165\u5173\u952e\u5b57\u8fdb\u884c\u5339\u914d\u67e5\u8be2",countShow:!1,height:"36px",width:"260px",alignment:"left"},void 0,!1,{fileName:ja,lineNumber:242,columnNumber:13},this)," "]},void 0,!0,{fileName:ja,lineNumber:231,columnNumber:11},this)," ",Object(h.jsxDEV)("div",{className:"code-table",children:[Object(h.jsxDEV)(I,{spliteColor:"#fff",tableData:this.state.distdata,Column:va,maxheight:this.state.tableHeight,countbarVisible:!1,isSwitch:!1,page:this.state.page,dataCount:this.state.dataCount,isMultiple:!1,pageChange:e=>{this.pageChange(e)},countChange:e=>{this.countChange(e)},checkChange:e=>{},ComponentHandler:(e,t)=>"thumb"==e?Object(h.jsxDEV)(Ei.a,{trigger:"hover",position:"right-center",content:Object(h.jsxDEV)("img",{src:t.thumb,alt:"",style:{width:"375px",transform:"scale(.8)"}},void 0,!1,{fileName:ja,lineNumber:288,columnNumber:25},this),children:[" ",Object(h.jsxDEV)("img",{src:t.thumb,alt:"",style:{width:"30px",height:"30px"}},void 0,!1,{fileName:ja,lineNumber:299,columnNumber:23},this)," "]},void 0,!0,{fileName:ja,lineNumber:284,columnNumber:21},this):"client"==e?Object(h.jsxDEV)("span",{children:[" ",Object(h.jsxDEV)("font",{className:"icon",style:{background:At.pageTypeStatusBg(parseInt(t.page))},children:" "},void 0,!1,{fileName:ja,lineNumber:314,columnNumber:23},this),At.pageTypeStatus(parseInt(t.page))]},void 0,!0,{fileName:ja,lineNumber:312,columnNumber:21},this):"edit"==e?Object(h.jsxDEV)("span",{children:[Object(h.jsxDEV)("a",{className:"grid-link",onClick:e=>{this.editFn(e,t)},children:[" ","\u7f16\u8f91"," "]},void 0,!0,{fileName:ja,lineNumber:330,columnNumber:23},this)," ",Object(h.jsxDEV)("a",{onClick:e=>{this.delFn(e,t)},className:"grid-link",children:[" ","\u5220\u9664"," "]},void 0,!0,{fileName:ja,lineNumber:339,columnNumber:23},this)]},void 0,!0,{fileName:ja,lineNumber:329,columnNumber:21},this):void 0},void 0,!1,{fileName:ja,lineNumber:264,columnNumber:13},this)," "]},void 0,!0,{fileName:ja,lineNumber:263,columnNumber:11},this)," "]},void 0,!0,{fileName:ja,lineNumber:230,columnNumber:9},this)," "]},void 0,!0,{fileName:ja,lineNumber:229,columnNumber:7},this)}}i(242);var fa=i(243),_a="/Users/zhangds/web/blue-brother/frontend/src/pages/exchangepage/template/main.js";let xa={1:"access_conf",3:"exchange",4:"coupon",8:"coupon"};class ya extends m.a.Component{constructor(e){super(e),this.state={tabList:[{id:0,title:"H5"}],sourceList:[{id:0,title:"\u7cfb\u7edf\u63a8\u8350\u6a21\u677f"},{id:1,title:"\u6211\u7684\u6a21\u677f"}],typeList:[{id:-1,title:"\u5168\u90e8"}],tabIndex:0,sourceIndex:0,page:1,typeIndex:0,showPage:1,activeHeight:667,showType:1,previewData:{},moudleData:{},previewwhite:{},previewexchange:{},system_template:[],pageStep:1,fontSize:1e4/281.25,preview_visible:!1,topbar:"",setStyle:{width:"375px",height:"667px",transform:"scale(0.75)"},top:"",toTopshow:!1,toTopFlag:!1,endreq:!0,center:"",bottom:"",detailType:3}}onpageChange(e){this.setState({showPage:e.target.value,pageStep:e.target.value,detailType:3})}ondetailTypeChange(e){this.setState({detailType:e.target.value,pageStep:e.target.value})}onTypeChange(e){this.setState({showType:e.target.value,pageStep:1,showPage:1,detailType:3});let t=Object(de.a)(this.state.moudleData)[xa[e.target.value]];t||(t={land:{describe:{}},product_list:{list:"",describe:{}},product_detail:{describe:{}}}),this.setState({previewData:t})}componentDidMount(){let e=this;Object(a.Hb)().then((t=>{Object(a.Tb)(t,(()=>{let i=t.data.map((e=>({id:e.id,title:e.name}))),a=e.state.typeList.concat(i);e.setState({typeList:a})}),(()=>{}))})).catch((()=>{}));Object(a.Db)({page:1,limit:10}).then((e=>{Object(a.Tb)(e,(e=>{this.setState({system_template:e.data})}),(()=>{}))})).catch((()=>{})),this.refs.component.addEventListener("scroll",(e=>{let t=e.target.scrollTop,i=this.state.endreq;if(t>300){this.setState({toTopFlag:!0,toTopshow:!1});let t=e.target.scrollHeight-e.target.clientHeight;if(Math.round(t)==Math.round(e.target.scrollTop)&&i){let e=this.state.system_template,t=this.state.page;t+=1;let i={page:t,limit:10};0==this.state.sourceIndex?(0!=this.state.typeIndex&&(i.type_id=this.state.typeIndex),Object(a.Db)(i).then((i=>{Object(a.Tb)(i,(i=>{if(0{}))})).catch((()=>{}))):Object(a.Eb)(i).then((i=>{Object(a.Tb)(i,(i=>{if(i.data.length>0){let a=e.concat(i.data);this.setState({system_template:a,page:t})}else this.setState({endreq:!1})}),(()=>{}))})).catch((()=>{}))}}else this.setState({toTopFlag:!1})}))}componentWillUnmount(){window.removeEventListener("scroll",this.bindHandleScroll)}createBox(){sessionStorage.removeItem("pageInfo"),sessionStorage.setItem("mouldType",1),window.location.href="/#/edittemplate"}typeClick(e){this.setState({typeIndex:e,page:1,endreq:!0});let t={page:1,limit:10};e&&(t.type_id=e),Object(a.Db)(t).then((e=>{Object(a.Tb)(e,(e=>{this.setState({system_template:e.data}),e.data.length<10&&this.setState({endreq:!1})}),(()=>{}))})).catch((()=>{}))}sourceClick(e){this.setState({sourceIndex:e,page:1,endreq:!0});let t={page:1,limit:10};0==e?Object(a.Db)(t).then((e=>{Object(a.Tb)(e,(e=>{this.setState({system_template:e.data})}),(()=>{}))})).catch((()=>{})):Object(a.Eb)(t).then((e=>{Object(a.Tb)(e,(e=>{this.setState({system_template:e.data})}),(()=>{}))})).catch((()=>{}))}onPreview(e){let t;t=1==this.state.sourceIndex?e[xa[e.page]]:e.exchange,t||(t={land:{describe:{}},product_list:{list:"",describe:{}},product_detail:{describe:{}}}),this.setState({preview_visible:!0,previewData:t,showType:e.page,moudleData:e,showPage:1,pageStep:1,activeHeight:667,setStyle:{width:"375px",height:"667px",transform:"scale(0.75)"}})}onUse(e,t){0!=e.edit?0==this.state.sourceIndex?Object(a.n)(e.id).then((i=>{Object(a.Tb)(i,(i=>{e.id=i.id,sessionStorage.setItem("pageInfo",JSON.stringify(e)),sessionStorage.setItem("isSort",0),sessionStorage.setItem("pageChange",0),sessionStorage.setItem("mouldType",1),window.location.href=t?"/#/edittemplate?type="+t:"/#/edittemplate?type="+e.page}),(()=>{}))})).catch((()=>{})):(sessionStorage.setItem("pageInfo",JSON.stringify(e)),sessionStorage.setItem("pageChange",1),sessionStorage.setItem("mouldType",1),window.location.href=t?"/#/edittemplate?type="+t:"/#/edittemplate?type="+e.page):c.a.error("\u8be5\u6a21\u677f\u662f\u5b9a\u5236\u6a21\u677f\u65e0\u6cd5\u7f16\u8f91")}toTop(){this.refs.component.scrollTo({top:0,behavior:"smooth"})}onBack(){this.refs.preview.popPage()}onClose(){this.setState({preview_visible:!1})}mouseupFn(){this.setState({toTopshow:!0})}mouseoverFn(){this.setState({toTopshow:!1})}handleSize(e,t){let i={width:e+"px",height:t+"px",transform:"scale(0.75)"};this.setState({setStyle:i,activeHeight:t})}render(){return Object(h.jsxDEV)("div",{className:"mytemplate",children:Object(h.jsxDEV)("div",{className:"scroller-page",ref:"component",children:[Object(h.jsxDEV)("div",{className:"scroller-page-banner basic",children:[Object(h.jsxDEV)("div",{className:"scroller-page-banner-content",children:[Object(h.jsxDEV)("h1",{className:"title",children:["\u6a21\u677f\u4e2d\u5fc3",Object(h.jsxDEV)("div",{className:"editor-type-basic-only",children:Object(h.jsxDEV)("span",{className:"toggle-inner",children:Object(h.jsxDEV)("i",{children:"(v2.0.0)"},void 0,!1,{fileName:_a,lineNumber:341,columnNumber:21},this)},void 0,!1,{fileName:_a,lineNumber:340,columnNumber:19},this)},void 0,!1,{fileName:_a,lineNumber:339,columnNumber:17},this)]},void 0,!0,{fileName:_a,lineNumber:337,columnNumber:15},this),Object(h.jsxDEV)("p",{className:"desc",children:"\u652f\u6301\u591a\u5e73\u53f0,\u591a\u573a\u666f\u4e30\u5bcc\u901a\u7528\u843d\u5730\u9875\u6a21\u677f,\u5e2e\u52a9\u4f7f\u7528\u8005\u66f4\u9ad8\u8f6c\u5316"},void 0,!1,{fileName:_a,lineNumber:345,columnNumber:15},this)]},void 0,!0,{fileName:_a,lineNumber:336,columnNumber:13},this),Object(h.jsxDEV)("div",{className:"scroller-page-banner-mask"},void 0,!1,{fileName:_a,lineNumber:347,columnNumber:13},this)]},void 0,!0,{fileName:_a,lineNumber:335,columnNumber:11},this),Object(h.jsxDEV)("div",{className:"scroller-page-body",children:Object(h.jsxDEV)("div",{className:"scroller-page-body-content",children:Object(h.jsxDEV)("div",{className:"scroller-page-body-content-inner",children:[Object(h.jsxDEV)("div",{className:"xj-simple-tabs scroller-page-tabs",children:this.state.tabList.map(((e,t)=>Object(h.jsxDEV)("div",{className:this.state.tabIndex==t?" xj-simple-tabs-item active":" xj-simple-tabs-item",children:e.title},t,!1,{fileName:_a,lineNumber:355,columnNumber:23},this)))},void 0,!1,{fileName:_a,lineNumber:352,columnNumber:17},this),Object(h.jsxDEV)("div",{className:"block-selector-list-group",children:[Object(h.jsxDEV)("div",{className:"block-selector-list",children:[Object(h.jsxDEV)("span",{className:"block-selector-list-label",children:"\u6765\u6e90\uff1a"},void 0,!1,{fileName:_a,lineNumber:370,columnNumber:21},this),Object(h.jsxDEV)("div",{className:"block-selector",children:this.state.sourceList.map(((e,t)=>Object(h.jsxDEV)("div",{className:this.state.sourceIndex==t?"block-selector-item active":"block-selector-item",onClick:()=>{this.sourceClick(t)},children:e.title},t,!1,{fileName:_a,lineNumber:374,columnNumber:27},this)))},void 0,!1,{fileName:_a,lineNumber:371,columnNumber:21},this)]},void 0,!0,{fileName:_a,lineNumber:369,columnNumber:19},this),0==this.state.sourceIndex?Object(h.jsxDEV)("div",{className:"block-selector-list",children:[Object(h.jsxDEV)("span",{className:"block-selector-list-label",children:"\u5206\u7c7b\uff1a"},void 0,!1,{fileName:_a,lineNumber:393,columnNumber:23},this),Object(h.jsxDEV)("div",{className:"block-selector",children:this.state.typeList.map(((e,t)=>Object(h.jsxDEV)("div",{className:this.state.typeIndex==t?"block-selector-item active":"block-selector-item",onClick:()=>{this.typeClick(t)},children:e.title},t,!1,{fileName:_a,lineNumber:397,columnNumber:29},this)))},void 0,!1,{fileName:_a,lineNumber:394,columnNumber:23},this)]},void 0,!0,{fileName:_a,lineNumber:392,columnNumber:21},this):null,Object(h.jsxDEV)("div",{children:[Object(h.jsxDEV)("div",{className:"xj-template-list",children:[Object(h.jsxDEV)("div",{className:"xj-template-blank-card",children:Object(h.jsxDEV)("div",{className:"xj-template-blank-card-content",children:Object(h.jsxDEV)("div",{className:"xj-template-blank-card-create-box",onClick:this.createBox,children:[Object(h.jsxDEV)("div",{className:"xj-template-blank-card-icon-create",children:Object(h.jsxDEV)("span",{children:"+"},void 0,!1,{fileName:_a,lineNumber:424,columnNumber:31},this)},void 0,!1,{fileName:_a,lineNumber:423,columnNumber:29},this),Object(h.jsxDEV)("div",{className:"xj-template-blank-card-text"},void 0,!1,{fileName:_a,lineNumber:426,columnNumber:29},this)]},void 0,!0,{fileName:_a,lineNumber:419,columnNumber:27},this)},void 0,!1,{fileName:_a,lineNumber:418,columnNumber:25},this)},void 0,!1,{fileName:_a,lineNumber:417,columnNumber:23},this),this.state.system_template.map(((e,t)=>Object(h.jsxDEV)("div",{className:"xj-template-preview-card",children:[Object(h.jsxDEV)("div",{className:"xj-template-preview-card-label",children:Object(h.jsxDEV)("span",{children:e.title},void 0,!1,{fileName:_a,lineNumber:434,columnNumber:31},this)},void 0,!1,{fileName:_a,lineNumber:433,columnNumber:29},this),Object(h.jsxDEV)("div",{className:"xj-template-preview-card-background",style:{backgroundImage:"url("+e.thumb+")",animationDuration:"10.7493s"},children:[Object(h.jsxDEV)("div",{className:"xj-template-preview-card-tag",children:Object(h.jsxDEV)("i",{className:""},void 0,!1,{fileName:_a,lineNumber:444,columnNumber:33},this)},void 0,!1,{fileName:_a,lineNumber:443,columnNumber:31},this),Object(h.jsxDEV)("div",{className:"xj-template-preview-card-operation",children:[Object(h.jsxDEV)("a",{onClick:()=>{this.onPreview(e)},children:[Object(h.jsxDEV)("div",{className:"svg-icon-container",style:{width:"22px",height:"16px",marginRight:"8px"},children:Object(h.jsxDEV)("div",{className:"svg-icon svg-icon-preview"},void 0,!1,{fileName:_a,lineNumber:460,columnNumber:37},this)},void 0,!1,{fileName:_a,lineNumber:452,columnNumber:35},this)," ","\u9884\u89c8"]},void 0,!0,{fileName:_a,lineNumber:447,columnNumber:33},this),Object(h.jsxDEV)("a",{onClick:()=>{this.onUse(e)},children:[Object(h.jsxDEV)("div",{className:"svg-icon-container",style:{width:"20px",height:"16px",marginRight:"8px"},children:Object(h.jsxDEV)("div",{className:"svg-icon svg-icon-use"},void 0,!1,{fileName:_a,lineNumber:477,columnNumber:37},this)},void 0,!1,{fileName:_a,lineNumber:469,columnNumber:35},this)," ","\u4f7f\u7528"]},void 0,!0,{fileName:_a,lineNumber:464,columnNumber:33},this)]},void 0,!0,{fileName:_a,lineNumber:446,columnNumber:31},this)]},void 0,!0,{fileName:_a,lineNumber:436,columnNumber:29},this)]},t,!0,{fileName:_a,lineNumber:432,columnNumber:27},this)))]},void 0,!0,{fileName:_a,lineNumber:416,columnNumber:21},this),this.state.toTopFlag?Object(h.jsxDEV)("div",{ref:"toTop",className:"toTop-canvas",onMouseEnter:this.mouseupFn.bind(this),onMouseLeave:this.mouseoverFn.bind(this),children:Object(h.jsxDEV)("img",{className:"toTopBtn",onClick:this.toTop.bind(this),src:this.state.toTopshow?"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/totopbtn.svg":"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/willtotop.svg",alt:""},void 0,!1,{fileName:_a,lineNumber:494,columnNumber:25},this)},void 0,!1,{fileName:_a,lineNumber:488,columnNumber:23},this):null,Object(h.jsxDEV)("div",{style:{textAlign:"center",color:"#BBC1D2",marginBottom:"15px"},children:this.state.endreq?"\u6b63\u5728\u52a0\u8f7d\u4e2d...":"\u5230\u5e95\u90e8\u4e86\u54df,\u6ca1\u6709\u4e86\u54e6"},void 0,!1,{fileName:_a,lineNumber:506,columnNumber:21},this)]},void 0,!0,{fileName:_a,lineNumber:415,columnNumber:19},this)]},void 0,!0,{fileName:_a,lineNumber:368,columnNumber:17},this)]},void 0,!0,{fileName:_a,lineNumber:351,columnNumber:15},this)},void 0,!1,{fileName:_a,lineNumber:350,columnNumber:13},this)},void 0,!1,{fileName:_a,lineNumber:349,columnNumber:11},this),this.state.preview_visible?Object(h.jsxDEV)("div",{children:[Object(h.jsxDEV)("div",{className:"modal",style:{background:"rgba(0,0,0,0.8)",zIndex:999}},void 0,!1,{fileName:_a,lineNumber:522,columnNumber:15},this),Object(h.jsxDEV)("div",{className:"preview-box",children:[Object(h.jsxDEV)(g.a,{type:"close",className:"preview-top-close",onClick:e=>{this.onClose(e)}},void 0,!1,{fileName:_a,lineNumber:524,columnNumber:17},this),Object(h.jsxDEV)("div",{style:{height:"100%"},children:Object(h.jsxDEV)("div",{className:"previewComponent",children:[Object(h.jsxDEV)("div",{className:"previewbody",children:Object(h.jsxDEV)("div",{className:"ctorSize",style:this.state.setStyle,children:Object(h.jsxDEV)(fa.a,{data:this.state.previewData,pageType:this.state.showType,fontSize:this.state.fontSize,ref:"preview",step:this.state.pageStep},void 0,!1,{fileName:_a,lineNumber:535,columnNumber:25},this)},void 0,!1,{fileName:_a,lineNumber:534,columnNumber:23},this)},void 0,!1,{fileName:_a,lineNumber:533,columnNumber:21},this),Object(h.jsxDEV)("div",{className:"left-choice",children:[Object(h.jsxDEV)("div",{className:"exchange-page",children:[Object(h.jsxDEV)("p",{className:"preview-setting",children:"\u843d\u5730\u9875\u9884\u89c8:"},void 0,!1,{fileName:_a,lineNumber:546,columnNumber:25},this),Object(h.jsxDEV)("section",{className:"screen-size-selector",children:[Object(h.jsxDEV)("div",{className:667==this.state.activeHeight?"size active":"size",onClick:()=>this.handleSize(375,667),children:["\u4e3b\u6d41\u673a\u578b",Object(h.jsxDEV)("span",{children:"375x667"},void 0,!1,{fileName:_a,lineNumber:552,columnNumber:33},this)]},void 0,!0,{fileName:_a,lineNumber:548,columnNumber:27},this),Object(h.jsxDEV)("div",{className:750==this.state.activeHeight?"size active":"size",onClick:()=>this.handleSize(375,750),children:["\u5168\u9762\u5c4f",Object(h.jsxDEV)("span",{children:"375x750"},void 0,!1,{fileName:_a,lineNumber:558,columnNumber:32},this)]},void 0,!0,{fileName:_a,lineNumber:554,columnNumber:27},this),Object(h.jsxDEV)("div",{className:812==this.state.activeHeight?"size active":"size",onClick:()=>this.handleSize(375,812),children:["\u5218\u6d77\u5c4f",Object(h.jsxDEV)("span",{children:"375x812"},void 0,!1,{fileName:_a,lineNumber:564,columnNumber:32},this)]},void 0,!0,{fileName:_a,lineNumber:560,columnNumber:27},this),Object(h.jsxDEV)("div",{className:500==this.state.activeHeight?"size active":"size",onClick:()=>this.handleSize(375,500),children:["\u5c0f\u5c4f\u624b\u673a",Object(h.jsxDEV)("span",{children:"375x500"},void 0,!1,{fileName:_a,lineNumber:570,columnNumber:33},this)]},void 0,!0,{fileName:_a,lineNumber:566,columnNumber:27},this)]},void 0,!0,{fileName:_a,lineNumber:547,columnNumber:25},this),Object(h.jsxDEV)("p",{children:"\u843d\u5730\u9875\u7c7b\u578b:"},void 0,!1,{fileName:_a,lineNumber:573,columnNumber:25},this),Object(h.jsxDEV)(Q.a,{onChange:e=>{this.onTypeChange(e)},value:this.state.showType,children:[Object(h.jsxDEV)(ne.a,{value:3,disabled:1==this.state.sourceIndex,children:"\u5151\u6362\u7801"},void 0,!1,{fileName:_a,lineNumber:580,columnNumber:27},this),Object(h.jsxDEV)(ne.a,{value:1,disabled:1==this.state.sourceIndex,children:"\u767d\u540d\u5355"},void 0,!1,{fileName:_a,lineNumber:583,columnNumber:27},this),Object(h.jsxDEV)(ne.a,{value:4,disabled:1==this.state.sourceIndex,children:"\u4f18\u60e0\u5238"},void 0,!1,{fileName:_a,lineNumber:586,columnNumber:27},this),Object(h.jsxDEV)(ne.a,{value:8,disabled:1==this.state.sourceIndex,children:"\u4f18\u60e0\u5238\u767d\u540d\u5355"},void 0,!1,{fileName:_a,lineNumber:589,columnNumber:27},this)]},void 0,!0,{fileName:_a,lineNumber:574,columnNumber:25},this)]},void 0,!0,{fileName:_a,lineNumber:545,columnNumber:23},this),Object(h.jsxDEV)("div",{className:"exchange-page",children:[Object(h.jsxDEV)("p",{children:"\u9875\u9762\u7c7b\u578b:"},void 0,!1,{fileName:_a,lineNumber:595,columnNumber:25},this),Object(h.jsxDEV)(Q.a,{onChange:e=>{this.onpageChange(e)},value:this.state.showPage,children:[Object(h.jsxDEV)(ne.a,{value:1,children:"\u843d\u5730\u9875"},void 0,!1,{fileName:_a,lineNumber:602,columnNumber:27},this),Object(h.jsxDEV)(ne.a,{value:2,children:"\u5217\u8868\u9875"},void 0,!1,{fileName:_a,lineNumber:603,columnNumber:27},this),Object(h.jsxDEV)(ne.a,{value:3,children:"\u8be6\u60c5\u9875"},void 0,!1,{fileName:_a,lineNumber:604,columnNumber:27},this)]},void 0,!0,{fileName:_a,lineNumber:596,columnNumber:25},this)]},void 0,!0,{fileName:_a,lineNumber:594,columnNumber:23},this),3==this.state.showPage?Object(h.jsxDEV)("div",{className:"exchange-page",children:[Object(h.jsxDEV)("p",{children:"\u8be6\u60c5\u9875\u5206\u7c7b:"},void 0,!1,{fileName:_a,lineNumber:609,columnNumber:27},this),Object(h.jsxDEV)(Q.a,{onChange:e=>{this.ondetailTypeChange(e)},value:this.state.detailType,children:[Object(h.jsxDEV)(ne.a,{value:3,children:"\u6743\u2003\u76ca"},void 0,!1,{fileName:_a,lineNumber:616,columnNumber:29},this),Object(h.jsxDEV)(ne.a,{value:4,children:"\u7acb\u51cf\u91d1"},void 0,!1,{fileName:_a,lineNumber:617,columnNumber:29},this),Object(h.jsxDEV)(ne.a,{value:5,children:"\u7ea2\u5305"},void 0,!1,{fileName:_a,lineNumber:618,columnNumber:29},this)]},void 0,!0,{fileName:_a,lineNumber:610,columnNumber:27},this)]},void 0,!0,{fileName:_a,lineNumber:608,columnNumber:25},this):null,Object(h.jsxDEV)("div",{className:"touse",children:Object(h.jsxDEV)(u.a,{type:"primary",onClick:()=>{this.onUse(this.state.moudleData,this.state.showType)},children:[" ","\u4f7f\u7528"," "]},void 0,!0,{fileName:_a,lineNumber:623,columnNumber:25},this)},void 0,!1,{fileName:_a,lineNumber:622,columnNumber:23},this)]},void 0,!0,{fileName:_a,lineNumber:544,columnNumber:21},this)]},void 0,!0,{fileName:_a,lineNumber:532,columnNumber:19},this)},void 0,!1,{fileName:_a,lineNumber:531,columnNumber:17},this)]},void 0,!0,{fileName:_a,lineNumber:523,columnNumber:15},this)]},void 0,!0,{fileName:_a,lineNumber:521,columnNumber:13},this):null]},void 0,!0,{fileName:_a,lineNumber:334,columnNumber:9},this)},void 0,!1,{fileName:_a,lineNumber:333,columnNumber:7},this)}}var Oa=i(494),Da="/Users/zhangds/web/blue-brother/frontend/src/pages/order/downloadList/list.js";const Ea=[{title:"\u8ba2\u5355\u6587\u4ef6\u540d\u79f0",name:"file_name",prop:"file_name",type:"normal",width:"50%"},{title:"\u751f\u6210\u8fdb\u5ea6\u6761",prop:"progress",name:"progress",width:"30%",type:"slot"},{title:"\u64cd\u4f5c",name:"role",prop:"operation",type:"slot",defaultText:0,width:"20%"}];let Va;class ka extends m.a.Component{constructor(e){super(e),this.state={tabList:[{title:"\u8ba2\u5355\u4e0b\u8f7d\u5217\u8868"}],orderList:[],tableHeight:500,page:1,limit:10,file_name:"",key_word:"",total:3,loading_visible:!1}}componentWillMount(){this.setState({tableHeight:window.innerHeight-430})}componentDidMount(){this.getDownloadList(),Va=setInterval((()=>{this.getDownloadList()}),1e3)}componentWillUnmount(){clearInterval(Va)}deleteFn(e,t){let i=this;G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:["\u662f\u5426\u5220\u9664",Object(h.jsxDEV)("b",{children:["[",t.file_name,"]"]},void 0,!0,{fileName:Da,lineNumber:72,columnNumber:15},this),"\uff1f"]},void 0,!0,{fileName:Da,lineNumber:71,columnNumber:9},this),onConfirm(){Object(a.D)(t.filter_md5).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.clear(),c.a.success(t),i.getDownloadList()}),(e=>{c.a.error(e)}))})).catch()},onCancel(){},className:"questModal",parentComponent:this})}pageChange(e){this.setState({page:e}),setTimeout((()=>{this.getDownloadList()}),0)}countChange(e){this.setState({page:1,limit:e}),setTimeout((()=>{this.getDownloadList()}),0)}sureFn(){this.setState({page:1}),setTimeout((()=>{this.getDownloadList()}),0)}exportFn(e,t){this.setState({loading_visible:!0}),Object(a.I)(t.filter_md5).then((e=>{if(setTimeout((()=>{this.setState({loading_visible:!1})}),1e3),"application/json"==e.type){const t=new FileReader;t.readAsText(e,"utf-8"),t.onload=function(){const e=JSON.parse(t.result);c.a.clear(),c.a.error(e.message)}}else{let a=new Blob([e]),s=t.file_name+".zip";var i=document.createElement("a");i.href=window.URL.createObjectURL(a),i.download=s,i.click(),window.URL.revokeObjectURL(i.href)}})).catch((e=>{}))}getDownloadList(){let{page:e,limit:t,file_name:i}=this.state,s={page:e,limit:t,file_name:i};Object(a.Mb)(s).then((e=>{Object(a.Tb)(e,((e,t)=>{this.setState({total:e.total,orderList:e.data}),e.generate<1&&clearInterval(Va)}),(e=>{c.a.error(e)}))})).catch((e=>{}))}statuStyle(e){let t;return e<"70"&&(t="normal"),"80"==e&&(t="exception"),"100"==e&&(t="success"),t}render(){return Object(h.jsxDEV)("div",{id:"dislist",className:"orderList",children:Object(h.jsxDEV)(Ft,{tabs:this.state.tabList,children:Object(h.jsxDEV)(vt.a,{loading:this.state.loading_visible,icon:"circle",iconSize:32,iconText:"\u4e0b\u8f7d\u4e2d...",className:"save_loading",children:[Object(h.jsxDEV)("div",{className:"distable dflexajce",children:Object(h.jsxDEV)(n.a,{labelWidth:0,onClearItem:e=>{this.setState({file_name:"",page:1}),setTimeout((()=>{this.getDownloadList()}),0)},wordSearch:this.sureFn.bind(this),onChange:e=>this.setState({file_name:e}),value:this.state.file_name,icon:"search",placeholder:"\u8bf7\u8f93\u5165\u8ba2\u5355\u6587\u4ef6\u540d\u79f0\u641c\u7d22",countShow:!1,height:"36px",width:"260px",alignment:"left"},void 0,!1,{fileName:Da,lineNumber:203,columnNumber:15},this)},void 0,!1,{fileName:Da,lineNumber:202,columnNumber:13},this),Object(h.jsxDEV)("div",{className:"table-container",children:Object(h.jsxDEV)(I,{spliteColor:"#fff",tableData:this.state.orderList,Column:Ea,dataCount:this.state.total,itemcheck:this.state.itemcheck,allcheck:this.state.allcheck,isMultiple:!1,page:this.state.page,countbarVisible:!1,isSwitch:!1,ref:"orderList",maxheight:this.state.tableHeight,pageChange:e=>{this.pageChange(e)},countChange:e=>{this.countChange(e)},ComponentHandler:(e,t)=>"progress"==e?Object(h.jsxDEV)(Oa.a,{percent:t.process,status:this.statuStyle(t.process),width:180,strokeWidth:5,strokeLinecap:"round"},void 0,!1,{fileName:Da,lineNumber:245,columnNumber:23},this):"operation"==e?Object(h.jsxDEV)("p",{children:[Object(h.jsxDEV)("span",{className:3!=t.status||0===t.process?"grid-link disabled":"grid-link",onClick:e=>{3===t.status&&100===t.process&&this.exportFn(e,t)},children:"\u4e0b\u8f7d"},void 0,!1,{fileName:Da,lineNumber:257,columnNumber:25},this),Object(h.jsxDEV)("span",{className:1==t.status||0===t.process?"grid-link ml15 disabled":"ml15 grid-link",onClick:e=>{3===t.status&&100===t.process&&this.deleteFn(e,t)},children:"\u5220\u9664"},void 0,!1,{fileName:Da,lineNumber:272,columnNumber:25},this)]},void 0,!0,{fileName:Da,lineNumber:256,columnNumber:23},this):void 0},void 0,!1,{fileName:Da,lineNumber:223,columnNumber:15},this)},void 0,!1,{fileName:Da,lineNumber:222,columnNumber:13},this)]},void 0,!0,{fileName:Da,lineNumber:195,columnNumber:11},this)},void 0,!1,{fileName:Da,lineNumber:194,columnNumber:9},this)},void 0,!1,{fileName:Da,lineNumber:193,columnNumber:7},this)}}const Sa=()=>{new Date;const e=new Date;return e.setTime(e.getTime()-2592e6),e},wa=()=>new Date;var Ca=i(507);i(245);const Ta=[{title:"\u8ba2\u5355\u53f7",name:"order_number",prop:"order_number",type:"normal",width:"150px"},{title:"\u5305\u7801\u7ed3\u7b97\u8ba2\u5355ID",name:"settlement_no",prop:"settlement_no",type:"normal",width:"200px"},{title:"\u5151\u6362\u7801-\u6279\u6b21ID",name:"code_batch_id",prop:"code_batch_id",type:"normal",width:"80px"},{title:"\u5546\u54c1\u540d\u79f0",prop:"product_name",name:"product_name",width:"120px",type:"normal"},{title:"\u5b98\u65b9\u4ef7\u683c",name:"official_price",prop:"official_price",type:"normal",width:"80px"},{title:"\u5408\u540c\u4ef7(\u6210\u672c\u4ef7)",name:"cost",type:"slot",prop:"cost",width:"120px"},{title:"\u5236\u5238\u5546\u6237",name:"wechat_subject",prop:"wechat_subject",width:"50px",type:"slot"},{title:"\u5206\u9500\u5546",name:"reseller_name",type:"normal",prop:"reseller_name",width:"auto"},{title:"\u5f52\u5c5ekey\u6279\u6b21",name:"key_batch_id",prop:"key_batch_id",width:"80px",type:"normal"},{title:"\u5f52\u5c5e\u8425\u9500\u8ba1\u5212",name:"plan_title",prop:"plan_title",width:"auto",type:"normal"},{title:"\u8d2d\u4e70\u6570\u91cf",name:"num",type:"normal",prop:"num",width:"50px"},{title:"\u8ba2\u5355\u72b6\u6001",name:"statusDom",prop:"statusDom",type:"slot",width:"120px"},{title:"\u652f\u4ed8\u72b6\u6001",name:"pay_status",prop:"pay_status",type:"slot",width:"80px"},{title:"\u64cd\u4f5c",prop:"opearo",name:"opearo",type:"slot",width:"220px"},{title:"\u6279\u6b21\u53f7",name:"channel_activity_id",type:"slot",prop:"channel_activity_id",width:"auto"},{title:"\u521b\u5efa\u65f6\u95f4",name:"create_time",prop:"create_time",width:"130px",type:"normal"},{title:"\u66f4\u65b0\u65f6\u95f4",name:"status_modify_time",prop:"status_modify_time",width:"130px",type:"slot"},{title:"\u8d26\u53f7",name:"account",type:"slot",prop:"account",width:"auto"},{title:"\u5546\u54c1\u7c7b\u578b",name:"product_type",prop:"product_type",width:"50px",type:"slot"},{title:"\u8ba2\u5355\u7c7b\u578b",name:"order_type",prop:"order_type",width:"50px",type:"slot"},{title:"\u6838\u9500\u72b6\u6001",name:"usage_status",prop:"usage_status",width:"120px",type:"slot"},{title:"\u5931\u8d25\u539f\u56e0",name:"receive_error",prop:"receive_error",width:"150px",type:"slot"},{title:"\u51cf\u6263\uff08\u5143\uff09",name:"discount_amount",prop:"discount_amount",type:"normal",width:"80px"},{title:"\u5238\u540e\u4ef7\uff08\u5143\uff09",name:"pay_amount",prop:"pay_amount",type:"normal",width:"80px"},{title:"key",name:"key",prop:"key",width:"140px",type:"normal"}],Ia=[{key:"order_number",text:"\u8ba2\u5355\u53f7",placeholder:"\u8bf7\u8f93\u5165\u8ba2\u5355\u53f7\u67e5\u8be2"},{key:"key",text:"key\u67e5\u8be2",placeholder:"\u8bf7\u8f93\u5165key\u67e5\u8be2"},{key:"key_batch_id",text:"key\u6279\u6b21",placeholder:"\u8bf7\u8f93\u5165key\u6279\u6b21\u67e5\u8be2"},{key:"account",text:"\u5145\u503c\u8d26\u53f7",placeholder:"\u8bf7\u8f93\u5165\u5145\u503c\u8d26\u53f7\u67e5\u8be2"},{key:"cash_activity_id",text:"\u7ea2\u5305\u6279\u6b21\u53f7",placeholder:"\u8bf7\u8f93\u5165\u7ea2\u5305\u6279\u6b21\u53f7\u67e5\u8be2"},{key:"code_batch_id",text:"\u5151\u6362\u7801\u6279\u6b21ID",placeholder:"\u8bf7\u8f93\u5165\u5151\u6362\u7801\u6279\u6b21ID\u67e5\u8be2"},{key:"channel_activity_id",text:"\u7acb\u51cf\u91d1\u6279\u6b21\u53f7",placeholder:"\u8bf7\u8f93\u5165"},{key:"receive_user_id",text:"\u7ea2\u5305\u8ba2\u5355\u7528\u6237openId",placeholder:"\u8bf7\u8f93\u5165"},{key:"channel_user_id",text:"\u7acb\u51cf\u91d1\u8ba2\u5355\u7528\u6237openId",placeholder:"\u8bf7\u8f93\u5165"},{key:"settlement_no",text:"\u5305\u7801\u7ed3\u7b97\u8ba2\u5355ID",placeholder:"\u8bf7\u8f93\u5165"}],Fa=[{id:0,label:"\u8ba2\u5355\u72b6\u6001",prop:"status",menuList:[{id:0,name:"\u76f4\u5145-\u5f85\u5145\u503c"},{id:1,name:"\u76f4\u5145-\u5145\u503c\u4e2d"},{id:2,name:"\u76f4\u5145-\u5df2\u5b8c\u6210"},{id:3,name:"\u76f4\u5145-\u5145\u503c\u5931\u8d25"},{id:4,name:"\u76f4\u5145-\u5df2\u53d6\u6d88"},{id:111,name:"\u7acb\u51cf\u91d1-\u5f85\u9886\u53d6"},{id:222,name:"\u7acb\u51cf\u91d1-\u5df2\u9886\u53d6"},{id:5,name:"\u7acb\u51cf\u91d1-\u5df2\u8fc7\u671f"},{id:6,name:"\u73b0\u91d1\u7ea2\u5305-\u5f85\u53d1\u653e"},{id:7,name:"\u73b0\u91d1\u7ea2\u5305-\u5df2\u6838\u9500"},{id:8,name:"\u73b0\u91d1\u7ea2\u5305-\u5df2\u8fc7\u671f"},{id:9,name:"\u73b0\u91d1\u7ea2\u5305-\u5df2\u5931\u8d25"}]},{id:1,label:"\u652f\u4ed8\u72b6\u6001",prop:"pay_status",menuList:[{id:1,name:"\u5f85\u652f\u4ed8"},{id:2,name:"\u5df2\u652f\u4ed8"},{id:3,name:"\u5df2\u9000\u6b3e"}]},{id:3,label:"\u6838\u9500\u72b6\u6001",prop:"voucher_status",menuList:[{id:1,name:"\u672a\u6838\u9500"},{id:2,name:"\u5df2\u6838\u9500"},{id:3,name:"\u5df2\u8fc7\u671f"},{id:4,name:"\u5df2\u9000\u6b3e"},{id:7,name:"\u90e8\u5206\u9000\u56de"},{id:8,name:"\u5df2\u9000\u56de"}]}],La={account:[{type:"required",message:"\u8bf7\u8f93\u5165\u8d26\u53f7"}]};var Ha="/Users/zhangds/web/blue-brother/frontend/src/pages/order/list/list.js",qa=i(67);let Ma=qa(wa()).format("YYYY-MM-DD"),Pa=qa(Sa()).format("YYYY-MM-DD");class Ba extends m.a.Component{constructor(e){super(e),this.state={orderType:"",tabList:[{title:"\u8ba2\u5355\u5217\u8868"}],orderList:[],filterList:Fa,selectiondata:[],menuList:[{id:0,name:"\u8ba2\u5355\u72b6\u6001",check:!1},{id:1,name:"\u652f\u4ed8\u72b6\u6001",check:!1}],allcheck:!1,itemcheck:!1,menuVisible:!1,combinedValue:[],tableHeight:500,status:null,pay_status:null,voucher_status:null,planOptions:[],resellerOptions:[],productOptions:[],page:1,limit:10,key_word:"",officialprice:0,contractprice:0,costprice:0,totalprice:0,placeholder:"\u8bf7\u8f93\u5165key\u67e5\u8be2",visible:!1,model:{account:""},search:this.initSearch()},this.onChangeCombinedDate=this.onChangeCombinedDate.bind(this)}initSearch(){return{plan_id:"",reseller_id:"",product_id:""}}searchChange(e,t){const i=this.state.search;i[e]=t,this.setState({search:i})}selection(e){this.setState({selectiondata:e});let t=0,i=0,a=0,s=0;e.forEach((e=>{t+=Number(e.official_price),i+=Number(e.contract_price),a+=Number(e.cost_price),s+=Number(e.total)})),this.setState({officialprice:t,contractprice:i,costprice:a,totalprice:s})}getPlan(){Object(a.rb)().then((e=>Object(a.Tb)(e,((e,t)=>{const i=e.map((e=>({key:e.id,text:e.title})));this.setState({planOptions:i})}),(e=>{})))),Object(a.ub)().then((e=>{Object(a.Tb)(e,((e,t)=>{const i=e.map((e=>({key:e.id,text:e.name})));this.setState({resellerOptions:i})}))}))}getProducts(e){Object(a.Sb)(e).then((e=>Object(a.Tb)(e,((e,t)=>{const i=e.map((e=>({key:e.goods_id,text:e.goods_name})));this.setState({productOptions:i})}),(e=>{}))))}handlerRefundFunction(){this.refs.form.validator()&&Object(a.Ub)(this.state.orderNumber,{refund_account:this.state.model.account}).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.clear(),c.a.success(t),this.setState({visible:!1})}),(e=>{c.a.error(e)}))})).catch((e=>{}))}refundFunction(e){Object(a.Qc)(e).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.clear(),c.a.success(t)}),(e=>{c.a.error(e)}))})).catch((e=>{}))}exportFn(){let{status:e,orderType:t,option:i,key_word:s,pay_status:l,voucher_status:n,search:o}=this.state;const{plan_id:r,product_id:m,reseller_id:d}=o;let u={};if(u.plan_id=r?r.key:"",u.product_id=m?m.key:"",u.reseller_id=d?d.key:"",t&&e&&(u.type=t),this.state.combinedValue&&this.state.combinedValue[0]&&(u.begin_time=this.state.combinedValue[0],u.end_time=this.state.combinedValue[1]),null!==e&&void 0!==e&&e.length&&(u.status=null===e||void 0===e?void 0:e.join(",")),null!==l&&void 0!==l&&l.length&&(u.pay_status=null===l||void 0===l?void 0:l.join(",")),null!==n&&void 0!==n&&n.length&&(u.voucher_status=null===n||void 0===n?void 0:n.join(",")),i&&(u[i.key]=s),this.state.selectiondata&&this.state.selectiondata.length>0){let e=this.state.selectiondata.map((e=>e.order_number));u.order_numbers=e.join(",")}let b=this;G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:"\u662f\u5426\u5bfc\u51fa\u8ba2\u5355\uff1f"},void 0,!1,{fileName:Ha,lineNumber:246,columnNumber:16},this),onConfirm(){Object(a.mb)(u).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.clear(),c.a.success(t),b.props.history.push("/home/download-orderlist")}),(e=>{c.a.error(e)}))})).catch((e=>{c.a.error(e.message)}))},onCancel(){},className:"questModal",parentComponent:this})}deleteFn(e,t){let i=this;G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:["\u662f\u5426\u4f5c\u5e9f",Object(h.jsxDEV)("b",{children:["[",t.order_number,"]"]},void 0,!0,{fileName:Ha,lineNumber:282,columnNumber:15},this),"\uff1f"]},void 0,!0,{fileName:Ha,lineNumber:281,columnNumber:9},this),onConfirm(){Object(a.Cc)(t.order_number).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.clear(),c.a.success(t),i.getOrderFn()}),(e=>{c.a.error(e)}))})).catch((e=>{}))},onCancel(){},className:"questModal",parentComponent:this})}changeSuccessFn(e,t){let i=this;G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:["\u662f\u5426\u5c06",Object(h.jsxDEV)("b",{children:["[",t.order_number,"]"]},void 0,!0,{fileName:Ha,lineNumber:317,columnNumber:14},this),"\u8ba2\u5355\u6539\u4e3a\u6210\u529f\u72b6\u6001\uff1f"]},void 0,!0,{fileName:Ha,lineNumber:316,columnNumber:9},this),onConfirm(){Object(a.Dc)(t.order_number).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.clear(),c.a.success(t),i.getOrderFn()}),(e=>{c.a.error(e)}))})).catch((e=>{}))},onCancel(){},className:"questModal",parentComponent:this})}moreFn(e,t){this.props.history.push("/home/order-addetails?oid="+t.order_number),sessionStorage.setItem("pathname2","/home/order-addetails");sessionStorage.setItem("breaknav",JSON.stringify([{items:[{path:"/home/order-list",name:"\u8ba2\u5355\u7ba1\u7406"},{path:"/home/order-addetails",name:"\u8ba2\u5355\u8be6\u60c5"}]}]))}clearFn(){this.setState({allcheck:!1,selectiondata:[],itemcheck:!1})}onChangeCombinedDate(e){this.setState({combinedValue:e,page:1,limit:10,selectiondata:[]},(()=>{this.getOrderFn()}))}pageChange(e){this.setState({selectiondata:[],page:e},(()=>{this.getOrderFn()}))}countChange(e){this.setState({selectiondata:[],page:1,limit:e},(()=>{this.getOrderFn()}))}dynamicVoucher(){3===this.state.menuList.length&&this.refs.filterBar.onCloseSelect("",3,"voucher_status"),this.setState({menuList:[{id:0,name:"\u8ba2\u5355\u72b6\u6001",check:!1},{id:1,name:"\u652f\u4ed8\u72b6\u6001",check:!1}]})}onFilterClose(e){"status"===e&&this.dynamicVoucher();let t={};t[e]=null,this.setState(t),this.setState({orderType:null})}getOrderFn(e={}){let t=this,{page:i,limit:s,status:l,option:n,key_word:o,orderType:r,pay_status:m,voucher_status:d,search:u}=t.state;const{plan_id:h,product_id:b,reseller_id:p}=u;let N={page:i,limit:s,plan_id:h?h.key:"",product_id:b?b.key:"",reseller_id:p?p.key:""};r&&(N.type=r),this.state.combinedValue&&this.state.combinedValue[0]&&(N.begin_time=this.state.combinedValue[0],N.end_time=this.state.combinedValue[1]),e&&e[0]&&(N.begin_time=e[0],N.end_time=e[1]),e&&null==e[0]&&e.length>1&&(delete N.begin_time,delete N.end_time),n&&(N[n.key]=o),null!==l&&void 0!==l&&l.length&&(N.status=null===l||void 0===l?void 0:l.join(",")),null!==m&&void 0!==m&&m.length&&(N.pay_status=null===m||void 0===m?void 0:m.join(",")),null!==d&&void 0!==d&&d.length&&(N.voucher_status=null===d||void 0===d?void 0:d.join(",")),Object(a.nb)(N).then((e=>{Object(a.Tb)(e,((e,i)=>{const a=e.data,{total:s}=e;t.setState({orderList:a,total:s})}),(e=>{c.a.error(e)}))})).catch((e=>{}))}componentWillMount(){let e=[Pa+" 00:00:00",Ma+" 23:59:59"];this.getOrderFn(e),this.getPlan(),this.setState({tableHeight:window.innerHeight-490,combinedValue:e})}selectedId(e,t){if("status"===t){const t=[111,222,5];Object(Ca.a)(t,e).length>0?this.setState({menuList:[{id:0,name:"\u8ba2\u5355\u72b6\u6001",check:!1},{id:1,name:"\u652f\u4ed8\u72b6\u6001",check:!1},{id:3,name:"\u6838\u9500\u72b6\u6001",check:!1}]}):this.dynamicVoucher()}let i={},a=[];e.length&&"status"===t&&(e.map(((t,i)=>{[6,7,8,9].includes(t)?a.push(3):[111,222,5].includes(t)?a.push(2):a.push(1),111===t&&(e[i]=1),[222,7].includes(t)&&(e[i]=2),9===t&&(e[i]=3),6===t&&(e[i]=0),8===t&&(e[i]=5)})),a=[...new Set(a)].join(","),this.setState({orderType:a})),e.length<1&&"status"===t&&this.setState({orderType:""}),i[t]=e,this.setState(i),this.setState({page:1})}usageFunction(e){switch(e){case 1:case 5:case 6:return"\u672a\u6838\u9500";case 2:return"\u5df2\u6838\u9500";case 3:return"\u5df2\u8fc7\u671f";case 4:return"\u5df2\u9000\u6b3e";case 7:return"\u90e8\u5206\u9000\u56de";case 8:return"\u5df2\u9000\u56de";default:return"-"}}sendSms({order_number:e}){Object(a.Rc)({order_number:e}).then((({code:e,message:t})=>{c.a.clear(),200===e?c.a.success(t):c.a.error(t)}))}handlerReceiveRetry(e){Object(a.Pc)({order_number:e}).then((({code:e,message:t})=>{c.a.clear(),200===e?(c.a.success(t),this.getOrderFn()):c.a.error(t)}))}componentDidUpdate(e,t){t.status!=this.state.status&&this.getOrderFn(),t.pay_status!=this.state.pay_status&&this.getOrderFn(),t.voucher_status!=this.state.voucher_status&&this.getOrderFn()}reset(){this.setState({search:this.initSearch(),page:1,limit:10,key_word:"",placeholder:"",option:""},(()=>this.getOrderFn()))}menuItemClick(e,t){0==e?Object(a.dd)({order_number:t}).then((({code:e,message:t})=>{c.a.clear(),200===e?(this.getOrderFn(),c.a.success(t)):c.a.error(t)})):Object(a.bc)({order_number:t,event:e}).then((({code:e,message:t})=>{c.a.clear(),200===e?c.a.success(t):c.a.error(t)}))}render(){const e=Object(h.jsxDEV)(Jt.a,{className:"zent-datepicker-demo",value:this.state.combinedValue,showTime:{format:"HH:mm:ss",defaultTime:["00:00:00","23:59:59"]},format:"YYYY-MM-DD HH:mm:ss",onChange:this.onChangeCombinedDate},void 0,!1,{fileName:Ha,lineNumber:650,columnNumber:7},this);return Object(h.jsxDEV)("div",{id:"dislist",className:"orderList",children:Object(h.jsxDEV)(Ft,{tabs:this.state.tabList,slot:e,children:[Object(h.jsxDEV)("div",{className:"order-query",children:[Object(h.jsxDEV)(l.a,{children:[Object(h.jsxDEV)(s.a,{labelname:"\u8ba1\u5212\u540d\u79f0\uff1a",required:"",labelwidth:"95px",children:Object(h.jsxDEV)(X.a,{name:"state",value:this.state.search.plan_id,options:this.state.planOptions,placeholder:"\u8bf7\u9009\u62e9",width:204,clearable:!0,onChange:e=>{this.searchChange("plan_id",e),e?this.getProducts(e.key):(this.setState({productOptions:[]}),this.searchChange("product_id",""))}},void 0,!1,{fileName:Ha,lineNumber:668,columnNumber:17},this)},void 0,!1,{fileName:Ha,lineNumber:667,columnNumber:15},this),Object(h.jsxDEV)(s.a,{labelname:"\u5546\u54c1\u540d\u79f0\uff1a",required:"",labelwidth:"100px",children:Object(h.jsxDEV)(X.a,{name:"state",value:this.state.search.product_id,options:this.state.productOptions,placeholder:"\u8bf7\u5148\u9009\u62e9\u8ba1\u5212",width:204,clearable:!0,onChange:e=>{this.searchChange("product_id",e)}},void 0,!1,{fileName:Ha,lineNumber:687,columnNumber:17},this)},void 0,!1,{fileName:Ha,lineNumber:686,columnNumber:15},this),Object(h.jsxDEV)(s.a,{labelname:"\u5206\u9500\u5546\u540d\u79f0\uff1a",required:"",labelwidth:"120px",children:Object(h.jsxDEV)(X.a,{name:"state",value:this.state.search.reseller_id,options:this.state.resellerOptions,placeholder:"\u8bf7\u9009\u62e9",width:204,clearable:!0,onChange:e=>{this.searchChange("reseller_id",e)}},void 0,!1,{fileName:Ha,lineNumber:700,columnNumber:17},this)},void 0,!1,{fileName:Ha,lineNumber:699,columnNumber:15},this),Object(h.jsxDEV)(s.a,{labelname:"\u591a\u529f\u80fd\u67e5\u8be2\uff1a",required:"",labelwidth:"120px",children:Object(h.jsxDEV)(X.a,{width:"204px",value:this.state.option,style:{marginBottom:"5px"},onChange:e=>this.setState({option:e,key_word:"",placeholder:e&&e.placeholder}),disableSearch:!0,options:Ia,clearable:!0,placeholder:"\u8bf7\u9009\u62e9\u67e5\u8be2\u5206\u7c7b"},void 0,!1,{fileName:Ha,lineNumber:713,columnNumber:17},this)},void 0,!1,{fileName:Ha,lineNumber:712,columnNumber:15},this),this.state.option?Object(h.jsxDEV)(s.a,{labelname:"",required:"",labelwidth:"0",children:Object(h.jsxDEV)(n.a,{className:"query-ip",labelWidth:0,onClearItem:e=>{this.setState({key_word:""})},onChange:e=>this.setState({key_word:e}),value:this.state.key_word,placeholder:this.state.placeholder,countShow:!1,height:32,width:270},void 0,!1,{fileName:Ha,lineNumber:729,columnNumber:19},this)},void 0,!1,{fileName:Ha,lineNumber:728,columnNumber:17},this):null,Object(h.jsxDEV)(s.a,{labelname:"",required:"",labelwidth:"0",children:Object(h.jsxDEV)("div",{style:{width:"200px"},children:[Object(h.jsxDEV)(u.a,{type:"primary",onClick:()=>{this.setState({page:1},(()=>{this.getOrderFn()}))},children:"\u67e5\u8be2"},void 0,!1,{fileName:Ha,lineNumber:747,columnNumber:19},this),Object(h.jsxDEV)(u.a,{onClick:()=>this.reset(),children:"\u91cd\u7f6e"},void 0,!1,{fileName:Ha,lineNumber:757,columnNumber:19},this)]},void 0,!0,{fileName:Ha,lineNumber:746,columnNumber:17},this)},void 0,!1,{fileName:Ha,lineNumber:745,columnNumber:15},this)]},void 0,!0,{fileName:Ha,lineNumber:666,columnNumber:13},this),Object(h.jsxDEV)(u.a,{className:"exportOrder",type:"default",icon:"download",onClick:this.exportFn.bind(this),children:"\u5bfc\u51fa\u8ba2\u5355"},void 0,!1,{fileName:Ha,lineNumber:761,columnNumber:13},this)]},void 0,!0,{fileName:Ha,lineNumber:665,columnNumber:11},this),Object(h.jsxDEV)(hi,{onClose:e=>{this.onFilterClose(e)},selectFn:(e,t)=>{this.selectedId(e,t)},ref:"filterBar",multiple:!0,filterList:this.state.filterList,menuList:this.state.menuList},void 0,!1,{fileName:Ha,lineNumber:770,columnNumber:11},this),Object(h.jsxDEV)("div",{children:[this.state.selectiondata.length>0?Object(h.jsxDEV)(ki.a,{type:"info",extraContent:Object(h.jsxDEV)(u.a,{type:"primary",onClick:this.clearFn.bind(this),children:"\u6e05\u7a7a"},void 0,!1,{fileName:Ha,lineNumber:787,columnNumber:19},this),children:["\u5df2\u9009\u62e9",Object(h.jsxDEV)("font",{color:"#296bef",style:{fontWeight:"bold"},children:this.state.selectiondata.length},void 0,!1,{fileName:Ha,lineNumber:793,columnNumber:17},this),"\u9879\uff0c\u5b98\u65b9\u4ef7\u91d1\u989d\u603b\u8ba1\uffe5",this.state.officialprice.toFixed(4),"\uff0c\u5408\u540c\u4ef7\u91d1\u989d\u603b\u8ba1\uffe5",this.state.contractprice.toFixed(4),"\uff0c\u6210\u672c\u4ef7\u91d1\u989d\u603b\u8ba1\uff1a\uffe5",this.state.costprice.toFixed(4),"\uff0c\u7ed3\u7b97\u4ef7\u91d1\u989d\u603b\u8ba1\uff1a\uffe5",this.state.totalprice.toFixed(4)]},void 0,!0,{fileName:Ha,lineNumber:784,columnNumber:15},this):null,Object(h.jsxDEV)(I,{spliteColor:"#fff",tableData:this.state.orderList,Column:Ta,dataCount:this.state.total,itemcheck:this.state.itemcheck,allcheck:this.state.allcheck,isMultiple:!0,page:this.state.page,countbarVisible:!1,isSwitch:!1,ref:"orderList",maxheight:this.state.tableHeight,pageChange:e=>{this.pageChange(e)},countChange:e=>{this.countChange(e)},checkChange:this.selection.bind(this),ComponentHandler:(e,t)=>{return"cost"==e?Object(h.jsxDEV)("span",{children:[t.contract_price,"(",1===t.type?t.cost_price:t.official_price,")"]},void 0,!0,{fileName:Ha,lineNumber:825,columnNumber:21},this):"account"==e?Object(h.jsxDEV)("span",{children:t.account||"-"},void 0,!1,{fileName:Ha,lineNumber:832,columnNumber:26},this):"statusDom"==e?Object(h.jsxDEV)("p",{className:"dflexa",children:Object(h.jsxDEV)("span",{children:[Object(h.jsxDEV)("font",{className:"icon",style:{background:At.orderStatusBg(t)}},void 0,!1,{fileName:Ha,lineNumber:838,columnNumber:25},this),t.status_text,2===t.type&&[1,2].includes(t.status)?`\uff08${t.received_num}/${t.num}\uff09`:""]},void 0,!0,{fileName:Ha,lineNumber:837,columnNumber:23},this)},void 0,!1,{fileName:Ha,lineNumber:836,columnNumber:21},this):"pay_status"==e&&1===t.use_coupon?Object(h.jsxDEV)("p",{className:"dflexa",children:Object(h.jsxDEV)("span",{children:[Object(h.jsxDEV)("font",{className:"icon",style:{background:At.orderPayStatusBg(1===t.pay_status?"":parseInt(t.pay_status))}},void 0,!1,{fileName:Ha,lineNumber:856,columnNumber:25},this),t.pay_status_text]},void 0,!0,{fileName:Ha,lineNumber:855,columnNumber:23},this)},void 0,!1,{fileName:Ha,lineNumber:854,columnNumber:21},this):"channel_activity_id"==e?Object(h.jsxDEV)("span",{children:t.channel_activity_id||t.cash_activity_id||"-"},void 0,!1,{fileName:Ha,lineNumber:871,columnNumber:21},this):"order_type"==e?Object(h.jsxDEV)("span",{children:"\u865a\u62df"},void 0,!1,{fileName:Ha,lineNumber:875,columnNumber:26},this):"receive_error"==e?Object(h.jsxDEV)("span",{children:t.orderVoucher?t.orderVoucher.receive_error:"-"},void 0,!1,{fileName:Ha,lineNumber:879,columnNumber:21},this):"usage_status"==e?Object(h.jsxDEV)("p",{className:"dflexa",children:Object(h.jsxDEV)("span",{children:[Object(h.jsxDEV)("font",{className:"icon",style:{background:At.orderVoucherStatusBg(parseInt(t.orderVoucher?t.orderVoucher.status:0))}},void 0,!1,{fileName:Ha,lineNumber:886,columnNumber:25},this),this.usageFunction(null===(i=t.orderVoucher)||void 0===i?void 0:i.status),2===t.type&&2===(null===(a=t.orderVoucher)||void 0===a?void 0:a.status)?`\uff08${t.used_num}/${t.num}\uff09`:""]},void 0,!0,{fileName:Ha,lineNumber:885,columnNumber:23},this)},void 0,!1,{fileName:Ha,lineNumber:884,columnNumber:21},this):"status_modify_time"==e?Object(h.jsxDEV)("span",{children:3==t.type?t.update_time:(null===(s=t.orderVoucher)||void 0===s?void 0:s.status_modify_time)||"-"},void 0,!1,{fileName:Ha,lineNumber:905,columnNumber:21},this):"wechat_subject"==e?Object(h.jsxDEV)(h.Fragment,{children:t.wechat_subject||"-"},void 0,!1):"product_type"==e?Object(h.jsxDEV)("span",{children:1===t.type&&2==t.product_type?"\u5361\u5bc6":1==t.type?"\u76f4\u51b2":2==t.type?"\u7acb\u51cf\u91d1":3==t.type?"\u5151\u6362\u7801\u73b0\u91d1\u7ea2\u5305":"-"},void 0,!1,{fileName:Ha,lineNumber:918,columnNumber:21},this):"opearo"==e?Object(h.jsxDEV)("div",{children:[Object(h.jsxDEV)("span",{className:"grid-link",onClick:e=>this.moreFn(e,t),children:"\u8be6\u60c5"},void 0,!1,{fileName:Ha,lineNumber:934,columnNumber:23},this),2!=t.type&&(1==t.status||0==t.status&&1==t.type||6==t.status||0==t.status&&3==t.type)?Object(h.jsxDEV)("span",{className:"grid-link",onClick:e=>this.deleteFn(e,t),children:"\u4f5c\u5e9f"},void 0,!1,{fileName:Ha,lineNumber:942,columnNumber:25},this):null,2!=t.type&&(1==t.status||0==t.status&&3==t.type)&&Object(h.jsxDEV)("span",{className:"grid-link",onClick:e=>this.changeSuccessFn(e,t),children:"\u6539\u4e3a\u6210\u529f"},void 0,!1,{fileName:Ha,lineNumber:948,columnNumber:27},this),3==t.status&&2==t.pay_status?Object(h.jsxDEV)(h.Fragment,{children:[Object(h.jsxDEV)("span",{className:"grid-link",onClick:()=>this.refundFunction(t.order_number),children:"\u91cd\u8bd5\u9000\u6b3e"},void 0,!1,{fileName:Ha,lineNumber:957,columnNumber:27},this),Object(h.jsxDEV)("span",{className:"grid-link",onClick:e=>{this.setState({orderNumber:t.order_number,visible:!0})},children:"\u624b\u52a8\u9000\u6b3e"},void 0,!1,{fileName:Ha,lineNumber:963,columnNumber:27},this)]},void 0,!0):null,2===t.type&&[1,2].includes(t.status)&&t.received_num!==t.num?Object(h.jsxDEV)("span",{className:"grid-link",onClick:()=>this.handlerReceiveRetry(t.order_number),children:"\u91cd\u8bd5\u9886\u53d6"},void 0,!1,{fileName:Ha,lineNumber:979,columnNumber:25},this):null,1==t.type&&2==t.product_type&&1==t.product.card_show&&2==t.status&&Object(h.jsxDEV)("span",{className:"grid-link",onClick:e=>this.sendSms(t),children:"\u53d1\u9001\u5361\u5bc6\u77ed\u4fe1"},void 0,!1,{fileName:Ha,lineNumber:990,columnNumber:27},this),Object(h.jsxDEV)(y.a,{position:y.d.RightTop,visible:this.state.menuVisible,onVisibleChange:e=>this.setState({visible1:e}),children:[Object(h.jsxDEV)(y.b,{children:Object(h.jsxDEV)("div",{className:"linkmore grid-link",children:["\u66f4\u591a ",Object(h.jsxDEV)(g.a,{type:"down"},void 0,!1,{fileName:Ha,lineNumber:1001,columnNumber:32},this)]},void 0,!0,{fileName:Ha,lineNumber:1e3,columnNumber:27},this)},void 0,!1,{fileName:Ha,lineNumber:999,columnNumber:25},this),Object(h.jsxDEV)(y.c,{children:Object(h.jsxDEV)(O.a,{onClick:(e,i)=>this.menuItemClick(i,t.order_number),children:[t.notifyEvent&&t.notifyEvent.map((e=>Object(h.jsxDEV)(D.a,{disabled:2==e.disable,children:e.name},e.event,!1,{fileName:Ha,lineNumber:1008,columnNumber:33},this))),2===t.type&&t.orderVoucher&&1===t.orderVoucher.status&&Object(h.jsxDEV)(D.a,{children:"\u6838\u9500\u67e5\u8be2"},0,!1,{fileName:Ha,lineNumber:1015,columnNumber:33},this)]},void 0,!0,{fileName:Ha,lineNumber:1005,columnNumber:27},this)},void 0,!1,{fileName:Ha,lineNumber:1004,columnNumber:25},this)]},void 0,!0,{fileName:Ha,lineNumber:994,columnNumber:23},this)]},void 0,!0,{fileName:Ha,lineNumber:933,columnNumber:21},this):void 0;var i,a,s}},void 0,!1,{fileName:Ha,lineNumber:802,columnNumber:13},this)]},void 0,!0,{fileName:Ha,lineNumber:782,columnNumber:11},this),Object(h.jsxDEV)(ce.a,{visible:this.state.visible,className:"questModal refundForm",onClose:()=>this.setState({visible:!1}),title:"\u9000\u6b3e",children:[Object(h.jsxDEV)(l.a,{model:this.state.model,rules:La,ref:"form",children:[Object(h.jsxDEV)(s.a,{labelname:"\u9000\u6b3e\u8d26\u53f7",id:"account",prop:"account",labelwidth:"80px",children:Object(h.jsxDEV)(n.a,{onChange:e=>{const t=this.state.model;t.account=e,this.setState({model:t})},onClearItem:()=>{const e=this.state.model;e.account="",this.setState({model:e})},value:this.state.model.account,placeholder:"",labelWidth:"0px",maxLength:40,height:"36px",unit:"",countShow:!1,width:"300px",alignment:"left"},void 0,!1,{fileName:Ha,lineNumber:1035,columnNumber:17},this)},void 0,!1,{fileName:Ha,lineNumber:1034,columnNumber:15},this),Object(h.jsxDEV)(s.a,{labelname:"",id:"account-none",prop:"account",children:Object(h.jsxDEV)(n.a,{onChange:e=>{},onClearItem:()=>{},value:this.state.model.account,placeholder:"",labelWidth:"0px",maxLength:40,height:"36px",unit:"",countShow:!1,width:"520px",alignment:"left"},void 0,!1,{fileName:Ha,lineNumber:1058,columnNumber:17},this)},void 0,!1,{fileName:Ha,lineNumber:1057,columnNumber:15},this)]},void 0,!0,{fileName:Ha,lineNumber:1033,columnNumber:13},this),Object(h.jsxDEV)("p",{className:"dflexajce",children:[Object(h.jsxDEV)(u.a,{onClick:()=>this.setState({visible:!1}),children:"\u53d6\u6d88"},void 0,!1,{fileName:Ha,lineNumber:1074,columnNumber:15},this),Object(h.jsxDEV)(u.a,{type:"primary",onClick:()=>this.handlerRefundFunction(),htmlType:"submit",children:"\u63d0\u4ea4"},void 0,!1,{fileName:Ha,lineNumber:1075,columnNumber:15},this)]},void 0,!0,{fileName:Ha,lineNumber:1073,columnNumber:13},this)]},void 0,!0,{fileName:Ha,lineNumber:1027,columnNumber:11},this)]},void 0,!0,{fileName:Ha,lineNumber:664,columnNumber:9},this)},void 0,!1,{fileName:Ha,lineNumber:663,columnNumber:7},this)}}var Aa=i(156),za=i.n(Aa),Ja=(i(246),"/Users/zhangds/web/blue-brother/frontend/src/pages/order/more/more.js");const Ua=[{title:"\u5e8f\u53f7",name:"index",prop:"index",type:"slot",width:"20%"},{title:"\u521b\u5efa\u65f6\u95f4",name:"time",prop:"time",type:"slot",width:"20%"},{title:"\u64cd\u4f5c\u63cf\u8ff0",name:"message",prop:"message",type:"normal",width:"20%"},{title:"\u8be6\u60c5",name:"opearo",type:"slot",prop:"opearo",width:"50%"}];class Wa extends m.a.Component{constructor(e){super(e),this.state={tabList:[{title:"\u8be6\u60c5"},{title:"\u65e5\u5fd7"}],tabactive:0,orderDetailLog_data:[],orderDetail_data:{},tableHeight:500,page:1,orderNo:"",limit:10,total:0}}tabFn(e){this.setState({tabactive:e});let t=[];t=0==e?[{items:[{path:"/order-list",name:"\u8ba2\u5355\u7ba1\u7406"},{path:"/order-addetails",name:"\u8ba2\u5355\u8be6\u60c5"}]}]:[{items:[{path:"/order-list",name:"\u8ba2\u5355\u7ba1\u7406"},{path:"/order-addetails",name:"\u8ba2\u5355\u65e5\u5fd7"}]}],sessionStorage.setItem("breaknav",JSON.stringify(t)),this.getOrderLogFn()}selection(){}getOrderLogFn(){let e=this,{page:t,limit:i,orderNo:s}=this.state,l={page:t,limit:i};Object(a.ob)(s,l).then((t=>{Object(a.Tb)(t,((t,i)=>{const a=t.data;e.setState({orderDetailLog_data:a,total:t.total})}),(e=>{c.a.error(e)}))})).catch((e=>{}))}getDetails(e){let t=this;Object(a.lb)(e).then((e=>{Object(a.Tb)(e,((e,i)=>{t.setState({orderDetail_data:e})}),(e=>{c.a.error(e)}))})).catch((e=>{}))}pageChange(e){this.setState({page:e}),setTimeout((()=>{this.getOrderLogFn()}),0)}countChange(e){this.setState({page:1,limit:e}),setTimeout((()=>{this.getOrderLogFn()}),0)}componentWillMount(){let e=window.location.href,t=e.lastIndexOf("="),i=e.substr(t+1,e.length);this.setState({orderNo:i}),this.getDetails(i),this.setState({tableHeight:window.innerHeight-430})}render(){var e,t,i,a;let s=this.state.orderDetail_data;return Object(h.jsxDEV)("div",{id:"more",className:"maincenter",children:Object(h.jsxDEV)(Ft,{tabs:this.state.tabList,tabChange:this.tabFn.bind(this),children:0==this.state.tabactive?Object(h.jsxDEV)("ul",{className:"main-body",children:[Object(h.jsxDEV)("li",{children:[Object(h.jsxDEV)("span",{children:"\u8ba2\u5355\u53f7"},void 0,!1,{fileName:Ja,lineNumber:166,columnNumber:17},this),Object(h.jsxDEV)("font",{children:s.order_number},void 0,!1,{fileName:Ja,lineNumber:167,columnNumber:17},this)]},void 0,!0,{fileName:Ja,lineNumber:165,columnNumber:15},this),Object(h.jsxDEV)("li",{children:[Object(h.jsxDEV)("span",{children:"\u521b\u5efa\u65f6\u95f4"},void 0,!1,{fileName:Ja,lineNumber:170,columnNumber:17},this),Object(h.jsxDEV)("font",{children:s.create_time},void 0,!1,{fileName:Ja,lineNumber:171,columnNumber:17},this)]},void 0,!0,{fileName:Ja,lineNumber:169,columnNumber:15},this),Object(h.jsxDEV)("li",{children:[Object(h.jsxDEV)("span",{children:"\u5546\u54c1\u540d\u79f0"},void 0,!1,{fileName:Ja,lineNumber:174,columnNumber:17},this),Object(h.jsxDEV)("font",{children:null===(e=s.orderDetail)||void 0===e?void 0:e.product_name},void 0,!1,{fileName:Ja,lineNumber:175,columnNumber:17},this)]},void 0,!0,{fileName:Ja,lineNumber:173,columnNumber:15},this),Object(h.jsxDEV)("li",{children:[Object(h.jsxDEV)("span",{children:"\u6620\u5c04\u5546\u54c1"},void 0,!1,{fileName:Ja,lineNumber:178,columnNumber:17},this),Object(h.jsxDEV)("font",{children:s.map_product_name||"-"},void 0,!1,{fileName:Ja,lineNumber:179,columnNumber:17},this)]},void 0,!0,{fileName:Ja,lineNumber:177,columnNumber:15},this),Object(h.jsxDEV)("li",{children:[Object(h.jsxDEV)("span",{children:"\u5b98\u65b9\u4ef7"},void 0,!1,{fileName:Ja,lineNumber:182,columnNumber:17},this),Object(h.jsxDEV)("font",{children:null===(t=s.orderDetail)||void 0===t?void 0:t.official_price},void 0,!1,{fileName:Ja,lineNumber:183,columnNumber:17},this)]},void 0,!0,{fileName:Ja,lineNumber:181,columnNumber:15},this),Object(h.jsxDEV)("li",{children:[Object(h.jsxDEV)("span",{children:"\u6210\u672c\u4ef7"},void 0,!1,{fileName:Ja,lineNumber:186,columnNumber:17},this),Object(h.jsxDEV)("font",{children:null===(i=s.orderDetail)||void 0===i?void 0:i.cost_price},void 0,!1,{fileName:Ja,lineNumber:187,columnNumber:17},this)]},void 0,!0,{fileName:Ja,lineNumber:185,columnNumber:15},this),Object(h.jsxDEV)("li",{children:[Object(h.jsxDEV)("span",{children:"\u5408\u540c\u4ef7"},void 0,!1,{fileName:Ja,lineNumber:190,columnNumber:17},this),Object(h.jsxDEV)("font",{children:s.contract_price},void 0,!1,{fileName:Ja,lineNumber:191,columnNumber:17},this)]},void 0,!0,{fileName:Ja,lineNumber:189,columnNumber:15},this),Object(h.jsxDEV)("li",{children:[Object(h.jsxDEV)("span",{children:"\u8d2d\u4e70\u6570\u91cf"},void 0,!1,{fileName:Ja,lineNumber:194,columnNumber:17},this),Object(h.jsxDEV)("font",{children:s.num},void 0,!1,{fileName:Ja,lineNumber:195,columnNumber:17},this)]},void 0,!0,{fileName:Ja,lineNumber:193,columnNumber:15},this),Object(h.jsxDEV)("li",{children:[Object(h.jsxDEV)("span",{children:"\u603b\u8ba1"},void 0,!1,{fileName:Ja,lineNumber:198,columnNumber:17},this),Object(h.jsxDEV)("font",{children:(s.num*s.contract_price).toFixed(4)},void 0,!1,{fileName:Ja,lineNumber:199,columnNumber:17},this)]},void 0,!0,{fileName:Ja,lineNumber:197,columnNumber:15},this),1===(null===(a=s.orderDetail)||void 0===a?void 0:a.product.product_type)?Object(h.jsxDEV)("li",{children:[Object(h.jsxDEV)("span",{children:"\u5145\u503c\u8d26\u53f7"},void 0,!1,{fileName:Ja,lineNumber:203,columnNumber:19},this),Object(h.jsxDEV)("font",{children:s.account},void 0,!1,{fileName:Ja,lineNumber:204,columnNumber:19},this)]},void 0,!0,{fileName:Ja,lineNumber:202,columnNumber:17},this):null,Object(h.jsxDEV)("li",{children:[Object(h.jsxDEV)("span",{children:"\u72b6\u6001"},void 0,!1,{fileName:Ja,lineNumber:209,columnNumber:17},this),Object(h.jsxDEV)("font",{children:s.status_text},void 0,!1,{fileName:Ja,lineNumber:210,columnNumber:17},this)]},void 0,!0,{fileName:Ja,lineNumber:208,columnNumber:15},this)]},void 0,!0,{fileName:Ja,lineNumber:164,columnNumber:13},this):Object(h.jsxDEV)("div",{className:"main-body",children:Object(h.jsxDEV)(I,{spliteColor:"#fff",tableData:this.state.orderDetailLog_data,Column:Ua,isMultiple:!1,maxheight:this.state.tableHeight,dataCount:this.state.total,countChange:e=>{this.countChange(e)},countbarVisible:!1,isSwitch:!1,pageChange:e=>{this.pageChange(e)},checkChange:this.selection.bind(this),ComponentHandler:(e,t,i)=>"time"==e?Object(h.jsxDEV)("div",{children:Y.a.unix(t.time).format("YYYY-MM-DD HH:mm:ss")},void 0,!1,{fileName:Ja,lineNumber:233,columnNumber:28},this):"index"==e?Object(h.jsxDEV)("span",{children:i+1},void 0,!1,{fileName:Ja,lineNumber:236,columnNumber:28},this):"opearo"==e?Object(h.jsxDEV)("div",{children:t.data?Object(h.jsxDEV)(za.a,{collapsed:!0,name:!1,src:t.data,displayDataTypes:!1},void 0,!1,{fileName:Ja,lineNumber:242,columnNumber:27},this):Object(h.jsxDEV)("span",{children:"-"},void 0,!1,{fileName:Ja,lineNumber:249,columnNumber:27},this)},void 0,!1,{fileName:Ja,lineNumber:240,columnNumber:23},this):void 0},void 0,!1,{fileName:Ja,lineNumber:215,columnNumber:15},this)},void 0,!1,{fileName:Ja,lineNumber:214,columnNumber:13},this)},void 0,!1,{fileName:Ja,lineNumber:162,columnNumber:9},this)},void 0,!1,{fileName:Ja,lineNumber:161,columnNumber:7},this)}}i(247);const Ra=[{title:"\u5305\u7801\u7ed3\u7b97\u8ba2\u5355ID",name:"settlement_no",prop:"settlement_no",type:"normal",width:"320px"},{title:"\u7ed3\u7b97\u7c7b\u578b",name:"type_text",prop:"type_text",type:"normal",width:"auto"},{title:"key\u7801",name:"key",prop:"key",type:"normal",width:"auto"},{title:"\u8ba1\u5212\u540d\u79f0",prop:"plan_title",name:"plan_title",width:"auto",type:"normal"},{title:"key\u6279\u6b21\u540d\u79f0",prop:"key_batch_name",name:"key_batch_name",width:"auto",type:"normal"},{title:"\u5206\u9500\u5546",name:"reseller_name",prop:"reseller_name",type:"normal",width:"auto"},{title:"\u5b98\u65b9\u4ef7\uff08\u5143\uff09",name:"key_official_price",prop:"key_official_price",type:"normal",width:"auto"},{title:"\u521b\u5efa\u65f6\u95f4",name:"create_time",prop:"create_time",type:"normal",width:"220px"},{title:"\u6210\u672c\u4ef7\uff08\u5143\uff09",name:"key_cost_price",prop:"key_cost_price",type:"normal",width:"auto"},{title:"\u64cd\u4f5c",prop:"opearo",name:"opearo",type:"slot",width:"auto"}];var Ka=i(446),Ya="/Users/zhangds/web/blue-brother/frontend/src/pages/order/settlementList/list.jsx",$a=i(67);let Ga=$a(wa()).format("YYYY-MM-DD"),Qa=$a(Sa()).format("YYYY-MM-DD");class Za extends m.a.Component{constructor(e){super(e),this.state={tabList:[{title:"\u5305\u7801\u5217\u8868"}],orderList:[],selectionData:[],allcheck:!1,itemcheck:!1,tableHeight:500,combinedValue:[],planOptions:[],resellerOptions:[],keysOptions:[],settlementOptions:[],page:1,limit:10,officialPrice:0,costPrice:0,search:this.initSearch()},this.onChangeCombinedDate=this.onChangeCombinedDate.bind(this)}initSearch(){return{plan_id:"",reseller_id:"",key_batch_id:"",type:"",key:"",settlement_no:""}}searchChange(e,t){const i=this.state.search;i[e]=t,this.setState({search:i})}selection(e){this.setState({selectionData:e});let t=0,i=0;e.forEach((e=>{t+=Number(e.key_official_price),i+=Number(e.key_cost_price)})),this.setState({officialPrice:t,costPrice:i})}getPlan(){Object(a.rb)().then((e=>Object(a.Tb)(e,((e,t)=>{const i=e.filter((e=>e.settlement_type>0)).map((e=>({key:e.id,text:e.title})));this.setState({planOptions:i})}),(e=>{})))),Object(a.ub)().then((e=>{Object(a.Tb)(e,((e,t)=>{const i=e.map((e=>({key:e.id,text:e.name})));this.setState({resellerOptions:i})}))})),Object(a.Bb)().then((e=>Object(a.Tb)(e,((e,t)=>{const i=e.map((e=>({key:e.settlement_type,text:e.settlement_text})));this.setState({settlementOptions:i})}),(e=>{}))))}getBatchKeys(e){Object(a.Nc)({status:"4,5",plan_id:e,bind_object:1}).then((e=>{Object(a.Tb)(e,((e,t)=>{const i=e.map((e=>({key:e.id,text:e.batch_name})));this.setState({keysOptions:i})}),(e=>{c.a.error(e)}))}))}moreFn(e,t){this.props.history.push("/home/packageDetail?id="+t.id),sessionStorage.setItem("pathname2","/home/packageDetail");sessionStorage.setItem("breaknav",JSON.stringify([{items:[{path:"/home/settlementList",name:"\u5305\u7801\u5217\u8868"},{path:"/home/packageDetail",name:"\u5305\u7801\u8be6\u60c5"}]}]))}clearFn(){this.setState({allcheck:!1,selectionData:[],itemcheck:!1})}onChangeCombinedDate(e){this.setState({combinedValue:e,page:1,selectionData:[]},(()=>{this.getOrderFn()}))}bachExportOrder(){let e={};if(this.state.selectionData.length>0)e.ids=this.state.selectionData.map((e=>e.id));else{let{page:t,limit:i,search:a,combinedValue:s}=this.state,{key:l,key_batch_id:n,plan_id:o,reseller_id:r,type:m,settlement_no:d}=a;if(!o||!s)return void c.a.error("\u8ba2\u5355\u5bfc\u51fa\u5fc5\u987b\u6709\u8ba1\u5212id\u548c\u65f6\u95f4");e={page:t,limit:i,begin_time:s[0],end_time:s[1],key:l||"",key_batch_id:n?n.key:"",plan_id:o?o.key:"",reseller_id:r?r.key:"",type:m?m.key:"",settlement_no:d}}try{Object(a.zb)(e).then((e=>{if("application/json"==e.type){const t=new FileReader;t.readAsText(e,"utf-8"),t.onload=function(){const e=JSON.parse(t.result);c.a.clear(),c.a.error(e.message)}}else{let i=new Blob([e]),a="\u5305\u7801\u7ed3\u7b97\u8ba2\u5355\u5217\u8868"+ae()+".xlsx";var t=document.createElement("a");t.href=window.URL.createObjectURL(i),t.download=a,t.click(),window.URL.revokeObjectURL(t.href)}}))}catch(t){}}pageChange(e){this.setState({selectionData:[],page:e},(()=>{this.getOrderFn()}))}countChange(e){this.setState({selectionData:[],page:1,limit:e},(()=>{this.getOrderFn()}))}getOrderFn(){let{page:e,limit:t,search:i,combinedValue:s}=this.state,{key:l,key_batch_id:n,plan_id:o,reseller_id:r,type:m,settlement_no:d}=i,u={page:e,limit:t,begin_time:s[0],end_time:s[1],key:l||"",key_batch_id:n?n.key:"",plan_id:o?o.key:"",reseller_id:r?r.key:"",type:m?m.key:"",settlement_no:d};Object(a.Ab)(Object(Ka.a)(u)).then((e=>{Object(a.Tb)(e,((e,t)=>{const i=e.data,{total:a}=e;this.setState({orderList:i,total:a})}),(e=>{c.a.error(e)}))})).catch((e=>{}))}componentWillMount(){let e=[Qa+" 00:00:00",Ga+" 23:59:59"];this.getPlan(),this.setState({tableHeight:window.innerHeight-490,combinedValue:e},(()=>{this.getOrderFn()}))}reset(){this.setState({search:this.initSearch(),page:1},(()=>this.getOrderFn()))}render(){const e=Object(h.jsxDEV)(Jt.a,{className:"zent-datepicker-demo",value:this.state.combinedValue,dateSpan:90,showTime:{format:"HH:mm:ss",defaultTime:["00:00:00","23:59:59"]},format:"YYYY-MM-DD HH:mm:ss",onChange:this.onChangeCombinedDate},void 0,!1,{fileName:Ya,lineNumber:293,columnNumber:7},this);return Object(h.jsxDEV)("div",{id:"dislist",className:"settlementList",children:Object(h.jsxDEV)(Ft,{tabs:this.state.tabList,slot:e,children:[Object(h.jsxDEV)("div",{className:"order-query",children:[Object(h.jsxDEV)(l.a,{children:[Object(h.jsxDEV)(s.a,{labelname:"\u8425\u9500\u8ba1\u5212\uff1a",required:"",labelwidth:"95px",children:Object(h.jsxDEV)(X.a,{name:"state",value:this.state.search.plan_id,options:this.state.planOptions,placeholder:"\u8bf7\u9009\u62e9",width:204,clearable:!0,onChange:e=>{this.searchChange("plan_id",e),e?this.getBatchKeys(e.key):(this.setState({keysOptions:[]}),this.searchChange("key_batch_id",""))}},void 0,!1,{fileName:Ya,lineNumber:311,columnNumber:17},this)},void 0,!1,{fileName:Ya,lineNumber:310,columnNumber:15},this),Object(h.jsxDEV)(s.a,{labelname:"key\u6279\u6b21\uff1a",required:"",labelwidth:"86px",children:Object(h.jsxDEV)(X.a,{name:"state",value:this.state.search.key_batch_id,options:this.state.keysOptions,placeholder:"\u8bf7\u5148\u9009\u62e9\u8ba1\u5212",width:204,clearable:!0,onChange:e=>{this.searchChange("key_batch_id",e)}},void 0,!1,{fileName:Ya,lineNumber:331,columnNumber:17},this)},void 0,!1,{fileName:Ya,lineNumber:330,columnNumber:15},this),Object(h.jsxDEV)(s.a,{labelname:"\u5206\u9500\u5546\uff1a",required:"",labelwidth:"80px",children:Object(h.jsxDEV)(X.a,{name:"state",value:this.state.search.reseller_id,options:this.state.resellerOptions,placeholder:"\u8bf7\u9009\u62e9",width:204,clearable:!0,onChange:e=>{this.searchChange("reseller_id",e)}},void 0,!1,{fileName:Ya,lineNumber:344,columnNumber:17},this)},void 0,!1,{fileName:Ya,lineNumber:343,columnNumber:15},this),Object(h.jsxDEV)(s.a,{labelname:"\u7ed3\u7b97\u7c7b\u578b\uff1a",required:"",labelwidth:"100px",children:Object(h.jsxDEV)(X.a,{name:"state",value:this.state.search.type,options:this.state.settlementOptions,placeholder:"\u8bf7\u9009\u62e9",width:204,clearable:!0,onChange:e=>{this.searchChange("type",e)}},void 0,!1,{fileName:Ya,lineNumber:357,columnNumber:17},this)},void 0,!1,{fileName:Ya,lineNumber:356,columnNumber:15},this),Object(h.jsxDEV)(s.a,{labelname:"key\u7801\uff1a",required:"",labelwidth:"65px",children:Object(h.jsxDEV)(n.a,{value:this.state.search.key,countShow:!1,labelWidth:"0px",placeholder:"\u8bf7\u8f93\u5165",width:204,onChange:e=>{this.searchChange("key",e)},onClearItem:e=>{this.searchChange("key","")}},void 0,!1,{fileName:Ya,lineNumber:370,columnNumber:17},this)},void 0,!1,{fileName:Ya,lineNumber:369,columnNumber:15},this),Object(h.jsxDEV)(s.a,{labelname:"\u5305\u7801\u8ba2\u5355ID\uff1a",required:"",labelwidth:"105px",style:{marginLeft:"0px"},children:Object(h.jsxDEV)(n.a,{value:this.state.search.settlement_no,countShow:!1,labelWidth:"0px",placeholder:"\u8bf7\u8f93\u5165",style:{marginLeft:"0px"},width:204,onChange:e=>{this.searchChange("settlement_no",e)},onClearItem:e=>{this.searchChange("settlement_no","")}},void 0,!1,{fileName:Ya,lineNumber:390,columnNumber:17},this)},void 0,!1,{fileName:Ya,lineNumber:384,columnNumber:15},this),Object(h.jsxDEV)(s.a,{labelname:"",required:"",labelwidth:"0",children:Object(h.jsxDEV)("div",{style:{width:"200px",marginLeft:"20px"},children:[Object(h.jsxDEV)(u.a,{type:"primary",onClick:()=>{this.setState({page:1},(()=>{this.getOrderFn()}))},children:"\u67e5\u8be2"},void 0,!1,{fileName:Ya,lineNumber:407,columnNumber:19},this),Object(h.jsxDEV)(u.a,{onClick:()=>this.reset(),children:"\u91cd\u7f6e"},void 0,!1,{fileName:Ya,lineNumber:417,columnNumber:19},this)]},void 0,!0,{fileName:Ya,lineNumber:406,columnNumber:17},this)},void 0,!1,{fileName:Ya,lineNumber:405,columnNumber:15},this)]},void 0,!0,{fileName:Ya,lineNumber:309,columnNumber:13},this),Object(h.jsxDEV)(u.a,{className:"exportOrder",type:"default",icon:"download",onClick:this.bachExportOrder.bind(this),children:"\u5bfc\u51fa\u8ba2\u5355"},void 0,!1,{fileName:Ya,lineNumber:421,columnNumber:13},this)]},void 0,!0,{fileName:Ya,lineNumber:308,columnNumber:11},this),Object(h.jsxDEV)("div",{children:[this.state.selectionData.length>0?Object(h.jsxDEV)(ki.a,{type:"info",extraContent:Object(h.jsxDEV)(u.a,{type:"primary",onClick:this.clearFn.bind(this),children:"\u6e05\u7a7a"},void 0,!1,{fileName:Ya,lineNumber:435,columnNumber:19},this),children:["\u5df2\u9009\u62e9",Object(h.jsxDEV)("font",{color:"#296bef",style:{fontWeight:"bold"},children:this.state.selectionData.length},void 0,!1,{fileName:Ya,lineNumber:441,columnNumber:17},this),"\u9879\uff0c\u5b98\u65b9\u4ef7\u91d1\u989d\u603b\u8ba1\uffe5",this.state.officialPrice.toFixed(4),"\uff0c\u6210\u672c\u4ef7\u91d1\u989d\u603b\u8ba1\uff1a\uffe5",this.state.costPrice.toFixed(4)]},void 0,!0,{fileName:Ya,lineNumber:432,columnNumber:15},this):null,Object(h.jsxDEV)(I,{spliteColor:"#fff",tableData:this.state.orderList,Column:Ra,dataCount:this.state.total,itemcheck:this.state.itemcheck,allcheck:this.state.allcheck,isMultiple:!0,page:this.state.page,countbarVisible:!1,isSwitch:!1,ref:"orderList",maxheight:this.state.tableHeight,pageChange:e=>{this.pageChange(e)},countChange:e=>{this.countChange(e)},checkChange:this.selection.bind(this),ComponentHandler:(e,t)=>{if("opearo"==e)return Object(h.jsxDEV)("span",{className:"grid-link",onClick:e=>this.moreFn(e,t),children:"\u8be6\u60c5"},void 0,!1,{fileName:Ya,lineNumber:471,columnNumber:21},this)}},void 0,!1,{fileName:Ya,lineNumber:448,columnNumber:13},this)]},void 0,!0,{fileName:Ya,lineNumber:430,columnNumber:11},this)]},void 0,!0,{fileName:Ya,lineNumber:307,columnNumber:9},this)},void 0,!1,{fileName:Ya,lineNumber:306,columnNumber:7},this)}}i(248);var Xa="/Users/zhangds/web/blue-brother/frontend/src/pages/order/packageDetail/index.js";const es=[{title:"\u521b\u5efa\u65f6\u95f4",name:"time",prop:"time",type:"slot",width:"20%"},{title:"\u64cd\u4f5c\u63cf\u8ff0",name:"message",prop:"message",type:"normal",width:"20%"},{title:"\u8be6\u60c5",name:"opearo",type:"slot",prop:"opearo",width:"50%"}];class ts extends m.a.Component{constructor(e){super(e),this.state={tabList:[{title:"\u8be6\u60c5"}],tabactive:0,orderDetailLog_data:[],orderDetail_data:{},tableHeight:500,page:1,orderNo:"",limit:10,total:0}}tabFn(e){this.setState({tabactive:e});let t=[];0==e&&(t=[{items:[{path:"/settlementList",name:"\u5305\u7801\u7ed3\u7b97\u5217\u8868"},{path:"/packageDetail",name:"\u5305\u7801\u8be6\u60c5"}]}]),sessionStorage.setItem("breaknav",JSON.stringify(t))}selection(){}getDetails(e){let t=this;Object(a.pb)(e).then((e=>{Object(a.Tb)(e,((e,i)=>{t.setState({orderDetail_data:e})}),(e=>{c.a.error(e)}))})).catch((e=>{}))}componentWillMount(){let e=window.location.href,t=e.lastIndexOf("="),i=e.substr(t+1,e.length);this.setState({orderNo:i}),this.getDetails(i),this.setState({tableHeight:window.innerHeight-430})}render(){let e=this.state.orderDetail_data;return Object(h.jsxDEV)("div",{id:"more2",className:"maincenter",children:Object(h.jsxDEV)(Ft,{tabs:this.state.tabList,tabChange:this.tabFn.bind(this),children:0==this.state.tabactive?Object(h.jsxDEV)("ul",{className:"main-body",children:[Object(h.jsxDEV)("li",{children:[Object(h.jsxDEV)("span",{children:"\u7ed3\u7b97\u8ba2\u5355\u53f7:"},void 0,!1,{fileName:Xa,lineNumber:106,columnNumber:17},this),Object(h.jsxDEV)("span",{children:e.settlement_no},void 0,!1,{fileName:Xa,lineNumber:107,columnNumber:17},this)]},void 0,!0,{fileName:Xa,lineNumber:105,columnNumber:15},this),Object(h.jsxDEV)("li",{children:[Object(h.jsxDEV)("span",{children:"\u521b\u5efa\u65f6\u95f4:"},void 0,!1,{fileName:Xa,lineNumber:110,columnNumber:17},this),Object(h.jsxDEV)("span",{children:e.create_time},void 0,!1,{fileName:Xa,lineNumber:111,columnNumber:17},this)]},void 0,!0,{fileName:Xa,lineNumber:109,columnNumber:15},this),Object(h.jsxDEV)("li",{children:[Object(h.jsxDEV)("span",{children:"\u5151\u6362\u6570\u91cf:"},void 0,!1,{fileName:Xa,lineNumber:114,columnNumber:17},this),Object(h.jsxDEV)("span",{children:e.order_rows?e.order_rows.length:"0"},void 0,!1,{fileName:Xa,lineNumber:115,columnNumber:17},this)]},void 0,!0,{fileName:Xa,lineNumber:113,columnNumber:15},this),e.order_rows?e.order_rows.map((e=>Object(h.jsxDEV)("li",{children:[Object(h.jsxDEV)("span",{children:"\u5173\u8054\u8ba2\u5355\u53f7:"},void 0,!1,{fileName:Xa,lineNumber:123,columnNumber:25},this),Object(h.jsxDEV)("span",{children:e.order_number},void 0,!1,{fileName:Xa,lineNumber:124,columnNumber:25},this),Object(h.jsxDEV)("span",{children:e.create_time},void 0,!1,{fileName:Xa,lineNumber:125,columnNumber:25},this)]},e.order_number,!0,{fileName:Xa,lineNumber:122,columnNumber:23},this))):null]},void 0,!0,{fileName:Xa,lineNumber:104,columnNumber:13},this):Object(h.jsxDEV)("div",{className:"main-body",children:Object(h.jsxDEV)(I,{spliteColor:"#fff",tableData:this.state.orderDetailLog_data,Column:es,isMultiple:!1,maxheight:this.state.tableHeight,dataCount:this.state.total,countChange:e=>{this.countChange(e)},countbarVisible:!1,isSwitch:!1,pageChange:e=>{this.pageChange(e)},checkChange:this.selection.bind(this),ComponentHandler:(e,t)=>{if("time"==e)return Object(h.jsxDEV)("div",{children:Y.a.unix(t.time).format("YYYY-MM-DD HH:mm:ss")},void 0,!1,{fileName:Xa,lineNumber:151,columnNumber:28},this)}},void 0,!1,{fileName:Xa,lineNumber:133,columnNumber:15},this)},void 0,!1,{fileName:Xa,lineNumber:132,columnNumber:13},this)},void 0,!1,{fileName:Xa,lineNumber:102,columnNumber:9},this)},void 0,!1,{fileName:Xa,lineNumber:101,columnNumber:7},this)}}i(102);var is="/Users/zhangds/web/blue-brother/frontend/src/pages/plan/add/step1.js";class as extends m.a.Component{constructor(e){super(e),this.onDisabledRange=(e,t)=>{let i=!1;return"end"==t&&(i=Y()(e.getTime()).add(1,"days")<=(new Date).getTime()),"start"==t&&(i=e.getTime()<=(new Date).getTime()),i},this.state={model:{title:"",type:2,reseller:null,return_id:"1",date_time:["",""],stock_id:null,settlement_type:null},settlementOptions:[],reseller_option:[],lodshow:!1,loading:!1,isSettlement:2}}componentDidMount(e){Object(a.ub)().then((e=>{Object(a.Tb)(e,((e,t)=>{let i=Object(f.a)(e,(e=>{let t={};return t.key=e.id,t.text=e.name,t.direct_reseller_id=e.direct_reseller_id,t}));this.setState({reseller_option:i})}),(e=>{c.a.error(e)}))})),Object(a.Bb)().then((e=>{Object(a.Tb)(e,((e,t)=>{let i=Object(f.a)(e,(e=>{let t={};return t.key=e.settlement_type,t.text=e.settlement_text,t}));this.setState({settlementOptions:i})}),(e=>{c.a.error(e)}))}))}edit(e){let t={};t.title=e.title,t.type=parseInt(e.type),t.return_id=e.return_type,t.stock_id=e.stock_id,t.reseller={key:e.reseller_id,text:e.reseller_name},t.date_time=[e.begin_time,e.end_time];const i={begin_time:t.date_time[0],end_time:t.date_time[1]};sessionStorage.setItem("knockGold_effectDate",JSON.stringify(i)),sessionStorage.setItem("redPackets_effectDate",JSON.stringify(i)),sessionStorage.setItem("plan_item",JSON.stringify(i));let a=sessionStorage.getItem("bm_obj");if(a){let e=JSON.parse(a);e.settlement_type>0?(this.setState({isSettlement:1}),t.settlement_type={key:e.settlement_type,text:e.settlement_type_text}):this.setState({isSettlement:2})}this.setState({model:t,lodshow:!0})}async submit(e){let t=!1;if(this.refs.form1.validator()){if(""==this.state.model.date_time[1])return c.a.error("\u7ed3\u675f\u65e5\u671f\u4e0d\u80fd\u4e3a\u7a7a"),!1;if(this.state.model.stock_id&&!/^[a-zA-Z0-9]+$/.test(this.state.model.stock_id))return c.a.error("\u8bf7\u8f93\u5165\u7531\u5b57\u6bcd\u6216\u6570\u5b57\u7ec4\u6210\u7684\u8ba1\u5212\u7f16\u53f7"),!1;let i={};if(i.title=this.state.model.title,i.stock_id=this.state.model.stock_id,i.type=parseInt(this.state.model.type),i.return_type=1,i.reseller_id=this.state.model.reseller.key,i.reseller_name=this.state.model.reseller.text,i.begin_time=this.state.model.date_time[0],i.end_time=this.state.model.date_time[1],1===this.state.isSettlement&&this.state.model.settlement_type&&(i.settlement_type=this.state.model.settlement_type.key),this.state.loading)return;if(this.setState({loading:!0}),e){let s={title:i.title,begin_time:i.begin_time,end_time:i.end_time,settlement_type:i.settlement_type};1===this.state.isSettlement&&this.state.model.settlement_type&&(s.settlement_type=i.settlement_type),await Object(a.Ec)(e,s).then((e=>{this.setState({loading:!1}),Object(a.Tb)(e,((e,i)=>{c.a.success("\u4fdd\u5b58\u6210\u529f"),t=!0}),(e=>{c.a.error(e)}))}))}else{let e={};e.info=i;let s=sessionStorage.getItem("plan_id");if(e.info.copy_plan_id=sessionStorage.getItem("plan_id_copy"),""!=s)return this.setState({loading:!1}),delete i.copy_plan_id,sessionStorage.setItem("step1",JSON.stringify(i)),sessionStorage.setItem("knockGold_effectDate",JSON.stringify(i)),sessionStorage.setItem("redPackets_effectDate",JSON.stringify(i)),sessionStorage.setItem("plan_item",JSON.stringify(i)),!0;await Object(a.d)("",e).then((e=>{this.setState({loading:!1}),Object(a.Tb)(e,((e,a)=>{sessionStorage.setItem("plan_id",e.id),delete i.copy_plan_id,sessionStorage.setItem("step1",JSON.stringify(i)),sessionStorage.setItem("knockGold_effectDate",JSON.stringify(i)),sessionStorage.setItem("redPackets_effectDate",JSON.stringify(i)),sessionStorage.setItem("plan_item",JSON.stringify(i)),t=!0}),(e=>{c.a.error(e)}))}))}}return t}onCancel(){this.refs.form1.cancel()}updateData(e,t){if(sessionStorage.getItem("step1")){let i=JSON.parse(sessionStorage.getItem("step1"));i[e]=t,sessionStorage.setItem("knockGold_effectDate",JSON.stringify(i)),sessionStorage.setItem("redPackets_effectDate",JSON.stringify(i)),sessionStorage.setItem("plan_item",JSON.stringify(i)),sessionStorage.setItem("step1",i)}}onTypeChange(e){let t=this.state.model;t.type=e.target.value,this.setState({model:t})}onResellerChange(e){this.props.onGetDirectResellerId(e);let t=this.state.model;t.reseller=e,this.setState({model:t})}onChangeCombinedDate(e){let t=this.state.model;t.date_time=e,this.setState({model:t});const i={begin_time:t.date_time[0],end_time:t.date_time[1]};sessionStorage.setItem("knockGold_effectDate",JSON.stringify(i)),sessionStorage.setItem("redPackets_effectDate",JSON.stringify(i)),sessionStorage.setItem("plan_item",JSON.stringify(i))}render(){return Object(h.jsxDEV)("div",{id:"step1",children:Object(h.jsxDEV)(l.a,{model:this.state.model,rules:{title:[{type:"required",message:"\u8bf7\u8f93\u5165\u8425\u9500\u8ba1\u5212\u540d\u79f0"},{type:"regExp",message:"\u53ea\u5141\u8bb8\u5305\u542b\u5b57\u6bcd\u6570\u5b57\u6c49\u5b57\u548c\u3001\u3002\uff0c ( ) & - +",reg:/^[\u4e00-\u9fa5a-zA-Z0-9\u3002\uff0c\u3001_.\\\uff08\uff09&\-+]+$/}],reseller:[{type:"required",message:"\u8bf7\u9009\u62e9\u5206\u9500\u5546"}],date_time:[{type:"required",message:"\u8bf7\u9009\u62e9\u65f6\u95f4\u6bb5"}],settlement_type:[{type:"required",message:"\u8bf7\u9009\u62e9\u5305\u7801\u7ed3\u7b97\u65b9\u5f0f"}]},ref:"form1",children:[Object(h.jsxDEV)(s.a,{labelname:"\u8425\u9500\u8ba1\u5212\u540d\u79f0",prop:"title",id:"title",children:Object(h.jsxDEV)(n.a,{onChange:e=>{let t=this.state.model;t.title=e,this.setState({model:t})},onClearItem:e=>{let t=this.state.model;t.title="",this.setState({model:t})},value:this.state.model.title,countShow:!1,placeholder:"\u8bf7\u8f93\u5165",labelWidth:"0px",maxLength:12,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:is,lineNumber:292,columnNumber:13},this)},void 0,!1,{fileName:is,lineNumber:291,columnNumber:11},this),Object(h.jsxDEV)(s.a,{labelname:"\u8425\u9500\u8ba1\u5212\u7f16\u53f7",prop:"stock_id",id:"stock_id",required:"",children:Object(h.jsxDEV)(n.a,{disabled:this.props.disabled,onChange:e=>{let t=this.state.model;t.stock_id=e,this.setState({model:t})},onClearItem:e=>{let t=this.state.model;t.stock_id="",this.setState({model:t})},value:this.state.model.stock_id,countShow:!1,placeholder:"\u5b57\u6bb5\u4e3a\u7a7a\u81ea\u52a8\u751f\u6210ID",labelWidth:"0px",maxLength:16,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:is,lineNumber:315,columnNumber:13},this)},void 0,!1,{fileName:is,lineNumber:314,columnNumber:11},this),Object(h.jsxDEV)(s.a,{labelname:"\u8ba1\u5212\u7c7b\u578b",prop:"type",id:"type",children:Object(h.jsxDEV)(Q.a,{onChange:e=>{this.onTypeChange(e)},value:this.state.model.type,children:[Object(h.jsxDEV)(ne.a,{value:1,disabled:!0,children:"\u6d3b\u52a8"},void 0,!1,{fileName:is,lineNumber:345,columnNumber:15},this),Object(h.jsxDEV)(ne.a,{value:2,children:"\u4ec5\u5151\u6362"},void 0,!1,{fileName:is,lineNumber:348,columnNumber:15},this)]},void 0,!0,{fileName:is,lineNumber:339,columnNumber:13},this)},void 0,!1,{fileName:is,lineNumber:338,columnNumber:11},this),Object(h.jsxDEV)(s.a,{labelname:"\u5305\u7801\u7ed3\u7b97",prop:"isSettlement",required:"",id:"isSettlement",children:Object(h.jsxDEV)(Q.a,{disabled:this.props.disabled,onChange:e=>{this.props.setTlementType(e.target.value),this.setState({isSettlement:e.target.value})},value:this.state.isSettlement,children:[Object(h.jsxDEV)(ne.a,{value:1,children:"\u662f"},void 0,!1,{fileName:is,lineNumber:360,columnNumber:15},this),Object(h.jsxDEV)(ne.a,{value:2,children:"\u5426"},void 0,!1,{fileName:is,lineNumber:361,columnNumber:15},this)]},void 0,!0,{fileName:is,lineNumber:352,columnNumber:13},this)},void 0,!1,{fileName:is,lineNumber:351,columnNumber:11},this),1===this.state.isSettlement?Object(h.jsxDEV)(s.a,{labelname:"\u5305\u7801\u7ed3\u7b97\u65b9\u5f0f",prop:"settlement_type",id:"settlement_type",children:Object(h.jsxDEV)(X.a,{options:this.state.settlementOptions,placeholder:"\u9009\u62e9\u4e00\u9879",disabled:this.props.disabled,width:515,value:this.state.model.settlement_type,onChange:e=>{let t=this.state.model;t.settlement_type=e,this.setState({model:t}),this.props.setTlementData(e)}},void 0,!1,{fileName:is,lineNumber:366,columnNumber:15},this)},void 0,!1,{fileName:is,lineNumber:365,columnNumber:13},this):null,Object(h.jsxDEV)(s.a,{labelname:"\u5206\u9500\u5546",prop:"reseller",id:"reseller",children:Object(h.jsxDEV)(X.a,{options:this.state.reseller_option,placeholder:"\u9009\u62e9\u4e00\u9879",disabled:this.props.disabled,width:515,value:this.state.model.reseller,onChange:e=>{this.onResellerChange(e),$t.a.emit("change","reseller",e)}},void 0,!1,{fileName:is,lineNumber:382,columnNumber:13},this)},void 0,!1,{fileName:is,lineNumber:381,columnNumber:11},this),Object(h.jsxDEV)(s.a,{labelname:"\u5f00\u59cb~\u7ed3\u675f\u65f6\u95f4",prop:"date_time",id:"date_time",children:Object(h.jsxDEV)(ee.a,{className:"zent-datepicker-plan",showTime:{format:"HH:mm:ss",defaultTime:[Y()().format("HH:mm:ss"),"23:59:59"]},format:"YYYY-MM-DD HH:mm:ss",disabled:[this.props.disabled,!1],value:this.state.model.date_time,onChange:e=>{$t.a.emit("change","date_time",e),this.onChangeCombinedDate(e)},disabledDate:this.onDisabledRange},void 0,!1,{fileName:is,lineNumber:396,columnNumber:13},this)},void 0,!1,{fileName:is,lineNumber:395,columnNumber:11},this)]},void 0,!0,{fileName:is,lineNumber:290,columnNumber:9},this)},void 0,!1,{fileName:is,lineNumber:289,columnNumber:7},this)}}i(249);var ss="/Users/zhangds/web/blue-brother/frontend/src/components/UseExchangeAddEdit/index.jsx";const ls=e=>Array.from({length:e},((e,t)=>t)),ns=[{title:"\u5546\u54c1ID",name:"product_id",prop:"product_id",width:"auto",type:"normal"},{title:"\u5546\u54c1\u540d\u79f0",width:"auto",prop:"product_name",name:"product_name",type:"normal"},{title:"\u5e73\u53f0\u6279\u6b21\u53f7",width:"250px",prop:"channel_activity_id",name:"channel_activity_id",type:"normal"},{title:"\u7c7b\u578b",width:"auto",prop:"type",name:"type",type:"slot"},{title:"\u4e0a\u6e38\u5e73\u53f0",width:"auto",prop:"upstream",name:"upstream",type:"normal"},{title:"\u6709\u6548\u65f6\u95f4\u6bb5",width:"350px",prop:"effectDate",name:"effectDate",type:"normal"},{title:"\u603b\u9884\u7b97",prop:"all_budget",name:"all_budget",width:"auto",type:"normal"},{title:"\u5f53\u524d\u6210\u672c\u4ef7\u683c",prop:"cost_price",name:"cost_price",width:"200px",type:"slot"},{title:"\u5408\u540c\u4ef7",name:"contract_price",prop:"contract_price",type:"normal",width:"auto"},{title:"\u5546\u54c1\u5b98\u65b9\u4ef7",type:"normal",prop:"official_price",width:"auto"},{title:"\u5e93\u5b58",type:"normal",prop:"quantity",width:"auto"},{title:"\u64cd\u4f5c",prop:"opearo",name:"opearo",type:"slot",width:"auto"}],os={code_name:[{type:"required",message:"\u8bf7\u8f93\u5165\u5151\u6362\u7801\u540d\u79f0"}],issued:[{type:"required",message:"\u8bf7\u8f93\u5165\u53d1\u653e\u603b\u91cf"},{type:"regExp",message:"\u8bf7\u8f93\u5165\u6b63\u6574\u6570",reg:"^([1-9][0-9]*){1,3}$"}]},rs={date_time:[{type:"required",message:"\u8bf7\u9009\u62e9\u751f\u6548\u65f6\u95f4\u6bb5"}],rank:[{type:"required",message:"\u8bf7\u9009\u62e9\u5546\u54c1\u8303\u56f4"}]};var ms=Object(r.forwardRef)(((e,t)=>{const{direct_reseller_id:i,editData:a}=e,o=Object(r.useRef)(null),m=Object(r.useRef)(null),b=Object(r.useRef)(null),p=Object(r.useRef)(null),[N,j]=Object(W.a)({rankOptions:[],rank:[],tableData:[],addProductBtnLoading:!1,tableLoading:!1,direct_reseller_id:i||0,showScopePop:!1,scopePopType:"",productData:[],table_index:-1,id:"",status:"",checkedProduct:[],KeyPcType:sessionStorage.getItem("KeyPcType")}),[v,g]=Object(W.a)({code_name:"",issued:"",describe:"",date_time:"",range:"",restrict:""});Object(r.useImperativeHandle)(t,(()=>({submit:_,getModel:x,clearExchangeForm:y}))),Object(r.useEffect)((()=>{if(a&&""!==a)j({id:a.id,status:a.status}),O();else{let e=sessionStorage.getItem("knockGold_effectDate");if(e){let t=JSON.parse(e);g({date_time:[t.begin_time,t.end_time]})}}}),[]);const _=()=>{let e=!1;if(!o.current.validator())return e=!1,e;if(e=!0,!m.current.validator())return e=!1,e;if(e=!0,e){if(!(N.rank.length>0))return c.a.error("\u8bf7\u9009\u62e9\u5546\u54c1\u8303\u56f4"),!1;{let e=N.tableData.filter((e=>e.checked)),t=0;if(e.map((e=>{t+=parseInt(e.quantity)})),t{let e={id:N.id,status:N.status,title:v.code_name,describe:v.describe,begin_time:v.date_time[0],recharge_type:1,end_time:v.date_time[1],quantity:v.issued,restrict:v.restrict,range:v.range,product:{legal:[],reduce:[],cash:[]}},t=N.tableData.filter((e=>e.checked));e.product.legal=t.filter((e=>1===e.type));let i=t.filter((e=>2===e.type));const a=t.filter((e=>3===e.type));return e.product.reduce=i.map((e=>({...e.only}))),e.product.cash=a.map((e=>({...e.only}))),e},y=()=>{j({id:"",status:"",rank:[],rankOptions:[],tableData:[]}),g({code_name:"",issued:"",describe:"",range:"",restrict:""})},O=()=>{var e;g({code_name:a.title,issued:a.quantity,describe:a.describe,date_time:[a.begin_time,a.end_time],range:a.range,restrict:a.restrict});let t=a.product.legal.map((e=>({...e,type:1,upstream:"\u76f4\u8fde\u5929\u4e0b",effectDate:"-"}))),i=a.product.reduce.map((e=>q(e))),s=null===(e=a.product.cash)||void 0===e?void 0:e.map((e=>{let t=M(e);return t.only.copy=!0,t})),l=t.concat(i,s);l=Object(f.a)(l,(e=>(e.checked=!0,e)));let n=Object(f.a)(l,(e=>{let t={};return t.key=e.product_id,t.text=e.product_name,t}));j({rankOptions:n,rank:n,tableData:l})},D=()=>{N.tableData.length<=0&&(sessionStorage.setItem("productData",""),sessionStorage.setItem("knockGoldData",""),sessionStorage.setItem("redPacketsData","")),E("productData",1),E("knockGoldData",2),E("redPacketsData",3)},E=(e,t)=>{let i=N.tableData.filter((e=>e.type===t));i.length<=0?sessionStorage.setItem(e,""):sessionStorage.setItem(e,JSON.stringify(i))},V=()=>N.tableData.map((e=>Number(e.product_id))),k=e=>{try{if(N.direct_reseller_id<=0)return void c.a.error("\u8bf7\u6dfb\u52a0\u6620\u5c04\u5206\u9500\u5546");switch(D(),e){case"addKnockGold":return sessionStorage.setItem("knockGold_effectDate",JSON.stringify({begin_time:v.date_time[0],end_time:v.date_time[1]})),void j({product_title:"\u65b0\u589e\u7acb\u51cf\u91d1",scopePopType:"addKnockGold",productData:null,showScopePop:!0});case"addProduct":return void j({product_title:"\u65b0\u5efa\u5546\u54c1",scopePopType:"addProduct",checkedProduct:V(),productData:null,table_index:-1,productType:1,showScopePop:!0});case"redPackets":return sessionStorage.setItem("redPackets_effectDate",JSON.stringify({begin_time:v.date_time[0],end_time:v.date_time[1]})),void j({product_title:"\u65b0\u589e\u7ea2\u5305",scopePopType:"redPackets",productData:null,showScopePop:!0})}}catch(t){}};return Object(h.jsxDEV)("div",{className:"draw",children:[Object(h.jsxDEV)(d.a,{style:{width:"95%",margin:"10px auto"},title:"\u57fa\u672c\u4fe1\u606f",children:Object(h.jsxDEV)("div",{className:"addcode",children:Object(h.jsxDEV)(l.a,{model:v,rules:os,ref:o,className:"addform",children:[Object(h.jsxDEV)(s.a,{labelname:"\u5151\u6362\u7801\u540d\u79f0",prop:"code_name",id:"code_name",children:Object(h.jsxDEV)(n.a,{onChange:e=>{g({code_name:e})},onClearItem:e=>{g({code_name:""})},value:v.code_name,placeholder:"\u8bf7\u8f93\u5165\u5151\u6362\u7801\u540d\u79f0",labelWidth:"0px",maxLength:10,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:ss,lineNumber:588,columnNumber:15},void 0)},void 0,!1,{fileName:ss,lineNumber:587,columnNumber:13},void 0),Object(h.jsxDEV)(s.a,{labelname:"\u53d1\u653e\u603b\u91cf",prop:"issued",id:"issued",children:Object(h.jsxDEV)(n.a,{onChange:e=>{g({issued:e})},onClearItem:e=>{g({issued:""})},unit:"\u6761",countShow:!1,value:v.issued,placeholder:"\u8bf7\u8f93\u5165\u53d1\u653e\u603b\u91cf",labelWidth:"0px",maxLength:12,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:ss,lineNumber:605,columnNumber:15},void 0)},void 0,!1,{fileName:ss,lineNumber:604,columnNumber:13},void 0),Object(h.jsxDEV)(s.a,{labelname:"\u4f7f\u7528\u8bf4\u660e",prop:"describe",id:"describe",required:!1,children:Object(h.jsxDEV)(Di.a,{type:"textarea",autoSize:!0,width:"520px",maxLength:100,maxCharacterCount:100,showCount:!0,value:v.describe,onChange:e=>{g({describe:e.target.value})}},void 0,!1,{fileName:ss,lineNumber:624,columnNumber:15},void 0)},void 0,!1,{fileName:ss,lineNumber:623,columnNumber:13},void 0)]},void 0,!0,{fileName:ss,lineNumber:586,columnNumber:11},void 0)},void 0,!1,{fileName:ss,lineNumber:585,columnNumber:9},void 0)},void 0,!1,{fileName:ss,lineNumber:581,columnNumber:7},void 0),Object(h.jsxDEV)(d.a,{style:{width:"95%",margin:"10px auto"},title:"\u57fa\u672c\u89c4\u5219",children:[Object(h.jsxDEV)("div",{children:Object(h.jsxDEV)(l.a,{model:v,rules:rs,ref:m,className:"addform",children:[Object(h.jsxDEV)(s.a,{labelname:"\u751f\u6548\u65f6\u95f4\u6bb5",prop:"date_time",id:"date_time",children:Object(h.jsxDEV)(ee.a,{className:"zent-datepicker-plan",showTime:{format:"HH:mm:ss",defaultTime:["00:00:00","23:59:59"]},format:"YYYY-MM-DD HH:mm:ss",value:v.date_time,onChange:e=>{g({date_time:e})},disabledTime:(e,t)=>{let i=JSON.parse(sessionStorage.getItem("knockGold_effectDate"));const a=new Date(i.begin_time),s=a.getHours(),l=a.getMinutes(),n=a.getSeconds();return Object(R.a)(e,a)?{disabledHours:()=>ls(s),disabledMinutes:e=>e===s?ls(l):[],disabledSeconds:(e,t)=>e===s&&t===l?ls(n):[]}:{}},disabledDate:(e,t)=>{let i=JSON.parse(sessionStorage.getItem("knockGold_effectDate")),a=!1,s=Y()(e).format("YYYY-MM-DD HH:mm:ss");const l=Y()(i.end_time).format("HH:mm:ss");return"start"==t&&(a=l<"23:59:59"?Y()(s).isBefore(i.begin_time)||Y()(s).subtract(1,"days").isAfter(i.end_time):Y()(s).isBefore(i.begin_time)||Y()(s).isAfter(i.end_time)),"end"==t&&(a=Y()(s).add(1,"days").isBefore(i.begin_time)||Y()(s).isAfter(i.end_time)),a}},void 0,!1,{fileName:ss,lineNumber:645,columnNumber:15},void 0)},void 0,!1,{fileName:ss,lineNumber:644,columnNumber:13},void 0),Object(h.jsxDEV)(s.a,{labelname:"\u5546\u54c1\u8303\u56f4",prop:"rank",id:"rank",children:Object(h.jsxDEV)("div",{className:"goods-boxs",children:[Object(h.jsxDEV)(X.a,{options:N.rankOptions,multiple:!0,value:N.rank,placeholder:"\u9009\u62e9\u4e00\u9879",width:405,onChange:e=>{(e=>{let t=N.tableData.map((t=>(t.checked=e.findIndex((e=>e.key==t.product_id))>-1,t)));j({tableData:t,rank:e})})(e)}},void 0,!1,{fileName:ss,lineNumber:662,columnNumber:17},void 0),Object(h.jsxDEV)(u.a,{type:"primary",style:{marginLeft:"20px"},loading:N.addProductBtnLoading,disabled:1===e.isSettlement&&e.settlementData&&(8===e.settlementData.key||9===e.settlementData.key),onClick:()=>{k("addProduct")},children:"\u65b0\u5efa\u5546\u54c1"},void 0,!1,{fileName:ss,lineNumber:672,columnNumber:17},void 0),Object(h.jsxDEV)(u.a,{type:"primary",style:{marginLeft:"20px"},onClick:()=>{k("addKnockGold")},disabled:!JSON.parse(sessionStorage.getItem("isEarlyWarningMan"))||1===e.isSettlement&&e.settlementData&&7===e.settlementData.key,children:"\u65b0\u5efa\u7acb\u51cf\u91d1"},void 0,!1,{fileName:ss,lineNumber:687,columnNumber:17},void 0),Object(h.jsxDEV)(u.a,{type:"primary",style:{marginLeft:"20px"},onClick:()=>{k("redPackets")},disabled:!JSON.parse(sessionStorage.getItem("isEarlyWarningMan"))||1===e.isSettlement&&e.settlementData&&(7===e.settlementData.key||8===e.settlementData.key),children:"\u65b0\u5efa\u7ea2\u5305"},void 0,!1,{fileName:ss,lineNumber:702,columnNumber:17},void 0)]},void 0,!0,{fileName:ss,lineNumber:661,columnNumber:15},void 0)},void 0,!1,{fileName:ss,lineNumber:660,columnNumber:13},void 0)]},void 0,!0,{fileName:ss,lineNumber:643,columnNumber:11},void 0)},void 0,!1,{fileName:ss,lineNumber:642,columnNumber:9},void 0),Object(h.jsxDEV)(s.a,{labelname:"",prop:"range",id:"range",children:Object(h.jsxDEV)(vt.a,{loading:N.tableLoading,iconSize:16,textSize:12,icon:"circle",iconText:"\u52a0\u8f7d\u4e2d",children:Object(h.jsxDEV)(I,{headBackgroud:"#f9fafc",isBorder:!0,spliteColor:"#fff",tableData:N.tableData,Column:ns,countbarVisible:!1,maxheight:N.tableHeight,isSwitch:!1,isShowPageBar:!1,page:N.page,ref:b,dataCount:N.dataCount,emptyText:"\u62b1\u6b49\uff0c\u6682\u65e0\u76f8\u5173\u6570\u636e\u8bb0\u5f55",checkChange:e=>(e=>{let t=[];Object(f.a)(e,(e=>{let i={};return i.key=e.product_id,i.text=e.product_name,t.push(i),i})),j({rank:t})})(e),ComponentHandler:(e,t,i)=>"opearo"===e?Object(h.jsxDEV)("div",{children:Object(h.jsxDEV)("span",{className:"grid-link",onClick:()=>((e,t)=>{try{if(N.direct_reseller_id<=0)return void c.a.error("\u8bf7\u6dfb\u52a0\u6620\u5c04\u5206\u9500\u5546");if(D(),1===e.type){j({product_title:"\u7f16\u8f91\u5546\u54c1",scopePopType:"addProduct",checkedProduct:V(),table_index:t,productType:e.product_type});let i=sessionStorage.getItem("plan_status");"2"!==N.KeyPcType&&"0"!==i||delete e.code_batch_id,j({productData:e,showScopePop:!0})}else if(2===e.type){let i=e.only;"2"===N.KeyPcType&&delete i.id,j({product_title:"\u7f16\u8f91\u7acb\u51cf\u91d1",productData:i,scopePopType:"addKnockGold",showScopePop:!0,table_index:t})}else{let i=e.only;"2"===N.KeyPcType&&delete i.id,j({product_title:"\u7f16\u8f91\u7ea2\u5305",productData:i,scopePopType:"redPackets",showScopePop:!0,table_index:t})}}catch(i){}})(t,i),children:"\u7f16\u8f91"},void 0,!1,{fileName:ss,lineNumber:748,columnNumber:23},void 0)},void 0,!1,{fileName:ss,lineNumber:747,columnNumber:21},void 0):"type"===e?Object(h.jsxDEV)("span",{children:1===t.type?"\u5546\u54c1":3===t.type?"2"===t.only.cash_amount_type?"\u968f\u673a\u7ea2\u5305":"\u56fa\u989d\u7ea2\u5305":"\u7acb\u51cf\u91d1"},void 0,!1,{fileName:ss,lineNumber:759,columnNumber:21},void 0):"cost_price"===e?Object(h.jsxDEV)(h.Fragment,{children:2===t.type?t.official_price:t.cost_price},void 0,!1):void 0},void 0,!1,{fileName:ss,lineNumber:729,columnNumber:13},void 0)},void 0,!1,{fileName:ss,lineNumber:722,columnNumber:11},void 0)},void 0,!1,{fileName:ss,lineNumber:721,columnNumber:9},void 0)]},void 0,!0,{fileName:ss,lineNumber:641,columnNumber:7},void 0),Object(h.jsxDEV)(Ot,{ref:p,product_title:N.product_title,drawerVisible:N.showScopePop,type:N.scopePopType,productData:N.productData,onClose:()=>{j({showScopePop:!1})},tableData:N.tableData,checkedProduct:N.checkedProduct,table_index:N.table_index,directResellerId:N.direct_reseller_id,productType:N.productType,submit:e=>(e=>{try{let t=e,i=[];t.map((e=>{let t={};t.key=e.product_id,t.text=e.product_name,i.push(t)}));let a=[];t.map((e=>{let t={};e.checked&&(t.key=e.product_id,t.text=e.product_name,a.push(t))})),j({tableData:t,rankOptions:i,rank:a})}catch(t){}})(e),isSettlement:e.isSettlement,settlementData:e.settlementData},void 0,!1,{fileName:ss,lineNumber:779,columnNumber:7},void 0)]},void 0,!0,{fileName:ss,lineNumber:580,columnNumber:5},void 0)}));const cs=[{title:"\u5546\u54c1ID",name:"product_id",prop:"product_id",width:"auto",type:"normal"},{title:"\u5546\u54c1\u540d\u79f0",width:"auto",prop:"product_name",name:"product_name",type:"normal"},{title:"\u5e73\u53f0\u6279\u6b21\u53f7",width:"250px",prop:"channel_activity_id",name:"channel_activity_id",type:"normal"},{title:"\u7c7b\u578b",width:"auto",prop:"type",name:"type",type:"slot"},{title:"\u4e0a\u6e38\u5e73\u53f0",width:"auto",prop:"upstream",name:"upstream",type:"normal"},{title:"\u6709\u6548\u65f6\u95f4\u6bb5",width:"300px",prop:"effectDate",name:"effectDate",type:"slot"},{title:"\u603b\u9884\u7b97",prop:"all_budget",name:"all_budget",width:"auto",type:"normal"},{title:"\u5f53\u524d\u6210\u672c\u4ef7\u683c",prop:"cost_price",name:"cost_price",width:"200px",type:"slot"},{title:"\u5408\u540c\u4ef7",name:"contract_price",prop:"contract_price",type:"normal",width:"auto"},{title:"\u5546\u54c1\u5b98\u65b9\u4ef7",type:"normal",prop:"official_price",width:"auto"},{title:"\u5355\u6b21\u5230\u8d26",type:"normal",prop:"send_num",width:"auto"},{title:"\u5e93\u5b58",type:"normal",prop:"quantity",width:"auto"},{title:"\u64cd\u4f5c",prop:"opearo",name:"opearo",type:"slot",width:"auto"}],ds={code_name:[{type:"required",message:"\u8bf7\u8f93\u5165\u5151\u6362\u7801\u540d\u79f0"}],quantity:[{type:"required",message:"\u8bf7\u8f93\u5165\u53d1\u653e\u603b\u91cf"},{type:"regExp",message:"\u8bf7\u8f93\u5165\u6b63\u6574\u6570",reg:"^([1-9][0-9]*){1,3}$"}]},us={date_time:[{type:"required",message:"\u8bf7\u9009\u62e9\u751f\u6548\u65f6\u95f4\u6bb5"}],timer:[{type:"required",message:"\u8bf7\u9009\u62e9\u9886\u53d6\u65f6\u95f4\u6bb5"}],rank:[{type:"required",message:"\u8bf7\u9009\u62e9\u5546\u54c1\u8303\u56f4"}]};var hs="/Users/zhangds/web/blue-brother/frontend/src/components/combining/index.jsx";function bs(e){return Array.from({length:e},((e,t)=>t))}var ps=Object(r.forwardRef)(((e,t)=>{const{propsData:i}=e,o=Object(r.useRef)(null),m=Object(r.useRef)(null),b=Object(r.useRef)(null),p=Object(r.useRef)(null),[N,j]=Object(W.a)(x()),[v,g]=Object(W.a)(y()),_=()=>{j(x()),g(y())};function x(){return{rankOptions:[],rank:[],tableData:[],productData:null,visible:!1,keyPcType:Number(sessionStorage.getItem("KeyPcType"))||0}}function y(){return{instruction:z,code_name:"",quantity:"",date_time:[],channel:"1",receive_mode:1,timer_type:1,timer:[],group_cover:"",group_image:[],instructionType:1,is_webview:0,timer_show:1}}function O(){let e=!1;if(!o.current.validator())return e=!1,e;if(e=!0,!m.current.validator())return e=!1,e;if(e=!0,e){if(!(N.rank.length>0))return c.a.error("\u8bf7\u9009\u62e9\u5546\u54c1\u8303\u56f4"),!1;{let e=N.tableData.filter((e=>e.checked)),t=!1;if(e.map((e=>{e.quantitye.checked));return e.product.reduce=t.map((e=>({...e.origin}))),e}Object(r.useEffect)((()=>{i&&""!==i?function(){let e=i.product.reduce.map((e=>{const t=q(e);return t.origin=t.only,t.send_num=e.send_num,t.checked=!0,2==N.keyPcType&&delete e.id,t})),t=Object(f.a)(e,(e=>{let t={};return t.key=e.product_id,t.text=e.product_name,t.checked=!0,t}));j({rankOptions:t,rank:t,tableData:e});const{quantity:a,group_info:s,title:l,begin_time:n,end_time:o}=i,{channel:r,receive_mode:m,instruction:c,group_image:d,time_limit:u,is_webview:h,timer_show:b}=s;g({quantity:a,is_webview:Number(h)||0,timer_show:Number(b)||1,instructionType:Number(s.instructionType)||1,code_name:l,date_time:[n,o],channel:r,receive_mode:Number(m),instruction:c,timer_type:u.receive_time.start_time?2:1,group_image:d?[{id:(new Date).getTime(),src:d,name:"\u5546\u54c1\u63cf\u8ff0"}]:[],timer:[u.receive_time.start_time,u.receive_time.end_time]}),sessionStorage.setItem("knockGoldData",JSON.stringify(i.product.reduce))}():sessionStorage.setItem("knockGoldData",JSON.stringify([]))}),[]),Object(r.useImperativeHandle)(t,(()=>({submit:O,getModel:D,clearExchangeForm:_})));const E=e=>{e.length>0?(e=>new Promise(((t,i)=>{try{let s=new FormData;s.append("file",e),s.append("path","common_image"),Object(a.cd)(s).then((e=>{Object(a.Tb)(e,((e,i)=>{t(e.path)}),(e=>{c.a.error(e),i(e)}))}))}catch(s){i(s)}})))(e[0].file).then((t=>{g({group_image:[{src:t,id:`${(new Date).getTime()}-0`,name:e[0].file.name}]})})):g({group_image:[]})};return Object(h.jsxDEV)("div",{className:"combiningCommon",children:[Object(h.jsxDEV)(d.a,{className:"card1",title:"\u57fa\u672c\u4fe1\u606f",children:[Object(h.jsxDEV)("div",{className:"addcode",children:Object(h.jsxDEV)(l.a,{model:v,rules:ds,ref:o,className:"addform",children:[Object(h.jsxDEV)(s.a,{labelname:"\u53d1\u653e\u6e20\u9053",prop:"channel",id:"type",children:Object(h.jsxDEV)(Q.a,{disabled:!!N.tableData.length&&2!==N.keyPcType,onChange:({target:e})=>{g({channel:e.value,is_webview:0}),"3"===e.value?g({receive_mode:2}):g({receive_mode:1}),"1"===e.value?g({instruction:z}):"2"===e.value?g({instruction:A}):g({instruction:J}),2===N.keyPcType&&(j({rankOptions:[],rank:[],tableData:[]}),sessionStorage.setItem("knockGoldData",JSON.stringify([])))},value:v.channel,children:Object(h.jsxDEV)(Ei.a,{trigger:"hover",content:"\u53ea\u80fd\u7ec4\u5408\u540c\u4e00\u79cd\u6e20\u9053\u7acb\u51cf\u91d1",children:[Object(h.jsxDEV)(ne.a,{value:"1",children:"\u652f\u4ed8\u5b9d"},void 0,!1,{fileName:hs,lineNumber:445,columnNumber:19},void 0),Object(h.jsxDEV)(ne.a,{value:"2",children:"\u5fae\u4fe1"},void 0,!1,{fileName:hs,lineNumber:446,columnNumber:19},void 0),Object(h.jsxDEV)(ne.a,{value:"3",children:"\u4e91\u95ea\u4ed8"},void 0,!1,{fileName:hs,lineNumber:447,columnNumber:19},void 0)]},void 0,!0,{fileName:hs,lineNumber:444,columnNumber:17},void 0)},void 0,!1,{fileName:hs,lineNumber:421,columnNumber:15},void 0)},void 0,!1,{fileName:hs,lineNumber:420,columnNumber:13},void 0),2==v.channel?Object(h.jsxDEV)(s.a,{labelname:"\u6253\u5f00\u65b9\u5f0f",prop:"is_webview",id:"is_webview",children:Object(h.jsxDEV)(Q.a,{onChange:({target:e})=>{g({is_webview:e.value})},value:v.is_webview,children:[Object(h.jsxDEV)(ne.a,{value:0,children:"\u5c0f\u7a0b\u5e8f"},void 0,!1,{fileName:hs,lineNumber:459,columnNumber:19},void 0),Object(h.jsxDEV)(ne.a,{value:1,children:"\u516c\u4f17\u53f7"},void 0,!1,{fileName:hs,lineNumber:460,columnNumber:19},void 0)]},void 0,!0,{fileName:hs,lineNumber:453,columnNumber:17},void 0)},"is_webview",!1,{fileName:hs,lineNumber:452,columnNumber:15},void 0):null,1==v.channel?Object(h.jsxDEV)(s.a,{labelname:"\u9886\u53d6\u65b9\u5f0f",prop:"receive_mode",id:"receive_mode",children:Object(h.jsxDEV)(Q.a,{disabled:!!N.tableData.length&&2!==N.keyPcType,onChange:({target:e})=>{g({receive_mode:e.value}),2===N.keyPcType&&(j({rankOptions:[],rank:[],tableData:[]}),sessionStorage.setItem("knockGoldData",JSON.stringify([])))},value:v.receive_mode,children:Object(h.jsxDEV)(Ei.a,{trigger:"hover",content:"\u53ea\u80fd\u7ec4\u5408\u540c\u4e00\u79cd\u9886\u53d6\u65b9\u5f0f\u7acb\u51cf\u91d1",children:[Object(h.jsxDEV)(ne.a,{value:1,children:"\u5b98\u65b9\u9886\u53d6"},void 0,!1,{fileName:hs,lineNumber:478,columnNumber:21},void 0),Object(h.jsxDEV)(ne.a,{value:2,children:"\u8d26\u53f7\u9886\u53d6"},void 0,!1,{fileName:hs,lineNumber:479,columnNumber:21},void 0)]},void 0,!0,{fileName:hs,lineNumber:477,columnNumber:19},void 0)},void 0,!1,{fileName:hs,lineNumber:466,columnNumber:17},void 0)},void 0,!1,{fileName:hs,lineNumber:465,columnNumber:15},void 0):null,Object(h.jsxDEV)(s.a,{labelname:"\u7ec4\u5408\u5546\u54c1\u540d\u79f0",prop:"code_name",id:"code_name",children:Object(h.jsxDEV)(n.a,{onChange:e=>{g({code_name:e})},onClearItem:e=>{g({code_name:""})},value:v.code_name,placeholder:"\u8bf7\u8f93\u5165\u7ec4\u5408\u5546\u54c1\u540d\u79f0",labelWidth:"0px",maxLength:10,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:hs,lineNumber:485,columnNumber:15},void 0)},void 0,!1,{fileName:hs,lineNumber:484,columnNumber:13},void 0),Object(h.jsxDEV)(s.a,{labelname:"\u53d1\u653e\u603b\u91cf",prop:"quantity",id:"quantity",children:Object(h.jsxDEV)(n.a,{onChange:e=>{g({quantity:e})},onClearItem:e=>{g({quantity:""})},unit:"\u6761",countShow:!1,value:v.quantity,placeholder:"\u8bf7\u8f93\u5165\u53d1\u653e\u603b\u91cf",labelWidth:"0px",maxLength:12,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:hs,lineNumber:502,columnNumber:15},void 0)},void 0,!1,{fileName:hs,lineNumber:501,columnNumber:13},void 0),Object(h.jsxDEV)(s.a,{labelname:"\u63cf\u8ff0\u7c7b\u578b",prop:"instructionType",id:"instructionType",children:Object(h.jsxDEV)(Q.a,{onChange:({target:e})=>{g({instructionType:e.value})},value:v.instructionType,children:[Object(h.jsxDEV)(ne.a,{value:1,children:"\u6587\u5b57\u63cf\u8ff0"},void 0,!1,{fileName:hs,lineNumber:527,columnNumber:17},void 0),Object(h.jsxDEV)(ne.a,{value:2,children:"\u56fe\u7247\u63cf\u8ff0"},void 0,!1,{fileName:hs,lineNumber:528,columnNumber:17},void 0)]},void 0,!0,{fileName:hs,lineNumber:521,columnNumber:15},void 0)},void 0,!1,{fileName:hs,lineNumber:520,columnNumber:13},void 0),2===v.instructionType?Object(h.jsxDEV)(s.a,{prop:"group_image",labelname:"\u5546\u54c1\u63cf\u8ff0",id:"group_image",required:"",children:Object(h.jsxDEV)(gt.a,{className:"good-image-upload-demo",maxSize:5242880,tips:"\u56fe\u7247\u4e0d\u8d85\u8fc7 5M",maxAmount:1,onError:(e,t)=>{"overMaxAmount"===e?c.a.error(`\u6700\u591a\u53ef\u4e0a\u4f20 ${t.maxAmount} \u5f20\u56fe\u7247`):"overMaxSize"===e&&c.a.error(`\u56fe\u7247\u5927\u5c0f\u4e0d\u80fd\u8d85\u8fc7 ${t.formattedMaxSize}`)},onChange:(e,t)=>{E(e)},sortable:!0,fileList:v.group_image,multiple:!0},void 0,!1,{fileName:hs,lineNumber:533,columnNumber:17},void 0)},void 0,!1,{fileName:hs,lineNumber:532,columnNumber:15},void 0):Object(h.jsxDEV)(s.a,{labelname:"\u4f7f\u7528\u8bf4\u660e",prop:"instruction",id:"instruction",required:!1,children:Object(h.jsxDEV)(Wi,{pageType:"detaileditor",setEdittext:e=>{g({instruction:e})},width:"520px",text:v.instruction,limitLength:5e3},v.channel,!1,{fileName:hs,lineNumber:549,columnNumber:17},void 0)},void 0,!1,{fileName:hs,lineNumber:548,columnNumber:15},void 0)]},void 0,!0,{fileName:hs,lineNumber:419,columnNumber:11},void 0)},void 0,!1,{fileName:hs,lineNumber:418,columnNumber:9},void 0),Object(h.jsxDEV)(Yi,{data:v,products:N.tableData},void 0,!1,{fileName:hs,lineNumber:563,columnNumber:9},void 0)]},void 0,!0,{fileName:hs,lineNumber:417,columnNumber:7},void 0),Object(h.jsxDEV)(d.a,{style:{width:"95%",margin:"10px auto"},title:"\u57fa\u672c\u89c4\u5219",children:[Object(h.jsxDEV)("div",{children:Object(h.jsxDEV)(l.a,{model:v,rules:us,ref:m,className:"addform",children:[Object(h.jsxDEV)(s.a,{labelname:"\u751f\u6548\u65f6\u95f4\u6bb5",prop:"date_time",id:"date_time",children:[Object(h.jsxDEV)(ee.a,{className:"zent-datepicker-plan",showTime:{format:"HH:mm:ss",defaultTime:["00:00:00","23:59:59"]},format:"YYYY-MM-DD HH:mm:ss",value:v.date_time,onChange:e=>{g({date_time:e}),N.tableData.map((t=>{t.origin.time_limit.effect_time.start_time=e[0],t.origin.time_limit.effect_time.end_time=e[1],t.only.time_limit.effect_time.start_time=e[0],t.only.time_limit.effect_time.end_time=e[1]}))},disabledTime:function(e,t){let i=JSON.parse(sessionStorage.getItem("plan_item"));const a=new Date(i.begin_time),s=a.getHours(),l=a.getMinutes(),n=a.getSeconds();return Object(R.a)(e,a)?{disabledHours:()=>bs(s),disabledMinutes:e=>e===s?bs(l):[],disabledSeconds:(e,t)=>e===s&&t===l?bs(n):[]}:{}},disabledDate:function(e,t){let i=JSON.parse(sessionStorage.getItem("plan_item")),a=!1,s=Y()(e).format("YYYY-MM-DD HH:mm:ss");const l=Y()(i.end_time).format("HH:mm:ss");return"start"==t&&(a=l<"23:59:59"?Y()(s).isBefore(i.begin_time)||Y()(s).subtract(1,"days").isAfter(i.end_time):Y()(s).isBefore(i.begin_time)||Y()(s).isAfter(i.end_time)),"end"==t&&(a=Y()(s).add(1,"days").isBefore(i.begin_time)||Y()(s).isAfter(i.end_time)),a}},void 0,!1,{fileName:hs,lineNumber:570,columnNumber:15},void 0),Object(h.jsxDEV)(Q.a,{style:{marginLeft:"20px"},onChange:({target:e})=>{g({timer_show:e.value})},value:v.timer_show,children:[Object(h.jsxDEV)(ne.a,{value:1,children:"\u663e\u793a"},void 0,!1,{fileName:hs,lineNumber:597,columnNumber:17},void 0),Object(h.jsxDEV)(ne.a,{value:2,children:"\u9690\u85cf"},void 0,!1,{fileName:hs,lineNumber:598,columnNumber:17},void 0)]},void 0,!0,{fileName:hs,lineNumber:590,columnNumber:15},void 0)]},void 0,!0,{fileName:hs,lineNumber:569,columnNumber:13},void 0),2===v.timer_type?Object(h.jsxDEV)(s.a,{id:"timer",labelname:"\u9886\u53d6\u65f6\u95f4\u6bb5",prop:"timer",children:[Object(h.jsxDEV)(re.a,{className:"zent-datepicker-plan",showTime:{format:"HH:mm:ss",defaultTime:[Y()().format("HH:mm:ss"),"23:59:59"]},value:v.timer,onChange:e=>{g({timer:e})},width:"240px",disabledTime:function(e,t){let i=!1;return"end"==t&&(i=Y()(e.getTime()).add(1,"days")<=(new Date).getTime()),"start"==t&&(i=e.getTime()<=(new Date).getTime()),i}},void 0,!1,{fileName:hs,lineNumber:603,columnNumber:17},void 0),Object(h.jsxDEV)(Q.a,{style:{marginLeft:"15px"},onChange:({target:e})=>{g({timer_type:e.value}),1===e.value&&g({timer:[]})},value:v.timer_type,children:[Object(h.jsxDEV)(ne.a,{value:1,children:"\u4e0d\u8bbe\u7f6e"},void 0,!1,{fileName:hs,lineNumber:626,columnNumber:19},void 0),Object(h.jsxDEV)(ne.a,{value:2,children:"\u6bcf\u65e5"},void 0,!1,{fileName:hs,lineNumber:627,columnNumber:19},void 0)]},void 0,!0,{fileName:hs,lineNumber:616,columnNumber:17},void 0)]},void 0,!0,{fileName:hs,lineNumber:602,columnNumber:15},void 0):Object(h.jsxDEV)(s.a,{id:"timer",labelname:"\u9886\u53d6\u65f6\u95f4\u6bb5",children:Object(h.jsxDEV)(Q.a,{onChange:({target:e})=>{g({timer_type:e.value})},value:v.timer_type,children:[Object(h.jsxDEV)(ne.a,{value:1,children:"\u4e0d\u8bbe\u7f6e"},void 0,!1,{fileName:hs,lineNumber:638,columnNumber:19},void 0),Object(h.jsxDEV)(ne.a,{value:2,children:"\u6bcf\u65e5"},void 0,!1,{fileName:hs,lineNumber:639,columnNumber:19},void 0)]},void 0,!0,{fileName:hs,lineNumber:632,columnNumber:17},void 0)},void 0,!1,{fileName:hs,lineNumber:631,columnNumber:15},void 0),Object(h.jsxDEV)(s.a,{labelname:"\u5546\u54c1\u8303\u56f4",prop:"rank",id:"rank",children:Object(h.jsxDEV)("div",{className:"goods-boxs",children:[Object(h.jsxDEV)(X.a,{options:N.rankOptions,multiple:!0,value:N.rank,placeholder:"\u9009\u62e9\u4e00\u9879",width:405,onChange:e=>{!function(e){let t=N.tableData.map((t=>(t.checked=e.findIndex((e=>e.key==t.product_id))>-1,t)));j({tableData:t,rank:e})}(e)}},void 0,!1,{fileName:hs,lineNumber:645,columnNumber:17},void 0),Object(h.jsxDEV)(u.a,{type:"primary",style:{marginLeft:"20px"},onClick:()=>{!function(){if(v.date_time.filter((e=>e)).length<2)return c.a.error("\u8bf7\u5148\u9009\u62e9\u751f\u6548\u65f6\u95f4\u6bb5");sessionStorage.setItem("knockGold_effectDate",JSON.stringify({begin_time:v.date_time[0],end_time:v.date_time[1]})),j({visible:!0,productData:null})}()},children:"\u65b0\u5efa\u7acb\u51cf\u91d1"},void 0,!1,{fileName:hs,lineNumber:655,columnNumber:17},void 0)]},void 0,!0,{fileName:hs,lineNumber:644,columnNumber:15},void 0)},void 0,!1,{fileName:hs,lineNumber:643,columnNumber:13},void 0)]},void 0,!0,{fileName:hs,lineNumber:568,columnNumber:11},void 0)},void 0,!1,{fileName:hs,lineNumber:567,columnNumber:9},void 0),Object(h.jsxDEV)(s.a,{labelname:"",prop:"range",id:"range",children:Object(h.jsxDEV)(I,{headBackgroud:"#f9fafc",isBorder:!0,spliteColor:"#fff",tableData:N.tableData,Column:cs,countbarVisible:!1,maxheight:N.tableHeight,isSwitch:!1,isShowPageBar:!1,page:N.page,ref:b,dataCount:N.dataCount,emptyText:"\u62b1\u6b49\uff0c\u6682\u65e0\u76f8\u5173\u6570\u636e\u8bb0\u5f55",checkChange:e=>function(e){let t=[];Object(f.a)(e,(e=>{let i={};return i.key=e.product_id,i.text=e.product_name,t.push(i),i})),j({rank:t})}(e),ComponentHandler:(e,t,i)=>"opearo"===e?Object(h.jsxDEV)("div",{children:Object(h.jsxDEV)("span",{className:"grid-link",onClick:()=>function(e){j({visible:!0,productData:e.origin})}(t),children:"\u7f16\u8f91"},void 0,!1,{fileName:hs,lineNumber:688,columnNumber:21},void 0)},void 0,!1,{fileName:hs,lineNumber:687,columnNumber:19},void 0):"cost_price"===e?Object(h.jsxDEV)(h.Fragment,{children:2===t.type?t.official_price:t.cost_price},void 0,!1):"type"===e?Object(h.jsxDEV)(h.Fragment,{children:"\u7acb\u51cf\u91d1"},void 0,!1):"effectDate"==e?Object(h.jsxDEV)(h.Fragment,{children:[v.date_time[0]," \u81f3 ",v.date_time[1]]},void 0,!0):void 0},void 0,!1,{fileName:hs,lineNumber:669,columnNumber:11},void 0)},void 0,!1,{fileName:hs,lineNumber:668,columnNumber:9},void 0)]},void 0,!0,{fileName:hs,lineNumber:566,columnNumber:7},void 0),Object(h.jsxDEV)(bt.a,{className:"draw",width:"86%",title:"\u65b0\u5efa\u7acb\u51cf\u91d1",footer:Object(h.jsxDEV)("div",{style:{textAlign:"center"},children:[Object(h.jsxDEV)(u.a,{type:"primary",onClick:async function(){if(await p.current.submit()){const e=JSON.parse(sessionStorage.getItem("knockGoldData")).map((e=>{const t=q(e);return t.origin=t.only,t.send_num=e.send_num,t.checked=!0,t}));let t=Object(f.a)(e,(e=>{let t={};return t.key=e.product_id,t.text=e.product_name,t.checked=!0,t}));j({visible:!1,tableData:e,rank:t,rankOptions:t})}},children:"\u63d0\u4ea4"},void 0,!1,{fileName:hs,lineNumber:717,columnNumber:13},void 0),Object(h.jsxDEV)(u.a,{onClick:e=>{j({visible:!1})},children:"\u53d6\u6d88"},void 0,!1,{fileName:hs,lineNumber:720,columnNumber:13},void 0)]},void 0,!0,{fileName:hs,lineNumber:716,columnNumber:11},void 0),visible:N.visible,onClose:e=>{j({visible:!1})},maskClosable:!1,children:Object(h.jsxDEV)("div",{className:"draw2",children:Object(h.jsxDEV)(d.a,{style:{width:"95%",margin:"10px auto",border:0},children:Object(h.jsxDEV)(qe,{ref:p,data:N.productData,combining:v},void 0,!1,{fileName:hs,lineNumber:737,columnNumber:13},void 0)},void 0,!1,{fileName:hs,lineNumber:736,columnNumber:11},void 0)},void 0,!1,{fileName:hs,lineNumber:735,columnNumber:9},void 0)},void 0,!1,{fileName:hs,lineNumber:711,columnNumber:7},void 0)]},void 0,!0,{fileName:hs,lineNumber:416,columnNumber:5},void 0)})),Ns=(i(250),"/Users/zhangds/web/blue-brother/frontend/src/pages/plan/add/step2.js");const js=e=>Array.from({length:e},((e,t)=>t)),vs=[{title:"\u884c\u53f7",name:"line",prop:"line",width:"30px",type:"normal"},{title:"\u624b\u673a\u53f7",width:"80px",prop:"mobile",name:"mobile",type:"normal"},{title:"\u9519\u8bef\u539f\u56e0",width:"80px",prop:"tips",name:"tips",type:"normal"},{title:"\u662f\u5426\u5bfc\u5165",width:"50px",prop:"is_import",name:"is_import",type:"slot"}];class gs extends m.a.Component{constructor(e){super(e),this.onCheckChange=({target:e})=>{sessionStorage.setItem("keyType",e.value),this.props.setKeyType(e.value),this.props.getStep3Theme&&this.props.getStep3Theme()},this.onDisabledCombinedDate=e=>{let t=JSON.parse(sessionStorage.getItem("step1")),i=Y()(e).format("YYYY-MM-DD HH:mm:ss");return!Y()(i).isBetween(t.begin_time,t.end_time,null,"(]")},this.onDisabledTime=(e,t)=>{const i=new Date,a=i.getHours(),s=i.getMinutes(),l=i.getSeconds();return Object(R.a)(e,i)?{disabledHours:()=>js(a),disabledMinutes:e=>e===a?js(s):[],disabledSeconds:(e,t)=>e===a&&t===s?js(l):[]}:{}},this.onDisabledRange=(e,t)=>{let i=JSON.parse(sessionStorage.getItem("knockGold_effectDate")),a=!1,s=Y()(e).format("YYYY-MM-DD HH:mm:ss"),l=Y()(i.end_time).format("HH:mm:ss");return"start"==t&&(a=l<"23:59:59"?Y()(s).isBefore(i.begin_time)||Y()(s).subtract(1,"days").isAfter(i.end_time):Y()(s).isBefore(i.begin_time)||Y()(s).isAfter(i.end_time)),"end"==t&&(a=Y()(s).add(1,"days").isBefore(i.begin_time)||Y()(s).isAfter(i.end_time)),a},this.onUpload=(e,t)=>new Promise(((i,s)=>{let l="",n=new FormData;n.append("file",e),n.append("path","common_image"),Object(a.cd)(n).then((e=>{Object(a.Tb)(e,((e,t)=>{l=e.path}),(e=>{s()}))}));let o=0;const r=()=>{l?i(l):o<100?(o+=2,t(o),setTimeout(r,500)):s()};setTimeout(r,500)})),this.onUploadError=(e,t)=>{"overMaxAmount"===e?c.a.error(`\u6700\u591a\u53ef\u4e0a\u4f20 ${t.maxAmount} \u5f20\u56fe\u7247`):"overMaxSize"===e&&c.a.error(`\u56fe\u7247\u5927\u5c0f\u4e0d\u80fd\u8d85\u8fc7 ${t.formattedMaxSize}`)},this.clearTableData=()=>{this.setState({distdata:[],couponData:[]})},this.state={model:{style:1,quantity:0,allow_repetition:0,allow_loss:0,merge_stock:1,code_batch:"",draw_title:"",batch_name:"",key_official_price:"",key_cost_price:"",expiration_type:"1",expiration_value:""},drawerVisible:!1,drawerVisible2:!1,exchangeType:1,productData:[],codeInfo:{code_name:"",issued:"",describe:"",date_time:"",range:""},rank:null,rankoptions:[],tempdata:[],distdata:[],couponData:[],column_distdata:[],exceldata:[],oldData:null,uploading:!1,rowIndex:-1,isload:!!e.isload&&e.isload,import_visible:!1,white_visible:!1,success_visible:!1,fail_visible:!1,file_loading:!1,upload_visible:!1,excel_visible:!1,accessVerify:!1,mobile_excel:"",mobile_repeat:[],execel_path:"",excel_count:0,success_count:0,error_count:0,whiteStyle:!1,import_success:!1,product_title:"\u65b0\u5efa\u5546\u54c1",newGoodsBtnLoading:!1,newGoldLoading:!1,direct_reseller_id:0,tableLoading:!1,isCopy:!!e.isCopy,rowCouponData:"",rowExchangeData:"",Column:[{title:"\u5151\u6362\u540d\u79f0",name:"title",prop:"title",type:"normal",width:"auto"},{title:"\u5151\u6362\u7801\u8303\u56f4",prop:"product",name:"product",width:"auto",type:"slot"},{title:"\u6709\u6548\u5f00\u59cb\u65e5\u671f",prop:"begin_time",name:"begin_time",width:"auto",type:"normal"},{title:"\u6709\u6548\u7ed3\u675f\u65e5\u671f",name:"end_time",prop:"end_time",type:"normal",width:"auto"},{title:"\u5151\u6362\u7801\u6570\u91cf",name:"quantity",type:"normal",prop:"quantity",defaultText:"PM",width:"auto"},{title:"\u7ed1\u5b9a\u6570",prop:"restrict",name:"restrict",type:"slot",width:"auto"},{title:"\u64cd\u4f5c",prop:"edit",name:"edit",type:"slot",width:"auto"}],Column_coupon:[{title:"\u4f18\u60e0\u5238\u540d\u79f0",name:"title",prop:"title",type:"normal",width:"auto"},{title:"\u4f18\u60e0\u5238\u8303\u56f4",prop:"product",name:"product",width:"auto",type:"slot"},{title:"\u6709\u6548\u5f00\u59cb\u65e5\u671f",prop:"begin_time",name:"begin_time",width:"auto",type:"normal"},{title:"\u6709\u6548\u7ed3\u675f\u65e5\u671f",name:"end_time",prop:"end_time",type:"normal",width:"auto"},{title:"\u4f18\u60e0\u5238\u6570\u91cf",name:"quantity",type:"normal",prop:"quantity",defaultText:"PM",width:"auto"},{title:"\u7ed1\u5b9a\u6570",prop:"restrict",name:"restrict",type:"slot",width:"auto"},{title:"\u64cd\u4f5c",prop:"edit",name:"edit",type:"slot",width:"auto"}]}}componentDidMount(e){if(N.a.findDOMNode(this).getElementsByClassName("form-Item")[1].getElementsByTagName("input")[0].focus(),this.props.name>0){let e=this.state.model;e.style=this.props.keyStyle,this.setState({whiteStyle:this.props.whiteStyle,white_visible:this.props.whiteStyle,model:e})}}submit(){if(1===this.props.keyType){if(this.refs.form1.validator()){const e=this.refs.tempdata.getSelectData();let t={};return t.batch_name=this.state.model.batch_name,t.style=this.state.model.style,t.quantity=this.state.model.quantity,t.bind_object=[this.props.keyType],t.allow_repetition=this.state.model.allow_repetition,t.allow_loss=this.state.model.allow_loss,t.merge_stock=this.state.model.merge_stock,t.code_batch=e,t.mobile_excel=this.state.mobile_excel,t.mobile_repeat=this.state.mobile_repeat,t.key_official_price=this.state.model.key_official_price,t.key_cost_price=this.state.model.key_cost_price,t.expiration_conf={expiration_type:this.state.model.expiration_type,expiration_value:this.state.model.expiration_value},t}}else if(this.refs.form1.validator()){let e=this.state.couponData.filter((e=>e.checked)),t={};t.batch_name=this.state.model.batch_name,t.style=this.state.model.style,t.quantity=this.state.model.quantity,t.bind_object=[this.props.keyType],t.allow_repetition=this.state.model.allow_repetition,t.allow_loss=this.state.model.allow_loss,t.merge_stock=this.state.model.merge_stock,t.coupon=e,t.mobile_excel=this.state.mobile_excel,t.mobile_repeat=this.state.mobile_repeat,t.expiration_conf={expiration_type:this.state.model.expiration_type,expiration_value:this.state.model.expiration_value};for(let i=0;i{this.refs.addEditExchangeEl.clearExchangeForm()}),300);break;case 1:this.setState({draw_title:"\u65b0\u5efa\u4f18\u60e0\u5238"}),setTimeout((()=>{this.refs.addEditCouponEl.clearCouponForm()}),300);break;case 2:this.setState({draw_title:"\u65b0\u5efa\u7ec4\u5408\u5546\u54c1",exchangeType:2,rowExchangeData:null}),setTimeout((()=>{this.refs.addEditExchangeEl.clearExchangeForm()}),300)}this.setState({drawerVisible:!0,rowIndex:-1})}closeDraw(){2===this.props.keyType&&setTimeout((()=>{this.refs.addEditCouponEl.clearCouponForm()}),300),1===this.props.keyType&&setTimeout((()=>{this.refs.addEditExchangeEl.clearExchangeForm()}),300),this.setState({drawerVisible:!1})}getProductInfoSelectData(e){return new Promise(((t,i)=>{let s={reseller_id:e};Object(a.tb)(s).then((e=>{200===e.code?t(e.data.data):i([])}))}))}addProduct(e){this.setState({addIsType:e});let t=this.props.direct_reseller_id;t<=0?c.a.error("\u8bf7\u6dfb\u52a0\u6620\u5c04\u5206\u9500\u5546"):("addProduct"===e?this.setState({product_title:"\u65b0\u5efa\u5546\u54c1",newGoodsBtnLoading:!0}):this.setState({product_title:"\u65b0\u589e\u7acb\u51cf\u91d1",newGoldLoading:!0}),this.getProductInfoSelectData(t).then((t=>{sessionStorage.setItem("productsList",JSON.stringify(t)),"addProduct"===e?this.setState({newGoodsBtnLoading:!1}):this.setState({newGoldLoading:!1}),this.setState({drawerVisible2:!0,productData:null})})))}async productSubmit(){let e="";e="addProduct"===this.state.addIsType?await this.refs.product.submit():await this.refs.knockGold.submit(),e&&(c.a.success("\u4fdd\u5b58\u6210\u529f"),this.setState({drawerVisible2:!1}),setTimeout((()=>{let e=null,t=null,i=[];"addProduct"===this.state.addIsType?(e=JSON.parse(sessionStorage.getItem("productData")).filter((e=>2!==e.type)),i=this.state.tempdata.filter((e=>1!==e.type)),t=Object(f.a)(e,(e=>{let t=this.state.tempdata.findIndex((t=>t.product_id==e.product_id));return t>-1&&(e.checked=this.state.tempdata[t].checked),e.type=1,e.only=e.product_id,e.upstream="\u76f4\u8fde\u5929\u4e0b",e}))):(e=JSON.parse(sessionStorage.getItem("knockGoldData")).filter((e=>1!==e.type)),i=this.state.tempdata.filter((e=>2!==e.type)),t=Object(f.a)(e,(e=>{var t,i;let a=this.state.tempdata.findIndex((t=>t.channel_activity_id===e.channel_activity_id));a>-1&&(e.checked=this.state.tempdata[a].checked);const s={};return s.product_name=e.batch_goods_name?e.batch_goods_name:e.product_name,s.map_product_name=e.product_name,s.channel_activity_id=e.channel_activity_id,s.only=e.channel_activity_id,s.type=2,s.checked=null===e||void 0===e?void 0:e.checked,s.upstream=P(e.channel),s.edit="edit",s.effectDate=e.effectDate?e.effectDate:(null===(t=e.time_limit)||void 0===t?void 0:t.effect_time.start_time)+" \u81f3 "+(null===(i=e.time_limit)||void 0===i?void 0:i.effect_time.end_time),s.contract_price=e.contract_price?e.contract_price:e.price,s.official_price=e.official_price?e.official_price:e.reduce_amount,s.quantity=e.quantity?e.quantity:parseInt(L(e.all_budget,e.reduce_amount)),s.origin=null!==e&&void 0!==e&&e.origin?null===e||void 0===e?void 0:e.origin:e,s})));let a=te(t.concat(i),"only"),s=[],l=[];Object(f.a)(a,(e=>{s.push({key:e.only,text:e.product_name}),e.checked&&l.push({key:e.only,text:e.product_name})})),s=te(s,"key"),this.setState({tempdata:a,rankoptions:s,rank:l})}),500))}setkeyStyle(e){6==e?this.setState({white_visible:!0,whiteStyle:!0}):this.setState({white_visible:!1,whiteStyle:!1});let t=this.state.model;t.style=e,this.setState({model:t})}componentWillReceiveProps(e){}onChangeCombinedDate(e){let t=this.state.codeInfo;t.date_time=e,this.setState({codeInfo:t})}submit2(){this.refs.form2.validator()}onRankChange(e){Object(Ti.a)(this.state.tempdata,(t=>{t.checked=e.findIndex((e=>e.key==t.only))>-1})),this.setState({tempdata:this.state.tempdata,rank:e})}codeSubmit(){if(2!==this.props.keyType)if(1!==this.props.keyType);else{if(this.refs.addEditExchangeEl.submit()){let e=this.refs.addEditExchangeEl.getModel();if(1===this.props.isSettlement&&(e.restrict="1"),1===this.props.isSettlement&&2!==this.state.exchangeType){if([...e.product.legal,...e.product.reduce,...e.product.cash].length>1)return void c.a.error("\u5305\u7801\u53ea\u80fd\u521b\u5efa\u4e00\u4e2a\u5546\u54c1")}let t=this.state.distdata;this.state.rowIndex>-1?(t[this.state.rowIndex]=e,this.setState({distdata:t})):(t.push(e),this.setState({distdata:t})),this.setState({drawerVisible:!1})}}else{if(this.refs.addEditCouponEl.submit()){let e=this.refs.addEditCouponEl.getModel(),t=this.state.couponData;this.state.rowIndex>-1?(t[this.state.rowIndex]=e,this.setState({couponData:t})):(t.push(e),this.setState({couponData:t})),this.setState({drawerVisible:!1})}}}addNewKey(){this.props.addNewkey()}onRestrict(e,t,i){let a=e.target.value;a=a.replace(/[^\d]/g,""),1===this.props.keyType?(this.state.distdata[i].restrict=a,this.setState({distdata:this.state.distdata})):(this.state.couponData[i].restrict=a,this.setState({couponData:this.state.couponData}))}edit(e){let t={batch_name:e.batch_name,style:parseInt(e.style),quantity:e.quantity,allow_repetition:parseInt(e.allow_repetition),allow_loss:parseInt(e.allow_loss),merge_stock:e.merge_stock,code_batch:e.code_batch,draw_title:e.draw_title,key_official_price:e.key_official_price,key_cost_price:e.key_cost_price,expiration_type:e.expiration_conf?e.expiration_conf.expiration_type:"1",expiration_value:e.expiration_conf?e.expiration_conf.expiration_value:""},i=sessionStorage.getItem("bm_obj");if(i){let e=JSON.parse(i);e.settlement_type>0?(this.setState({isSettlement:1}),t.settlement_type={key:e.settlement_type,text:e.settlement_type_text}):this.setState({isSettlement:2})}6==t.style?(sessionStorage.setItem("white",1),this.setState({white_visible:!0})):sessionStorage.setItem("white",3);let a=Object(f.a)(e.code_batch,(e=>(e.checked=!0,e)));this.setState({mobile_repeat:e.mobile_repeat,mobile_excel:e.mobile_excel,model:t,checkedList:e.bind_object.map(Number)[0],distdata:a,isload:!0})}coupon_edit(e){let t={batch_name:e.batch_name,style:parseInt(e.style),quantity:e.quantity,allow_repetition:parseInt(e.allow_repetition),allow_loss:parseInt(e.allow_loss),merge_stock:e.merge_stock,draw_title:e.draw_title,coupon:e.coupon};6==t.style?(sessionStorage.setItem("white",1),this.setState({white_visible:!0})):sessionStorage.setItem("white",3);let i=Object(f.a)(e.coupon,(e=>(e.checked=!0,e)));this.setState({mobile_repeat:e.mobile_repeat,mobile_excel:e.mobile_excel,model:t,couponData:i,isload:!0})}onUploadChange1(e,t){if(e.length>0&&"success"==e[0].status){let i=this.state.tempdata.findIndex((e=>e.product_id==t.product_id));this.state.tempdata[i].describe_url=e[0].src,this.setState({tempdata:this.state.tempdata})}}onUploadChange2(e,t){if(e.length>0&&"success"==e[0].status){let i=this.state.tempdata.findIndex((e=>e.product_id==t.product_id));this.state.tempdata[i].describe_url=e[0].src,this.setState({tempdata:this.state.tempdata})}}onNameChange(e,t,i){this.state.tempdata[i].product_name=e.target.value;let a=Object(f.a)(this.state.tempdata,(e=>{let t={};return t.key=e.product_id,t.text=e.product_name,t}));this.setState({rank:a,rankoptions:a,tempdata:this.state.tempdata})}onQuantityChange(e,t,i){this.state.tempdata[i].quantity=""==e.target.value?0:e.target.value,this.setState({tempdata:this.state.tempdata})}onPriceChange(e,t,i){let a=e.target.value.replace(/[^\d^\.]+/g,"").replace(".","$#$").replace(/\./g,"").replace("$#$",".");this.state.tempdata[i].contract_price=a,this.setState({tempdata:this.state.tempdata})}rowItemClick(e,t){1===this.props.keyType?2==e.recharge_type?this.setState({draw_title:"\u7f16\u8f91\u7ec4\u5408\u5546\u54c1",rowIndex:t,rowExchangeData:e,drawerVisible:!0,exchangeType:2}):this.setState({draw_title:"\u7f16\u8f91\u5151\u6362\u7801",rowIndex:t,rowExchangeData:e,drawerVisible:!0,exchangeType:1}):this.setState({draw_title:"\u7f16\u8f91\u4f18\u60e0\u5238",rowIndex:t,rowCouponData:e,drawerVisible:!0})}initUpload(){this.setState({accessVerify:!1,excel_visible:!1,upload_visible:!1,file_loading:!1,fail_visible:!1,success_visible:!1,import_visible:!1})}isPositiveInteger(e){return/^[1-9]\d*$/.test(e)}importConfirmClick(){let e=this.state.exceldata.filter((e=>"success"==e.type)),t=Object(f.a)(e,(e=>e.mobile)),i=this.state.model;i.quantity=this.state.excel_count-this.state.error_count+t.length,this.setState({import_success:!0,model:i,accessVerify:!1,excel_visible:!1,import_visible:!1,mobile_repeat:t})}importClick(){this.state.file_loading?c.a.error("\u6587\u4ef6\u6b63\u5728\u89e3\u6790\u4e2d\u8bf7\u7a0d\u7b49"):this.state.success_visible?this.setState({excel_visible:!0,accessVerify:!1,import_visible:!1}):c.a.error("\u8bf7\u4e0a\u4f20\u6b63\u786e\u7684\u6587\u4ef6")}fileChange(e){let t=e.target.files[0];if(this.setState({upload_visible:!0,myfile:t}),t.name.indexOf(".xls")||t.name.indexOf(".xlsx")||t.name.indexOf(".csv")){if(t.size>1024e3)return void c.a.error("\u6587\u4ef6\u5927\u5c0f\u4e0d\u80fd\u5927\u4e8e2M");let e=new FormData;e.append("file",t),e.append("path","white_list_excel"),this.setState({file_loading:!0}),Object(a.cd)(e).then((e=>{Object(a.Tb)(e,((e,t)=>{let i={excel:e.path};(sessionStorage.getItem("plan_id")||sessionStorage.getItem("plan_id_copy"))&&(i.plan_id=sessionStorage.getItem("plan_id")||sessionStorage.getItem("plan_id_copy")),1===this.props.isSettlement&&(i.plan_creat=!0),this.setState({mobile_excel:e.path}),Object(a.L)(i).then((e=>{this.setState({file_loading:!1}),Object(a.Tb)(e,((e,t)=>{let i=e.count-e.errorCount;this.setState({excel_count:e.count,accessVerify:!0,error_count:e.errorCount,success_count:i,exceldata:e.validationFailed,success_visible:!0});let a=sessionStorage.getItem("phone_number_all")?JSON.parse(sessionStorage.getItem("phone_number_all")):[],s=a.find((e=>e.key===this.props.step_id));s?s.phone_number=e.phone_number:a.push({key:this.props.step_id,phone_number:e.phone_number}),sessionStorage.setItem("phone_number_all",JSON.stringify(a))}),(e=>{c.a.error(e),this.setState({success_visible:!1})}))}))}),(e=>{c.a.error(e),this.setState({success_visible:!1})}))}))}else this.setState({success_visible:!1})}resetUpload(){this.setState({import_visible:!0,excel_visible:!1,accessVerify:!0})}switchChange(e,t){t.type=e?"success":"success"==t.type?"repeat":"error"}downLoadTemplate(){window.location.href="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/%E7%99%BD%E5%90%8D%E5%8D%95%E6%A8%A1%E6%9D%BF.xlsx"}productEditShow(e){if(this.props.direct_reseller_id>0)if(this.setState({tableLoading:!0}),2===e.type){let t=e.origin;this.state.isCopy&&delete t.id,this.setState({product_title:"\u7f16\u8f91\u7acb\u51cf\u91d1",productData:t,addIsType:"addKnockGold"}),setTimeout((()=>{this.setState({drawerVisible2:!0,tableLoading:!1})}),300)}else if(3===e.type){let t=e.origin;this.state.isCopy&&delete t.id,this.setState({product_title:"\u7f16\u8f91\u7ea2\u5305",productData:t,addIsType:"redPackets"}),setTimeout((()=>{this.setState({tableLoading:!1,drawerVisible2:!0})}),300)}else this.getProductInfoSelectData(this.props.direct_reseller_id).then((t=>{sessionStorage.setItem("productsList",JSON.stringify(t)),"2"===sessionStorage.getItem("KeyPcType")&&delete e.code_batch_id,this.setState({product_title:"\u7f16\u8f91\u5546\u54c1",productData:e,addIsType:"addProduct"}),setTimeout((()=>{this.setState({drawerVisible2:!0,tableLoading:!1})}),300)}));else c.a.error("\u8bf7\u6dfb\u52a0\u6620\u5c04\u5206\u9500\u5546")}dynamicComponents(){return 1===this.props.keyType?1===this.state.exchangeType?Object(h.jsxDEV)(ms,{ref:"addEditExchangeEl",editData:this.state.rowExchangeData,direct_reseller_id:this.props.direct_reseller_id,isSettlement:this.props.isSettlement,settlementData:this.props.settlementData},void 0,!1,{fileName:Ns,lineNumber:1141,columnNumber:11},this):Object(h.jsxDEV)(ps,{propsData:this.state.rowExchangeData,ref:"addEditExchangeEl"},void 0,!1,{fileName:Ns,lineNumber:1150,columnNumber:16},this):Object(h.jsxDEV)(wt,{couponType:1,editData:this.state.rowCouponData,isAuditButton:!1,ref:"addEditCouponEl",direct_reseller_id:this.props.direct_reseller_id},void 0,!1,{fileName:Ns,lineNumber:1154,columnNumber:9},this)}render(){const e=e=>{var t;let i=e.legal.map((e=>e.product_name)),a=e.reduce.map((e=>e.batch_goods_name)),s=null===(t=e.cash)||void 0===t?void 0:t.map((e=>e.batch_goods_name)),l=i.concat(a,s);return l=l.join(","),Object(h.jsxDEV)("span",{children:l},void 0,!1,{fileName:Ns,lineNumber:1199,columnNumber:14},this)};return Object(h.jsxDEV)("div",{id:"step2",children:[Object(h.jsxDEV)(l.a,{model:this.state.model,rules:{bind_object:[{type:"required",message:"\u8bf7\u9009\u62e9\u7ed1\u5b9a\u7c7b\u578b"}],batch_name:[{type:"required",message:"\u8bf7\u8f93\u5165key\u6279\u6b21\u540d\u79f0"}],key_official_price:[{type:"required",message:"\u8bf7\u8f93\u5165\u5b98\u65b9\u4ef7"},{type:"regExp",message:"\u6700\u591a\u4fdd\u75594\u4f4d\u5c0f\u6570",reg:"^[0-9]+(.[0-9]{1,4})?$"}],key_cost_price:[{type:"required",message:"\u8bf7\u8f93\u5165\u6210\u672c\u4ef7"},{type:"regExp",message:"\u6700\u591a\u4fdd\u75594\u4f4d\u5c0f\u6570",reg:"^[0-9]+(.[0-9]{1,4})?$"}]},ref:"form1",children:[Object(h.jsxDEV)(s.a,{labelname:" key\u6837\u5f0f",prop:"style",id:"style",children:Object(h.jsxDEV)(Q.a,{onChange:e=>{this.onStyleChange(e)},value:this.state.model.style,children:[Object(h.jsxDEV)(ne.a,{value:1,disabled:this.props.name>0&&6==this.state.model.style,children:"\u4e32\u7801"},void 0,!1,{fileName:Ns,lineNumber:1212,columnNumber:15},this),Object(h.jsxDEV)(ne.a,{value:2,disabled:this.props.name>0&&6==this.state.model.style||1===this.props.isSettlement&&this.props.settlementData&&2===this.props.settlementData.key,children:"\u94fe\u63a5"},void 0,!1,{fileName:Ns,lineNumber:1216,columnNumber:15},this),Object(h.jsxDEV)(ne.a,{value:4,disabled:this.props.name>0&&6==this.state.model.style||1===this.props.isSettlement&&this.props.settlementData&&2===this.props.settlementData.key,children:"\u4e8c\u7ef4\u7801"},void 0,!1,{fileName:Ns,lineNumber:1228,columnNumber:15},this),Object(h.jsxDEV)(ne.a,{value:6,disabled:this.props.name>0&&6!=this.state.model.style,children:"\u767d\u540d\u5355"},void 0,!1,{fileName:Ns,lineNumber:1240,columnNumber:15},this)]},void 0,!0,{fileName:Ns,lineNumber:1206,columnNumber:13},this)},void 0,!1,{fileName:Ns,lineNumber:1205,columnNumber:11},this),this.state.isload&&1===this.props.isSettlement?Object(h.jsxDEV)(s.a,{labelname:"\u6210\u672c\u4ef7",prop:"key_cost_price",id:"key_cost_price",children:Object(h.jsxDEV)(n.a,{onChange:e=>{let t=this.state.model;t.key_cost_price=e,this.setState({model:t})},onClearItem:e=>{let t=this.state.model;t.key_cost_price="",this.setState({model:t})},value:this.state.model.key_cost_price,placeholder:"\u8bf7\u8f93\u5165",labelWidth:"0px",maxLength:12,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:Ns,lineNumber:1248,columnNumber:15},this)},void 0,!1,{fileName:Ns,lineNumber:1247,columnNumber:13},this):null,this.state.isload&&1===this.props.isSettlement?Object(h.jsxDEV)(s.a,{labelname:"\u5b98\u65b9\u4ef7",prop:"key_official_price",id:"key_official_price",children:Object(h.jsxDEV)(n.a,{onChange:e=>{let t=this.state.model;t.key_official_price=e,this.setState({model:t})},onClearItem:e=>{let t=this.state.model;t.key_official_price="",this.setState({model:t})},value:this.state.model.key_official_price,placeholder:"\u8bf7\u8f93\u5165",labelWidth:"0px",maxLength:12,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:Ns,lineNumber:1272,columnNumber:15},this)},void 0,!1,{fileName:Ns,lineNumber:1271,columnNumber:13},this):null,this.state.isload?Object(h.jsxDEV)(s.a,{labelname:"key\u6279\u6b21\u540d\u79f0",prop:"batch_name",id:"batch_name",children:Object(h.jsxDEV)(n.a,{onChange:e=>{let t=this.state.model;t.batch_name=e,this.setState({model:t})},onClearItem:e=>{let t=this.state.model;t.batch_name="",this.setState({model:t})},value:this.state.model.batch_name,placeholder:"\u8bf7\u8f93\u5165",labelWidth:"0px",maxLength:12,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:Ns,lineNumber:1296,columnNumber:15},this)},void 0,!1,{fileName:Ns,lineNumber:1295,columnNumber:13},this):null,this.state.isload?Object(h.jsxDEV)(s.a,{labelname:"key\u6570\u91cf",prop:"quantity",id:"quantity",children:Object(h.jsxDEV)("div",{className:"key_number",children:[Object(h.jsxDEV)(n.a,{onChange:e=>{let t=this.state.model;t.quantity=e,this.setState({model:t})},onClearItem:e=>{let t=this.state.model;t.quantity="",this.setState({model:t})},value:this.state.model.quantity,disabled:6==this.state.model.style,placeholder:"\u8bf7\u8f93\u5165",labelWidth:"0px",maxLength:5,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:Ns,lineNumber:1321,columnNumber:17},this),this.state.white_visible?Object(h.jsxDEV)(u.a,{type:"primary",onClick:e=>{this.initUpload(),this.setState({import_visible:!0})},children:"\u5bfc\u5165\u767d\u540d\u5355"},void 0,!1,{fileName:Ns,lineNumber:1343,columnNumber:19},this):null]},void 0,!0,{fileName:Ns,lineNumber:1320,columnNumber:15},this)},void 0,!1,{fileName:Ns,lineNumber:1319,columnNumber:13},this):null,Object(h.jsxDEV)(s.a,{labelname:"key\u7801\u6709\u6548\u671f",prop:"expiration_type",id:"expiration_type",children:Object(h.jsxDEV)(Z.a.Group,{value:this.state.model.expiration_type,onChange:e=>{let t=this.state.model;t.expiration_value="",t.expiration_type=e.target.value,this.setState({model:t})},children:[Object(h.jsxDEV)(Z.a,{value:"1",children:"\u4e0d\u8bbe\u7f6e"},void 0,!1,{fileName:Ns,lineNumber:1367,columnNumber:15},this),Object(h.jsxDEV)(Z.a,{value:"2",children:"\u56fa\u5b9a\u65f6\u95f4\u6bb5"},void 0,!1,{fileName:Ns,lineNumber:1368,columnNumber:15},this),Object(h.jsxDEV)(Z.a,{value:"3",children:"\u63a5\u53e3\u8c03\u53d6\u540e\u6709\u6548\u671f"},void 0,!1,{fileName:Ns,lineNumber:1369,columnNumber:15},this)]},void 0,!0,{fileName:Ns,lineNumber:1358,columnNumber:13},this)},void 0,!1,{fileName:Ns,lineNumber:1357,columnNumber:11},this),"2"===this.state.model.expiration_type?Object(h.jsxDEV)(s.a,{labelname:"\u56fa\u5b9a\u65f6\u95f4\u6bb5",children:Object(h.jsxDEV)(ee.a,{className:"zent-datepicker-plan",showTime:{format:"HH:mm:ss",defaultTime:[Y()().format("HH:mm:ss"),"23:59:59"]},format:"YYYY-MM-DD HH:mm:ss",value:this.state.model.expiration_value,onChange:e=>{let t=this.state.model;t.expiration_value=e,this.setState({model:t})},disabledDate:this.onDisabledRange},void 0,!1,{fileName:Ns,lineNumber:1375,columnNumber:15},this)},void 0,!1,{fileName:Ns,lineNumber:1374,columnNumber:13},this):null,"3"===this.state.model.expiration_type?Object(h.jsxDEV)(s.a,{labelname:"\u63a5\u53e3\u8c03\u53d6\u540e\u6709\u6548\u671f",children:Object(h.jsxDEV)(Di.a,{placeholder:"\u8bf7\u8f93\u5165\u5929\u6570",value:this.state.model.expiration_value,width:120,maxLength:5,onChange:e=>{let t=sessionStorage.getItem("knockGold_effectDate");if(t){t=JSON.parse(t);let i=new Date(t.begin_time),a=new Date(t.end_time).getTime()-i.getTime(),s=Math.ceil(a/864e5);if(!(s>=Number(e.target.value)))return void c.a.error(`key\u7801\u6709\u6548\u671f\u4e0d\u80fd\u8d85\u8fc7\u8ba1\u5212\u6709\u6548\u671f(${s}\u5929)`);{let t=this.state.model;t.expiration_value=e.target.value,this.setState({model:t})}}}},void 0,!1,{fileName:Ns,lineNumber:1395,columnNumber:15},this)},void 0,!1,{fileName:Ns,lineNumber:1394,columnNumber:13},this):null,Object(h.jsxDEV)(s.a,{labelname:"\u7ed1\u5b9a\u7c7b\u578b",prop:"bind_object",id:"bind_object",children:Object(h.jsxDEV)(Z.a.Group,{value:this.props.keyType,onChange:e=>{this.onCheckChange(e)},children:[Object(h.jsxDEV)(Z.a,{value:1,disabled:0!==this.props.name,children:"\u5151\u6362\u7801"},void 0,!1,{fileName:Ns,lineNumber:1437,columnNumber:15},this),Object(h.jsxDEV)(Z.a,{value:2,disabled:0!==this.props.name||1===this.props.isSettlement,children:"\u4f18\u60e0\u5238"},void 0,!1,{fileName:Ns,lineNumber:1440,columnNumber:15},this)]},void 0,!0,{fileName:Ns,lineNumber:1431,columnNumber:13},this)},void 0,!1,{fileName:Ns,lineNumber:1430,columnNumber:11},this),Object(h.jsxDEV)(s.a,{labelname:"",prop:"btn",required:!1,children:1===this.props.keyType?Object(h.jsxDEV)(h.Fragment,{children:[Object(h.jsxDEV)(u.a,{disabled:1===this.props.isSettlement&&this.state.distdata.length>=1,onClick:e=>{1===this.props.isSettlement&&this.state.distdata.length>=1?c.a.error("\u53ea\u80fd\u521b\u5efa\u4e00\u4e2a\u5151\u6362\u7801"):this.planAddExchangeCoupon(0)},children:"\u65b0\u5efa\u5151\u6362\u7801"},void 0,!1,{fileName:Ns,lineNumber:1449,columnNumber:17},this),Object(h.jsxDEV)(Ei.a,{trigger:"hover",content:"\u4e00\u6b21\u6027\u5145\u503c\u591a\u5f20\u7acb\u51cf\u91d1",children:Object(h.jsxDEV)(u.a,{disabled:1===this.props.isSettlement&&this.state.distdata.length>=1||1===this.props.isSettlement&&this.props.settlementData&&7===this.props.settlementData.key,onClick:e=>{1===this.props.isSettlement&&this.state.distdata.length>=1?c.a.error("\u53ea\u80fd\u521b\u5efa\u4e00\u4e2a\u5151\u6362\u7801"):this.planAddExchangeCoupon(2)},children:"\u65b0\u5efa\u7ec4\u5408\u5546\u54c1"},void 0,!1,{fileName:Ns,lineNumber:1465,columnNumber:19},this)},void 0,!1,{fileName:Ns,lineNumber:1464,columnNumber:17},this)]},void 0,!0):Object(h.jsxDEV)(u.a,{onClick:e=>{this.planAddExchangeCoupon(1)},children:"\u65b0\u5efa\u4f18\u60e0\u5238"},void 0,!1,{fileName:Ns,lineNumber:1489,columnNumber:15},this)},void 0,!1,{fileName:Ns,lineNumber:1446,columnNumber:11},this),Object(h.jsxDEV)(s.a,{labelname:"\u7ed1\u5b9a\u5bf9\u8c61",prop:"grid",children:Object(h.jsxDEV)(I,{headBackgroud:"#f9fafc",isShowPageBar:!1,spliteColor:"#fff",tableData:1===this.props.keyType?this.state.distdata:this.state.couponData,Column:1===this.props.keyType?this.state.Column:this.state.Column_coupon,ref:"tempdata",countbarVisible:!1,isBorder:!0,isSwitch:!1,pageChange:e=>{this.pageChange(e)},checkChange:e=>{},ComponentHandler:(t,i,a)=>"restrict"==t?Object(h.jsxDEV)(Di.a,{placeholder:"\u8bf7\u8f93\u5165\u6570\u91cf",width:120,maxLength:5,disabled:2==i.recharge_type||1===this.props.isSettlement,value:1===this.props.isSettlement?1:i.restrict,onChange:e=>{this.onRestrict(e,i,a)}},void 0,!1,{fileName:Ns,lineNumber:1517,columnNumber:21},this):"product"===t?e(i.product):"edit"==t?Object(h.jsxDEV)("span",{onClick:e=>{this.rowItemClick(i,a)},style:{color:"#2B66F2"},children:"\u7f16\u8f91"},void 0,!1,{fileName:Ns,lineNumber:1535,columnNumber:21},this):void 0},void 0,!1,{fileName:Ns,lineNumber:1500,columnNumber:13},this)},void 0,!1,{fileName:Ns,lineNumber:1499,columnNumber:11},this),Object(h.jsxDEV)(s.a,{labelname:"\u91cd\u590d\u9009\u62e9\u5546\u54c1",id:"allow_repetition",prop:"allow_repetition",children:Object(h.jsxDEV)(Q.a,{onChange:e=>this.onRepetitionChange(e),value:this.state.model.allow_repetition,children:[Object(h.jsxDEV)(ne.a,{value:1,children:"\u662f"},void 0,!1,{fileName:Ns,lineNumber:1553,columnNumber:15},this),Object(h.jsxDEV)(ne.a,{value:0,children:"\u5426"},void 0,!1,{fileName:Ns,lineNumber:1554,columnNumber:15},this)]},void 0,!0,{fileName:Ns,lineNumber:1549,columnNumber:13},this)},void 0,!1,{fileName:Ns,lineNumber:1548,columnNumber:11},this),Object(h.jsxDEV)(s.a,{labelname:"\u662f\u5426\u5141\u8bb8\u4e8f\u635f",id:"allow_loss",prop:"allow_loss",children:Object(h.jsxDEV)(Q.a,{onChange:e=>this.onLossChange(e),value:this.state.model.allow_loss,children:[Object(h.jsxDEV)(ne.a,{value:1,children:"\u662f"},void 0,!1,{fileName:Ns,lineNumber:1560,columnNumber:15},this),Object(h.jsxDEV)(ne.a,{value:0,children:"\u5426"},void 0,!1,{fileName:Ns,lineNumber:1561,columnNumber:15},this)]},void 0,!0,{fileName:Ns,lineNumber:1559,columnNumber:13},this)},void 0,!1,{fileName:Ns,lineNumber:1558,columnNumber:11},this)]},void 0,!0,{fileName:Ns,lineNumber:1204,columnNumber:9},this),Object(h.jsxDEV)("div",{className:"btnadd-key",onClick:()=>{this.addNewKey()},children:"\u6dfb\u52a0\u65b0\u7684\u6279\u6b21key"},void 0,!1,{fileName:Ns,lineNumber:1565,columnNumber:9},this),Object(h.jsxDEV)(bt.a,{width:"90%",title:this.state.draw_title,footer:Object(h.jsxDEV)("div",{style:{textAlign:"center"},children:[Object(h.jsxDEV)(u.a,{type:"primary",onClick:e=>{this.codeSubmit(e)},children:"\u63d0\u4ea4"},void 0,!1,{fileName:Ns,lineNumber:1579,columnNumber:15},this),Object(h.jsxDEV)(u.a,{onClick:e=>{this.closeDraw()},children:"\u53d6\u6d88"},void 0,!1,{fileName:Ns,lineNumber:1587,columnNumber:15},this)]},void 0,!0,{fileName:Ns,lineNumber:1578,columnNumber:13},this),visible:this.state.drawerVisible,onClose:e=>{this.closeDraw()},maskClosable:!1,children:this.dynamicComponents()},void 0,!1,{fileName:Ns,lineNumber:1574,columnNumber:9},this),this.state.import_visible?Object(h.jsxDEV)("div",{children:[Object(h.jsxDEV)("div",{className:"modal"},void 0,!1,{fileName:Ns,lineNumber:1607,columnNumber:13},this),Object(h.jsxDEV)("div",{className:"import-excel",children:[Object(h.jsxDEV)("div",{className:"import-header",children:[Object(h.jsxDEV)("div",{className:"import-title",children:"\u4eceExcel\u5bfc\u5165\u767d\u540d\u5355"},void 0,!1,{fileName:Ns,lineNumber:1610,columnNumber:17},this),Object(h.jsxDEV)(g.a,{type:"close",className:"import-close",onClick:e=>{this.setState({import_visible:!1})}},void 0,!1,{fileName:Ns,lineNumber:1612,columnNumber:17},this)]},void 0,!0,{fileName:Ns,lineNumber:1609,columnNumber:15},this),Object(h.jsxDEV)("div",{className:"step-bar",children:[Object(h.jsxDEV)("div",{className:"step-group",children:[Object(h.jsxDEV)("div",{className:"step-code active",children:"1"},void 0,!1,{fileName:Ns,lineNumber:1622,columnNumber:19},this),Object(h.jsxDEV)("span",{className:"step-label active",children:"\u4e0a\u4f20\u6587\u4ef6"},void 0,!1,{fileName:Ns,lineNumber:1623,columnNumber:19},this)]},void 0,!0,{fileName:Ns,lineNumber:1621,columnNumber:17},this),Object(h.jsxDEV)("div",{className:"step-center",children:Object(h.jsxDEV)("div",{className:"step-line"},void 0,!1,{fileName:Ns,lineNumber:1626,columnNumber:19},this)},void 0,!1,{fileName:Ns,lineNumber:1625,columnNumber:17},this),Object(h.jsxDEV)("div",{className:"step-group",children:[Object(h.jsxDEV)("div",{className:"step-code",children:"2"},void 0,!1,{fileName:Ns,lineNumber:1629,columnNumber:19},this),Object(h.jsxDEV)("span",{className:"step-label",children:"\u5bfc\u5165\u5b8c\u6210"},void 0,!1,{fileName:Ns,lineNumber:1630,columnNumber:19},this)]},void 0,!0,{fileName:Ns,lineNumber:1628,columnNumber:17},this)]},void 0,!0,{fileName:Ns,lineNumber:1620,columnNumber:15},this),Object(h.jsxDEV)("div",{className:"upload-panel1",children:[Object(h.jsxDEV)("div",{className:"upload-label",children:"\u76f4\u63a5\u4e0a\u4f20"},void 0,!1,{fileName:Ns,lineNumber:1635,columnNumber:17},this),Object(h.jsxDEV)("div",{className:"upload-info",children:[Object(h.jsxDEV)("div",{children:"\u652f\u6301\u6587\u4ef6\u7c7b\u578b\uff1axls\uff0cxlsx\uff0ccsv"},void 0,!1,{fileName:Ns,lineNumber:1638,columnNumber:19},this),Object(h.jsxDEV)("div",{children:"- \u652f\u6301\u6240\u6709\u57fa\u7840\u5b57\u6bb5\u7684\u5bfc\u5165\uff0c\u4e00\u6b21\u81f3\u591a\u5bfc\u5165 10000 \u6761\u624b\u673a\u53f7\uff08\u4e0d\u7b26\u5408\u89c4\u5219\u6574\u6761\u4efb\u52a1\u4e0d\u4e88\u4ee5\u5bfc\u5165\uff09"},void 0,!1,{fileName:Ns,lineNumber:1639,columnNumber:19},this)]},void 0,!0,{fileName:Ns,lineNumber:1637,columnNumber:17},this)]},void 0,!0,{fileName:Ns,lineNumber:1634,columnNumber:15},this),this.state.upload_visible?Object(h.jsxDEV)("div",{children:[Object(h.jsxDEV)("div",{className:"upload-msgbar",children:[Object(h.jsxDEV)("div",{className:"execel-name",children:[Object(h.jsxDEV)(g.a,{type:"text-guide-o",className:"doc-flag"},void 0,!1,{fileName:Ns,lineNumber:1649,columnNumber:23},this),Object(h.jsxDEV)("span",{className:"excel-txt",children:this.state.myfile.name},void 0,!1,{fileName:Ns,lineNumber:1650,columnNumber:23},this)]},void 0,!0,{fileName:Ns,lineNumber:1648,columnNumber:21},this),this.state.file_loading?Object(h.jsxDEV)("div",{className:"file-tag",children:[Object(h.jsxDEV)(g.a,{type:"loading",spin:!0,className:"file-loading"},void 0,!1,{fileName:Ns,lineNumber:1655,columnNumber:25},this),Object(h.jsxDEV)("span",{className:"excel-txt",children:"\u89e3\u6790\u4e2d "},void 0,!1,{fileName:Ns,lineNumber:1656,columnNumber:25},this)]},void 0,!0,{fileName:Ns,lineNumber:1654,columnNumber:23},this):Object(h.jsxDEV)("div",{className:"file-tag",children:[Object(h.jsxDEV)("input",{type:"file",className:"upload-input",onChange:e=>this.fileChange(e)},void 0,!1,{fileName:Ns,lineNumber:1660,columnNumber:25},this),Object(h.jsxDEV)(g.a,{type:"up-circle-o",className:"upload-flag"},void 0,!1,{fileName:Ns,lineNumber:1665,columnNumber:25},this),Object(h.jsxDEV)("span",{className:"excel-txt",children:"\u66f4\u65b0\u6587\u4ef6 "},void 0,!1,{fileName:Ns,lineNumber:1666,columnNumber:25},this)]},void 0,!0,{fileName:Ns,lineNumber:1659,columnNumber:23},this)]},void 0,!0,{fileName:Ns,lineNumber:1647,columnNumber:19},this),this.state.success_visible?Object(h.jsxDEV)("div",{className:"file-tip success",children:[Object(h.jsxDEV)(g.a,{type:"check-circle",className:"success-icon"},void 0,!1,{fileName:Ns,lineNumber:1672,columnNumber:23},this),"\u6587\u4ef6\u89e3\u6790\u6210\u529f,\u70b9\u51fb\u786e\u5b9a\u5bfc\u5165 \u5373\u53ef\u5bfc\u5165"]},void 0,!0,{fileName:Ns,lineNumber:1671,columnNumber:21},this):null,this.state.fail_visible?Object(h.jsxDEV)("div",{className:"file-tip error",children:[Object(h.jsxDEV)(g.a,{type:"error-circle",className:"error-icon"},void 0,!1,{fileName:Ns,lineNumber:1678,columnNumber:23},this),"\u6587\u4ef6\u89e3\u6790\u5931\u8d25,\u8bf7\u67e5\u770b\u5bfc\u5165\u89c4\u5219\u5e76\u66f4\u65b0\u6587\u4ef6"]},void 0,!0,{fileName:Ns,lineNumber:1677,columnNumber:21},this):null]},void 0,!0,{fileName:Ns,lineNumber:1646,columnNumber:17},this):Object(h.jsxDEV)("div",{children:[Object(h.jsxDEV)("input",{type:"file",className:"upload-input",onChange:e=>this.fileChange(e)},void 0,!1,{fileName:Ns,lineNumber:1685,columnNumber:19},this),Object(h.jsxDEV)(u.a,{className:"btn-upload",style:{background:"#1890ff",color:"#FFFFFF",border:"none"},children:"\u4e0a\u4f20\u6587\u4ef6"},void 0,!1,{fileName:Ns,lineNumber:1690,columnNumber:19},this)," "]},void 0,!0,{fileName:Ns,lineNumber:1684,columnNumber:17},this),Object(h.jsxDEV)("div",{className:"upload-panel1",children:[Object(h.jsxDEV)("div",{className:"upload-label",children:"\u4e0b\u8f7d\u6a21\u677f\u5e76\u586b\u5199\u540e\u4e0a\u4f20"},void 0,!1,{fileName:Ns,lineNumber:1704,columnNumber:17},this),Object(h.jsxDEV)("div",{className:"upload-info",children:Object(h.jsxDEV)("div",{children:"\u8bf7\u5148\u4e0b\u8f7d\u300c\u6570\u5b57\u4e16\u754c\u8425\u9500\u7ba1\u7406\u7cfb\u7edf_\u767d\u540d\u5355_\u6a21\u677f\u300d\u5e76\u6309\u7167\u6a21\u677f\u586b\u5199\u540e\u518d\u4e0a\u4f20\u3002"},void 0,!1,{fileName:Ns,lineNumber:1707,columnNumber:19},this)},void 0,!1,{fileName:Ns,lineNumber:1706,columnNumber:17},this)]},void 0,!0,{fileName:Ns,lineNumber:1703,columnNumber:15},this),Object(h.jsxDEV)(u.a,{type:"default",className:"btn-download",onClick:e=>{this.downLoadTemplate(e)},children:"\u4e0b\u8f7d\u6a21\u677f"},void 0,!1,{fileName:Ns,lineNumber:1710,columnNumber:15},this),Object(h.jsxDEV)("div",{className:"foot-bar",children:Object(h.jsxDEV)("div",{className:"btn-group",children:[Object(h.jsxDEV)(u.a,{type:"default",onClick:e=>{this.setState({import_visible:!1})},children:"\u53d6\u6d88"},void 0,!1,{fileName:Ns,lineNumber:1721,columnNumber:19},this),Object(h.jsxDEV)(u.a,{type:"primary",onClick:e=>{this.importClick(e)},style:{background:"#1890ff",color:"#FFFFFF",border:"none"},children:"\u786e\u5b9a\u5bfc\u5165"},void 0,!1,{fileName:Ns,lineNumber:1729,columnNumber:19},this)]},void 0,!0,{fileName:Ns,lineNumber:1720,columnNumber:17},this)},void 0,!1,{fileName:Ns,lineNumber:1719,columnNumber:15},this)]},void 0,!0,{fileName:Ns,lineNumber:1608,columnNumber:13},this)]},void 0,!0,{fileName:Ns,lineNumber:1606,columnNumber:11},this):null,this.state.excel_visible?Object(h.jsxDEV)("div",{children:[Object(h.jsxDEV)("div",{className:"modal"},void 0,!1,{fileName:Ns,lineNumber:1750,columnNumber:13},this),Object(h.jsxDEV)("div",{className:"import-excel",children:[Object(h.jsxDEV)("div",{className:"import-header",children:[Object(h.jsxDEV)("div",{className:"import-title",children:"\u4eceExcel\u5bfc\u5165\u767d\u540d\u5355"},void 0,!1,{fileName:Ns,lineNumber:1753,columnNumber:17},this),Object(h.jsxDEV)(g.a,{type:"close",className:"import-close",onClick:e=>{this.setState({excel_visible:!1})}},void 0,!1,{fileName:Ns,lineNumber:1754,columnNumber:17},this)]},void 0,!0,{fileName:Ns,lineNumber:1752,columnNumber:15},this),Object(h.jsxDEV)("div",{className:"file-upload-tip",children:["\u6587\u4ef6\u4e0a\u4f20\u6210\u529f.\u5171",this.state.excel_count,"\u6761\u624b\u673a\u53f7,\u5176\u4e2d",this.state.success_count,"\u6761\u53ef\u6210\u529f\u5bfc\u5165"]},void 0,!0,{fileName:Ns,lineNumber:1762,columnNumber:15},this),Object(h.jsxDEV)("div",{className:"file-errmsg",children:["\u53d1\u73b0\u4ee5\u4e0b",this.state.error_count,"\u6761\u4e0d\u7b26\u5408\u8981\u6c42,\u5c06\u4e0d\u4f1a\u88ab\u5bfc\u5165"]},void 0,!0,{fileName:Ns,lineNumber:1766,columnNumber:15},this),Object(h.jsxDEV)("div",{},void 0,!1,{fileName:Ns,lineNumber:1770,columnNumber:15},this),Object(h.jsxDEV)("div",{className:"gridpanel",children:Object(h.jsxDEV)(I,{headBackgroud:"#f9fafc",isShowPageBar:!1,spliteColor:"#fff",tableData:this.state.exceldata,value:this.state.exceldata,Column:vs,maxheight:200,isMultiple:!1,countbarVisible:!1,isBorder:!0,isSwitch:!1,pageChange:e=>{this.pageChange(e)},ComponentHandler:(e,t,i)=>{if("is_import"==e){if("success"==t.type||"repeat"==t.type){let e="success"==t.type;return Object(h.jsxDEV)(v.a,{checked:e,onChange:e=>{this.switchChange(e,t)}},void 0,!1,{fileName:Ns,lineNumber:1793,columnNumber:27},this)}return Object(h.jsxDEV)("div",{className:"isImport",children:"-"},void 0,!1,{fileName:Ns,lineNumber:1801,columnNumber:32},this)}}},void 0,!1,{fileName:Ns,lineNumber:1773,columnNumber:17},this)},void 0,!1,{fileName:Ns,lineNumber:1772,columnNumber:15},this),Object(h.jsxDEV)("div",{className:"foot-bar",children:Object(h.jsxDEV)("div",{className:"btn-group",children:[Object(h.jsxDEV)(u.a,{type:"default",onClick:e=>{this.resetUpload()},children:"\u91cd\u65b0\u4e0a\u4f20"},void 0,!1,{fileName:Ns,lineNumber:1809,columnNumber:19},this),Object(h.jsxDEV)(u.a,{type:"primary",onClick:e=>{this.importConfirmClick(e)},style:{background:"#1890ff",color:"#FFFFFF",border:"none"},children:"\u786e\u5b9a\u5bfc\u5165"},void 0,!1,{fileName:Ns,lineNumber:1817,columnNumber:19},this)]},void 0,!0,{fileName:Ns,lineNumber:1808,columnNumber:17},this)},void 0,!1,{fileName:Ns,lineNumber:1807,columnNumber:15},this)]},void 0,!0,{fileName:Ns,lineNumber:1751,columnNumber:13},this)]},void 0,!0,{fileName:Ns,lineNumber:1749,columnNumber:11},this):null]},void 0,!0,{fileName:Ns,lineNumber:1203,columnNumber:7},this)}}var fs="/Users/zhangds/web/blue-brother/frontend/src/pages/plan/add/step3.js";class _s extends m.a.Component{constructor(e){super(e),this.state={model:{theme_id:"",use:1,link:1},select_theme:null,keyType:sessionStorage.getItem("keyType")}}componentDidMount(e){this.getThemeData()}getThemeData(){let e={},t=sessionStorage.getItem("white"),i=sessionStorage.getItem("keyType");if(this.setState({keyType:i}),"2"===i){let i=this.state.model;i.link=1,this.setState({model:i}),e.page="1"===t?8:4}else e.page="1"===t?1:3;Object(a.Fb)(e).then((e=>{Object(a.Tb)(e,((e,t)=>{let i=Object(f.a)(e,(e=>{let t={};return t.key=e.id,t.text=e.title,t})),a=this.state.model;if(a.theme_id="",this.setState({model:a,options:i}),this.props.data&&this.props.data.theme_id){let e=this.state.options.find((e=>e.key==this.props.data.theme_id)),t=this.state.model;t.theme_id=e,this.setState({model:t,theme_id:this.props.data.theme_id})}}),(e=>{}))}))}submit(){let e=!1;return this.refs.form1.validator()&&(e={},e.theme_id=this.state.model.theme_id.key,e.use=this.state.model.use,e.link=this.state.model.link),e}onCancel(){this.refs.form1.cancel()}onLinkChange(e){let t=this.state.model;t.link=e.target.value,this.setState({model:t})}onListChange(e){let t=this.state.model;t.list=e.target.value,this.setState({model:t})}onUserChange(e){let t=this.state.model;t.link=e.target.value,this.setState({model:t})}onThemeChange(e){let t=this.state.model;t.theme_id=e,this.setState({model:t})}linkToPage(){let e=window.location.href.replace(window.location.hash,"#/home/mytempMould");window.open(e,"_blank")}refresh(){this.getThemeData()}edit(e){let t={theme_id:192,use:e.use,link:e.link};this.setState({model:t})}render(){return Object(h.jsxDEV)("div",{id:"step3",children:Object(h.jsxDEV)(l.a,{model:this.state.model,rules:{theme_id:[{type:"required",message:"\u8bf7\u9009\u62e9\u843d\u5730\u9875"}]},ref:"form1",children:[Object(h.jsxDEV)(s.a,{labelname:"\u9009\u62e9\u843d\u5730\u9875",prop:"theme_id",id:"theme_id",children:[Object(h.jsxDEV)(X.a,{options:this.state.options,placeholder:"\u9009\u62e9\u4e00\u9879",width:355,value:this.state.model.theme_id,onChange:e=>{this.onThemeChange(e),$t.a.emit("change","theme_id",e)}},void 0,!1,{fileName:fs,lineNumber:147,columnNumber:13},this),Object(h.jsxDEV)("a",{type:"refresh",onClick:()=>{this.refresh()},className:"refresh-btn",children:"\u5237\u65b0"},void 0,!1,{fileName:fs,lineNumber:157,columnNumber:13},this),Object(h.jsxDEV)("a",{type:"primary",onClick:()=>{this.linkToPage()},className:"newpage",children:"\u65b0\u5efa\u843d\u5730\u9875"},void 0,!1,{fileName:fs,lineNumber:166,columnNumber:13},this)]},void 0,!0,{fileName:fs,lineNumber:146,columnNumber:11},this),Object(h.jsxDEV)(s.a,{labelname:"\u57df\u540d\u9009\u62e9",prop:"link",children:Object(h.jsxDEV)(Q.a,{onChange:e=>{this.onUserChange(e)},value:this.state.model.link,children:[Object(h.jsxDEV)(Ei.a,{trigger:"hover",content:"22233.cn ",children:Object(h.jsxDEV)(ne.a,{value:1,children:"\u5927\u5ba2\u6237"},void 0,!1,{fileName:fs,lineNumber:184,columnNumber:17},this)},void 0,!1,{fileName:fs,lineNumber:183,columnNumber:15},this),Object(h.jsxDEV)(Ei.a,{trigger:"hover",content:"83323.cn",children:Object(h.jsxDEV)(ne.a,{value:2,disabled:"2"===this.state.keyType,children:"\u666e\u901a\u5546\u6237"},void 0,!1,{fileName:fs,lineNumber:187,columnNumber:17},this)},void 0,!1,{fileName:fs,lineNumber:186,columnNumber:15},this),Object(h.jsxDEV)(Ei.a,{trigger:"hover",content:"86885.cn",children:Object(h.jsxDEV)(ne.a,{value:3,disabled:"2"===this.state.keyType,children:"\u5907\u7528"},void 0,!1,{fileName:fs,lineNumber:192,columnNumber:17},this)},void 0,!1,{fileName:fs,lineNumber:191,columnNumber:15},this)]},void 0,!0,{fileName:fs,lineNumber:177,columnNumber:13},this)},void 0,!1,{fileName:fs,lineNumber:176,columnNumber:11},this)]},void 0,!0,{fileName:fs,lineNumber:145,columnNumber:9},this)},void 0,!1,{fileName:fs,lineNumber:144,columnNumber:7},this)}}var xs="/Users/zhangds/web/blue-brother/frontend/src/pages/plan/add/add.js";class ys extends m.a.Component{constructor(e){super(e),this.setTlementType=e=>{this.setState({isSettlement:e}),this.setState({keys:["step2-0"]})},this.setTlementData=e=>{this.setState({settlementData:e})},this.phoneChange=e=>{this.setState({phone:e.target.value})},this.emailChange=e=>{this.setState({email:e.target.value})},this.getDirectResellerId=e=>{this.setState({direct_reseller_id:e.direct_reseller_id})},this.state={keys:["step2-0"],step1_pagetitle:"\u65b0\u5efa\u8ba1\u5212",step2_pagetitle:"\u751f\u6210key",step3_pagetitle:"\u7ed1\u5b9a\u843d\u5730\u9875",curstep:1,menuList:[{id:1,title:"\u8425\u9500\u8ba1\u5212",child:[{step:1,title:"\u65b0\u5efa\u8ba1\u5212"}]},{id:2,title:"key",child:[{step:1,title:"\u751f\u6210key"},{step:2,title:"\u7ed1\u5b9a\u5361\u5238"}]},{id:3,title:"\u843d\u5730\u9875",child:[{step:1,title:"\u7ed1\u5b9a\u843d\u5730\u9875"}]}],phone_list:[],email_list:[],phone:"",email:"",email_radio:-1,phone_radio:-1,audit_visible:!1,card_visible:!1,step1:null,paytype:3,reseller:"",payment_direction:["\u5bf9\u79c1\u8d26\u6237","\u5bf9\u516c\u8d26\u6237","\u9884\u4ed8\u6b3e\u6263\u9664"],isload:!1,is_audit:!1,whiteStyle:!1,keyStyle:1,direct_reseller_id:0,keyType:1,isSettlement:2,settlementData:null}}submit(){this.refs.step1.submit()}onReturn(){let e=this;G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:" \u662f\u5426\u8fd4\u56de\u8ba1\u5212\u5217\u8868?"},void 0,!1,{fileName:xs,lineNumber:63,columnNumber:16},this),onConfirm:()=>{e.props.history.push("/home/plan-list/")},onCancel:this.onCancel,className:"questModal",parentComponent:this})}componentDidMount(e){sessionStorage.setItem("white",3),sessionStorage.setItem("plan_id",""),sessionStorage.setItem("keyType","1")}onConfirm(e){let t=sessionStorage.getItem("plan_id");this.setState({audit_visible:!1,is_audit:!0});let i={reseller_id:this.state.reseller.id,reseller_name:this.state.reseller.name,company_name:this.state.reseller.company_name,receive_email:this.state.email_list[0],payment_direction:this.state.payment_direction[this.state.paytype-1]};Object(a.g)(t,i).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.success("\u6210\u529f\u53d1\u8d77\u5ba1\u6279"),this.props.history.push("/home/plan-list/"),this.setState({is_audit:!1})}),(e=>{c.a.error(e)}))}))}onPayTypeChange(e){this.setState({paytype:e.target.value})}async onNextStep(){if(this.state.curstep>=1){if(1!=await this.refs.step1.submit())return;this.setState({curstep:2,isload:!0})}if(this.state.curstep>=2){let e=[];for(let a=0;a{Object(a.Tb)(t,((t,i)=>{sessionStorage.setItem("step2",JSON.stringify(e)),this.setState({card_visible:!0,curstep:3})}),(e=>{c.a.error(e)}))}))}if(3==this.state.curstep){if(this.state.direct_reseller_id<=0)return void c.a.error("\u8bf7\u6dfb\u52a0\u6620\u5c04\u5206\u9500\u5546");let e=this.refs.step3.submit();if(!e)return;{let t={info:JSON.parse(sessionStorage.getItem("step1")),key:JSON.parse(sessionStorage.getItem("step2")),theme:e,complete:!0},i=sessionStorage.getItem("plan_id");Object(a.d)(i,t).then((e=>{Object(a.Tb)(e,((e,i)=>{let s=t.info.reseller_id;Object(a.vb)(s).then((e=>{Object(a.Tb)(e,((e,t)=>{this.setState({phone_list:e.contact_phone,reseller:e,email_list:e.contact_email,audit_visible:!0})}))}))}),(e=>{c.a.error(e)}))}))}}}addNewkey(){let e="step2-"+this.state.keys.length;this.state.keys.push(e),this.setState({isload:!0,keys:this.state.keys}),6==this.refs[this.state.keys[0]].state.model.style?this.setState({keyStyle:6,whiteStyle:!0}):this.setState({whiteStyle:!1,keyStyle:1})}onStyleChange(e){if(6==e.target.value){this.setState({keyStyle:6,whiteStyle:!0}),sessionStorage.setItem("white",1);for(let e=0;e0&&this.refs[this.state.keys[e]].setkeyStyle(6)}else{sessionStorage.setItem("white",3);for(let e=0;e0&&this.refs[this.state.keys[e]].setkeyStyle(1);this.setState({whiteStyle:!1})}}onPhoneChange(e){this.setState({phone_radio:e.target.value})}onEmailChange(e){this.setState({email_radio:e.target.value})}cancel(e){this.setState({audit_visible:!1})}closeStep(e){this.state.keys[e]="",this.setState({keys:this.state.keys})}getStep3Theme(){this.state.card_visible&&this.refs.step3.getThemeData()}send(e){let t=sessionStorage.getItem("plan_id"),i={phone:this.state.phone_radio>-1?this.state.phone_list[this.state.phone_radio]:this.state.phone,email:this.state.email_radio>-1?this.state.email_list[this.state.email_radio]:this.state.email};new RegExp("^[1][3,4,5,6,7,8,9][0-9]{9}$").test(i.phone)?Object(a.dc)(t,i).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.success("\u53d1\u9001\u6210\u529f,\u8bf7\u57281-2\u5206\u949f\u540e\u67e5\u770b"),this.props.history.push("/home/plan-list/")}),(e=>{c.a.error(e),this.props.history.push("/home/plan-list/")}))})):c.a.error("\u624b\u673a\u53f7\u683c\u5f0f\u4e0d\u6b63\u786e")}render(){return Object(h.jsxDEV)("div",{id:"plan-add",children:[Object(h.jsxDEV)("div",{className:"plan-left",children:this.state.menuList.map(((e,t)=>Object(h.jsxDEV)("div",{className:"box-item",children:[Object(h.jsxDEV)("div",{className:"main-title",children:e.title},void 0,!1,{fileName:xs,lineNumber:325,columnNumber:17},this),e.child.map(((t,i)=>Object(h.jsxDEV)("div",{className:"title-inline",children:[Object(h.jsxDEV)("div",{className:this.state.curstep>=e.id?"child-title active":"child-title",children:[t.title," "]},t.title,!0,{fileName:xs,lineNumber:329,columnNumber:23},this),this.state.curstep>=e.id?Object(h.jsxDEV)(g.a,{type:"check",className:"checkIcon"},void 0,!1,{fileName:xs,lineNumber:338,columnNumber:25},this):null]},i,!0,{fileName:xs,lineNumber:328,columnNumber:21},this))),Object(h.jsxDEV)("div",{className:"under-line"},void 0,!1,{fileName:xs,lineNumber:343,columnNumber:17},this)]},e.title,!0,{fileName:xs,lineNumber:324,columnNumber:15},this)))},void 0,!1,{fileName:xs,lineNumber:321,columnNumber:9},this),Object(h.jsxDEV)("div",{className:"plan-right",children:Object(h.jsxDEV)("div",{className:"action-panel",children:[Object(h.jsxDEV)("div",{id:"step1",className:"step1",children:[Object(h.jsxDEV)("div",{className:"plan-title",children:"\u8425\u9500\u8ba1\u5212"},void 0,!1,{fileName:xs,lineNumber:351,columnNumber:15},this),Object(h.jsxDEV)(d.a,{style:{width:"100%"},title:this.state.step1_pagetitle,children:Object(h.jsxDEV)(as,{ref:"step1",setTlementType:e=>this.setTlementType(e),setTlementData:e=>this.setTlementData(e),onGetDirectResellerId:e=>this.getDirectResellerId(e)},void 0,!1,{fileName:xs,lineNumber:353,columnNumber:17},this)},void 0,!1,{fileName:xs,lineNumber:352,columnNumber:15},this)]},void 0,!0,{fileName:xs,lineNumber:350,columnNumber:13},this),this.state.curstep>=2?Object(h.jsxDEV)("div",{id:"step2",className:"step2",children:[Object(h.jsxDEV)("div",{className:"plan-title",children:"key"},void 0,!1,{fileName:xs,lineNumber:364,columnNumber:17},this),this.state.keys.map(((e,t)=>e?Object(h.jsxDEV)(d.a,{style:{width:"100%",height:"auto",marginBottom:"10px"},title:this.state.step2_pagetitle,action:t>0?Object(h.jsxDEV)("span",{className:"zent-link",target:"_blank",onClick:e=>{this.closeStep(t)},children:"\u5173\u95ed"},void 0,!1,{fileName:xs,lineNumber:377,columnNumber:27},this):null,children:Object(h.jsxDEV)(gs,{ref:e,addNewkey:()=>{this.addNewkey()},onStyleChange:e=>{this.onStyleChange(e)},step_id:t,getStep3Theme:()=>this.getStep3Theme(),keyStyle:this.state.keyStyle,keyType:this.state.keyType,setKeyType:e=>this.setState({keyType:e}),isload:this.state.isload,curstep:this.state.curstep,direct_reseller_id:this.state.direct_reseller_id,name:t,whiteStyle:this.state.whiteStyle,isSettlement:this.state.isSettlement,settlementData:this.state.settlementData},void 0,!1,{fileName:xs,lineNumber:389,columnNumber:23},this)},t,!1,{fileName:xs,lineNumber:367,columnNumber:21},this):null))]},void 0,!0,{fileName:xs,lineNumber:363,columnNumber:15},this):null,this.state.card_visible?Object(h.jsxDEV)("div",{id:"step3",className:"step3",children:Object(h.jsxDEV)(d.a,{style:{width:"100%",height:"auto"},title:this.state.step3_pagetitle,children:Object(h.jsxDEV)(_s,{ref:"step3"},void 0,!1,{fileName:xs,lineNumber:419,columnNumber:19},this)},void 0,!1,{fileName:xs,lineNumber:418,columnNumber:17},this)},void 0,!1,{fileName:xs,lineNumber:417,columnNumber:15},this):null,3==this.state.curstep?Object(h.jsxDEV)("div",{className:"step-btn-group",children:[Object(h.jsxDEV)(u.a,{type:"primary",onClick:()=>this.onNextStep(),children:"\u63d0\u4ea4\u5ba1\u6838"},void 0,!1,{fileName:xs,lineNumber:426,columnNumber:17},this),Object(h.jsxDEV)(u.a,{type:"normal",onClick:()=>this.onReturn(),children:"\u53d6\u6d88"},void 0,!1,{fileName:xs,lineNumber:429,columnNumber:17},this)]},void 0,!0,{fileName:xs,lineNumber:425,columnNumber:15},this):Object(h.jsxDEV)("div",{className:"step-btn-group",children:[Object(h.jsxDEV)(u.a,{type:"primary",onClick:()=>this.onNextStep(),children:"\u4e0b\u4e00\u6b65"},void 0,!1,{fileName:xs,lineNumber:435,columnNumber:17},this),Object(h.jsxDEV)(u.a,{type:"normal",onClick:()=>this.onReturn(),children:"\u53d6\u6d88"},void 0,!1,{fileName:xs,lineNumber:438,columnNumber:17},this)]},void 0,!0,{fileName:xs,lineNumber:434,columnNumber:15},this),this.state.audit_visible?Object(h.jsxDEV)("div",{className:"audit",children:[Object(h.jsxDEV)("div",{className:"modal",children:" "},void 0,!1,{fileName:xs,lineNumber:446,columnNumber:17},this),Object(h.jsxDEV)("div",{className:"audit-box",children:[Object(h.jsxDEV)(g.a,{type:"close",className:"audit-close",onClick:e=>{this.setState({audit_visible:!1})}},void 0,!1,{fileName:xs,lineNumber:448,columnNumber:19},this),Object(h.jsxDEV)("div",{className:"audit-box-title",children:"\u63d0\u4ea4\u5ba1\u6838"},void 0,!1,{fileName:xs,lineNumber:455,columnNumber:19},this),Object(h.jsxDEV)("div",{className:"payType",children:Object(h.jsxDEV)(Q.a,{onChange:e=>{this.onPayTypeChange(e)},value:this.state.paytype,className:"audit-obj",children:[Object(h.jsxDEV)(Z.a,{value:3,children:"\u9884\u4ed8\u6b3e\u6263\u9664"},void 0,!1,{fileName:xs,lineNumber:464,columnNumber:23},this),Object(h.jsxDEV)(Z.a,{value:1,children:"\u5bf9\u79c1\u8d26\u6237"},void 0,!1,{fileName:xs,lineNumber:465,columnNumber:23},this),Object(h.jsxDEV)(Z.a,{value:2,children:"\u5bf9\u516c\u8d26\u6237"},void 0,!1,{fileName:xs,lineNumber:466,columnNumber:23},this)]},void 0,!0,{fileName:xs,lineNumber:457,columnNumber:21},this)},void 0,!1,{fileName:xs,lineNumber:456,columnNumber:19},this),Object(h.jsxDEV)("div",{className:"audit-btn-group",children:[Object(h.jsxDEV)(u.a,{onClick:e=>{this.setState({audit_visible:!1})},children:"\u53d6\u6d88"},void 0,!1,{fileName:xs,lineNumber:470,columnNumber:21},this),Object(h.jsxDEV)(u.a,{type:"primary",onClick:e=>{this.onConfirm(e)},children:"\u786e\u5b9a"},void 0,!1,{fileName:xs,lineNumber:477,columnNumber:21},this)]},void 0,!0,{fileName:xs,lineNumber:469,columnNumber:19},this)]},void 0,!0,{fileName:xs,lineNumber:447,columnNumber:17},this)]},void 0,!0,{fileName:xs,lineNumber:445,columnNumber:15},this):null]},void 0,!0,{fileName:xs,lineNumber:349,columnNumber:11},this)},void 0,!1,{fileName:xs,lineNumber:348,columnNumber:9},this)]},void 0,!0,{fileName:xs,lineNumber:320,columnNumber:7},this)}}i(251);var Os="/Users/zhangds/web/blue-brother/frontend/src/pages/plan/add/edit.js";class Ds extends m.a.Component{constructor(e){super(e),this.setTlementType=e=>{this.setState({isSettlement:e}),this.setState({keys:["step2-0"]}),this.refs["step2-0"]&&this.refs["step2-0"].clearTableData()},this.setTlementData=e=>{this.setState({settlementData:e}),this.setState({keys:["step2-0"]}),this.refs["step2-0"]&&this.refs["step2-0"].clearTableData()},this.getDirectResellerId=e=>{this.setState({direct_reseller_id:e.direct_reseller_id})},this.phoneChange=e=>{this.setState({phone:e.target.value})},this.emailChange=e=>{this.setState({email:e.target.value})},this.state={keys:[],step1_pagetitle:"\u4fee\u6539\u8ba1\u5212",step2_pagetitle:"\u751f\u6210key",step3_pagetitle:"\u7ed1\u5b9a\u5361\u5238",curstep:1,menuList:[{id:1,title:"\u8425\u9500\u8ba1\u5212",child:[{step:1,title:"\u65b0\u5efa\u8ba1\u5212"}]},{id:2,title:"key",child:[{step:1,title:"\u751f\u6210key"},{step:2,title:"\u7ed1\u5b9a\u5361\u5238"}]},{id:3,title:"\u843d\u5730\u9875",child:[{step:1,title:"\u7ed1\u5b9a\u843d\u5730\u9875"}]}],phone_list:[],email_list:[],phone:"",email:"",email_radio:-1,phone_radio:-1,audit_visible:!1,card_visible:!1,recall_visible:!1,step1_data:null,step2_data:null,step3_data:null,disabled:!1,disabled_time:!1,paytype:3,reseller:null,payment_direction:["\u5bf9\u79c1\u8d26\u6237","\u5bf9\u516c\u8d26\u6237","\u9884\u4ed8\u6b3e\u6263\u9664"],approvalLoading:!1,timer:3,theme_options:[],isload:!1,is_Edit:!1,whiteStyle:!1,btn_loading:!1,direct_reseller_id:0,keyType:1,isSettlement:2,settlementData:null}}submit(){this.refs.step1.submit()}onReturn(){let e=this;G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:" \u662f\u5426\u8fd4\u56de\u8ba1\u5212\u5217\u8868?"},void 0,!1,{fileName:Os,lineNumber:82,columnNumber:16},this),onConfirm:()=>{e.props.history.push("/home/plan-list/")},onCancel:this.onCancel,className:"questModal",parentComponent:this})}componentDidMount(e){let t=sessionStorage.getItem("bm_obj");if(t){let e=JSON.parse(t);e.settlement_type>0&&this.setState({isSettlement:1,settlementData:{key:e.settlement_type,text:e.settlement_type_text}})}let i=sessionStorage.getItem("plan_status");3!=i&&4!=i&&5!=i&&2!=i||this.setState({disabled:!0});let s=sessionStorage.getItem("plan_id"),l=sessionStorage.getItem("approval_id");Number(l)>0?Object(a.P)(l).then((e=>{Object(a.Tb)(e,((e,t)=>{try{Object(a.vb)(e.info.reseller_id).then((e=>{Object(a.Tb)(e,((e,t)=>{this.setState({direct_reseller_id:e.direct_reseller_id})}))}))}catch(i){}if(e.info&&(sessionStorage.setItem("step1",JSON.stringify(e.info)),this.refs.step1.edit(e.info)),e.keys.length>0&&0==this.state.disabled){this.setState({curstep:2}),e.keys=this.tranFormData(e);for(let t=0;t{for(let t=0;t{c.a.error(e)}))})):Object(a.bb)(s).then((e=>{Object(a.Tb)(e,((e,t)=>{if(Object(a.vb)(e.info.reseller_id).then((e=>{Object(a.Tb)(e,((e,t)=>{this.setState({direct_reseller_id:e.direct_reseller_id})}))})),e.info&&(sessionStorage.setItem("step1",JSON.stringify(e.info)),this.refs.step1.edit(e.info)),e.keys.length>0&&0==this.state.disabled){this.setState({curstep:2}),e.keys=this.tranFormData(e);for(let t=0;t{for(let t=0;t{c.a.error(e)}))}))}getStep3Theme(){this.state.card_visible&&this.refs.step3.getThemeData()}tranFormData(e){let t=Number(e.keys[0].bind_object[0]);return this.setState({keyType:t}),sessionStorage.setItem("keyType",t),e.keys}async onNextStep(){if(this.state.curstep>=1){if(!await this.refs.step1.submit())return;this.setState({curstep:2,isload:!0})}if(this.state.curstep>=2){let e=[];for(let a=0;a{Object(a.Tb)(t,((t,i)=>{sessionStorage.setItem("step2",JSON.stringify(e)),this.setState({card_visible:!0,curstep:3})}),(e=>{c.a.error(e)}))}))}if(3==this.state.curstep){let e=this.refs.step3.submit();if(!e)return;{let t={info:JSON.parse(sessionStorage.getItem("step1")),key:JSON.parse(sessionStorage.getItem("step2")),theme:e,complete:!0},i=sessionStorage.getItem("plan_id");Object(a.d)(i,t).then((e=>{Object(a.Tb)(e,((e,i)=>{let s=t.info.reseller_id;Object(a.vb)(s).then((e=>{Object(a.Tb)(e,((e,t)=>{this.setState({phone_list:e.contact_phone,reseller:e,email_list:e.contact_email,audit_visible:!0})}))}))}),(e=>{c.a.error(e)}))}))}}}addNewkey(){let e="step2-"+this.state.keys.length;this.state.keys.push(e),this.setState({isload:!0,keys:this.state.keys})}onPhoneChange(e){this.setState({phone_radio:e.target.value})}onEmailChange(e){this.setState({email_radio:e.target.value})}cancel(e){this.setState({audit_visible:!1})}closeStep(e){this.state.keys[e]="",this.setState({keys:this.state.keys})}send(e){let t=sessionStorage.getItem("plan_id"),i={phone:this.state.phone_radio>-1?this.state.phone_list[this.state.phone_radio]:this.state.phone,email:this.state.email_radio>-1?this.state.email_list[this.state.email_radio]:this.state.email};new RegExp("^[1][3,4,5,6,7,8,9][0-9]{9}$").test(i.phone)?Object(a.dc)(t,i).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.success("\u53d1\u9001\u6210\u529f,\u8bf7\u57281-2\u5206\u949f\u540e\u67e5\u770b"),this.props.history.push("/home/plan-list/")}),(e=>{c.a.success("\u53d1\u9001\u6210\u529f,\u8bf7\u57281-2\u5206\u949f\u540e\u67e5\u770b"),this.props.history.push("/home/plan-list/")}))})):c.a.error("\u624b\u673a\u53f7\u683c\u5f0f\u4e0d\u6b63\u786e")}async onEditInfo(){let e=sessionStorage.getItem("plan_id");this.state.is_Edit||(this.setState({is_Edit:!0}),await this.refs.step1.submit(e)?setTimeout((()=>{this.setState({is_Edit:!1}),this.props.history.push("/home/plan-list/")}),1500):this.setState({is_Edit:!1}))}onConfirm(e){if(1==this.state.btn_loading)return;this.setState({btn_loading:!0});let t=sessionStorage.getItem("plan_id");sessionStorage.getItem("plan_status");this.setState({audit_visible:!1});let i=sessionStorage.getItem("approval_id");if(i>0)Object(a.Q)(i).then((e=>{setTimeout((()=>{this.setState({btn_loading:!1})}),500),Object(a.Tb)(e,((e,i)=>{if(0==e.status&&this.setState({recall_visible:!0}),1==e.status&&(c.a.error("\u8fdb\u884c\u4e2d\u7684\u8ba1\u5212\u4e0d\u80fd\u63d0\u4ea4\u5ba1\u6838"),setTimeout((()=>{this.props.history.push("/home/plan-list/")}),2e3)),2==e.status||3==e.status){let e={reseller_id:this.state.reseller.id,reseller_name:this.state.reseller.name,company_name:this.state.reseller.company_name,receive_email:this.state.reseller.contact_email[0],payment_direction:this.state.payment_direction[this.state.paytype-1]};if(this.state.direct_reseller_id<=0)return void c.a.error("\u8bf7\u6dfb\u52a0\u6620\u5c04\u5206\u9500\u5546");Object(a.g)(t,e).then((e=>{Object(a.Tb)(e,((e,t)=>{this.setState({audit_visible:!1}),c.a.success("\u6210\u529f\u53d1\u8d77\u5ba1\u6279"),this.props.history.push("/home/plan-list/")}),(e=>{c.a.error(e)}))}))}}),(e=>{c.a.error(e)}))}));else{let e={reseller_id:this.state.reseller.id,reseller_name:this.state.reseller.name,company_name:this.state.reseller.company_name,receive_email:this.state.email_list[0],payment_direction:this.state.payment_direction[this.state.paytype-1]};Object(a.g)(t,e).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.success("\u6210\u529f\u53d1\u8d77\u5ba1\u6279"),this.setState({audit_visible:!1}),this.props.history.push("/home/plan-list/")}),(e=>{c.a.error(e)}))}))}}onPayTypeChange(e){this.setState({paytype:e.target.value})}onReCall(){let e=sessionStorage.getItem("approval_id");this.setState({recall_visible:!1}),Object(a.bd)(e).then((e=>{Object(a.Tb)(e,((e,t)=>{this.setState({approvalLoading:!0});let i=setInterval((()=>{this.state.timer<=0&&(clearInterval(i),this.setState({approvalLoading:!1}),c.a.success("\u64a4\u9500\u6210\u529f,\u8bf7\u91cd\u65b0\u63d0\u4ea4\u5ba1\u6838"));let e=this.state.timer-1;this.setState({timer:e})}),1e3)}),(e=>{c.a.error(e)}))}))}onStyleChange(e){if(6==e.target.value){this.setState({keyStyle:6,whiteStyle:!0}),sessionStorage.setItem("white",1);for(let e=0;e0&&this.refs[this.state.keys[e]].setkeyStyle(6)}else{sessionStorage.setItem("white",3);for(let e=0;e0&&this.refs[this.state.keys[e]].setkeyStyle(1);this.setState({whiteStyle:!1})}}render(){return Object(h.jsxDEV)("div",{id:"plan-edit",children:this.state.disabled?Object(h.jsxDEV)("div",{className:"plan-main",children:Object(h.jsxDEV)("div",{className:"action-panel",children:[Object(h.jsxDEV)("div",{id:"step1",className:"step1",children:[Object(h.jsxDEV)("div",{className:"plan-title",children:"\u8425\u9500\u8ba1\u5212"},void 0,!1,{fileName:Os,lineNumber:581,columnNumber:17},this),Object(h.jsxDEV)(d.a,{style:{width:"100%"},title:this.state.step1_pagetitle,children:Object(h.jsxDEV)(as,{ref:"step1",data:this.state.step1_data,disabled:this.state.disabled},void 0,!1,{fileName:Os,lineNumber:583,columnNumber:19},this)},void 0,!1,{fileName:Os,lineNumber:582,columnNumber:17},this)]},void 0,!0,{fileName:Os,lineNumber:580,columnNumber:15},this),Object(h.jsxDEV)("div",{className:"step-btn-group",children:[Object(h.jsxDEV)(u.a,{type:"primary",onClick:()=>this.onEditInfo(),children:"\u4fee\u6539"},void 0,!1,{fileName:Os,lineNumber:587,columnNumber:17},this),Object(h.jsxDEV)(u.a,{type:"normal",onClick:()=>this.onReturn(),children:"\u53d6\u6d88"},void 0,!1,{fileName:Os,lineNumber:590,columnNumber:17},this)]},void 0,!0,{fileName:Os,lineNumber:586,columnNumber:15},this)]},void 0,!0,{fileName:Os,lineNumber:579,columnNumber:13},this)},void 0,!1,{fileName:Os,lineNumber:578,columnNumber:11},this):Object(h.jsxDEV)("div",{className:"plan-main",children:[Object(h.jsxDEV)("div",{className:"plan-left",style:{top:"60px"},children:this.state.menuList.map(((e,t)=>Object(h.jsxDEV)("div",{className:"box-item",children:[Object(h.jsxDEV)("div",{className:"main-title",children:e.title},void 0,!1,{fileName:Os,lineNumber:602,columnNumber:21},this),e.child.map(((t,i)=>Object(h.jsxDEV)("div",{className:"title-inline",children:[Object(h.jsxDEV)("div",{className:this.state.curstep>=e.id?"child-title active":"child-title",children:[t.title," "]},t.title,!0,{fileName:Os,lineNumber:606,columnNumber:27},this),this.state.curstep>=e.id?Object(h.jsxDEV)(g.a,{type:"check",className:"checkIcon"},void 0,!1,{fileName:Os,lineNumber:615,columnNumber:29},this):null]},i,!0,{fileName:Os,lineNumber:605,columnNumber:25},this))),Object(h.jsxDEV)("div",{className:"under-line"},void 0,!1,{fileName:Os,lineNumber:620,columnNumber:21},this)]},e.title,!0,{fileName:Os,lineNumber:601,columnNumber:19},this)))},void 0,!1,{fileName:Os,lineNumber:598,columnNumber:13},this),Object(h.jsxDEV)("div",{className:"plan-right",children:Object(h.jsxDEV)("div",{className:"action-panel",children:[Object(h.jsxDEV)("div",{id:"step1",className:"step1",children:[Object(h.jsxDEV)("div",{className:"plan-title",children:"\u8425\u9500\u8ba1\u5212"},void 0,!1,{fileName:Os,lineNumber:629,columnNumber:19},this),Object(h.jsxDEV)(d.a,{style:{width:"100%"},title:this.state.step1_pagetitle,children:Object(h.jsxDEV)(as,{ref:"step1",data:this.state.step1_data,disabled:this.state.disabled,onGetDirectResellerId:e=>this.getDirectResellerId(e),setTlementType:e=>this.setTlementType(e),setTlementData:e=>this.setTlementData(e)},void 0,!1,{fileName:Os,lineNumber:631,columnNumber:21},this)},void 0,!1,{fileName:Os,lineNumber:630,columnNumber:19},this)]},void 0,!0,{fileName:Os,lineNumber:628,columnNumber:17},this),this.state.curstep>=2?Object(h.jsxDEV)("div",{id:"step2",className:"step2",children:[Object(h.jsxDEV)("div",{className:"plan-title",children:"key"},void 0,!1,{fileName:Os,lineNumber:644,columnNumber:21},this),this.state.keys.map(((e,t)=>e?Object(h.jsxDEV)(d.a,{style:{width:"100%",height:"auto",marginBottom:"10px"},title:this.state.step2_pagetitle,action:t>0?Object(h.jsxDEV)("span",{className:"zent-link",target:"_blank",onClick:e=>{this.closeStep(t)},children:"\u5173\u95ed"},void 0,!1,{fileName:Os,lineNumber:656,columnNumber:31},this):null,children:Object(h.jsxDEV)(gs,{ref:"step2-"+t,addNewkey:()=>{this.addNewkey()},name:t,onStyleChange:e=>{this.onStyleChange(e)},is_Edit:!0,step_id:t,keyType:this.state.keyType,setKeyType:e=>this.setState({keyType:e}),getStep3Theme:()=>this.getStep3Theme(),curstep:this.state.curstep,whiteStyle:this.state.whiteStyle,keyStyle:this.state.keyStyle,isload:this.state.isload,data:e,direct_reseller_id:this.state.direct_reseller_id,disabled:this.state.disabled,isSettlement:this.state.isSettlement,settlementData:this.state.settlementData},void 0,!1,{fileName:Os,lineNumber:668,columnNumber:27},this)},void 0,!1,{fileName:Os,lineNumber:647,columnNumber:25},this):null))]},void 0,!0,{fileName:Os,lineNumber:643,columnNumber:19},this):null,this.state.card_visible?Object(h.jsxDEV)("div",{id:"step3",className:"step3",children:Object(h.jsxDEV)(d.a,{style:{width:"100%",height:"auto"},title:this.state.step3_pagetitle,children:Object(h.jsxDEV)(_s,{ref:"step3",data:this.state.step3_data,options:this.state.theme_options,disabled:this.state.disabled},void 0,!1,{fileName:Os,lineNumber:704,columnNumber:23},this)},void 0,!1,{fileName:Os,lineNumber:700,columnNumber:21},this)},void 0,!1,{fileName:Os,lineNumber:699,columnNumber:19},this):null,this.state.card_visible?Object(h.jsxDEV)("div",{className:"step-btn-group",children:[Object(h.jsxDEV)(u.a,{type:"primary",onClick:()=>this.onNextStep(),disabled:this.state.disabled,children:"\u63d0\u4ea4\u5ba1\u6838"},void 0,!1,{fileName:Os,lineNumber:716,columnNumber:21},this),Object(h.jsxDEV)(u.a,{type:"normal",onClick:()=>this.onReturn(),children:"\u53d6\u6d88"},void 0,!1,{fileName:Os,lineNumber:723,columnNumber:21},this)]},void 0,!0,{fileName:Os,lineNumber:715,columnNumber:19},this):Object(h.jsxDEV)("div",{className:"step-btn-group",children:[Object(h.jsxDEV)(u.a,{type:"primary",onClick:()=>this.onNextStep(),disabled:this.state.disabled,children:"\u4e0b\u4e00\u6b65"},void 0,!1,{fileName:Os,lineNumber:729,columnNumber:21},this),Object(h.jsxDEV)(u.a,{type:"normal",onClick:()=>this.onReturn(),children:"\u53d6\u6d88"},void 0,!1,{fileName:Os,lineNumber:736,columnNumber:21},this)]},void 0,!0,{fileName:Os,lineNumber:728,columnNumber:19},this),this.state.audit_visible?Object(h.jsxDEV)("div",{className:"audit",children:[Object(h.jsxDEV)("div",{className:"modal",children:" "},void 0,!1,{fileName:Os,lineNumber:744,columnNumber:21},this),Object(h.jsxDEV)("div",{className:"audit-box",children:[Object(h.jsxDEV)(g.a,{type:"close",className:"audit-close",onClick:e=>{this.setState({audit_visible:!1})}},void 0,!1,{fileName:Os,lineNumber:746,columnNumber:23},this),Object(h.jsxDEV)("div",{className:"audit-box-title",children:"\u63d0\u4ea4\u5ba1\u6838"},void 0,!1,{fileName:Os,lineNumber:753,columnNumber:23},this),Object(h.jsxDEV)("div",{className:"payType",children:Object(h.jsxDEV)(Q.a,{onChange:e=>{this.onPayTypeChange(e)},value:this.state.paytype,className:"audit-obj",children:[Object(h.jsxDEV)(Z.a,{value:3,children:"\u9884\u4ed8\u6b3e\u6263\u9664"},void 0,!1,{fileName:Os,lineNumber:762,columnNumber:27},this),Object(h.jsxDEV)(Z.a,{value:1,children:"\u5bf9\u79c1\u8d26\u6237"},void 0,!1,{fileName:Os,lineNumber:763,columnNumber:27},this),Object(h.jsxDEV)(Z.a,{value:2,children:"\u5bf9\u516c\u8d26\u6237"},void 0,!1,{fileName:Os,lineNumber:764,columnNumber:27},this)]},void 0,!0,{fileName:Os,lineNumber:755,columnNumber:25},this)},void 0,!1,{fileName:Os,lineNumber:754,columnNumber:23},this),Object(h.jsxDEV)("div",{className:"audit-btn-group",children:[Object(h.jsxDEV)(u.a,{onClick:e=>{this.setState({audit_visible:!1})},children:"\u53d6\u6d88"},void 0,!1,{fileName:Os,lineNumber:768,columnNumber:25},this),Object(h.jsxDEV)(u.a,{type:"primary",onClick:e=>{this.onConfirm(e)},children:"\u786e\u5b9a"},void 0,!1,{fileName:Os,lineNumber:775,columnNumber:25},this)]},void 0,!0,{fileName:Os,lineNumber:767,columnNumber:23},this)]},void 0,!0,{fileName:Os,lineNumber:745,columnNumber:21},this)]},void 0,!0,{fileName:Os,lineNumber:743,columnNumber:19},this):null,this.state.recall_visible?Object(h.jsxDEV)("div",{className:"audit",children:[Object(h.jsxDEV)("div",{className:"modal",children:" "},void 0,!1,{fileName:Os,lineNumber:790,columnNumber:21},this),Object(h.jsxDEV)("div",{className:"audit-box",children:[Object(h.jsxDEV)(g.a,{type:"close",className:"audit-close",onClick:e=>{this.onReturn(e)}},void 0,!1,{fileName:Os,lineNumber:792,columnNumber:23},this),Object(h.jsxDEV)("div",{className:"audit-box-title",children:"\u5ba1\u6838\u4e2d"},void 0,!1,{fileName:Os,lineNumber:799,columnNumber:23},this),Object(h.jsxDEV)("div",{className:"audit-box-txt",children:"\u63d0\u4ea4\u5ba1\u6838\u4f1a\u5c06\u539f\u6765\u5ba1\u6279\u64a4\u56de\u624d\u53ef\u8fdb\u884c\u63d0\u4ea4,\u662f\u5426\u64a4\u56de?"},void 0,!1,{fileName:Os,lineNumber:800,columnNumber:23},this),Object(h.jsxDEV)("div",{className:"audit-btn-group",children:[Object(h.jsxDEV)(u.a,{onClick:e=>{this.setState({recall_visible:!1})},children:"\u53d6\u6d88"},void 0,!1,{fileName:Os,lineNumber:804,columnNumber:25},this),Object(h.jsxDEV)(u.a,{type:"primary",onClick:e=>{this.onReCall(e)},children:"\u786e\u5b9a"},void 0,!1,{fileName:Os,lineNumber:811,columnNumber:25},this)]},void 0,!0,{fileName:Os,lineNumber:803,columnNumber:23},this)]},void 0,!0,{fileName:Os,lineNumber:791,columnNumber:21},this)]},void 0,!0,{fileName:Os,lineNumber:789,columnNumber:19},this):null,this.state.approvalLoading?Object(h.jsxDEV)("div",{className:"audit",children:[Object(h.jsxDEV)("div",{className:"modal",children:" "},void 0,!1,{fileName:Os,lineNumber:826,columnNumber:21},this),Object(h.jsxDEV)("div",{className:"audit-box",children:[Object(h.jsxDEV)("div",{className:"audit-box-title",children:"\u64a4\u9500\u5ba1\u6279\u4e2d"},void 0,!1,{fileName:Os,lineNumber:828,columnNumber:23},this),Object(h.jsxDEV)("div",{className:"audit-box-txt",children:["\u6b63\u5728\u53d1\u8d77\u64a4\u9500...,\u8bf7\u7b49\u5f85",Object(h.jsxDEV)("span",{style:{color:"red"},children:[" ",this.state.timer]},void 0,!0,{fileName:Os,lineNumber:831,columnNumber:25},this),"\u79d2"]},void 0,!0,{fileName:Os,lineNumber:829,columnNumber:23},this)]},void 0,!0,{fileName:Os,lineNumber:827,columnNumber:21},this)]},void 0,!0,{fileName:Os,lineNumber:825,columnNumber:19},this):null]},void 0,!0,{fileName:Os,lineNumber:627,columnNumber:15},this)},void 0,!1,{fileName:Os,lineNumber:626,columnNumber:13},this)]},void 0,!0,{fileName:Os,lineNumber:597,columnNumber:11},this)},void 0,!1,{fileName:Os,lineNumber:576,columnNumber:7},this)}}var Es="/Users/zhangds/web/blue-brother/frontend/src/pages/plan/add/plan-copy.js";class Vs extends m.a.Component{constructor(e){super(e),this.setTlementType=e=>{this.setState({isSettlement:e}),this.setState({keys:["step2-0"]}),this.refs["step2-0"].clearTableData()},this.setTlementData=e=>{this.setState({settlementData:e}),this.setState({keys:["step2-0"]}),this.refs["step2-0"].clearTableData()},this.phoneChange=e=>{this.setState({phone:e.target.value})},this.emailChange=e=>{this.setState({email:e.target.value})},this.getDirectResellerId=e=>{this.setState({direct_reseller_id:e.direct_reseller_id})},this.state={keys:[],step1_pagetitle:"\u65b0\u5efa\u8ba1\u5212",step2_pagetitle:"\u751f\u6210key",step3_pagetitle:"\u7ed1\u5b9a\u843d\u5730\u9875",curstep:1,menuList:[{id:1,title:"\u8425\u9500\u8ba1\u5212",child:[{step:1,title:"\u65b0\u5efa\u8ba1\u5212"}]},{id:2,title:"key",child:[{step:1,title:"\u751f\u6210key"},{step:2,title:"\u7ed1\u5b9a\u5361\u5238"}]},{id:3,title:"\u843d\u5730\u9875",child:[{step:1,title:"\u7ed1\u5b9a\u843d\u5730\u9875"}]}],phone_list:[],email_list:[],phone:"",email:"",email_radio:-1,phone_radio:-1,audit_visible:!1,card_visible:!1,step1:null,paytype:3,reseller:"",payment_direction:["\u5bf9\u79c1\u8d26\u6237","\u5bf9\u516c\u8d26\u6237","\u9884\u4ed8\u6b3e\u6263\u9664"],isload:!1,is_audit:!1,whiteStyle:!1,keyStyle:1,direct_reseller_id:0,step1_data:null,step2_data:null,step3_data:null,disabled:!1,keyType:1,isSettlement:2,settlementData:null}}submit(){this.refs.step1.submit()}onReturn(){let e=this;G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:" \u662f\u5426\u8fd4\u56de\u8ba1\u5212\u5217\u8868?"},void 0,!1,{fileName:Es,lineNumber:75,columnNumber:16},this),onConfirm:()=>{e.props.history.push("/home/plan-list/")},onCancel:this.onCancel,className:"questModal",parentComponent:this})}componentDidMount(e){let t=sessionStorage.getItem("bm_obj");if(t){let e=JSON.parse(t);e.settlement_type>0&&this.setState({isSettlement:1,settlementData:{key:e.settlement_type,text:e.settlement_type_text}})}sessionStorage.setItem("plan_id","");let i=sessionStorage.getItem("plan_id_copy");this.setState({plan_id_detail:i}),this.getDetails(i)}getDetails(e){let t=sessionStorage.getItem("copy_count_golod");Object(a.Lb)(e).then((e=>{Object(a.Tb)(e,((e,i)=>{if(Object(a.vb)(e.info.reseller_id).then((e=>{Object(a.Tb)(e,((e,t)=>{this.setState({direct_reseller_id:e.direct_reseller_id})}))})),e.info&&(e.info.title=`${e.info.title}_${Number(t)+1}`.substring(0,12),sessionStorage.setItem("step1",JSON.stringify(e.info)),this.refs.step1.edit(e.info)),e.keys.length>0&&0==this.state.disabled){this.setState({curstep:2}),e.keys=this.tranFormData(e);for(let t=0;t{for(let t=0;t{c.a.error(e)}))}))}tranFormData(e){let t=Number(e.keys[0].bind_object[0]);return this.setState({keyType:t}),sessionStorage.setItem("keyType",t),e.keys}getStep3Theme(){this.state.card_visible&&this.refs.step3.getThemeData()}onConfirm(e){let t=sessionStorage.getItem("plan_id");this.setState({audit_visible:!1,is_audit:!0});let i={reseller_id:this.state.reseller.id,reseller_name:this.state.reseller.name,company_name:this.state.reseller.company_name,receive_email:this.state.email_list[0],payment_direction:this.state.payment_direction[this.state.paytype-1]};Object(a.g)(t,i).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.success("\u6210\u529f\u53d1\u8d77\u5ba1\u6279"),this.props.history.push("/home/plan-list/"),this.setState({is_audit:!1})}),(e=>{c.a.error(e)}))}))}onPayTypeChange(e){this.setState({paytype:e.target.value})}async onNextStep(){if(this.state.curstep>=1){if(1!=await this.refs.step1.submit())return;this.setState({curstep:2,isload:!0})}if(this.state.curstep>=2){let e=[];for(let a=0;a{Object(a.Tb)(t,((t,i)=>{sessionStorage.setItem("step2",JSON.stringify(e)),this.setState({card_visible:!0,curstep:3})}),(e=>{c.a.error(e)}))}))}if(3==this.state.curstep){if(this.state.direct_reseller_id<=0)return void c.a.error("\u8bf7\u6dfb\u52a0\u6620\u5c04\u5206\u9500\u5546");let e=this.refs.step3.submit();if(!e)return;{let t={info:JSON.parse(sessionStorage.getItem("step1")),key:JSON.parse(sessionStorage.getItem("step2")),theme:e,complete:!0},i=sessionStorage.getItem("plan_id");Object(a.d)(i,t).then((e=>{Object(a.Tb)(e,((e,i)=>{let s=t.info.reseller_id;Object(a.vb)(s).then((e=>{Object(a.Tb)(e,((e,t)=>{this.setState({phone_list:e.contact_phone,reseller:e,email_list:e.contact_email,audit_visible:!0})}))}))}),(e=>{c.a.error(e)}))}))}}}addNewkey(){let e="step2-"+this.state.keys.length;this.state.keys.push(e),this.setState({isload:!0,keys:this.state.keys}),6==this.refs[this.state.keys[0]].state.model.style?this.setState({keyStyle:6,whiteStyle:!0}):this.setState({whiteStyle:!1,keyStyle:1})}onStyleChange(e){if(6==e.target.value){this.setState({keyStyle:6,whiteStyle:!0}),sessionStorage.setItem("white",1);for(let e=0;e0&&this.refs[this.state.keys[e]].setkeyStyle(6)}else{sessionStorage.setItem("white",3);for(let e=0;e0&&this.refs[this.state.keys[e]].setkeyStyle(1);this.setState({whiteStyle:!1})}}onPhoneChange(e){this.setState({phone_radio:e.target.value})}onEmailChange(e){this.setState({email_radio:e.target.value})}cancel(e){this.setState({audit_visible:!1})}closeStep(e){this.state.keys[e]="",this.setState({keys:this.state.keys})}send(e){let t=sessionStorage.getItem("plan_id"),i={phone:this.state.phone_radio>-1?this.state.phone_list[this.state.phone_radio]:this.state.phone,email:this.state.email_radio>-1?this.state.email_list[this.state.email_radio]:this.state.email};new RegExp("^[1][3,4,5,6,7,8,9][0-9]{9}$").test(i.phone)?Object(a.dc)(t,i).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.success("\u53d1\u9001\u6210\u529f,\u8bf7\u57281-2\u5206\u949f\u540e\u67e5\u770b"),this.props.history.push("/home/plan-list/")}),(e=>{c.a.error(e),this.props.history.push("/home/plan-list/")}))})):c.a.error("\u624b\u673a\u53f7\u683c\u5f0f\u4e0d\u6b63\u786e")}render(){return Object(h.jsxDEV)("div",{id:"plan-add",children:[Object(h.jsxDEV)("div",{className:"plan-left",style:{paddingTop:"125px"},children:this.state.menuList.map(((e,t)=>Object(h.jsxDEV)("div",{className:"box-item",children:[Object(h.jsxDEV)("div",{className:"main-title",children:e.title},void 0,!1,{fileName:Es,lineNumber:412,columnNumber:17},this),e.child.map(((t,i)=>Object(h.jsxDEV)("div",{className:"title-inline",children:[Object(h.jsxDEV)("div",{className:this.state.curstep>=e.id?"child-title active":"child-title",children:[t.title," "]},t.title,!0,{fileName:Es,lineNumber:416,columnNumber:23},this),this.state.curstep>=e.id?Object(h.jsxDEV)(g.a,{type:"check",className:"checkIcon"},void 0,!1,{fileName:Es,lineNumber:425,columnNumber:25},this):null]},i,!0,{fileName:Es,lineNumber:415,columnNumber:21},this))),Object(h.jsxDEV)("div",{className:"under-line"},void 0,!1,{fileName:Es,lineNumber:430,columnNumber:17},this)]},e.title,!0,{fileName:Es,lineNumber:411,columnNumber:15},this)))},void 0,!1,{fileName:Es,lineNumber:408,columnNumber:9},this),Object(h.jsxDEV)("div",{className:"plan-right",children:Object(h.jsxDEV)("div",{className:"action-panel",children:[Object(h.jsxDEV)("div",{id:"step1",className:"step1",children:[Object(h.jsxDEV)("div",{className:"plan-title",children:"\u8425\u9500\u8ba1\u5212"},void 0,!1,{fileName:Es,lineNumber:438,columnNumber:15},this),Object(h.jsxDEV)(d.a,{style:{width:"100%"},title:this.state.step1_pagetitle,children:Object(h.jsxDEV)(as,{ref:"step1",data:this.state.step1_data,onGetDirectResellerId:e=>this.getDirectResellerId(e),setTlementType:e=>this.setTlementType(e),setTlementData:e=>this.setTlementData(e)},void 0,!1,{fileName:Es,lineNumber:440,columnNumber:17},this)},void 0,!1,{fileName:Es,lineNumber:439,columnNumber:15},this)]},void 0,!0,{fileName:Es,lineNumber:437,columnNumber:13},this),this.state.curstep>=2?Object(h.jsxDEV)("div",{id:"step2",className:"step2",children:[Object(h.jsxDEV)("div",{className:"plan-title",children:"key"},void 0,!1,{fileName:Es,lineNumber:452,columnNumber:17},this),this.state.keys.map(((e,t)=>e?Object(h.jsxDEV)(d.a,{style:{width:"100%",height:"auto",marginBottom:"10px"},title:this.state.step2_pagetitle,action:t>0?Object(h.jsxDEV)("span",{className:"zent-link",target:"_blank",onClick:e=>{this.closeStep(t)},children:"\u5173\u95ed"},void 0,!1,{fileName:Es,lineNumber:465,columnNumber:27},this):null,children:Object(h.jsxDEV)(gs,{ref:e,addNewkey:()=>{this.addNewkey()},onStyleChange:e=>{this.onStyleChange(e)},step_id:t,keyStyle:this.state.keyStyle,getStep3Theme:()=>this.getStep3Theme(),curstep:this.state.curstep,keyType:this.state.keyType,setKeyType:e=>this.setState({keyType:e}),isCopy:!0,isload:this.state.isload,direct_reseller_id:this.state.direct_reseller_id,name:t,whiteStyle:this.state.whiteStyle,isSettlement:this.state.isSettlement,settlementData:this.state.settlementData},void 0,!1,{fileName:Es,lineNumber:477,columnNumber:23},this)},t,!1,{fileName:Es,lineNumber:455,columnNumber:21},this):null))]},void 0,!0,{fileName:Es,lineNumber:451,columnNumber:15},this):null,this.state.card_visible?Object(h.jsxDEV)("div",{id:"step3",className:"step3",children:Object(h.jsxDEV)(d.a,{style:{width:"100%",height:"auto"},title:this.state.step3_pagetitle,children:Object(h.jsxDEV)(_s,{ref:"step3"},void 0,!1,{fileName:Es,lineNumber:508,columnNumber:19},this)},void 0,!1,{fileName:Es,lineNumber:507,columnNumber:17},this)},void 0,!1,{fileName:Es,lineNumber:506,columnNumber:15},this):null,3==this.state.curstep?Object(h.jsxDEV)("div",{className:"step-btn-group",children:[Object(h.jsxDEV)(u.a,{type:"primary",onClick:()=>this.onNextStep(),children:"\u63d0\u4ea4\u5ba1\u6838"},void 0,!1,{fileName:Es,lineNumber:515,columnNumber:17},this),Object(h.jsxDEV)(u.a,{type:"normal",onClick:()=>this.onReturn(),children:"\u53d6\u6d88"},void 0,!1,{fileName:Es,lineNumber:518,columnNumber:17},this)]},void 0,!0,{fileName:Es,lineNumber:514,columnNumber:15},this):Object(h.jsxDEV)("div",{className:"step-btn-group",children:[Object(h.jsxDEV)(u.a,{type:"primary",onClick:()=>this.onNextStep(),children:"\u4e0b\u4e00\u6b65"},void 0,!1,{fileName:Es,lineNumber:524,columnNumber:17},this),Object(h.jsxDEV)(u.a,{type:"normal",onClick:()=>this.onReturn(),children:"\u53d6\u6d88"},void 0,!1,{fileName:Es,lineNumber:527,columnNumber:17},this)]},void 0,!0,{fileName:Es,lineNumber:523,columnNumber:15},this),this.state.audit_visible?Object(h.jsxDEV)("div",{className:"audit",children:[Object(h.jsxDEV)("div",{className:"modal",children:" "},void 0,!1,{fileName:Es,lineNumber:535,columnNumber:17},this),Object(h.jsxDEV)("div",{className:"audit-box",children:[Object(h.jsxDEV)(g.a,{type:"close",className:"audit-close",onClick:e=>{this.setState({audit_visible:!1})}},void 0,!1,{fileName:Es,lineNumber:537,columnNumber:19},this),Object(h.jsxDEV)("div",{className:"audit-box-title",children:"\u63d0\u4ea4\u5ba1\u6838"},void 0,!1,{fileName:Es,lineNumber:544,columnNumber:19},this),Object(h.jsxDEV)("div",{className:"payType",children:Object(h.jsxDEV)(Q.a,{onChange:e=>{this.onPayTypeChange(e)},value:this.state.paytype,className:"audit-obj",children:[Object(h.jsxDEV)(Z.a,{value:3,children:"\u9884\u4ed8\u6b3e\u6263\u9664"},void 0,!1,{fileName:Es,lineNumber:553,columnNumber:23},this),Object(h.jsxDEV)(Z.a,{value:1,children:"\u5bf9\u79c1\u8d26\u6237"},void 0,!1,{fileName:Es,lineNumber:554,columnNumber:23},this),Object(h.jsxDEV)(Z.a,{value:2,children:"\u5bf9\u516c\u8d26\u6237"},void 0,!1,{fileName:Es,lineNumber:555,columnNumber:23},this)]},void 0,!0,{fileName:Es,lineNumber:546,columnNumber:21},this)},void 0,!1,{fileName:Es,lineNumber:545,columnNumber:19},this),Object(h.jsxDEV)("div",{className:"audit-btn-group",children:[Object(h.jsxDEV)(u.a,{onClick:e=>{this.setState({audit_visible:!1})},children:"\u53d6\u6d88"},void 0,!1,{fileName:Es,lineNumber:559,columnNumber:21},this),Object(h.jsxDEV)(u.a,{type:"primary",onClick:e=>{this.onConfirm(e)},children:"\u786e\u5b9a"},void 0,!1,{fileName:Es,lineNumber:566,columnNumber:21},this)]},void 0,!0,{fileName:Es,lineNumber:558,columnNumber:19},this)]},void 0,!0,{fileName:Es,lineNumber:536,columnNumber:17},this)]},void 0,!0,{fileName:Es,lineNumber:534,columnNumber:15},this):null]},void 0,!0,{fileName:Es,lineNumber:436,columnNumber:11},this)},void 0,!1,{fileName:Es,lineNumber:435,columnNumber:9},this)]},void 0,!0,{fileName:Es,lineNumber:407,columnNumber:7},this)}}var ks="/Users/zhangds/web/blue-brother/frontend/src/pages/plan/key/UseKeyAddEdit.jsx";const Ss={quantity:[{type:"required",message:"key\u6570\u91cf\u4e0d\u80fd\u4e3a0"},{type:"regExp",message:"\u8bf7\u8f93\u5165\u6b63\u6574\u6570",reg:"^([1-9][0-9]*){1,3}$"}],bind_object:[{type:"required",message:"\u8bf7\u9009\u62e9\u7ed1\u5b9a\u7c7b\u578b"}],batch_name:[{type:"required",message:"\u8bf7\u8f93\u5165key\u6279\u6b21\u540d\u79f0"}],key_official_price:[{type:"required",message:"\u8bf7\u8f93\u5165\u5b98\u65b9\u4ef7"},{type:"regExp",message:"\u6700\u591a\u4fdd\u75594\u4f4d\u5c0f\u6570",reg:"^[0-9]+(.[0-9]{1,4})?$"}],key_cost_price:[{type:"required",message:"\u8bf7\u8f93\u5165\u6210\u672c\u4ef7"},{type:"regExp",message:"\u6700\u591a\u4fdd\u75594\u4f4d\u5c0f\u6570",reg:"^[0-9]+(.[0-9]{1,4})?$"}]},ws=[{title:"\u884c\u53f7",name:"line",prop:"line",width:"30px",type:"normal"},{title:"\u624b\u673a\u53f7",width:"80px",prop:"mobile",name:"mobile",type:"normal"},{title:"\u9519\u8bef\u539f\u56e0",width:"80px",prop:"tips",name:"tips",type:"normal"},{title:"\u662f\u5426\u5bfc\u5165",width:"50px",prop:"is_import",name:"is_import",type:"slot"}];var Cs=()=>{const[e,t]=Object(W.a)({pageTitle:"\u7f16\u8f91key",isEdit:!1,import_visible:!1,success_visible:!1,fail_visible:!1,file_loading:!1,upload_visible:!1,excel_visible:!1,accessVerify:!1,excel_count:0,success_count:0,error_count:0,exceldata:[],myfile:{},audit_visible:!1,key_status:-1,exchangeType:1,keyType:Number(sessionStorage.getItem("keyType")),rowIndex:-1,distdata:[],couponData:[],rowCouponData:"",rowExChangeData:"",Column:[{title:"\u5151\u6362\u540d\u79f0",name:"title",prop:"title",type:"normal",width:"auto"},{title:"\u5151\u6362\u7801\u8303\u56f4",prop:"product",name:"product",width:"auto",type:"slot"},{title:"\u6709\u6548\u5f00\u59cb\u65e5\u671f",prop:"begin_time",name:"begin_time",width:"auto",type:"normal"},{title:"\u6709\u6548\u7ed3\u675f\u65e5\u671f",name:"end_time",prop:"end_time",type:"normal",width:"auto"},{title:"\u5151\u6362\u7801\u6570\u91cf",name:"quantity",type:"normal",prop:"quantity",defaultText:"PM",width:"auto"},{title:"\u7ed1\u5b9a\u6570",prop:"restrict",name:"restrict",type:"slot",width:"auto"},{title:"\u64cd\u4f5c",prop:"edit",name:"edit",type:"slot",width:"auto"}],Column_coupon:[{title:"\u4f18\u60e0\u5238\u540d\u79f0",name:"title",prop:"title",type:"normal",width:"auto"},{title:"\u4f18\u60e0\u5238\u8303\u56f4",prop:"product",name:"product",width:"auto",type:"slot"},{title:"\u6709\u6548\u5f00\u59cb\u65e5\u671f",prop:"begin_time",name:"begin_time",width:"auto",type:"normal"},{title:"\u6709\u6548\u7ed3\u675f\u65e5\u671f",name:"end_time",prop:"end_time",type:"normal",width:"auto"},{title:"\u4f18\u60e0\u5238\u6570\u91cf",name:"quantity",type:"normal",prop:"quantity",defaultText:"PM",width:"auto"},{title:"\u7ed1\u5b9a\u6570",prop:"restrict",name:"restrict",type:"slot",width:"auto"},{title:"\u64cd\u4f5c",prop:"edit",name:"edit",type:"slot",width:"auto"}],KeyPcType:sessionStorage.getItem("KeyPcType"),draw_title:"",drawerVisible:!1,direct_reseller_id:0,plan_id:"",id:"",reseller:{},payment_direction:["\u5bf9\u79c1\u8d26\u6237","\u5bf9\u516c\u8d26\u6237","\u9884\u4ed8\u6b3e\u6263\u9664"],payType:3,copyKeyCodeId:"",reseller_id:"",white_visible:!1,keyCodeId:"",settlement_type:sessionStorage.getItem("plan_list_settlement")?JSON.parse(sessionStorage.getItem("plan_list_settlement")).key:0,isSettlement:sessionStorage.getItem("isSettlement")?1:2,settlementData:sessionStorage.getItem("plan_list_settlement")?JSON.parse(sessionStorage.getItem("plan_list_settlement")):null}),i=Object(r.useRef)(null),o=Object(r.useRef)(null),m=Object(r.useRef)(null),b=Object(r.useRef)(null),[p,N]=Object(W.a)({plan_title:"",batch_name:"",style:1,allow_repetition:0,allow_loss:0,quantity:"0",stock:"",merge_stock:1,mobile_excel:"",mobile_repeat:[],key_official_price:"",key_cost_price:"",expiration_type:"1",expiration_value:""});Object(r.useEffect)((()=>{j()}),[]);const j=()=>{let i=sessionStorage.getItem("plan_item");if(i){let e=JSON.parse(i);N({plan_title:e.title}),t({plan_id:e.id,reseller_id:e.reseller_id}),s=e.reseller_id,Object(a.vb)(s).then((e=>{Object(a.Tb)(e,((e,i)=>{t({direct_reseller_id:e.direct_reseller_id}),t({reseller:e})}),(e=>{c.a.error(e)}))}))}var s;if("3"===e.KeyPcType){t({pageTitle:"\u65b0\u589ekey"});let e=sessionStorage.getItem("keyStyle");1===Number(e)&&(N({style:6}),t({white_visible:!0}))}else"1"===e.KeyPcType?(x(),t({pageTitle:"\u7f16\u8f91key"})):(x(),t({pageTitle:"\u590d\u5236key"}))},_=i=>{let s=i.target.files[0];if(t({myfile:s}),t({upload_visible:!0}),s.name.indexOf(".xls")||s.name.indexOf(".xlsx")||s.name.indexOf(".csv")){if(s.size>1024e3)return void c.a.error("\u6587\u4ef6\u5927\u5c0f\u4e0d\u80fd\u5927\u4e8e2M");let i=new FormData;i.append("file",s),i.append("path","white_list_excel"),t({file_loading:!0}),Object(a.cd)(i).then((i=>{Object(a.Tb)(i,((i,s)=>{let l={excel:i.path,plan_id:e.plan_id};N({mobile_excel:i.path}),Object(a.L)(l).then((e=>{t({file_loading:!1}),Object(a.Tb)(e,((e,i)=>{let a=e.count-e.errorCount;t({excel_count:e.count,accessVerify:!0,error_count:e.errorCount,success_count:a,exceldata:e.validationFailed,success_visible:!0})}),(e=>{c.a.error(e),t({success_visible:!1})}))}))}),(e=>{c.a.error(e),t({success_visible:!1})}))}))}else t({success_visible:!1})},x=()=>{let e=sessionStorage.getItem("keybatch_id");Object(a.fb)(e).then((e=>{Object(a.Tb)(e,((e,i)=>{t({key_status:e.status,id:e.id,keyCodeId:e.id}),y(e)}),(e=>{}))}))},y=i=>{N({batch_name:i.batch_name,style:i.style,allow_repetition:i.allow_repetition,allow_loss:i.allow_loss,quantity:i.quantity,stock:i.stock,merge_stock:i.merge_stock,mobile_excel:i.mobile_excel,mobile_repeat:i.mobile_repeat,key_official_price:i.key_official_price,key_cost_price:i.key_cost_price,expiration_type:i.expiration_conf?i.expiration_conf.expiration_type:"1",expiration_value:i.expiration_conf?i.expiration_conf.expiration_value:""});let a=[];a=1===Number(i.bind_object[0])?i.code_batch:i.coupon,"2"===e.KeyPcType?(N({batch_name:`${i.batch_name}_${++i.copy_count}`.substring(0,12)}),a=a.map((e=>{var t;delete e.id,delete e.status;let i=e.product;return i.legal.map((e=>(delete e.code_batch_id,delete e.status,delete e.goods_id,e))),i.reduce.map((e=>(delete e.id,delete e.status,delete e.goods_id,e))),null===(t=i.cash)||void 0===t||t.map((e=>(delete e.id,delete e.status,delete e.goods_id,e))),e}))):Object(f.a)(a,(e=>(e.checked=!0,e.status&&-1!==Number(e.status)&&(e.disabled=!0),e))),1===Number(i.bind_object[0])?t({distdata:a}):t({couponData:a})},O=()=>"2"!==e.KeyPcType&&("1"===e.KeyPcType?1!==e.key_status:void 0),D=e=>{switch(e){case 0:t({draw_title:"\u65b0\u5efa\u5151\u6362\u7801",exchangeType:1}),setTimeout((()=>{m.current.clearExchangeForm()}),300);break;case 1:t({draw_title:"\u65b0\u5efa\u4f18\u60e0\u5238"}),setTimeout((()=>{b.current.clearCouponForm()}),300);break;case 2:t({draw_title:"\u65b0\u5efa\u7ec4\u5408\u5546\u54c1",exchangeType:2,rowExChangeData:null}),setTimeout((()=>{m.current.clearExchangeForm()}),300)}t({drawerVisible:!0,rowIndex:-1})},E=()=>{2===e.keyType&&setTimeout((()=>{b.current.clearCouponForm()}),300),1===e.keyType&&setTimeout((()=>{m.current.clearExchangeForm()}),300),t({drawerVisible:!1})},V=()=>{if(i.current.validator()){if(1===e.keyType){if(e.distdata.length<=0)return void c.a.error("\u8bf7\u6dfb\u52a0\u7ed1\u5b9a\u5bf9\u8c61")}else if(e.couponData.length<=0)return void c.a.error("\u8bf7\u6dfb\u52a0\u7ed1\u5b9a\u5bf9\u8c61");let i=o.current.getSelectData();if(i.length<=0)return void c.a.error("\u8bf7\u52fe\u9009\u7ed1\u5b9a\u5bf9\u8c61");if(i.filter((e=>""===e.restrict)).length>0)return void c.a.error("\u7ed1\u5b9a\u6570\u4e0d\u80fd\u4e3a\u7a7a");(()=>{let i=!1,s=sessionStorage.getItem("keybatch_id"),l=[];1===e.keyType?(l=e.distdata.filter((e=>!0===e.checked&&(-1===e.status||7===e.status||""===e.id||!e.id))),O()&&l.length<=0&&(i=!0)):(l=e.couponData.filter((e=>!0===e.checked&&(-1===e.status||7===e.status||""===e.id||!e.id))),O()&&l.length<=0&&(i=!0));for(let e=0;e{Object(a.Tb)(e,((e,t)=>{setTimeout((()=>{window.history.back()}),500)}),(e=>{c.a.error(e)}))})):t({audit_visible:!0})})()}},k=(t,i)=>{let s=sessionStorage.getItem("keybatch_id");if(0===t){let t={id:"1"===e.KeyPcType?e.id:"",batch_name:p.batch_name,style:p.style,quantity:p.quantity,allow_repetition:p.allow_repetition,allow_loss:p.allow_loss,merge_stock:p.merge_stock,mobile_excel:p.mobile_excel,mobile_repeat:p.mobile_repeat,expiration_conf:{expiration_type:p.expiration_type,expiration_value:p.expiration_value},bind_object:[e.keyType],copy_key_batch_id:e.copyKeyCodeId,reseller_id:e.reseller.id,reseller_name:e.reseller.name,company_name:e.reseller.company_name,receive_email:e.reseller.contact_email[0],payment_direction:e.payment_direction[e.payType-1]};1===e.keyType?(t.code_batch=i,t.key_official_price=p.key_official_price,t.key_cost_price=p.key_cost_price):t.coupon=i,t.copy_key_batch_id=e.keyCodeId,Object(a.c)(e.plan_id,t).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.success("\u6210\u529f\u53d1\u8d77\u5ba1\u6279"),setTimeout((()=>{window.history.back()}),1e3)}),(e=>{c.a.error(e)}))}))}else{let t={reseller_id:e.reseller.id,reseller_name:e.reseller.name,company_name:e.reseller.company_name,receive_email:e.reseller.contact_email[0],payment_direction:e.payment_direction[e.payType-1]};1===e.keyType?t.code_batch=i:t.coupon=i,Object(a.Zb)(s,t).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.success("\u6210\u529f\u53d1\u8d77\u5ba1\u6279"),setTimeout((()=>{window.history.back()}),1e3)}),(e=>{c.a.error(e)}))}))}},S=()=>{1===e.keyType?(()=>{let t=e.distdata.filter((e=>!0===e.checked&&(-1===e.status||7===e.status||""===e.id||!e.id)));if("3"===e.KeyPcType||"2"===e.KeyPcType)k(0,t);else if(1===e.key_status)if(t.filter((e=>e.id&&""!==e.id)).length>0)k(1,t);else{let t=e.distdata.filter((e=>!0===e.checked&&!e.id));k(0,t)}else k(1,t)})():(()=>{let t=e.couponData.filter((e=>!0===e.checked&&(-1===e.status||7===e.status||""===e.id||!e.id)));if("3"===e.KeyPcType||"2"===e.KeyPcType)k(0,t);else if(1===e.key_status)if(e.couponData.filter((e=>e.id&&""!==e.id)).length>0)k(1,t);else{let t=e.couponData.filter((e=>!0===e.checked&&!e.id));k(0,t)}else k(1,t)})()};return Object(h.jsxDEV)("div",{id:"addkey",className:"addkey",style:{width:"98%",height:"auto",margin:"0 auto"},children:[Object(h.jsxDEV)(d.a,{title:e.pageTitle,children:Object(h.jsxDEV)(l.a,{model:p,rules:Ss,ref:i,children:[Object(h.jsxDEV)(s.a,{labelname:" key\u5f52\u5c5e\u8ba1\u5212",prop:"plan_title",id:"plan_title",children:Object(h.jsxDEV)("div",{className:"line-value",children:p.plan_title},void 0,!1,{fileName:ks,lineNumber:1075,columnNumber:13},void 0)},void 0,!1,{fileName:ks,lineNumber:1074,columnNumber:11},void 0),Object(h.jsxDEV)(s.a,{labelname:" key\u6279\u6b21\u540d\u79f0",prop:"batch_name",id:"batch_name",children:Object(h.jsxDEV)(n.a,{onChange:e=>{N({batch_name:e})},onClearItem:e=>{N({batch_name:""})},value:p.batch_name,placeholder:"\u8bf7\u8f93\u5165",labelWidth:"0px",maxLength:12,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:ks,lineNumber:1079,columnNumber:13},void 0)},void 0,!1,{fileName:ks,lineNumber:1078,columnNumber:11},void 0),Object(h.jsxDEV)(s.a,{labelname:" key\u6837\u5f0f",prop:"style",id:"style",children:Object(h.jsxDEV)(Q.a,{onChange:e=>{(e=>{O()||N({style:e.target.value})})(e)},value:p.style,disabled:O(),children:[Object(h.jsxDEV)(ne.a,{value:1,disabled:6==p.style,children:"\u4e32\u7801"},void 0,!1,{fileName:ks,lineNumber:1107,columnNumber:15},void 0),Object(h.jsxDEV)(ne.a,{value:2,disabled:6==p.style||2===e.settlement_type,children:"\u94fe\u63a5"},void 0,!1,{fileName:ks,lineNumber:1110,columnNumber:15},void 0),Object(h.jsxDEV)(ne.a,{value:4,disabled:6==p.style||2===e.settlement_type,children:"\u4e8c\u7ef4\u7801"},void 0,!1,{fileName:ks,lineNumber:1113,columnNumber:15},void 0),Object(h.jsxDEV)(ne.a,{value:6,disabled:6!=p.style,children:"\u767d\u540d\u5355"},void 0,!1,{fileName:ks,lineNumber:1116,columnNumber:15},void 0)]},void 0,!0,{fileName:ks,lineNumber:1100,columnNumber:13},void 0)},void 0,!1,{fileName:ks,lineNumber:1099,columnNumber:11},void 0),1===e.isSettlement?Object(h.jsxDEV)(s.a,{labelname:"\u6210\u672c\u4ef7",prop:"key_cost_price",id:"key_cost_price",children:Object(h.jsxDEV)(n.a,{onChange:e=>{N({key_cost_price:e})},onClearItem:e=>{N({key_cost_price:""})},value:p.key_cost_price,placeholder:"\u8bf7\u8f93\u5165",labelWidth:"0px",maxLength:12,height:"36px",disabled:"1"===e.KeyPcType,width:"520px",alignment:"left"},void 0,!1,{fileName:ks,lineNumber:1124,columnNumber:15},void 0)},void 0,!1,{fileName:ks,lineNumber:1123,columnNumber:13},void 0):null,1===e.isSettlement?Object(h.jsxDEV)(s.a,{labelname:"\u5b98\u65b9\u4ef7",prop:"key_official_price",id:"key_official_price",children:Object(h.jsxDEV)(n.a,{onChange:e=>{N({key_official_price:e})},onClearItem:e=>{N({key_official_price:""})},value:p.key_official_price,placeholder:"\u8bf7\u8f93\u5165",labelWidth:"0px",disabled:"1"===e.KeyPcType,maxLength:12,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:ks,lineNumber:1149,columnNumber:15},void 0)},void 0,!1,{fileName:ks,lineNumber:1148,columnNumber:13},void 0):null,"1"===e.KeyPcType?null:Object(h.jsxDEV)(s.a,{labelname:"key\u6570\u91cf",prop:"quantity",id:"quantity",children:Object(h.jsxDEV)("div",{className:"key_number",children:[Object(h.jsxDEV)(n.a,{onChange:e=>{N({quantity:e})},value:p.quantity,disabled:6===p.style,placeholder:"\u8bf7\u8f93\u5165",labelWidth:"0px",maxLength:5,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:ks,lineNumber:1175,columnNumber:17},void 0),e.white_visible?Object(h.jsxDEV)(u.a,{type:"primary",onClick:e=>{t({file_loading:!1,fail_visible:!1,success_visible:!1,import_visible:!1,upload_visible:!1,excel_visible:!1,accessVerify:!1}),t({import_visible:!0})},children:"\u5bfc\u5165\u767d\u540d\u5355"},void 0,!1,{fileName:ks,lineNumber:1192,columnNumber:19},void 0):null]},void 0,!0,{fileName:ks,lineNumber:1174,columnNumber:15},void 0)},void 0,!1,{fileName:ks,lineNumber:1173,columnNumber:13},void 0),Object(h.jsxDEV)(s.a,{labelname:"key\u7801\u6709\u6548\u671f",prop:"expiration_type",id:"expiration_type",children:Object(h.jsxDEV)(Z.a.Group,{value:p.expiration_type,disabled:"1"===e.KeyPcType,onChange:e=>{N({expiration_value:"",expiration_type:e.target.value})},children:[Object(h.jsxDEV)(Z.a,{value:"1",children:"\u4e0d\u8bbe\u7f6e"},void 0,!1,{fileName:ks,lineNumber:1217,columnNumber:15},void 0),Object(h.jsxDEV)(Z.a,{value:"2",children:"\u56fa\u5b9a\u65f6\u95f4\u6bb5"},void 0,!1,{fileName:ks,lineNumber:1218,columnNumber:15},void 0),Object(h.jsxDEV)(Z.a,{value:"3",children:"\u63a5\u53e3\u8c03\u53d6\u540e\u6709\u6548\u671f"},void 0,!1,{fileName:ks,lineNumber:1219,columnNumber:15},void 0)]},void 0,!0,{fileName:ks,lineNumber:1207,columnNumber:13},void 0)},void 0,!1,{fileName:ks,lineNumber:1206,columnNumber:11},void 0),"2"===p.expiration_type?Object(h.jsxDEV)(s.a,{labelname:"\u56fa\u5b9a\u65f6\u95f4\u6bb5",children:Object(h.jsxDEV)(ee.a,{disabled:"1"===e.KeyPcType,className:"zent-datepicker-plan",showTime:{format:"HH:mm:ss",defaultTime:[Y()().format("HH:mm:ss"),"23:59:59"]},format:"YYYY-MM-DD HH:mm:ss",value:p.expiration_value,onChange:e=>{N({expiration_value:e})},disabledDate:(e,t)=>{let i=JSON.parse(sessionStorage.getItem("knockGold_effectDate")),a=!1,s=Y()(e).format("YYYY-MM-DD HH:mm:ss"),l=Y()(i.end_time).format("HH:mm:ss");return"start"==t&&(a=l<"23:59:59"?Y()(s).isBefore(i.begin_time)||Y()(s).subtract(1,"days").isAfter(i.end_time):Y()(s).isBefore(i.begin_time)||Y()(s).isAfter(i.end_time)),"end"==t&&(a=Y()(s).add(1,"days").isBefore(i.begin_time)||Y()(s).isAfter(i.end_time)),a}},void 0,!1,{fileName:ks,lineNumber:1225,columnNumber:15},void 0)},void 0,!1,{fileName:ks,lineNumber:1224,columnNumber:13},void 0):null,"3"===p.expiration_type?Object(h.jsxDEV)(s.a,{labelname:"\u63a5\u53e3\u8c03\u53d6\u540e\u6709\u6548\u671f",children:Object(h.jsxDEV)(Di.a,{disabled:"1"===e.KeyPcType,placeholder:"\u8bf7\u8f93\u5165\u5929\u6570",value:p.expiration_value,width:120,maxLength:5,onChange:e=>{let t=sessionStorage.getItem("knockGold_effectDate");if(t){t=JSON.parse(t);let i=new Date(t.begin_time),a=new Date(t.end_time).getTime()-i.getTime(),s=Math.ceil(a/864e5);if(!(s>=Number(e.target.value)))return void c.a.error(`key\u7801\u6709\u6548\u671f\u4e0d\u80fd\u8d85\u8fc7\u8ba1\u5212\u6709\u6548\u671f(${s}\u5929)`);N({expiration_value:e.target.value})}}},void 0,!1,{fileName:ks,lineNumber:1246,columnNumber:15},void 0)},void 0,!1,{fileName:ks,lineNumber:1245,columnNumber:13},void 0):null,"3"===e.KeyPcType||"2"===e.KeyPcType?null:Object(h.jsxDEV)(s.a,{labelname:"key\u53d1\u653e",prop:"quantity",id:"quantity",children:Object(h.jsxDEV)(n.a,{onChange:e=>{N({quantity:e})},value:p.quantity,disabled:6===p.style||"1"===e.KeyPcType,placeholder:"\u8bf7\u8f93\u5165",labelWidth:"0px",maxLength:5,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:ks,lineNumber:1284,columnNumber:15},void 0)},void 0,!1,{fileName:ks,lineNumber:1283,columnNumber:13},void 0),1===e.key_status||"3"===e.KeyPcType||"2"===e.KeyPcType?null:Object(h.jsxDEV)(s.a,{labelname:"key\u5269\u4f59",prop:"stock",id:"stock",children:Object(h.jsxDEV)(n.a,{onChange:e=>{},value:p.stock,disabled:!0,placeholder:"\u8bf7\u8f93\u5165",labelWidth:"0px",maxLength:5,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:ks,lineNumber:1304,columnNumber:15},void 0)},void 0,!1,{fileName:ks,lineNumber:1303,columnNumber:13},void 0),Object(h.jsxDEV)(s.a,{labelname:"\u7ed1\u5b9a\u7c7b\u578b",prop:"bind_object",id:"bind_object",children:Object(h.jsxDEV)(Z.a.Group,{value:e.keyType,disabled:!0,onChange:e=>{},children:[Object(h.jsxDEV)(Z.a,{value:1,children:"\u5151\u6362\u7801"},void 0,!1,{fileName:ks,lineNumber:1320,columnNumber:15},void 0),Object(h.jsxDEV)(Z.a,{value:2,children:"\u4f18\u60e0\u5238"},void 0,!1,{fileName:ks,lineNumber:1321,columnNumber:15},void 0)]},void 0,!0,{fileName:ks,lineNumber:1319,columnNumber:13},void 0)},void 0,!1,{fileName:ks,lineNumber:1318,columnNumber:11},void 0),Object(h.jsxDEV)(s.a,{labelname:"",prop:"btn",required:!1,children:1===e.keyType?Object(h.jsxDEV)(h.Fragment,{children:[Object(h.jsxDEV)(u.a,{disabled:1===e.isSettlement&&e.distdata.length>=1,onClick:t=>{e.settlement_type>0&&e.distdata.length>=1?c.a.error("\u53ea\u80fd\u521b\u5efa\u4e00\u4e2a\u5151\u6362\u7801"):D(0)},children:"\u65b0\u5efa\u5151\u6362\u7801"},void 0,!1,{fileName:ks,lineNumber:1328,columnNumber:17},void 0),Object(h.jsxDEV)(Ei.a,{trigger:"hover",content:"\u4e00\u6b21\u6027\u5145\u503c\u591a\u5f20\u7acb\u51cf\u91d1",children:Object(h.jsxDEV)(u.a,{disabled:1===e.isSettlement&&e.distdata.length>=1||1===e.isSettlement&&e.settlementData&&7===e.settlementData.key,onClick:t=>{e.settlement_type>0&&e.distdata.length>=1?c.a.error("\u53ea\u80fd\u521b\u5efa\u4e00\u4e2a\u5151\u6362\u7801"):D(2)},children:"\u65b0\u5efa\u7ec4\u5408\u5546\u54c1"},void 0,!1,{fileName:ks,lineNumber:1343,columnNumber:19},void 0)},void 0,!1,{fileName:ks,lineNumber:1342,columnNumber:17},void 0)]},void 0,!0):Object(h.jsxDEV)(u.a,{onClick:e=>{D(1)},children:"\u65b0\u5efa\u4f18\u60e0\u5238"},void 0,!1,{fileName:ks,lineNumber:1365,columnNumber:15},void 0)},void 0,!1,{fileName:ks,lineNumber:1325,columnNumber:11},void 0),Object(h.jsxDEV)(s.a,{labelname:"\u7ed1\u5b9a\u5bf9\u8c61",prop:"grid",children:Object(h.jsxDEV)(I,{ref:o,headBackgroud:"#f9fafc",isShowPageBar:!1,spliteColor:"#fff",tableData:1===e.keyType?e.distdata:e.couponData,Column:1===e.keyType?e.Column:e.Column_coupon,countbarVisible:!1,isBorder:!0,isSwitch:!1,pageChange:e=>{},checkChange:e=>{},ComponentHandler:(i,a,s)=>{if("restrict"==i)return Object(h.jsxDEV)(Di.a,{placeholder:"\u8bf7\u8f93\u5165\u6570\u91cf",value:1===e.isSettlement?1:a.restrict,disabled:a.disabled||2==a.recharge_type||1===e.isSettlement,maxLength:5,onChange:i=>{((i,a,s)=>{1===e.keyType?(e.distdata[s].restrict=i.target.value,t({distdata:e.distdata})):(e.couponData[s].restrict=i.target.value,t({couponData:e.couponData}))})(i,0,s)}},void 0,!1,{fileName:ks,lineNumber:1391,columnNumber:21},void 0);if("product"===i)return(e=>{var t;let i=e.legal.map((e=>e.product_name)),a=e.reduce.map((e=>e.batch_goods_name)),s=null===(t=e.cash)||void 0===t?void 0:t.map((e=>e.batch_goods_name)),l=i.concat(a,s);return l=l.join(","),Object(h.jsxDEV)("span",{children:l},void 0,!1,{fileName:ks,lineNumber:602,columnNumber:12},void 0)})(a.product);if("edit"===i){let i=Object(h.jsxDEV)("span",{onClick:i=>{((i,a)=>{1===e.keyType?2==i.recharge_type?t({draw_title:"\u7f16\u8f91\u7ec4\u5408\u5546\u54c1",rowIndex:a,rowExChangeData:i,drawerVisible:!0,exchangeType:2}):t({draw_title:"\u7f16\u8f91\u5151\u6362\u7801",rowIndex:a,rowExChangeData:i,drawerVisible:!0,exchangeType:1}):t({draw_title:"\u7f16\u8f91\u4f18\u60e0\u5238",rowIndex:a,rowCouponData:i,drawerVisible:!0})})(a,s)},style:{color:"#2B66F2"},children:"\u7f16\u8f91"},void 0,!1,{fileName:ks,lineNumber:1410,columnNumber:21},void 0),l=Object(h.jsxDEV)("span",{style:{color:"#d6d6d6"},children:"\u7f16\u8f91"},void 0,!1,{fileName:ks,lineNumber:1419,columnNumber:30},void 0);return a.disabled?l:i}}},void 0,!1,{fileName:ks,lineNumber:1376,columnNumber:13},void 0)},void 0,!1,{fileName:ks,lineNumber:1375,columnNumber:11},void 0),Object(h.jsxDEV)(s.a,{labelname:"\u91cd\u590d\u9009\u62e9\u5546\u54c1",id:"allow_repetition",prop:"allow_repetition",children:Object(h.jsxDEV)(Q.a,{disabled:O(),onChange:e=>(e=>{N({allow_repetition:e.target.value})})(e),value:p.allow_repetition,children:[Object(h.jsxDEV)(ne.a,{value:1,children:"\u662f"},void 0,!1,{fileName:ks,lineNumber:1431,columnNumber:15},void 0),Object(h.jsxDEV)(ne.a,{value:0,children:"\u5426"},void 0,!1,{fileName:ks,lineNumber:1432,columnNumber:15},void 0)]},void 0,!0,{fileName:ks,lineNumber:1426,columnNumber:13},void 0)},void 0,!1,{fileName:ks,lineNumber:1425,columnNumber:11},void 0),Object(h.jsxDEV)(s.a,{labelname:"\u662f\u5426\u5141\u8bb8\u4e8f\u635f",id:"allow_loss",prop:"allow_loss",children:Object(h.jsxDEV)(Q.a,{disabled:O(),onChange:e=>(e=>{N({allow_loss:e.target.value})})(e),value:p.allow_loss,children:[Object(h.jsxDEV)(ne.a,{value:1,children:"\u662f"},void 0,!1,{fileName:ks,lineNumber:1442,columnNumber:15},void 0),Object(h.jsxDEV)(ne.a,{value:0,children:"\u5426"},void 0,!1,{fileName:ks,lineNumber:1443,columnNumber:15},void 0)]},void 0,!0,{fileName:ks,lineNumber:1437,columnNumber:13},void 0)},void 0,!1,{fileName:ks,lineNumber:1436,columnNumber:11},void 0)]},void 0,!0,{fileName:ks,lineNumber:1073,columnNumber:9},void 0)},void 0,!1,{fileName:ks,lineNumber:1072,columnNumber:7},void 0),Object(h.jsxDEV)("div",{style:{marginTop:"15px"},children:[Object(h.jsxDEV)(u.a,{type:"primary",onClick:()=>V(),children:"\u63d0\u4ea4\u5ba1\u6838"},void 0,!1,{fileName:ks,lineNumber:1449,columnNumber:9},void 0),Object(h.jsxDEV)(u.a,{type:"normal",onClick:()=>{G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:"\u662f\u5426\u53d6\u6d88\u672c\u6b21\u64cd\u4f5c\uff1f"},void 0,!1,{fileName:ks,lineNumber:831,columnNumber:16},void 0),onConfirm:()=>{window.history.back()},onCancel:()=>{},className:"questModal",parentComponent:void 0})},children:"\u53d6\u6d88"},void 0,!1,{fileName:ks,lineNumber:1452,columnNumber:9},void 0)]},void 0,!0,{fileName:ks,lineNumber:1448,columnNumber:7},void 0),Object(h.jsxDEV)(bt.a,{width:"90%",title:e.draw_title,footer:Object(h.jsxDEV)("div",{style:{textAlign:"center"},children:[Object(h.jsxDEV)(u.a,{type:"primary",onClick:i=>{(()=>{if(2!==e.keyType){if(1!==e.keyType);else if(m.current.submit()){let i=m.current.getModel();if(1===e.isSettlement&&(i.restrict="1"),1===e.isSettlement&&2!==e.exchangeType&&[...i.product.legal,...i.product.reduce,...i.product.cash].length>1&&!sessionStorage.getItem("has_combining"))return void c.a.error("\u5305\u7801\u53ea\u80fd\u521b\u5efa\u4e00\u4e2a\u5546\u54c1");let a=e.distdata;e.rowIndex>-1?(a[e.rowIndex]=i,t({distdata:a})):(a.push(i),t({distdata:a})),t({drawerVisible:!1})}}else if(b.current.submit()){let i=b.current.getModel(),a=e.couponData;e.rowIndex>-1?(a[e.rowIndex]=i,t({couponData:a})):(a.push(i),t({couponData:a})),t({drawerVisible:!1})}})()},children:"\u63d0\u4ea4"},void 0,!1,{fileName:ks,lineNumber:1462,columnNumber:13},void 0),Object(h.jsxDEV)(u.a,{onClick:e=>{E()},children:"\u53d6\u6d88"},void 0,!1,{fileName:ks,lineNumber:1470,columnNumber:13},void 0)]},void 0,!0,{fileName:ks,lineNumber:1461,columnNumber:11},void 0),visible:e.drawerVisible,onClose:e=>{E()},maskClosable:!1,children:function(){return 1===e.keyType?1===e.exchangeType?Object(h.jsxDEV)(ms,{direct_reseller_id:e.direct_reseller_id,editData:e.rowExChangeData,ref:m,isSettlement:e.isSettlement,settlementData:e.settlementData},void 0,!1,{fileName:ks,lineNumber:1044,columnNumber:11},this):Object(h.jsxDEV)(ps,{propsData:e.rowExChangeData,ref:m},void 0,!1,{fileName:ks,lineNumber:1053,columnNumber:16},this):Object(h.jsxDEV)(wt,{couponType:1,editData:e.rowCouponData,isAuditButton:!1,ref:b,direct_reseller_id:e.direct_reseller_id},void 0,!1,{fileName:ks,lineNumber:1057,columnNumber:9},this)}()},void 0,!1,{fileName:ks,lineNumber:1457,columnNumber:7},void 0),e.audit_visible?Object(h.jsxDEV)("div",{className:"audit",children:[Object(h.jsxDEV)("div",{className:"modal",children:" "},void 0,!1,{fileName:ks,lineNumber:1490,columnNumber:11},void 0),Object(h.jsxDEV)("div",{className:"audit-box",children:[Object(h.jsxDEV)(g.a,{type:"close",className:"audit-close",onClick:e=>{t({audit_visible:!1})}},void 0,!1,{fileName:ks,lineNumber:1492,columnNumber:13},void 0),Object(h.jsxDEV)("div",{className:"audit-box-title",children:"\u63d0\u4ea4\u5ba1\u6838"},void 0,!1,{fileName:ks,lineNumber:1501,columnNumber:13},void 0),Object(h.jsxDEV)("div",{className:"payType",children:Object(h.jsxDEV)(Q.a,{onChange:e=>{(e=>{t({payType:e.target.value})})(e)},value:e.payType,className:"audit-obj",children:[Object(h.jsxDEV)(Z.a,{value:3,children:"\u9884\u4ed8\u6b3e\u6263\u9664"},void 0,!1,{fileName:ks,lineNumber:1510,columnNumber:17},void 0),Object(h.jsxDEV)(Z.a,{value:1,children:"\u5bf9\u79c1\u8d26\u6237"},void 0,!1,{fileName:ks,lineNumber:1511,columnNumber:17},void 0),Object(h.jsxDEV)(Z.a,{value:2,children:"\u5bf9\u516c\u8d26\u6237"},void 0,!1,{fileName:ks,lineNumber:1512,columnNumber:17},void 0)]},void 0,!0,{fileName:ks,lineNumber:1503,columnNumber:15},void 0)},void 0,!1,{fileName:ks,lineNumber:1502,columnNumber:13},void 0),Object(h.jsxDEV)("div",{className:"audit-btn-group",children:[Object(h.jsxDEV)(u.a,{onClick:e=>{t({audit_visible:!1})},children:"\u53d6\u6d88"},void 0,!1,{fileName:ks,lineNumber:1516,columnNumber:15},void 0),Object(h.jsxDEV)(u.a,{type:"primary",onClick:e=>{S()},children:"\u786e\u5b9a"},void 0,!1,{fileName:ks,lineNumber:1525,columnNumber:15},void 0)]},void 0,!0,{fileName:ks,lineNumber:1515,columnNumber:13},void 0)]},void 0,!0,{fileName:ks,lineNumber:1491,columnNumber:11},void 0)]},void 0,!0,{fileName:ks,lineNumber:1489,columnNumber:9},void 0):null,e.import_visible?Object(h.jsxDEV)("div",{children:[Object(h.jsxDEV)("div",{className:"modal"},void 0,!1,{fileName:ks,lineNumber:1541,columnNumber:11},void 0),Object(h.jsxDEV)("div",{className:"import-excel",children:[Object(h.jsxDEV)("div",{className:"import-header",children:[Object(h.jsxDEV)("div",{className:"import-title",children:"\u4eceExcel\u5bfc\u5165\u767d\u540d\u5355"},void 0,!1,{fileName:ks,lineNumber:1544,columnNumber:15},void 0),Object(h.jsxDEV)(g.a,{type:"close",className:"import-close",onClick:e=>{t({import_visible:!1})}},void 0,!1,{fileName:ks,lineNumber:1546,columnNumber:15},void 0)]},void 0,!0,{fileName:ks,lineNumber:1543,columnNumber:13},void 0),Object(h.jsxDEV)("div",{className:"step-bar",children:[Object(h.jsxDEV)("div",{className:"step-group",children:[Object(h.jsxDEV)("div",{className:"step-code active",children:"1"},void 0,!1,{fileName:ks,lineNumber:1556,columnNumber:17},void 0),Object(h.jsxDEV)("span",{className:"step-label active",children:"\u4e0a\u4f20\u6587\u4ef6"},void 0,!1,{fileName:ks,lineNumber:1557,columnNumber:17},void 0)]},void 0,!0,{fileName:ks,lineNumber:1555,columnNumber:15},void 0),Object(h.jsxDEV)("div",{className:"step-center",children:Object(h.jsxDEV)("div",{className:"step-line"},void 0,!1,{fileName:ks,lineNumber:1560,columnNumber:17},void 0)},void 0,!1,{fileName:ks,lineNumber:1559,columnNumber:15},void 0),Object(h.jsxDEV)("div",{className:"step-group",children:[Object(h.jsxDEV)("div",{className:"step-code",children:"2"},void 0,!1,{fileName:ks,lineNumber:1563,columnNumber:17},void 0),Object(h.jsxDEV)("span",{className:"step-label",children:"\u5bfc\u5165\u5b8c\u6210"},void 0,!1,{fileName:ks,lineNumber:1564,columnNumber:17},void 0)]},void 0,!0,{fileName:ks,lineNumber:1562,columnNumber:15},void 0)]},void 0,!0,{fileName:ks,lineNumber:1554,columnNumber:13},void 0),Object(h.jsxDEV)("div",{className:"upload-panel1",children:[Object(h.jsxDEV)("div",{className:"upload-label",children:"\u76f4\u63a5\u4e0a\u4f20"},void 0,!1,{fileName:ks,lineNumber:1569,columnNumber:15},void 0),Object(h.jsxDEV)("div",{className:"upload-info",children:[Object(h.jsxDEV)("div",{children:"\u652f\u6301\u6587\u4ef6\u7c7b\u578b\uff1axls\uff0cxlsx\uff0ccsv"},void 0,!1,{fileName:ks,lineNumber:1572,columnNumber:17},void 0),Object(h.jsxDEV)("div",{children:"- \u652f\u6301\u6240\u6709\u57fa\u7840\u5b57\u6bb5\u7684\u5bfc\u5165\uff0c\u4e00\u6b21\u81f3\u591a\u5bfc\u5165 10000 \u6761\u624b\u673a\u53f7\uff08\u4e0d\u7b26\u5408\u89c4\u5219\u6574\u6761\u4efb\u52a1\u4e0d\u4e88\u4ee5\u5bfc\u5165\uff09"},void 0,!1,{fileName:ks,lineNumber:1573,columnNumber:17},void 0)]},void 0,!0,{fileName:ks,lineNumber:1571,columnNumber:15},void 0)]},void 0,!0,{fileName:ks,lineNumber:1568,columnNumber:13},void 0),e.upload_visible?Object(h.jsxDEV)("div",{children:[Object(h.jsxDEV)("div",{className:"upload-msgbar",children:[Object(h.jsxDEV)("div",{className:"execel-name",children:[Object(h.jsxDEV)(g.a,{type:"text-guide-o",className:"doc-flag"},void 0,!1,{fileName:ks,lineNumber:1583,columnNumber:21},void 0),Object(h.jsxDEV)("span",{className:"excel-txt",children:e.myfile.name},void 0,!1,{fileName:ks,lineNumber:1584,columnNumber:21},void 0)]},void 0,!0,{fileName:ks,lineNumber:1582,columnNumber:19},void 0),e.file_loading?Object(h.jsxDEV)("div",{className:"file-tag",children:[Object(h.jsxDEV)(g.a,{type:"loading",spin:!0,className:"file-loading"},void 0,!1,{fileName:ks,lineNumber:1589,columnNumber:23},void 0),Object(h.jsxDEV)("span",{className:"excel-txt",children:"\u89e3\u6790\u4e2d "},void 0,!1,{fileName:ks,lineNumber:1590,columnNumber:23},void 0)]},void 0,!0,{fileName:ks,lineNumber:1588,columnNumber:21},void 0):Object(h.jsxDEV)("div",{className:"file-tag",children:[Object(h.jsxDEV)("input",{type:"file",className:"upload-input",onChange:e=>_(e)},void 0,!1,{fileName:ks,lineNumber:1594,columnNumber:23},void 0),Object(h.jsxDEV)(g.a,{type:"up-circle-o",className:"upload-flag"},void 0,!1,{fileName:ks,lineNumber:1595,columnNumber:23},void 0),Object(h.jsxDEV)("span",{className:"excel-txt",children:"\u66f4\u65b0\u6587\u4ef6 "},void 0,!1,{fileName:ks,lineNumber:1596,columnNumber:23},void 0)]},void 0,!0,{fileName:ks,lineNumber:1593,columnNumber:21},void 0)]},void 0,!0,{fileName:ks,lineNumber:1581,columnNumber:17},void 0),e.success_visible?Object(h.jsxDEV)("div",{className:"file-tip success",children:[Object(h.jsxDEV)(g.a,{type:"check-circle",className:"success-icon"},void 0,!1,{fileName:ks,lineNumber:1602,columnNumber:21},void 0),"\u6587\u4ef6\u89e3\u6790\u6210\u529f,\u70b9\u51fb\u786e\u5b9a\u5bfc\u5165 \u5373\u53ef\u5bfc\u5165"]},void 0,!0,{fileName:ks,lineNumber:1601,columnNumber:19},void 0):null,e.fail_visible?Object(h.jsxDEV)("div",{className:"file-tip error",children:[Object(h.jsxDEV)(g.a,{type:"error-circle",className:"error-icon"},void 0,!1,{fileName:ks,lineNumber:1608,columnNumber:21},void 0),"\u6587\u4ef6\u89e3\u6790\u5931\u8d25,\u8bf7\u67e5\u770b\u5bfc\u5165\u89c4\u5219\u5e76\u66f4\u65b0\u6587\u4ef6"]},void 0,!0,{fileName:ks,lineNumber:1607,columnNumber:19},void 0):null]},void 0,!0,{fileName:ks,lineNumber:1580,columnNumber:15},void 0):Object(h.jsxDEV)("div",{children:[Object(h.jsxDEV)("input",{type:"file",className:"upload-input",onChange:e=>_(e)},void 0,!1,{fileName:ks,lineNumber:1615,columnNumber:17},void 0),Object(h.jsxDEV)(u.a,{className:"btn-upload",style:{background:"#1890ff",color:"#FFFFFF",border:"none"},children:"\u4e0a\u4f20\u6587\u4ef6"},void 0,!1,{fileName:ks,lineNumber:1616,columnNumber:17},void 0)," "]},void 0,!0,{fileName:ks,lineNumber:1614,columnNumber:15},void 0),Object(h.jsxDEV)("div",{className:"upload-panel1",children:[Object(h.jsxDEV)("div",{className:"upload-label",children:"\u4e0b\u8f7d\u6a21\u677f\u5e76\u586b\u5199\u540e\u4e0a\u4f20"},void 0,!1,{fileName:ks,lineNumber:1630,columnNumber:15},void 0),Object(h.jsxDEV)("div",{className:"upload-info",children:Object(h.jsxDEV)("div",{children:"\u8bf7\u5148\u4e0b\u8f7d\u300c\u6570\u5b57\u4e16\u754c\u8425\u9500\u7ba1\u7406\u7cfb\u7edf_\u767d\u540d\u5355_\u6a21\u677f\u300d\u5e76\u6309\u7167\u6a21\u677f\u586b\u5199\u540e\u518d\u4e0a\u4f20\u3002"},void 0,!1,{fileName:ks,lineNumber:1633,columnNumber:17},void 0)},void 0,!1,{fileName:ks,lineNumber:1632,columnNumber:15},void 0)]},void 0,!0,{fileName:ks,lineNumber:1629,columnNumber:13},void 0),Object(h.jsxDEV)(u.a,{type:"default",className:"btn-download",onClick:e=>{window.location.href="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/%E7%99%BD%E5%90%8D%E5%8D%95%E6%A8%A1%E6%9D%BF.xlsx"},children:"\u4e0b\u8f7d\u6a21\u677f"},void 0,!1,{fileName:ks,lineNumber:1636,columnNumber:13},void 0),Object(h.jsxDEV)("div",{className:"foot-bar",children:Object(h.jsxDEV)("div",{className:"btn-group",children:[Object(h.jsxDEV)(u.a,{type:"default",onClick:e=>{t({import_visible:!1})},children:"\u53d6\u6d88"},void 0,!1,{fileName:ks,lineNumber:1647,columnNumber:17},void 0),Object(h.jsxDEV)(u.a,{type:"primary",onClick:i=>{e.file_loading?c.a.error("\u6587\u4ef6\u6b63\u5728\u89e3\u6790\u4e2d\u8bf7\u7a0d\u7b49"):e.success_visible?t({excel_visible:!0,accessVerify:!1,import_visible:!1}):c.a.error("\u8bf7\u4e0a\u4f20\u6b63\u786e\u7684\u6587\u4ef6")},style:{background:"#1890ff",color:"#FFFFFF",border:"none"},children:"\u786e\u5b9a\u5bfc\u5165"},void 0,!1,{fileName:ks,lineNumber:1655,columnNumber:17},void 0)]},void 0,!0,{fileName:ks,lineNumber:1646,columnNumber:15},void 0)},void 0,!1,{fileName:ks,lineNumber:1645,columnNumber:13},void 0)]},void 0,!0,{fileName:ks,lineNumber:1542,columnNumber:11},void 0)]},void 0,!0,{fileName:ks,lineNumber:1540,columnNumber:9},void 0):null,e.excel_visible?Object(h.jsxDEV)("div",{children:[Object(h.jsxDEV)("div",{className:"modal"},void 0,!1,{fileName:ks,lineNumber:1676,columnNumber:11},void 0),Object(h.jsxDEV)("div",{className:"import-excel",children:[Object(h.jsxDEV)("div",{className:"import-header",children:[Object(h.jsxDEV)("div",{className:"import-title",children:"\u4eceExcel\u5bfc\u5165\u767d\u540d\u5355"},void 0,!1,{fileName:ks,lineNumber:1679,columnNumber:15},void 0),Object(h.jsxDEV)(g.a,{type:"close",className:"import-close",onClick:e=>{t({excel_visible:!1})}},void 0,!1,{fileName:ks,lineNumber:1680,columnNumber:15},void 0)]},void 0,!0,{fileName:ks,lineNumber:1678,columnNumber:13},void 0),Object(h.jsxDEV)("div",{className:"file-upload-tip",children:["\u6587\u4ef6\u4e0a\u4f20\u6210\u529f.\u5171",e.excel_count,"\u6761\u624b\u673a\u53f7,\u5176\u4e2d",e.success_count,"\u6761\u53ef\u6210\u529f\u5bfc\u5165"]},void 0,!0,{fileName:ks,lineNumber:1688,columnNumber:13},void 0),Object(h.jsxDEV)("div",{className:"file-errmsg",children:["\u53d1\u73b0\u4ee5\u4e0b",e.error_count,"\u6761\u4e0d\u7b26\u5408\u8981\u6c42,\u5c06\u4e0d\u4f1a\u88ab\u5bfc\u5165"]},void 0,!0,{fileName:ks,lineNumber:1692,columnNumber:13},void 0),Object(h.jsxDEV)("div",{},void 0,!1,{fileName:ks,lineNumber:1694,columnNumber:13},void 0),Object(h.jsxDEV)("div",{className:"gridpanel",children:Object(h.jsxDEV)(I,{headBackgroud:"#f9fafc",isShowPageBar:!1,spliteColor:"#fff",tableData:e.exceldata,value:e.exceldata,Column:ws,maxheight:200,isMultiple:!1,countbarVisible:!1,isBorder:!0,isSwitch:!1,pageChange:e=>{(void 0).pageChange(e)},ComponentHandler:(e,t,i)=>{if("is_import"==e){if("success"==t.type||"repeat"==t.type){let e="success"==t.type;return Object(h.jsxDEV)(v.a,{checked:e,onChange:e=>{((e,t)=>{t.type=e?"success":"success"==t.type?"repeat":"error"})(e,t)}},void 0,!1,{fileName:ks,lineNumber:1717,columnNumber:25},void 0)}return Object(h.jsxDEV)("div",{className:"isImport",children:"-"},void 0,!1,{fileName:ks,lineNumber:1725,columnNumber:30},void 0)}}},void 0,!1,{fileName:ks,lineNumber:1697,columnNumber:15},void 0)},void 0,!1,{fileName:ks,lineNumber:1696,columnNumber:13},void 0),Object(h.jsxDEV)("div",{className:"foot-bar",children:Object(h.jsxDEV)("div",{className:"btn-group",children:[Object(h.jsxDEV)(u.a,{type:"default",onClick:e=>{t({import_visible:!0,excel_visible:!1,accessVerify:!0})},children:"\u91cd\u65b0\u4e0a\u4f20"},void 0,!1,{fileName:ks,lineNumber:1733,columnNumber:17},void 0),Object(h.jsxDEV)(u.a,{type:"primary",onClick:i=>{(()=>{let i=e.exceldata.filter((e=>"success"==e.type)),a=Object(f.a)(i,(e=>e.mobile));N({quantity:e.excel_count-e.error_count+a.length}),t({mobile_repeat:a,accessVerify:!1,model:p,excel_visible:!1,import_visible:!1,import_success:!0})})()},style:{background:"#1890ff",color:"#FFFFFF",border:"none"},children:"\u786e\u5b9a\u5bfc\u5165"},void 0,!1,{fileName:ks,lineNumber:1741,columnNumber:17},void 0)]},void 0,!0,{fileName:ks,lineNumber:1732,columnNumber:15},void 0)},void 0,!1,{fileName:ks,lineNumber:1731,columnNumber:13},void 0)]},void 0,!0,{fileName:ks,lineNumber:1677,columnNumber:11},void 0)]},void 0,!0,{fileName:ks,lineNumber:1675,columnNumber:9},void 0):null]},void 0,!0,{fileName:ks,lineNumber:1071,columnNumber:5},void 0)},Ts=(i(252),"/Users/zhangds/web/blue-brother/frontend/src/pages/plan/key/detail/list.js");class Is extends m.a.Component{constructor(e){super(e),this.state={dataCount:0,page:1,limit:10,tabList:[{title:"\u5168\u90e8",index:0},{title:"\u53ef\u4f7f\u7528",index:1},{title:"\u5df2\u4f7f\u7528",index:2},{title:"\u5df2\u5b8c\u7ed3",index:3},{title:"\u5df2\u4f5c\u5e9f",index:4}],distdata:[{title:"\u58eb\u5927\u592b\u5927\u5e08\u5085"}],filterList:[{id:0,label:"\u72b6\u6001",prop:"status",menuList:[{id:999,name:"\u5168\u90e8"},{id:0,name:"\u521b\u5efa\u4e2d"},{id:2,name:"\u5ba1\u6838\u4e2d"},{id:3,name:"\u5f85\u751f\u6548"},{id:4,name:"\u8fdb\u884c\u4e2d"},{id:5,name:"\u6682\u505c\u4e2d"},{id:6,name:"\u5df2\u5b8c\u7ed3"}]}],tableHeight:500,menuList:[{id:0,name:"\u72b6\u6001",check:!1}],phone_list:[],email_list:[],phone:"",email:"",email_radio:-1,phone_radio:-1,search:"",audit_visible:!1,cur_item:null,selectiondata:[],plan_id:0,grantTotal:0,surplusTotal:0,usageTotal:0,silentTotal:0,receive_total:0,usage_total:0,outdateTotal:0,invalidTotal:0,multiple:!0}}onPageChange(e){this.setState({page:e}),setTimeout((()=>{this.getpageFn()}),0)}componentWillMount(){this.setState({tableHeight:window.innerHeight-430})}getKeyCodeList(e){let t=Object(Lt.a)(e,(e=>Object(Ht.a)(e)||Object(qt.a)(e))),i=sessionStorage.getItem("key_batch_id");Object(a.Pb)(i,t).then((e=>{Object(a.Tb)(e,((e,t)=>{this.setState({distdata:e.data}),this.setState({dataCount:e.total})}),(e=>{}))}))}onCountChange(e){this.setState({page:1,limit:e}),setTimeout((()=>{this.getpageFn()}),0)}getpageFn(){let e={page:this.state.page,limit:this.state.limit,key:this.state.key},t=this.state.status>0?this.state.status:null;t&&(e.status=t),this.getKeyCodeList(e)}clearFn(){this.refs.plan_list.allChecked(!1),this.setState({selectiondata:[],multiple:!0})}selection(e){e.length>0?this.setState({multiple:!1}):this.setState({multiple:!0}),this.setState({selectiondata:e});let t=0,i=0,a=0,s=0,l=0,n=0,o=0;e.forEach((e=>{t+=Number(e.total),i+=Number(e.residue),a+=Number(e.usage),o+=Number(e.overdue),n+=Number(e.invalid),s+=Number(e.usage_total),l+=Number(e.silent_total)})),this.setState({grantTotal:t,usageTotal:a,invalidTotal:n,outdateTotal:o,surplusTotal:i})}componentDidUpdate(e,t){t.search==this.state.search||this.state.search||this.iptsureFn()}iptsureFn(e){let t=this.state.status>0?this.state.status:null;this.setState({limit:10,page:1});let i={page:1,limit:10,key:this.state.search};t&&(i.status=t),this.getKeyCodeList(i)}onFilterClose(e){let t={};t[e]=null,this.setState(t);let i={page:1,limit:10,key:this.state.search};this.getKeyCodeList(i)}tabFn(e){let t=e>0?e:null;this.setState({limit:10,page:1,search:"",status:e});let i={page:1,limit:10,status:t};this.getKeyCodeList(i)}keyCancelFun(e){let t={key:e.key};Object(a.Yb)(t).then((e=>{Object(a.Tb)(e,((e,t)=>{this.setState({page:1,limit:10}),this.getKeyCodeList({page:1,limit:10}),c.a.success("\u4f5c\u5e9f\u6210\u529f")}),(e=>{c.a.error(e)}))}))}menuItemClick(e,t,i){let s=this;if(1==t){let e={key:i.key};Object(a.ac)(e).then((e=>{Object(a.Tb)(e,((e,t)=>{this.setState({page:1,limit:10}),this.getKeyCodeList({page:1,limit:10}),c.a.success("\u6807\u8bb0\u4e3a\u4f7f\u7528\u6210\u529f")}),(e=>{c.a.error(e)}))}))}if(2==t){let e={type:4,object_value:i.key};try{Ut(e).then((e=>{2===e?s.keyCancelFun(i):1===e&&G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:["\u662f\u5426\u4f5c\u5e9fkey\u6279\u6b21ID",Object(h.jsxDEV)("b",{children:["[",i.key,"]"]},void 0,!0,{fileName:Ts,lineNumber:289,columnNumber:30},this),"\uff1f"]},void 0,!0,{fileName:Ts,lineNumber:288,columnNumber:17},this),onConfirm:()=>{s.keyCancelFun(i)},onCancel:this.onCancel,className:"questModal",parentComponent:this})}))}catch(l){}}3==t&&(sessionStorage.setItem("keyCode",i.key),window.open("#/home/key-log"))}multipleCancel(){let e={keys:Object(f.a)(this.state.selectiondata,(e=>e.key))};Object(a.Vb)(e).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.success("\u6279\u91cf\u4f5c\u5e9f\u6210\u529f");this.setState({page:1,limit:10}),this.clearFn(),this.getKeyCodeList({page:1,limit:10})}),(e=>{c.a.error(e)}))}))}multipleUse(){let e={keys:Object(f.a)(this.state.selectiondata,(e=>e.key))};Object(a.Xb)(e).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.success("\u6279\u91cf\u6807\u8bb0\u4e3a\u4f7f\u7528\u6210\u529f");this.setState({page:1,limit:10}),this.clearFn(),this.getKeyCodeList({page:1,limit:10})}),(e=>{c.a.error(e)}))}))}render(){Jt.a,this.state.combinedValue,this.onChangeCombinedDate;return Object(h.jsxDEV)("div",{id:"dislist",children:Object(h.jsxDEV)(Ft,{tabs:this.state.tabList,tabChange:this.tabFn.bind(this),children:[Object(h.jsxDEV)("div",{className:"distable dflexj",children:[Object(h.jsxDEV)("div",{children:[Object(h.jsxDEV)(u.a,{onClick:()=>{this.multipleCancel()},disabled:this.state.multiple,children:"\u6279\u91cf\u4f5c\u5e9f"},void 0,!1,{fileName:Ts,lineNumber:478,columnNumber:15},this),Object(h.jsxDEV)(u.a,{onClick:()=>{this.multipleUse()},disabled:this.state.multiple,children:"\u6279\u91cf\u6807\u8bb0\u4e3a\u5df2\u4f7f\u7528"},void 0,!1,{fileName:Ts,lineNumber:486,columnNumber:15},this)]},void 0,!0,{fileName:Ts,lineNumber:477,columnNumber:13},this),Object(h.jsxDEV)(n.a,{onChange:e=>this.setState({search:e}),value:this.state.search,wordSearch:this.iptsureFn.bind(this),icon:"search",placeholder:"\u8bf7\u5b8c\u6574\u8f93\u5165key",countShow:!1,height:"36px",width:"260px",onClearItem:e=>{this.setState({search:""});this.getKeyCodeList({page:1,limit:10})},alignment:"left"},void 0,!1,{fileName:Ts,lineNumber:497,columnNumber:13},this)]},void 0,!0,{fileName:Ts,lineNumber:476,columnNumber:11},this),Object(h.jsxDEV)("div",{className:"code-table",children:[this.state.selectiondata.length>0?Object(h.jsxDEV)(ki.a,{type:"info",extraContent:Object(h.jsxDEV)(u.a,{type:"primary",onClick:this.clearFn.bind(this),children:"\u6e05\u7a7a"},void 0,!1,{fileName:Ts,lineNumber:522,columnNumber:19},this),children:["\u5df2\u9009\u62e9",Object(h.jsxDEV)("font",{color:"#296bef",style:{fontWeight:"bold"},children:this.state.selectiondata.length},void 0,!1,{fileName:Ts,lineNumber:528,columnNumber:17},this),"\u53d1\u653ekey\u603b\u6570:",this.state.grantTotal,",\u5269\u4f59key\u603b\u6570:",this.state.surplusTotal,",\u5df2\u4f7f\u7528\u603b\u6570:",this.state.usageTotal,",\u5df2\u8fc7\u671f\u603b\u6570:",this.state.outdateTotal,",\u5df2\u4f5c\u5e9f\u603b\u6570:",this.state.invalidTotal]},void 0,!0,{fileName:Ts,lineNumber:519,columnNumber:15},this):null,Object(h.jsxDEV)(I,{spliteColor:"#fff",tableData:this.state.distdata,Column:[{title:"key\u7801",name:"key_code",prop:"key_code",type:"normal",width:"auto"},{title:"\u5f52\u5c5e\u8425\u9500\u8ba1\u5212",width:"auto",type:"normal",prop:"plan_title",name:"plan_title"},{title:"\u72b6\u6001",prop:"status",name:"status",width:"auto",type:"slot"},{title:"\u64cd\u4f5c",name:"opearo",prop:"opearo",type:"slot",width:"auto"},{title:"\u53d1\u653e\u603b\u6570",prop:"total",name:"total",width:"auto",type:"normal"},{title:"\u5269\u4f59\u603b\u6570",prop:"residue",name:"residue",width:"auto",type:"normal"},{title:"\u4f7f\u7528\u603b\u6570",name:"usage",prop:"usage",type:"normal",width:"auto"},{title:"\u5931\u6548\u603b\u6570",name:"overdue",prop:"overdue",type:"normal",width:"auto"},{title:"\u4f5c\u5e9f\u603b\u6570",name:"invalid",prop:"invalid",type:"normal",width:"auto"},{title:"\u5df2\u5b8c\u7ed3\u603b\u6570",name:"end",prop:"end",type:"normal",width:"auto"},{title:"\u66f4\u65b0\u65f6\u95f4",name:"update_time",prop:"update_time",type:"normal",width:"auto"}],countbarVisible:!1,maxheight:this.state.tableHeight,isSwitch:!1,page:this.state.page,ref:"plan_list",dataCount:this.state.dataCount,pageChange:e=>{this.onPageChange(e)},countChange:e=>{this.onCountChange(e)},checkChange:this.selection.bind(this),ComponentHandler:(e,t)=>{if("dates"==e)return Object(h.jsxDEV)("span",{children:[t.begin_time," \u81f3 ",t.end_time]},void 0,!0,{fileName:Ts,lineNumber:557,columnNumber:21},this);if("title"==e)return Object(h.jsxDEV)("span",{className:"grid-link",onClick:e=>{this.linkTo(t)},children:t.title},void 0,!1,{fileName:Ts,lineNumber:565,columnNumber:21},this);if("switch"==e)return Object(h.jsxDEV)(v.a,{size:"small",checked:1==t.open,disabled:!t.is_open,onChange:e=>{this.onSwitchChange(e,t)}},void 0,!1,{fileName:Ts,lineNumber:577,columnNumber:21},this);if("status"==e)return Object(h.jsxDEV)("p",{className:"dflexa",children:Object(h.jsxDEV)("span",{children:[Object(h.jsxDEV)("font",{className:"icon",style:{background:At.keyStatusBg(parseInt(t.status))}},void 0,!1,{fileName:Ts,lineNumber:591,columnNumber:25},this),t.status_text]},void 0,!0,{fileName:Ts,lineNumber:590,columnNumber:23},this)},void 0,!1,{fileName:Ts,lineNumber:589,columnNumber:21},this);if("opearo"==e){let e=null;return e=1==t.status?Object(h.jsxDEV)("span",{children:[Object(h.jsxDEV)("a",{className:"grid-link",style:{paddingLeft:"2px",color:"#d8dbdd"},children:"\u8be6\u60c5"},void 0,!1,{fileName:Ts,lineNumber:608,columnNumber:25},this),Object(h.jsxDEV)(y.a,{position:y.d.RightTop,children:[Object(h.jsxDEV)(y.b,{children:Object(h.jsxDEV)("div",{className:"linkmore",onClick:e=>{},children:[" ","\u66f4\u591a ",Object(h.jsxDEV)(g.a,{type:"down"},void 0,!1,{fileName:Ts,lineNumber:615,columnNumber:34},this)," "]},void 0,!0,{fileName:Ts,lineNumber:613,columnNumber:29},this)},void 0,!1,{fileName:Ts,lineNumber:612,columnNumber:27},this),Object(h.jsxDEV)(y.c,{children:Object(h.jsxDEV)(O.a,{onClick:(e,i)=>this.menuItemClick(e,i,t),children:[Object(h.jsxDEV)(D.a,{children:"\u6807\u8bb0\u6210\u5df2\u4f7f\u7528"},"1",!1,{fileName:Ts,lineNumber:620,columnNumber:31},this),Object(h.jsxDEV)(D.a,{children:"\u4f5c\u5e9f"},"2",!1,{fileName:Ts,lineNumber:621,columnNumber:31},this),Object(h.jsxDEV)(D.a,{disabled:!0,children:"\u65e5\u5fd7"},"3",!1,{fileName:Ts,lineNumber:622,columnNumber:31},this)]},void 0,!0,{fileName:Ts,lineNumber:619,columnNumber:29},this)},void 0,!1,{fileName:Ts,lineNumber:618,columnNumber:27},this)]},void 0,!0,{fileName:Ts,lineNumber:611,columnNumber:25},this)]},void 0,!0,{fileName:Ts,lineNumber:607,columnNumber:23},this):Object(h.jsxDEV)("span",{children:[Object(h.jsxDEV)("a",{className:"grid-link",style:{paddingLeft:"2px",color:"#d8dbdd"},children:"\u8be6\u60c5"},void 0,!1,{fileName:Ts,lineNumber:633,columnNumber:25},this),Object(h.jsxDEV)(y.a,{position:y.d.RightTop,children:[Object(h.jsxDEV)(y.b,{children:Object(h.jsxDEV)("div",{className:"linkmore",onClick:e=>{},children:[" ","\u66f4\u591a ",Object(h.jsxDEV)(g.a,{type:"down"},void 0,!1,{fileName:Ts,lineNumber:640,columnNumber:34},this)," "]},void 0,!0,{fileName:Ts,lineNumber:638,columnNumber:29},this)},void 0,!1,{fileName:Ts,lineNumber:637,columnNumber:27},this),Object(h.jsxDEV)(y.c,{children:Object(h.jsxDEV)(O.a,{onClick:(e,i)=>this.menuItemClick(e,i,t),children:[Object(h.jsxDEV)(D.a,{disabled:!0,children:"\u6807\u8bb0\u6210\u5df2\u4f7f\u7528"},"1",!1,{fileName:Ts,lineNumber:645,columnNumber:31},this),Object(h.jsxDEV)(D.a,{disabled:2!=t.status,children:"\u4f5c\u5e9f"},"2",!1,{fileName:Ts,lineNumber:648,columnNumber:31},this),Object(h.jsxDEV)(D.a,{disabled:!0,children:"\u65e5\u5fd7"},"3",!1,{fileName:Ts,lineNumber:651,columnNumber:31},this)]},void 0,!0,{fileName:Ts,lineNumber:644,columnNumber:29},this)},void 0,!1,{fileName:Ts,lineNumber:643,columnNumber:27},this)]},void 0,!0,{fileName:Ts,lineNumber:636,columnNumber:25},this)]},void 0,!0,{fileName:Ts,lineNumber:632,columnNumber:23},this),e}}},void 0,!1,{fileName:Ts,lineNumber:537,columnNumber:13},this),this.state.audit_visible?Object(h.jsxDEV)("div",{children:[Object(h.jsxDEV)("div",{className:"modal",children:" "},void 0,!1,{fileName:Ts,lineNumber:667,columnNumber:17},this),Object(h.jsxDEV)("div",{className:"audit-box",children:[Object(h.jsxDEV)(g.a,{type:"close",className:"audit-close",onClick:e=>{this.cancel(e)}},void 0,!1,{fileName:Ts,lineNumber:669,columnNumber:19},this),Object(h.jsxDEV)("div",{className:"audit-box-title",children:"\u53d1\u9001"},void 0,!1,{fileName:Ts,lineNumber:676,columnNumber:19},this),Object(h.jsxDEV)("div",{className:"audit-box-question",children:"\u662f\u5426\u7acb\u5373\u53d1\u9001key\u4ee5\u53ca\u89e3\u538b\u5bc6\u7801?"},void 0,!1,{fileName:Ts,lineNumber:677,columnNumber:19},this),Object(h.jsxDEV)("div",{className:"phone-group",children:[Object(h.jsxDEV)("div",{children:"\u63a5\u6536\u624b\u673a\u53f7"},void 0,!1,{fileName:Ts,lineNumber:679,columnNumber:21},this),Object(h.jsxDEV)("div",{className:"phone-list",children:Object(h.jsxDEV)(Q.a,{value:this.state.phone_radio,isValueEqual:this.isValueEqual,onChange:e=>{this.onPhoneChange(e)},children:this.state.phone_list.map(((e,t)=>Object(h.jsxDEV)(Z.a,{value:t,onClick:()=>{e==this.state.phone_list[this.state.phone_radio]&&this.setState({phone_radio:-1})},children:e},void 0,!1,{fileName:Ts,lineNumber:690,columnNumber:29},this)))},void 0,!1,{fileName:Ts,lineNumber:681,columnNumber:23},this)},void 0,!1,{fileName:Ts,lineNumber:680,columnNumber:21},this)]},void 0,!0,{fileName:Ts,lineNumber:678,columnNumber:19},this),Object(h.jsxDEV)("div",{className:"email-group",children:[Object(h.jsxDEV)("div",{children:"\u63a5\u6536\u90ae\u7bb1"},void 0,!1,{fileName:Ts,lineNumber:706,columnNumber:21},this),Object(h.jsxDEV)("div",{className:"email-list",children:Object(h.jsxDEV)(Q.a,{value:this.state.email_radio,isValueEqual:this.isValueEqual,onChange:e=>{this.onEmailChange(e)},children:this.state.email_list.map(((e,t)=>Object(h.jsxDEV)(Z.a,{value:t,onClick:()=>{e==this.state.email_list[this.state.email_radio]&&this.setState({email_radio:-1})},children:e},void 0,!1,{fileName:Ts,lineNumber:717,columnNumber:29},this)))},void 0,!1,{fileName:Ts,lineNumber:708,columnNumber:23},this)},void 0,!1,{fileName:Ts,lineNumber:707,columnNumber:21},this)]},void 0,!0,{fileName:Ts,lineNumber:705,columnNumber:19},this),Object(h.jsxDEV)("div",{className:"input-group",children:Object(h.jsxDEV)(Di.a,{placeholder:"\u8bf7\u8f93\u5165\u63a5\u6536\u624b\u673a\u53f7",onChange:this.phoneChange,disabled:this.state.phone_radio>-1},void 0,!1,{fileName:Ts,lineNumber:733,columnNumber:21},this)},void 0,!1,{fileName:Ts,lineNumber:732,columnNumber:19},this),Object(h.jsxDEV)("div",{className:"input-group",children:Object(h.jsxDEV)(Di.a,{placeholder:"\u8bf7\u8f93\u5165\u63a5\u6536\u90ae\u7bb1",onChange:this.emailChange,disabled:this.state.email_radio>-1},void 0,!1,{fileName:Ts,lineNumber:740,columnNumber:21},this)},void 0,!1,{fileName:Ts,lineNumber:739,columnNumber:19},this),Object(h.jsxDEV)("div",{className:"audit-btn-group",children:[Object(h.jsxDEV)(u.a,{onClick:e=>{this.cancel(e)},children:"\u53d6\u6d88"},void 0,!1,{fileName:Ts,lineNumber:748,columnNumber:21},this),Object(h.jsxDEV)(u.a,{type:"primary",onClick:e=>{this.send(e)},children:"\u53d1\u9001"},void 0,!1,{fileName:Ts,lineNumber:755,columnNumber:21},this)]},void 0,!0,{fileName:Ts,lineNumber:747,columnNumber:19},this)]},void 0,!0,{fileName:Ts,lineNumber:668,columnNumber:17},this)]},void 0,!0,{fileName:Ts,lineNumber:666,columnNumber:15},this):null]},void 0,!0,{fileName:Ts,lineNumber:517,columnNumber:11},this)]},void 0,!0,{fileName:Ts,lineNumber:475,columnNumber:9},this)},void 0,!1,{fileName:Ts,lineNumber:474,columnNumber:7},this)}}i(253);var Fs="/Users/zhangds/web/blue-brother/frontend/src/pages/plan/key/detail/log.js";const Ls=[{title:"\u521b\u5efa\u65f6\u95f4",name:"time",prop:"time",type:"slot",width:"20%"},{title:"\u64cd\u4f5c\u63cf\u8ff0",name:"message",prop:"message",type:"normal",width:"20%"},{title:"\u8be6\u60c5",name:"opearo",type:"slot",prop:"opearo",width:"50%"}];class Hs extends m.a.Component{constructor(e){super(e),this.state={tabList:[{title:"\u65e5\u5fd7"}],tabactive:0,keyDetailLog_data:[],keyDetail_data:{},tableHeight:500,page:1,key:"",limit:10,total:0}}componentDidMount(e){this.getKeyLogFn({page:1,limit:10})}tabFn(){this.getKeyLogFn()}getKeyLogFn(){let{page:e,limit:t}=this.state,i={page:e,limit:t,key:sessionStorage.getItem("keyCode")};Object(a.hb)(i).then((e=>{Object(a.Tb)(e,((e,t)=>{this.setState({total:e.total,keyDetailLog_data:e.data})}),(e=>{c.a.error(e)}))})).catch((e=>{}))}pageChange(e){this.setState({page:e}),setTimeout((()=>{this.getKeyLogFn()}),0)}countChange(e){this.setState({page:1,limit:e}),setTimeout((()=>{this.getKeyLogFn()}),0)}render(){return Object(h.jsxDEV)("div",{id:"more",className:"maincenter",children:Object(h.jsxDEV)(Ft,{tabs:this.state.tabList,tabChange:this.tabFn,children:0==this.state.tabactive?Object(h.jsxDEV)("div",{className:"main-body",children:Object(h.jsxDEV)(I,{spliteColor:"#fff",tableData:this.state.keyDetailLog_data,Column:Ls,isMultiple:!1,maxheight:this.state.tableHeight,dataCount:this.state.total,countChange:e=>{this.countChange(e)},countbarVisible:!1,isSwitch:!1,pageChange:e=>{this.pageChange(e)},checkChange:this.selection,ComponentHandler:(e,t)=>"time"==e?Object(h.jsxDEV)("div",{children:Y.a.unix(t.time).format("YYYY-MM-DD HH:mm:ss")},void 0,!1,{fileName:Fs,lineNumber:126,columnNumber:28},this):"opearo"==e?Object(h.jsxDEV)("div",{children:t.data?Object(h.jsxDEV)(za.a,{collapsed:!0,name:!1,src:t.data,displayDataTypes:!1},void 0,!1,{fileName:Fs,lineNumber:132,columnNumber:27},this):Object(h.jsxDEV)("span",{children:"-"},void 0,!1,{fileName:Fs,lineNumber:139,columnNumber:27},this)},void 0,!1,{fileName:Fs,lineNumber:130,columnNumber:23},this):void 0},void 0,!1,{fileName:Fs,lineNumber:108,columnNumber:15},this)},void 0,!1,{fileName:Fs,lineNumber:107,columnNumber:13},this):null},void 0,!1,{fileName:Fs,lineNumber:105,columnNumber:9},this)},void 0,!1,{fileName:Fs,lineNumber:104,columnNumber:7},this)}}var qs=i(377),Ms=i.n(qs),Ps=(i(254),"/Users/zhangds/web/blue-brother/frontend/src/pages/plan/key/list.js");const Bs=[{title:"key-\u6279\u6b21ID",name:"id",prop:"id",className:"name",type:"normal",width:"100px"},{title:"\u6279\u6b21\u540d\u79f0",name:"link",prop:"link",type:"slot",width:"180px"},{title:"\u542f\u7528",prop:"switch",name:"switch",width:"80px",type:"solt"},{title:"\u5f52\u5c5e\u8425\u9500\u8ba1\u5212",name:"plan_title",prop:"plan_title",type:"normal",width:"200px"},{title:"\u64cd\u4f5c",name:"plan",type:"slot",prop:"edit",width:"260px"},{title:"\u72b6\u6001",name:"status",type:"slot",prop:"status",width:"60px"},{title:"\u521b\u5efa\u4eba",name:"creator_name",prop:"creator_name",type:"normal",width:"100px"},{title:"\u53d1\u653ekey\u7801\u603b\u6570",name:"grant",type:"normal",prop:"grant",width:"110px"},{title:"\u9886\u53d6key\u603b\u6570",name:"receive",type:"normal",prop:"receive",width:"120px"},{title:"\u5df2\u6d88\u8017key\u603b\u6570",name:"usage",type:"slot",prop:"usage",width:"120px"},{title:"\u4f5c\u5e9fkey\u7801\u603b\u6570",name:"invalid",type:"normal",prop:"invalid",width:"120px"},{title:"\u53ef\u7528key\u7801\u603b\u6570",name:"silent",type:"normal",prop:"silent",width:"140px"},{title:"\u5931\u6548key\u7801\u603b\u6570",name:"overdue",type:"normal",prop:"overdue",width:"140px"},{title:"\u5b8c\u7ed3key\u7801\u603b\u6570",name:"end",type:"normal",prop:"end",width:"140px"},{title:"\u66f4\u65b0\u65f6\u95f4",name:"update_time",type:"normal",prop:"update_time",width:"140px"}];class As extends m.a.Component{constructor(e){super(e),this.phoneChange=e=>{this.setState({phone:e.target.value})},this.emailChange=e=>{this.setState({email:e.target.value})},this.state={planStatus:"",dataCount:0,page:1,limit:10,tabList:[{title:"\u5168\u90e8"},{title:"\u521b\u5efa\u4e2d"},{title:"\u5ba1\u6838\u4e2d"},{title:"\u672a\u901a\u8fc7"},{title:"\u8fdb\u884c\u4e2d"},{title:"\u751f\u6210\u4e2d"},{title:"\u6682\u505c\u4e2d"},{title:"\u5df2\u5b8c\u7ed3"},{title:"\u5df2\u4f5c\u5e9f"}],gridSelection:[],distdata:[],bulkExportLoading:!1,combinedValue:[],distdata2:[{id:0xb32df55cf43,name:"\u7231\u5947\u827a\u6708\u5361\u5151\u6362\u5238",time:"2021-11-08 14:21:06\u81f32021-11-08 15:06:04",plan:"\u8425\u9500\u8ba1\u52122",belongid:3123213,send:100,record:58,used:41,dead:11,fail:12,status:"1"}],activepage:0,distdata4:[],distdata3:[],distdata11:[],tableHeight:600,disabled:!1,email:"",key_word:"",phone:"",phone_list:[],email_list:[],phone:"",email:"",email_radio:-1,phone_radio:-1,menuVisible:!1,isBulkSend:!1}}cancel(e){this.setState({audit_visible:!1})}send(e){let t=new RegExp("^[1][3,4,5,6,7,8,9][0-9]{9}$"),i=[JSON.parse(sessionStorage.getItem("key_batch_id"))],s={phone:this.state.phone_radio>-1?this.state.phone_list[this.state.phone_radio]:this.state.phone,email:this.state.email_radio>-1?this.state.email_list[this.state.email_radio]:this.state.email};t.test(s.phone)?(this.state.isBulkSend&&(i=this.state.gridSelection.map((e=>e.id))),Object(a.i)({ids:i,...s}).then((e=>{Object(a.Tb)(e,((e,t)=>{this.setState({audit_visible:!1}),c.a.success("\u53d1\u9001\u6210\u529f")}),(e=>{c.a.error(e)}))}))):c.a.error("\u624b\u673a\u53f7\u683c\u5f0f\u4e0d\u6b63\u786e")}getKeyList(e={}){let{page:t,limit:i,key_word:s,activepage:l}=this.state,n={page:t,limit:i};n.plan_id=sessionStorage.getItem("key_plan_id"),this.state.combinedValue&&this.state.combinedValue[0]&&(n.begin_time=this.state.combinedValue[0],n.end_time=this.state.combinedValue[1]),l&&(n.status=l),s&&(n.key_word=s),e&&e[0]&&(n.begin_time=e[0],n.end_time=e[1]),e&&null==e[0]&&e.length>1&&(delete n.begin_time,delete n.end_time),0==this.state.activepage&&delete n.status,Object(a.gb)(n).then((e=>{Object(a.Tb)(e,((e,t)=>{e.data.length>0&&sessionStorage.setItem("keyType",e.data[0].bind_object[0]),this.setState({dataCount:e.total,distdata:e.data,planStatus:e.plan.status}),sessionStorage.setItem("key_plan_status",e.plan.status)}),(e=>{}))}))}onPageChange(e){this.setState({page:e}),setTimeout((()=>{this.getKeyList()}),0)}clickFn(){sessionStorage.setItem("pathname2","/home/key-addEdit");sessionStorage.setItem("keybatch_id",""),sessionStorage.setItem("copyOpearo",0),this.state.distdata.length>0&&6==this.state.distdata[0].style?sessionStorage.setItem("keyStyle",1):sessionStorage.setItem("keyStyle",0),sessionStorage.setItem("breakchangenav",JSON.stringify([{pagetitle:"\u65b0\u5efa",items:[{path:"/home/key-list",name:"key\u5217\u8868\u7ba1\u7406"},{path:"/home/key-addEdit",name:"\u65b0\u5efakey"}]}])),sessionStorage.setItem("KeyPcType","3"),this.props.history.push("/home/key-addEdit")}onCopyRow(e,t){sessionStorage.setItem("pathname2","/home/key-addEdit");let i=[{pagetitle:"\u590d\u5236",items:[{path:"/home/key-list",name:"key\u5217\u8868\u7ba1\u7406"},{path:"/home/key-addEdit",name:"\u590d\u5236key:"+t.batch_name}]}];sessionStorage.setItem("keybatch_id",t.id),sessionStorage.setItem("copyOpearo",1),sessionStorage.setItem("key_reseller_id",t.reseller_id),sessionStorage.setItem("breakchangenav",JSON.stringify(i)),sessionStorage.setItem("KeyPcType","2"),this.props.history.push("/home/key-addEdit")}onEditRow(e,t){sessionStorage.setItem("pathname2","/home/key-addEdit");let i=[{pagetitle:"\u7f16\u8f91",items:[{path:"/home/key-list",name:t.plan_title+"key\u5217\u8868\u7ba1\u7406"},{path:"/home/key-list",name:"key-\u6279\u6b21ID:"+t.id},{path:"/home/key-addEdit",name:"\u7f16\u8f91key"}]}];sessionStorage.setItem("breakchangenav",JSON.stringify(i)),sessionStorage.setItem("keybatch_id",t.id),sessionStorage.setItem("key_reseller_id",t.reseller_id),sessionStorage.setItem("approval_id",t.approval_id),sessionStorage.setItem("KeyPcType","1"),this.props.history.push("/home/key-addEdit")}pageChange(e){this.setState({page:e}),setTimeout((()=>{this.getKeyList()}),200)}tabFn(e){switch(this.setState({activepage:e,key_word:""}),e){case 1:this.setState({activepage:1});break;case 2:this.setState({activepage:2});break;case 3:this.setState({activepage:8});break;case 4:this.setState({activepage:4});break;case 5:this.setState({activepage:3});break;case 6:this.setState({activepage:5});break;case 7:this.setState({activepage:6});break;case 8:this.setState({activepage:7})}this.setState({page:1,limit:10}),setTimeout((()=>{this.getKeyList()}),10)}delFn(){G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:"\u662f\u5426\u4f5c\u5e9f\u3010\u6e32\u67d3\u8ba2\u5355\u53f7\u3011\u8ba2\u5355\uff1f"},void 0,!1,{fileName:Ps,lineNumber:466,columnNumber:16},this),onConfirm(){alert("\u5f00\u59cb\u8c03\u7528\u4f5c\u5e9f\u63a5\u53e3")},onCancel(){},className:"questModal",parentComponent:this})}onChangeCombinedDate(e){this.setState({combinedValue:e})}onSwitchChange(e,t){G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:["\u662f\u5426\u5c06",Object(h.jsxDEV)("b",{children:["[key-\u6279\u6b21id",t.id,"]"]},void 0,!0,{fileName:Ps,lineNumber:489,columnNumber:14},this),4==t.status?"\u6682\u505c":"\u5f00\u542f","\uff1f"]},void 0,!0,{fileName:Ps,lineNumber:488,columnNumber:9},this),onConfirm:()=>{this.changeState(e,t)},onCancel:this.onCancel,className:"questModal",parentComponent:this})}changeState(e,t){let i=this,s={operation:e?4:5};Object(a.Zc)(t.id,s).then((s=>{Object(a.Tb)(s,((a,s)=>{let l=Object(oi.a)(this.state.distdata,(e=>e.id==t.id));this.state.distdata[l].status=e,this.setState({distdata:this.state.distdata}),c.a.success(s);let n={page:1,limit:10,plan_id:sessionStorage.getItem("key_plan_id")};i.getKeyList(n)}),(e=>{c.a.error(e)}))}))}iptsureFn(){this.setState({page:1}),setTimeout((()=>{this.getKeyList()}),200)}componentWillMount(){this.setState({tableHeight:window.innerHeight-390});["6","0","2","5","8"].indexOf(sessionStorage.getItem("key_plan_status"))>-1&&this.setState({disabled:!0})}getResellerInfoFunction(e){Object(a.vb)(e).then((e=>{Object(a.Tb)(e,((e,t)=>{this.setState({phone_list:e.contact_phone,email_list:e.contact_email,audit_visible:!0,phone_radio:-1,email_radio:-1})}),(e=>{c.a.error(e)}))}))}bulkSendFunction(){if(this.state.gridSelection.some((e=>![4,5].includes(e.status))))return c.a.warn("\u53ea\u6709\u72b6\u6001\u4e3a\u8fdb\u884c\u4e2d\u3001\u6682\u505c\u4e2d\u7684\u5141\u8bb8\u53d1\u9001");this.getResellerInfoFunction(this.state.gridSelection[0].reseller_id),this.setState({isBulkSend:!0})}bulkExport(){const e=this.state.gridSelection.map((e=>e.id)),t=e.length?"":~~sessionStorage.getItem("key_plan_id");this.setState({bulkExportLoading:!0}),Object(a.Wb)({key_batch_id:e,plan_id:t}).then((e=>{let t=new Blob([e]),i=Date.now()+".zip";var a=document.createElement("a");a.href=window.URL.createObjectURL(t),a.download=i,a.click(),window.URL.revokeObjectURL(a.href),this.setState({bulkExportLoading:!1})})).catch((e=>{}))}cancelKeyFn(e){let t=this;Object(a.m)(e.id).then((e=>{Object(a.Tb)(e,((e,i)=>{c.a.clear(),c.a.success(i);let a={page:1,limit:10,plan_id:sessionStorage.getItem("key_plan_id")};t.getKeyList(a)}),(e=>{c.a.error(e)}))})).catch((e=>{}))}menuItemClick(e,t){let i=this;if(1==e&&(this.setState({isBulkSend:!1}),this.getResellerInfoFunction(t.reseller_id),sessionStorage.setItem("key_batch_id",t.id)),5==e){t.id;if(2==t.status)return c.a.error("\u5ba1\u6838\u4e2d\u7684\u6570\u636e\u4e0d\u5141\u8bb8\u4f5c\u5e9f"),void this.setState({menuVisible:!1});let e={type:1,object_value:t.id};try{Ut(e).then((e=>{2===e?i.cancelKeyFn(t):1===e&&G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:["\u662f\u5426\u4f5c\u5e9fkey\u6279\u6b21ID",Object(h.jsxDEV)("b",{children:["[",t.id,"]"]},void 0,!0,{fileName:Ps,lineNumber:665,columnNumber:30},this),"\uff1f"]},void 0,!0,{fileName:Ps,lineNumber:664,columnNumber:17},this),onConfirm:()=>{i.cancelKeyFn(t)},onCancel:this.onCancel,className:"questModal",parentComponent:this})}))}catch(a){}}6==e&&this.callBack(t)}callBack(e){sessionStorage.setItem("callBackId",JSON.stringify(e.id)),sessionStorage.setItem("callBackType",JSON.stringify(3)),sessionStorage.setItem("pathname2","callback-message");let t=[{pagetitle:"\u56de\u8c03\u5730\u5740",items:[{path:"distributor-list",name:"key\u6279\u6b21\u4e00"+e.batch_name},{path:"callback-message",name:"\u8bbe\u7f6e\u56de\u8c03\u901a\u77e5\u5730\u5740"}]}];sessionStorage.setItem("breaknav",JSON.stringify(t)),sessionStorage.setItem("linkshowname","key\u6279\u6b21"),this.props.history.push("/home/callback-message")}countChange(e){this.setState({page:1,limit:e}),setTimeout((()=>{this.getKeyList()}),0)}onChangeCombinedDate(e){this.setState({combinedValue:e}),this.getKeyList(e)}linkTo(e){let t=[{pagetitle:"\u7f16\u8f91",items:[{path:"/home/key-list",name:"\u8425\u9500\u8ba1\u5212\u7ba1\u7406"},{path:"/home/key-list",name:e.plan_title+"key\u5217\u8868"},{path:"/home/key-detail",name:e.batch_name+"key\u7801\u5217\u8868"}]}];sessionStorage.setItem("breakchangenav",JSON.stringify(t)),sessionStorage.setItem("linkshowname","\u8425\u9500\u8ba1\u5212\u7ba1\u7406"),sessionStorage.setItem("key_batch_id",e.id),this.props.history.push("/home/key-detail")}componentDidUpdate(e,t){t.key_word==this.state.key_word||this.state.key_word||this.getKeyList()}onPhoneChange(e){this.setState({phone_radio:e.target.value})}onEmailChange(e){this.setState({email_radio:e.target.value})}deleteFun(e){G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:"\u4f60\u786e\u5b9a\u8981\u5220\u9664\u8be5\u6761\u6570\u636e?"},void 0,!1,{fileName:Ps,lineNumber:765,columnNumber:16},this),onConfirm:()=>{Object(a.F)(e.id).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.clear(),c.a.success(t),setTimeout((()=>{this.getKeyList()}),3e3)}),(e=>{c.a.error(e)}))}))},onCancel(){},className:"questModal",parentComponent:this})}onReCall(e,t){let i=t.approval_id;G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:"\u8be5\u6570\u636e\u6b63\u5728\u5ba1\u6279\u4e2d,\u662f\u5426\u786e\u8ba4\u64a4\u9500\u5ba1\u6279\uff1f"},void 0,!1,{fileName:Ps,lineNumber:796,columnNumber:16},this),onConfirm:()=>{Object(a.bd)(i).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.success("\u64a4\u9500\u5ba1\u6279\u6210\u529f"),setTimeout((()=>{this.getKeyList()}),3e3)}),(e=>{c.a.error(e)}))}))},onCancel:this.onCancel,className:"questModal",parentComponent:this})}opearoEl(e,t){switch(e){case 1:return[1,8,4,5].includes(t.status)?Object(h.jsxDEV)("span",{className:"grid-link",onClick:e=>{this.onEditRow(e,t)},children:"\u7f16\u8f91"},void 0,!1,{fileName:Ps,lineNumber:832,columnNumber:13},this):Object(h.jsxDEV)("span",{className:"grid-link disabled",children:"\u7f16\u8f91"},void 0,!1,{fileName:Ps,lineNumber:842,columnNumber:18},this);case 2:if([4,5,7].includes(t.status)){if(7===t.status){if(Ms()(t.end_time).valueOf()<=Ms()().valueOf())return Object(h.jsxDEV)("span",{className:"grid-link disabled",children:"\u590d\u5236"},void 0,!1,{fileName:Ps,lineNumber:851,columnNumber:22},this)}return Object(h.jsxDEV)("span",{className:"grid-link",onClick:e=>{this.onCopyRow(e,t)},children:"\u590d\u5236"},void 0,!1,{fileName:Ps,lineNumber:856,columnNumber:13},this)}return Object(h.jsxDEV)("span",{className:"grid-link disabled",children:"\u590d\u5236"},void 0,!1,{fileName:Ps,lineNumber:866,columnNumber:18},this);case 3:return[2].includes(t.status)?Object(h.jsxDEV)("span",{className:"grid-link",onClick:e=>this.onReCall(e,t),children:"\u64a4\u9500\u5ba1\u6279"},void 0,!1,{fileName:Ps,lineNumber:871,columnNumber:13},this):Object(h.jsxDEV)("span",{className:"grid-link disabled",children:"\u64a4\u9500\u5ba1\u6279"},void 0,!1,{fileName:Ps,lineNumber:876,columnNumber:18},this);case 4:return 8===t.status&&1===t.old_status?Object(h.jsxDEV)("span",{className:"grid-link",style:{color:"red"},onClick:()=>this.deleteFun(t),children:"\u5220\u9664"},void 0,!1,{fileName:Ps,lineNumber:881,columnNumber:13},this):[8,4,5].includes(t.status)&&1!==t.old_status?Object(h.jsxDEV)(y.a,{position:y.d.RightTop,visible:this.state.menuVisible,onVisibleChange:e=>this.setState({visible:e}),children:[Object(h.jsxDEV)(y.b,{children:Object(h.jsxDEV)("div",{className:"linkmore grid-link",children:["\u66f4\u591a ",Object(h.jsxDEV)(g.a,{type:"down"},void 0,!1,{fileName:Ps,lineNumber:901,columnNumber:22},this)]},void 0,!0,{fileName:Ps,lineNumber:900,columnNumber:17},this)},void 0,!1,{fileName:Ps,lineNumber:899,columnNumber:15},this),Object(h.jsxDEV)(y.c,{children:Object(h.jsxDEV)(O.a,{onClick:(e,i)=>this.menuItemClick(i,t),children:[Object(h.jsxDEV)(D.a,{children:"\u53d1\u9001\u5bc6\u7801\u53ca\u538b\u7f29\u5305"},"1",!1,{fileName:Ps,lineNumber:906,columnNumber:19},this),Object(h.jsxDEV)(D.a,{children:"\u8bbe\u7f6e\u56de\u8c03"},"6",!1,{fileName:Ps,lineNumber:907,columnNumber:19},this),Object(h.jsxDEV)(D.a,{disabled:!0,children:"\u65e5\u5fd7"},"2",!1,{fileName:Ps,lineNumber:908,columnNumber:19},this),Object(h.jsxDEV)(D.a,{children:"\u4f5c\u5e9f"},"5",!1,{fileName:Ps,lineNumber:911,columnNumber:19},this)]},void 0,!0,{fileName:Ps,lineNumber:905,columnNumber:17},this)},void 0,!1,{fileName:Ps,lineNumber:904,columnNumber:15},this)]},void 0,!0,{fileName:Ps,lineNumber:894,columnNumber:13},this):1===t.status?Object(h.jsxDEV)("span",{className:"grid-link",style:{color:"red"},onClick:()=>this.deleteFun(t),children:"\u5220\u9664"},void 0,!1,{fileName:Ps,lineNumber:919,columnNumber:15},this):Object(h.jsxDEV)("span",{className:"grid-link disabled",children:"\u66f4\u591a"},void 0,!1,{fileName:Ps,lineNumber:930,columnNumber:18},this);default:return}}dingTask(e){Object(a.G)(e).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.success(t),this.getKeyList()}),(e=>{c.a.error(e)}))}))}render(){var e;const t=e=>Object(h.jsxDEV)("div",{children:[Object(h.jsxDEV)("b",{children:"\u5151\u6362\u7801\u7edf\u8ba1"},void 0,!1,{fileName:Ps,lineNumber:957,columnNumber:11},this),Object(h.jsxDEV)("ul",{className:"dflexaj mt5 fz12",children:[Object(h.jsxDEV)("li",{className:"dflexajc mr15",children:[Object(h.jsxDEV)("span",{children:"\u5df2\u4f5c\u5e9f\u6570"},void 0,!1,{fileName:Ps,lineNumber:960,columnNumber:15},this),Object(h.jsxDEV)("span",{children:e.invalid_total},void 0,!1,{fileName:Ps,lineNumber:961,columnNumber:15},this)]},void 0,!0,{fileName:Ps,lineNumber:959,columnNumber:13},this),Object(h.jsxDEV)("li",{className:"dflexajc mr15",children:[Object(h.jsxDEV)("span",{children:"\u5df2\u4f7f\u7528\u6570"},void 0,!1,{fileName:Ps,lineNumber:964,columnNumber:15},this),Object(h.jsxDEV)("span",{children:e.usage_total},void 0,!1,{fileName:Ps,lineNumber:965,columnNumber:15},this)]},void 0,!0,{fileName:Ps,lineNumber:963,columnNumber:13},this),Object(h.jsxDEV)("li",{className:"dflexajc",children:[Object(h.jsxDEV)("span",{children:"\u5df2\u5931\u6548\u6570"},void 0,!1,{fileName:Ps,lineNumber:972,columnNumber:15},this),Object(h.jsxDEV)("span",{children:e.overdue_total},void 0,!1,{fileName:Ps,lineNumber:973,columnNumber:15},this)]},void 0,!0,{fileName:Ps,lineNumber:971,columnNumber:13},this)]},void 0,!0,{fileName:Ps,lineNumber:958,columnNumber:11},this)]},void 0,!0,{fileName:Ps,lineNumber:956,columnNumber:9},this),{current:i,pageSize:a}=this.state;return Object(h.jsxDEV)("div",{id:"exchangecodelist",children:Object(h.jsxDEV)(vt.a,{loading:this.state.bulkExportLoading,icon:"circle",iconSize:32,iconText:"\u4e0b\u8f7d\u4e2d...",children:Object(h.jsxDEV)(Ft,{tabs:this.state.tabList,tabChange:this.tabFn.bind(this),children:[Object(h.jsxDEV)("div",{className:"codetable dflexj",children:[Object(h.jsxDEV)("div",{children:[Object(h.jsxDEV)(u.a,{type:"primary",icon:"plus",onClick:this.clickFn.bind(this),disabled:this.state.disabled,children:"\u65b0\u5efakey"},void 0,!1,{fileName:Ps,lineNumber:991,columnNumber:17},this),Object(h.jsxDEV)(u.a,{type:"primary",onClick:()=>this.bulkExport(),children:"\u6279\u91cf\u5bfc\u51fa"},void 0,!1,{fileName:Ps,lineNumber:999,columnNumber:17},this),Object(h.jsxDEV)(u.a,{type:"primary",onClick:()=>this.bulkSendFunction(),disabled:!(null!==(e=this.state.gridSelection[0])&&void 0!==e&&e.reseller_id),children:"\u6279\u91cf\u53d1\u9001"},void 0,!1,{fileName:Ps,lineNumber:1002,columnNumber:17},this)]},void 0,!0,{fileName:Ps,lineNumber:990,columnNumber:15},this),Object(h.jsxDEV)(n.a,{icon:"search",placeholder:"\u8bf7\u8f93\u5165key\u6279\u6b21ID\u8fdb\u884c\u5339\u914d\u67e5\u8be2",onChange:e=>this.setState({key_word:e}),value:this.state.key_word,wordSearch:this.iptsureFn.bind(this),countShow:!1,height:"36px",width:"260px",onClearItem:e=>{this.setState({key_word:""})},alignment:"left"},void 0,!1,{fileName:Ps,lineNumber:1010,columnNumber:15},this)]},void 0,!0,{fileName:Ps,lineNumber:989,columnNumber:13},this),Object(h.jsxDEV)("div",{className:"code-table",children:Object(h.jsxDEV)(I,{countChange:e=>{this.countChange(e)},spliteColor:"#fff",tableData:this.state.distdata,Column:Bs,maxheight:this.state.tableHeight,countbarVisible:!1,isSwitch:!1,page:this.state.page,dataCount:this.state.dataCount,pageChange:e=>{this.pageChange(e)},checkChange:e=>{this.setState({gridSelection:e})},ComponentHandler:(e,i)=>{if("link"==e){let e=Object(h.jsxDEV)("span",{className:"grid-link",onClick:e=>{this.linkTo(i)},children:i.batch_name},void 0,!1,{fileName:Ps,lineNumber:1047,columnNumber:23},this);return 4==i.style&&(e=Object(h.jsxDEV)("span",{style:{color:"#d8dbdd"},children:i.batch_name},void 0,!1,{fileName:Ps,lineNumber:1057,columnNumber:29},this)),e}return"usage"==e?Object(h.jsxDEV)(Ei.a,{trigger:"hover",content:t(i),children:Object(h.jsxDEV)("span",{className:"grid-link",children:i.usage},void 0,!1,{fileName:Ps,lineNumber:1064,columnNumber:25},this)},void 0,!1,{fileName:Ps,lineNumber:1063,columnNumber:23},this):"switch"==e?Object(h.jsxDEV)(v.a,{size:"small",checked:4==i.status,disabled:i.status>=6,onChange:e=>{this.onSwitchChange(e,i)}},void 0,!1,{fileName:Ps,lineNumber:1070,columnNumber:23},this):"status"==e?Object(h.jsxDEV)("p",{className:"dflexa",children:Object(h.jsxDEV)("span",{children:[Object(h.jsxDEV)("font",{className:"icon",style:{background:At.keysStatusBg(i.status)}},void 0,!1,{fileName:Ps,lineNumber:1085,columnNumber:27},this),i.status_text]},void 0,!0,{fileName:Ps,lineNumber:1084,columnNumber:25},this)},void 0,!1,{fileName:Ps,lineNumber:1083,columnNumber:23},this):"edit"==e?Object(h.jsxDEV)("div",{children:[this.opearoEl(1,i),this.opearoEl(2,i),this.opearoEl(3,i),i.approval_id&&2===i.status?Object(h.jsxDEV)("span",{className:"grid-link",onClick:e=>{this.dingTask(i.approval_id)},children:"\u9489\u9489\u5ba1\u6279\u67e5\u8be2"},void 0,!1,{fileName:Ps,lineNumber:1103,columnNumber:27},this):Object(h.jsxDEV)("span",{className:"grid-link disabled",children:"\u9489\u9489\u5ba1\u6279\u67e5\u8be2"},void 0,!1,{fileName:Ps,lineNumber:1112,columnNumber:27},this),this.opearoEl(4,i)]},void 0,!0,{fileName:Ps,lineNumber:1098,columnNumber:23},this):void 0}},void 0,!1,{fileName:Ps,lineNumber:1026,columnNumber:15},this)},void 0,!1,{fileName:Ps,lineNumber:1025,columnNumber:13},this),this.state.audit_visible?Object(h.jsxDEV)("div",{children:[Object(h.jsxDEV)("div",{className:"modal",children:" "},void 0,!1,{fileName:Ps,lineNumber:1124,columnNumber:17},this),Object(h.jsxDEV)("div",{className:"audit-box",children:[Object(h.jsxDEV)(g.a,{type:"close",className:"audit-close",onClick:e=>{this.cancel(e)}},void 0,!1,{fileName:Ps,lineNumber:1126,columnNumber:19},this),Object(h.jsxDEV)("div",{className:"audit-box-title",children:"\u53d1\u9001"},void 0,!1,{fileName:Ps,lineNumber:1133,columnNumber:19},this),Object(h.jsxDEV)("div",{className:"audit-box-question",children:"\u662f\u5426\u7acb\u5373\u53d1\u9001key\u4ee5\u53ca\u89e3\u538b\u5bc6\u7801?"},void 0,!1,{fileName:Ps,lineNumber:1134,columnNumber:19},this),Object(h.jsxDEV)("div",{className:"phone-group",children:[Object(h.jsxDEV)("div",{children:"\u63a5\u6536\u624b\u673a\u53f7"},void 0,!1,{fileName:Ps,lineNumber:1136,columnNumber:21},this),Object(h.jsxDEV)("div",{className:"phone-list",children:Object(h.jsxDEV)(Q.a,{value:this.state.phone_radio,isValueEqual:this.isValueEqual,onChange:e=>{this.onPhoneChange(e)},children:this.state.phone_list.map(((e,t)=>Object(h.jsxDEV)(Z.a,{value:t,onClick:()=>{e==this.state.phone_list[this.state.phone_radio]&&this.setState({phone_radio:-1})},children:e},t,!1,{fileName:Ps,lineNumber:1147,columnNumber:29},this)))},void 0,!1,{fileName:Ps,lineNumber:1138,columnNumber:23},this)},void 0,!1,{fileName:Ps,lineNumber:1137,columnNumber:21},this)]},void 0,!0,{fileName:Ps,lineNumber:1135,columnNumber:19},this),Object(h.jsxDEV)("div",{className:"email-group",children:[Object(h.jsxDEV)("div",{children:"\u63a5\u6536\u90ae\u7bb1"},void 0,!1,{fileName:Ps,lineNumber:1164,columnNumber:21},this),Object(h.jsxDEV)("div",{className:"email-list",children:Object(h.jsxDEV)(Q.a,{value:this.state.email_radio,isValueEqual:this.isValueEqual,onChange:e=>{this.onEmailChange(e)},children:this.state.email_list.map(((e,t)=>Object(h.jsxDEV)(Z.a,{value:t,onClick:()=>{e==this.state.email_list[this.state.email_radio]&&this.setState({email_radio:-1})},children:e},t,!1,{fileName:Ps,lineNumber:1175,columnNumber:29},this)))},void 0,!1,{fileName:Ps,lineNumber:1166,columnNumber:23},this)},void 0,!1,{fileName:Ps,lineNumber:1165,columnNumber:21},this)]},void 0,!0,{fileName:Ps,lineNumber:1163,columnNumber:19},this),Object(h.jsxDEV)("div",{className:"input-group",children:Object(h.jsxDEV)(Di.a,{placeholder:"\u8bf7\u8f93\u5165\u63a5\u6536\u624b\u673a\u53f7",onChange:this.phoneChange,disabled:this.state.phone_radio>-1},void 0,!1,{fileName:Ps,lineNumber:1192,columnNumber:21},this)},void 0,!1,{fileName:Ps,lineNumber:1191,columnNumber:19},this),Object(h.jsxDEV)("div",{className:"input-group",children:Object(h.jsxDEV)(Di.a,{placeholder:"\u8bf7\u8f93\u5165\u63a5\u6536\u90ae\u7bb1",onChange:this.emailChange,disabled:this.state.email_radio>-1},void 0,!1,{fileName:Ps,lineNumber:1199,columnNumber:21},this)},void 0,!1,{fileName:Ps,lineNumber:1198,columnNumber:19},this),Object(h.jsxDEV)("div",{className:"audit-btn-group",children:[Object(h.jsxDEV)(u.a,{onClick:e=>{this.cancel(e)},children:"\u53d6\u6d88"},void 0,!1,{fileName:Ps,lineNumber:1207,columnNumber:21},this),Object(h.jsxDEV)(u.a,{type:"primary",onClick:e=>{this.send(e)},children:"\u53d1\u9001"},void 0,!1,{fileName:Ps,lineNumber:1214,columnNumber:21},this)]},void 0,!0,{fileName:Ps,lineNumber:1206,columnNumber:19},this)]},void 0,!0,{fileName:Ps,lineNumber:1125,columnNumber:17},this)]},void 0,!0,{fileName:Ps,lineNumber:1123,columnNumber:15},this):null]},void 0,!0,{fileName:Ps,lineNumber:988,columnNumber:11},this)},void 0,!1,{fileName:Ps,lineNumber:982,columnNumber:9},this)},void 0,!1,{fileName:Ps,lineNumber:981,columnNumber:7},this)}}var zs=i(483),Js=(i(255),"/Users/zhangds/web/blue-brother/frontend/src/components/UseUploadExcel/index.jsx");const Us=[{title:"\u884c\u53f7",name:"id"},{title:"key",name:"key"},{title:"\u9519\u8bef\u539f\u56e0",name:"msg"}];var Ws=e=>{const{title:t="\u63d0\u793a",onClose:i,onImport:s,visible:l=!1,url:n}=e,[o,m]=Object(r.useState)(null),[d,b]=Object(r.useState)(""),[p,N]=Object(r.useState)(2),[j,v]=Object(r.useState)(!1),[f,_]=Object(r.useState)(""),[x,y]=Object(r.useState)(!0),[O,D]=Object(r.useState)(!1),[E,V]=Object(r.useState)(!1),[k,S]=Object(r.useState)(0),[w,C]=Object(r.useState)(0),[T,I]=Object(r.useState)([]),F=Object(r.useRef)(null),[L,H]=Object(r.useState)(!1);Object(r.useEffect)((()=>{try{let e=F.current;e&&e.click()}catch(e){}}),[F,L]);const q=e=>{let t="";for(let i in e)t+=e[i]+" ";return t},M=async e=>{v(!0);let t=new FormData;t.append("file",e),Object(a.h)(n,t).then((e=>{if(v(!1),200===e.code||0===e.code||1===e.code)switch(e.code){case 200:return void(e=>{N(200),_(e.data.hash),y(!1)})(e);case 0:return void N(0);case 1:return void(e=>{D(!0);let t=e.data.rowError;S(t.total),C(t.error_count),_(t.hash);let i=[];for(let a in t.error)i.push(t.error[a]);i=i.map(((e,t)=>({key:e.key,id:t+1,msg:q(e.msg)}))),I(i)})(e);default:return}else c.a.error(e.message),N(0)}))},P=e=>{let t=e.target.files[0];m(t),b(t.name),V(!0),M(t)},B=()=>{""!==f&&(A(),s(f))},A=()=>{N(2),D(!1),V(!1),y(!0),i()},z=()=>Object(h.jsxDEV)("div",{className:"up-files-excel",children:[Object(h.jsxDEV)("div",{className:"user-file-box",children:[Object(h.jsxDEV)("p",{className:"user-file-name",children:[Object(h.jsxDEV)(g.a,{type:"text-guide-o"},void 0,!1,{fileName:Js,lineNumber:264,columnNumber:13},void 0),d]},void 0,!0,{fileName:Js,lineNumber:263,columnNumber:11},void 0),Object(h.jsxDEV)("div",{className:"file-update-box",children:[Object(h.jsxDEV)("input",{type:"file",accept:".xls,.xlsx,.csv",className:"upload-input1",onClick:e=>e.target.value="",onChange:e=>P(e)},void 0,!1,{fileName:Js,lineNumber:268,columnNumber:13},void 0),Object(h.jsxDEV)(g.a,{type:"up-circle-o"},void 0,!1,{fileName:Js,lineNumber:275,columnNumber:13},void 0),Object(h.jsxDEV)("span",{children:"\u66f4\u65b0\u6587\u4ef6"},void 0,!1,{fileName:Js,lineNumber:276,columnNumber:13},void 0)]},void 0,!0,{fileName:Js,lineNumber:267,columnNumber:11},void 0)]},void 0,!0,{fileName:Js,lineNumber:262,columnNumber:9},void 0),(()=>{switch(p){case 0:return Object(h.jsxDEV)("div",{className:"upload-error",children:[Object(h.jsxDEV)(g.a,{type:"error-circle",className:"error-icon"},void 0,!1,{fileName:Js,lineNumber:249,columnNumber:9},void 0),Object(h.jsxDEV)("span",{children:"\u6587\u4ef6\u89e3\u6790\u5931\u8d25, \u8bf7\u67e5\u770b\u5bfc\u5165\u89c4\u5219\u5e76\u66f4\u65b0\u6587\u4ef6"},void 0,!1,{fileName:Js,lineNumber:250,columnNumber:9},void 0)]},void 0,!0,{fileName:Js,lineNumber:248,columnNumber:7},void 0);case 200:return Object(h.jsxDEV)("div",{className:"upload-success",children:[Object(h.jsxDEV)(g.a,{type:"check-circle",className:"success-icon"},void 0,!1,{fileName:Js,lineNumber:241,columnNumber:9},void 0),Object(h.jsxDEV)("span",{children:'\u6587\u4ef6\u89e3\u6790\u6210\u529f\uff0c \u70b9\u51fb "\u786e\u5b9a\u5bfc\u5165" \u5373\u53ef\u5bfc\u5165'},void 0,!1,{fileName:Js,lineNumber:242,columnNumber:9},void 0)]},void 0,!0,{fileName:Js,lineNumber:240,columnNumber:7},void 0);default:return}})()]},void 0,!0,{fileName:Js,lineNumber:261,columnNumber:7},void 0),J=()=>Object(h.jsxDEV)("div",{className:"upload-panel1",children:[Object(h.jsxDEV)("div",{className:"upload-label",children:"\u4e0b\u8f7d\u6a21\u677f\u5e76\u586b\u5199\u540e\u4e0a\u4f20"},void 0,!1,{fileName:Js,lineNumber:301,columnNumber:9},void 0),Object(h.jsxDEV)("div",{className:"upload-info",children:Object(h.jsxDEV)("div",{children:["\u8bf7\u5148\u4e0b\u8f7d\u300c\u6570\u5b57\u4e16\u754c\u8425\u9500\u7ba1\u7406\u7cfb\u7edf_keys_\u6a21\u677f\u300d\u5e76\u6309\u7167\u6a21\u677f\u586b\u5199\u540e\u518d\u4e0a\u4f20\uff0c",Object(h.jsxDEV)("span",{style:{color:"red"},children:"\u6279\u91cf\u4e0a\u4f20\u67e5\u8be2 \u53ea\u80fd\u662f\u4e00\u4e2a\u8ba1\u5212\u4e0b\u9762key\u3002"},void 0,!1,{fileName:Js,lineNumber:305,columnNumber:13},void 0)]},void 0,!0,{fileName:Js,lineNumber:303,columnNumber:11},void 0)},void 0,!1,{fileName:Js,lineNumber:302,columnNumber:9},void 0),Object(h.jsxDEV)(u.a,{type:"default",className:"btn-upload1",onClick:()=>{window.location.href="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/key%E6%A8%A1%E7%89%88.xlsx"},children:"\u4e0b\u8f7d\u6a21\u677f"},void 0,!1,{fileName:Js,lineNumber:308,columnNumber:9},void 0),Object(h.jsxDEV)("div",{className:"btn-group",children:[Object(h.jsxDEV)(u.a,{type:"default",onClick:()=>A(),children:"\u53d6\u6d88"},void 0,!1,{fileName:Js,lineNumber:313,columnNumber:11},void 0),Object(h.jsxDEV)(u.a,{type:"primary",disabled:x,onClick:e=>{B()},style:{background:"#1890ff",color:"#FFFFFF",border:"none"},children:"\u786e\u5b9a\u5bfc\u5165"},void 0,!1,{fileName:Js,lineNumber:316,columnNumber:11},void 0)]},void 0,!0,{fileName:Js,lineNumber:312,columnNumber:9},void 0)]},void 0,!0,{fileName:Js,lineNumber:300,columnNumber:7},void 0);return Object(h.jsxDEV)("div",{children:l?Object(h.jsxDEV)("div",{children:[Object(h.jsxDEV)("div",{className:"modal"},void 0,!1,{fileName:Js,lineNumber:397,columnNumber:11},void 0),Object(h.jsxDEV)("div",{className:"import-excel",style:{height:"auto"},children:Object(h.jsxDEV)(vt.a,{loading:j,iconText:"\u89e3\u6790\u4e2d...",icon:"circle",children:[Object(h.jsxDEV)("div",{className:"import-header",children:[Object(h.jsxDEV)("div",{className:"import-title",children:t},void 0,!1,{fileName:Js,lineNumber:401,columnNumber:17},void 0),Object(h.jsxDEV)(g.a,{type:"close",className:"import-close",onClick:()=>A()},void 0,!1,{fileName:Js,lineNumber:402,columnNumber:17},void 0)]},void 0,!0,{fileName:Js,lineNumber:400,columnNumber:15},void 0),O?Object(h.jsxDEV)("div",{children:[Object(h.jsxDEV)("div",{className:"file-upload-tip",children:["\u6587\u4ef6\u4e0a\u4f20\u6210\u529f.\u5171 ",k," \u6761key\u7801,\u5176\u4e2d ",k-w,"\u6761\u53ef\u6210\u529f\u5bfc\u5165"]},void 0,!0,{fileName:Js,lineNumber:354,columnNumber:9},void 0),Object(h.jsxDEV)("div",{className:"file-errmsg1",children:["\u53d1\u73b0\u4ee5\u4e0b ",w," \u6761\u4e0d\u7b26\u5408\u8981\u6c42,\u5c06\u4e0d\u4f1a\u88ab\u5bfc\u5165"]},void 0,!0,{fileName:Js,lineNumber:358,columnNumber:9},void 0),Object(h.jsxDEV)("div",{className:"gridpanel1",children:Object(h.jsxDEV)(zs.a,{columns:Us,datasets:T,scroll:{y:250},size:"large"},void 0,!1,{fileName:Js,lineNumber:361,columnNumber:11},void 0)},void 0,!1,{fileName:Js,lineNumber:360,columnNumber:9},void 0),Object(h.jsxDEV)("div",{className:"foot-bar",children:Object(h.jsxDEV)("div",{className:"btn-group",children:[Object(h.jsxDEV)(u.a,{type:"default",onClick:e=>{m(null),N(2),D(!1),V(!1),y(!0),H(!L)},children:"\u91cd\u65b0\u4e0a\u4f20"},void 0,!1,{fileName:Js,lineNumber:366,columnNumber:13},void 0),Object(h.jsxDEV)(u.a,{type:"primary",onClick:e=>{B()},style:{background:"#1890ff",color:"#FFFFFF",border:"none"},children:"\u786e\u5b9a\u5bfc\u5165"},void 0,!1,{fileName:Js,lineNumber:374,columnNumber:13},void 0)]},void 0,!0,{fileName:Js,lineNumber:365,columnNumber:11},void 0)},void 0,!1,{fileName:Js,lineNumber:364,columnNumber:9},void 0)]},void 0,!0,{fileName:Js,lineNumber:353,columnNumber:7},void 0):Object(h.jsxDEV)("div",{children:[Object(h.jsxDEV)("div",{children:[Object(h.jsxDEV)("div",{className:"step-bar",children:[Object(h.jsxDEV)("div",{className:"step-group",children:[Object(h.jsxDEV)("div",{className:"step-code active",children:"1"},void 0,!1,{fileName:Js,lineNumber:181,columnNumber:13},void 0),Object(h.jsxDEV)("span",{className:"step-label active",children:"\u4e0a\u4f20\u6587\u4ef6"},void 0,!1,{fileName:Js,lineNumber:182,columnNumber:13},void 0)]},void 0,!0,{fileName:Js,lineNumber:180,columnNumber:11},void 0),Object(h.jsxDEV)("div",{className:"step-center",children:Object(h.jsxDEV)("div",{className:"step-line"},void 0,!1,{fileName:Js,lineNumber:185,columnNumber:13},void 0)},void 0,!1,{fileName:Js,lineNumber:184,columnNumber:11},void 0),Object(h.jsxDEV)("div",{className:"step-group",children:[Object(h.jsxDEV)("div",{className:"step-code",children:"2"},void 0,!1,{fileName:Js,lineNumber:188,columnNumber:13},void 0),Object(h.jsxDEV)("span",{className:"step-label",children:"\u5bfc\u5165\u5b8c\u6210"},void 0,!1,{fileName:Js,lineNumber:189,columnNumber:13},void 0)]},void 0,!0,{fileName:Js,lineNumber:187,columnNumber:11},void 0)]},void 0,!0,{fileName:Js,lineNumber:179,columnNumber:9},void 0),Object(h.jsxDEV)("div",{className:"upload-panel1",children:[Object(h.jsxDEV)("div",{className:"upload-label",children:"\u76f4\u63a5\u4e0a\u4f20"},void 0,!1,{fileName:Js,lineNumber:194,columnNumber:11},void 0),Object(h.jsxDEV)("div",{className:"upload-info",children:[Object(h.jsxDEV)("div",{children:" - \u652f\u6301\u6587\u4ef6\u7c7b\u578b\uff1axls\uff0cxlsx\uff0ccsv"},void 0,!1,{fileName:Js,lineNumber:196,columnNumber:13},void 0),Object(h.jsxDEV)("div",{children:"- \u652f\u6301\u6240\u6709\u57fa\u7840\u5b57\u6bb5\u7684\u5bfc\u5165\uff0c\u4e00\u6b21\u81f3\u591a\u5bfc\u5165 100 \u6761key\u7801\uff08\u4e0d\u7b26\u5408\u89c4\u5219\u6574\u6761\u4efb\u52a1\u4e0d\u4e88\u4ee5\u5bfc\u5165\uff09"},void 0,!1,{fileName:Js,lineNumber:197,columnNumber:13},void 0)]},void 0,!0,{fileName:Js,lineNumber:195,columnNumber:11},void 0)]},void 0,!0,{fileName:Js,lineNumber:193,columnNumber:9},void 0)]},void 0,!0,{fileName:Js,lineNumber:178,columnNumber:7},void 0),E?z():Object(h.jsxDEV)("div",{className:"upload-excel-01",children:[Object(h.jsxDEV)("input",{ref:F,type:"file",accept:".xls,.xlsx,.csv",className:"upload-input",onClick:e=>e.target.value="",onChange:e=>P(e)},void 0,!1,{fileName:Js,lineNumber:213,columnNumber:9},void 0),Object(h.jsxDEV)(u.a,{style:{background:"#1890ff",color:"#FFFFFF",border:"none"},children:"\u4e0a\u4f20\u6587\u4ef6"},void 0,!1,{fileName:Js,lineNumber:221,columnNumber:9},void 0)]},void 0,!0,{fileName:Js,lineNumber:212,columnNumber:7},void 0),J()]},void 0,!0,{fileName:Js,lineNumber:340,columnNumber:7},void 0)]},void 0,!0,{fileName:Js,lineNumber:399,columnNumber:13},void 0)},void 0,!1,{fileName:Js,lineNumber:398,columnNumber:11},void 0)]},void 0,!0,{fileName:Js,lineNumber:396,columnNumber:9},void 0):null},void 0,!1,{fileName:Js,lineNumber:394,columnNumber:5},void 0)},Rs=(i(257),"/Users/zhangds/web/blue-brother/frontend/src/components/keysFind/index.jsx");const Ks=[{key:0,text:"\u5168\u90e8"},{key:1,text:"\u53ef\u4f7f\u7528"},{key:2,text:"\u5df2\u4f7f\u7528"},{key:3,text:"\u5df2\u5b8c\u7ed3"},{key:4,text:"\u5df2\u4f5c\u5e9f"}];var Ys=Object(r.forwardRef)((({onQuery:e,query:t,resetChange:i},o)=>{const[m,d]=Object(r.useState)({date:[],reseller:"",plan:"",state:{key:0,text:"\u5168\u90e8"},key:"",key_batch_id:""}),[b,p]=Object(r.useState)([]),[N,j]=Object(r.useState)([]),[v,g]=Object(r.useState)([]);function f(){d({date:[],reseller:"",plan:"",state:{key:0,text:"\u5168\u90e8"},key:"",key_batch_id:""})}function _(e,t){return Object(h.jsxDEV)($.a,{height:256,itemCount:e.length,itemSize:32,width:200,children:({index:i,style:a})=>Object(h.jsxDEV)("div",{style:a,children:t(e[i],i)},void 0,!1,{fileName:Rs,lineNumber:86,columnNumber:32},this)},void 0,!1,{fileName:Rs,lineNumber:85,columnNumber:7},this)}function x(e){var t,i,a,s;return{begin_time:e.date[0]||null,end_time:e.date[1]||null,reseller_id:(null===(t=e.reseller)||void 0===t?void 0:t.key)||null,plan_id:(null===(i=e.plan)||void 0===i?void 0:i.key)||null,status:(null===(a=e.state)||void 0===a?void 0:a.key)||null,key:e.key||null,key_batch_id:(null===(s=e.key_batch_id)||void 0===s?void 0:s.id)||null}}return Object(r.useEffect)((()=>{let e=x(m);t(e)}),[m]),Object(r.useEffect)((()=>{Object(a.ub)().then((e=>Object(a.Tb)(e,((e,t)=>{const i=e.map((e=>({key:e.id,text:e.name})));p(i)}),(e=>{})))),Object(a.rb)().then((e=>Object(a.Tb)(e,((e,t)=>{const i=e.map((e=>({key:e.id,text:e.title})));j(i)}),(e=>{}))))}),[]),Object(r.useImperativeHandle)(o,(()=>({clearData:f}))),Object(h.jsxDEV)("div",{className:"keysFind",children:Object(h.jsxDEV)(l.a,{children:[Object(h.jsxDEV)(s.a,{labelname:"\u8bf7\u9009\u62e9\u65e5\u671f\uff1a",required:"",labelwidth:"95px",children:Object(h.jsxDEV)(ee.a,{dateFormat:"YYYY-MM-DD",value:m.date,className:"zent-datepicker-plan",width:204,onChange:e=>d({...m,date:e})},void 0,!1,{fileName:Rs,lineNumber:132,columnNumber:11},void 0)},void 0,!1,{fileName:Rs,lineNumber:131,columnNumber:9},void 0),Object(h.jsxDEV)(s.a,{labelname:"\u72b6\u6001\uff1a",required:"",labelwidth:"50px",children:Object(h.jsxDEV)(X.a,{name:"state",value:m.state,options:Ks,placeholder:"\u8bf7\u9009\u62e9",width:204,clearable:!0,onChange:e=>d({...m,state:e})},void 0,!1,{fileName:Rs,lineNumber:141,columnNumber:11},void 0)},void 0,!1,{fileName:Rs,lineNumber:140,columnNumber:9},void 0),Object(h.jsxDEV)(s.a,{labelname:"\u5206\u9500\u5546\uff1a",required:"",labelwidth:"70px",children:Object(h.jsxDEV)(X.a,{value:m.reseller,options:b,placeholder:"\u8bf7\u9009\u62e9",renderOptionList:_,width:204,clearable:!0,onChange:e=>d({...m,reseller:e})},void 0,!1,{fileName:Rs,lineNumber:152,columnNumber:11},void 0)},void 0,!1,{fileName:Rs,lineNumber:151,columnNumber:9},void 0),Object(h.jsxDEV)(s.a,{labelname:"\u8ba1\u5212\u540d\u79f0\uff1a",required:"",labelwidth:"90px",children:Object(h.jsxDEV)(X.a,{value:m.plan,options:N,placeholder:"\u8bf7\u9009\u62e9",renderOptionList:_,width:204,clearable:!0,onChange:e=>{var t;e?(t=e.key,Object(a.Nc)({plan_id:t}).then((e=>{Object(a.Tb)(e,((e,t)=>{const i=e.map((e=>({key:e.id,text:e.batch_name,...e})));g(i)}),(e=>{c.a.error(e)}))})),d({...m,plan:e})):(d({...m,key_batch_id:null,plan:null}),g([]))}},void 0,!1,{fileName:Rs,lineNumber:163,columnNumber:11},void 0)},void 0,!1,{fileName:Rs,lineNumber:162,columnNumber:9},void 0),Object(h.jsxDEV)(s.a,{labelname:"key\u6279\u6b21\uff1a",required:"",labelwidth:"80px",children:Object(h.jsxDEV)(X.a,{value:m.key_batch_id,options:v,placeholder:"\u8bf7\u9009\u62e9",renderOptionList:function(e,t){return Object(h.jsxDEV)($.a,{height:256,itemCount:e.length,itemSize:32,width:200,children:({index:i,style:a})=>Object(h.jsxDEV)("div",{style:a,children:t(e[i],i)},void 0,!1,{fileName:Rs,lineNumber:94,columnNumber:32},this)},void 0,!1,{fileName:Rs,lineNumber:93,columnNumber:7},this)},width:204,clearable:!0,onChange:e=>{d({...m,key_batch_id:e})}},void 0,!1,{fileName:Rs,lineNumber:182,columnNumber:11},void 0)},void 0,!1,{fileName:Rs,lineNumber:181,columnNumber:9},void 0),Object(h.jsxDEV)(s.a,{labelname:"KEY\uff1a",required:"",labelwidth:"50px",children:Object(h.jsxDEV)(n.a,{value:m.key,countShow:!1,labelWidth:"0px",placeholder:"\u8bf7\u8f93\u5165",width:204,onChange:e=>d({...m,key:e}),onClearItem:()=>d({...m,key:""})},void 0,!1,{fileName:Rs,lineNumber:195,columnNumber:11},void 0)},void 0,!1,{fileName:Rs,lineNumber:194,columnNumber:9},void 0),Object(h.jsxDEV)("div",{className:"button_box",children:[Object(h.jsxDEV)(u.a,{type:"primary",onClick:()=>{x(m).plan_id||x(m).reseller_id||x(m).key?e(x(m)):c.a.warn("\u8bf7\u8f93\u5165\u3010\u8ba1\u5212\u540d\u79f0\u3011\u6216\u3010key\u3011\u8fdb\u884c\u67e5\u8be2")},children:"\u67e5\u8be2"},void 0,!1,{fileName:Rs,lineNumber:207,columnNumber:11},void 0),Object(h.jsxDEV)(u.a,{onClick:()=>{d({date:[],reseller:"",plan:"",state:{key:0,text:"\u5168\u90e8"},key:"",key_batch_id:""}),i()},children:"\u91cd\u7f6e"},void 0,!1,{fileName:Rs,lineNumber:223,columnNumber:11},void 0)]},void 0,!0,{fileName:Rs,lineNumber:206,columnNumber:9},void 0)]},void 0,!0,{fileName:Rs,lineNumber:130,columnNumber:7},void 0)},void 0,!1,{fileName:Rs,lineNumber:129,columnNumber:5},void 0)})),$s=(i(258),"/Users/zhangds/web/blue-brother/frontend/src/pages/plan/keyList/index.jsx");const Gs=[{title:"key\u7801",name:"key_code",prop:"key_code",type:"normal",width:"auto"},{title:"\u5f52\u5c5e\u8425\u9500\u8ba1\u5212",width:"auto",type:"normal",prop:"title",name:"title"},{title:"\u5f52\u5c5eKEY\u6279\u6b21",prop:"batch_name",name:"batch_name",width:"auto",type:"normal"},{title:"\u72b6\u6001",prop:"status",name:"status",width:"auto",type:"slot"},{title:"\u64cd\u4f5c",name:"opearo",prop:"opearo",type:"slot",width:"auto"},{title:"\u603b\u53d1\u653e\u6761\u6570",prop:"total",name:"total",width:"auto",type:"normal"},{title:"\u5269\u4f59\u6761\u6570",prop:"residue",name:"residue",width:"auto",type:"normal"},{title:"\u5df2\u4f7f\u7528\u6761\u6570",name:"usage",prop:"usage",type:"normal",width:"auto"},{title:"\u5df2\u8fc7\u671f\u6761\u6570",name:"overdue",prop:"overdue",type:"normal",width:"auto"},{title:"\u5df2\u4f5c\u5e9f\u6761\u6570",name:"invalid",prop:"invalid",type:"normal",width:"auto"},{title:"\u5df2\u5b8c\u7ed3\u6761\u6570",name:"end",prop:"end",type:"normal",width:"auto"},{title:"\u66f4\u65b0\u65f6\u95f4",name:"update_time",prop:"update_time",type:"normal",width:"220px"}];var Qs=()=>{const e=Object(r.useRef)(null),t=Object(r.useRef)(null),[i,s]=Object(W.a)({tabList:[{title:"KEY\u5217\u8868"}],query:{begin_time:"",end_time:"",reseller_id:"",plan_id:"",status:"",key:"",key_batch_id:""},hash:"",loading:!1,page:1,limit:10,isQuery:!1,selectTable:[],multipleDisabledBtn:!0,exportKeyBtn:!1,lodgingTable:!1,tableHeight:500,tableData:[],grantTotal:0,surplusTotal:0,usageTotal:0,outdateTotal:0,invalidTotal:0,dialogTitle:"",bachVisible:!1,bachUrl:"",bachApiType:0}),l=()=>{let e={begin_time:i.query.begin_time||null,end_time:i.query.end_time||null,reseller_id:i.query.reseller_id||null,plan_id:i.query.plan_id||null,status:i.query.status||null,key:i.query.key||null,key_batch_id:i.query.key_batch_id||null,hash:""!==i.hash?i.hash:null,page:i.page,limit:i.limit};return e=Object(Lt.a)({...e},(e=>Object(Ht.a)(e)||Object(qt.a)(e))),e};Object(pt.a)((()=>{(()=>{const e=l();s({loading:!0}),Object(a.ib)(e).then((e=>{Object(a.Tb)(e,((e,t)=>{s({loading:!1}),e.total>0?s({lodgingTable:!1}):s({lodgingTable:!0}),s({dataCount:e.total,tableData:e.data})}),(e=>{c.a.error(e),s({loading:!1})}))}))})()}),[i.isQuery]);const n=()=>{t.current.allChecked(!1),s({selectTable:[]})},o=e=>{let t={keys:e};try{Object(a.Vb)(t).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.success("\u6279\u91cf\u4f5c\u5e9f\u6210\u529f"),n(),s({multipleDisabledBtn:!0,isQuery:!i.isQuery})}))}))}catch(l){}},m=e=>{let t={key:e.key};Object(a.Yb)(t).then((e=>{Object(a.Tb)(e,((e,t)=>{s({page:1,limit:10,isQuery:!i.isQuery}),c.a.success("\u4f5c\u5e9f\u6210\u529f")}),(e=>{c.a.error(e)}))}))},d=t=>{Object(a.k)({hash:t}).then((l=>{Object(a.Tb)(l,((a,l)=>{c.a.success("\u6279\u91cf\u4e0a\u4f20\u6807\u8bb0\u4e3a\u4f5c\u5e9f"),e.current.clearData(),s({page:1,limit:10,hash:t,isQuery:!i.isQuery})}),(e=>{c.a.error(e)}))}))};return Object(h.jsxDEV)("div",{className:"key-container",id:"dislist",children:[Object(h.jsxDEV)(Ft,{tabs:i.tabList,style:{paddingBottom:0},children:[Object(h.jsxDEV)("div",{className:"distable dflexj",style:{paddingBottom:0},children:Object(h.jsxDEV)(Ys,{ref:e,query:e=>(e=>{let t=Object(Lt.a)({...e},(e=>Object(Ht.a)(e)||Object(qt.a)(e)));s({query:t})})(e),onQuery:e=>{s({page:1,limit:10,hash:"",isQuery:!i.isQuery})},resetChange:()=>{s({page:1,limit:10,hash:"",tableData:[],lodgingTable:!1,dataCount:0})}},void 0,!1,{fileName:$s,lineNumber:637,columnNumber:11},void 0)},void 0,!1,{fileName:$s,lineNumber:636,columnNumber:9},void 0),Object(h.jsxDEV)("div",{className:"distable dflexj",style:{paddingTop:0},children:Object(h.jsxDEV)("div",{children:[Object(h.jsxDEV)(u.a,{onClick:()=>{s({bachUrl:"/key/import?type=1",dialogTitle:"\u6279\u91cf\u4e0a\u4f20\u67e5\u8be2",bachVisible:!0,bachApiType:1})},children:"\u6279\u91cf\u4e0a\u4f20\u67e5\u8be2"},void 0,!1,{fileName:$s,lineNumber:647,columnNumber:13},void 0),Object(h.jsxDEV)(u.a,{style:{border:"1px solid red",color:"red"},onClick:()=>{s({bachUrl:"/key/import?type=2",dialogTitle:"\u6279\u91cf\u4e0a\u4f20\u4f5c\u5e9f",bachVisible:!0,bachApiType:2})},children:"\u6279\u91cf\u4e0a\u4f20\u4f5c\u5e9f"},void 0,!1,{fileName:$s,lineNumber:648,columnNumber:13},void 0),Object(h.jsxDEV)(u.a,{style:{border:"1px solid red",color:"red"},onClick:()=>{s({bachUrl:"/key/import?type=3",dialogTitle:"\u6279\u91cf\u4e0a\u4f20\u4f7f\u7528",bachVisible:!0,bachApiType:3})},children:"\u6279\u91cf\u4e0a\u4f20\u6807\u8bb0\u6210\u5df2\u4f7f\u7528"},void 0,!1,{fileName:$s,lineNumber:654,columnNumber:13},void 0),Object(h.jsxDEV)(u.a,{onClick:()=>(()=>{let e=Object(f.a)(i.selectTable,(e=>e.key)),t={keys:e};try{Ut(t,2).then((t=>{2===t?o(e):1===t&&G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:"\u786e\u5b9a\u6279\u91cf\u4f5c\u5e9f\uff1f"},void 0,!1,{fileName:$s,lineNumber:302,columnNumber:22},void 0),onConfirm(){o(e)},onCancel(){},className:"questModal",parentComponent:void 0})}))}catch(a){}})(),disabled:i.multipleDisabledBtn,children:"\u6279\u91cf\u4f5c\u5e9f"},void 0,!1,{fileName:$s,lineNumber:661,columnNumber:13},void 0),Object(h.jsxDEV)(u.a,{onClick:()=>(()=>{let e={keys:Object(f.a)(i.selectTable,(e=>e.key))};Object(a.Xb)(e).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.success("\u6279\u91cf\u6807\u8bb0\u4e3a\u4f7f\u7528\u6210\u529f"),n(),s({multipleDisabledBtn:!0,isQuery:!i.isQuery})}),(e=>{c.a.error(e)}))}))})(),disabled:i.multipleDisabledBtn,children:"\u6279\u91cf\u6807\u8bb0\u4e3a\u5df2\u4f7f\u7528"},void 0,!1,{fileName:$s,lineNumber:664,columnNumber:13},void 0),Object(h.jsxDEV)(u.a,{onClick:()=>(()=>{let e=!1,t=l();delete t.page,delete t.limit,""!==i.hash&&(t.hash=i.hash);for(let i in t)!0!==t.hasOwnProperty("key")&&!0!==t.hasOwnProperty("plan_id")&&!0!==t.hasOwnProperty("reseller_id")&&!0!==t.hasOwnProperty("hash")||(e=!0);if(i.selectTable.length>0){let a=[];a=i.selectTable.map((e=>e.key)),t={keys:a.join(",")},e=!0}e&&Object(a.J)(t).then((e=>{if("application/json"==e.type){const t=new FileReader;t.readAsText(e,"utf-8"),t.onload=function(){const e=JSON.parse(t.result);c.a.clear(),c.a.error(e.message)}}else{let i=new Blob([e]),a="\u8425\u9500\u8ba1\u5212"+ae()+".xlsx";var t=document.createElement("a");t.href=window.URL.createObjectURL(i),t.download=a,t.click(),window.URL.revokeObjectURL(t.href)}}))})(),disabled:i.exportKeyBtn,children:"\u5bfc\u51fa"},void 0,!1,{fileName:$s,lineNumber:667,columnNumber:13},void 0)]},void 0,!0,{fileName:$s,lineNumber:645,columnNumber:11},void 0)},void 0,!1,{fileName:$s,lineNumber:644,columnNumber:9},void 0),Object(h.jsxDEV)("div",{children:[i.selectTable.length>0?Object(h.jsxDEV)(ki.a,{type:"info",extraContent:Object(h.jsxDEV)(u.a,{type:"primary",onClick:()=>n(),children:"\u6e05\u7a7a"},void 0,!1,{fileName:$s,lineNumber:677,columnNumber:17},void 0),children:["\u5df2\u9009\u62e9",Object(h.jsxDEV)("font",{color:"#296bef",style:{fontWeight:"bold"},children:i.selectTable.length},void 0,!1,{fileName:$s,lineNumber:683,columnNumber:15},void 0),"\u53d1\u653ekey\u603b\u6570:",i.grantTotal,",\u5269\u4f59key\u603b\u6570:",i.surplusTotal,",\u5df2\u4f7f\u7528\u603b\u6570:",i.usageTotal,",\u5df2\u8fc7\u671f\u603b\u6570:",i.outdateTotal,",\u5df2\u4f5c\u5e9f\u603b\u6570:",i.invalidTotal]},void 0,!0,{fileName:$s,lineNumber:674,columnNumber:13},void 0):null,Object(h.jsxDEV)(vt.a,{loading:i.loading,icon:"circle",children:Object(h.jsxDEV)(I,{spliteColor:"#fff",tableData:i.tableData,Column:Gs,countbarVisible:!1,maxheight:i.tableHeight,isSwitch:!1,page:i.page,ref:t,dataCount:i.dataCount,pageChange:e=>(e=>{s({page:e,isQuery:!i.isQuery})})(e),emptyText:i.lodgingTable?"\u62b1\u6b49\uff0c\u6682\u65e0\u76f8\u5173\u6570\u636e\u8bb0\u5f55":"\u67e5\u8be2 \u8bf7\u8f93\u5165\u3010\u5206\u9500\u5546\u3011\u6216\u3010\u8ba1\u5212\u540d\u79f0\u3011\u6216\u3010key\u3011\u8fdb\u884c\u67e5\u8be2",countChange:e=>(e=>{s({limit:e,isQuery:!i.isQuery})})(e),checkChange:e=>(e=>{e.length>0?s({multipleDisabledBtn:!1}):s({multipleDisabledBtn:!0}),s({selectTable:e});let t=0,i=0,a=0,l=0,n=0;e.forEach((e=>{t+=Number(e.total),i+=Number(e.residue),a+=Number(e.usage),n+=Number(e.overdue),l+=Number(e.invalid)})),s({grantTotal:t,usageTotal:a,invalidTotal:l,outdateTotal:n,surplusTotal:i})})(e),ComponentHandler:(e,t)=>"dates"==e?Object(h.jsxDEV)("span",{children:[t.begin_time," \u81f3 ",t.end_time]},void 0,!0,{fileName:$s,lineNumber:714,columnNumber:21},void 0):"status"==e?Object(h.jsxDEV)("p",{className:"dflexa",children:Object(h.jsxDEV)("span",{children:[Object(h.jsxDEV)("font",{className:"icon",style:{background:At.keyStatusBg(parseInt(t.status))}},void 0,!1,{fileName:$s,lineNumber:723,columnNumber:25},void 0),t.status_text]},void 0,!0,{fileName:$s,lineNumber:722,columnNumber:23},void 0)},void 0,!1,{fileName:$s,lineNumber:721,columnNumber:21},void 0):"opearo"==e?Object(h.jsxDEV)("span",{children:[Object(h.jsxDEV)("a",{className:"grid-link",style:{paddingLeft:"2px",color:"#d8dbdd"},children:"\u8be6\u60c5"},void 0,!1,{fileName:$s,lineNumber:737,columnNumber:23},void 0),Object(h.jsxDEV)(y.a,{position:y.d.RightTop,children:[Object(h.jsxDEV)(y.b,{children:Object(h.jsxDEV)("div",{className:"linkmore",children:["\u66f4\u591a ",Object(h.jsxDEV)(g.a,{type:"down"},void 0,!1,{fileName:$s,lineNumber:743,columnNumber:32},void 0)]},void 0,!0,{fileName:$s,lineNumber:742,columnNumber:27},void 0)},void 0,!1,{fileName:$s,lineNumber:741,columnNumber:25},void 0),Object(h.jsxDEV)(y.c,{children:Object(h.jsxDEV)(O.a,{onClick:(e,l)=>((e,t,l)=>{if(1===Number(t)){let e={key:l.key};Object(a.ac)(e).then((e=>{Object(a.Tb)(e,((e,t)=>{s({page:1,limit:10,isQuery:!i.isQuery}),c.a.success("\u6807\u8bb0\u4e3a\u4f7f\u7528\u6210\u529f")}),(e=>{c.a.error(e)}))}))}if(2===Number(t)){let e={type:4,object_value:l.key};try{Ut(e).then((e=>{2===e?m(l):1===e&&G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:["\u786e\u5b9a\u4f5c\u5e9f",l.title,"\uff1f"]},void 0,!0,{fileName:$s,lineNumber:496,columnNumber:24},void 0),onConfirm(){m(l)},onCancel(){},className:"questModal",parentComponent:void 0})}))}catch(n){}}3===Number(t)&&(sessionStorage.setItem("keyCode",l.key),window.open("#/home/key-log"))})(0,l,t),children:[Object(h.jsxDEV)(D.a,{disabled:1!==t.status,children:"\u6807\u8bb0\u6210\u5df2\u4f7f\u7528"},"1",!1,{fileName:$s,lineNumber:748,columnNumber:29},void 0),Object(h.jsxDEV)(D.a,{disabled:4===t.status||3===t.status,children:"\u4f5c\u5e9f"},"2",!1,{fileName:$s,lineNumber:751,columnNumber:29},void 0),Object(h.jsxDEV)(D.a,{children:"\u65e5\u5fd7"},"3",!1,{fileName:$s,lineNumber:757,columnNumber:29},void 0)]},void 0,!0,{fileName:$s,lineNumber:747,columnNumber:27},void 0)},void 0,!1,{fileName:$s,lineNumber:746,columnNumber:25},void 0)]},void 0,!0,{fileName:$s,lineNumber:740,columnNumber:23},void 0)]},void 0,!0,{fileName:$s,lineNumber:736,columnNumber:21},void 0):void 0},void 0,!1,{fileName:$s,lineNumber:693,columnNumber:13},void 0)},void 0,!1,{fileName:$s,lineNumber:692,columnNumber:11},void 0)]},void 0,!0,{fileName:$s,lineNumber:672,columnNumber:9},void 0)]},void 0,!0,{fileName:$s,lineNumber:635,columnNumber:7},void 0),Object(h.jsxDEV)(Ws,{title:i.dialogTitle,visible:i.bachVisible,url:i.bachUrl,onClose:()=>{s({bachVisible:!1})},onImport:t=>(t=>{1!==i.bachApiType?2!==i.bachApiType?3!==i.bachApiType||Object(a.j)({hash:t}).then((l=>{Object(a.Tb)(l,((a,l)=>{c.a.success("\u6279\u91cf\u4e0a\u4f20\u6807\u8bb0\u4e3a\u4f7f\u7528"),e.current.clearData(),s({page:1,limit:10,hash:t,isQuery:!i.isQuery})}),(e=>{c.a.error(e)}))})):Ut({hash:t},1).then((e=>{2===e?d(t):1===e&&G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:"\u786e\u5b9a\u8981\u6279\u91cf\u4f5c\u5e9f\uff1f"},void 0,!1,{fileName:$s,lineNumber:596,columnNumber:22},void 0),onConfirm(){d(t)},onCancel(){},className:"questModal",parentComponent:void 0})})):s({page:1,hash:t,isQuery:!i.isQuery})})(t)},void 0,!1,{fileName:$s,lineNumber:771,columnNumber:7},void 0)]},void 0,!0,{fileName:$s,lineNumber:634,columnNumber:5},void 0)},Zs=(i(259),"/Users/zhangds/web/blue-brother/frontend/src/pages/plan/list/list.js"),Xs=i(155);const el=[{title:"\u8ba1\u5212 ID",name:"id",prop:"id",type:"normal",width:"auto"},{title:"\u8ba1\u5212\u7f16\u53f7",name:"stock_id",prop:"stock_id",type:"normal",width:"auto"},{title:"\u8425\u9500\u8ba1\u5212\u540d\u79f0",name:"title",prop:"title",type:"slot",width:"auto"},{title:"\u542f\u7528",width:"auto",type:"slot",prop:"switch"},{title:"\u5206\u9500\u5546",prop:"reseller_name",name:"reseller_name",width:"auto",type:"normal"},{title:"\u72b6\u6001",name:"status",prop:"status",type:"slot",width:"auto"},{title:"\u521b\u5efa\u4eba",name:"creator_name",prop:"creator_name",type:"normal",width:"auto"},{title:"\u65f6\u95f4\u8303\u56f4",type:"slot",prop:"dates",width:"260px"},{title:"\u64cd\u4f5c",prop:"opearo",name:"opearo",type:"slot",width:"270px"},{title:"\u53d1\u653ekey\u7801\u603b\u6570",name:"grant",type:"normal",prop:"grant",width:"auto"},{title:"\u8c03\u7528key\u7801\u6570\u91cf",name:"api_send",type:"normal",prop:"api_send",width:"auto"},{title:"\u9886\u53d6key\u603b\u6570",name:"receive",type:"normal",prop:"receive",width:"auto"},{title:"\u4f7f\u7528key\u7801\u603b\u6570",name:"usage",type:"normal",prop:"usage",width:"auto"},{title:"\u5931\u6548key\u7801\u603b\u6570",name:"overdue",type:"normal",prop:"overdue",width:"auto"},{title:"\u4f5c\u5e9fkey\u7801\u603b\u6570",name:"invalid",type:"normal",prop:"invalid",width:"auto"},{title:"\u53ef\u7528key\u7801\u603b\u6570",name:"silent",type:"normal",prop:"silent",width:"auto"},{title:"\u5b8c\u7ed3key\u7801\u603b\u6570",name:"end",type:"normal",prop:"end",width:"auto"},{title:"\u66f4\u65b0\u65f6\u95f4",name:"update_time",type:"normal",prop:"update_time",width:"140px"}],tl=[{key:"id",text:"\u8ba1\u5212ID",placeholder:"\u8bf7\u8f93\u5165\u8ba1\u5212ID\u67e5\u8be2"},{key:"title",text:"\u8ba1\u5212\u540d\u79f0",placeholder:"\u8bf7\u8f93\u5165\u8ba1\u5212\u540d\u79f0\u67e5\u8be2"},{key:"reseller_name",text:"\u5206\u9500\u5546\u540d\u79f0",placeholder:"\u8bf7\u8f93\u5165\u5206\u9500\u5546\u540d\u79f0\u67e5\u8be2"}];class il extends m.a.Component{constructor(e){super(e),this.phoneChange=e=>{this.setState({phone:e.target.value})},this.emailChange=e=>{this.setState({email:e.target.value})},this.state={dataCount:0,page:1,limit:10,tabList:[{title:"\u8425\u9500\u8ba1\u5212\u5217\u8868"}],distdata:[],filterList:[{id:0,label:"\u72b6\u6001",prop:"status",menuList:[{id:999,name:"\u5168\u90e8"},{id:"0",name:"\u521b\u5efa\u4e2d"},{id:2,name:"\u5ba1\u6838\u4e2d"},{id:3,name:"\u5f85\u751f\u6548"},{id:4,name:"\u8fdb\u884c\u4e2d"},{id:5,name:"\u6682\u505c\u4e2d"},{id:6,name:"\u5df2\u5b8c\u7ed3"},{id:7,name:"\u672a\u901a\u8fc7"},{id:8,name:"\u5df2\u4f5c\u5e9f"}]}],tableHeight:500,menuList:[{id:0,name:"\u72b6\u6001",check:!1}],phone_list:[],email_list:[],phone:"",email:"",email_radio:-1,phone_radio:-1,key_word:"",searchOption:void 0,placeholder:"",audit_visible:!1,cur_item:null,selectiondata:[],plan_id:0,grantTotal:0,receiveTotal:0,usageTotal:0,silentTotal:0,receive_total:0,usage_total:0,silent_total:0,isSend:!0,isCancel:!1,mer_no:""}}clickFn(){let e=window.location.href.replace(window.location.hash,"#/home/plan-create");sessionStorage.setItem("KeyPcType","3"),window.open(e,"_blank")}onPageChange(e){this.setState({page:e}),setTimeout((()=>{this.getpageFn()}),0)}send(e){let t=new RegExp("^[1][3,4,5,6,7,8,9][0-9]{9}$"),i=this.state.plan_id,s={phone:this.state.phone_radio>-1?this.state.phone_list[this.state.phone_radio]:this.state.phone,email:this.state.email_radio>-1?this.state.email_list[this.state.email_radio]:this.state.email};t.test(s.phone)?Object(a.dc)(i,s).then((e=>{Object(a.Tb)(e,((e,t)=>{this.setState({audit_visible:!1}),c.a.success("\u53d1\u9001\u6210\u529f")}),(e=>{c.a.error(e)}))})):c.a.error("\u624b\u673a\u53f7\u683c\u5f0f\u4e0d\u6b63\u786e")}componentDidMount(e){this.getPlanList({page:1,limit:10})}componentWillMount(){this.setState({tableHeight:window.innerHeight-430})}getPlanList(e){Object(a.sb)(Object(Ka.a)(e)).then((e=>{Object(a.Tb)(e,((e,t)=>{this.setState({distdata:e.data,dataCount:e.total})}),(e=>{}))}))}onCountChange(e){this.setState({page:1,limit:e}),setTimeout((()=>{this.getpageFn()}),200)}getpageFn(){let e={page:this.state.page,limit:this.state.limit,status:this.state.status};this.state.searchOption&&(e[this.state.searchOption.key]=this.state.key_word),this.getPlanList(e)}onSwitchChange(e,t){G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:["\u662f\u5426\u6539\u53d8",1==t.open?"\u5173\u95ed":"\u5f00\u542f",Object(h.jsxDEV)("b",{children:["[",t.title,"]"]},void 0,!0,{fileName:Zs,lineNumber:347,columnNumber:11},this),"\u7684\u72b6\u6001\uff1f"]},void 0,!0,{fileName:Zs,lineNumber:345,columnNumber:9},this),onConfirm:()=>{this.changeState(e,t)},onCancel:this.onCancel,className:"questModal",parentComponent:this})}cancel(e){this.setState({audit_visible:!1})}changeState(e,t){let i=this,s={operation:e?1:2};if(3==t.status)return c.a.warn("\u5f85\u751f\u6548\u72b6\u6001\u8ba1\u5212\u65e0\u6cd5\u542f\u7528\uff01");Object(a.ad)(t.id,s).then((s=>{Object(a.Tb)(s,((a,s)=>{let l=Object(oi.a)(this.state.distdata,(e=>e.id==t.id));this.state.distdata[l].open=e?2:1,this.setState({distdata:this.state.distdata});let n={page:this.state.page,limit:this.state.limit,status:this.state.status};this.state.searchOption&&(n[this.state.searchOption.key]=this.state.key_word),i.getPlanList(n),c.a.success("\u66f4\u6539\u72b6\u6001\u6210\u529f")}),(e=>{c.a.error(e)}))}))}linkTo(e){sessionStorage.setItem("showflag",!0);let t=[{pagetitle:"\u7f16\u8f91",items:[{path:"/home/key-list",name:"\u8425\u9500\u8ba1\u5212\u7ba1\u7406"},{path:"/home/key-list",name:e.title+"key\u5217\u8868"}]}];sessionStorage.setItem("plan_item",JSON.stringify(e)),sessionStorage.setItem("knockGold_effectDate",JSON.stringify(e)),sessionStorage.setItem("redPackets_effectDate",JSON.stringify(e)),sessionStorage.setItem("breaknav",JSON.stringify(t)),sessionStorage.setItem("linkshowname","\u8425\u9500\u8ba1\u5212\u7ba1\u7406"),sessionStorage.setItem("key_plan_id",e.id),sessionStorage.setItem("key_plan_status",e.status),e.settlement_type>0?(sessionStorage.setItem("isSettlement",1),sessionStorage.setItem("plan_list_settlement",JSON.stringify({key:e.settlement_type}))):(sessionStorage.removeItem("isSettlement"),sessionStorage.removeItem("plan_list_settlement")),window.open("#/home/key-list")}async menuItemClick(e,t){if(this.setState({plan_id:t.id}),6==t.status)return c.a.clear(),void c.a.error("\u8be5\u72b6\u6001\u4e0b\u7684\u6570\u636e\u4e0d\u5141\u8bb8\u7f16\u8f91");if(1==e&&Object(a.vb)(t.reseller_id).then((e=>{Object(a.Tb)(e,((e,t)=>{this.setState({audit_visible:!0,phone_list:e.contact_phone,email_list:e.contact_email})}),(e=>{c.a.error(e)}))})),3==e){let e=this;G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:["\u662f\u5426\u786e\u5b9a\u4f5c\u5e9f[",t.title,"]\uff1f"]},void 0,!0,{fileName:Zs,lineNumber:517,columnNumber:18},this),onConfirm:()=>{e.setState({isCancel:!0}),Object(a.cc)(t.id).then((t=>{e.setState({isCancel:!1}),Object(a.Tb)(t,((t,i)=>{c.a.success("\u4f5c\u5e9f\u6210\u529f"),e.setState({page:1,limit:10});e.getPlanList({page:1,limit:10})}),(e=>{c.a.error(e)}))}))},onCancel:this.onCancel,className:"questModal",parentComponent:this})}if(4==e){let e=this;G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:["\u662f\u5426\u786e\u5b9a\u5220\u9664[",t.title,"]\uff1f"]},void 0,!0,{fileName:Zs,lineNumber:551,columnNumber:18},this),onConfirm:()=>{Object(a.A)(t.id).then((t=>{Object(a.Tb)(t,((t,i)=>{c.a.success(i),e.setState({limit:10,page:1});let a={page:1,limit:10,status:this.state.status};this.state.searchOption&&(a[this.state.searchOption.key]=this.state.key_word),e.getPlanList(a)}),(e=>{c.a.error(e)}))}))},onCancel:this.onCancel,className:"questModal",parentComponent:this})}if(6==e&&this.callBack(t),7==e){let e=await Object(a.Kb)({plan_id:t.id});if(200===e.code){let i=this;i.setState({mer_no:e.data.mer_no}),G.a.confirm({type:"info",closeBtn:!0,title:"\u90ae\u50a8\u5546\u6237\u7f16\u53f7",content:Object(h.jsxDEV)(Di.a,{placeholder:"\u8bf7\u8f93\u90ae\u50a8\u5546\u6237\u7f16\u53f7",maxLength:200,onChange:e=>i.setState({mer_no:e.target.value}),defaultValue:i.state.mer_no},void 0,!1,{fileName:Zs,lineNumber:594,columnNumber:13},this),onConfirm:e=>{if(""===i.state.mer_no)return c.a.error("\u8bf7\u8f93\u5165\u90ae\u50a8\u5546\u6237\u7f16\u53f7"),!1;Object(a.l)({plan_id:t.id,mer_no:i.state.mer_no}).then((t=>{if(200!==t.code)return c.a.error(t.message),!1;{c.a.success("\u7ed1\u5b9a\u6210\u529f"),i.setState({page:1,limit:10});let t={page:1,limit:10};i.getPlanList(t),e()}}))},onCancel:this.onCancel,className:"questModal",parentComponent:this})}}}clearFn(){this.refs.plan_list.allChecked(!1),this.setState({selectiondata:[]})}callBack(e){sessionStorage.setItem("callBackId",JSON.stringify(e.id)),sessionStorage.setItem("callBackType",JSON.stringify(2)),sessionStorage.setItem("pathname2","callback-message");let t=[{pagetitle:"\u56de\u8c03\u5730\u5740",items:[{path:"distributor-list",name:"\u8425\u9500\u8ba1\u5212\u4e00"+e.title},{path:"callback-message",name:"\u8bbe\u7f6e\u56de\u8c03\u901a\u77e5\u5730\u5740"}]}];sessionStorage.setItem("breaknav",JSON.stringify(t)),sessionStorage.setItem("linkshowname","\u8425\u9500\u8ba1\u5212"),this.props.history.push("/home/callback-message")}selection(e){this.setState({selectiondata:e});let t=0,i=0,a=0,s=0,l=0,n=0,o=0;e.forEach((e=>{t+=Number(e.grant),i+=Number(e.receive),a+=Number(e.usage),s+=Number(e.silent),l+=Number(e.receive_total),n+=Number(e.usage_total),o+=Number(e.silent_total)})),this.setState({grantTotal:t,receiveTotal:i,usageTotal:a,silentTotal:s,receive_total:l,usage_total:n,silent_total:o})}onFilter(e,t){this.setState({limit:10,page:1});let i={page:1,limit:10};if(this.state.searchOption&&(i[this.state.searchOption.key]=this.state.key_word),i[t]=e,999==e)delete i[t];else{let i={};i[t]=e,this.setState(i)}this.getPlanList(i)}componentDidUpdate(e,t){t.key_word==this.state.key_word||this.state.key_word||this.iptSureFn(),t.searchOption==this.state.searchOption||this.state.searchOption||(this.iptSureFn(),this.setState({key_word:""}))}iptSureFn(e){this.setState({page:1,limit:10});let t={page:1,limit:10,status:this.state.status};this.state.searchOption&&(t[this.state.searchOption.key]=this.state.key_word),this.getPlanList(t)}onPhoneChange(e){this.setState({phone_radio:e.target.value})}onEmailChange(e){this.setState({email_radio:e.target.value})}onEdit(e,t){sessionStorage.setItem("showflag",!0);let i=[{pagetitle:"\u7f16\u8f91",items:[{path:"/home/key-list",name:"\u8425\u9500\u8ba1\u5212\u7ba1\u7406"},{path:"/home/key-list",name:"\u7f16\u8f91:"+t.title}]}];if(sessionStorage.setItem("breakchangenav",JSON.stringify(i)),6==t.status)return c.a.clear(),void c.a.error("\u4e0d\u53ef\u7f16\u8f91");let a={settlement_type:t.settlement_type,settlement_type_text:t.settlement_type_text};sessionStorage.setItem("bm_obj",JSON.stringify(a)),sessionStorage.setItem("plan_id",t.id),sessionStorage.setItem("plan_status",t.status),sessionStorage.setItem("approval_id",t.approval_id);let s=window.location.href.replace(window.location.hash,"#/home/plan-edit");sessionStorage.setItem("KeyPcType","1"),window.open(s,"_blank")}onCopy(e,t){sessionStorage.setItem("showflag",!0);let i=[{pagetitle:"\u590d\u5236",items:[{path:"/home/key-list",name:"\u8425\u9500\u8ba1\u5212\u7ba1\u7406"},{path:"/home/key-list",name:"\u590d\u5236:"+t.title}]}],a={settlement_type:t.settlement_type,settlement_type_text:t.settlement_type_text};sessionStorage.setItem("bm_obj",JSON.stringify(a)),sessionStorage.setItem("breakchangenav",JSON.stringify(i)),sessionStorage.setItem("plan_id_copy",t.id),sessionStorage.setItem("plan_status",t.status),sessionStorage.setItem("approval_id",t.approval_id),sessionStorage.setItem("copy_count_golod",t.copy_count);let s=window.location.href.replace(window.location.hash,"#/home/plan-edit-copy");sessionStorage.setItem("KeyPcType","2"),window.open(s,"_blank")}onFilterClose(e){let t={};t[e]=null,this.setState(t),this.setState({page:1,limit:10});let i={page:1,limit:10};this.state.searchOption&&(i[this.state.searchOption.key]=this.state.key_word),this.getPlanList(i)}currPreview(e){return[0,1,2,6,7,8].includes(e.status)?Object(h.jsxDEV)("span",{style:{color:"#ccc"},children:"\u9884\u89c8"},void 0,!1,{fileName:Zs,lineNumber:828,columnNumber:14},this):Object(h.jsxDEV)(Ei.a,{trigger:"hover",content:Object(h.jsxDEV)(Xs,{value:e.href},void 0,!1,{fileName:Zs,lineNumber:831,columnNumber:39},this),children:[" ",Object(h.jsxDEV)("span",{style:{color:"#2B66F2"},onClick:t=>this.currPreviewBtn(e.href),children:"\u9884\u89c8"},void 0,!1,{fileName:Zs,lineNumber:833,columnNumber:11},this)," "]},void 0,!0,{fileName:Zs,lineNumber:831,columnNumber:9},this)}currPreviewBtn(e){window.open(e,"_blank")}opearoEl(e,t){switch(e){case 1:return[0,2,3,4,5,7].includes(t.status)?Object(h.jsxDEV)("span",{className:"grid-link",onClick:e=>{this.onEdit(e,t)},children:"\u7f16\u8f91"},void 0,!1,{fileName:Zs,lineNumber:858,columnNumber:13},this):Object(h.jsxDEV)("span",{className:"grid-link disabled",children:"\u7f16\u8f91"},void 0,!1,{fileName:Zs,lineNumber:868,columnNumber:18},this);case 2:return[3,4,5,6,8].includes(t.status)?Object(h.jsxDEV)("span",{className:"grid-link",onClick:e=>{this.onCopy(e,t)},children:"\u590d\u5236"},void 0,!1,{fileName:Zs,lineNumber:873,columnNumber:13},this):Object(h.jsxDEV)("span",{className:"grid-link disabled",children:"\u590d\u5236"},void 0,!1,{fileName:Zs,lineNumber:883,columnNumber:18},this);case 3:return[3,4,5].includes(t.status)&&1!==t.old_status?Object(h.jsxDEV)(y.a,{position:y.d.RightTop,visible:this.state.menuVisible,onVisibleChange:e=>this.setState({visible:e}),children:[Object(h.jsxDEV)(y.b,{children:Object(h.jsxDEV)("div",{className:"linkmore grid-link",children:["\u66f4\u591a ",Object(h.jsxDEV)(g.a,{type:"down"},void 0,!1,{fileName:Zs,lineNumber:895,columnNumber:22},this)]},void 0,!0,{fileName:Zs,lineNumber:894,columnNumber:17},this)},void 0,!1,{fileName:Zs,lineNumber:893,columnNumber:15},this),Object(h.jsxDEV)(y.c,{children:Object(h.jsxDEV)(O.a,{onClick:(e,i)=>this.menuItemClick(i,t),children:[Object(h.jsxDEV)(D.a,{children:"\u53d1\u9001\u5bc6\u7801\u53ca\u538b\u7f29\u5305"},"1",!1,{fileName:Zs,lineNumber:900,columnNumber:19},this),Object(h.jsxDEV)(D.a,{children:"\u8bbe\u7f6e\u56de\u8c03"},"6",!1,{fileName:Zs,lineNumber:901,columnNumber:19},this),Object(h.jsxDEV)(D.a,{disabled:!0,children:"\u65e5\u5fd7"},"2",!1,{fileName:Zs,lineNumber:902,columnNumber:19},this),Object(h.jsxDEV)(D.a,{children:"\u4f5c\u5e9f"},"3",!1,{fileName:Zs,lineNumber:905,columnNumber:19},this),Object(h.jsxDEV)(D.a,{children:"\u7ed1\u5b9a\u90ae\u50a8\u5546\u6237\u7f16\u53f7"},"7",!1,{fileName:Zs,lineNumber:906,columnNumber:19},this)]},void 0,!0,{fileName:Zs,lineNumber:899,columnNumber:17},this)},void 0,!1,{fileName:Zs,lineNumber:898,columnNumber:15},this)]},void 0,!0,{fileName:Zs,lineNumber:888,columnNumber:13},this):Object(h.jsxDEV)("span",{className:"grid-link disabled",children:"\u66f4\u591a"},void 0,!1,{fileName:Zs,lineNumber:912,columnNumber:18},this);case 4:return 0===t.order_num?Object(h.jsxDEV)("span",{className:"grid-link",style:{color:"red",paddingRight:0},onClick:()=>this.menuItemClick(4,t),children:"\u5220\u9664"},void 0,!1,{fileName:Zs,lineNumber:917,columnNumber:13},this):Object(h.jsxDEV)("span",{className:"grid-link disabled",style:{paddingRight:0},children:"\u5220\u9664"},void 0,!1,{fileName:Zs,lineNumber:930,columnNumber:13},this);default:return""}}dingTask(e){Object(a.G)(e).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.success(t),this.getpageFn()}),(e=>{c.a.error(e)}))}))}render(){return Object(h.jsxDEV)("div",{id:"dislist",children:Object(h.jsxDEV)(Ft,{tabs:this.state.tabList,children:[Object(h.jsxDEV)("div",{className:"distable dflexj",children:[Object(h.jsxDEV)(u.a,{type:"primary",icon:"plus",onClick:this.clickFn.bind(this),children:"\u65b0\u5efa\u8425\u9500\u8ba1\u5212"},void 0,!1,{fileName:Zs,lineNumber:966,columnNumber:13},this),Object(h.jsxDEV)("div",{className:"dfleac query-plan",children:[Object(h.jsxDEV)(X.a,{width:"180px",value:this.state.searchOption,onChange:e=>this.setState({searchOption:e,key_word:"",placeholder:e&&e.placeholder}),disableSearch:!0,options:tl,clearable:!0,placeholder:"\u8bf7\u9009\u62e9\u67e5\u8be2\u5206\u7c7b"},void 0,!1,{fileName:Zs,lineNumber:970,columnNumber:15},this),this.state.searchOption?Object(h.jsxDEV)(n.a,{labelWidth:0,onClearItem:e=>{this.setState({key_word:""})},wordSearch:this.iptSureFn.bind(this),onChange:e=>this.setState({key_word:e}),value:this.state.key_word,icon:"search",placeholder:this.state.placeholder,countShow:!1,height:"36px",width:"260px",alignment:"left"},void 0,!1,{fileName:Zs,lineNumber:986,columnNumber:17},this):null]},void 0,!0,{fileName:Zs,lineNumber:969,columnNumber:13},this)]},void 0,!0,{fileName:Zs,lineNumber:965,columnNumber:11},this),Object(h.jsxDEV)(hi,{filterList:this.state.filterList,menuList:this.state.menuList,selectFn:(e,t)=>{this.onFilter(e,t)},onClose:e=>{this.onFilterClose(e)}},void 0,!1,{fileName:Zs,lineNumber:1004,columnNumber:11},this),Object(h.jsxDEV)("div",{children:[this.state.selectiondata.length>0?Object(h.jsxDEV)(ki.a,{type:"info",extraContent:Object(h.jsxDEV)(u.a,{type:"primary",onClick:this.clearFn.bind(this),children:"\u6e05\u7a7a"},void 0,!1,{fileName:Zs,lineNumber:1019,columnNumber:19},this),children:["\u5df2\u9009\u62e9",Object(h.jsxDEV)("font",{color:"#296bef",style:{fontWeight:"bold"},children:this.state.selectiondata.length},void 0,!1,{fileName:Zs,lineNumber:1025,columnNumber:17},this),"\u53d1\u653ekey\u603b\u6570:",this.state.grantTotal,",\u9886\u53d6key\u603b\u6570:",this.state.receiveTotal,",\u5df2\u4f7f\u7528\u603b\u6570:",this.state.usageTotal,",\u6c89\u9ed8\u603b\u6570:",this.state.silentTotal,",\u9886\u53d6\u603b\u4ef7(\u9884\u4f30):",this.state.receive_total.toFixed(4),", \u5df2\u4f7f\u7528\u603b\u4ef7(\u9884\u4f30):",this.state.usage_total.toFixed(4),", \u6c89\u9ed8\u603b\u4ef7(\u9884\u4f30):",this.state.silent_total.toFixed(4)]},void 0,!0,{fileName:Zs,lineNumber:1016,columnNumber:15},this):null,Object(h.jsxDEV)(I,{spliteColor:"#fff",tableData:this.state.distdata,Column:el,countbarVisible:!1,maxheight:this.state.tableHeight,isSwitch:!1,page:this.state.page,ref:"plan_list",dataCount:this.state.dataCount,pageChange:e=>{this.onPageChange(e)},countChange:e=>{this.onCountChange(e)},checkChange:this.selection.bind(this),ComponentHandler:(e,t)=>"dates"==e?Object(h.jsxDEV)("span",{children:[t.begin_time," \u81f3 ",t.end_time]},void 0,!0,{fileName:Zs,lineNumber:1056,columnNumber:21},this):"title"==e?Object(h.jsxDEV)("span",{className:"grid-link",onClick:e=>{this.linkTo(t)},children:t.title},void 0,!1,{fileName:Zs,lineNumber:1064,columnNumber:21},this):"switch"==e?Object(h.jsxDEV)(v.a,{size:"small",checked:1==t.open,disabled:!t.is_open,onChange:e=>{this.onSwitchChange(e,t)}},void 0,!1,{fileName:Zs,lineNumber:1076,columnNumber:21},this):"status"==e?Object(h.jsxDEV)("p",{className:"dflexa",children:Object(h.jsxDEV)("span",{children:[Object(h.jsxDEV)("font",{className:"icon",style:{background:At.planStatusBg(parseInt(t.status))}},void 0,!1,{fileName:Zs,lineNumber:1090,columnNumber:25},this),t.status_text]},void 0,!0,{fileName:Zs,lineNumber:1089,columnNumber:23},this)},void 0,!1,{fileName:Zs,lineNumber:1088,columnNumber:21},this):"opearo"==e?Object(h.jsxDEV)("div",{children:[this.opearoEl(1,t),this.opearoEl(2,t),Object(h.jsxDEV)("span",{className:"grid-link",children:this.currPreview(t)},void 0,!1,{fileName:Zs,lineNumber:1106,columnNumber:23},this),t.approval_id&&2===t.status?Object(h.jsxDEV)("span",{className:"grid-link",onClick:e=>{this.dingTask(t.approval_id)},children:"\u9489\u9489\u5ba1\u6279\u67e5\u8be2"},void 0,!1,{fileName:Zs,lineNumber:1108,columnNumber:25},this):Object(h.jsxDEV)("span",{className:"grid-link disabled",children:"\u9489\u9489\u5ba1\u6279\u67e5\u8be2"},void 0,!1,{fileName:Zs,lineNumber:1117,columnNumber:25},this),this.opearoEl(3,t),this.opearoEl(4,t)]},void 0,!0,{fileName:Zs,lineNumber:1103,columnNumber:21},this):void 0},void 0,!1,{fileName:Zs,lineNumber:1036,columnNumber:13},this),this.state.audit_visible?Object(h.jsxDEV)("div",{children:[Object(h.jsxDEV)("div",{className:"modal",children:" "},void 0,!1,{fileName:Zs,lineNumber:1129,columnNumber:17},this),Object(h.jsxDEV)("div",{className:"audit-box",children:[Object(h.jsxDEV)(g.a,{type:"close",className:"audit-close",onClick:e=>{this.cancel(e)}},void 0,!1,{fileName:Zs,lineNumber:1131,columnNumber:19},this),Object(h.jsxDEV)("div",{className:"audit-box-title",children:"\u53d1\u9001"},void 0,!1,{fileName:Zs,lineNumber:1138,columnNumber:19},this),Object(h.jsxDEV)("div",{className:"audit-box-question",children:"\u662f\u5426\u7acb\u5373\u53d1\u9001key\u4ee5\u53ca\u89e3\u538b\u5bc6\u7801?"},void 0,!1,{fileName:Zs,lineNumber:1139,columnNumber:19},this),Object(h.jsxDEV)("div",{className:"phone-group",children:[Object(h.jsxDEV)("div",{children:"\u63a5\u6536\u624b\u673a\u53f7"},void 0,!1,{fileName:Zs,lineNumber:1141,columnNumber:21},this),Object(h.jsxDEV)("div",{className:"phone-list",children:Object(h.jsxDEV)(Q.a,{value:this.state.phone_radio,isValueEqual:this.isValueEqual,onChange:e=>{this.onPhoneChange(e)},children:this.state.phone_list.map(((e,t)=>Object(h.jsxDEV)(Z.a,{value:t,onClick:()=>{e==this.state.phone_list[this.state.phone_radio]&&this.setState({phone_radio:-1})},children:e},void 0,!1,{fileName:Zs,lineNumber:1152,columnNumber:29},this)))},void 0,!1,{fileName:Zs,lineNumber:1143,columnNumber:23},this)},void 0,!1,{fileName:Zs,lineNumber:1142,columnNumber:21},this)]},void 0,!0,{fileName:Zs,lineNumber:1140,columnNumber:19},this),Object(h.jsxDEV)("div",{className:"email-group",children:[Object(h.jsxDEV)("div",{children:"\u63a5\u6536\u90ae\u7bb1"},void 0,!1,{fileName:Zs,lineNumber:1168,columnNumber:21},this),Object(h.jsxDEV)("div",{className:"email-list",children:Object(h.jsxDEV)(Q.a,{value:this.state.email_radio,isValueEqual:this.isValueEqual,onChange:e=>{this.onEmailChange(e)},children:this.state.email_list.map(((e,t)=>Object(h.jsxDEV)(Z.a,{value:t,onClick:()=>{e==this.state.email_list[this.state.email_radio]&&this.setState({email_radio:-1})},children:e},void 0,!1,{fileName:Zs,lineNumber:1179,columnNumber:29},this)))},void 0,!1,{fileName:Zs,lineNumber:1170,columnNumber:23},this)},void 0,!1,{fileName:Zs,lineNumber:1169,columnNumber:21},this)]},void 0,!0,{fileName:Zs,lineNumber:1167,columnNumber:19},this),Object(h.jsxDEV)("div",{className:"input-group",children:Object(h.jsxDEV)(Di.a,{placeholder:"\u8bf7\u8f93\u5165\u63a5\u6536\u624b\u673a\u53f7",onChange:this.phoneChange,disabled:this.state.phone_radio>-1},void 0,!1,{fileName:Zs,lineNumber:1195,columnNumber:21},this)},void 0,!1,{fileName:Zs,lineNumber:1194,columnNumber:19},this),Object(h.jsxDEV)("div",{className:"input-group",children:Object(h.jsxDEV)(Di.a,{placeholder:"\u8bf7\u8f93\u5165\u63a5\u6536\u90ae\u7bb1",onChange:this.emailChange,disabled:this.state.email_radio>-1},void 0,!1,{fileName:Zs,lineNumber:1202,columnNumber:21},this)},void 0,!1,{fileName:Zs,lineNumber:1201,columnNumber:19},this),Object(h.jsxDEV)("div",{className:"audit-btn-group",children:[Object(h.jsxDEV)(u.a,{onClick:e=>{this.cancel(e)},children:"\u53d6\u6d88"},void 0,!1,{fileName:Zs,lineNumber:1210,columnNumber:21},this),Object(h.jsxDEV)(u.a,{type:"primary",onClick:e=>{this.send(e)},children:"\u53d1\u9001"},void 0,!1,{fileName:Zs,lineNumber:1217,columnNumber:21},this)]},void 0,!0,{fileName:Zs,lineNumber:1209,columnNumber:19},this)]},void 0,!0,{fileName:Zs,lineNumber:1130,columnNumber:17},this)]},void 0,!0,{fileName:Zs,lineNumber:1128,columnNumber:15},this):null]},void 0,!0,{fileName:Zs,lineNumber:1014,columnNumber:11},this)]},void 0,!0,{fileName:Zs,lineNumber:964,columnNumber:9},this)},void 0,!1,{fileName:Zs,lineNumber:963,columnNumber:7},this)}}class al extends m.a.Component{constructor(e){super(e),this.state={}}render(){return Object(h.jsxDEV)("div",{id:"plan",children:"\u8425\u9500\u8ba1\u5212\u9875\u9762"},void 0,!1,{fileName:"/Users/zhangds/web/blue-brother/frontend/src/pages/plan/main/main.js",lineNumber:9,columnNumber:12},this)}}i(260);var sl="/Users/zhangds/web/blue-brother/frontend/src/pages/plan/qrcode/qrcode.js";class ll extends m.a.Component{constructor(e){super(e),this.state={roleList:[],tabList:[{title:"\u4e8c\u7ef4\u7801\u5c0f\u5de5\u5177"}],tableHeight:600,page:1,limit:10,total:0}}render(){return Object(h.jsxDEV)("div",{id:"rolelist",className:"qrcode-tool",children:Object(h.jsxDEV)(Ft,{tabs:this.state.tabList,children:Object(h.jsxDEV)("div",{className:"table-container",children:Object(h.jsxDEV)("iframe",{frameBorder:"0",src:"https://ewm.83323.cn/qrcode/index/html",width:"100%",height:"1200px"},void 0,!1,{fileName:sl,lineNumber:21,columnNumber:13},this)},void 0,!1,{fileName:sl,lineNumber:20,columnNumber:11},this)},void 0,!1,{fileName:sl,lineNumber:19,columnNumber:9},this)},void 0,!1,{fileName:sl,lineNumber:18,columnNumber:7},this)}}i(261);var nl="/Users/zhangds/web/blue-brother/frontend/src/pages/system/account/add/adduserinfo/adduserinfo.js";class ol extends m.a.Component{constructor(e){super(e),this.onUploadError=(e,t)=>{"overMaxAmount"===e?(c.a.clear(),c.a.error(`\u6700\u591a\u53ef\u4e0a\u4f20 ${t.maxAmount} \u5f20\u56fe\u7247`)):"overMaxSize"===e&&(c.a.clear(),c.a.error(`\u56fe\u7247\u5927\u5c0f\u4e0d\u80fd\u8d85\u8fc7 ${t.formattedMaxSize}b`))},this.state={model:{user_name:"",mobile:"",password:"",real_name:"",company:"",deparment:"",post:"",station:""},companyList:[],departmentList:[],departmentJob:[],roleList:[],headImg:"",pwdtype:"text",defaultFileList:[{src:""}],disabled:!1,id:""}}componentDidMount(e){}componentWillMount(){let e=this;this.getCompanyFn();let t=JSON.parse(sessionStorage.getItem("company"));t||this.getCompanyFn(),this.getRoleFn();let i=this.props;if(i&&1==i.enumer){var s,l,n,o,r,m;this.setState({pwdtype:"password"});let d=Object(de.a)(i.rowData),u={user_name:d.user_name,mobile:d.mobile,password:"yxtx2021",real_name:d.real_name,company:t.find((e=>e.key==d.company_id)),deparment:{key:null===(s=d.department)||void 0===s?void 0:s.id,text:null===(l=d.department)||void 0===l?void 0:l.department_name},post:{key:null===(n=d.job)||void 0===n?void 0:n.id,text:null===(o=d.job)||void 0===o?void 0:o.job_name},station:{key:null===(r=d.role)||void 0===r?void 0:r.id,text:null===(m=d.role)||void 0===m?void 0:m.role_name}},h={};h.src=d.head,this.setState({model:u,disabled:!0,defaultFileList:[h],id:d.id,headImg:d.head}),u.company&&u.company.key&&Object(a.Y)({company_id:u.company.key}).then((t=>{Object(a.Tb)(t,((t,i)=>{let a=t.map((e=>({key:e.id,text:e.department_name})));e.setState({departmentList:a})}),(e=>{c.a.error(e)}))})).catch((e=>{})),u.deparment.key&&Object(a.Z)({department_id:u.deparment.key}).then((t=>{Object(a.Tb)(t,((t,i)=>{let a=t.map((e=>({key:e.id,text:e.job_name})));e.setState({departmentJob:a})}),(e=>{c.a.error(e)}))})).catch((e=>{}))}}submit(){let e=this.refs.form1.validator(),t=this.state.model,i=this;e?G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:0==i.props.enumer?Object(h.jsxDEV)("p",{children:["\u662f\u5426\u65b0\u589e",Object(h.jsxDEV)("b",{children:["[",t.user_name,"]"]},void 0,!0,{fileName:nl,lineNumber:139,columnNumber:19},this),"\u8d26\u53f7\uff1f"]},void 0,!0,{fileName:nl,lineNumber:138,columnNumber:13},this):Object(h.jsxDEV)("p",{children:["\u662f\u5426\u4fee\u6539",Object(h.jsxDEV)("b",{children:["[",i.props.rowData.user_name,"]"]},void 0,!0,{fileName:nl,lineNumber:143,columnNumber:19},this),"\u8d26\u53f7\u4fe1\u606f\uff1f"]},void 0,!0,{fileName:nl,lineNumber:142,columnNumber:13},this),onConfirm:()=>{let e={user_name:t.user_name,mobile:t.mobile,password:t.password,real_name:t.real_name,job_id:t.post.key,role_id:t.station.key};if(i.state.headImg&&(e.head=i.state.headImg),0==i.props.enumer)Object(a.ec)(e).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.clear(),c.a.success(t),setTimeout((()=>{window.location.replace("#/home/system/account-list"),sessionStorage.setItem("pathname2","/home/system/account-list")}),1e3)}),(e=>{c.a.error(e)}))})).catch((e=>{}));else{let t=i.state.id;delete e.password,e.head=i.state.headImg,Object(a.uc)(t,e).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.clear(),c.a.success(t),setTimeout((()=>{sessionStorage.setItem("pathname2","/home/system/account-list"),window.location.replace("#/home/system/account-list")}),1e3)}),(e=>{c.a.error(e)}))})).catch((e=>{}))}},onCancel:this.onCancel,className:"questModal",parentComponent:this}):(c.a.clear(),c.a.error("\u8bf7\u5b8c\u5584\u8868\u5355\u6570\u636e"))}onUploadChange(e){let t=this;if(e&&e.length>0){let i=new FormData;i.append("file",e[0].file),i.append("path","account_avatar"),Object(a.cd)(i).then((e=>{Object(a.Tb)(e,((e,i)=>{t.setState({headImg:e.path}),c.a.clear(),c.a.success(i)}),(e=>{c.a.error(e)}))})).catch((e=>{}))}else t.setState({headImg:""})}onCompanyChange(e){if(!e){let e=this.state.model;e.deparment="",e.post="",this.setState({model:e})}let t=this,i=this.state.model;if(i.company=e,this.setState({model:i}),e){let i=this.state.model;i.deparment="",i.post="",t.setState({departmentList:[]}),t.setState({departmentJob:[]}),t.setState({model:i}),Object(a.Y)({company_id:e.key}).then((e=>{Object(a.Tb)(e,((e,i)=>{let a=e.map((e=>({key:e.id,text:e.department_name})));t.setState({departmentList:a})}),(e=>{c.a.error(e)}))})).catch((e=>{}))}else t.setState({departmentList:[]}),t.setState({departmentJob:[]})}onDepartmentChange(e){if(!e){let e=this.state.model;e.post="",this.setState({model:e})}let t=this,i=this.state.model;i.deparment=e,this.setState({model:i}),t.setState({departmentJob:[]}),e?Object(a.Z)({department_id:e.key}).then((e=>{Object(a.Tb)(e,((e,i)=>{let a=e.map((e=>({key:e.id,text:e.job_name})));t.setState({departmentJob:a});let s=this.state.model;s.post="",t.setState({model:s})}),(e=>{c.a.error(e)}))})).catch((e=>{})):t.setState({departmentJob:[]})}onPostChange(e){let t=this.state.model;t.post=e,this.setState({model:t})}onStationChange(e){let t=this.state.model;t.station=e,this.setState({model:t})}getCompanyFn(){let e=this;Object(a.V)().then((t=>{Object(a.Tb)(t,((t,i)=>{let a=t.map((e=>({key:e.id,text:e.company_name})));sessionStorage.setItem("company",JSON.stringify(a)),e.setState({companyList:a})}),(e=>{c.a.error(e)}))})).catch((e=>{}))}changeType(e){this.setState({pwdtype:e})}getRoleFn(){let e=this;Object(a.xb)({page:1,limit:1e3}).then((t=>{Object(a.Tb)(t,((t,i)=>{let a=t.data.map((e=>({key:e.id,text:e.role_name})));e.setState({roleList:a})}),(e=>{c.a.error(e)}))})).catch((e=>{}))}changeKind(){this.setState({pwdtype:"password"})}cancel(){G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:"\u662f\u5426\u53d6\u6d88\u672c\u6b21\u64cd\u4f5c\uff1f"},void 0,!1,{fileName:nl,lineNumber:409,columnNumber:16},this),onConfirm:()=>{window.location.replace("#/home/system/account-list"),sessionStorage.setItem("pathname2","/home/system/account-list")},onCancel:this.onCancel,className:"questModal",parentComponent:this})}render(){return Object(h.jsxDEV)("div",{id:"addaccinfo",children:[Object(h.jsxDEV)(l.a,{model:this.state.model,rules:{account:[{type:"required",message:"\u8bf7\u8f93\u5165\u624b\u673a\u53f7"}],phone:[{type:"required",message:"\u8bf7\u8f93\u5165\u624b\u673a\u53f7"},{type:"regExp",message:"\u624b\u673a\u53f7\u683c\u5f0f\u4e0d\u6b63\u786e",reg:"^[1][3,4,5,6,7,8,9][0-9]{9}$"}],pwd:[{type:"required",message:"\u8bf7\u8f93\u5165\u5bc6\u7801"},{type:"regExp",message:"6-16\u4f4d\u5b57\u7b26,\u6570\u5b57+\u5b57\u6bcd\u7ec4\u6210(\u5b57\u6bcd\u533a\u5206\u5927\u5c0f\u5199)",reg:"^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,16}$"}],name:[{type:"required",message:"\u8bf7\u8f93\u5165\u771f\u5b9e\u59d3\u540d"},{type:"regExp",message:"2-16\u5b57\u6c49\u5b57/\u5b57\u6bcd\u7ec4\u6210",reg:"^([\u4e00-\u9fa5]|[a-zA-Z]){2,16}$"}],company:[{type:"required",message:"\u8bf7\u9009\u62e9\u516c\u53f8"}],deparment:[{type:"required",message:"\u8bf7\u9009\u62e9\u90e8\u95e8"}],post:[{type:"required",message:"\u8bf7\u9009\u62e9\u5c97\u4f4d"}],station:[{type:"required",message:"\u8bf7\u9009\u62e9\u89d2\u8272"}]},ref:"form1",className:"addform",children:[Object(h.jsxDEV)(s.a,{labelname:"\u8d26\u53f7",prop:"account",id:"account",children:Object(h.jsxDEV)(n.a,{onChange:e=>{let t=this.state.model;t.user_name=e,this.setState({model:t})},onClearItem:e=>{let t=this.state.model;t.user_name="",this.setState({model:t})},value:this.state.model.user_name,placeholder:"\u8bf7\u8f93\u5165\u624b\u673a\u53f7",labelWidth:"0px",maxLength:12,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:nl,lineNumber:465,columnNumber:13},this)},void 0,!1,{fileName:nl,lineNumber:464,columnNumber:11},this),Object(h.jsxDEV)(s.a,{labelname:" \u624b\u673a\u53f7",prop:"phone",id:"phone",children:Object(h.jsxDEV)(n.a,{kind:"tel",onChange:e=>{let t=this.state.model;t.mobile=e,this.setState({model:t})},onClearItem:e=>{let t=this.state.model;t.mobile="",this.setState({model:t})},value:this.state.model.mobile,placeholder:"\u8bf7\u8f93\u5165\u624b\u673a\u53f7",labelWidth:"0px",maxLength:11,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:nl,lineNumber:487,columnNumber:13},this)},void 0,!1,{fileName:nl,lineNumber:486,columnNumber:11},this),Object(h.jsxDEV)(s.a,{labelname:"\u5bc6\u7801",prop:"pwd",id:"pwd",children:Object(h.jsxDEV)(n.a,{onChange:e=>{let t=this.state.model;t.password=e,this.setState({model:t})},markedShow:e=>{this.changeType(e)},kind:this.state.pwdtype,disabled:this.state.disabled,onfocusFn:e=>this.changeKind(),onClearItem:e=>{let t=this.state.model;t.password="",this.setState({model:t})},value:this.state.model.password,placeholder:"\u8bf7\u8f93\u5165\u5bc6\u7801",labelWidth:"0px",maxLength:16,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:nl,lineNumber:509,columnNumber:13},this)},void 0,!1,{fileName:nl,lineNumber:508,columnNumber:11},this),Object(h.jsxDEV)(s.a,{labelname:"\u771f\u5b9e\u59d3\u540d",prop:"name",children:Object(h.jsxDEV)(n.a,{onChange:e=>{let t=this.state.model;t.real_name=e,this.setState({model:t})},onClearItem:e=>{let t=this.state.model;t.real_name="",this.setState({model:t})},value:this.state.model.real_name,placeholder:"\u8bf7\u8f93\u5165\u771f\u5b9e\u59d3\u540d",labelWidth:"0px",maxLength:16,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:nl,lineNumber:537,columnNumber:13},this)},void 0,!1,{fileName:nl,lineNumber:536,columnNumber:11},this),Object(h.jsxDEV)(s.a,{id:"company",labelname:"\u5c97\u4f4d",prop:"company",myClassName:"sel1",children:Object(h.jsxDEV)(X.a,{options:this.state.companyList,placeholder:"\u8bf7\u9009\u62e9\u516c\u53f8",value:this.state.model.company,onChange:e=>{this.onCompanyChange(e),$t.a.emit("change","company",e)}},void 0,!1,{fileName:nl,lineNumber:558,columnNumber:13},this)},void 0,!1,{fileName:nl,lineNumber:557,columnNumber:11},this),Object(h.jsxDEV)(s.a,{id:"deparment",prop:"deparment",myClassName:"sel2",labelwidth:"0px",children:Object(h.jsxDEV)(X.a,{options:this.state.departmentList,placeholder:"\u8bf7\u9009\u62e9\u90e8\u95e8",popupWidth:"360px",value:this.state.model.deparment,onChange:e=>{this.onDepartmentChange(e),$t.a.emit("change","deparment",e)}},void 0,!1,{fileName:nl,lineNumber:569,columnNumber:13},this)},void 0,!1,{fileName:nl,lineNumber:568,columnNumber:11},this),Object(h.jsxDEV)(s.a,{id:"post",prop:"post",myClassName:"sel2 sel3",labelwidth:"0px",children:Object(h.jsxDEV)(X.a,{options:this.state.departmentJob,placeholder:"\u8bf7\u9009\u62e9\u5c97\u4f4d",popupWidth:"360px",value:this.state.model.post,onChange:e=>{this.onPostChange(e),$t.a.emit("change","post",e)}},void 0,!1,{fileName:nl,lineNumber:581,columnNumber:13},this)},void 0,!1,{fileName:nl,lineNumber:580,columnNumber:11},this),Object(h.jsxDEV)(s.a,{prop:"station",labelname:"\u89d2\u8272",id:"station",children:Object(h.jsxDEV)(X.a,{options:this.state.roleList,clearable:!0,placeholder:"\u8bf7\u9009\u62e9\u89d2\u8272",value:this.state.model.station,onChange:e=>{this.onStationChange(e),$t.a.emit("change","station",e)},popupWidth:"360px",width:"520px"},void 0,!1,{fileName:nl,lineNumber:593,columnNumber:13},this)},void 0,!1,{fileName:nl,lineNumber:592,columnNumber:11},this),Object(h.jsxDEV)("div",{className:"zent-form-actions",children:[Object(h.jsxDEV)(u.a,{type:"primary",onClick:this.submit.bind(this),children:"\u63d0\u4ea4"},void 0,!1,{fileName:nl,lineNumber:607,columnNumber:13},this),Object(h.jsxDEV)(u.a,{type:"normal",htmlType:"reset",onClick:this.cancel.bind(this),children:"\u53d6\u6d88"},void 0,!1,{fileName:nl,lineNumber:610,columnNumber:13},this)]},void 0,!0,{fileName:nl,lineNumber:606,columnNumber:11},this)]},void 0,!0,{fileName:nl,lineNumber:463,columnNumber:9},this),Object(h.jsxDEV)("div",{className:"mypic",children:[Object(h.jsxDEV)("b",{children:"\u5934\u50cf"},void 0,!1,{fileName:nl,lineNumber:617,columnNumber:11},this),Object(h.jsxDEV)("div",{className:"changepic dflexac",children:""==this.state.defaultFileList[0].src?Object(h.jsxDEV)(gt.a,{className:"zent-image-upload-demo",maxSize:512e3,tips:"\u5efa\u8bae\u5c3a\u5bf8 80*80\uff0c\u56fe\u7247\u4e0d\u8d85\u8fc7 500kb",maxAmount:1,onChange:e=>{this.onUploadChange(e)},onUpload:this.onUpload,onError:this.onUploadError},void 0,!1,{fileName:nl,lineNumber:620,columnNumber:15},this):Object(h.jsxDEV)(gt.a,{className:"zent-image-upload-demo",maxSize:512e3,tips:"\u5efa\u8bae\u5c3a\u5bf8 80*80\uff0c\u56fe\u7247\u4e0d\u8d85\u8fc7 500kb",maxAmount:1,onChange:e=>{this.onUploadChange(e)},onUpload:this.onUpload,defaultFileList:this.state.defaultFileList,onError:this.onUploadError},void 0,!1,{fileName:nl,lineNumber:632,columnNumber:15},this)},void 0,!1,{fileName:nl,lineNumber:618,columnNumber:11},this)]},void 0,!0,{fileName:nl,lineNumber:616,columnNumber:9},this)]},void 0,!0,{fileName:nl,lineNumber:462,columnNumber:7},this)}}i(262);var rl="/Users/zhangds/web/blue-brother/frontend/src/pages/system/account/add/add.js";class ml extends m.a.Component{constructor(e){super(e),this.state={pagetitle:"\u65b0\u5efa\u8d26\u53f7",rowData:{},enumer:1}}componentWillMount(){let e=JSON.parse(sessionStorage.getItem("breaknav"))[0].pagetitle,t=e.includes("\u65b0\u5efa")?0:1,i=JSON.parse(sessionStorage.getItem("dataInfo"));this.setState({pagetitle:e+"\u8d26\u53f7",rowData:i,enumer:t})}render(){return Object(h.jsxDEV)("div",{id:"accadd",className:"maincenter",children:Object(h.jsxDEV)(d.a,{style:{width:"100%"},title:this.state.pagetitle,children:Object(h.jsxDEV)("div",{className:"addaccount",children:Object(h.jsxDEV)(ol,{enumer:this.state.enumer,rowData:this.state.rowData},void 0,!1,{fileName:rl,lineNumber:26,columnNumber:13},this)},void 0,!1,{fileName:rl,lineNumber:25,columnNumber:11},this)},void 0,!1,{fileName:rl,lineNumber:24,columnNumber:9},this)},void 0,!1,{fileName:rl,lineNumber:23,columnNumber:7},this)}}i(137);var cl="/Users/zhangds/web/blue-brother/frontend/src/pages/system/account/list/delAuth.js";const dl=Z.a.Group,ul=Z.a.Button;class hl extends m.a.Component{constructor(e){super(e),this.setVisible=e=>{this.setState({visible:e})},this.authChange=e=>{this.setState({authWay:e.target.value}),1==e.target.value?this.getequalMigration(this.props.deldata.id):this.getAutnMan(this.props.deldata.id)},this.state={classification:"",personnel:"",value:"1",authWay:1,levelAuth:!0,downLevel:!0,levelAuthdata:[],downLeveldata:[],authperson:[],loadshow:!1,model:{}}}getequalMigration(e){let t=this;Object(a.jb)(e).then((e=>{Object(a.Tb)(e,((e,i)=>{let a=e.map((e=>({text:e.real_name,key:e.id})));t.setState({levelAuth:a.length>0,authperson:a,levelAuthdata:a})}),(e=>{c.a.error(e)}))})).catch((e=>{}))}getAutnMan(e){let t=this;Object(a.Rb)(e,{page:1,limit:1e3}).then((e=>{Object(a.Tb)(e,((e,i)=>{let a=e.data.filter((e=>1==e.status)).map((e=>({text:e.real_name,key:e.id})));t.setState({downLevel:a.length>0,authperson:a,downLeveldata:a})}),(e=>{c.a.error(e)}))})).catch((e=>{}))}componentWillMount(){this.getequalMigration(this.props.deldata.id),this.getAutnMan(this.props.deldata.id),setTimeout((()=>{this.state.levelAuth?this.setState({authperson:this.state.levelAuthdata,loadshow:!0,authWay:1}):this.setState({authperson:this.state.downLeveldata,loadshow:!0,authWay:0})}),300)}render(){return this.state.loadshow?Object(h.jsxDEV)("div",{id:"delAuth",children:[Object(h.jsxDEV)("p",{className:"tips",children:"\u5220\u9664\u8d26\u53f7\uff0c\u9700\u586b\u5199\u4ea4\u63a5\u4eba\u3002\u5220\u9664\u8d26\u53f7\uff0c\u6570\u636e\u5c06\u5168\u90e8\u79fb\u4ea4\u7ed9\u4ea4\u63a5\u4eba\uff0c\u4e14\u5220\u9664\u8d26\u53f7\u4e0d\u53ef\u6062\u590d"},void 0,!1,{fileName:cl,lineNumber:126,columnNumber:9},this),Object(h.jsxDEV)(l.a,{ref:"form1",children:[Object(h.jsxDEV)(s.a,{labelname:"\u4ea4\u63a5\u89d2\u8272",children:Object(h.jsxDEV)(dl,{onChange:this.authChange,value:this.state.authWay,children:[Object(h.jsxDEV)(ul,{value:1,disabled:!this.state.levelAuth,children:"\u5e73\u7ea7"},void 0,!1,{fileName:cl,lineNumber:132,columnNumber:15},this),Object(h.jsxDEV)(ul,{value:0,disabled:!this.state.downLevel,children:"\u4e0b\u7ea7"},void 0,!1,{fileName:cl,lineNumber:135,columnNumber:15},this)]},void 0,!0,{fileName:cl,lineNumber:131,columnNumber:13},this)},void 0,!1,{fileName:cl,lineNumber:130,columnNumber:11},this),Object(h.jsxDEV)(s.a,{labelname:"\u4ea4\u63a5\u4eba",children:Object(h.jsxDEV)(X.a,{options:this.state.authperson,placeholder:"\u8bf7\u9009\u62e9",onChange:e=>this.setState({personnel:e}),value:this.state.personnel},void 0,!1,{fileName:cl,lineNumber:141,columnNumber:13},this)},void 0,!1,{fileName:cl,lineNumber:140,columnNumber:11},this)]},void 0,!0,{fileName:cl,lineNumber:129,columnNumber:9},this)]},void 0,!0,{fileName:cl,lineNumber:125,columnNumber:7},this):null}}var bl="/Users/zhangds/web/blue-brother/frontend/src/pages/system/account/list/modifypwd.js";function pl(e,t){return e!==t.getSectionValue("password").password?{name:"passwordEqual",message:"\u4e24\u6b21\u586b\u5199\u7684\u5bc6\u7801\u4e0d\u4e00\u81f4"}:null}var Nl=e=>{const t=bi.a.useForm(pi.b.View),[i,s]=m.a.useState("password"),[l,n]=m.a.useState("password"),o=m.a.useCallback((t=>{const i=t.getValue();if(i){let t=Object(de.a)(i);Object(a.Ac)(e.id,t).then((t=>{Object(a.Tb)(t,((t,i)=>{c.a.clear(),c.a.success(i),e.visibleShow(!1)}),(e=>{c.a.clear(),c.a.error(t.data.message)}))})).catch((e=>{}))}}),[]);return Object(h.jsxDEV)(bi.a,{form:t,layout:"horizontal",scrollToError:!0,onSubmit:o,children:[Object(h.jsxDEV)(Ni.a,{name:"password",label:"\u65b0\u5bc6\u7801",className:"selfpwd",required:!0,helpDesc:"",after:Object(h.jsxDEV)(g.a,{type:"password"==i?"eye-o":"closed-eye",onClick:()=>{s("password"==i?"text":"password")}},void 0,!1,{fileName:bl,lineNumber:69,columnNumber:11},void 0),validators:[ji.b.required("\u8bf7\u8f93\u5165\u65b0\u5bc6\u7801"),ji.b.pattern(/^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,16}$/,"6-16\u4f4d\u5b57\u7b26,\u6570\u5b57+\u5b57\u6bcd\u7ec4\u6210\uff0c(\u5b57\u6bcd\u533a\u5206\u5927\u5c0f\u5199)")],notice:"6-16\u4f4d\u5b57\u7b26,\u6570\u5b57+\u5b57\u6bcd\u7ec4\u6210\uff0c\u5b57\u6bcd(\u533a\u5206\u5927\u5c0f\u5199)",props:{type:"password"==i?"password":"text",maxLength:16,autoComplete:"new-password"}},void 0,!1,{fileName:bl,lineNumber:62,columnNumber:7},void 0),Object(h.jsxDEV)(Ni.a,{name:"old_password",label:"\u786e\u8ba4\u5bc6\u7801",className:"selfpwd",after:Object(h.jsxDEV)(g.a,{type:"password"==l?"eye-o":"closed-eye",onClick:()=>{n("password"==l?"text":"password")}},void 0,!1,{fileName:bl,lineNumber:90,columnNumber:11},void 0),required:!0,notice:"\u5fc5\u987b\u4e0e\u65b0\u5bc6\u7801\u8f93\u5165\u4e00\u81f4",validators:[ji.b.required("\u8bf7\u786e\u8ba4\u5bc6\u7801"),pl],props:{type:"password"==l?"password":"text",maxLength:16,autoComplete:"new-password"}},void 0,!1,{fileName:bl,lineNumber:85,columnNumber:7},void 0),Object(h.jsxDEV)("p",{className:"dflexajce",children:[Object(h.jsxDEV)(u.a,{type:"primary",htmlType:"submit",children:"\u786e\u5b9a"},void 0,!1,{fileName:bl,lineNumber:102,columnNumber:9},void 0),",",Object(h.jsxDEV)(u.a,{onClick:()=>{e.visibleShow(!1)},children:"\u53d6\u6d88"},void 0,!1,{fileName:bl,lineNumber:105,columnNumber:10},void 0)]},void 0,!0,{fileName:bl,lineNumber:101,columnNumber:7},void 0)]},void 0,!0,{fileName:bl,lineNumber:61,columnNumber:5},void 0)},jl="/Users/zhangds/web/blue-brother/frontend/src/pages/system/account/list/list.js";const vl=[{title:"\u8d26\u53f7",name:"user_name",prop:"user_name",type:"normal",width:"10%"},{title:"\u624b\u673a\u53f7",prop:"mobile",name:"mobile",width:"10%",type:"normal"},{title:"\u89d2\u8272",name:"role",prop:"role.role_name",type:"normal",defaultText:0,width:"10%"},{title:"\u5c97\u4f4d",name:"job.job_name",type:"normal",prop:"job.job_name",width:"10%"},{title:"\u59d3\u540d",name:"real_name",type:"normal",prop:"real_name",width:"10%"},{title:"\u72b6\u6001",width:"10%",type:"slot",name:"name",prop:"status"},{title:"\u521b\u5efa\u65f6\u95f4",name:"create_time",prop:"create_time",width:"20%",type:"normal"},{title:"\u64cd\u4f5c",prop:"opearo",name:"opearo",type:"slot",width:"20%"}];class gl extends m.a.Component{constructor(e){super(e),this.onChange=e=>{this.setState(e)},this.onConfirm=()=>{},this.onCancel=()=>{},this.setVisible=e=>{this.setState({visible:e})},this.setdelVisible=e=>{this.setState({delvisible:e})},this.getChildrenMsg=(e,t)=>{this.setState({visible:t})},this.state={checkedSmall:!0,tableHeight:600,visible:!1,delvisible:!1,tabList:[{title:"\u8d26\u53f7\u5217\u8868"}],accList:[],page:1,limit:10,total:0,deldata:{},search:"",id:""}}clickFn(){sessionStorage.setItem("pathname2","/home/system/account-add");sessionStorage.setItem("breaknav",JSON.stringify([{pagetitle:"\u65b0\u5efa",items:[{path:"/home/system/account-list",name:"\u8d26\u53f7\u7ba1\u7406"},{path:"/home/system/account-add",name:"\u65b0\u5efa\u8d26\u53f7"}]}])),window.open("#/home/system/account-add")}onSwitchChange(e,t){let i=this,s={status:0==t.status?1:0};G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:["\u662f\u5426",0==t.status?"\u542f\u7528":"\u505c\u7528",Object(h.jsxDEV)("b",{children:["[",t.user_name,"]"]},void 0,!0,{fileName:jl,lineNumber:139,columnNumber:11},this),"\u8d26\u53f7\uff1f"]},void 0,!0,{fileName:jl,lineNumber:137,columnNumber:9},this),onConfirm:()=>{Object(a.sc)(t.id,s).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.clear(),c.a.success(t),i.getAccountFn()}),(e=>{c.a.error(e)}))})).catch((e=>{}))},onCancel:this.onCancel,className:"questModal",parentComponent:this})}changeState(e,t){let i=this,a=Object(oi.a)(i.state.accoutdata,(e=>e.id==t.id));i.state.accoutdata[a].status=e,i.setState({accoutdata:i.state.accoutdata})}delFn(e,t){if(1==t.status)c.a.clear(),c.a.warn("\u8bf7\u5148\u5c06\u6b64\u8d26\u53f7\u7981\u7528\uff01");else{this.setState({delvisible:!0,deldata:t})}}editFn(e,t){Object(a.V)().then((e=>{Object(a.Tb)(e,((e,t)=>{let i=e.map((e=>({key:e.id,text:e.company_name})));sessionStorage.setItem("company",JSON.stringify(i)),window.open("#/home/system/account-add")}),(e=>{c.a.error(e)}))})).catch((e=>{})),sessionStorage.setItem("pathname2","/home/system/account-add");sessionStorage.setItem("breaknav",JSON.stringify([{pagetitle:"\u7f16\u8f91",items:[{path:"/home/system/account-list",name:"\u8d26\u53f7\u7ba1\u7406"},{path:"/home/system/account-add",name:"\u7f16\u8f91\u8d26\u53f7"}]}])),sessionStorage.setItem("dataInfo",JSON.stringify(t))}resetpwd(e,t){this.setState({visible:!0,id:t.id})}subaccount(e,t){this.props.history.push("/home/system/subaccount-list?aid="+t.id);let i=[{pagetitle:"\u7f16\u8f91",items:[{path:"/home/system/account-list",name:"\u8d26\u53f7\u7ba1\u7406"},{path:"/home/system/subaccount-add",name:t.real_name+"\u7684\u5b50\u8d26\u53f7\u5217\u8868"}]}];sessionStorage.setItem("subbreaknav",JSON.stringify(i)),sessionStorage.setItem("subaid",t.id)}getAccountFn(){let e=this,{page:t,limit:i,search:s}=e.state,l={page:t,limit:i};s&&(l.search=s),Object(a.M)(l).then((t=>{Object(a.Tb)(t,((t,i)=>{const a=t.data,{total:s}=t;e.setState({accList:a,total:s})}),(e=>{c.a.error(e)}))})).catch((e=>{}))}delSubmit(){let e=this,t=this.refs.delAuthDom.state;t.personnel.key?1==t.authWay?G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:["\u662f\u5426\u79fb\u4ea4\u5e76\u5220\u9664",Object(h.jsxDEV)("b",{children:["[",this.state.deldata.real_name,"]"]},void 0,!0,{fileName:jl,lineNumber:297,columnNumber:22},this),"\uff1f"]},void 0,!0,{fileName:jl,lineNumber:296,columnNumber:13},this),onConfirm:()=>{let i={admin_user_id:this.state.deldata.id,receive_uid:t.personnel.key};Object(a.Kc)(i).then((t=>{Object(a.Tb)(t,((t,i)=>{c.a.clear(),c.a.success(i),setTimeout((()=>{Object(a.o)(this.state.deldata.id).then((t=>{Object(a.Tb)(t,((t,i)=>{c.a.clear(),c.a.success(i),e.getAccountFn(),e.setState({delvisible:!1})}),(e=>{c.a.error(e)}))})).catch((e=>{}))}),1e3)}),(e=>{c.a.error(e)}))})).catch((e=>{}))},onCancel:this.onCancel,className:"questModal",parentComponent:this}):G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:["\u662f\u5426\u79fb\u4ea4\u5e76\u5220\u9664",Object(h.jsxDEV)("b",{children:["[",this.state.deldata.real_name,"]"]},void 0,!0,{fileName:jl,lineNumber:350,columnNumber:22},this),"\uff1f"]},void 0,!0,{fileName:jl,lineNumber:349,columnNumber:13},this),onConfirm:()=>{let i={admin_user_id:this.state.deldata.id,receive_uid:t.personnel.key};Object(a.tc)(i).then((t=>{Object(a.Tb)(t,((t,i)=>{c.a.clear(),c.a.success(i),setTimeout((()=>{Object(a.o)(this.state.deldata.id).then((t=>{Object(a.Tb)(t,((t,i)=>{c.a.clear(),c.a.success(i),e.getAccountFn(),e.setState({delvisible:!1})}),(e=>{c.a.error(e)}))})).catch((e=>{}))}),1e3)}),(e=>{c.a.error(e)}))})).catch((e=>{}))},onCancel:this.onCancel,className:"questModal",parentComponent:this}):(c.a.clear(),c.a.warn("\u8bf7\u9009\u62e9\u4ea4\u63a5\u4eba"))}pageChange(e){this.setState({page:e}),setTimeout((()=>{this.getAccountFn()}),10)}countChange(e){this.setState({page:1,limit:e}),setTimeout((()=>{this.getAccountFn()}),10)}iptsureFn(){this.setState({page:1}),setTimeout((()=>{this.getAccountFn()}),300)}componentWillMount(){this.getAccountFn(),this.setState({tableHeight:window.innerHeight-390})}componentDidMount(){}componentDidUpdate(e,t){t.search==this.state.search||this.state.search||this.getAccountFn()}sureFn(){this.setVisible(!1),this.refs.midify.onSubmit()}render(){return Object(h.jsxDEV)("div",{id:"accountlist",children:[Object(h.jsxDEV)(Ft,{tabs:this.state.tabList,children:Object(h.jsxDEV)("div",{className:"acctable",children:[Object(h.jsxDEV)("div",{className:"accountable dflexj",children:[Object(h.jsxDEV)(u.a,{type:"primary",icon:"plus",onClick:this.clickFn.bind(this),children:"\u65b0\u5efa\u8d26\u53f7"},void 0,!1,{fileName:jl,lineNumber:448,columnNumber:15},this),Object(h.jsxDEV)(n.a,{onChange:e=>this.setState({search:e}),value:this.state.search,wordSearch:this.iptsureFn.bind(this),icon:"search",placeholder:"\u8bf7\u8f93\u5165\u59d3\u540d\u3001\u624b\u673a\u53f7\u3001\u8d26\u53f7\u67e5\u8be2",countShow:!1,height:"36px",width:"260px",onClearItem:e=>{this.setState({search:""})},alignment:"left"},void 0,!1,{fileName:jl,lineNumber:452,columnNumber:15},this)]},void 0,!0,{fileName:jl,lineNumber:447,columnNumber:13},this),Object(h.jsxDEV)("div",{className:"table-container",children:Object(h.jsxDEV)(I,{spliteColor:"#fff",tableData:this.state.accList,Column:vl,page:this.state.page,maxheight:this.state.tableHeight,isMultiple:!1,dataCount:this.state.total,countbarVisible:!1,isSwitch:!1,pageChange:e=>{this.pageChange(e)},countChange:e=>{this.countChange(e)},checkChange:e=>{},ComponentHandler:(e,t)=>"status"==e?Object(h.jsxDEV)(v.a,{size:"small",checked:0!=t.status,onChange:e=>{this.onSwitchChange(e,t)}},void 0,!1,{fileName:jl,lineNumber:488,columnNumber:23},this):"opearo"==e?Object(h.jsxDEV)("p",{children:[Object(h.jsxDEV)("span",{className:"grid-link",onClick:e=>this.editFn(e,t),children:"\u7f16\u8f91"},void 0,!1,{fileName:jl,lineNumber:501,columnNumber:25},this),Object(h.jsxDEV)("span",{className:"grid-link",onClick:e=>this.delFn(e,t),children:"\u5220\u9664"},void 0,!1,{fileName:jl,lineNumber:504,columnNumber:25},this),Object(h.jsxDEV)("span",{className:"grid-link",onClick:e=>this.resetpwd(e,t),children:"\u91cd\u7f6e\u5bc6\u7801"},void 0,!1,{fileName:jl,lineNumber:507,columnNumber:25},this),Object(h.jsxDEV)("span",{className:"grid-link",onClick:e=>this.subaccount(e,t),children:"\u5b50\u8d26\u53f7\u7ba1\u7406"},void 0,!1,{fileName:jl,lineNumber:510,columnNumber:25},this)]},void 0,!0,{fileName:jl,lineNumber:500,columnNumber:23},this):void 0},void 0,!1,{fileName:jl,lineNumber:468,columnNumber:15},this)},void 0,!1,{fileName:jl,lineNumber:467,columnNumber:13},this)]},void 0,!0,{fileName:jl,lineNumber:446,columnNumber:11},this)},void 0,!1,{fileName:jl,lineNumber:444,columnNumber:9},this),Object(h.jsxDEV)(ce.a,{visible:this.state.visible,className:"questModal",onClose:()=>this.setVisible(!1),title:"\u91cd\u7f6e\u5bc6\u7801",children:Object(h.jsxDEV)("div",{children:Object(h.jsxDEV)(Nl,{visibleShow:e=>this.setVisible(e),id:this.state.id},void 0,!1,{fileName:jl,lineNumber:529,columnNumber:13},this)},void 0,!1,{fileName:jl,lineNumber:528,columnNumber:11},this)},void 0,!1,{fileName:jl,lineNumber:522,columnNumber:9},this),Object(h.jsxDEV)(ce.a,{visible:this.state.delvisible,className:"questModal",onClose:()=>this.setdelVisible(!1),title:"\u5220\u9664\u8d26\u53f7",footer:Object(h.jsxDEV)("div",{style:{textAlign:"right"},children:[Object(h.jsxDEV)(u.a,{type:"primary",onClick:e=>{this.delSubmit(e)},children:"\u63d0\u4ea4"},void 0,!1,{fileName:jl,lineNumber:540,columnNumber:15},this),Object(h.jsxDEV)(u.a,{onClick:e=>{this.setdelVisible(!1)},children:"\u53d6\u6d88"},void 0,!1,{fileName:jl,lineNumber:548,columnNumber:15},this)]},void 0,!0,{fileName:jl,lineNumber:539,columnNumber:13},this),children:Object(h.jsxDEV)("div",{children:Object(h.jsxDEV)(hl,{deldata:this.state.deldata,visibleShow:e=>this.setdelVisible(e),id:this.state.id,ref:"delAuthDom"},void 0,!1,{fileName:jl,lineNumber:559,columnNumber:13},this)},void 0,!1,{fileName:jl,lineNumber:558,columnNumber:11},this)},void 0,!1,{fileName:jl,lineNumber:533,columnNumber:9},this)]},void 0,!0,{fileName:jl,lineNumber:443,columnNumber:7},this)}}var fl=i(504),_l=(i(263),"/Users/zhangds/web/blue-brother/frontend/src/pages/system/customize/main.js");const xl=e=>{const{item:t,onDelete:i}=e;return Object(h.jsxDEV)("div",{className:"dflexj",children:[Object(h.jsxDEV)("span",{children:t.name},void 0,!1,{fileName:_l,lineNumber:14,columnNumber:7},void 0),Object(h.jsxDEV)("span",{className:"delfilebtn",onClick:()=>i(t),children:"\u5220\u9664"},void 0,!1,{fileName:_l,lineNumber:15,columnNumber:7},void 0)]},void 0,!0,{fileName:_l,lineNumber:13,columnNumber:5},void 0)};class yl extends m.a.Component{constructor(e){super(e),this.onUploadFileChange=e=>{e.length>0&&this.setState({file:e[0].file})},this.onUploadError=(e,t)=>{"overMaxSize"===e&&c.a.error(`\u6587\u4ef6\u5927\u5c0f\u4e0d\u80fd\u8d85\u8fc7 ${t.formattedMaxSize}`)},this.state={model:{title:"",scope:"",client:""},client:[],file:"",headImg:"",account:[]}}onUploadChange(e){let t=this;if(e&&e.length>0){let i=new FormData;i.append("file",e[0].file),i.append("path"," plan_theme"),Object(a.cd)(i).then((e=>{Object(a.Tb)(e,((e,i)=>{t.setState({headImg:e.path}),c.a.clear(),c.a.success(i)}),(e=>{c.a.error(e)}))})).catch((e=>{}))}else c.a.clear(),c.a.warn("\u8bf7\u5148\u9009\u62e9\u56fe\u7247\uff01")}onNextStep(){let e=this;this.refs.form1.validator()&&(this.state.headImg&&this.state.file?G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:["\u662f\u5426\u65b0\u589e",Object(h.jsxDEV)("b",{children:["[",e.state.model.title,"]"]},void 0,!0,{fileName:_l,lineNumber:85,columnNumber:19},this),"\u6a21\u677f\uff1f"]},void 0,!0,{fileName:_l,lineNumber:84,columnNumber:13},this),onConfirm:()=>{let t=new FormData,i=Object(de.a)(e.state.model);t.append("thumb",e.state.headImg),t.append("file",e.state.file),t.append("client",i.client.key),t.append("scope",i.scope.key),t.append("title",i.title),Object(a.rc)(t).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.clear(),c.a.success(t)}),(e=>{c.a.error(e)}))})).catch((e=>{}))},onCancel:this.onCancel,className:"questModal",parentComponent:this}):(c.a.clear(),c.a.warn("\u8bf7\u5148\u4e0a\u4f20\u6587\u4ef6\u56fe\u7247")))}onCancel(){window.history.back()}getAccount(){let e=this;Object(a.qb)().then((t=>{Object(a.Tb)(t,((t,i)=>{let a=t.map((e=>({key:e.id,text:e.user_name})));e.setState({account:a})}),(e=>{c.a.error(e)}))})).catch((e=>{}))}onscopeChange(e){let t=this.state.model;t.scope=e,this.setState({model:t})}onclientChange(e){let t=this.state.model;t.client=e,this.setState({model:t})}componentWillMount(){this.getAccount();let e=JSON.parse(sessionStorage.getItem("enmu")).theme_client_type.code,t=[];for(let i in e)t.push({key:i,text:e[i]});this.setState({client:t})}render(){return Object(h.jsxDEV)("div",{className:"customize",children:Object(h.jsxDEV)(d.a,{type:"nested",title:"\u5b9a\u5236\u5316\u6a21\u677f",className:"customize-card",children:[Object(h.jsxDEV)(l.a,{model:this.state.model,rules:{name:[{type:"required",message:"\u8bf7\u8f93\u5165\u6807\u9898"}],client:[{type:"required",message:"\u8bf7\u9009\u62e9\u9875\u9762\u7c7b\u578b"}],scope:[{type:"required",message:"\u8bf7\u9009\u62e9\u5f52\u5c5e\u8d26\u53f7"}]},ref:"form1",children:[Object(h.jsxDEV)(s.a,{labelname:"\u6807\u9898",prop:"name",children:Object(h.jsxDEV)(n.a,{onChange:e=>{let t=this.state.model;t.title=e,this.setState({model:t})},onClearItem:e=>{let t=this.state.model;t.title="",this.setState({model:t})},value:this.state.model.title,placeholder:"\u8bf7\u8f93\u5165",labelWidth:"0px",maxLength:32,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:_l,lineNumber:183,columnNumber:15},this)},void 0,!1,{fileName:_l,lineNumber:182,columnNumber:13},this),Object(h.jsxDEV)(s.a,{labelname:"\u6587\u4ef6\u4e0a\u4f20",prop:"zip",children:Object(h.jsxDEV)(fl.a,{multiple:!0,className:"zent-upload-demo-pic",maxSize:51200,tips:"\u5355\u4e2a\u6587\u4ef6\u4e0d\u8d85\u8fc7 50kb",onChange:e=>this.onUploadFileChange(e),onUpload:this.onUpload,customUploadItem:xl,onError:this.onUploadError,sortable:!0},void 0,!1,{fileName:_l,lineNumber:204,columnNumber:15},this)},void 0,!1,{fileName:_l,lineNumber:203,columnNumber:13},this),Object(h.jsxDEV)(s.a,{labelname:"\u622a\u56fe\u4e0a\u4f20",prop:"picurl",children:Object(h.jsxDEV)(gt.a,{className:"zent-image-upload-demo",maxSize:1048576,tips:"\u5efa\u8bae\u5c3a\u5bf8 375*667\uff0c\u56fe\u7247\u4e0d\u8d85\u8fc71Mb",maxAmount:1,onChange:e=>{this.onUploadChange(e)},onUpload:this.onUpload},void 0,!1,{fileName:_l,lineNumber:217,columnNumber:15},this)},void 0,!1,{fileName:_l,lineNumber:216,columnNumber:13},this),Object(h.jsxDEV)(s.a,{labelname:"\u5f52\u5c5e\u8d26\u53f7",prop:"scope",id:"scope",children:Object(h.jsxDEV)(X.a,{options:this.state.account,onChange:e=>{this.onscopeChange(e)},placeholder:"\u9009\u62e9\u4e00\u9879",width:515,value:this.state.model.scope},void 0,!1,{fileName:_l,lineNumber:230,columnNumber:15},this)},void 0,!1,{fileName:_l,lineNumber:229,columnNumber:13},this),Object(h.jsxDEV)(s.a,{labelname:"\u9875\u9762\u7c7b\u578b",prop:"client",id:"client",children:Object(h.jsxDEV)(X.a,{options:this.state.client,onChange:e=>{this.onclientChange(e)},placeholder:"\u9009\u62e9\u4e00\u9879",width:515,value:this.state.model.client},void 0,!1,{fileName:_l,lineNumber:241,columnNumber:15},this)},void 0,!1,{fileName:_l,lineNumber:240,columnNumber:13},this)]},void 0,!0,{fileName:_l,lineNumber:181,columnNumber:11},this),Object(h.jsxDEV)("div",{className:"btn-group",children:[Object(h.jsxDEV)(u.a,{type:"primary",onClick:()=>this.onNextStep(),children:"\u63d0\u4ea4"},void 0,!1,{fileName:_l,lineNumber:253,columnNumber:13},this),Object(h.jsxDEV)(u.a,{type:"normal",onClick:()=>this.onCancel(),children:"\u53d6\u6d88"},void 0,!1,{fileName:_l,lineNumber:256,columnNumber:13},this)]},void 0,!0,{fileName:_l,lineNumber:252,columnNumber:11},this)]},void 0,!0,{fileName:_l,lineNumber:180,columnNumber:9},this)},void 0,!1,{fileName:_l,lineNumber:179,columnNumber:7},this)}}var Ol=i(492),Dl=(i(264),"/Users/zhangds/web/blue-brother/frontend/src/pages/system/menu/leftnav/leftnav.js");class El extends m.a.Component{constructor(e){super(e),this.onselect=(e,t)=>{document.querySelectorAll(".leftTree .zent-tree-content").forEach((e=>{e.style.background="#fff"})),t.style.background="#A8C3F0",this.setState({selectdom:e}),this.props.menuInfo(e)},this.onCheck=(e,t)=>{this.setState({checkedKeys:e})},this.state={checkedKeys:[],disabledCheckedKeys:[],selectdom:{},menu_data:[]}}getMenuFn(){let e=this;Object(a.kb)().then((t=>{Object(a.Tb)(t,((t,i)=>{const a=Object(de.a)(t);e.setState({menu_data:a})}))}))}componentWillMount(){this.getMenuFn()}componentWillReceiveProps(e){}render(){const{checkedKeys:e,disabledCheckedKeys:t}=this.state;return Object(h.jsxDEV)("div",{id:"menuLeft",children:Object(h.jsxDEV)(Ol.a,{checkable:!0,size:"small",data:this.state.menu_data,onCheck:this.onCheck,onSelect:this.onselect,checkedKeys:e,disabledCheckedKeys:t},void 0,!1,{fileName:Dl,lineNumber:56,columnNumber:9},this)},void 0,!1,{fileName:Dl,lineNumber:55,columnNumber:7},this)}}var Vl=i(497),kl=(i(265),"/Users/zhangds/web/blue-brother/frontend/src/pages/system/menu/menubody/menubody.js");const Sl=Z.a.Group,wl=Z.a.Button;class Cl extends m.a.Component{constructor(e){super(e),this.typeonChange=e=>{let t=this.state.model;t.level=e.target.value,this.setState({model:t})},this.methodsonChange=e=>{let t=this.state.model;t.method=e.target.value,this.setState({model:t})},this.statusChange=e=>{let t=this.state.model;t.status=e.target.value,this.setState({model:t})},this.authChange=e=>{let t=this.state.model;t.auth=e.target.value,this.setState({model:t})},this.state={model:{title:"",fid:"",url:"",auth:"",sort:"",status:"",icon:"",method:"",level:"",router:""}}}sortChange(e){let t=this.state.model;t.sort=e,this.setState({model:t})}submit(){return this.refs.form1.validator()}cancel(){this.setState({model:{menuname:""}}),this.refs.form1.cancel()}render(){return Object(h.jsxDEV)("div",{id:"menuright",children:Object(h.jsxDEV)(l.a,{model:this.state.model,rules:{menuname:[{type:"required",message:"\u8bf7\u8f93\u5165\u83dc\u5355\u540d\u79f0"}]},ref:"form1",children:[Object(h.jsxDEV)(s.a,{labelname:"\u83dc\u5355\u540d\u79f0",prop:"menuname",id:"menuname",children:Object(h.jsxDEV)(n.a,{onChange:e=>{let t=this.state.model;t.title=e,this.setState({model:t})},onClearItem:e=>{let t=this.state.model;t.title="",this.setState({model:t})},value:this.state.model.title,placeholder:"\u8bf7\u8f93\u5165\u83dc\u5355\u540d\u79f0",labelWidth:"0px",countShow:!1,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:kl,lineNumber:76,columnNumber:13},this)},void 0,!1,{fileName:kl,lineNumber:75,columnNumber:11},this),Object(h.jsxDEV)(s.a,{required:!1,labelname:"\u83dc\u5355\u7c7b\u578b",children:Object(h.jsxDEV)(Sl,{onChange:this.typeonChange,value:this.state.model.level,children:[Object(h.jsxDEV)(wl,{value:"1",children:"\u4e00\u7ea7\u83dc\u5355"},void 0,!1,{fileName:kl,lineNumber:98,columnNumber:15},this),Object(h.jsxDEV)(wl,{value:"5",children:"\u4e8c\u7ea7\u83dc\u5355"},void 0,!1,{fileName:kl,lineNumber:99,columnNumber:15},this),Object(h.jsxDEV)(wl,{value:"10",children:"\u64cd\u4f5c\u6309\u94ae"},void 0,!1,{fileName:kl,lineNumber:100,columnNumber:15},this)]},void 0,!0,{fileName:kl,lineNumber:97,columnNumber:13},this)},void 0,!1,{fileName:kl,lineNumber:96,columnNumber:11},this),Object(h.jsxDEV)(s.a,{required:!1,labelname:"\u8bf7\u6c42\u65b9\u5f0f",children:Object(h.jsxDEV)(Sl,{onChange:this.methodsonChange,value:this.state.model.method,children:[Object(h.jsxDEV)(wl,{value:"1",children:"GET"},void 0,!1,{fileName:kl,lineNumber:106,columnNumber:15},this),Object(h.jsxDEV)(wl,{value:"5",children:"POST"},void 0,!1,{fileName:kl,lineNumber:107,columnNumber:15},this),Object(h.jsxDEV)(wl,{value:"10",children:"PUT"},void 0,!1,{fileName:kl,lineNumber:108,columnNumber:15},this),Object(h.jsxDEV)(wl,{value:"15",children:"DELETE"},void 0,!1,{fileName:kl,lineNumber:109,columnNumber:15},this)]},void 0,!0,{fileName:kl,lineNumber:105,columnNumber:13},this)},void 0,!1,{fileName:kl,lineNumber:104,columnNumber:11},this),Object(h.jsxDEV)(s.a,{required:!1,labelname:"\u662f\u5426\u663e\u793a",children:Object(h.jsxDEV)(Sl,{onChange:this.statusChange,value:this.state.model.status,children:[Object(h.jsxDEV)(wl,{value:"1",children:"\u662f"},void 0,!1,{fileName:kl,lineNumber:114,columnNumber:15},this),Object(h.jsxDEV)(wl,{value:"0",children:"\u5426"},void 0,!1,{fileName:kl,lineNumber:115,columnNumber:15},this)]},void 0,!0,{fileName:kl,lineNumber:113,columnNumber:13},this)},void 0,!1,{fileName:kl,lineNumber:112,columnNumber:11},this),Object(h.jsxDEV)(s.a,{required:!1,labelname:"\u662f\u5426\u9a8c\u8bc1\u767b\u9646",children:Object(h.jsxDEV)(Sl,{onChange:this.authChange,value:this.state.model.auth,children:[Object(h.jsxDEV)(wl,{value:"1",children:"\u662f"},void 0,!1,{fileName:kl,lineNumber:120,columnNumber:15},this),Object(h.jsxDEV)(wl,{value:"0",children:"\u5426"},void 0,!1,{fileName:kl,lineNumber:121,columnNumber:15},this)]},void 0,!0,{fileName:kl,lineNumber:119,columnNumber:13},this)},void 0,!1,{fileName:kl,lineNumber:118,columnNumber:11},this),Object(h.jsxDEV)(s.a,{required:!1,labelname:"\u83dc\u5355\u56fe\u6807",children:Object(h.jsxDEV)(n.a,{onChange:e=>{let t=this.state.model;t.icon=e,this.setState({model:t})},onClearItem:e=>{let t=this.state.model;t.icon="",this.setState({model:t})},value:this.state.model.icon,placeholder:"\u8bf7\u8f93\u5165\u83dc\u5355\u56fe\u6807",labelWidth:"0px",countShow:!1,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:kl,lineNumber:125,columnNumber:13},this)},void 0,!1,{fileName:kl,lineNumber:124,columnNumber:11},this),Object(h.jsxDEV)(s.a,{required:!1,labelname:"\u540e\u7aef\u7c7b\u5e93",children:Object(h.jsxDEV)(n.a,{onChange:e=>{let t=this.state.model;t.url=e,this.setState({model:t})},onClearItem:e=>{let t=this.state.model;t.url="",this.setState({model:t})},value:this.state.model.url,placeholder:"\u8bf7\u8f93\u5165\u540e\u7aef\u7c7b\u5e93",labelWidth:"0px",countShow:!1,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:kl,lineNumber:146,columnNumber:13},this)},void 0,!1,{fileName:kl,lineNumber:145,columnNumber:11},this),Object(h.jsxDEV)(s.a,{required:!1,labelname:"\u524d\u7aef\u8def\u7531",children:Object(h.jsxDEV)(n.a,{onChange:e=>{let t=this.state.model;t.router=e,this.setState({model:t})},onClearItem:e=>{let t=this.state.model;t.router="",this.setState({model:t})},value:this.state.model.router,placeholder:"\u8bf7\u8f93\u5165\u524d\u7aef\u8def\u7531",labelWidth:"0px",countShow:!1,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:kl,lineNumber:167,columnNumber:13},this)},void 0,!1,{fileName:kl,lineNumber:166,columnNumber:11},this),Object(h.jsxDEV)(s.a,{required:!1,labelname:"\u524d\u7aef\u7ec4\u4ef6",children:Object(h.jsxDEV)(n.a,{onChange:e=>{let t=this.state.model;t.component=e,this.setState({model:t})},onClearItem:e=>{let t=this.state.model;t.component="",this.setState({model:t})},value:this.state.model.component,placeholder:"\u8bf7\u8f93\u5165\u524d\u7aef\u7ec4\u4ef6",labelWidth:"0px",countShow:!1,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:kl,lineNumber:188,columnNumber:13},this)},void 0,!1,{fileName:kl,lineNumber:187,columnNumber:11},this),Object(h.jsxDEV)(s.a,{required:!1,labelname:"\u83dc\u5355\u6392\u5e8f",children:Object(h.jsxDEV)(Vl.a,{value:this.state.model.sort,showStepper:!0,onChange:e=>this.sortChange(e),placeholder:"\u8bf7\u8f93\u5165\u6570\u5b57"},void 0,!1,{fileName:kl,lineNumber:209,columnNumber:13},this)},void 0,!1,{fileName:kl,lineNumber:208,columnNumber:11},this)]},void 0,!0,{fileName:kl,lineNumber:74,columnNumber:9},this)},void 0,!1,{fileName:kl,lineNumber:73,columnNumber:7},this)}}i(266);var Tl="/Users/zhangds/web/blue-brother/frontend/src/pages/system/menu/menuright/menuright.js";const Il=Z.a.Group,Fl=Z.a.Button;class Ll extends m.a.Component{constructor(e){super(e),this.typeonChange=e=>{let t=this.state.model;t.level=e.target.value,this.setState({model:t})},this.methodsonChange=e=>{let t=this.state.model;t.method=e.target.value,this.setState({model:t})},this.statusChange=e=>{let t=this.state.model;t.status=e.target.value,this.setState({model:t})},this.authChange=e=>{let t=this.state.model;t.auth=e.target.value,this.setState({model:t})},this.state={model:{title:"",fid:"",url:"",auth:"",sort:"",status:"",icon:"",method:"",level:""},menutype:"",cancelInfo:{},menumethods:""}}sortChange(e){let t=this.state.model;t.sort=e,this.setState({model:t})}modifysubmit(){if(this.refs.form1.validator()){let e=Object(de.a)(this.state.model);delete e.id,G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:"\u662f\u5426\u4fee\u6539\u83dc\u5355\u4fe1\u606f\uff1f"},void 0,!1,{fileName:Tl,lineNumber:70,columnNumber:18},this),onConfirm:()=>{Object(a.Lc)(this.state.model.id,e).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.clear(),c.a.success(t),window.history.go(0)}),(e=>{}))})).catch((e=>{}))},onCancel:this.onCancel,className:"questModal",parentComponent:this})}}resetInfo(){this.setState({model:this.state.cancelInfo}),setTimeout((()=>{c.a.clear(),c.a.success("\u91cd\u7f6e\u6210\u529f")}),500)}cancel(){this.setState({model:{menuname:""}}),this.refs.form1.cancel()}componentWillReceiveProps(e){this.setState({cancelInfo:this.props.menuList})}componentDidUpdate(e,t){if(t.cancelInfo!=this.state.cancelInfo){let e=Object(de.a)(this.state.cancelInfo),t={title:e.title,fid:e.fid,url:e.url,auth:e.auth,sort:e.sort,status:e.status,icon:e.icon,method:e.method,level:e.level,router:e.router,id:e.id};this.setState({model:t})}}render(){return Object(h.jsxDEV)("div",{id:"menuright",children:[Object(h.jsxDEV)("p",{className:"btnlist",children:[Object(h.jsxDEV)(u.a,{type:"primary",onClick:this.modifysubmit.bind(this),children:"\u4fee\u6539\u5e76\u4fdd\u5b58"},void 0,!1,{fileName:Tl,lineNumber:142,columnNumber:11},this),Object(h.jsxDEV)(u.a,{type:"normal",onClick:this.resetInfo.bind(this),children:"\u91cd\u7f6e"},void 0,!1,{fileName:Tl,lineNumber:145,columnNumber:11},this)]},void 0,!0,{fileName:Tl,lineNumber:141,columnNumber:9},this),Object(h.jsxDEV)(l.a,{model:this.state.model,rules:{menuname:[{type:"required",message:"\u8bf7\u8f93\u5165\u83dc\u5355\u540d\u79f0"}]},ref:"form1",children:[Object(h.jsxDEV)(s.a,{labelname:"\u83dc\u5355\u540d\u79f0",prop:"menuname",id:"menuname",children:Object(h.jsxDEV)(n.a,{onChange:e=>{let t=this.state.model;t.title=e,this.setState({model:t})},onClearItem:e=>{let t=this.state.model;t.title="",this.setState({model:t})},value:this.state.model.title,placeholder:"\u8bf7\u8f93\u5165\u83dc\u5355\u540d\u79f0",labelWidth:"0px",countShow:!1,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:Tl,lineNumber:151,columnNumber:13},this)},void 0,!1,{fileName:Tl,lineNumber:150,columnNumber:11},this),Object(h.jsxDEV)(s.a,{required:!1,labelname:"\u83dc\u5355\u7c7b\u578b",children:Object(h.jsxDEV)(Il,{onChange:this.typeonChange,value:this.state.model.level,children:[Object(h.jsxDEV)(Fl,{value:1,children:"\u4e00\u7ea7\u83dc\u5355"},void 0,!1,{fileName:Tl,lineNumber:173,columnNumber:15},this),Object(h.jsxDEV)(Fl,{value:5,children:"\u4e8c\u7ea7\u83dc\u5355"},void 0,!1,{fileName:Tl,lineNumber:174,columnNumber:15},this),Object(h.jsxDEV)(Fl,{value:10,children:"\u64cd\u4f5c\u6309\u94ae"},void 0,!1,{fileName:Tl,lineNumber:175,columnNumber:15},this)]},void 0,!0,{fileName:Tl,lineNumber:172,columnNumber:13},this)},void 0,!1,{fileName:Tl,lineNumber:171,columnNumber:11},this),Object(h.jsxDEV)(s.a,{required:!1,labelname:"\u8bf7\u6c42\u65b9\u5f0f",children:Object(h.jsxDEV)(Il,{onChange:this.methodsonChange,value:this.state.model.method,children:[Object(h.jsxDEV)(Fl,{value:1,children:"GET"},void 0,!1,{fileName:Tl,lineNumber:181,columnNumber:15},this),Object(h.jsxDEV)(Fl,{value:5,children:"POST"},void 0,!1,{fileName:Tl,lineNumber:182,columnNumber:15},this),Object(h.jsxDEV)(Fl,{value:10,children:"PUT"},void 0,!1,{fileName:Tl,lineNumber:183,columnNumber:15},this),Object(h.jsxDEV)(Fl,{value:15,children:"DELETE"},void 0,!1,{fileName:Tl,lineNumber:184,columnNumber:15},this)]},void 0,!0,{fileName:Tl,lineNumber:180,columnNumber:13},this)},void 0,!1,{fileName:Tl,lineNumber:179,columnNumber:11},this),Object(h.jsxDEV)(s.a,{required:!1,labelname:"\u662f\u5426\u663e\u793a",children:Object(h.jsxDEV)(Il,{onChange:this.statusChange,value:this.state.model.status,children:[Object(h.jsxDEV)(Fl,{value:1,children:"\u662f"},void 0,!1,{fileName:Tl,lineNumber:189,columnNumber:15},this),Object(h.jsxDEV)(Fl,{value:0,children:"\u5426"},void 0,!1,{fileName:Tl,lineNumber:190,columnNumber:15},this)]},void 0,!0,{fileName:Tl,lineNumber:188,columnNumber:13},this)},void 0,!1,{fileName:Tl,lineNumber:187,columnNumber:11},this),Object(h.jsxDEV)(s.a,{required:!1,labelname:"\u662f\u5426\u9a8c\u8bc1\u767b\u9646",children:Object(h.jsxDEV)(Il,{onChange:this.authChange,value:this.state.model.auth,children:[Object(h.jsxDEV)(Fl,{value:1,children:"\u662f"},void 0,!1,{fileName:Tl,lineNumber:195,columnNumber:15},this),Object(h.jsxDEV)(Fl,{value:0,children:"\u5426"},void 0,!1,{fileName:Tl,lineNumber:196,columnNumber:15},this)]},void 0,!0,{fileName:Tl,lineNumber:194,columnNumber:13},this)},void 0,!1,{fileName:Tl,lineNumber:193,columnNumber:11},this),Object(h.jsxDEV)(s.a,{required:!1,labelname:"\u83dc\u5355\u56fe\u6807",children:Object(h.jsxDEV)(n.a,{onChange:e=>{let t=this.state.model;t.icon=e,this.setState({model:t})},onClearItem:e=>{let t=this.state.model;t.icon="",this.setState({model:t})},value:this.state.model.icon,placeholder:"\u8bf7\u8f93\u5165\u83dc\u5355\u56fe\u6807",labelWidth:"0px",countShow:!1,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:Tl,lineNumber:200,columnNumber:13},this)},void 0,!1,{fileName:Tl,lineNumber:199,columnNumber:11},this),Object(h.jsxDEV)(s.a,{required:!1,labelname:"\u540e\u7aef\u7c7b\u5e93",children:Object(h.jsxDEV)(n.a,{onChange:e=>{let t=this.state.model;t.url=e,this.setState({model:t})},onClearItem:e=>{let t=this.state.model;t.url="",this.setState({model:t})},value:this.state.model.url,placeholder:"\u8bf7\u8f93\u5165\u540e\u7aef\u7c7b\u5e93",labelWidth:"0px",countShow:!1,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:Tl,lineNumber:221,columnNumber:13},this)},void 0,!1,{fileName:Tl,lineNumber:220,columnNumber:11},this),Object(h.jsxDEV)(s.a,{required:!1,labelname:"\u524d\u7aef\u8def\u7531",children:Object(h.jsxDEV)(n.a,{onChange:e=>{let t=this.state.model;t.router=e,this.setState({model:t})},onClearItem:e=>{let t=this.state.model;t.router="",this.setState({model:t})},value:this.state.model.router,placeholder:"\u8bf7\u8f93\u5165\u524d\u7aef\u8def\u7531",labelWidth:"0px",countShow:!1,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:Tl,lineNumber:242,columnNumber:13},this)},void 0,!1,{fileName:Tl,lineNumber:241,columnNumber:11},this),Object(h.jsxDEV)(s.a,{required:!1,labelname:"\u524d\u7aef\u7ec4\u4ef6",children:Object(h.jsxDEV)(n.a,{onChange:e=>{let t=this.state.model;t.component=e,this.setState({model:t})},onClearItem:e=>{let t=this.state.model;t.component="",this.setState({model:t})},value:this.state.model.component,placeholder:"\u8bf7\u8f93\u5165\u524d\u7aef\u7ec4\u4ef6",labelWidth:"0px",countShow:!1,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:Tl,lineNumber:263,columnNumber:13},this)},void 0,!1,{fileName:Tl,lineNumber:262,columnNumber:11},this),Object(h.jsxDEV)(s.a,{required:!1,labelname:"\u83dc\u5355\u6392\u5e8f",children:Object(h.jsxDEV)(Vl.a,{value:this.state.model.sort,showStepper:!0,onChange:e=>this.sortChange(e),placeholder:"\u8bf7\u8f93\u5165\u6570\u5b57"},void 0,!1,{fileName:Tl,lineNumber:284,columnNumber:13},this)},void 0,!1,{fileName:Tl,lineNumber:283,columnNumber:11},this)]},void 0,!0,{fileName:Tl,lineNumber:149,columnNumber:9},this)]},void 0,!0,{fileName:Tl,lineNumber:140,columnNumber:7},this)}}i(267);var Hl="/Users/zhangds/web/blue-brother/frontend/src/pages/system/menu/main/main.js";class ql extends m.a.Component{constructor(e){super(e),this.setVisible=e=>{this.setState({visible:e})},this.state={visible:!1,dialogtitle:"",selectdom:{},fid:0}}addchildmenu(){let e=this.refs.navitem.state.selectdom;e.id?this.setState({dialogtitle:"\u65b0\u5efa\u5b50\u83dc\u5355",visible:!0,fid:e.id}):(c.a.clear(),c.a.warn("\u8bf7\u5148\u70b9\u51fb\u9009\u62e9\u4e00\u4e2a\u83dc\u5355"))}addmenu(){this.setState({dialogtitle:"\u6dfb\u52a0\u4e00\u7ea7\u83dc\u5355",visible:!0,fid:0})}delmenuBtn(){let e=this.refs.navitem.state.selectdom;e.id?G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:["\u662f\u5426\u5220\u9664",Object(h.jsxDEV)("b",{children:["[",e.title,"]"]},void 0,!0,{fileName:Hl,lineNumber:42,columnNumber:17},this),"\uff1f"]},void 0,!0,{fileName:Hl,lineNumber:41,columnNumber:11},this),onConfirm:()=>{Object(a.v)(e.id).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.clear(),c.a.success(t),window.history.go(0)}),(e=>{}))})).catch((e=>{}))},onCancel:this.onCancel,className:"questModal",parentComponent:this}):(c.a.clear(),c.a.warn("\u8bf7\u5148\u70b9\u51fb\u9009\u62e9\u4e00\u4e2a\u83dc\u5355"))}sureFn(){let e=this.refs.menubody.submit(),t=this;if(e){let e=this.refs.menubody.state.model;e.fid=this.state.fid,Object(a.ic)(e).then((e=>{Object(a.Tb)(e,((e,i)=>{c.a.clear(),c.a.success(i),t.refs.navitem.getMenuFn(),this.setState({visible:!1})}))}))}}getMenuInfo(e){this.setState({selectdom:e})}render(){return Object(h.jsxDEV)("div",{id:"systemMenu",className:"maincenter",children:[Object(h.jsxDEV)(d.a,{style:{width:"100%"},children:Object(h.jsxDEV)("p",{className:"menuBtn",children:[Object(h.jsxDEV)(u.a,{type:"primary",icon:"plus",onClick:this.addchildmenu.bind(this),children:"\u65b0\u5efa\u5b50\u83dc\u5355"},void 0,!1,{fileName:Hl,lineNumber:99,columnNumber:13},this),Object(h.jsxDEV)(u.a,{type:"warn",onClick:this.addmenu.bind(this),children:"\u6dfb\u52a0\u4e00\u7ea7\u83dc\u5355"},void 0,!1,{fileName:Hl,lineNumber:102,columnNumber:13},this),Object(h.jsxDEV)(u.a,{type:"danger",onClick:this.delmenuBtn.bind(this),children:"\u5220\u9664\u83dc\u5355"},void 0,!1,{fileName:Hl,lineNumber:105,columnNumber:13},this)]},void 0,!0,{fileName:Hl,lineNumber:98,columnNumber:11},this)},void 0,!1,{fileName:Hl,lineNumber:97,columnNumber:9},this),Object(h.jsxDEV)("div",{className:"menu-body",children:[Object(h.jsxDEV)(d.a,{className:"leftNav",title:"\u83dc\u5355\u5bfc\u822a",children:Object(h.jsxDEV)("div",{className:"leftTree",children:Object(h.jsxDEV)(El,{ref:"navitem",menuInfo:e=>{this.getMenuInfo(e)}},void 0,!1,{fileName:Hl,lineNumber:113,columnNumber:15},this)},void 0,!1,{fileName:Hl,lineNumber:112,columnNumber:13},this)},void 0,!1,{fileName:Hl,lineNumber:111,columnNumber:11},this),Object(h.jsxDEV)(d.a,{className:"rightmenu",title:"\u83dc\u5355\u8be6\u60c5",children:Object(h.jsxDEV)("div",{className:"leftfrom",children:Object(h.jsxDEV)(Ll,{menuList:this.state.selectdom},void 0,!1,{fileName:Hl,lineNumber:123,columnNumber:15},this)},void 0,!1,{fileName:Hl,lineNumber:122,columnNumber:13},this)},void 0,!1,{fileName:Hl,lineNumber:121,columnNumber:11},this)]},void 0,!0,{fileName:Hl,lineNumber:110,columnNumber:9},this),Object(h.jsxDEV)(ce.a,{style:{width:"50%"},visible:this.state.visible,className:"questModal",onClose:()=>this.setVisible(!1),footer:Object(h.jsxDEV)("p",{children:[Object(h.jsxDEV)(u.a,{onClick:this.sureFn.bind(this),type:"primary",children:"\u786e\u5b9a"},void 0,!1,{fileName:Hl,lineNumber:135,columnNumber:15},this),",",Object(h.jsxDEV)(u.a,{onClick:()=>this.setVisible(!1),children:"\u53d6\u6d88"},void 0,!1,{fileName:Hl,lineNumber:138,columnNumber:16},this)]},void 0,!0,{fileName:Hl,lineNumber:134,columnNumber:13},this),title:this.state.dialogtitle,children:Object(h.jsxDEV)(Cl,{ref:"menubody",fid:this.state.fid},void 0,!1,{fileName:Hl,lineNumber:143,columnNumber:11},this)},void 0,!1,{fileName:Hl,lineNumber:128,columnNumber:9},this)]},void 0,!0,{fileName:Hl,lineNumber:96,columnNumber:7},this)}}i(268);var Ml="/Users/zhangds/web/blue-brother/frontend/src/pages/system/role/tree/tree.js";class Pl extends m.a.Component{constructor(e){super(e),this.onCheck=(e,t)=>{this.setState({checkedKeys:e})},this.state={checkedKeys:[],disabledCheckedKeys:[],menu_data:[],menuList:{}}}getMenuFn(){let e=this;Object(a.kb)().then((t=>{Object(a.Tb)(t,((t,i)=>{const a=t;e.setState({menu_data:a})}))}))}componentWillMount(){this.getMenuFn(),this.setState({checkedKeys:this.props.rules})}render(){const{checkedKeys:e,disabledCheckedKeys:t}=this.state;return Object(h.jsxDEV)("div",{id:"treedom",children:Object(h.jsxDEV)(Ol.a,{checkable:!0,size:"medium",data:this.state.menu_data,onCheck:this.onCheck,checkedKeys:e,disabledCheckedKeys:t},void 0,!1,{fileName:Ml,lineNumber:38,columnNumber:9},this)},void 0,!1,{fileName:Ml,lineNumber:37,columnNumber:7},this)}}i(269);var Bl="/Users/zhangds/web/blue-brother/frontend/src/pages/system/role/add/add.js";class Al extends m.a.Component{constructor(e){super(e),this.authchange=e=>{let t=this.state.model;t.account_type=e.target.value,this.setState({model:t})},this.state={model:{role:"",account_type:5,setrole:[],pagetitle:"\u65b0\u5efa\u89d2\u8272"},enumer:0,menuList:{}}}cancel(){G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:"\u662f\u5426\u53d6\u6d88\u672c\u6b21\u64cd\u4f5c\uff1f"},void 0,!1,{fileName:Bl,lineNumber:29,columnNumber:16},this),onConfirm:()=>{window.location.replace("#/home/system/role-list"),sessionStorage.setItem("pathname2","/home/system/role-list")},onCancel:this.onCancel,className:"questModal",parentComponent:this})}submit(){let e=this.refs.roleform.validator(),t=this;this.refs.roletree.state.checkedKeys?e&&G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:0==t.state.enumer?Object(h.jsxDEV)("p",{children:["\u662f\u5426\u65b0\u589e",Object(h.jsxDEV)("b",{children:["[",t.state.model.role,"]"]},void 0,!0,{fileName:Bl,lineNumber:61,columnNumber:21},this),"\u89d2\u8272\uff1f"]},void 0,!0,{fileName:Bl,lineNumber:60,columnNumber:15},this):Object(h.jsxDEV)("p",{children:"\u662f\u5426\u4fee\u6539\u5f53\u524d\u89d2\u8272\u4fe1\u606f\uff1f"},void 0,!1,{fileName:Bl,lineNumber:64,columnNumber:15},this),onConfirm:()=>{let e={role_name:t.state.model.role,menu_id:this.refs.roletree.state.checkedKeys,account_type:t.state.model.account_type};0==t.state.enumer?Object(a.qc)(e).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.clear(),c.a.success(t),setTimeout((()=>{window.location.replace("#/home/system/role-list")}),1e3)}),(e=>{c.a.error(e)}))})).catch((e=>{})):Object(a.zc)(t.state.menuList.id,e).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.clear(),c.a.success(t),setTimeout((()=>{window.location.replace("#/home/system/role-list")}),1e3)}),(e=>{c.a.error(e)}))})).catch((e=>{}))},onCancel:this.onCancel,className:"questModal",parentComponent:this}):(c.a.clear(),c.a.error("\u8bf7\u81f3\u5c11\u9009\u4e2d\u4e00\u4e2a\u6a21\u5757\u6743\u9650"))}componentWillMount(){let e=JSON.parse(sessionStorage.getItem("breaknav"))[0].pagetitle,t=e.includes("\u65b0\u5efa")?0:1;if(this.setState({pagetitle:e+"\u89d2\u8272",enumer:t}),1==t){let e=JSON.parse(sessionStorage.getItem("dataInfo")),t={};t.role=e.role_name,t.account_type=e.account_type,this.setState({menuList:e,model:t})}}render(){return Object(h.jsxDEV)("div",{id:"addrole",className:"maincenter",children:[Object(h.jsxDEV)("p",{className:"title"},void 0,!1,{fileName:Bl,lineNumber:138,columnNumber:9},this),Object(h.jsxDEV)(d.a,{style:{width:"100%"},title:this.state.pagetitle,children:Object(h.jsxDEV)(l.a,{model:this.state.model,rules:{role:[{type:"required",message:"\u8bf7\u8f93\u5165\u89d2\u8272\u540d"}]},ref:"roleform",className:"addform",children:[Object(h.jsxDEV)(s.a,{labelname:"\u89d2\u8272\u540d",prop:"role",id:"role",children:Object(h.jsxDEV)(n.a,{onChange:e=>{let t=this.state.model;t.role=e,this.setState({model:t})},onClearItem:e=>{let t=this.state.model;t.role="",this.setState({model:t})},value:this.state.model.role,placeholder:"\u8bf7\u8f93\u5165\u89d2\u8272",labelWidth:"0px",maxLength:12,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:Bl,lineNumber:142,columnNumber:15},this)},void 0,!1,{fileName:Bl,lineNumber:141,columnNumber:13},this),Object(h.jsxDEV)(s.a,{labelname:"\u6570\u636e\u6743\u9650\u5206\u7ec4",children:Object(h.jsxDEV)(Q.a,{onChange:this.authchange,value:this.state.model.account_type,children:[Object(h.jsxDEV)(ne.a,{value:1,children:"\u6240\u6709\u6570\u636e"},void 0,!1,{fileName:Bl,lineNumber:164,columnNumber:17},this),Object(h.jsxDEV)(ne.a,{value:5,children:"\u8be5\u8d26\u53f7\u6570\u636e"},void 0,!1,{fileName:Bl,lineNumber:165,columnNumber:17},this)]},void 0,!0,{fileName:Bl,lineNumber:163,columnNumber:15},this)},void 0,!1,{fileName:Bl,lineNumber:162,columnNumber:13},this),Object(h.jsxDEV)(s.a,{labelname:"\u8bbe\u7f6e\u6743\u9650",prop:"setrole",id:"setrole",children:Object(h.jsxDEV)(Pl,{ref:"roletree",rules:this.state.menuList.rule_id},void 0,!1,{fileName:Bl,lineNumber:169,columnNumber:15},this)},void 0,!1,{fileName:Bl,lineNumber:168,columnNumber:13},this)]},void 0,!0,{fileName:Bl,lineNumber:140,columnNumber:11},this)},void 0,!1,{fileName:Bl,lineNumber:139,columnNumber:9},this),Object(h.jsxDEV)("p",{className:"btnlist",children:[Object(h.jsxDEV)(u.a,{type:"primary",onClick:this.submit.bind(this),children:"\u63d0\u4ea4"},void 0,!1,{fileName:Bl,lineNumber:174,columnNumber:11},this),Object(h.jsxDEV)(u.a,{type:"normal",onClick:this.cancel.bind(this),children:"\u53d6\u6d88"},void 0,!1,{fileName:Bl,lineNumber:177,columnNumber:11},this)]},void 0,!0,{fileName:Bl,lineNumber:173,columnNumber:9},this)]},void 0,!0,{fileName:Bl,lineNumber:137,columnNumber:7},this)}}i(270);var zl="/Users/zhangds/web/blue-brother/frontend/src/pages/system/role/list/list.js";const Jl=[{title:"\u89d2\u8272\u540d",name:"role_name",width:"40%",prop:"role_name",type:"normal"},{title:"\u521b\u5efa\u65f6\u95f4",width:"40%",prop:"create_time",name:"create_time",type:"normal"},{title:"\u64cd\u4f5c",name:"opearo",width:"20%",prop:"opearo",type:"slot"}];class Ul extends m.a.Component{constructor(e){super(e),this.onChange=e=>{this.setState(e)},this.state={roleList:[],tabList:[{title:"\u89d2\u8272\u7ba1\u7406"}],tableHeight:600,page:1,limit:10,total:0}}getRoleFn(){let e=this,{page:t,limit:i}=e.state,s={page:t,limit:i};Object(a.yb)(s).then((t=>{Object(a.Tb)(t,((t,i)=>{const a=t.data,{total:s}=t;e.setState({roleList:a,total:s})}))}))}pageChange(e){this.setState({page:e}),setTimeout((()=>{this.getRoleFn()}),10)}countChange(e){this.setState({page:1,limit:e}),setTimeout((()=>{this.getRoleFn()}),10)}componentWillMount(){this.setState({tableHeight:window.innerHeight-390}),this.getRoleFn()}clickFn(){sessionStorage.setItem("pathname2","/home/system/role-add");sessionStorage.setItem("breaknav",JSON.stringify([{pagetitle:"\u65b0\u5efa",items:[{path:"/home/system/role-list",name:"\u89d2\u8272\u7ba1\u7406"},{path:"/home/system/role-add",name:"\u65b0\u5efa\u89d2\u8272"}]}])),window.open("#/home/system/role-add")}editFn(e,t){sessionStorage.setItem("pathname2","/home/system/role-add");sessionStorage.setItem("breaknav",JSON.stringify([{pagetitle:"\u7f16\u8f91",items:[{path:"/home/system/role-list",name:"\u89d2\u8272\u7ba1\u7406"},{path:"/home/system/role-add",name:"\u7f16\u8f91\u89d2\u8272"}]}])),sessionStorage.setItem("dataInfo",JSON.stringify(t)),window.open("#/home/system/role-add")}delFn(e,t){let i=this;G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:["\u662f\u5426\u5220\u9664",Object(h.jsxDEV)("b",{children:["[",t.role_name,"]"]},void 0,!0,{fileName:zl,lineNumber:132,columnNumber:15},this),"\uff1f"]},void 0,!0,{fileName:zl,lineNumber:131,columnNumber:9},this),onConfirm:()=>{Object(a.x)(t.id).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.clear(),c.a.success(t),i.getRoleFn()}),(e=>{c.a.error(e)}))})).catch((e=>{}))},onCancel:this.onCancel,className:"questModal",parentComponent:this})}render(){return Object(h.jsxDEV)("div",{id:"rolelist",children:Object(h.jsxDEV)(Ft,{tabs:this.state.tabList,children:[Object(h.jsxDEV)("p",{className:"roletable",children:Object(h.jsxDEV)(u.a,{type:"primary",icon:"plus",onClick:this.clickFn.bind(this),children:"\u65b0\u5efa\u89d2\u8272"},void 0,!1,{fileName:zl,lineNumber:162,columnNumber:13},this)},void 0,!1,{fileName:zl,lineNumber:161,columnNumber:11},this),Object(h.jsxDEV)("div",{className:"table-container",children:Object(h.jsxDEV)(I,{spliteColor:"#fff",tableData:this.state.roleList,Column:Jl,dataCount:this.state.total,isMultiple:!1,countbarVisible:!1,isSwitch:!1,maxheight:this.state.tableHeight,pageChange:e=>{this.pageChange(e)},countChange:e=>{this.countChange(e)},checkChange:e=>{},ComponentHandler:(e,t)=>"name"==e?Object(h.jsxDEV)(v.a,{size:"small",checked:!0},void 0,!1,{fileName:zl,lineNumber:185,columnNumber:26},this):"opearo"==e?Object(h.jsxDEV)("span",{children:[Object(h.jsxDEV)("span",{className:"grid-link",onClick:e=>this.editFn(e,t),children:"\u7f16\u8f91"},void 0,!1,{fileName:zl,lineNumber:191,columnNumber:23},this),Object(h.jsxDEV)("span",{className:"grid-link",onClick:e=>this.delFn(e,t),children:"\u5220\u9664"},void 0,!1,{fileName:zl,lineNumber:194,columnNumber:23},this)]},void 0,!0,{fileName:zl,lineNumber:190,columnNumber:21},this):void 0},void 0,!1,{fileName:zl,lineNumber:167,columnNumber:13},this)},void 0,!1,{fileName:zl,lineNumber:166,columnNumber:11},this)]},void 0,!0,{fileName:zl,lineNumber:160,columnNumber:9},this)},void 0,!1,{fileName:zl,lineNumber:159,columnNumber:7},this)}}var Wl=i(479),Rl=(i(271),"/Users/zhangds/web/blue-brother/frontend/src/pages/system/station/main.js");class Kl extends m.a.Component{constructor(e){super(e),window.mystation=this,this.state={companyBtn:!0,departmentBtn:!0,postBtn:!0,editId:0,visible:!1,company:[],company_id:1,companyName:1,departmentData:[],departmentName:1,department_id:1,opertip:"\u7f16\u8f91",post:[],jobName:"",visibleId:"",vistype:""},this.addItem=this.addItem.bind(this),this.changeval=this.changeval.bind(this),this.delbtnFn=this.delbtnFn.bind(this),this.editbtnFn=this.editbtnFn.bind(this),this.savebtnFn=this.savebtnFn.bind(this),this.cancelbtnFn=this.cancelbtnFn.bind(this)}saveFn(e,t){"\u53d6\u6d88"==e.innerHTML?("\u516c\u53f8"==t?(this.setState({companyBtn:!0,companyName:1}),this.getCompanyFn(),this.getDepartmentFn(this.state.companyName)):"\u90e8\u95e8"==t?(this.setState({departmentBtn:!0}),this.getDepartmentFn(this.state.companyName),this.state.departmentName&&this.getDepartmentJobFn(this.state.departmentName)):"\u5c97\u4f4d"==t&&this.setState({postBtn:!0}),e.parentNode.parentNode.remove()):this.setState({visible:!0})}getCompanyFn(){let e=this;Object(a.V)().then((t=>{Object(a.Tb)(t,((t,i)=>{e.setState({company:t})}),(e=>{c.a.error(e)}))})).catch((e=>{}))}getDepartmentFn(e){let t=this;Object(a.Y)({company_id:e}).then((e=>{Object(a.Tb)(e,((e,i)=>{t.setState({departmentData:e}),t.setState({departmentName:e[0].id}),t.getDepartmentJobFn(e[0].id)}),(e=>{c.a.error(e)}))})).catch((e=>{}))}getDepartmentJobFn(e){let t=this;Object(a.Z)({department_id:e}).then((e=>{Object(a.Tb)(e,((e,i)=>{t.setState({post:e})}),(e=>{c.a.error(e)}))})).catch((e=>{}))}editFn(e,t){let i=this,s=null;if("\u516c\u53f8"==t?s="companyBtn":"\u90e8\u95e8"==t?s="departmentBtn":"\u5c97\u4f4d"==t&&(s="postBtn"),e.parentNode.parentNode.children[0].value){let l=e.parentNode.parentNode.children[0].value;if("\u4fdd\u5b58"==e.innerHTML){if(e.parentNode.parentNode.className=s+" newitem","\u516c\u53f8"==t){let t={company_name:l};Object(a.gc)(t).then((t=>{Object(a.Tb)(t,((t,a)=>{c.a.clear(),c.a.success(a),i.getCompanyFn(),e.parentNode.parentNode.remove(),i.setState({companyBtn:!0})}),(e=>{c.a.error(e)}))})).catch((e=>{}))}else if("\u90e8\u95e8"==t){if(!this.state.companyName)return c.a.clear(),c.a.error("\u8bf7\u9009\u62e9\u5f52\u5c5e\u516c\u53f8"),!1;let t={department_name:l,company_id:this.state.companyName};Object(a.kc)(t).then((t=>{Object(a.Tb)(t,((t,a)=>{c.a.clear(),c.a.success(a),i.getDepartmentFn(i.state.companyName),e.parentNode.parentNode.remove(),i.setState({departmentBtn:!0})}),(e=>{c.a.error(e)}))})).catch((e=>{}))}else if("\u5c97\u4f4d"==t){if(!this.state.departmentName)return c.a.clear(),c.a.error("\u8bf7\u9009\u62e9\u5f52\u5c5e\u90e8\u95e8"),!1;let t={job_name:l,department_id:this.state.departmentName};Object(a.mc)(t).then((t=>{Object(a.Tb)(t,((t,a)=>{c.a.clear(),c.a.success(a),i.getDepartmentJobFn(i.state.departmentName),e.parentNode.parentNode.remove(),i.setState({postBtn:!0})}),(e=>{c.a.error(e)}))})).catch((e=>{}))}}else e.parentNode.parentNode.children[0].disabled="",e.parentNode.parentNode.children[0].focus(),e.parentNode.parentNode.className="newitem focusactive",e.innerHTML="\u4fdd\u5b58","\u516c\u53f8"==t?this.setState({companyBtn:!1}):"\u90e8\u95e8"==t?this.setState({departmentBtn:!1}):"\u5c97\u4f4d"==t&&this.setState({postBtn:!1})}else c.a.clear(),c.a.error(`\u8bf7\u586b\u5165${t}\u540d\u79f0`),e.parentNode.parentNode.children[0].focus()}hasVal(e,t){return Object(oi.a)(e,(e=>e.id==t))}sureFn(e,t,i){let s=this;if(e.target.value&&13==e.keyCode){let l=null;if("\u516c\u53f8"==i?l="companyBtn":"\u90e8\u95e8"==i?l="departmentBtn":"\u5c97\u4f4d"==i&&(l="postBtn"),t.parentNode.className=l+" newitem","\u516c\u53f8"==i){let i={company_name:e.target.value};Object(a.gc)(i).then((e=>{Object(a.Tb)(e,((e,i)=>{c.a.clear(),c.a.success(i),s.getCompanyFn(),t.parentNode.remove(),s.setState({companyBtn:!0})}),(e=>{c.a.error(e)}))})).catch((e=>{}))}else if("\u90e8\u95e8"==i){let i={department_name:e.target.value,company_id:this.state.companyName};Object(a.kc)(i).then((e=>{Object(a.Tb)(e,((e,i)=>{c.a.clear(),c.a.success(i),s.getDepartmentFn(s.state.companyName),t.parentNode.remove(),s.setState({departmentBtn:!0})}),(e=>{c.a.error(e)}))})).catch((e=>{}))}else if("\u5c97\u4f4d"==i){let i={job_name:e.target.value,department_id:this.state.departmentName};Object(a.mc)(i).then((e=>{Object(a.Tb)(e,((e,i)=>{c.a.clear(),c.a.success(i),s.getDepartmentJobFn(s.state.departmentName),t.parentNode.remove(),s.setState({postBtn:!0})}),(e=>{c.a.error(e)}))})).catch((e=>{}))}}}itemClick(e,t,i){if(!(!this.state.companyBtn|!this.state.departmentBtn|!this.state.postBtn))if(this.setState({vistype:i}),"\u516c\u53f8"==i){if(!this.state.companyBtn)return!1;this.setState({companyName:t.id}),this.setState({departmentData:[]}),this.setState({post:[]}),this.getDepartmentFn(t.id)}else if("\u90e8\u95e8"==i){if(!this.state.departmentBtn)return!1;this.setState({departmentName:t.id}),this.getDepartmentJobFn(t.id)}else if("\u5c97\u4f4d"==i){if(!this.state.postBtn)return!1;this.setState({jobName:t.id})}}delbtnFn(e,t,i){let s=this,l=null,n=t.id;this.setState({vistype:i}),l="\u516c\u53f8"==i?t.company_name:"\u90e8\u95e8"==i?t.department_name:t.job_name,G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:["\u662f\u5426\u5220\u9664",Object(h.jsxDEV)("b",{children:["[",l,"]"]},void 0,!0,{fileName:Rl,lineNumber:376,columnNumber:15},this),"\uff1f"]},void 0,!0,{fileName:Rl,lineNumber:375,columnNumber:9},this),onConfirm:()=>{"\u516c\u53f8"==i?Object(a.r)(n).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.clear(),c.a.success(t),s.getCompanyFn()}),(e=>{c.a.error(e)}))})).catch((e=>{})):"\u90e8\u95e8"==i?Object(a.t)(n).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.clear(),c.a.success(t),s.getDepartmentFn(s.state.companyName)}),(e=>{c.a.error(e)}))})).catch((e=>{})):Object(a.u)(n).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.clear(),c.a.success(t),s.getDepartmentJobFn(s.state.departmentName)}),(e=>{c.a.error(e)}))})).catch((e=>{}))},onCancel:this.onCancel,className:"questModal",parentComponent:this})}savebtnFn(e,t,i){let s=this,l=t.id;this.setState({vistype:i}),G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:"\u662f\u5426\u66f4\u6539\u6b64\u6570\u636e\u540d\u79f0\uff1f"},void 0,!1,{fileName:Rl,lineNumber:445,columnNumber:16},this),onConfirm:()=>{"\u516c\u53f8"==i?Object(a.hc)(l,{company_name:t.company_name}).then((e=>{Object(a.Tb)(e,((e,t)=>{s.setState({visibleId:"",opertip:"\u53d6\u6d88"}),c.a.clear(),c.a.success(t),s.getCompanyFn(),s.setState({companyBtn:!0})}),(e=>{c.a.error(e)}))})).catch((e=>{})):"\u90e8\u95e8"==i?Object(a.lc)(l,{department_name:t.department_name}).then((e=>{Object(a.Tb)(e,((e,t)=>{s.setState({visibleId:"",opertip:"\u53d6\u6d88"}),c.a.clear(),c.a.success(t),s.getDepartmentFn(s.state.companyName),s.setState({departmentBtn:!0})}),(e=>{c.a.error(e)}))})).catch((e=>{})):Object(a.nc)(l,{job_name:t.job_name}).then((e=>{Object(a.Tb)(e,((e,t)=>{s.setState({visibleId:"",opertip:"\u53d6\u6d88"}),s.getDepartmentJobFn(s.state.departmentName)}),(e=>{c.a.error(e)}))})).catch((e=>{}))},onCancel:this.onCancel,className:"questModal",parentComponent:this})}cancelbtnFn(e,t,i){this.setState({visibleId:""}),this.setState({opertip:"\u53d6\u6d88"}),"\u516c\u53f8"==i?(this.getCompanyFn(),this.setState({companyBtn:!0})):"\u90e8\u95e8"==i?(this.getDepartmentFn(this.state.companyName),this.setState({departmentBtn:!0})):(this.getDepartmentJobFn(this.state.departmentName),this.setState({postBtn:!0}))}editbtnFn(e,t,i){let a=null,s=t.id;this.setState({opertip:"\u7f16\u8f91",vistype:i,visibleId:s}),"\u516c\u53f8"==i?(a=t.company_name,this.setState({visibletip:a,companyBtn:!1,companyName:t.id}),this.state.companyName==s&&e.target.parentNode.parentNode.children[0].focus()):"\u90e8\u95e8"==i?(a=t.department_name,this.setState({visibletip:a,departmentBtn:!1,departmentName:t.id}),this.state.departmentName==s&&e.target.parentNode.parentNode.children[0].focus()):(a=t.job_name,this.setState({visibletip:a,postBtn:!1,jobName:t.id}),this.state.jobName==s&&e.target.parentNode.parentNode.children[0].focus())}changeval(e,t,i){let a=null;if("\u516c\u53f8"==i){a=this.hasVal(this.state.company,t.id);let i=Object(Wl.a)(this.state.company,[]);-1!=a&&(i[a].company_name=e.target.value,this.setState({company:i}))}else if("\u90e8\u95e8"==i){a=this.hasVal(this.state.departmentData,t.id);let i=Object(Wl.a)(this.state.departmentData,[]);-1!=a&&(i[a].department_name=e.target.value,this.setState({departmentData:i}))}else{a=this.hasVal(this.state.post,t.id);let i=Object(Wl.a)(this.state.post,[]);-1!=a&&(i[a].job_name=e.target.value,this.setState({post:i}))}}addItem(e,t){let i=null,a=null;if("companyBtn"==t)i=this.state.companyBtn,a="\u516c\u53f8",this.setState({departmentData:[]}),this.setState({post:[]}),this.setState({companyName:null});else if("departmentBtn"==t){if(i=this.state.departmentBtn,a="\u90e8\u95e8",this.setState({post:[]}),this.setState({departmentName:null}),!this.state.companyName)return c.a.clear(),void c.a.warn("\u8bf7\u5148\u8865\u5168\u516c\u53f8\u4fe1\u606f\uff01")}else if("postBtn"==t&&(i=this.state.postBtn,a="\u5c97\u4f4d",!this.state.departmentName))return c.a.clear(),void c.a.warn("\u8bf7\u5148\u8865\u5168\u5f52\u5c5e\u90e8\u95e8\u4fe1\u606f\uff01");if(i){if("\u5c97\u4f4d"==a&&this.state.departmentData.length<1)return c.a.clear(),c.a.warn("\u8bf7\u5148\u521b\u5efa\u90e8\u95e8\uff01"),!1;let i=e.target.nextSibling,s=document.createElement("div");s.className=t+" newitem",s.innerHTML=`\n \n

\u53d6\u6d88\u4fdd\u5b58

\n `,i.appendChild(s),"companyBtn"==t?this.setState({companyBtn:!1}):"departmentBtn"==t?this.setState({departmentBtn:!1}):"postBtn"==t&&this.setState({postBtn:!1}),i.children[0].className="newitem focusactive"}else c.a.clear(),c.a.warn(`\u8bf7\u5148\u64cd\u4f5c\u65b0\u589e\u7684${a}\u540d`)}componentWillMount(){this.getCompanyFn(),this.getDepartmentFn(this.state.companyName)}render(){const{current:e,pageSize:t}=this.state;return Object(h.jsxDEV)("div",{id:"station",className:"maincenter",children:Object(h.jsxDEV)(d.a,{style:{width:"100%"},title:"\u5c97\u4f4d\u5217\u8868",children:Object(h.jsxDEV)("div",{className:"cardtable",children:[Object(h.jsxDEV)(d.a,{type:"nested",title:"\u516c\u53f8",className:"carditem",children:Object(h.jsxDEV)("div",{children:[Object(h.jsxDEV)("p",{className:"newadd",onClick:e=>this.addItem(e,"companyBtn"),children:"+\u65b0\u5efa\u516c\u53f8"},void 0,!1,{fileName:Rl,lineNumber:649,columnNumber:17},this),Object(h.jsxDEV)("div",{className:"addList"},void 0,!1,{fileName:Rl,lineNumber:652,columnNumber:17},this),Object(h.jsxDEV)("div",{className:"addList",children:this.state.company.length>0?this.state.company.map(((e,t)=>Object(h.jsxDEV)("div",{className:e.id==this.state.companyName?"selected newitem companyBtn":"newitem companyBtn",onClick:t=>this.itemClick(t,e,"\u516c\u53f8"),children:[Object(h.jsxDEV)("input",{value:e.company_name,maxLength:"20",disabled:!(e.id==this.state.visibleId&&"\u7f16\u8f91"==this.state.opertip&&"\u516c\u53f8"==this.state.vistype),onChange:t=>this.changeval(t,e,"\u516c\u53f8")},void 0,!1,{fileName:Rl,lineNumber:666,columnNumber:27},this),e.id==this.state.visibleId&&"\u7f16\u8f91"==this.state.opertip&&"\u516c\u53f8"==this.state.vistype?Object(h.jsxDEV)("p",{children:[Object(h.jsxDEV)("span",{className:"del ",onClick:t=>this.cancelbtnFn(t,e,"\u516c\u53f8"),children:"\u53d6\u6d88"},void 0,!1,{fileName:Rl,lineNumber:682,columnNumber:31},this),Object(h.jsxDEV)("span",{className:"operation ",onClick:t=>this.savebtnFn(t,e,"\u516c\u53f8"),children:"\u4fdd\u5b58"},void 0,!1,{fileName:Rl,lineNumber:689,columnNumber:31},this)]},void 0,!0,{fileName:Rl,lineNumber:681,columnNumber:29},this):Object(h.jsxDEV)("p",{children:[1!=e.id?Object(h.jsxDEV)("span",{className:"del ",onClick:t=>this.delbtnFn(t,e,"\u516c\u53f8"),children:"\u5220\u9664"},void 0,!1,{fileName:Rl,lineNumber:700,columnNumber:33},this):null,Object(h.jsxDEV)("span",{className:"operation ",onClick:t=>this.editbtnFn(t,e,"\u516c\u53f8"),children:"\u7f16\u8f91"},void 0,!1,{fileName:Rl,lineNumber:708,columnNumber:31},this)]},void 0,!0,{fileName:Rl,lineNumber:698,columnNumber:29},this)]},t,!0,{fileName:Rl,lineNumber:657,columnNumber:25},this))):Object(h.jsxDEV)("div",{className:"nullempty",children:"\u6682\u65e0\u6570\u636e\uff0c\u8bf7\u6dfb\u52a0\u5427\uff01"},void 0,!1,{fileName:Rl,lineNumber:721,columnNumber:21},this)},void 0,!1,{fileName:Rl,lineNumber:653,columnNumber:17},this)]},void 0,!0,{fileName:Rl,lineNumber:648,columnNumber:15},this)},void 0,!1,{fileName:Rl,lineNumber:647,columnNumber:13},this),Object(h.jsxDEV)(d.a,{type:"nested",title:"\u90e8\u95e8",className:"carditem",children:Object(h.jsxDEV)("div",{children:[Object(h.jsxDEV)("p",{className:"newadd",onClick:e=>this.addItem(e,"departmentBtn"),children:"+\u65b0\u5efa\u90e8\u95e8"},void 0,!1,{fileName:Rl,lineNumber:728,columnNumber:17},this),Object(h.jsxDEV)("div",{className:"addList"},void 0,!1,{fileName:Rl,lineNumber:731,columnNumber:17},this),Object(h.jsxDEV)("div",{className:"addList",children:this.state.departmentData.length>0?this.state.departmentData.map(((e,t)=>Object(h.jsxDEV)("div",{className:e.id==this.state.departmentName?"selected newitem departmentBtn":"newitem departmentBtn",onClick:t=>this.itemClick(t,e,"\u90e8\u95e8"),children:[Object(h.jsxDEV)("input",{value:e.department_name,maxLength:"20",disabled:!(e.id==this.state.visibleId&&"\u7f16\u8f91"==this.state.opertip&&"\u90e8\u95e8"==this.state.vistype),onChange:t=>this.changeval(t,e,"\u90e8\u95e8")},void 0,!1,{fileName:Rl,lineNumber:745,columnNumber:27},this),e.id==this.state.visibleId&&"\u7f16\u8f91"==this.state.opertip&&"\u90e8\u95e8"==this.state.vistype?Object(h.jsxDEV)("p",{children:[Object(h.jsxDEV)("span",{className:"del ",onClick:t=>this.cancelbtnFn(t,e,"\u90e8\u95e8"),children:"\u53d6\u6d88"},void 0,!1,{fileName:Rl,lineNumber:761,columnNumber:31},this),Object(h.jsxDEV)("span",{className:"operation ",onClick:t=>this.savebtnFn(t,e,"\u90e8\u95e8"),children:"\u4fdd\u5b58"},void 0,!1,{fileName:Rl,lineNumber:768,columnNumber:31},this)]},void 0,!0,{fileName:Rl,lineNumber:760,columnNumber:29},this):Object(h.jsxDEV)("p",{children:[Object(h.jsxDEV)("span",{className:"del ",onClick:t=>this.delbtnFn(t,e,"\u90e8\u95e8"),children:"\u5220\u9664"},void 0,!1,{fileName:Rl,lineNumber:778,columnNumber:31},this),Object(h.jsxDEV)("span",{className:"operation ",onClick:t=>this.editbtnFn(t,e,"\u90e8\u95e8"),children:"\u7f16\u8f91"},void 0,!1,{fileName:Rl,lineNumber:785,columnNumber:31},this)]},void 0,!0,{fileName:Rl,lineNumber:777,columnNumber:29},this)]},t,!0,{fileName:Rl,lineNumber:736,columnNumber:25},this))):this.state.departmentName?Object(h.jsxDEV)("div",{className:"nullempty",children:"\u6682\u65e0\u6570\u636e\uff0c\u8bf7\u6dfb\u52a0\u5427\uff01"},void 0,!1,{fileName:Rl,lineNumber:798,columnNumber:21},this):null},void 0,!1,{fileName:Rl,lineNumber:732,columnNumber:17},this)]},void 0,!0,{fileName:Rl,lineNumber:727,columnNumber:15},this)},void 0,!1,{fileName:Rl,lineNumber:726,columnNumber:13},this),Object(h.jsxDEV)(d.a,{type:"nested",title:"\u5c97\u4f4d",className:"carditem",children:Object(h.jsxDEV)("div",{children:[Object(h.jsxDEV)("p",{className:"newadd",onClick:e=>this.addItem(e,"postBtn"),children:"+\u65b0\u5efa\u5c97\u4f4d"},void 0,!1,{fileName:Rl,lineNumber:805,columnNumber:17},this),Object(h.jsxDEV)("div",{className:"addList"},void 0,!1,{fileName:Rl,lineNumber:808,columnNumber:17},this),Object(h.jsxDEV)("div",{className:"addList",children:this.state.post.length>0?this.state.post.map(((e,t)=>Object(h.jsxDEV)("div",{className:e.id==this.state.jobName?"selected newitem postBtn":"newitem postBtn",onClick:t=>this.itemClick(t,e,"\u5c97\u4f4d"),children:[Object(h.jsxDEV)("input",{value:e.job_name,maxLength:"20",disabled:!(e.id==this.state.visibleId&&"\u7f16\u8f91"==this.state.opertip&&"\u5c97\u4f4d"==this.state.vistype),onChange:t=>this.changeval(t,e,"\u5c97\u4f4d")},void 0,!1,{fileName:Rl,lineNumber:821,columnNumber:27},this),e.id==this.state.visibleId&&"\u7f16\u8f91"==this.state.opertip&&"\u5c97\u4f4d"==this.state.vistype?Object(h.jsxDEV)("p",{children:[Object(h.jsxDEV)("span",{className:"del ",onClick:t=>this.cancelbtnFn(t,e,"\u5c97\u4f4d"),children:"\u53d6\u6d88"},void 0,!1,{fileName:Rl,lineNumber:837,columnNumber:31},this),Object(h.jsxDEV)("span",{className:"operation ",onClick:t=>this.savebtnFn(t,e,"\u5c97\u4f4d"),children:"\u4fdd\u5b58"},void 0,!1,{fileName:Rl,lineNumber:844,columnNumber:31},this)]},void 0,!0,{fileName:Rl,lineNumber:836,columnNumber:29},this):Object(h.jsxDEV)("p",{children:[Object(h.jsxDEV)("span",{className:"del ",onClick:t=>this.delbtnFn(t,e,"\u5c97\u4f4d"),children:"\u5220\u9664"},void 0,!1,{fileName:Rl,lineNumber:854,columnNumber:31},this),Object(h.jsxDEV)("span",{className:"operation ",onClick:t=>this.editbtnFn(t,e,"\u5c97\u4f4d"),children:"\u7f16\u8f91"},void 0,!1,{fileName:Rl,lineNumber:861,columnNumber:31},this)]},void 0,!0,{fileName:Rl,lineNumber:853,columnNumber:29},this)]},void 0,!0,{fileName:Rl,lineNumber:813,columnNumber:25},this))):Object(h.jsxDEV)("div",{className:"nullempty",children:"\u6682\u65e0\u6570\u636e\uff0c\u8bf7\u6dfb\u52a0\u5427\uff01"},void 0,!1,{fileName:Rl,lineNumber:874,columnNumber:21},this)},void 0,!1,{fileName:Rl,lineNumber:809,columnNumber:17},this)]},void 0,!0,{fileName:Rl,lineNumber:804,columnNumber:15},this)},void 0,!1,{fileName:Rl,lineNumber:803,columnNumber:13},this)]},void 0,!0,{fileName:Rl,lineNumber:646,columnNumber:11},this)},void 0,!1,{fileName:Rl,lineNumber:645,columnNumber:9},this)},void 0,!1,{fileName:Rl,lineNumber:644,columnNumber:7},this)}}i(272);var Yl="/Users/zhangds/web/blue-brother/frontend/src/pages/system/subAccount/add/adduserinfo/tree.js";class $l extends m.a.Component{constructor(e){super(e),this.onCheck=(e,t)=>{this.setState({checkedKeys:e}),t.top.length==this.state.menu_data.length&&0!=t.top.length?this.setState({checked:!0}):this.setState({checked:!1})},this.handleChange=e=>{let t=[];e.target.checked&&this.state.menu_data.forEach((e=>{t.push(e.id),e.children&&e.children.forEach((e=>{t.push(e.id),e.children&&e.children.forEach((e=>{t.push(e.id)}))}))})),this.setState({checked:e.target.checked,checkedKeys:t})},this.state={checkedKeys:[],disabledCheckedKeys:[],menu_data:[],menuList:{},checkLength:"",checked:!1}}getMenuFn(){let e=this,t=sessionStorage.getItem("subaid");Object(a.Qb)(t).then((t=>{Object(a.Tb)(t,((t,i)=>{const a=t.filter((e=>e.children.length>0));if(0==e.props.enum){e.setState({checked:!0});let t=[];a.forEach((e=>{t.push(e.id),e.children&&e.children.forEach((e=>{t.push(e.id),e.children&&e.children.forEach((e=>{t.push(e.id)}))}))})),e.setState({checkedKeys:t})}else e.setState({checked:!0}),a.forEach((t=>{if(-1==e.props.rules.indexOf(t.id))return e.setState({checked:!1}),!1})),e.setState({checkedKeys:e.props.rules});e.setState({menu_data:a})}))}))}componentWillMount(){this.getMenuFn()}render(){const{checkedKeys:e,disabledCheckedKeys:t}=this.state;return Object(h.jsxDEV)("div",{id:"treedom",children:[Object(h.jsxDEV)("div",{className:"role-tips",children:[Object(h.jsxDEV)("span",{children:"\u89d2\u8272\u6743\u9650\uff08\u5c06\u4f1a\u5728\u76ee\u524d\u767b\u5f55\u8d26\u53f7\u7ba1\u7406\u8303\u56f4\u5185\u914d\u7f6e\u6743\u9650\uff09"},void 0,!1,{fileName:Yl,lineNumber:101,columnNumber:11},this),Object(h.jsxDEV)("div",{className:"role-check",children:Object(h.jsxDEV)(j.a,{checked:this.state.checked,onChange:this.handleChange,children:"\u6240\u6709\u6743\u9650"},void 0,!1,{fileName:Yl,lineNumber:103,columnNumber:13},this)},void 0,!1,{fileName:Yl,lineNumber:102,columnNumber:11},this)]},void 0,!0,{fileName:Yl,lineNumber:100,columnNumber:9},this),Object(h.jsxDEV)(Ol.a,{checkable:!0,size:"medium",data:this.state.menu_data,onCheck:this.onCheck,checkedKeys:e,disabledCheckedKeys:t},void 0,!1,{fileName:Yl,lineNumber:108,columnNumber:9},this)]},void 0,!0,{fileName:Yl,lineNumber:99,columnNumber:7},this)}}var Gl="/Users/zhangds/web/blue-brother/frontend/src/pages/system/subAccount/add/adduserinfo/adduserinfo.js";class Ql extends m.a.Component{constructor(e){super(e),this.onUploadError=(e,t)=>{"overMaxAmount"===e?(c.a.clear(),c.a.error(`\u6700\u591a\u53ef\u4e0a\u4f20 ${t.maxAmount} \u5f20\u56fe\u7247`)):"overMaxSize"===e&&(c.a.clear(),c.a.error(`\u56fe\u7247\u5927\u5c0f\u4e0d\u80fd\u8d85\u8fc7 ${t.formattedMaxSize}b`))},this.state={model:{user_name:"",mobile:"",password:"",real_name:"",company:"",deparment:"",post:""},companyList:[],departmentList:[],departmentJob:[],roleList:[],headImg:"",pwdtype:"text",defaultFileList:[{src:""}],disabled:!1,id:"",ruleId:[]}}componentWillMount(){let e=this;this.getCompanyFn();let t=JSON.parse(sessionStorage.getItem("company"));t||this.getCompanyFn(),this.getRoleFn();let i=this.props;if(i&&1==i.enumer){var s,l,n,o;this.setState({pwdtype:"password"});let r=Object(de.a)(i.rowData),m={user_name:r.user_name,mobile:r.mobile,password:"yxtx2021",real_name:r.real_name,company:t.find((e=>e.key==r.company_id)),deparment:{key:null===(s=r.department)||void 0===s?void 0:s.id,text:null===(l=r.department)||void 0===l?void 0:l.department_name},post:{key:null===(n=r.job)||void 0===n?void 0:n.id,text:null===(o=r.job)||void 0===o?void 0:o.job_name}},d=i.rowData.rule.map((e=>e.id));this.setState({ruleId:d});let u={};u.src=r.head,this.setState({model:m,disabled:!0,defaultFileList:[u],id:r.id,headImg:r.head}),m.company&&m.company.key&&Object(a.Y)({company_id:m.company.key}).then((t=>{Object(a.Tb)(t,((t,i)=>{let a=t.map((e=>({key:e.id,text:e.department_name})));e.setState({departmentList:a})}),(e=>{c.a.error(e)}))})).catch((e=>{})),m.deparment.key&&Object(a.Z)({department_id:m.deparment.key}).then((t=>{Object(a.Tb)(t,((t,i)=>{let a=t.map((e=>({key:e.id,text:e.job_name})));e.setState({departmentJob:a})}),(e=>{c.a.error(e)}))})).catch((e=>{}))}}changeKind(){this.setState({pwdtype:"password"})}submit(){let e=this.refs.form1.validator(),t=this.refs.roletree.state.checkedKeys,i=this.state.model,s=this;e?G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:0==s.props.enumer?Object(h.jsxDEV)("p",{children:["\u662f\u5426\u65b0\u589e",Object(h.jsxDEV)("b",{children:["[",i.user_name,"]"]},void 0,!0,{fileName:Gl,lineNumber:142,columnNumber:19},this),"\u8d26\u53f7\uff1f"]},void 0,!0,{fileName:Gl,lineNumber:141,columnNumber:13},this):Object(h.jsxDEV)("p",{children:["\u662f\u5426\u4fee\u6539",Object(h.jsxDEV)("b",{children:["[",i.user_name,"]"]},void 0,!0,{fileName:Gl,lineNumber:146,columnNumber:19},this),"\u8d26\u53f7\u4fe1\u606f\uff1f"]},void 0,!0,{fileName:Gl,lineNumber:145,columnNumber:13},this),onConfirm:()=>{let e={user_name:i.user_name,password:i.password,job_id:i.post.key,real_name:i.real_name,mobile:i.mobile,assist_user_id:sessionStorage.getItem("subaid"),rule:t};if(s.state.headImg&&(e.head=s.state.headImg),0==s.props.enumer)Object(a.fc)(e).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.clear(),c.a.success(t),setTimeout((()=>{window.location.replace("#/home/system/subaccount-list"),sessionStorage.setItem("pathname2","/home/system/subaccount-list")}),1e3)}),(e=>{c.a.error(e)}))})).catch((e=>{}));else{let t=s.state.id;delete e.password,e.head=s.state.headImg,Object(a.vc)(t,e).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.clear(),c.a.success(t),setTimeout((()=>{window.location.replace("#/home/system/subaccount-list"),sessionStorage.setItem("pathname2","/home/system/subaccount-list")}),1e3)}),(e=>{c.a.error(e)}))})).catch((e=>{}))}},onCancel:this.onCancel,className:"questModal",parentComponent:this}):(c.a.clear(),c.a.error("\u8bf7\u5b8c\u5584\u8868\u5355\u6570\u636e"))}onUploadChange(e){let t=this;if(e&&e.length>0){let i=new FormData;i.append("file",e[0].file),i.append("path","account_avatar"),Object(a.cd)(i).then((e=>{Object(a.Tb)(e,((e,i)=>{t.setState({headImg:e.path}),c.a.clear(),c.a.success(i)}),(e=>{c.a.error(e)}))})).catch((e=>{}))}else t.setState({headImg:""})}onCompanyChange(e){if(!e){let e=this.state.model;e.deparment="",e.post="",this.setState({model:e})}let t=this,i=this.state.model;if(i.company=e,this.setState({model:i}),e){let i=this.state.model;i.deparment="",i.post="",t.setState({departmentList:[]}),t.setState({departmentJob:[]}),t.setState({model:i}),Object(a.Y)({company_id:e.key}).then((e=>{Object(a.Tb)(e,((e,i)=>{let a=e.map((e=>({key:e.id,text:e.department_name})));t.setState({departmentList:a})}),(e=>{c.a.error(e)}))})).catch((e=>{}))}else t.setState({departmentList:[]}),t.setState({departmentJob:[]})}onDepartmentChange(e){if(!e){let e=this.state.model;e.post="",this.setState({model:e})}let t=this,i=this.state.model;i.deparment=e,this.setState({model:i}),t.setState({departmentJob:[]}),e?Object(a.Z)({department_id:e.key}).then((e=>{Object(a.Tb)(e,((e,i)=>{let a=e.map((e=>({key:e.id,text:e.job_name})));t.setState({departmentJob:a});let s=this.state.model;s.post="",t.setState({model:s})}),(e=>{c.a.error(e)}))})).catch((e=>{})):t.setState({departmentJob:[]})}onPostChange(e){let t=this.state.model;t.post=e,this.setState({model:t})}getCompanyFn(){let e=this;Object(a.V)().then((t=>{Object(a.Tb)(t,((t,i)=>{let a=t.map((e=>({key:e.id,text:e.company_name})));sessionStorage.setItem("company",JSON.stringify(a)),e.setState({companyList:a})}),(e=>{c.a.error(e)}))})).catch((e=>{}))}changeType(e){this.setState({pwdtype:e})}getRoleFn(){let e=this;Object(a.xb)().then((t=>{Object(a.Tb)(t,((t,i)=>{let a=t.data.map((e=>({key:e.id,text:e.role_name})));e.setState({roleList:a})}),(e=>{c.a.error(e)}))})).catch((e=>{}))}cancel(){G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:"\u662f\u5426\u53d6\u6d88\u672c\u6b21\u64cd\u4f5c\uff1f"},void 0,!1,{fileName:Gl,lineNumber:401,columnNumber:16},this),onConfirm:()=>{window.location.replace("#/home/system/subaccount-list"),sessionStorage.setItem("pathname2","/home/system/subaccount-list")},onCancel:this.onCancel,className:"questModal",parentComponent:this})}render(){return Object(h.jsxDEV)("div",{children:[Object(h.jsxDEV)(d.a,{style:{width:"100%"},title:this.props.title,children:Object(h.jsxDEV)("div",{id:"addaccinfo",children:[Object(h.jsxDEV)(l.a,{model:this.state.model,rules:{account:[{type:"required",message:"\u8bf7\u8f93\u5165\u624b\u673a\u53f7"}],phone:[{type:"required",message:"\u8bf7\u8f93\u5165\u624b\u673a\u53f7"},{type:"regExp",message:"\u624b\u673a\u53f7\u683c\u5f0f\u4e0d\u6b63\u786e",reg:"^[1][3,4,5,6,7,8,9][0-9]{9}$"}]},ref:"form1",className:"addform",children:[Object(h.jsxDEV)(s.a,{labelname:"\u8d26\u53f7",prop:"account",id:"account",children:Object(h.jsxDEV)(n.a,{onChange:e=>{let t=this.state.model;t.user_name=e,this.setState({model:t})},onClearItem:e=>{let t=this.state.model;t.user_name="",this.setState({model:t})},value:this.state.model.user_name,placeholder:"\u8bf7\u8f93\u5165\u624b\u673a\u53f7",labelWidth:"0px",maxLength:12,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:Gl,lineNumber:438,columnNumber:17},this)},void 0,!1,{fileName:Gl,lineNumber:437,columnNumber:15},this),Object(h.jsxDEV)(s.a,{labelname:" \u624b\u673a\u53f7",prop:"phone",id:"phone",children:Object(h.jsxDEV)(n.a,{kind:"tel",onChange:e=>{let t=this.state.model;t.mobile=e,this.setState({model:t})},onClearItem:e=>{let t=this.state.model;t.mobile="",this.setState({model:t})},value:this.state.model.mobile,placeholder:"\u8bf7\u8f93\u5165\u624b\u673a\u53f7",labelWidth:"0px",maxLength:11,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:Gl,lineNumber:460,columnNumber:17},this)},void 0,!1,{fileName:Gl,lineNumber:459,columnNumber:15},this),Object(h.jsxDEV)(s.a,{labelname:"\u5bc6\u7801",id:"pwd",required:"",children:Object(h.jsxDEV)(n.a,{onChange:e=>{let t=this.state.model;t.password=e,this.setState({model:t})},onfocusFn:e=>this.changeKind(),markedShow:e=>{this.changeType(e)},kind:this.state.pwdtype,disabled:this.state.disabled,onClearItem:e=>{let t=this.state.model;t.password="",this.setState({model:t})},value:this.state.model.password,placeholder:"\u8bf7\u8f93\u5165\u5bc6\u7801",labelWidth:"0px",maxLength:16,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:Gl,lineNumber:482,columnNumber:17},this)},void 0,!1,{fileName:Gl,lineNumber:481,columnNumber:15},this),Object(h.jsxDEV)(s.a,{labelname:"\u771f\u5b9e\u59d3\u540d",required:"",children:Object(h.jsxDEV)(n.a,{onChange:e=>{let t=this.state.model;t.real_name=e,this.setState({model:t})},onClearItem:e=>{let t=this.state.model;t.real_name="",this.setState({model:t})},value:this.state.model.real_name,placeholder:"\u8bf7\u8f93\u5165\u771f\u5b9e\u59d3\u540d",labelWidth:"0px",maxLength:16,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:Gl,lineNumber:510,columnNumber:17},this)},void 0,!1,{fileName:Gl,lineNumber:509,columnNumber:15},this),Object(h.jsxDEV)(s.a,{id:"company",labelname:"\u5c97\u4f4d",myClassName:"sel1",required:"",children:Object(h.jsxDEV)(X.a,{options:this.state.companyList,placeholder:"\u8bf7\u9009\u62e9\u516c\u53f8",value:this.state.model.company,onChange:e=>{this.onCompanyChange(e),$t.a.emit("change","company",e)}},void 0,!1,{fileName:Gl,lineNumber:531,columnNumber:17},this)},void 0,!1,{fileName:Gl,lineNumber:530,columnNumber:15},this),Object(h.jsxDEV)(s.a,{id:"deparment",myClassName:"sel2",labelwidth:"0px",required:"",children:Object(h.jsxDEV)(X.a,{options:this.state.departmentList,placeholder:"\u8bf7\u9009\u62e9\u90e8\u95e8",popupWidth:"360px",value:this.state.model.deparment,onChange:e=>{this.onDepartmentChange(e),$t.a.emit("change","deparment",e)}},void 0,!1,{fileName:Gl,lineNumber:542,columnNumber:17},this)},void 0,!1,{fileName:Gl,lineNumber:541,columnNumber:15},this),Object(h.jsxDEV)(s.a,{id:"post",myClassName:"sel2 sel3",labelwidth:"0px",children:Object(h.jsxDEV)(X.a,{options:this.state.departmentJob,placeholder:"\u8bf7\u9009\u62e9\u5c97\u4f4d",popupWidth:"360px",value:this.state.model.post,onChange:e=>{this.onPostChange(e),$t.a.emit("change","post",e)}},void 0,!1,{fileName:Gl,lineNumber:554,columnNumber:17},this)},void 0,!1,{fileName:Gl,lineNumber:553,columnNumber:15},this),Object(h.jsxDEV)(s.a,{required:"",labelname:"\u8bbe\u7f6e\u6743\u9650",myClassName:"rolechoose",id:"station",children:Object(h.jsxDEV)($l,{ref:"roletree",rules:this.state.ruleId,enum:this.props.enumer},void 0,!1,{fileName:Gl,lineNumber:566,columnNumber:17},this)},void 0,!1,{fileName:Gl,lineNumber:565,columnNumber:15},this)]},void 0,!0,{fileName:Gl,lineNumber:436,columnNumber:13},this),Object(h.jsxDEV)("div",{className:"mypic",children:[Object(h.jsxDEV)("b",{children:"\u5934\u50cf"},void 0,!1,{fileName:Gl,lineNumber:570,columnNumber:15},this),Object(h.jsxDEV)("div",{className:"changepic dflexac",children:""==this.state.defaultFileList[0].src?Object(h.jsxDEV)(gt.a,{className:"zent-image-upload-demo",maxSize:512e3,tips:"\u5efa\u8bae\u5c3a\u5bf8 80*80\uff0c\u56fe\u7247\u4e0d\u8d85\u8fc7 500kb",maxAmount:1,onChange:e=>{this.onUploadChange(e)},onUpload:this.onUpload,onError:this.onUploadError},void 0,!1,{fileName:Gl,lineNumber:573,columnNumber:19},this):Object(h.jsxDEV)(gt.a,{className:"zent-image-upload-demo",maxSize:512e3,tips:"\u5efa\u8bae\u5c3a\u5bf8 80*80\uff0c\u56fe\u7247\u4e0d\u8d85\u8fc7 500kb",maxAmount:1,onChange:e=>{this.onUploadChange(e)},onUpload:this.onUpload,defaultFileList:this.state.defaultFileList,onError:this.onUploadError},void 0,!1,{fileName:Gl,lineNumber:585,columnNumber:19},this)},void 0,!1,{fileName:Gl,lineNumber:571,columnNumber:15},this)]},void 0,!0,{fileName:Gl,lineNumber:569,columnNumber:13},this)]},void 0,!0,{fileName:Gl,lineNumber:435,columnNumber:11},this)},void 0,!1,{fileName:Gl,lineNumber:434,columnNumber:9},this),Object(h.jsxDEV)("div",{className:"mt24",children:[Object(h.jsxDEV)(u.a,{type:"primary",onClick:this.submit.bind(this),children:"\u63d0\u4ea4"},void 0,!1,{fileName:Gl,lineNumber:603,columnNumber:11},this),Object(h.jsxDEV)(u.a,{type:"normal",htmlType:"reset",onClick:this.cancel.bind(this),children:"\u53d6\u6d88"},void 0,!1,{fileName:Gl,lineNumber:606,columnNumber:11},this)]},void 0,!0,{fileName:Gl,lineNumber:602,columnNumber:9},this)]},void 0,!0,{fileName:Gl,lineNumber:433,columnNumber:7},this)}}i(273);var Zl="/Users/zhangds/web/blue-brother/frontend/src/pages/system/subAccount/add/add.js";class Xl extends m.a.Component{constructor(e){super(e),this.state={pagetitle:"\u65b0\u5efa\u5b50\u8d26\u53f7",rowData:{},enumer:1}}componentWillMount(){let e=JSON.parse(sessionStorage.getItem("breaknav"))[0].pagetitle,t=e.includes("\u65b0\u5efa")?0:1,i=JSON.parse(sessionStorage.getItem("dataInfo"));this.setState({pagetitle:e+"\u5b50\u8d26\u53f7",rowData:i,enumer:t})}render(){return Object(h.jsxDEV)("div",{id:"accadd",className:"maincenter",children:Object(h.jsxDEV)("div",{className:"addaccount",children:Object(h.jsxDEV)(Ql,{enumer:this.state.enumer,rowData:this.state.rowData,title:this.state.pagetitle},void 0,!1,{fileName:Zl,lineNumber:24,columnNumber:11},this)},void 0,!1,{fileName:Zl,lineNumber:23,columnNumber:9},this)},void 0,!1,{fileName:Zl,lineNumber:22,columnNumber:7},this)}}i(274);var en="/Users/zhangds/web/blue-brother/frontend/src/pages/system/subAccount/list/modifypwd.js";function tn(e,t){return e!==t.getSectionValue("password").password?{name:"passwordEqual",message:"\u4e24\u6b21\u586b\u5199\u7684\u5bc6\u7801\u4e0d\u4e00\u81f4"}:null}var an=e=>{const t=bi.a.useForm(pi.b.View),[i,s]=m.a.useState("password"),[l,n]=m.a.useState("password"),o=m.a.useCallback((t=>{const i=t.getValue();if(i){let t=Object(de.a)(i);Object(a.Ac)(e.id,t).then((t=>{Object(a.Tb)(t,((t,i)=>{c.a.clear(),c.a.success(i),e.visibleShow(!1)}),(e=>{c.a.clear(),c.a.error(t.data.message)}))})).catch((e=>{}))}}),[]);return Object(h.jsxDEV)(bi.a,{form:t,layout:"horizontal",scrollToError:!0,onSubmit:o,children:[Object(h.jsxDEV)(Ni.a,{name:"password",label:"\u65b0\u5bc6\u7801",className:"selfpwd",required:!0,after:Object(h.jsxDEV)(g.a,{type:"password"==i?"eye-o":"closed-eye",onClick:()=>{s("password"==i?"text":"password")}},void 0,!1,{fileName:en,lineNumber:67,columnNumber:11},void 0),helpDesc:"",validators:[ji.b.required("\u8bf7\u8f93\u5165\u65b0\u5bc6\u7801"),ji.b.pattern(/^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,16}$/,"6-16\u4f4d\u5b57\u7b26,\u6570\u5b57+\u5b57\u6bcd\u7ec4\u6210\uff0c(\u5b57\u6bcd\u533a\u5206\u5927\u5c0f\u5199)")],notice:"6-16\u4f4d\u5b57\u7b26,\u6570\u5b57+\u5b57\u6bcd\u7ec4\u6210\uff0c\u5b57\u6bcd(\u533a\u5206\u5927\u5c0f\u5199)",props:{type:"password"==i?"password":"text",maxLength:16,autoComplete:"new-password"}},void 0,!1,{fileName:en,lineNumber:61,columnNumber:7},void 0),Object(h.jsxDEV)(Ni.a,{name:"old_password",label:"\u786e\u8ba4\u5bc6\u7801",className:"selfpwd",required:!0,after:Object(h.jsxDEV)(g.a,{type:"password"==l?"eye-o":"closed-eye",onClick:()=>{n("password"==l?"text":"password")}},void 0,!1,{fileName:en,lineNumber:90,columnNumber:11},void 0),notice:"\u5fc5\u987b\u4e0e\u65b0\u5bc6\u7801\u8f93\u5165\u4e00\u81f4",validators:[ji.b.required("\u8bf7\u786e\u8ba4\u5bc6\u7801"),tn],props:{type:"password"==l?"password":"text",maxLength:16,autoComplete:"new-password"}},void 0,!1,{fileName:en,lineNumber:84,columnNumber:7},void 0),Object(h.jsxDEV)("p",{className:"dflexajce",children:[Object(h.jsxDEV)(u.a,{type:"primary",htmlType:"submit",children:"\u786e\u5b9a"},void 0,!1,{fileName:en,lineNumber:101,columnNumber:9},void 0),",",Object(h.jsxDEV)(u.a,{onClick:()=>{e.visibleShow(!1)},children:"\u53d6\u6d88"},void 0,!1,{fileName:en,lineNumber:104,columnNumber:10},void 0)]},void 0,!0,{fileName:en,lineNumber:100,columnNumber:7},void 0)]},void 0,!0,{fileName:en,lineNumber:60,columnNumber:5},void 0)},sn="/Users/zhangds/web/blue-brother/frontend/src/pages/system/subAccount/list/list.js";const ln=[{title:"\u8d26\u53f7",name:"user_name",prop:"user_name",type:"normal",width:"10%"},{title:"\u624b\u673a\u53f7",prop:"mobile",name:"mobile",width:"10%",type:"normal"},{title:"\u5c97\u4f4d",name:"job.job_name",type:"normal",prop:"job.job_name",width:"10%"},{title:"\u59d3\u540d",name:"real_name",type:"normal",prop:"real_name",width:"10%"},{title:"\u72b6\u6001",width:"10%",type:"slot",name:"name",prop:"status"},{title:"\u521b\u5efa\u65f6\u95f4",name:"create_time",prop:"create_time",width:"20%",type:"normal"},{title:"\u64cd\u4f5c",prop:"opearo",name:"opearo",type:"slot",width:"20%"}];class nn extends m.a.Component{constructor(e){super(e),this.onChange=e=>{this.setState(e)},this.onConfirm=()=>{},this.onCancel=()=>{},this.setVisible=e=>{this.setState({visible:e})},this.getChildrenMsg=(e,t)=>{this.setState({visible:t})},this.state={checkedSmall:!0,tableHeight:600,visible:!1,tabList:[{title:"\u5b50\u8d26\u53f7\u5217\u8868"}],accList:[],page:1,limit:10,total:0,search:"",id:""}}clickFn(){sessionStorage.setItem("pathname2","/home/system/subaccount-add");sessionStorage.setItem("breaknav",JSON.stringify([{pagetitle:"\u65b0\u5efa",items:[{path:"/home/system/subaccount-list",name:"\u5b50\u8d26\u53f7\u7ba1\u7406"},{path:"/home/system/subaccount-add",name:"\u65b0\u5efa\u5b50\u8d26\u53f7"}]}])),window.open("#/home/system/subaccount-add")}onSwitchChange(e,t){let i=this,s={status:0==t.status?1:0};G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:["\u662f\u5426",0==t.status?"\u542f\u7528":"\u505c\u7528",Object(h.jsxDEV)("b",{children:["[",t.user_name,"]"]},void 0,!0,{fileName:sn,lineNumber:127,columnNumber:11},this),"\u8d26\u53f7\uff1f"]},void 0,!0,{fileName:sn,lineNumber:125,columnNumber:9},this),onConfirm:()=>{Object(a.sc)(t.id,s).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.clear(),c.a.success(t),window.location.href.includes("aid")?i.getsubAppointFn():i.getAccountFn()}),(e=>{c.a.error(e)}))})).catch((e=>{}))},onCancel:this.onCancel,className:"questModal",parentComponent:this})}changeState(e,t){let i=this,a=Object(oi.a)(i.state.accoutdata,(e=>e.id==t.id));i.state.accoutdata[a].status=e,i.setState({accoutdata:i.state.accoutdata})}delFn(e,t){G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:["\u662f\u5426\u5220\u9664",Object(h.jsxDEV)("b",{children:["[",t.user_name,"]"]},void 0,!0,{fileName:sn,lineNumber:176,columnNumber:15},this),"\uff1f"]},void 0,!0,{fileName:sn,lineNumber:175,columnNumber:9},this),onConfirm:()=>{Object(a.o)(t.id).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.clear(),c.a.success(t),window.location.href.includes("aid")?this.getsubAppointFn():this.getAccountFn()}),(e=>{c.a.error(e)}))})).catch((e=>{}))},onCancel:this.onCancel,className:"questModal",parentComponent:this})}editFn(e,t){Object(a.V)().then((e=>{Object(a.Tb)(e,((e,t)=>{let i=e.map((e=>({key:e.id,text:e.company_name})));sessionStorage.setItem("company",JSON.stringify(i)),this.props.history.push("/home/system/subaccount-add"),window.open("#/home/system/subaccount-add")}),(e=>{c.a.error(e)}))})).catch((e=>{})),sessionStorage.setItem("pathname2","/home/system/subaccount-add");sessionStorage.setItem("breaknav",JSON.stringify([{pagetitle:"\u7f16\u8f91",items:[{path:"/home/system/subaccount-list",name:"\u5b50\u8d26\u53f7\u7ba1\u7406"},{path:"/home/system/subaccount-add",name:"\u7f16\u8f91\u5b50\u8d26\u53f7"}]}])),sessionStorage.setItem("dataInfo",JSON.stringify(t))}resetpwd(e,t){this.setState({visible:!0,id:t.id})}getsubAppointFn(){let e=this,{page:t,limit:i,search:s}=e.state,l={page:t,limit:i};s&&(l.search=s),Object(a.Rb)(sessionStorage.getItem("subaid"),l).then((t=>{Object(a.Tb)(t,((t,i)=>{const a=t.data,{total:s}=t;e.setState({accList:a,total:s})}),(e=>{c.a.error(e)}))})).catch((e=>{}))}getAccountFn(){let e=this,{page:t,limit:i,search:s}=e.state,l={page:t,limit:i};s&&(l.search=s),Object(a.Cb)(l).then((t=>{Object(a.Tb)(t,((t,i)=>{const a=t.data,{total:s}=t;e.setState({accList:a,total:s})}),(e=>{c.a.error(e)}))})).catch((e=>{}))}pageChange(e){this.setState({page:e}),window.location.href.includes("aid")?setTimeout((()=>{this.getsubAppointFn()}),10):setTimeout((()=>{this.getAccountFn()}),10)}countChange(e){this.setState({page:1,limit:e}),window.location.href.includes("aid")?setTimeout((()=>{this.getsubAppointFn()}),10):setTimeout((()=>{this.getAccountFn()}),10)}iptsureFn(){window.location.href.includes("aid")?(this.setState({page:1}),setTimeout((()=>{this.getsubAppointFn()}),300)):(this.setState({page:1}),setTimeout((()=>{this.getAccountFn()}),300))}componentWillMount(){var e;(this.setState({tableHeight:window.innerHeight-390}),window.location.href.includes("aid"))?this.getsubAppointFn():(sessionStorage.setItem("subaid",null===(e=JSON.parse(sessionStorage.getItem("userInfo")))||void 0===e?void 0:e.id),this.getAccountFn())}componentDidMount(){}componentDidUpdate(e,t){t.search==this.state.search||this.state.search||(window.location.href.includes("aid")?this.getsubAppointFn():this.getAccountFn())}sureFn(){}render(){return Object(h.jsxDEV)("div",{id:"accountlist",children:[Object(h.jsxDEV)(Ft,{tabs:this.state.tabList,children:Object(h.jsxDEV)("div",{className:"acctable",children:[Object(h.jsxDEV)("div",{className:"accountable dflexj",children:[Object(h.jsxDEV)(u.a,{type:"primary",icon:"plus",onClick:this.clickFn.bind(this),children:"\u65b0\u5efa\u5b50\u8d26\u53f7"},void 0,!1,{fileName:sn,lineNumber:378,columnNumber:15},this),Object(h.jsxDEV)(n.a,{onChange:e=>this.setState({search:e}),value:this.state.search,wordSearch:this.iptsureFn.bind(this),icon:"search",placeholder:"\u8bf7\u8f93\u5165\u59d3\u540d\u3001\u624b\u673a\u53f7\u67e5\u8be2",countShow:!1,height:"36px",width:"260px",onClearItem:e=>{this.setState({search:""})},alignment:"left"},void 0,!1,{fileName:sn,lineNumber:382,columnNumber:15},this)]},void 0,!0,{fileName:sn,lineNumber:377,columnNumber:13},this),Object(h.jsxDEV)("div",{className:"table-container",children:Object(h.jsxDEV)(I,{spliteColor:"#fff",tableData:this.state.accList,Column:ln,maxheight:this.state.tableHeight,isMultiple:!1,dataCount:this.state.total,countbarVisible:!1,isSwitch:!1,page:this.state.page,pageChange:e=>{this.pageChange(e)},countChange:e=>{this.countChange(e)},checkChange:e=>{},ComponentHandler:(e,t)=>"status"==e?Object(h.jsxDEV)(v.a,{size:"small",checked:0!=t.status,onChange:e=>{this.onSwitchChange(e,t)}},void 0,!1,{fileName:sn,lineNumber:418,columnNumber:23},this):"opearo"==e?Object(h.jsxDEV)("span",{children:[Object(h.jsxDEV)("span",{className:"grid-link",onClick:e=>this.editFn(e,t),children:"\u7f16\u8f91"},void 0,!1,{fileName:sn,lineNumber:431,columnNumber:25},this),Object(h.jsxDEV)("span",{className:"grid-link",onClick:e=>this.delFn(e,t),children:"\u5220\u9664"},void 0,!1,{fileName:sn,lineNumber:434,columnNumber:25},this),Object(h.jsxDEV)("span",{className:"grid-link",onClick:e=>this.resetpwd(e,t),children:"\u91cd\u7f6e\u5bc6\u7801"},void 0,!1,{fileName:sn,lineNumber:437,columnNumber:25},this)]},void 0,!0,{fileName:sn,lineNumber:430,columnNumber:23},this):void 0},void 0,!1,{fileName:sn,lineNumber:398,columnNumber:15},this)},void 0,!1,{fileName:sn,lineNumber:397,columnNumber:13},this)]},void 0,!0,{fileName:sn,lineNumber:376,columnNumber:11},this)},void 0,!1,{fileName:sn,lineNumber:374,columnNumber:9},this),Object(h.jsxDEV)(ce.a,{visible:this.state.visible,className:"questModal",onClose:()=>this.setVisible(!1),title:"\u91cd\u7f6e\u5bc6\u7801",children:Object(h.jsxDEV)("div",{children:Object(h.jsxDEV)(an,{visibleShow:e=>this.setVisible(e),id:this.state.id},void 0,!1,{fileName:sn,lineNumber:456,columnNumber:13},this)},void 0,!1,{fileName:sn,lineNumber:455,columnNumber:11},this)},void 0,!1,{fileName:sn,lineNumber:449,columnNumber:9},this)]},void 0,!0,{fileName:sn,lineNumber:373,columnNumber:7},this)}}i(275);var on="/Users/zhangds/web/blue-brother/frontend/src/pages/system/systemMould/main.js";const rn=[{title:"\u7f29\u7565\u56fe",name:"thumb",prop:"thumb",type:"slot",width:"10%"},{title:"\u6807\u9898",prop:"title",name:"title",width:"auto",type:"normal"},{title:"\u6743\u91cd",prop:"sort",name:"sort",type:"normal",width:"auto"},{title:"\u66f4\u65b0\u65f6\u95f4",prop:"update_time",name:"update_time",type:"normal",width:"auto"},{title:"\u521b\u5efa\u4eba",prop:"user_name",name:"user_name",type:"normal",width:"auto"},{title:"\u64cd\u4f5c",prop:"edit",name:"edit",type:"slot",width:"auto"}];class mn extends m.a.Component{constructor(e){super(e),this.state={distdata:[],total:0,combinedValue:[],page:1,limit:10,tabList:[{title:"\u7cfb\u7edf\u6a21\u677f\u5217\u8868"}],DateTime:"",key_word:"",tableHeight:600,dataCount:0}}componentDidUpdate(e,t){t.key_word==this.state.key_word||this.state.key_word||this.sureFn()}sureFn(){this.setState({page:1}),this.setState({limit:10});let e={page:1,limit:10,title:this.state.key_word};this.getTableList(e)}editFn(e,t){sessionStorage.setItem("mouldType",0),sessionStorage.setItem("pageInfo",JSON.stringify(t)),sessionStorage.setItem("isSort",1),window.location.href="/#/edittemplate"}getTableList(e){Object(a.Db)(e).then((e=>{Object(a.Tb)(e,((e,t)=>{this.setState({dataCount:e.total}),this.setState({distdata:e.data})}),(e=>{}))})).catch((e=>{}))}componentWillMount(){this.setState({tableHeight:window.innerHeight-390});let e={page:this.state.page,limit:this.state.limit};this.state.combinedValue&&this.state.combinedValue[0]&&(e.begin_time=this.state.combinedValue[0],e.end_time=this.state.combinedValue[1]),this.getTableList(e)}countChange(e){this.setState({page:1,limit:e});let t={page:1,limit:e};this.getTableList(t)}pageChange(e){this.setState({page:e});let t={page:e,limit:this.state.limit};this.state.key_word&&(t.title=this.state.key_word),this.getTableList(t)}newTemplate(e){sessionStorage.setItem("mouldType",0),sessionStorage.removeItem("pageInfo"),sessionStorage.removeItem("editorConfig"),window.location.href="/#/edittemplate"}delFn(e,t){let i=this;G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:["\u662f\u5426\u5220\u9664",Object(h.jsxDEV)("b",{children:["[",t.title,"]"]},void 0,!0,{fileName:on,lineNumber:182,columnNumber:15},this),"\uff1f"]},void 0,!0,{fileName:on,lineNumber:181,columnNumber:9},this),onConfirm:()=>{Object(a.y)(t.id).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.clear(),c.a.success(t);let a={page:this.state.page,limit:this.state.limit,title:this.state.key_word};i.getTableList(a)}),(e=>{}))})).catch((e=>{}))},onCancel:this.onCancel,className:"questModal",parentComponent:this})}render(){const{current:e,pageSize:t}=this.state;return Object(h.jsxDEV)("div",{id:"exchangecodelist",children:Object(h.jsxDEV)(Ft,{tabs:this.state.tabList,children:[Object(h.jsxDEV)("div",{className:"codetable dflexj",children:[Object(h.jsxDEV)(u.a,{type:"primary",icon:"plus",onClick:e=>{this.newTemplate(e)},children:[" ","\u65b0\u589e\u6a21\u677f"," "]},void 0,!0,{fileName:on,lineNumber:217,columnNumber:13},this),Object(h.jsxDEV)(n.a,{onClearItem:e=>{this.setState({key_word:""})},wordSearch:this.sureFn.bind(this),onChange:e=>this.setState({key_word:e}),value:this.state.key_word,icon:"search",placeholder:"\u8bf7\u8f93\u5165\u5173\u952e\u5b57\u8fdb\u884c\u5339\u914d\u67e5\u8be2",countShow:!1,height:"36px",width:"260px",alignment:"left"},void 0,!1,{fileName:on,lineNumber:227,columnNumber:13},this)]},void 0,!0,{fileName:on,lineNumber:216,columnNumber:11},this),Object(h.jsxDEV)("div",{className:"code-table",children:Object(h.jsxDEV)(I,{spliteColor:"#fff",tableData:this.state.distdata,Column:rn,maxheight:this.state.tableHeight,countbarVisible:!1,isSwitch:!1,page:this.state.page,dataCount:this.state.dataCount,isMultiple:!1,pageChange:e=>{this.pageChange(e)},countChange:e=>{this.countChange(e)},checkChange:e=>{},ComponentHandler:(e,t)=>"thumb"==e?Object(h.jsxDEV)(Ei.a,{trigger:"hover",position:"right-center",content:Object(h.jsxDEV)("img",{src:t.thumb,alt:"",style:{width:"375px",transform:"scale(.8)"}},void 0,!1,{fileName:on,lineNumber:267,columnNumber:25},this),children:Object(h.jsxDEV)("img",{src:t.thumb,alt:"",style:{width:"30px",height:"30px"}},void 0,!1,{fileName:on,lineNumber:273,columnNumber:23},this)},void 0,!1,{fileName:on,lineNumber:263,columnNumber:21},this):"edit"==e?Object(h.jsxDEV)("span",{children:[Object(h.jsxDEV)("a",{className:"grid-link",onClick:e=>{this.editFn(e,t)},children:[" ","\u7f16\u8f91"," "]},void 0,!0,{fileName:on,lineNumber:293,columnNumber:23},this)," ",Object(h.jsxDEV)("a",{onClick:e=>{this.delFn(e,t)},className:"grid-link",children:[" ","\u5220\u9664"," "]},void 0,!0,{fileName:on,lineNumber:301,columnNumber:23},this)]},void 0,!0,{fileName:on,lineNumber:292,columnNumber:21},this):void 0},void 0,!1,{fileName:on,lineNumber:243,columnNumber:13},this)},void 0,!1,{fileName:on,lineNumber:242,columnNumber:11},this)]},void 0,!0,{fileName:on,lineNumber:215,columnNumber:9},this)},void 0,!1,{fileName:on,lineNumber:214,columnNumber:7},this)}}const cn=[{path:"/home/exchangepage",component:Na},{path:"/home/settlementList",component:Za},{path:"/home/packageDetail",component:ts},{path:"/home/mytempMould",component:ya},{path:"/home/myexchangetemplate",component:ga},{path:"/home/order-list",component:Ba},{path:"/home/download-orderlist",component:ka},{path:"/home/order-addetails",component:Wa},{path:"/home/plan",component:al},{path:"/home/plan-list",component:il},{path:"/home/plan-qrcode",component:ll},{path:"/home/plan-create",component:ys},{path:"/home/plan-edit",component:Ds},{path:"/home/plan-edit-copy",component:Vs},{path:"/home/key-list",component:As},{path:"/home/plan-keyList",component:Qs},{path:"/home/key-addEdit",component:Cs},{path:"/home/key-detail",component:Is},{path:"/home/key-log",component:Hs},{path:"/home/system/account-add",component:ml},{path:"/home/system/subaccount-list",component:nn},{path:"/home/system/subaccount-add",component:Xl},{path:"/home/system/role-list",component:Ul},{path:"/home/system/role-add",component:Al},{path:"/home/system/station",component:Kl},{path:"/home/system/customize",component:yl},{path:"/home/system/menu",component:ql},{path:"/home/system/my-mould",component:mn},{path:"/home/distributor-list",component:Oi},{path:"/home/distributor-add",component:li},{path:"/home/distributor-edit",component:li},{path:"/home/distributor-merchant",component:function(){var e,t,i,m,b;const[p,N]=Object(W.a)({loading:!1,apiMode:[],reseller_id:0,merchant_id:"",pos_id:"",app_id:"",store_id:"",public_key:"",private_key:"",merchant_public_key:"",secret_key:"",notify_url:"",subscribe_event:[],status:1,api_mode:2}),v=Object(r.useRef)();return Object(r.useEffect)((()=>{const{merchant:e,id:t}=JSON.parse(sessionStorage.getItem("merchant"));Object(a.O)().then((({data:i})=>{N({apiMode:i,reseller_id:t,...e})}))}),[]),Object(h.jsxDEV)("div",{className:"maincenter",children:[Object(h.jsxDEV)(d.a,{style:{width:"100%"},title:"\u66f4\u65b0\u4fe1\u606f",children:Object(h.jsxDEV)("div",{className:"adddistributor merchantForm",children:Object(h.jsxDEV)(l.a,{model:p,rules:{merchant_id:[{type:"required",message:"\u8bf7\u8f93\u5165\u5546\u6237\u7f16\u53f7"}],public_key:[{type:"required",message:"\u8bf7\u8f93\u5165\u516c\u94a5"}],private_key:[{type:"required",message:"\u8bf7\u8f93\u5165\u79c1\u94a5"}],app_id:[{type:"required",message:"\u8bf7\u8f93\u5165\u5e94\u7528ID"}],pos_id:[{type:"required",message:"\u8bf7\u8f93\u5165\u5e73\u53f0ID"}],store_id:[{type:"required",message:"\u8bf7\u8f93\u5165\u5e97\u94faID"}],secret_key:[{type:"required",message:"\u8bf7\u8f93\u5165SM4\u79d8\u94a5"}],merchant_public_key:[{type:"required",message:"\u8bf7\u8f93\u5165\u5546\u6237\u516c\u94a5"}],notify_url:[{type:"required",message:"\u8bf7\u8f93\u5165\u5546\u6237\u56de\u8c03\u901a\u77e5\u7f51\u5173\u5730\u5740"},{type:"regExp",message:"\u8bf7\u8f93\u5165\u5408\u6cd5\u7684\u56de\u8c03\u901a\u77e5\u7f51\u5173\u5730\u5740",reg:/(https?|ftp|file):\/\/[-A-Za-z0-9+&@#\/%?=~_|!:,.;]+[-A-Za-z0-9+&@#\/%=~_|]/}]},ref:v,children:[Object(h.jsxDEV)(s.a,{labelname:"\u5546\u6237\u7f16\u53f7",prop:"merchant_id",children:Object(h.jsxDEV)(n.a,{onChange:e=>N({merchant_id:e}),onClearItem:()=>N({merchant_id:""}),countShow:!1,value:p.merchant_id,placeholder:"\u8bf7\u8f93\u5165\u5546\u6237\u7f16\u53f7",labelWidth:"0px",maxLength:100,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:Vi,lineNumber:96,columnNumber:15},this)},void 0,!1,{fileName:Vi,lineNumber:95,columnNumber:13},this),Object(h.jsxDEV)(s.a,{labelname:"\u5e73\u53f0ID",prop:"pos_id",children:Object(h.jsxDEV)(n.a,{onChange:e=>N({pos_id:e}),onClearItem:()=>N({pos_id:""}),countShow:!1,value:p.pos_id,placeholder:"\u8bf7\u8f93\u5165\u5e73\u53f0ID",labelWidth:"0px",maxLength:100,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:Vi,lineNumber:110,columnNumber:15},this)},void 0,!1,{fileName:Vi,lineNumber:109,columnNumber:13},this),Object(h.jsxDEV)(s.a,{labelname:"APP-ID",prop:"app_id",children:Object(h.jsxDEV)(n.a,{onChange:e=>N({app_id:e}),onClearItem:()=>N({app_id:""}),countShow:!1,value:p.app_id,placeholder:"\u8bf7\u8f93\u5165APPID",labelWidth:"0px",maxLength:100,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:Vi,lineNumber:124,columnNumber:15},this)},void 0,!1,{fileName:Vi,lineNumber:123,columnNumber:13},this),null!==(e=p.apiMode)&&void 0!==e&&null!==(t=e.filter((e=>e.key===p.api_mode))[0])&&void 0!==t&&t.store_id?Object(h.jsxDEV)(s.a,{labelname:"\u5e97\u94faID",prop:"store_id",children:Object(h.jsxDEV)(n.a,{onChange:e=>N({store_id:e}),onClearItem:()=>N({store_id:""}),countShow:!1,value:p.store_id,placeholder:"\u8bf7\u8f93\u5165\u5e97\u94faID",labelWidth:"0px",maxLength:100,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:Vi,lineNumber:140,columnNumber:17},this)},void 0,!1,{fileName:Vi,lineNumber:139,columnNumber:15},this):null,null!==(i=p.apiMode)&&void 0!==i&&null!==(m=i.filter((e=>e.key===p.api_mode))[0])&&void 0!==m&&m.secret_key?Object(h.jsxDEV)(s.a,{labelname:"SM4\u79d8\u94a5",prop:"secret_key",children:Object(h.jsxDEV)(n.a,{onChange:e=>N({secret_key:e}),onClearItem:()=>N({secret_key:""}),countShow:!1,value:p.secret_key,placeholder:"\u8bf7\u8f93\u5165SM4\u79d8\u94a5",labelWidth:"0px",height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:Vi,lineNumber:156,columnNumber:17},this)},void 0,!1,{fileName:Vi,lineNumber:155,columnNumber:15},this):null,Object(h.jsxDEV)(s.a,{labelname:"\u79c1\u94a5",prop:"private_key",children:[Object(h.jsxDEV)(Di.a,{type:"textarea",onChange:({target:e})=>N({private_key:e.value}),value:p.private_key,placeholder:"\u8bf7\u8f93\u5165\u79c1\u94a5",readOnly:!0,labelWidth:"0px",width:"520px",alignment:"left"},void 0,!1,{fileName:Vi,lineNumber:171,columnNumber:15},this),Object(h.jsxDEV)("p",{className:"tips",children:"* \u6b64\u5bc6\u94a5\u4e3a\u5185\u90e8\u4fe1\u606f\uff0c\u8bf7\u52ff\u5bf9\u5916\u63d0\u4f9b\u3002"},void 0,!1,{fileName:Vi,lineNumber:181,columnNumber:15},this)]},void 0,!0,{fileName:Vi,lineNumber:170,columnNumber:13},this),Object(h.jsxDEV)(s.a,{labelname:"\u516c\u94a5",prop:"public_key",children:Object(h.jsxDEV)("div",{className:"flex",children:[Object(h.jsxDEV)(Di.a,{type:"textarea",onChange:({target:e})=>N({public_key:e.value}),value:p.public_key,readOnly:!0,placeholder:"\u8bf7\u8f93\u5165\u516c\u94a5",labelWidth:"0px",width:"520px",alignment:"left"},void 0,!1,{fileName:Vi,lineNumber:185,columnNumber:17},this),Object(h.jsxDEV)(Yt.a,{text:p.public_key},void 0,!1,{fileName:Vi,lineNumber:195,columnNumber:17},this)]},void 0,!0,{fileName:Vi,lineNumber:184,columnNumber:15},this)},void 0,!1,{fileName:Vi,lineNumber:183,columnNumber:13},this),Object(h.jsxDEV)(s.a,{labelname:"",required:"",children:Object(h.jsxDEV)(Ei.a,{trigger:"hover",content:"\u5bc6\u94a5\u53d7 \u201c\u5bf9\u63a5\u7c7b\u578b\u201d \u5f71\u54cd",children:Object(h.jsxDEV)(u.a,{type:"primary",onClick:function(){Object(a.K)({api_mode:p.api_mode}).then((({data:e})=>{N({...e})}))},children:"\u91cd\u65b0\u83b7\u53d6\u5bc6\u94a5"},void 0,!1,{fileName:Vi,lineNumber:200,columnNumber:17},this)},void 0,!1,{fileName:Vi,lineNumber:199,columnNumber:15},this)},void 0,!1,{fileName:Vi,lineNumber:198,columnNumber:13},this),Object(h.jsxDEV)(s.a,{labelname:"\u5546\u6237\u516c\u94a5",prop:"merchant_public_key",children:Object(h.jsxDEV)(Di.a,{type:"textarea",onChange:({target:e})=>N({merchant_public_key:e.value}),value:p.merchant_public_key,placeholder:"\u8bf7\u8f93\u5165\u5546\u6237\u516c\u94a5",labelWidth:"0px",width:"520px",alignment:"left"},void 0,!1,{fileName:Vi,lineNumber:206,columnNumber:15},this)},void 0,!1,{fileName:Vi,lineNumber:205,columnNumber:13},this),Object(h.jsxDEV)(s.a,{labelname:"\u5546\u6237\u56de\u8c03\u901a\u77e5\u7f51\u5173\u5730\u5740",prop:"notify_url",children:Object(h.jsxDEV)(n.a,{onChange:e=>N({notify_url:e}),onClearItem:()=>N({notify_url:""}),countShow:!1,value:p.notify_url,placeholder:"\u8bf7\u8f93\u5165\u7f51\u5173\u5730\u5740",labelWidth:"0px",height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:Vi,lineNumber:217,columnNumber:15},this)},void 0,!1,{fileName:Vi,lineNumber:216,columnNumber:13},this),Object(h.jsxDEV)(s.a,{labelname:"\u5546\u6237\u72b6\u6001",children:Object(h.jsxDEV)(Q.a,{onChange:({target:e})=>N({status:e.value}),value:p.status,children:[Object(h.jsxDEV)(Z.a,{value:1,children:"\u6b63\u5e38"},void 0,!1,{fileName:Vi,lineNumber:234,columnNumber:17},this),Object(h.jsxDEV)(Z.a,{value:2,children:"\u7981\u7528"},void 0,!1,{fileName:Vi,lineNumber:235,columnNumber:17},this)]},void 0,!0,{fileName:Vi,lineNumber:230,columnNumber:15},this)},void 0,!1,{fileName:Vi,lineNumber:229,columnNumber:13},this),Object(h.jsxDEV)(s.a,{labelname:"\u5bf9\u63a5\u7c7b\u578b",prop:"api_mode",children:Object(h.jsxDEV)(Q.a,{onChange:({target:e})=>{N({api_mode:e.value})},value:p.api_mode,children:null===(b=p.apiMode)||void 0===b?void 0:b.map((e=>Object(h.jsxDEV)(Z.a,{value:e.key,children:e.label},e.key,!1,{fileName:Vi,lineNumber:246,columnNumber:19},this)))},void 0,!1,{fileName:Vi,lineNumber:239,columnNumber:15},this)},void 0,!1,{fileName:Vi,lineNumber:238,columnNumber:13},this),Object(h.jsxDEV)(s.a,{labelname:"\u8ba2\u9605\u4e8b\u4ef6",prop:"subscribe_event",required:"",children:Object(h.jsxDEV)(j.a.Group,{value:p.subscribe_event,onChange:e=>N({subscribe_event:e}),children:[Object(h.jsxDEV)(j.a,{value:"KEY.USED",children:"key\u7801\u6838\u9500\u901a\u77e5"},void 0,!1,{fileName:Vi,lineNumber:261,columnNumber:17},this),Object(h.jsxDEV)(j.a,{value:"VOUCHER.USED",children:"\u7acb\u51cf\u91d1\u6838\u9500\u901a\u77e5"},void 0,!1,{fileName:Vi,lineNumber:262,columnNumber:17},this)]},void 0,!0,{fileName:Vi,lineNumber:253,columnNumber:15},this)},void 0,!1,{fileName:Vi,lineNumber:252,columnNumber:13},this)]},void 0,!0,{fileName:Vi,lineNumber:94,columnNumber:11},this)},void 0,!1,{fileName:Vi,lineNumber:93,columnNumber:9},this)},void 0,!1,{fileName:Vi,lineNumber:92,columnNumber:7},this),Object(h.jsxDEV)("div",{className:"distributorbtn",children:[Object(h.jsxDEV)(u.a,{type:"primary",onClick:function(){if(v.current.validator()){N({loading:!0});const e=Object(o.a)(p,["reseller_id","loading"]);Object(a.Xc)(p.reseller_id,e).then((({code:e,message:t})=>{if(200===e){c.a.success("\u4fdd\u5b58\u6210\u529f");let e=setTimeout((()=>{window.history.go(-1),N({loading:!1}),clearTimeout(e)}),1e3)}else N({loading:!1}),c.a.success(t)})).catch((({message:e})=>{N({loading:!1}),c.a.success(e)}))}},loading:p.loading,children:"\u63d0\u4ea4"},void 0,!1,{fileName:Vi,lineNumber:269,columnNumber:9},this),Object(h.jsxDEV)(u.a,{type:"normal",onClick:()=>window.history.back(),children:"\u53d6\u6d88"},void 0,!1,{fileName:Vi,lineNumber:272,columnNumber:9},this)]},void 0,!0,{fileName:Vi,lineNumber:268,columnNumber:7},this)]},void 0,!0,{fileName:Vi,lineNumber:91,columnNumber:5},this)}},{path:"/home/exchangecode-list",component:na},{path:"/home/combining-list",component:ca},{path:"/home/exchange-addcommodity",component:Ci},{path:"/home/system/account-list",component:gl},{path:"/home/exchangecode-exchangecodeAdd",component:Ji},{path:"/home/combiningAdd",component:ia},{path:"/home/coupon-list",component:Kt},{path:"/home/coupon-add-edit",component:Tt},{path:"/home/coupon-commodity",component:Bt},{path:"/home/callback-message",component:function(){const e=Object(r.useRef)(),[t,i]=Object(r.useState)({voucher_status_notify:"",voucher_receive_notify:"",loading:!1}),m=sessionStorage.getItem("callBackId"),p=Number(sessionStorage.getItem("callBackType"));return Object(r.useEffect)((()=>{!function(){const e={reseller_id:"",plan_id:"",key_batch_id:""};switch(p){case 1:e.reseller_id=m;break;case 2:e.plan_id=m;break;case 3:e.key_batch_id=m}Object(a.Mc)(e).then((e=>{const{voucher_notify_url:a,voucher_receive_url:s}=e.data;i({...t,voucher_status_notify:a,voucher_receive_notify:s})}))}()}),[]),Object(h.jsxDEV)("div",{className:"maincenter",children:[Object(h.jsxDEV)(d.a,{style:{width:"100%"},title:"\u8bbe\u7f6e\u56de\u8c03\u57df\u540d",children:Object(h.jsxDEV)("div",{className:"adddistributor merchantForm",children:Object(h.jsxDEV)(l.a,{model:t,ref:e,children:[Object(h.jsxDEV)(s.a,{labelname:"\u5238\u72b6\u6001\u901a\u77e5\u5730\u5740",prop:"voucher_status_notify",required:"",children:Object(h.jsxDEV)(n.a,{onChange:e=>i({...t,voucher_status_notify:e}),onClearItem:()=>i({...t,voucher_status_notify:""}),countShow:!1,value:t.voucher_status_notify,placeholder:"\u8bf7\u8f93\u5165\u5238\u72b6\u6001\u901a\u77e5\u5730\u5740",labelWidth:"0px",height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:b,lineNumber:129,columnNumber:15},this)},void 0,!1,{fileName:b,lineNumber:128,columnNumber:13},this),Object(h.jsxDEV)(s.a,{labelname:"\u5238\u9886\u53d6\u901a\u77e5\u5730\u5740",prop:"voucher_receive_notify",required:"",children:Object(h.jsxDEV)(n.a,{onChange:e=>i({...t,voucher_receive_notify:e}),onClearItem:()=>i({...t,voucher_receive_notify:""}),countShow:!1,value:t.voucher_receive_notify,placeholder:"\u8bf7\u8f93\u5165\u5238\u9886\u53d6\u901a\u77e5\u5730\u5740",labelWidth:"0px",height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:b,lineNumber:142,columnNumber:15},this)},void 0,!1,{fileName:b,lineNumber:141,columnNumber:13},this)]},void 0,!0,{fileName:b,lineNumber:127,columnNumber:11},this)},void 0,!1,{fileName:b,lineNumber:126,columnNumber:9},this)},void 0,!1,{fileName:b,lineNumber:125,columnNumber:7},this),Object(h.jsxDEV)("div",{className:"distributorbtn",children:[Object(h.jsxDEV)(u.a,{type:"primary",onClick:function(){const e=/(https?|ftp|file):\/\/[-A-Za-z0-9+&@#\/%?=~_|!:,.;]+[-A-Za-z0-9+&@#\/%=~_|]/,{voucher_status_notify:s,voucher_receive_notify:l}=t;if(s&&!e.test(s))return c.a.warn("\u8bf7\u5165\u5408\u6cd5\u7684\u5238\u72b6\u6001\u901a\u77e5\u5730\u5740\uff01");if(l&&!e.test(l))return c.a.warn("\u8bf7\u5165\u5408\u6cd5\u7684\u5238\u9886\u53d6\u901a\u77e5\u5730\u5740\uff01");i({loading:!0});const n=Object(o.a)(t,["loading"]);switch(p){case 1:n.reseller_id=m,Object(a.Yc)(n).then((({code:e,message:t})=>{if(200===e){c.a.success(t);let e=null;e=setTimeout((()=>{window.history.go(-1),clearTimeout(e)}),1e3)}else c.a.error(t);i({loading:!1})}));break;case 2:n.plan_id=m,Object(a.Wc)(n).then((({code:e,message:t})=>{if(200===e){c.a.success(t);let e=null;e=setTimeout((()=>{window.history.go(-1),clearTimeout(e)}),1e3)}else c.a.error(t);i({loading:!1})}));break;case 3:n.key_batch_id=m,Object(a.Vc)(n).then((({code:e,message:t})=>{if(200===e){c.a.success(t);let e=null;e=setTimeout((()=>{window.history.go(-1),clearTimeout(e)}),1e3)}else c.a.error(t);i({loading:!1})}))}},loading:t.loading,children:"\u63d0\u4ea4"},void 0,!1,{fileName:b,lineNumber:158,columnNumber:9},this),Object(h.jsxDEV)(u.a,{type:"normal",onClick:()=>window.history.back(),children:"\u53d6\u6d88"},void 0,!1,{fileName:b,lineNumber:161,columnNumber:9},this)]},void 0,!0,{fileName:b,lineNumber:157,columnNumber:7},this)]},void 0,!0,{fileName:b,lineNumber:124,columnNumber:5},this)}}],dn=["/home/extension","/home/plan-create","/home/mytempMould","/home/edittemplate"],un=[{id:14,icon:"",title:"\u7cfb\u7edf\u7ba1\u7406",level:1,router:"/system",children:[{id:20,title:"\u8d26\u53f7\u7ba1\u7406",level:5,router:"/home/system/account-list",code:["get-auth-admin"]},{id:23,title:"\u83dc\u5355\u7ba1\u7406",level:5,router:"/home/system/menu",code:["get-auth-menu-tree"]},{id:22,title:"\u5c97\u4f4d\u7ba1\u7406",level:5,router:"/home/system/station",code:["get-auth-departmentjob"]},{id:21,title:"\u89d2\u8272\u7ba1\u7406",level:5,router:"/home/system/role-list",code:["get-auth-adminrole"]},{id:24,title:"\u5b9a\u5236\u5316\u6a21\u677f",level:5,router:"/home/system/customize",code:["post-plan-theme-custom"]},{id:133,title:"\u7cfb\u7edf\u8425\u9500\u6a21\u677f",level:5,router:"/home/system/my-mould",code:["get-plan-theme-system"]},{id:138,title:"\u5b50\u8d26\u53f7\u7ba1\u7406",level:5,router:"/home/system/subaccount-list",children:[{id:140,title:"\u8d26\u53f7\u5217\u8868",level:5,router:"/home/system/subaccount-list",code:["get-auth-admin-sonindex"]}]}]},{id:15,icon:"",title:"\u5206\u9500\u5546\u7ba1\u7406",level:1,router:"/home/distributor-list",children:[{id:65,title:"\u5206\u9500\u5546\u5217\u8868",level:5,router:"/home/distributor-list",code:["get-reseller"]}]},{id:16,icon:"",title:"\u8425\u9500\u8ba1\u5212\u7ba1\u7406",level:1,router:"/home/plan-list",children:[{id:75,title:"\u8425\u9500\u8ba1\u5212\u5217\u8868",level:5,router:"/home/plan-list",code:["get-plan"]},{id:184,title:"Keys\u67e5\u8be2",level:5,router:"/home/plan-keyList",code:["get-keys"]},{id:214,title:"\u4e8c\u7ef4\u7801\u5c0f\u5de5\u5177",level:5,router:"/home/plan-qrcode",code:["qrcodetool"]}]},{id:17,icon:"",title:"\u5151\u6362\u7801\u7ba1\u7406",level:1,router:"/home/exchangecode-list",children:[{id:82,title:"\u5151\u6362\u7801\u5217\u8868",level:5,router:"/home/exchangecode-list",code:["get-codes"]},{id:188,title:"\u7ec4\u5408\u5546\u54c1\u5217\u8868",level:5,router:"/home/combining-list",code:["get-codes"]}]},{id:195,icon:"",title:"\u4f18\u60e0\u5238\u7ba1\u7406",level:1,router:"/home/coupon-list",children:[{id:196,title:"\u4f18\u60e0\u5238\u5217\u8868",level:5,router:"/home/coupon-list",code:["get-coupon"]}]},{id:18,icon:"",title:"\u843d\u5730\u9875\u7ba1\u7406",level:1,router:"/home/exchangepage",children:[{id:118,title:"\u843d\u5730\u9875\u5217\u8868",level:5,router:"/home/exchangepage",code:["get-plan-theme"]},{id:119,title:"\u6211\u7684\u6a21\u677f",level:5,router:"/home/myexchangetemplate",code:["get-plan-theme"]},{id:175,title:"\u6a21\u677f\u4e2d\u5fc3",level:5,router:"/home/mytempMould",code:["get-plan-theme-getthemetype"]}]},{id:19,icon:"",title:"\u8ba2\u5355\u7ba1\u7406",level:1,router:"/home/order-list",children:[{id:98,title:"\u8ba2\u5355\u5217\u8868",level:5,router:"/home/order-list",code:["get-order"]},{id:202,title:"\u5305\u7801\u7ed3\u7b97\u8ba2\u5355\u5217\u8868",level:5,router:"/home/settlementList",code:["get-settlement_order-list"]},{id:215,title:"\u8ba2\u5355\u4e0b\u8f7d\u5217\u8868",level:5,router:"/home/download-orderlist",code:["order_download_list"]}]}]},437:function(e,t,i){},509:function(e,t,i){"use strict";i.r(t),i.d(t,"default",(function(){return N}));var a=i(59),s=i(276),l=i(507),n=i(455);let o=[];function r(e=[]){e.map((e=>{e.children&&e.children.length?r(e.children):e.code&&(Object(l.a)(o,e.code).length?e.auth=!0:e.auth=!1)}))}function m(e,t=[]){return e.map((e=>{if(e.auth){const{id:i,title:a,icon:s,router:l,level:n,children:o}=e;t.push({id:i,title:a,icon:s,router:l,level:n,children:o?m(o):void 0})}})),t}function c(e){o=e;const t=Object(n.a)(s.c);return r(t),function(e){e.map((e=>{e.children.map((e=>{var t;e.children&&(e.auth=!(null===(t=e.children)||void 0===t||!t.filter((e=>e.auth)).length))}))})),e.map((e=>{var t;e.auth=!(null===(t=e.children)||void 0===t||!t.filter((e=>e.auth)).length)}))}(t),m(t)}var d=i(1),u=i(390),h=i(211),b=(i(437),i(10)),p="/Users/zhangds/web/blue-brother/frontend/src/pages/login/login.js";class N extends d.Component{constructor(e){super(e),this.getQuery=e=>(e.match(/([^?=&]+)(=([^&]*))/g)||[]).reduce(((e,t)=>(e[t.slice(0,t.indexOf("="))]=t.slice(t.indexOf("=")+1),e)),{}),window.react=this}componentWillMount(){const{token:e,head:t}=this.getQuery(this.props.location.search);if(e)return sessionStorage.setItem("authorization",e),void this.onSubmit(e,t);this.toUnifiedLogin()}toUnifiedLogin(){setTimeout((()=>{window.location.href=`http://gray.user.1688sup.com/#/login?url=${encodeURIComponent(window.location.href)}`}),1500)}getAccountList(){Object(a.Jb)().then((e=>{e?sessionStorage.setItem("isEarlyWarningMan",!0):sessionStorage.setItem("isEarlyWarningMan",!1)}))}onSubmit(e,t){Object(a.pc)({authorization:e,head:t}).then((e=>{Object(a.Tb)(e,((e,t)=>{Object(a.N)().then((e=>{Object(a.Tb)(e,((e,t)=>{sessionStorage.setItem("enmu",JSON.stringify(e))}))})),Object(a.S)().then((({codes:e})=>{let i=c(e);if(u.a.clear(),u.a.success(t),this.getProductList(),this.getAccountList(),sessionStorage.setItem("showflag",!0),i&&i.length>0){var a;sessionStorage.setItem("activeMenu",JSON.stringify(i));let e=i.filter((e=>16==e.id));if(e&&(null===(a=e[0])||void 0===a?void 0:a.children.length)>0)sessionStorage.setItem("linkshowname","\u8425\u9500\u8ba1\u5212\u7ba1\u7406"),sessionStorage.setItem("pathname2","/home/plan-list"),sessionStorage.setItem("menulinklist",JSON.stringify(e[0].children)),setTimeout((()=>{this.props.history.replace("/home/plan-list")}),1e3);else try{i.forEach((e=>{e.children&&e.children.length>0?e.children.forEach((t=>{if(5==t.level)throw sessionStorage.setItem("pathname2",t.router),sessionStorage.setItem("linkshowname",e.title),sessionStorage.setItem("menulinklist",JSON.stringify(e.children)),setTimeout((()=>{this.props.history.replace(t.router)}),1e3),"\u7ec8\u6b62\u5faa\u73af"})):(u.a.clear(),u.a.warn("\u8bf7\u5148\u8054\u7cfb\u7ba1\u7406\u5458\u914d\u7f6e\u6743\u9650\u83dc\u5355"))}))}catch(s){}}else u.a.clear(),u.a.warn("\u8bf7\u5148\u8054\u7cfb\u7ba1\u7406\u5458\u914d\u7f6e\u6743\u9650\u83dc\u5355")}))}),(t=>{-2==e.code||u.a.clear(),u.a.error(e.message)}))})).catch((e=>{}))}getProductList(){Object(a.tb)().then((e=>{Object(a.Tb)(e,((e,t)=>{sessionStorage.setItem("updatetime",Date.now()),sessionStorage.setItem("productsList",JSON.stringify(e.data))}),(e=>{}))}))}render(){return Object(b.jsxDEV)("div",{className:"loginPage",children:Object(b.jsxDEV)(h.a,{className:"loading",icon:"circle",iconText:"\u62fc\u547d\u8df3\u8f6c\u4e2d \xb7\xb7\xb7\xb7",loading:!0,iconSize:30},void 0,!1,{fileName:p,lineNumber:151,columnNumber:9},this)},void 0,!1,{fileName:p,lineNumber:150,columnNumber:7},this)}}},82:function(e,t,i){},87:function(e,t,i){}}]); \ No newline at end of file +/*! For license information please see 7.0c8f10fc.chunk.js.LICENSE.txt */ +(this.webpackJsonpmarketingsystem=this.webpackJsonpmarketingsystem||[]).push([[7],{102:function(e,t,i){},136:function(e,t,i){},137:function(e,t,i){},190:function(e,t,i){},191:function(e,t,i){},194:function(e,t,i){},195:function(e,t,i){},215:function(e,t,i){},217:function(e,t,i){},218:function(e,t,i){},219:function(e,t,i){},220:function(e,t,i){},221:function(e,t,i){},222:function(e,t,i){},223:function(e,t,i){},224:function(e,t,i){},225:function(e,t,i){},226:function(e,t,i){},232:function(e,t,i){},233:function(e,t,i){},234:function(e,t,i){},236:function(e,t,i){},237:function(e,t,i){},238:function(e,t,i){},239:function(e,t,i){},244:function(e,t,i){},245:function(e,t,i){},246:function(e,t,i){},247:function(e,t,i){},248:function(e,t,i){},249:function(e,t,i){},250:function(e,t,i){},251:function(e,t,i){},252:function(e,t,i){},253:function(e,t,i){},254:function(e,t,i){},255:function(e,t,i){},257:function(e,t,i){},258:function(e,t,i){},259:function(e,t,i){},260:function(e,t,i){},261:function(e,t,i){},262:function(e,t,i){},263:function(e,t,i){},264:function(e,t,i){},265:function(e,t,i){},266:function(e,t,i){},267:function(e,t,i){},268:function(e,t,i){},269:function(e,t,i){},270:function(e,t,i){},271:function(e,t,i){},272:function(e,t,i){},273:function(e,t,i){},274:function(e,t,i){},275:function(e,t,i){},276:function(e,t,i){"use strict";i.d(t,"a",(function(){return dn})),i.d(t,"b",(function(){return cn})),i.d(t,"c",(function(){return un}));var a=i(59),s=i(62),l=i(63),n=i(61),o=i(490),r=i(1),m=i.n(r),c=i(390),d=i(453),u=i(177),h=i(10),b="/Users/zhangds/web/blue-brother/frontend/src/pages/callbackMessage/index.jsx";var p=i(24),N=i.n(p),j=(i(190),i(196)),v=i(454),g=i(167),f=i(512),_=i(510),x=i(419),y=(i(191),i(511)),O=i(501),D=i(423),E="/Users/zhangds/web/blue-brother/frontend/src/components/pagination/main.js";class V extends m.a.Component{constructor(e){super(e),this.state={count:10,page:1|e.page,visible:!1,jump_page:"",page_num:"",dataCount:this.props.data}}getPageArr(e,t,i){var a,s=[].concat(e),l=s.length,n="\u2026";if(t=Math.max(1,Math.min(t,l)),l<=i)return s[t-1]=""+s[t-1],s;for(s=[""+t],a=(i=Math.max(5,i||7))-1;;){var o=+s[0],r=+s[s.length-1];if(o>1&&(s.unshift(o-1),!--a))break;if(rt?t:e.target.value;this.setState({jump_page:i})}onJumpPage(e){""!=e&&(this.setState({page:e}),this.props.onJumpPage(e),this.setState({jump_page:""}))}onMenuClick(e,t){switch(this.onJumpPage(1),t){case"1":this.setState({count:10}),this.props.onCountChange(10);break;case"2":this.setState({count:20}),this.props.onCountChange(20);break;case"3":this.setState({count:50}),this.props.onCountChange(50);break;case"4":this.setState({count:100}),this.props.onCountChange(100);break;case"5":this.setState({count:200}),this.props.onCountChange(200)}this.setState({visible:!1})}componentWillMount(){}componentWillReceiveProps(e){e.page&&this.setState({page:e.page})}render(){const{data:e}=this.props;let t=Math.ceil(e.count/this.state.count),i=[];for(let s=1;sthis.setState({visible:e}),children:[Object(h.jsxDEV)(y.b,{children:Object(h.jsxDEV)("div",{className:"show-count",children:[Object(h.jsxDEV)("span",{className:"count-value",children:[" ",this.state.count]},void 0,!0,{fileName:E,lineNumber:179,columnNumber:19},this)," ",Object(h.jsxDEV)(g.a,{type:"down"},void 0,!1,{fileName:E,lineNumber:179,columnNumber:76},this)," "]},void 0,!0,{fileName:E,lineNumber:178,columnNumber:17},this)},void 0,!1,{fileName:E,lineNumber:177,columnNumber:15},this),Object(h.jsxDEV)(y.c,{children:Object(h.jsxDEV)(O.a,{onClick:(e,t)=>{this.onMenuClick(e,t)},className:"mymenu",children:[Object(h.jsxDEV)(D.a,{children:"10"},1,!1,{fileName:E,lineNumber:189,columnNumber:19},this),Object(h.jsxDEV)(D.a,{children:"20"},2,!1,{fileName:E,lineNumber:190,columnNumber:19},this),Object(h.jsxDEV)(D.a,{children:"50"},3,!1,{fileName:E,lineNumber:191,columnNumber:19},this),Object(h.jsxDEV)(D.a,{children:"100"},4,!1,{fileName:E,lineNumber:192,columnNumber:19},this),Object(h.jsxDEV)(D.a,{children:"200"},5,!1,{fileName:E,lineNumber:193,columnNumber:19},this)]},void 0,!0,{fileName:E,lineNumber:183,columnNumber:17},this)},void 0,!1,{fileName:E,lineNumber:182,columnNumber:15},this)]},void 0,!0,{fileName:E,lineNumber:172,columnNumber:13},this)},void 0,!1,{fileName:E,lineNumber:171,columnNumber:11},this),Object(h.jsxDEV)("span",{children:"\u6761"},void 0,!1,{fileName:E,lineNumber:198,columnNumber:11},this),Object(h.jsxDEV)("div",{className:"page-btn-group",children:[Object(h.jsxDEV)(g.a,{onClick:()=>{this.onPrevClick()},type:"left",className:this.state.page>1?"page-prev":"page-prev disabled"},void 0,!1,{fileName:E,lineNumber:200,columnNumber:13},this),"undefined"!=a?a.map(((e,t)=>Object(h.jsxDEV)("div",{onClick:()=>{this.onPageClick(e)},className:e==this.state.page?"btn-page active":"btn-page",children:e},t,!1,{fileName:E,lineNumber:210,columnNumber:21},this))):1,Object(h.jsxDEV)(g.a,{onClick:()=>{this.onNextClick()},type:"right",className:this.state.page>=t?"page-next disabled":"page-next"},void 0,!1,{fileName:E,lineNumber:222,columnNumber:13},this),Object(h.jsxDEV)("div",{className:"jump-button",children:[Object(h.jsxDEV)("div",{className:"jump-button-left",children:Object(h.jsxDEV)("input",{type:"text",value:this.state.jump_page,onChange:e=>{this.onInputChange(e,t)}},void 0,!1,{fileName:E,lineNumber:232,columnNumber:17},this)},void 0,!1,{fileName:E,lineNumber:231,columnNumber:15},this),Object(h.jsxDEV)("div",{className:"jump-button-right",onClick:e=>{this.onJumpPage(this.state.jump_page)},children:"\u8df3\u8f6c"},void 0,!1,{fileName:E,lineNumber:240,columnNumber:15},this)]},void 0,!0,{fileName:E,lineNumber:230,columnNumber:13},this)]},void 0,!0,{fileName:E,lineNumber:199,columnNumber:11},this)]},void 0,!0,{fileName:E,lineNumber:169,columnNumber:9},this)},void 0,!1,{fileName:E,lineNumber:168,columnNumber:7},this)}}i(194),i(195);var k="/Users/zhangds/web/blue-brother/frontend/src/components/inputborder/main.js";class S extends m.a.Component{constructor(e){super(e),this.state={text:e.text,length:e.text.length,maxlength:24}}onChange(e){this.setState({text:e.target.value}),this.inputdoing||this.setState({length:this.state.text.length}),this.props.onChange(e.target.value)}compositionstart(e){this.inputdoing=!0}compositionend(e){this.inputdoing=!1,this.setState({length:this.state.text.length})}render(){return Object(h.jsxDEV)("div",{className:"border-input",children:[Object(h.jsxDEV)("input",{value:this.state.text,onCompositionStart:e=>{this.compositionstart(e)},onCompositionEnd:e=>{this.compositionend(e)},onInput:e=>{this.onChange(e)},maxlength:this.state.maxlength,type:"text"},void 0,!1,{fileName:k,lineNumber:31,columnNumber:9},this),Object(h.jsxDEV)("div",{className:"input-label",children:[this.state.length,"/",this.state.maxlength]},void 0,!0,{fileName:k,lineNumber:45,columnNumber:9},this)]},void 0,!0,{fileName:k,lineNumber:30,columnNumber:7},this)}}var w="/Users/zhangds/web/blue-brother/frontend/src/components/gridEdit/main.js";class C extends m.a.Component{constructor(e){super(e);let t=JSON.parse(JSON.stringify(e.row));this.state={visible:e.visible,row:t,column:e.column,text:e.row[e.column]}}onCancel(){this.props.onCancel()}onOk(){this.props.onOk(this.state.row)}textChange(e){let t=this.state.row;t[this.props.column]=e,this.setState({row:t})}render(){const{pos:e}=this.props;return e.y+156>window.innerHeight&&(e.y=e.y-156),e.x+412>window.innerWidth&&(e.x=e.x-412),Object(h.jsxDEV)("div",{className:"gridEdit",id:"gridEdit",style:{position:"absolute",top:e.y+10,left:e.x+10},children:[",",Object(h.jsxDEV)("div",{className:"gridEdit-title",children:["\u4fee\u6539",this.props.title]},void 0,!0,{fileName:w,lineNumber:44,columnNumber:10},this),Object(h.jsxDEV)("div",{className:"gridEdit-content",children:Object(h.jsxDEV)(S,{text:this.state.text,onChange:e=>{this.textChange(e)}},void 0,!1,{fileName:w,lineNumber:46,columnNumber:11},this)},void 0,!1,{fileName:w,lineNumber:45,columnNumber:9},this),Object(h.jsxDEV)("div",{className:"btn-group",children:[Object(h.jsxDEV)("div",{className:"btn-cancel",onClick:e=>{this.onCancel()},children:"\u53d6\u6d88"},void 0,!1,{fileName:w,lineNumber:54,columnNumber:11},this),Object(h.jsxDEV)("div",{className:"btn-current",onClick:e=>{this.onOk()},children:"\u786e\u5b9a"},void 0,!1,{fileName:w,lineNumber:61,columnNumber:11},this)]},void 0,!0,{fileName:w,lineNumber:53,columnNumber:9},this)]},void 0,!0,{fileName:w,lineNumber:40,columnNumber:7},this)}}var T="/Users/zhangds/web/blue-brother/frontend/src/components/gird/main.js";class I extends m.a.Component{constructor(e){super(e),this.scrollFunc=function(e){},this.AllCheckChange=e=>{if(0==this.state.tableData.length)return;this.setState({indeterminate:!1}),this.setState({allChecked:e.target.checked});Object(f.a)(this.state.tableData,(t=>t.checked=e.target.checked&&!t.disabled));this.setState({tableData:this.state.tableData});let t=Object(_.a)(this.state.tableData,(e=>1==e.checked));this.props.checkChange(t)},this.onConfirm=()=>{},this.onCancel=()=>{},this.total=e=>{let t=0;if(!e.total)return"";for(let i=0;i(e.checked=!1,e)));this.setState({indeterminate:!1}),this.setState({tableData:t})}gridPageLoad(){this.setState({pageLoading:!0}),setTimeout((()=>{this.setState({pageLoading:!1})}),800)}checkChange(e,t){this.state.tableData[e].checked=t.target.checked,this.setState({tableData:this.state.tableData});let i=Object(_.a)(this.state.tableData,(e=>1==e.checked));this.props.checkChange(i),i.length==this.state.tableData.length?(this.setState({indeterminate:!1}),this.setState({allChecked:!0})):0==i.length?(this.setState({indeterminate:!1}),this.setState({allChecked:!1})):this.setState({indeterminate:!0})}getCellValue(e,t){let i=Object(x.a)(t,e);return i||0==i?i:"-"}switchChange(e,t){this.state.tableData[e].switched=t,this.setState({tableData:this.state.tableData})}editRow(e,t,i){this.setState({edit_title:t.title}),this.setState({edit_column:t.prop}),this.setState({curRow:i});let a={};a.x=e.clientX,a.y=e.clientY,this.setState({postion:a}),this.state.historyrow_id==i.id?this.setState({editShow:!this.state.editShow}):(this.setState({editShow:!0}),this.setState({historyrow_id:i.id}))}componentWillReceiveProps(e){this.state.Column!=e.Column&&this.setState({Column:e.Column}),this.state.tableData!=e.tableData&&(this.setState({tableData:e.tableData}),this.setState({page:e.page}),this.setState({page:e.page,emptyText:e.emptyText}),this.setState({dataCount:e.dataCount}),this.scrollPosition())}scrollPosition(){document.getElementById("grid").scrollLeft=0,document.getElementById("grid").scrollTop=0}onCountChange(e){this.props.countChange(e),this.setState({pageCount:e})}pageShow(e){}gridEditChange(e){}getSelectData(){let e=this.state.tableData.filter((e=>1==e.checked));return e=Object(f.a)(e,(e=>Object(o.a)(e,["checked"]))),e}rowItemClick(e){this.setState({curIndex:e})}render(){const{data:e,ComponentHandler:t}=this.props;var i=0;let a=this.state.Column.length>12?"100px":100/(this.state.Column.length-2)+"%";return Object(h.jsxDEV)("div",{children:[Object(h.jsxDEV)("div",{className:"gird",style:{border:this.props.isBorder?"1px solid #dfe1e6":"none"},id:"grid",children:[Object(h.jsxDEV)("div",{className:"th-head",children:[" ",this.props.isMultiple?Object(h.jsxDEV)("div",{className:"th-td",style:{width:"30px",textAlign:"left",background:this.props.headBackgroud},children:[Object(h.jsxDEV)(j.a,{checked:this.state.allChecked,indeterminate:this.state.indeterminate,onChange:this.AllCheckChange,children:" "},void 0,!1,{fileName:T,lineNumber:359,columnNumber:17},this)," "]},void 0,!0,{fileName:T,lineNumber:351,columnNumber:15},this):null," ",this.props.isSwitch?Object(h.jsxDEV)("div",{className:"th-td",style:{width:"30px",textAlign:"left",visibility:"hidden",background:this.props.headBackgroud},children:[Object(h.jsxDEV)(v.a,{size:"small",checked:!0,onChange:()=>{this.switchChange()},children:" "},void 0,!1,{fileName:T,lineNumber:378,columnNumber:17},this)," "]},void 0,!0,{fileName:T,lineNumber:369,columnNumber:15},this):null,this.state.Column.map(((e,t)=>(i="auto"==e.width?a:e.width,Object(h.jsxDEV)("div",{className:"th-td",style:{width:i,justifyContent:e.textAlign,background:this.props.headBackgroud},children:[" ",e.title,e.sort?Object(h.jsxDEV)(g.a,{type:"arrow-down"},void 0,!1,{fileName:T,lineNumber:403,columnNumber:32},this):null," "]},t,!0,{fileName:T,lineNumber:392,columnNumber:17},this))))," "]},void 0,!0,{fileName:T,lineNumber:348,columnNumber:11},this),Object(h.jsxDEV)("div",{className:this.state.pageLoading?"grid-loading show":"grid-loading",children:[Object(h.jsxDEV)("div",{className:"loading-bar"},void 0,!1,{fileName:T,lineNumber:410,columnNumber:13},this),Object(h.jsxDEV)("div",{className:"loading-txt",children:"\u6570\u636e\u52a0\u8f7d\u4e2d,\u8bf7\u8010\u5fc3\u7b49\u5f85"},void 0,!1,{fileName:T,lineNumber:411,columnNumber:13},this)]},void 0,!0,{fileName:T,lineNumber:409,columnNumber:11},this),Object(h.jsxDEV)("div",{className:this.state.pageLoading?"th-body hide":"th-body",style:{maxHeight:this.props.maxheight+"px"},children:[" ",0==this.state.tableData.length?Object(h.jsxDEV)("div",{className:"empty-text",children:[" ",this.state.emptyText," "]},void 0,!0,{fileName:T,lineNumber:419,columnNumber:15},this):this.state.tableData.map(((e,s)=>Object(h.jsxDEV)("div",{className:this.state.curIndex==s?"tr active":"tr",onClick:e=>{this.rowItemClick(s)},style:{background:s%2==0?this.props.spliteColor:"#ffffff"},children:[" ",this.props.isMultiple?Object(h.jsxDEV)("div",{className:"td",style:{width:"30px",textAlign:"left"},children:[Object(h.jsxDEV)(j.a,{checked:e.checked,disabled:e.disabled,onChange:e=>{this.checkChange(s,e)},children:" "},void 0,!1,{fileName:T,lineNumber:442,columnNumber:25},this)," "]},void 0,!0,{fileName:T,lineNumber:435,columnNumber:23},this):null,this.props.isSwitch?Object(h.jsxDEV)("div",{className:"td",style:{width:"30px",textAlign:"left"},children:[Object(h.jsxDEV)(v.a,{size:"small",checked:e.switched,onChange:e=>{this.switchChange(s,e)},loading:this.state.switchLoading,children:" "},void 0,!1,{fileName:T,lineNumber:461,columnNumber:25},this)," "]},void 0,!0,{fileName:T,lineNumber:454,columnNumber:23},this):null,this.state.Column.map(((l,n)=>(i="auto"==l.width?a:l.width,"normal"==l.type?Object(h.jsxDEV)("div",{className:"td",style:{width:i,justifyContent:l.textAlign},children:[" ",this.getCellValue(l.prop,e)]},n,!0,{fileName:T,lineNumber:476,columnNumber:25},this):Object(h.jsxDEV)("div",{className:"td",style:{width:i,justifyContent:l.textAlign},children:[" ",t(l.prop,e,s)," "]},n,!0,{fileName:T,lineNumber:496,columnNumber:25},this))))," "]},s,!0,{fileName:T,lineNumber:423,columnNumber:19},this))),this.state.editShow?Object(h.jsxDEV)(C,{pos:this.state.postion,title:this.state.edit_title,column:this.state.edit_column,onCancel:()=>{this.setState({editShow:!1})},onOk:e=>{this.setState({editShow:!1})},row:this.state.curRow},void 0,!1,{fileName:T,lineNumber:514,columnNumber:15},this):null,Object(h.jsxDEV)("div",{className:"sortbar"},void 0,!1,{fileName:T,lineNumber:528,columnNumber:13},this)]},void 0,!0,{fileName:T,lineNumber:413,columnNumber:11},this),Object(h.jsxDEV)("div",{className:!this.state.pageLoading&&this.props.countbarVisible?"tfoot":"tfoot hide",style:{background:this.props.spliteColor},children:[" ",Object(h.jsxDEV)("div",{className:"th-td-total",style:{width:"130px"},children:["\u603b\u8ba1(",this.state.tableData.length,"\u6761\u6570\u636e):"]},void 0,!0,{fileName:T,lineNumber:540,columnNumber:13},this),this.state.Column.map(((e,t)=>(i="auto"==e.width?a:e.width,Object(h.jsxDEV)("div",{className:"td total",style:{width:i,textAlign:e.textAlign},children:[" ",this.total(e)," "]},t,!0,{fileName:T,lineNumber:552,columnNumber:17},this))))," "]},void 0,!0,{fileName:T,lineNumber:531,columnNumber:11},this)]},void 0,!0,{fileName:T,lineNumber:343,columnNumber:9},this),this.props.isShowPageBar?Object(h.jsxDEV)("div",{className:this.state.pageLoading?"pagebar hide":"pagebar",children:Object(h.jsxDEV)(V,{data:{count:this.props.dataCount},onPrevClick:e=>{this.gridPageLoad(),this.props.pageChange(e)},page:this.props.page,pageFn:e=>this.setState({page:e}),onNextClick:e=>{this.gridPageLoad(),this.props.pageChange(e)},onJumpPage:e=>{this.gridPageLoad(),this.props.pageChange(e)},onCountChange:e=>{this.onCountChange(e)}},void 0,!1,{fileName:T,lineNumber:570,columnNumber:13},this)},void 0,!1,{fileName:T,lineNumber:569,columnNumber:11},this):null]},void 0,!0,{fileName:T,lineNumber:342,columnNumber:7},this)}}I.defaultProps={isShowPageBar:!0,isMultiple:!0,isSwitch:!0,page:"",headBackgroud:"",spliteColor:"#f9fafc",countbarVisible:!0,maxheight:400,isBorder:!1,Column:[{title:"\u63a8\u5e7f\u8ba1\u5212\u540d\u79f0",prop:"name",width:"300px",textAlign:"flex-start",type:"normal",sort:!1,total:!1,valueType:"text"},{title:"\u64cd\u4f5c",prop:"edit",width:"220px",textAlign:"flex-start",type:"slot",sort:!1,total:!1,valueType:"text"},{title:"\u66dd\u5149\u91cf",prop:"num1",width:"auto",textAlign:"left",type:"normal",sort:!0,total:!0,valueType:"number"},{title:"\u70b9\u51fb\u91cf",prop:"num2",width:"auto",textAlign:"left",type:"normal",sort:!0,total:!0,valueType:"number"},{title:"\u70b9\u51fb\u7387",prop:"num3",width:"auto",textAlign:"left",type:"normal",sort:!0,total:!0,valueType:"percentage"},{title:"\u70b9\u51fb\u5747\u4ef7",prop:"price",width:"auto",textAlign:"left",type:"normal",sort:!0,total:!0,valueType:"price"},{title:"\u82b1\u8d39",prop:"totalprice",width:"auto",textAlign:"left",type:"normal",sort:!0,total:!0,valueType:"price"}],tableData:[{id:0,name:"\u63a8\u5e7f\u8ba1\u5212-2021-10-19 17:43",num1:0,num2:0,num3:0,price:0,totalprice:0}],emptyText:"\u62b1\u6b49\uff0c\u6682\u65e0\u76f8\u5173\u6570\u636e\u8bb0\u5f55",dataCount:0,curIndex:0};const F=(e,t)=>{var i=0,a=e.toString(),s=t.toString();try{i+=a.split(".")[1].length}catch(l){}try{i+=s.split(".")[1].length}catch(l){}return Number(a.replace(".",""))*Number(s.replace(".",""))/Math.pow(10,i)},L=(e,t)=>{var i,a,s=0,l=0;try{s=e.toString().split(".")[1].length}catch(n){}try{l=t.toString().split(".")[1].length}catch(n){}return i=Number(e.toString().replace(".","")),a=Number(t.toString().replace(".","")),F(i/a,Math.pow(10,l-s))},H=e=>{let t=sessionStorage.getItem("KeyPcType");const i=parseInt(L(e.all_budget,F(e.reduce_amount,e.send_num)));return"2"===t||"3"===t?i:e.stock?e.stock:i},q=e=>{let t={type:2};return t.upstream=P(e.channel),t.only=e,t.product_id=e.goods_id?e.goods_id:e.channel_activity_id,t.product_name=e.batch_goods_name,t.official_price=e.reduce_amount,t.contract_price=e.price,t.quantity=H(e),t.stock=H(e),t.channel_activity_id=e.channel_activity_id,t.all_budget=Number(e.all_budget),t.effectDate=`${e.time_limit.effect_time.start_time} \u81f3 ${e.time_limit.effect_time.end_time}`,t.create_time=e.create_time,t},M=e=>{let t={};const i="1"===e.cash_amount_type?e.denomination:`${e.min_denomination}~${e.max_denomination}`;return t.type=3,t.upstream=P(e.channel),t.only=e,t.product_id=e.goods_id||e.id||e.cash_activity_id,t.product_name=e.batch_goods_name,t.official_price=i,t.contract_price=(e.total_contract_price/e.num).toFixed(2),t.cost_price=i,t.quantity=e.num,t.stock=e.stock||e.num,t.channel_activity_id=e.cash_activity_id,t.all_budget=Number(e.all_budget),t.effectDate=`${e.begin_time} \u81f3 ${e.end_time}`,t};function P(e){switch(Number(e)){case 1:return"\u652f\u4ed8\u5b9d";case 2:return"\u5fae\u4fe1";case 3:return"\u4e91\u95ea\u4ed8"}}function B(){let e=sessionStorage.getItem("phone_number_all")?JSON.parse(sessionStorage.getItem("phone_number_all")):void 0;if(e){const t=e.reduce(((e,t)=>(t.phone_number.forEach((t=>{e.push(t)})),e)),[]),i=new Set(t);return t.length!==i.size}}const A="1\u3001\u7acb\u51cf\u91d1\u81ea\u9886\u53d6\u4e4b\u65e5\u8d7730\u5929\u6709\u6548\uff0c\u8bf7\u5728\u6709\u6548\u671f\u5185\u4f7f\u7528\n
2\u3001\u5fae\u4fe1\u7acb\u51cf\u91d1\u81ea\u9886\u53d6\u540e\u6bcf\u4e2a\u7acb\u51cf\u91d1\u4e00\u6b21\u6027\u4f7f\u7528\uff0c\u4e0d\u5151\u6362\uff0c\u4e0d\u627e\u96f6\uff0c\u5230\u671f\u540e\u81ea\u52a8\u5931\u6548\uff0c\u903e\u671f\u672a\u4f7f\u7528\u4e0d\u518d\u8865\u53d1\u3002\u4f7f\u7528\u5fae\u4fe1\u652f\u4ed8\u8fdb\u884c\u4ed8\u6b3e\uff08\u5927\u4e8e\u7acb\u51cf\u91d1\u9762\u989d0.01\u5143\u4ee5\u4e0a\uff09\u5373\u53ef\u81ea\u52a8\u62b5\u6263\n
3\u3001\u591a\u5f20\u7acb\u51cf\u91d1\u53ef\u5728\u5355\u7b14\u5fae\u4fe1\u652f\u4ed8\u8ba2\u5355\u4e2d\u4e00\u8d77\u4f7f\u7528\uff0c\u4f46\u5f53\u7528\u6237\u7684\u7acb\u51cf\u91d1\u8d85\u8fc78\u5f20\u65f6\uff0c\u7cfb\u7edf\u4f1a\u9009\u53d6\u5176\u4e2d\u4e00\u90e8\u5206\u4f7f\u7528\uff0c\u4e0d\u4fdd\u8bc1\u5728\u4e00\u5f20\u8ba2\u5355\u4e2d\u5168\u90e8\u4f7f\u7528\n
4\u3001\u5728\u4e2d\u56fd\u5883\u5185\u5546\u6237\u4f7f\u7528\u5fae\u4fe1\u652f\u4ed8\u5373\u53ef\u4f7f\u7528\uff0c\u5c11\u6570\u7279\u5b9a\u5546\u6237\uff08\u5305\u62ec\u4f46\u4e0d\u9650\u4e8e\uff1aCoCo\u5976\u8336\u3001\u4f18\u8863\u5e93\u3001\u661f\u5df4\u514b\u3001\u80af\u5fb7\u57fa\u3001\u5fc5\u80dc\u5ba2\u3001\u540c\u7a0b\u827a\u9f99\u3001\u70ed\u98ce\u3001\u592a\u5e73\u9e1f\u3001\u5b69\u5b50\u738b\u3001\u822a\u8054\u4fdd\u9669\u3001\u534e\u4e3a\u5546\u57ce\u3001Miss Sixty\u3001Ochirly\u3001Apple\u5546\u57ce\u3001FivePlus\u3001\u4fe1\u7528\u5361\u8fd8\u6b3e\u3001\u96f6\u94b1\u901a\u3001\u7406\u8d22\u901a\u7b49\uff09\u3001\u4ee5\u53ca\u793e\u4ea4\u652f\u4ed8\uff08\u5982\u8f6c\u8d26\u3001\u7ea2\u5305\u3001\u4e2a\u4eba\u6536\u6b3e\u7801\u652f\u4ed8\u7b49\uff09\u53ca\u5408\u5355\u652f\u4ed8\uff08\u5fae\u4fe1\u652f\u4ed8\u8ba2\u5355\u53f7\u4e3a44\u5f00\u5934\u7684\u4ea4\u6613\uff09\u65e0\u6cd5\u4f7f\u7528\u7acb\u51cf\u91d1'\n
5\u3001\u4f7f\u7528\u7acb\u51cf\u91d1\u7684\u5fae\u4fe1\u652f\u4ed8\u8ba2\u5355\uff0c\u5982\u53d1\u751f\u5168\u989d\u9000\u6b3e\uff0c\u4e14\u7acb\u51cf\u91d1\u4ecd\u5728\u6709\u6548\u671f\u5185\uff0c\u7acb\u51cf\u91d1\u5c06\u81ea\u52a8\u9000\u8fd8\u7ed9\u7528\u6237\uff0c\u5982\u7acb\u51cf\u91d1\u5df2\u8fc7\u671f\uff0c\u5219\u4e0d\u9000\u8fd8\u7ed9\u7528\u6237\uff1b\u5982\u53d1\u751f\u90e8\u5206\u9000\u6b3e\uff0c\u7528\u6237\u652f\u4ed8\u91d1\u989d\u5c06\u6309\u6bd4\u4f8b\u539f\u8def\u9000\u8fd8\uff0c\u7acb\u51cf\u91d1\u5c06\u4e0d\u9000\u8fd8\u7ed9\u7528\u6237",z="1\u3001\u7acb\u51cf\u91d1\u81ea\u9886\u53d6\u4e4b\u65e5\u8d777\u5929\u6709\u6548\uff0c\u8bf7\u5728\u6709\u6548\u671f\u5185\u4f7f\u7528\n
2\u3001\u652f\u4ed8\u5b9d\u7acb\u51cf\u91d1\u81ea\u9886\u53d6\u540e\u6bcf\u4e2a\u7acb\u51cf\u91d1\u4e00\u6b21\u6027\u4f7f\u7528\uff0c\u4e0d\u5151\u6362\u3001\u4e0d\u627e\u96f6\uff0c\u5230\u671f\u540e\u81ea\u52a8\u5931\u6548\uff0c\u903e\u671f\u672a\u4f7f\u7528\u4e0d\u518d\u8865\u53d1\u3002\u4f7f\u7528\u652f\u4ed8\u5b9d\u652f\u4ed8\u8fdb\u884c\u4ed8\u6b3e(\u5927\u4e8e\u7acb\u51cf\u91d1\u9762\u989d0.01\u5143\u4ee5\u4e0a)\u5373\u53ef\u81ea\u52a8\u62b5\u6263\n
3\u3001\u591a\u5f20\u7acb\u51cf\u91d1\u53ef\u5728\u5355\u7b14\u652f\u4ed8\u5b9d\u652f\u4ed8\u8ba2\u5355\u4e2d\u4e00\u8d77\u4f7f\u7528\uff0c\u4f46\u5f53\u7528\u6237\u7684\u7acb\u51cf\u91d1\u8d85\u8fc78\u5f20\u65f6\uff0c\u7cfb\u7edf\u4f1a\u9009\u53d6\u5176\u4e2d\u4e00\u90e8\u5206\u4f7f\u7528\uff0c\u4e0d\u4fdd\u8bc1\u5728\u4e00\u5f20\u8ba2\u5355\u4e2d\u5168\u90e8\u4f7f\u7528\n
4\u3001\u4f7f\u7528\u7acb\u51cf\u91d1\u7684\u652f\u4ed8\u5b9d\u652f\u4ed8\u8ba2\u5355\uff0c\u5982\u53d1\u751f\u5168\u989d\u9000\u6b3e\uff0c\u4e14\u7acb\u51cf\u91d1\u4ecd\u5728\u6709\u6548\u671f\u5185\uff0c\u7acb\u51cf\u91d1\u5c06\u81ea\u52a8\u9000\u8fd8\u7ed9\u7528\u6237\uff0c\u5982\u7acb\u51cf\u91d1\u5df2\u8fc7\u671f\uff0c\u5219\u4e0d\u9000\u8fd8\u7ed9\u7528\u6237;\u5982\u53d1\u751f\u90e8\u5206\u9000\u6b3e\uff0c\u7528\u6237\u652f\u4ed8\u91d1\u989d\u5c06\u6309\u6bd4\u4f8b\u539f\u8def\u9000\u8fd8\uff0c\u7acb\u51cf\u91d1\u5c06\u4e0d\u9000\u8fd8\u7ed9\u7528\u6237",J="\u6e29\u99a8\u63d0\u793a\uff1a\u5355\u7b14\u4ea4\u6613\u5927\u4e8eX.01\u5143\u53ef\u7528\u7acb\u51cfX\u5143\uff01\u540c\u4e00\u6279\u6b21\u6d3b\u52a8\uff08\u540c\u4e00\u5238\u7f16\u7801\u4e3a\u540c\u4e00\u6279\u6b21\u6d3b\u52a8\uff09\u5355\u65e5\u9886\u53d6\u4e0a\u9650\u4e3a10\u5f20\uff0c\u603b\u9886\u53d6\u4e0a\u9650\u4e3a30\u5f20\uff01\n
1.\u5f53\u4ea4\u6613\u65f6\u4f7f\u7528\u4e91\u95ea\u4ed8\u6d88\u8d39\u5238\u62b5\u6263\uff0c\u5982\u53d1\u751f\u64a4\u9500\u3001\u9000\u8d27\u7b49\u64cd\u4f5c\u65f6\uff0c\u7528\u6237\u5b9e\u9645\u652f\u4ed8\u91d1\u989d\u539f\u8def\u9000\u56de\u81f3\u652f\u4ed8\u94f6\u884c\u5361\uff0c\u4ec5\u5168\u989d\u9000\u6b3e\u6d88\u8d39\u5361\u5238\u4f1a\u9000\u8fd8\u81f3\u7528\u6237\uff08\u90e8\u5206\u9000\u6b3e\u5361\u5238\u4e0d\u4f1a\u9000\u56de\uff09\uff0c\u5238\u9000\u56de\u65e5\u671f\u4e3aD+1\u4e2a\u5de5\u4f5c\u65e5\uff0c\u903e\u671f\u4f5c\u5e9f\uff1b\n
2.\u672c\u5238\u9700\u7ed1\u5b9a\u4f17\u90a6\u94f6\u884c\u5361\u4f7f\u7528\uff0c\u4e0d\u53ef\u4e0e\u5176\u4ed6\u4f18\u60e0\u540c\u4eab\uff0c\u8bf7\u4e00\u6b21\u6027\u4f7f\u7528\uff0c\u4e0d\u627e\u96f6\u3001\u4e0d\u5151\u6362\u3001\u4e0d\u63d0\u73b0\u3001\u4e0d\u53ef\u53e0\u52a0\u4f7f\u7528\uff0c\u4e0d\u53ef\u7528\u4e8e\u8d2d\u4e70\u6d3b\u671f\uff0b\u6216\u8005\u5176\u4ed6\u7406\u8d22\u4ea7\u54c1\uff1b\n
3.\u7528\u6237\u4e3b\u626b\u65f6\uff0c\u53ef\u81ea\u4e3b\u9009\u62e9\u662f\u5426\u4f7f\u7528\u6d88\u8d39\u5238\u53ca\u5177\u4f53\u4f7f\u7528\u54ea\u4e00\u5f20\uff1b\u88ab\u626b\u65f6\uff0c\u9ed8\u8ba4\u4f18\u5148\u4f7f\u7528\u7b26\u5408\u89c4\u5219\u4e14\u4f18\u60e0\u6700\u5927\u7684\u6d88\u8d39\u5238\uff1b\n
4.\u7528\u6237\u540c\u4e00\u8d26\u53f7\u6709\u591a\u7c7b\u4e91\u95ea\u4ed8\u6d88\u8d39\u5238\u65f6\uff0c\u4f18\u5148\u4f7f\u7528\u53ef\u62b5\u6263\u91d1\u989d\u5927\u7684\u6d88\u8d39\u5238\u8fdb\u884c\u62b5\u6263\uff1b\u53ef\u62b5\u6263\u91d1\u989d\u76f8\u540c\u65f6\uff0c\u4f18\u5148\u4f7f\u7528\u5148\u83b7\u53d6\u7684\u6d88\u8d39\u5238\u8fdb\u884c\u62b5\u6263\uff1b\u5f53\u540c\u4e00\u7c7b\u4e91\u95ea\u4ed8\u6d88\u8d39\u5238\u6709\u4e0d\u540c\u6709\u6548\u671f\u7684\u91d1\u989d\u65f6\uff0c\u4f18\u5148\u4f7f\u7528\u5373\u5c06\u5230\u671f\u7684\u6d88\u8d39\u5238\u8fdb\u884c\u62b5\u6263\uff1b\n
5.\u5bf9\u4f7f\u7528\u6216\u6d89\u5acc\u4f7f\u7528\u8fdd\u53cd\u6d3b\u52a8\u89c4\u5219\u6216\u4e0d\u6b63\u5f53\u65b9\u5f0f\u5957\u53d6\u94f6\u8054\u4f18\u60e0\u7684\u7528\u6237\u53ca\u5176\u6240\u4f7f\u7528\u7684\u5de5\u5177\uff0c\u5305\u62ec\u4f46\u4e0d\u9650\u4e8e\u624b\u673a\u53f7\u3001\u94f6\u884c\u5361\u53f7\u3001APP\u8d26\u53f7\u7b49\uff0c\u4e2d\u56fd\u94f6\u8054\u548c\u5546\u6237\u6709\u6743\u4e0d\u4e88\u5176\u4f7f\u7528\u4e91\u95ea\u4ed8\u6d88\u8d39\u5238\u3001\u8ffd\u56de\u5df1\u53d1\u653e\u7684\u4e91\u95ea\u4ed8\u6d88\u8d39\u5238\uff1b\n
6.\u7528\u6237\u4f7f\u7528\u6d88\u8d39\u5238\u65f6\uff0c\u8bf7\u5c06 APP \u66f4\u65b0\u5230\u6700\u65b0\u7248\u672c\u3002\u7531\u4e8e\u7528\u6237\u7535\u5b50\u8bbe\u5907\u4e0d\u652f\u6301\u3001APP \u672a\u66f4\u65b0\u5230\u6700\u65b0\u7248\u672c\u3001\u5361\u7247\u6302\u5931\u3001\u6362\u5361\u3001\u8d26\u53f7\u8f93\u9519\u7b49\u81ea\u8eab\u539f\u56e0\u5bfc\u81f4\u65e0\u6cd5\u4eab\u53d7\u4f18\u60e0\u7684\uff0c\u8be5\u4f18\u60e0\u540e\u7eed\u4e0d\u4e88\u8865\u53d1\u3002\n
7.\u672c\u5546\u54c1\u4f7f\u7528\u8fc7\u7a0b\u4e2d\u5982\u6709\u4e0d\u660e\u4e4b\u5904\uff0c\u8bf7\u8054\u7cfb\u4f9b\u5e94\u5546\u6210\u90fd\u84dd\u8272\u5144\u5f1f\u7f51\u7edc\u79d1\u6280\u6709\u9650\u516c\u53f8\u5ba2\u670d\uff1a4001181216";function U(e){return/^[0-9][0-9]*([.][0-9]{1,2})?$/.test(e)}var W=i(521),R=i(456),K=i(67),Y=i.n(K),$=i(164),G=i(499),Q=i(199),Z=i(210),X=i(280),ee=i(506);function te(e,t){let i=new Map;for(let a of e)i.has(a[t])||i.set(a[t],a);return[...i.values()]}function ie(e,t){var i,a,s="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),l=[];if(t=t||s.length,e)for(i=0;it.filter((t=>t.name===e||t.id==e)))).flat(1/0).sort(((e,t)=>e.id-t.id));const a=[];if(function(e){let t=[];t=e instanceof Array?[...e]:Array.from(e.toString());var i=t[0],a=!0;for(var s in t){if(t[s]!=i){a=!1;break}i++}return a}(i.map((e=>e.id)))&&i.length>1)a.push(`${i[0].name} \u81f3 ${i.slice(-1)[0].name}`);else for(var s=0;s{const[i,o]=Object(r.useState)({addNew:""}),[m,d]=Object(r.useState)(!1),b=Object(r.useRef)();return Object(r.useEffect)((()=>{o({...e})}),[e]),Object(h.jsxDEV)(h.Fragment,{children:[Object(h.jsxDEV)("div",{className:"dialog_p",children:[Object(h.jsxDEV)("p",{children:["\u9884\u4f30\u5f53\u524d\u6d88\u8017\u4f59\u989d\u4e3a",Object(h.jsxDEV)("span",{className:"red",children:[" ",Number(null===i||void 0===i?void 0:i.used_amount).toFixed(2)," "]},void 0,!0,{fileName:he,lineNumber:73,columnNumber:11},void 0),"\u5143"]},void 0,!0,{fileName:he,lineNumber:71,columnNumber:9},void 0),Object(h.jsxDEV)("p",{children:["\u9884\u4f30\u5f53\u524d\u5269\u4f59\u4f59\u989d\u4e3a",Object(h.jsxDEV)("span",{className:"green",children:[" ",((null===i||void 0===i?void 0:i.recharge_amount)-(null===i||void 0===i?void 0:i.used_amount)).toFixed(2)," "]},void 0,!0,{fileName:he,lineNumber:77,columnNumber:11},void 0),"\u5143"]},void 0,!0,{fileName:he,lineNumber:75,columnNumber:9},void 0),Object(h.jsxDEV)(l.a,{ref:b,model:i,rules:ue.addNew,children:[Object(h.jsxDEV)(s.a,{id:"addNew",prop:"addNew",labelname:"\u52a0\u6b3e",labelwidth:"60px",children:Object(h.jsxDEV)(n.a,{className:"addNew",onChange:e=>{o({...i,addNew:e})},onClearItem:()=>{o({...i,addNew:""})},kind:"number",value:i.addNew,placeholder:"",labelWidth:"0px",maxLength:16,height:"36px",unit:"\u5143",countShow:!1,width:"260px",alignment:"left"},void 0,!1,{fileName:he,lineNumber:85,columnNumber:13},void 0)},void 0,!1,{fileName:he,lineNumber:84,columnNumber:11},void 0),Object(h.jsxDEV)(s.a,{id:"addNew1",labelname:"\u52a0\u6b3e",labelwidth:"60px",children:Object(h.jsxDEV)(n.a,{className:"addNew",onChange:e=>{},onClearItem:()=>{},kind:"number",value:"",placeholder:"",labelWidth:"0px",maxLength:16,height:"36px",unit:"\u5143",countShow:!1,width:"240px",alignment:"left"},void 0,!1,{fileName:he,lineNumber:106,columnNumber:13},void 0)},void 0,!1,{fileName:he,lineNumber:105,columnNumber:11},void 0)]},void 0,!0,{fileName:he,lineNumber:83,columnNumber:9},void 0),Object(h.jsxDEV)("p",{children:["\u9884\u4f30\u5145\u503c\u540e\u603b\u5145\u503c\u6279\u6b21\u91d1\u989d\u4e3a",Object(h.jsxDEV)("span",{className:"blue",children:[" ",((null===i||void 0===i?void 0:i.recharge_amount)-0+(null!==i&&void 0!==i&&i.addNew?(null===i||void 0===i?void 0:i.addNew)-0:0)).toFixed(2)," "]},void 0,!0,{fileName:he,lineNumber:125,columnNumber:11},void 0),"\u5143"]},void 0,!0,{fileName:he,lineNumber:123,columnNumber:9},void 0),Object(h.jsxDEV)("p",{children:["\u9884\u4f30\u5145\u503c\u540e\u5269\u4f59\u4f59\u989d\u4e3a",Object(h.jsxDEV)("span",{className:"blue",children:[" ",(100*((null===i||void 0===i?void 0:i.recharge_amount)-(null===i||void 0===i?void 0:i.used_amount))/100+(null!==i&&void 0!==i&&i.addNew?i.addNew-0:0)).toFixed(2)," "]},void 0,!0,{fileName:he,lineNumber:137,columnNumber:11},void 0),"\u5143"]},void 0,!0,{fileName:he,lineNumber:135,columnNumber:9},void 0)]},void 0,!0,{fileName:he,lineNumber:70,columnNumber:7},void 0),Object(h.jsxDEV)("p",{className:"dflexajce",children:[Object(h.jsxDEV)(u.a,{onClick:()=>{t(!1,m?Number(i.addNew):0)},children:"\u53d6\u6d88"},void 0,!1,{fileName:he,lineNumber:148,columnNumber:9},void 0),Object(h.jsxDEV)(u.a,{type:"primary",onClick:function(){b.current.validator()&&(Number(null===i||void 0===i?void 0:i.recharge_amount)+Number(i.addNew)<=Number(null===i||void 0===i?void 0:i.all_budget)?Object(a.b)({recharge_amount:i.addNew},e.goods_id).then((e=>{Object(a.Tb)(e,((e,a)=>{c.a.success("\u52a0\u6b3e\u6210\u529f"),d(!0),setTimeout((()=>{!function(){const e=Object(de.a)(i);e.recharge_amount=(Number(i.addNew)+Number(i.recharge_amount)).toFixed(2);let t=[];sessionStorage.getItem("addMoneyData")&&(t=JSON.parse(sessionStorage.getItem("addMoneyData")));let a=t.findIndex((t=>t.channel_activity_id==e.channel_activity_id));-1!==a?t[a]=e:t.push(e);sessionStorage.setItem("addMoneyData",JSON.stringify(t))}(),t(!1,Number(i.addNew))}),1e3)}),(e=>{c.a.error(e)}))})):c.a.error("\u52a0\u6b3e\u5931\u8d25\uff0c\u52a0\u6b3e\u540e\u603b\u5145\u503c\u6279\u6b21\u91d1\u989d\u4e0d\u5141\u8bb8\u5927\u4e8e\u603b\u9884\u7b97"))},htmlType:"submit",children:"\u63d0\u4ea4"},void 0,!1,{fileName:he,lineNumber:155,columnNumber:9},void 0)]},void 0,!0,{fileName:he,lineNumber:147,columnNumber:7},void 0)]},void 0,!0)},pe=i(443),Ne="/Users/zhangds/web/blue-brother/frontend/src/components/knockGold/timeComponent.jsx",je=({data:e})=>{const[t,i]=Object(r.useState)([]);return Object(r.useEffect)((()=>{i(se(e.ruleWeek))}),[e.ruleWeek]),function(){return"received"===e.usable_time?Object(h.jsxDEV)("div",{className:"available_time",children:[Object(h.jsxDEV)("h3",{children:"\u53ef\u7528\u65f6\u95f4"},void 0,!1,{fileName:Ne,lineNumber:13,columnNumber:11},this),Object(h.jsxDEV)("p",{className:"r-f",children:["\u9886\u53d6\u540e",e.effect_date_type.text,",\u6709\u6548\u671f ",e.effect_date," \u5929"]},void 0,!0,{fileName:Ne,lineNumber:14,columnNumber:11},this)]},void 0,!0,{fileName:Ne,lineNumber:12,columnNumber:9},this):"fiexd"===e.usable_time?Object(h.jsxDEV)("div",{className:"available_time",children:[Object(h.jsxDEV)("h3",{children:"\u53ef\u7528\u65f6\u95f4"},void 0,!1,{fileName:Ne,lineNumber:23,columnNumber:11},this),Object(h.jsxDEV)("p",{className:"r-f",children:[e.fixed_time[0]," ~ ",e.fixed_time[1]]},void 0,!0,{fileName:Ne,lineNumber:24,columnNumber:11},this)]},void 0,!0,{fileName:Ne,lineNumber:22,columnNumber:9},this):"week"===e.usable_time?Object(h.jsxDEV)("div",{className:"available_time",children:[Object(h.jsxDEV)("h3",{children:"\u53ef\u7528\u65f6\u95f4"},void 0,!1,{fileName:Ne,lineNumber:33,columnNumber:11},this),Object(h.jsxDEV)("ul",{className:"timeList",children:null===t||void 0===t?void 0:t.map(((t,i)=>Object(h.jsxDEV)("li",{children:[t,e.ruleDate.map((e=>{if(e[1])return Object(h.jsxDEV)("p",{style:{textAlign:"center",marginTop:"5px"},children:[e[0],"~",e[1]]},void 0,!0,{fileName:Ne,lineNumber:41,columnNumber:23},this)}))]},i,!0,{fileName:Ne,lineNumber:36,columnNumber:15},this)))},void 0,!1,{fileName:Ne,lineNumber:34,columnNumber:11},this)]},void 0,!0,{fileName:Ne,lineNumber:32,columnNumber:9},this):"irregular"===e.usable_time?Object(h.jsxDEV)("div",{className:"available_time",children:[Object(h.jsxDEV)("h3",{children:"\u53ef\u7528\u65f6\u95f4"},void 0,!1,{fileName:Ne,lineNumber:54,columnNumber:11},this),Object(h.jsxDEV)("ul",{className:"timeList flex",children:null===(i=e.irregularDate)||void 0===i?void 0:i.map(((t,i)=>Object(h.jsxDEV)("li",{children:[t.join(" \u81f3 "),e.irregularTime.map(((e,t)=>{if(e[1])return Object(h.jsxDEV)("p",{style:{marginTop:"5px"},children:[e[0],"~",e[1]]},t,!0,{fileName:Ne,lineNumber:62,columnNumber:23},this)}))]},i,!0,{fileName:Ne,lineNumber:57,columnNumber:15},this)))},void 0,!1,{fileName:Ne,lineNumber:55,columnNumber:11},this)]},void 0,!0,{fileName:Ne,lineNumber:53,columnNumber:9},this):Object(h.jsxDEV)(h.Fragment,{},void 0,!1);var i}()},ve="/Users/zhangds/web/blue-brother/frontend/src/components/knockGold/mobileComponent.jsx";const ge=[24,100,100,100,80,24,100,100,100,80,100,100,100,80];var fe=({data:e})=>{function t(){const{reduce_amount:t}=e,i={b:"20px",a:"36px"},a=String(parseFloat(t)).length+1;return a>3?{a:36-2.5*(a-3)+"px",b:20-(a-3)+"px"}:i}return Object(h.jsxDEV)("div",{id:"reduceKnockGold",className:"mobile",children:[Object(h.jsxDEV)("div",{className:"couponShow",children:[Object(h.jsxDEV)("div",{className:"coupon-left",children:[Object(h.jsxDEV)("p",{className:"coupon_money",style:{fontSize:t().a},children:[Object(h.jsxDEV)("span",{style:{fontSize:t().b},children:"\uffe5"},void 0,!1,{fileName:ve,lineNumber:26,columnNumber:13},void 0),e.reduce_amount?e.reduce_amount:"0.00"]},void 0,!0,{fileName:ve,lineNumber:25,columnNumber:11},void 0),Object(h.jsxDEV)("p",{className:"full_money",children:["\u6ee1",e.denomination?e.denomination:"0.00","\u53ef\u7528"]},void 0,!0,{fileName:ve,lineNumber:29,columnNumber:11},void 0)]},void 0,!0,{fileName:ve,lineNumber:24,columnNumber:9},void 0),Object(h.jsxDEV)("div",{className:"coupon-right",children:[Object(h.jsxDEV)("p",{className:e.batch_goods_name.length<20?"title":"isTitle",children:[e.batch_goods_name?e.batch_goods_name:"\u7acb\u51cf\u91d1",e.send_num>1?Object(h.jsxDEV)("span",{className:"send_num",children:["x",e.send_num]},void 0,!0,{fileName:ve,lineNumber:34,columnNumber:34},void 0):null]},void 0,!0,{fileName:ve,lineNumber:32,columnNumber:11},void 0),Object(h.jsxDEV)("p",{children:[(null===e||void 0===e?void 0:e.card_type.length)>0?e.card_type.map((e=>("1"===e?"\u501f\u8bb0\u5361":"\u4fe1\u7528\u5361")+" ")):"xxx xxx xxx"," ","\u53ef\u7528"]},void 0,!0,{fileName:ve,lineNumber:36,columnNumber:11},void 0),1==e.timer_show?Object(h.jsxDEV)("p",{className:"validity",children:["\u6709\u6548\u671f:",e.entry_time[0]||"xxxx-xx-xx xx:xx:xx","\u81f3",e.entry_time[1]||"xxxx-xx-xx xx:xx:xx"]},void 0,!0,{fileName:ve,lineNumber:43,columnNumber:13},void 0):null]},void 0,!0,{fileName:ve,lineNumber:31,columnNumber:9},void 0)]},void 0,!0,{fileName:ve,lineNumber:23,columnNumber:7},void 0),Object(h.jsxDEV)("div",{className:"receiveBtn",children:"\u7acb\u5373\u9886\u53d6"},void 0,!1,{fileName:ve,lineNumber:51,columnNumber:7},void 0),Object(h.jsxDEV)("div",{className:"coupon_explain",children:[Object(h.jsxDEV)("h1",{children:"- \u5151\u6362\u8bf4\u660e -"},void 0,!1,{fileName:ve,lineNumber:53,columnNumber:9},void 0),Object(h.jsxDEV)(je,{data:e},void 0,!1,{fileName:ve,lineNumber:54,columnNumber:9},void 0),e.instruction?Object(h.jsxDEV)(h.Fragment,{children:[Object(h.jsxDEV)("div",{className:"content",children:[Object(h.jsxDEV)("h3",{children:"\u4f7f\u7528\u987b\u77e5"},void 0,!1,{fileName:ve,lineNumber:58,columnNumber:15},void 0),Object(h.jsxDEV)("p",{children:["1\u3001\u5728","1"===e.channel?"\u652f\u4ed8\u5b9d":"\u5fae\u4fe1","APP\u5185\u6253\u5f00\u94fe\u63a5\uff0c\u70b9\u51fb\u3010\u4e00\u952e\u9886\u53d6\u3011\u5b8c\u6210\u9886\u53d6","1"===e.channel?"\u652f\u4ed8\u5b9d":"\u5fae\u4fe1","\u7acb\u51cf\u91d1",Object(h.jsxDEV)("br",{},void 0,!1,{fileName:ve,lineNumber:63,columnNumber:17},void 0),"2\u3001","1"===e.channel?"\u652f\u4ed8\u5b9d":"\u5fae\u4fe1","\u91cc\u7acb\u51cf\u91d1\u4e00\u65e6\u9886\u53d6\u4e0d\u53ef\u64a4\u9500\u3001\u4e0d\u53ef\u8f6c\u8ba9\u3002\u6ce8\u610f\u4e0d\u8981\u5c06\u5151\u6362\u5238\u6cc4\u9732\u7ed9\u4ed6\u4eba"]},void 0,!0,{fileName:ve,lineNumber:59,columnNumber:15},void 0)]},void 0,!0,{fileName:ve,lineNumber:57,columnNumber:13},void 0),Object(h.jsxDEV)("div",{className:"content",children:[Object(h.jsxDEV)("h3",{children:"\u4f7f\u7528\u89c4\u5219"},void 0,!1,{fileName:ve,lineNumber:69,columnNumber:15},void 0),Object(h.jsxDEV)("div",{dangerouslySetInnerHTML:{__html:e.instruction}},void 0,!1,{fileName:ve,lineNumber:70,columnNumber:15},void 0)]},void 0,!0,{fileName:ve,lineNumber:68,columnNumber:13},void 0)]},void 0,!0):Object(h.jsxDEV)(pe.a.TextBlock,{className:"TextBlock",animate:!0,widths:ge,rows:14,dashed:!1},void 0,!1,{fileName:ve,lineNumber:78,columnNumber:11},void 0)]},void 0,!0,{fileName:ve,lineNumber:52,columnNumber:7},void 0)]},void 0,!0,{fileName:ve,lineNumber:22,columnNumber:5},void 0)},_e=i(99),xe=i.n(_e),ye="/Users/zhangds/web/blue-brother/frontend/src/components/knockGold/wangEditor.jsx";class Oe extends m.a.Component{constructor(e){super(e),this.state={editorHtml:"",count:0}}componentDidMount(){let e=this;const t=new xe.a("#wangeditorDom");this.setState({editor:t}),t.config.colors=["#696969","#9093a2","#fgddbb","#e3e7eb"],t.config.pasteText=!0,t.config.height=200,t.config.showFullScreen=!1,t.config.menus=["bold","foreColor","italic","indent","link","justify"],t.config.onchange=function(i){var a=t.txt.text();if(0==a.length&&e.props.setEdittext(""),a.length>e.props.limitLength){let i=a.slice(0,e.props.limitLength);return e.setState({editorHtml:i}),t.txt.html(i),void e.props.setEdittext(i)}e.setState({count:a.length}),e.setState({editorHtml:i}),e.props.setEdittext(i)},t.create();const i=setTimeout((()=>{t.txt.html(this.props.text),clearTimeout(i)}),500)}render(){return Object(h.jsxDEV)("div",{className:"countBox_par",children:[Object(h.jsxDEV)("div",{id:"wangeditorDom",style:{width:this.props.width}},void 0,!1,{fileName:ye,lineNumber:54,columnNumber:9},this),Object(h.jsxDEV)("p",{className:"countBox",children:this.state.count+"/"+this.props.limitLength},void 0,!1,{fileName:ye,lineNumber:55,columnNumber:9},this)]},void 0,!0,{fileName:ye,lineNumber:53,columnNumber:7},this)}}var De="/Users/zhangds/web/blue-brother/frontend/src/components/knockGold/ysf-mobileComponent.jsx";const Ee=[24,100,100,100,80,100,100,100,80,100,100,100,80,100,100,100,100];var Ve=({data:e})=>Object(h.jsxDEV)("div",{id:"ysf-knockGoldViews",className:"mobile",children:[Object(h.jsxDEV)("img",{className:"bubble",src:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/ysf-logo.png",alt:""},void 0,!1,{fileName:De,lineNumber:23,columnNumber:7},void 0),Object(h.jsxDEV)("div",{className:"content",children:[Object(h.jsxDEV)("p",{className:"title",children:[e.batch_goods_name||"\u4e91\u95ea\u4ed8\u7acb\u51cf\u91d1",e.send_num>1?Object(h.jsxDEV)("span",{className:"send_num",children:["x",e.send_num]},void 0,!0,{fileName:De,lineNumber:31,columnNumber:32},void 0):null]},void 0,!0,{fileName:De,lineNumber:29,columnNumber:9},void 0),Object(h.jsxDEV)("div",{className:"information",children:[Object(h.jsxDEV)("p",{className:"money",style:{fontSize:function(){const{denomination:t,reduce_amount:i}=e,a={a:"30px"},s=String(parseFloat(t)).length+String(parseFloat(i)).length+1;return s>12?{a:30-1.8*(s-12)+"px"}:a}().a},children:["\u6ee1",e.denomination?parseFloat(e.denomination):100.1,"\u5143\u51cf",e.reduce_amount?parseFloat(e.reduce_amount):99.99,"\u5143"]},void 0,!0,{fileName:De,lineNumber:34,columnNumber:11},void 0),1==e.timer_show?Object(h.jsxDEV)("p",{className:"information-p2",children:["\u8bf7\u5728\xa0",e.entry_time[0]||"2023-12-30 59:59:59"," ~"," ",e.entry_time[1]||"2023-12-30 59:59:59","\xa0\u5185\u9886\u53d6"]},void 0,!0,{fileName:De,lineNumber:39,columnNumber:13},void 0):null,Object(h.jsxDEV)("p",{className:"type",children:Object(h.jsxDEV)("span",{children:(null===e||void 0===e?void 0:e.card_type.length)>0?e.card_type.map((e=>("1"===e?"\u501f\u8bb0\u5361":"\u4fe1\u7528\u5361")+" ")):"xxx"},void 0,!1,{fileName:De,lineNumber:47,columnNumber:13},void 0)},void 0,!1,{fileName:De,lineNumber:46,columnNumber:11},void 0)]},void 0,!0,{fileName:De,lineNumber:33,columnNumber:9},void 0),Object(h.jsxDEV)("div",{className:"form","v-if":"coupon.status===3",children:[Object(h.jsxDEV)("p",{className:"form-label",children:"\u4e91\u95ea\u4ed8\u8d26\u53f7"},void 0,!1,{fileName:De,lineNumber:55,columnNumber:11},void 0),Object(h.jsxDEV)("input",{className:"form-input",disabled:!0,type:"text",placeholder:"\u8bf7\u8f93\u5165\u624b\u673a\u53f7"},void 0,!1,{fileName:De,lineNumber:56,columnNumber:11},void 0),Object(h.jsxDEV)("input",{className:"form-input mt0",disabled:!0,type:"text",placeholder:"\u8bf7\u518d\u6b21\u8f93\u5165\u624b\u673a\u53f7"},void 0,!1,{fileName:De,lineNumber:57,columnNumber:11},void 0),Object(h.jsxDEV)("p",{className:"form-note",children:["\u6e29\u99a8\u63d0\u793a\uff1a\u5355\u7b14\u4ea4\u6613\u5927\u4e8e",e.denomination?parseFloat(e.denomination):100.1,"\u5143\u53ef\u7acb\u51cf",e.reduce_amount?parseFloat(e.reduce_amount):99.99,"\u5143"]},void 0,!0,{fileName:De,lineNumber:58,columnNumber:11},void 0),Object(h.jsxDEV)("button",{className:"form-button",children:"\u7acb\u5373\u9886\u53d6"},void 0,!1,{fileName:De,lineNumber:63,columnNumber:11},void 0)]},void 0,!0,{fileName:De,lineNumber:54,columnNumber:9},void 0),Object(h.jsxDEV)("div",{className:"segmentation",children:[Object(h.jsxDEV)("i",{className:"left"},void 0,!1,{fileName:De,lineNumber:66,columnNumber:11},void 0),Object(h.jsxDEV)("i",{className:"middle"},void 0,!1,{fileName:De,lineNumber:67,columnNumber:11},void 0),Object(h.jsxDEV)("i",{className:"right"},void 0,!1,{fileName:De,lineNumber:68,columnNumber:11},void 0)]},void 0,!0,{fileName:De,lineNumber:65,columnNumber:9},void 0),Object(h.jsxDEV)("div",{className:"illustrate",children:e.instruction||e.usable_time?Object(h.jsxDEV)(h.Fragment,{children:[Object(h.jsxDEV)(je,{data:e},void 0,!1,{fileName:De,lineNumber:73,columnNumber:15},void 0),Object(h.jsxDEV)("h3",{className:"illustrate-title",children:"\u6d3b\u52a8\u8bf4\u660e"},void 0,!1,{fileName:De,lineNumber:74,columnNumber:15},void 0),Object(h.jsxDEV)("p",{className:"illustrate-text",dangerouslySetInnerHTML:{__html:e.instruction}},void 0,!1,{fileName:De,lineNumber:75,columnNumber:15},void 0)]},void 0,!0):Object(h.jsxDEV)(pe.a.TextBlock,{className:"TextBlock",animate:!0,widths:Ee,rows:12,dashed:!1},void 0,!1,{fileName:De,lineNumber:83,columnNumber:13},void 0)},void 0,!1,{fileName:De,lineNumber:70,columnNumber:9},void 0)]},void 0,!0,{fileName:De,lineNumber:28,columnNumber:7},void 0)]},void 0,!0,{fileName:De,lineNumber:22,columnNumber:5},void 0),ke="/Users/zhangds/web/blue-brother/frontend/src/components/knockGold/zfb-mobileComponent.jsx";const Se=[24,100,100,100,80,100,100,100,80,100,100,100,80,100,100,100,100];var we=({data:e})=>Object(h.jsxDEV)("div",{id:"ysf-knockGoldViews",className:"mobile zfb-knockGoldViews",children:[Object(h.jsxDEV)("img",{className:"bubble",src:"https://lsxd-zfb-reduction.oss-cn-hangzhou.aliyuncs.com/img/logo.png",alt:""},void 0,!1,{fileName:ke,lineNumber:23,columnNumber:7},void 0),Object(h.jsxDEV)("div",{className:"content",children:[Object(h.jsxDEV)("p",{className:"title",children:[e.batch_goods_name||"\u652f\u4ed8\u5b9d\u7acb\u51cf\u91d1",e.send_num>1?Object(h.jsxDEV)("span",{className:"send_num",children:["x",e.send_num]},void 0,!0,{fileName:ke,lineNumber:31,columnNumber:32},void 0):null]},void 0,!0,{fileName:ke,lineNumber:29,columnNumber:9},void 0),Object(h.jsxDEV)("div",{className:"information",children:[Object(h.jsxDEV)("p",{className:"money",style:{fontSize:function(){const{denomination:t,reduce_amount:i}=e,a={a:"30px"},s=String(parseFloat(t)).length+String(parseFloat(i)).length+1;return s>12?{a:30-1.8*(s-12)+"px"}:a}().a},children:["\u6ee1",e.denomination?parseFloat(e.denomination):100.1,"\u5143\u51cf",e.reduce_amount?parseFloat(e.reduce_amount):99.99,"\u5143"]},void 0,!0,{fileName:ke,lineNumber:34,columnNumber:11},void 0),1==e.timer_show?Object(h.jsxDEV)("p",{className:"information-p2",children:["\u8bf7\u5728\xa0",e.entry_time[0]||"2023-12-30 59:59:59"," ~"," ",e.entry_time[1]||"2023-12-30 59:59:59","\xa0\u5185\u9886\u53d6"]},void 0,!0,{fileName:ke,lineNumber:39,columnNumber:13},void 0):null,Object(h.jsxDEV)("p",{className:"type",children:Object(h.jsxDEV)("span",{children:(null===e||void 0===e?void 0:e.card_type.length)>0?e.card_type.map((e=>("1"===e?"\u501f\u8bb0\u5361":"\u4fe1\u7528\u5361")+" ")):"xxx"},void 0,!1,{fileName:ke,lineNumber:47,columnNumber:13},void 0)},void 0,!1,{fileName:ke,lineNumber:46,columnNumber:11},void 0)]},void 0,!0,{fileName:ke,lineNumber:33,columnNumber:9},void 0),Object(h.jsxDEV)("div",{className:"form",children:[Object(h.jsxDEV)("p",{className:"form-label",children:"\u652f\u4ed8\u5b9d\u8d26\u53f7"},void 0,!1,{fileName:ke,lineNumber:55,columnNumber:11},void 0),Object(h.jsxDEV)("input",{className:"form-input",disabled:!0,type:"text",placeholder:"\u8bf7\u8f93\u5165\u652f\u4ed8\u5b9d\u8d26\u53f7"},void 0,!1,{fileName:ke,lineNumber:56,columnNumber:11},void 0),Object(h.jsxDEV)("input",{className:"form-input mt0",disabled:!0,type:"text",placeholder:"\u8bf7\u518d\u6b21\u8f93\u5165\u652f\u4ed8\u5b9d\u8d26\u53f7"},void 0,!1,{fileName:ke,lineNumber:57,columnNumber:11},void 0),Object(h.jsxDEV)("p",{className:"form-note",children:"\u60a8\u53ef\u5728\u652f\u4ed8\u5b9d\u7684\u4e2a\u4eba\u4fe1\u606f\u4e2d\u67e5\u770b\u3010\u652f\u4ed8\u5b9d\u8d26\u53f7\u3011"},void 0,!1,{fileName:ke,lineNumber:63,columnNumber:11},void 0),Object(h.jsxDEV)("button",{className:"form-button",children:"\u7acb\u5373\u9886\u53d6"},void 0,!1,{fileName:ke,lineNumber:64,columnNumber:11},void 0)]},void 0,!0,{fileName:ke,lineNumber:54,columnNumber:9},void 0),Object(h.jsxDEV)("div",{className:"segmentation",children:[Object(h.jsxDEV)("i",{className:"left"},void 0,!1,{fileName:ke,lineNumber:67,columnNumber:11},void 0),Object(h.jsxDEV)("i",{className:"middle"},void 0,!1,{fileName:ke,lineNumber:68,columnNumber:11},void 0),Object(h.jsxDEV)("i",{className:"right"},void 0,!1,{fileName:ke,lineNumber:69,columnNumber:11},void 0)]},void 0,!0,{fileName:ke,lineNumber:66,columnNumber:9},void 0),Object(h.jsxDEV)("div",{className:"illustrate",children:e.instruction||e.usable_time?Object(h.jsxDEV)(h.Fragment,{children:[Object(h.jsxDEV)(je,{data:e},void 0,!1,{fileName:ke,lineNumber:74,columnNumber:15},void 0),Object(h.jsxDEV)("h3",{className:"illustrate-title",children:"\u6d3b\u52a8\u8bf4\u660e"},void 0,!1,{fileName:ke,lineNumber:75,columnNumber:15},void 0),Object(h.jsxDEV)("p",{className:"illustrate-text",dangerouslySetInnerHTML:{__html:e.instruction}},void 0,!1,{fileName:ke,lineNumber:76,columnNumber:15},void 0)]},void 0,!0):Object(h.jsxDEV)(pe.a.TextBlock,{className:"TextBlock",animate:!0,widths:Se,rows:12,dashed:!1},void 0,!1,{fileName:ke,lineNumber:84,columnNumber:13},void 0)},void 0,!1,{fileName:ke,lineNumber:71,columnNumber:9},void 0)]},void 0,!0,{fileName:ke,lineNumber:28,columnNumber:7},void 0)]},void 0,!0,{fileName:ke,lineNumber:22,columnNumber:5},void 0),Ce="/Users/zhangds/web/blue-brother/frontend/src/components/knockGold/index.jsx";const Te=[{key:"1",text:"\u501f\u8bb0\u5361"},{key:"2",text:"\u4fe1\u7528\u5361"}],Ie=[{key:"all",text:"\u603b\u5171"},{key:"month",text:"\u6bcf\u6708"},{key:"week",text:"\u6bcf\u5468"},{key:"day",text:"\u6bcf\u65e5"}],Fe=[{key:"Mon",text:"\u5468\u4e00"},{key:"Tue",text:"\u5468\u4e8c"},{key:"Wed",text:"\u5468\u4e09"},{key:"Thu",text:"\u5468\u56db"},{key:"Fri",text:"\u5468\u4e94"},{key:"Sat",text:"\u5468\u516d"},{key:"Sun",text:"\u5468\u65e5"}],Le=["70","50","30","20"],He=e=>Array.from({length:e},((e,t)=>t));class qe extends r.Component{constructor(e){super(e),this.onDisabledRange=(e,t)=>{let i=!1;return"end"==t&&(i=Y()(e.getTime()).add(1,"days")<=(new Date).getTime()),"start"==t&&(i=e.getTime()<=(new Date).getTime()),i},this.onDisabledRange1=(e,t)=>{let i=JSON.parse(sessionStorage.getItem("knockGold_effectDate")),a=!1,s=Y()(e).format("YYYY-MM-DD HH:mm:ss");const l=Y()(i.end_time).format("HH:mm:ss");return"start"==t&&(a=l<"23:59:59"?Y()(s).isBefore(i.begin_time)||Y()(s).subtract(1,"days").isAfter(i.end_time):Y()(s).isBefore(i.begin_time)||Y()(s).isAfter(i.end_time)),"end"==t&&(a=Y()(s).add(1,"days").isBefore(i.begin_time)||Y()(s).isAfter(i.end_time)),a},this.onDisabledRange2=(e,t)=>{let i=!1,a=Y()(e).format("YYYY-MM-DD HH:mm:ss");const s=Y()(this.state.model.entry_time[1]).format("HH:mm:ss");return"start"==t&&(i=s<"23:59:59"?Y()(a).isBefore(this.state.model.entry_time[0])||Y()(a).subtract(1,"days").isAfter(this.state.model.entry_time[1]):Y()(a).isBefore(this.state.model.entry_time[0])||Y()(a).isAfter(this.state.model.entry_time[1])),"end"==t&&(i=Y()(a).add(1,"days").isBefore(this.state.model.entry_time[0])||Y()(a).isAfter(this.state.model.entry_time[1])),i},this.onDisabledTime=(e,t)=>{let i=JSON.parse(sessionStorage.getItem("knockGold_effectDate"));const a=new Date(i.begin_time),s=a.getHours(),l=a.getMinutes(),n=a.getSeconds();return Object(R.a)(e,a)?{disabledHours:()=>He(s),disabledMinutes:e=>e===s?He(l):[],disabledSeconds:(e,t)=>e===s&&t===l?He(n):[]}:{}},this.onDisabledTime1=(e,t)=>{const i=new Date(this.state.model.entry_time[0]),a=i.getHours(),s=i.getMinutes(),l=i.getSeconds();return Object(R.a)(e,i)?{disabledHours:()=>He(a),disabledMinutes:e=>e===a?He(s):[],disabledSeconds:(e,t)=>e===a&&t===s?He(l):[]}:{}},this.state={model:{channel:"1",entry_time:[],batch_goods_name:"",channel_activity_id:"",temp_no:"",weight:"0",price:"",recharge_amount:"",denomination:"",reduce_amount:"",all_budget:"",day_budget:"",card_type:[],natural_limit:"1",brush_limit:"1",instruction:z,early_per:[],early_notifier:[],receive_number:"",receive_type:"all",usable_time:"",fixed_time:[],timer:[],timer_type:"1",effect_date_type:"",effect_date:"",irregularDate:[[]],irregularTime:[[]],ruleDate:[[]],ruleWeek:[],send_num:1,provider:"lsxd",receive_mode:1,is_webview:0,timer_show:1},TimeDiffer:"",visible:!1,warningInput:"",input_early_per:"",getTimeList:[{key:"0",text:"\u7acb\u5373\u751f\u6548",disabled:!1},{key:"1",text:"\u6b21\u65e5\u751f\u6548",disabled:!1}],userSelectList:[],form_data:{}}}componentWillMount(){if(this.props.data){var e,t;let n=this.state.model;var i,a,s,l;if(n.entry_time[0]=this.props.data.time_limit.effect_time.start_time,n.entry_time[1]=this.props.data.time_limit.effect_time.end_time,n.timer_show=Number(this.props.data.time_limit.timer_show)||1,n.instruction=this.props.data.instruction,n.fixed_time[0]=null===(e=this.props.data.time_limit.use_time.fiexd_time)||void 0===e?void 0:e.start_time,n.fixed_time[1]=null===(t=this.props.data.time_limit.use_time.fiexd_time)||void 0===t?void 0:t.end_time,"week"===this.props.data.time_limit.use_time.type)n.ruleWeek=null===(i=this.props.data.time_limit.use_time)||void 0===i?void 0:i.week,n.ruleDate=null===(a=this.props.data.time_limit.use_time)||void 0===a?void 0:a.time;if("irregular"===this.props.data.time_limit.use_time.type)n.irregularDate=null===(s=this.props.data.time_limit.use_time)||void 0===s?void 0:s.day,n.irregularTime=null===(l=this.props.data.time_limit.use_time)||void 0===l?void 0:l.time;this.setState({model:n})}if(this.props.combining){const e=this.state.model;e.channel=this.props.combining.channel,e.receive_mode=this.props.combining.receive_mode,e.entry_time=this.props.combining.date_time,this.setState({model:e}),this.onHandleChangeChannel(this.props.combining.channel)}this.getUserSelectList(),this.getTimeDiff()}addOrMoveFunction(e,t,i,a,s){var l;if(null===(l=this.props.data)||void 0===l||!l.id)return Object(h.jsxDEV)(h.Fragment,{children:[0!==e?Object(h.jsxDEV)("p",{className:"move",onClick:()=>{const a=i;a.splice(e,1),this.setState({[t]:a})},children:"\u5220\u9664"},void 0,!1,{fileName:Ce,lineNumber:168,columnNumber:11},this):null,e===i.length-1?Object(h.jsxDEV)("p",{className:"add",onClick:()=>{if(a||i.length<3){const e=i;e.push([]),this.setState({[t]:e})}else s&&c.a.warn(s)},children:"\u6dfb\u52a0"},void 0,!1,{fileName:Ce,lineNumber:180,columnNumber:11},this):null]},void 0,!0)}echoFun(e){if(this.props.data){var t,i,a;let s=this.state.model;for(let e in this.props.data)s[e]=this.props.data[e];s.weight=String(this.props.data.weight),s.is_webview=Number(this.props.data.is_webview)||0,s.early_per=this.props.data.early_per.map((e=>String(e))),s.channel=String(this.props.data.channel),s.natural_limit=String(this.props.data.natural_limit),s.brush_limit=String(this.props.data.brush_limit),s.card_type=this.props.data.card_type.map((e=>String(e))),s.receive_number=this.props.data.receive_conf.num,s.receive_type=this.props.data.receive_conf.type,s.receive_mode=this.props.data.receive_mode,s.timer[0]=this.props.data.time_limit.receive_time.start_time,s.timer[1]=this.props.data.time_limit.receive_time.end_time,s.timer_type=null!==(t=this.props.data.time_limit.receive_time)&&void 0!==t&&t.start_time?"2":"1",s.effect_date_type=this.state.getTimeList[Number(this.props.data.time_limit.use_time.effect_date_type)],s.effect_date=this.props.data.time_limit.use_time.effect_day,s.usable_time=this.props.data.time_limit.use_time.type,s.early_notifier=null===(i=this.props.data.early_notifier)||void 0===i?void 0:i.map((t=>null===e||void 0===e?void 0:e.map((e=>{if((null===t||void 0===t?void 0:t.mobile)===e.key||(null===t||void 0===t?void 0:t.real_name)===e.text)return e})).filter((e=>e))[0])).filter((e=>e)),s.origin=this.props.data;((null===(a=this.props.data)||void 0===a?void 0:a.early_per)||[]).map((e=>-1===Le.indexOf(e)?this.setState({input_early_per:e,model:s}):this.setState({model:s})))}}getUserSelectList(e){Object(a.Jb)().then((e=>Object(a.Tb)(e,((e,t)=>{const i=e.default.map((e=>e.real_name)),a=e.default.map((e=>e.mobile)),s=[],l=e.data.map((e=>{if(-1!==i.indexOf(e.real_name)||-1!==a.indexOf(e.mobile)){const t={key:e.mobile,text:e.real_name,disabled:!0,closable:!1};return s.push(t),t}return{key:e.mobile,text:e.real_name,closable:!0}}));this.onHandleChange(s,"early_notifier"),this.setState({userSelectList:l}),this.echoFun(l)}),(e=>{c.a.error(e)}))))}filterEarlyPer(){const e=this.state.model.early_per.filter((e=>e!==this.state.input_early_per));this.onHandleChange(e,"early_per")}async submit(){if(this.refs.form.validator()&&this.refs.form1.validator()&&this.refs.form2.validator()&&this.refs.form4.validator()){if(this.props.data){var e;let t=[];sessionStorage.getItem("knockGoldData")&&(t=JSON.parse(sessionStorage.getItem("knockGoldData")));let i=t.findIndex((e=>e.channel_activity_id===this.props.data.channel_activity_id));return!1!==this.limitFunction()&&(null!==(e=this.props.data)&&void 0!==e&&e.goods_id?t[i]=Object.assign({...this.state.model.origin,...this.transformDataCode()}):t[i]=this.transformDataCode(),sessionStorage.setItem("knockGoldData",JSON.stringify(t)),this.setState({form_data:t[i]}),!0)}{if(!1===this.limitFunction())return!1;let e=[];sessionStorage.getItem("knockGoldData")&&(e=JSON.parse(sessionStorage.getItem("knockGoldData")));let t=e||[];const i=this.transformDataCode();return t.find((e=>e.channel_activity_id===i.channel_activity_id))?(c.a.error("\u4e0d\u5141\u8bb8\u8f93\u5165\u91cd\u590d\u7684\u5e73\u53f0\u6279\u6b21\u53f7"),!1):(t.push(i),sessionStorage.setItem("knockGoldData",JSON.stringify(t)),this.setState({form_data:i}),!0)}}}detectTimeConflict(e){for(var t=0;t=l&&il}}transformDataCode(){var e;const t={};return t.channel=this.state.model.channel,t.provider=this.state.model.provider,t.receive_mode=this.state.model.receive_mode,1==t.channel?t.temp_no=this.state.model.temp_no:t.temp_no="",t.batch_goods_name=this.state.model.batch_goods_name,t.channel_activity_id=this.state.model.channel_activity_id,t.price=this.state.model.price,t.recharge_amount=this.state.model.recharge_amount,t.send_num=this.state.model.send_num,t.denomination=this.state.model.denomination,t.reduce_amount=this.state.model.reduce_amount,t.all_budget=this.state.model.all_budget,t.day_budget=this.state.model.day_budget,t.card_type=this.state.model.card_type,t.natural_limit=this.state.model.natural_limit,t.brush_limit=this.state.model.brush_limit,t.instruction=this.state.model.instruction,t.early_per=this.state.model.early_per.filter((e=>e)),t.early_notifier=this.state.model.early_notifier.map((({text:e,key:t})=>({real_name:e,mobile:t}))),t.is_webview=this.state.model.is_webview,t.weight=this.state.model.weight,t.receive_conf={type:this.state.model.receive_type,num:this.state.model.receive_number},t.time_limit={effect_time:{start_time:this.state.model.entry_time[0],end_time:this.state.model.entry_time[1]},timer_show:this.state.model.timer_show,receive_time:{start_time:this.state.model.timer[0],end_time:this.state.model.timer[1]},use_time:{type:this.state.model.usable_time,...this.withTimeFunction(this.state.model.usable_time),effect_day:this.state.model.effect_date,effect_date_type:null===(e=this.state.model.effect_date_type)||void 0===e?void 0:e.key}},t}withTimeFunction(e){let t={};switch(e){case"week":t.time=this.state.model.ruleDate,t.week=this.state.model.ruleWeek;break;case"irregular":t.time=this.state.model.irregularTime,t.day=this.state.model.irregularDate;break;default:t.fiexd_time={start_time:this.state.model.fixed_time[0],end_time:this.state.model.fixed_time[1]}}return t}testDateFunction(e){return e.map((e=>this.setTime(e))).filter((e=>e))}limitFunction(){if(!this.state.model.card_type.length)return c.a.error("\u8bf7\u9009\u62e9\u5361\u79cd"),!1;if(this.state.model.early_per.filter((e=>e)).length<1)return c.a.error("\u8bf7\u9009\u9884\u8b66\u767e\u5206\u6bd4"),!1;if(!this.state.model.usable_time)return c.a.error("\u8bf7\u9009\u62e9\u53ef\u7528\u65f6\u95f4\u6bb5\u7c7b\u578b"),!1;var e;if("received"===this.state.model.usable_time&&(null===(e=this.state.model.effect_date_type)||void 0===e||!e.key||!this.state.model.effect_date))return c.a.error("\u8bf7\u5b8c\u6574\u7684\u586b\u5199\u6216\u9009\u62e9\u53ef\u7528\u65f6\u95f4\u6bb5"),!1;if((this.state.TimeDifferNumber(this.state.model.effect_date))&&"received"===this.state.model.usable_time)return c.a.error(`\u6709\u9650\u671f\u4e0d\u5141\u8bb8\u5927\u4e8e\u751f\u6548\u65f6\u95f4\u6bb5 \u6ce8\uff1a\u5f53\u524d\u6709\u6548\u671f\u6700\u5c0f\u65f6\u95f4\u4e3a 1 \u5929\uff0c\u6700\u5927\u65f6\u95f4\u4e3a ${this.state.TimeDiffer} \u5929`),!1;if("fiexd"===this.state.model.usable_time&&this.setTime(this.state.model.fixed_time))return c.a.error("\u8bf7\u5b8c\u6574\u7684\u9009\u62e9\u56fa\u5b9a\u65f6\u95f4\u6bb5"),!1;if("fiexd"===this.state.model.usable_time&&this.state.model.fixed_time[0]>this.state.model.entry_time[1]||"fiexd"===this.state.model.usable_time&&this.state.model.fixed_time[1]>this.state.model.entry_time[1])return c.a.error("\u56fa\u5b9a\u5f00\u59cb\u65f6\u95f4\u6216\u7ed3\u675f\u65f6\u95f4\u4e0d\u5141\u8bb8\u5927\u4e8e\u751f\u6548\u7ed3\u675f\u65f6\u95f4"),!1;if("week"===this.state.model.usable_time&&(this.testDateFunction(this.state.model.ruleDate).length>0||this.state.model.ruleWeek.length<1))return c.a.error("\u8bf7\u5b8c\u6574\u7684\u9009\u62e9\u89c4\u5219\u65e5\u671f\u548c\u65f6\u95f4"),!1;if("irregular"===this.state.model.usable_time&&(this.testDateFunction(this.state.model.irregularDate).length>0||this.testDateFunction(this.state.model.irregularTime).length>0))return c.a.error("\u8bf7\u5b8c\u6574\u7684\u9009\u62e9\u4e0d\u89c4\u5219\u65e5\u671f\u548c\u65f6\u95f4"),!1;if(this.detectTimeConflict(this.state.model.ruleDate))return c.a.error("\u6709\u6548\u671f\u5185\uff0c\u89c4\u5219\u65f6\u95f4\u5b58\u5728\u4ea4\u96c6"),!1;if(this.detectTimeConflict(this.state.model.irregularDate))return c.a.error("\u6709\u6548\u671f\u5185\uff0c\u4e0d\u89c4\u5219\u65e5\u671f\u5b58\u5728\u4ea4\u96c6"),!1;if(this.detectTimeConflict(this.state.model.irregularTime))return c.a.error("\u6709\u6548\u671f\u5185\uff0c\u4e0d\u89c4\u5219\u65f6\u95f4\u5b58\u5728\u4ea4\u96c6"),!1;const t=/^-?\d+\.?\d{0,2}$/;return t.test(this.state.model.denomination)&&t.test(this.state.model.reduce_amount)?this.state.model.denomination-0this.state.model.all_budget-0?(c.a.error("\u5145\u503c\u6279\u6b21\u91d1\u989d\u4e0d\u5141\u8bb8\u5927\u4e8e\u603b\u9884\u7b97"),!1):this.state.model.all_budget-014?(c.a.error("\u76ee\u524d\u4ec5\u652f\u6301\u65b0\u589e10\u4e2a\u9884\u8b66\u901a\u77e5\u4eba"),!1):void 0:(c.a.error("\u8bf7\u8f93\u5165\u6b63\u786e\u7684\u9762\u989d\u91d1\u989d\u6216\u7acb\u51cf\u91d1\u989d\uff08\u4fdd\u7559\u4e24\u4f4d\u5c0f\u6570\uff09"),!1)}setTime(e){if(!Object(le.a)(e)||0===(null===e||void 0===e?void 0:e.length))return!0;const t=e.map((e=>Boolean(e)));let i=null;return t.map((e=>{e||(i=!0)})),i}onHandleChange(e,t,i){let a=this.state.model;i?a[t][i]=e:a[t]=e,this.setState({model:a})}getTimeDiff(){if(this.state.model.entry_time[1]){const e=function(e,t){let i=new Date(e).getTime()/1e3,a=new Date(t).getTime()/1e3;var s="",l="";i("1"===(null===t||void 0===t?void 0:t.key)&&(t.disabled=e<2),t)));this.setState({TimeDiffer:e,getTimeList:t})}}closeCallback(e){const t=this.state.model.early_notifier.filter((t=>t.key!==e.key));this.onHandleChange(t,"early_notifier"),t.length<1&&this.setState({warningInput:""})}switchComponents(){return 1==this.state.model.channel&&2===this.state.model.receive_mode?Object(h.jsxDEV)(we,{data:this.state.model},void 0,!1,{fileName:Ce,lineNumber:759,columnNumber:14},this):3==this.state.model.channel?Object(h.jsxDEV)(Ve,{data:this.state.model},void 0,!1,{fileName:Ce,lineNumber:762,columnNumber:14},this):Object(h.jsxDEV)(fe,{data:this.state.model},void 0,!1,{fileName:Ce,lineNumber:764,columnNumber:12},this)}onHandleChangeChannel(e){this.onHandleChange(e,"channel"),1==e?this.onHandleChange(z,"instruction"):2==e?this.onHandleChange(A,"instruction"):this.onHandleChange(J,"instruction"),1!=e&&this.onHandleChange(1,"receive_mode"),2!=e&&3!=e||this.onHandleChange("voucher_wechat_lsxd","provider"),1==e&&this.onHandleChange("lsxd","provider")}render(){var e,t,i,a,o,r,m,c,b,p,N,v,g,f,_,x,y,O,D,E,V,k,S,w,C,T,I,F,L,H,q,M;return Object(h.jsxDEV)("div",{id:"addKnockGold",children:[Object(h.jsxDEV)(d.a,{style:{width:"70%",margin:"10px 0"},title:"\u57fa\u672c\u4fe1\u606f",children:Object(h.jsxDEV)(l.a,{model:this.state.model,rules:ue.basic,ref:"form",children:[Object(h.jsxDEV)(s.a,{labelname:"\u6e20\u9053",prop:"channel",id:"type",children:Object(h.jsxDEV)(Q.a,{disabled:!(null===(e=this.props.data)||void 0===e||!e.id)||!!this.props.combining,onChange:({target:e})=>{this.onHandleChangeChannel(e.value),this.onHandleChange(0,"is_webview")},value:this.state.model.channel,children:[Object(h.jsxDEV)(ne.a,{value:"1",children:"\u652f\u4ed8\u5b9d"},void 0,!1,{fileName:Ce,lineNumber:803,columnNumber:17},this),Object(h.jsxDEV)(ne.a,{value:"2",children:"\u5fae\u4fe1"},void 0,!1,{fileName:Ce,lineNumber:804,columnNumber:17},this),this.props.ysf?null:Object(h.jsxDEV)(ne.a,{value:"3",children:"\u4e91\u95ea\u4ed8"},void 0,!1,{fileName:Ce,lineNumber:805,columnNumber:36},this)]},void 0,!0,{fileName:Ce,lineNumber:795,columnNumber:15},this)},void 0,!1,{fileName:Ce,lineNumber:794,columnNumber:13},this),Object(h.jsxDEV)(s.a,{labelname:"\u4e3b\u4f53\u540d\u79f0",prop:"provider",id:"provider",children:Object(h.jsxDEV)(Q.a,{disabled:!(null===(t=this.props.data)||void 0===t||!t.id)||3==this.state.model.channel,onChange:({target:e})=>{this.onHandleChange(e.value,"provider")},value:this.state.model.provider,children:1==this.state.model.channel?Object(h.jsxDEV)(h.Fragment,{children:[Object(h.jsxDEV)(ne.a,{value:"lsxd",children:"\u84dd\u8272\u5144\u5f1f"},void 0,!1,{fileName:Ce,lineNumber:818,columnNumber:21},this),Object(h.jsxDEV)(ne.a,{value:"fjxw",children:"\u798f\u5efa\u5174\u65fa"},void 0,!1,{fileName:Ce,lineNumber:819,columnNumber:21},this)]},void 0,!0):Object(h.jsxDEV)(h.Fragment,{children:[Object(h.jsxDEV)(ne.a,{value:"voucher_wechat_lsxd",children:"\u84dd\u8272\u5144\u5f1f"},void 0,!1,{fileName:Ce,lineNumber:823,columnNumber:21},this),Object(h.jsxDEV)(ne.a,{value:"voucher_wechat_fjxw",children:"\u798f\u5efa\u5174\u65fa"},void 0,!1,{fileName:Ce,lineNumber:824,columnNumber:21},this)]},void 0,!0)},void 0,!1,{fileName:Ce,lineNumber:809,columnNumber:15},this)},"provider",!1,{fileName:Ce,lineNumber:808,columnNumber:13},this),2!=this.state.model.channel||this.props.combining?null:Object(h.jsxDEV)(s.a,{labelname:"\u6253\u5f00\u65b9\u5f0f",prop:"is_webview",id:"is_webview",children:Object(h.jsxDEV)(Q.a,{onChange:({target:e})=>{this.onHandleChange(e.value,"is_webview")},value:this.state.model.is_webview,disabled:!(null===(i=this.props.data)||void 0===i||!i.id),children:[Object(h.jsxDEV)(ne.a,{value:0,children:"\u5c0f\u7a0b\u5e8f"},void 0,!1,{fileName:Ce,lineNumber:838,columnNumber:19},this),Object(h.jsxDEV)(ne.a,{value:1,disabled:2===Number(sessionStorage.getItem("keyType")),children:"\u516c\u4f17\u53f7"},void 0,!1,{fileName:Ce,lineNumber:839,columnNumber:19},this)]},void 0,!0,{fileName:Ce,lineNumber:831,columnNumber:17},this)},"is_webview",!1,{fileName:Ce,lineNumber:830,columnNumber:15},this),1!=this.state.model.channel||this.props.ysf?null:Object(h.jsxDEV)(s.a,{labelname:"\u9886\u53d6\u65b9\u5f0f",prop:"receive_mode",id:"receive_mode",children:Object(h.jsxDEV)(Q.a,{disabled:!!this.props.combining,onChange:({target:e})=>{this.onHandleChange(e.value,"receive_mode")},value:this.state.model.receive_mode,children:[Object(h.jsxDEV)(ne.a,{value:1,children:"\u5b98\u65b9\u9886\u53d6"},void 0,!1,{fileName:Ce,lineNumber:862,columnNumber:19},this),Object(h.jsxDEV)(ne.a,{value:2,children:"\u8d26\u53f7\u9886\u53d6"},void 0,!1,{fileName:Ce,lineNumber:863,columnNumber:19},this)]},void 0,!0,{fileName:Ce,lineNumber:855,columnNumber:17},this)},"receive_mode",!1,{fileName:Ce,lineNumber:849,columnNumber:15},this),Object(h.jsxDEV)(s.a,{labelname:"\u7acb\u51cf\u91d1\u5e73\u53f0\u6279\u6b21\u53f7",prop:"channel_activity_id",id:"batch_number",children:Object(h.jsxDEV)(n.a,{onChange:e=>{this.onHandleChange(e,"channel_activity_id")},onClearItem:()=>{this.onHandleChange("","channel_activity_id")},disabled:!(null===(a=this.props.data)||void 0===a||!a.id),value:this.state.model.channel_activity_id,placeholder:"\u8bf7\u8f93\u5165",labelWidth:"0px",maxLength:50,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:Ce,lineNumber:868,columnNumber:15},this)},void 0,!1,{fileName:Ce,lineNumber:867,columnNumber:13},this),1==this.state.model.channel?Object(h.jsxDEV)(s.a,{labelname:"\u5238\u6a21\u677f\u7f16\u53f7",prop:"temp_no",id:"batch_number",children:Object(h.jsxDEV)(n.a,{onChange:e=>{this.onHandleChange(e,"temp_no")},onClearItem:()=>{this.onHandleChange("","temp_no")},disabled:!(null===(o=this.props.data)||void 0===o||!o.id),value:this.state.model.temp_no,placeholder:"\u8bf7\u8f93\u5165",labelWidth:"0px",maxLength:50,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:Ce,lineNumber:887,columnNumber:17},this)},"temp_no",!1,{fileName:Ce,lineNumber:886,columnNumber:15},this):null,Object(h.jsxDEV)(s.a,{labelname:"\u6279\u6b21\u5546\u54c1\u540d\u79f0",prop:"batch_goods_name",id:"batch_goods_name",children:Object(h.jsxDEV)(n.a,{onChange:e=>{this.onHandleChange(e,"batch_goods_name")},onClearItem:()=>{this.onHandleChange("","batch_goods_name")},value:this.state.model.batch_goods_name,disabled:!(null===(r=this.props.data)||void 0===r||!r.id),placeholder:"\u8bf7\u8f93\u5165",labelWidth:"0px",maxLength:30,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:Ce,lineNumber:907,columnNumber:15},this)},void 0,!1,{fileName:Ce,lineNumber:906,columnNumber:13},this),this.props.combining?null:Object(h.jsxDEV)(s.a,{labelname:"\u5546\u54c1\u6743\u91cd",prop:"weight",id:"weight",children:Object(h.jsxDEV)(n.a,{onChange:e=>{this.onHandleChange(e,"weight")},onClearItem:()=>{this.onHandleChange("","weight")},value:this.state.model.weight,placeholder:"\u8bf7\u8f93\u5165",labelWidth:"0px",maxLength:3,height:"36px",width:"520px",countShow:!1,alignment:"left"},void 0,!1,{fileName:Ce,lineNumber:926,columnNumber:17},this)},void 0,!1,{fileName:Ce,lineNumber:925,columnNumber:15},this),Object(h.jsxDEV)(s.a,{labelname:"\u5408\u540c\u5355\u4ef7",prop:"price",id:"contract_price",children:Object(h.jsxDEV)(n.a,{onChange:e=>{this.onHandleChange(e,"price")},onClearItem:()=>{this.onHandleChange("","price")},value:this.state.model.price,placeholder:"\u8bf7\u8f93\u5165",labelWidth:"0px",maxLength:7,height:"36px",disabled:!(null===(m=this.props.data)||void 0===m||!m.id),width:"520px",unit:"\u5143",countShow:!1,alignment:"left"},void 0,!1,{fileName:Ce,lineNumber:945,columnNumber:15},this)},void 0,!1,{fileName:Ce,lineNumber:944,columnNumber:13},this),Object(h.jsxDEV)(s.a,{labelname:"\u5145\u503c\u6279\u6b21\u91d1\u989d",prop:"recharge_amount",id:"money",children:[Object(h.jsxDEV)(n.a,{onChange:e=>{this.onHandleChange(e,"recharge_amount")},onClearItem:()=>{this.onHandleChange("","recharge_amount")},value:this.state.model.recharge_amount,disabled:!(null===(c=this.props.data)||void 0===c||!c.id),placeholder:"\u8bf7\u8f93\u5165",unit:"\u5143",countShow:!1,labelWidth:"0px",maxLength:9,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:Ce,lineNumber:965,columnNumber:15},this),this.state.model.id?Object(h.jsxDEV)(u.a,{onClick:e=>{this.setState({visible:!0})},children:"\u52a0\u6b3e"},void 0,!1,{fileName:Ce,lineNumber:984,columnNumber:17},this):null]},void 0,!0,{fileName:Ce,lineNumber:964,columnNumber:13},this)]},void 0,!0,{fileName:Ce,lineNumber:793,columnNumber:11},this)},void 0,!1,{fileName:Ce,lineNumber:792,columnNumber:9},this),Object(h.jsxDEV)(d.a,{style:{width:"70%",margin:"10px 0"},title:"\u53d1\u653e\u89c4\u5219",children:Object(h.jsxDEV)(l.a,{model:this.state.model,rules:ue.grant,ref:"form1",children:[Object(h.jsxDEV)(s.a,{id:"denomination",labelname:"\u9762\u989d",children:[Object(h.jsxDEV)("span",{children:"\u6ee1"},void 0,!1,{fileName:Ce,lineNumber:998,columnNumber:15},this),Object(h.jsxDEV)(n.a,{onChange:e=>{this.onHandleChange(e,"denomination")},onClearItem:()=>{this.onHandleChange("","denomination")},value:this.state.model.denomination,placeholder:"\u8bf7\u8f93\u5165",labelWidth:"0px",unit:"\u5143",disabled:!(null===(b=this.props.data)||void 0===b||!b.id),countShow:!1,maxLength:7,height:"36px",width:"231px",alignment:"left"},void 0,!1,{fileName:Ce,lineNumber:999,columnNumber:15},this),Object(h.jsxDEV)("span",{className:"JIan",children:"\u51cf"},void 0,!1,{fileName:Ce,lineNumber:1017,columnNumber:15},this),Object(h.jsxDEV)(n.a,{onChange:e=>{this.onHandleChange(e,"reduce_amount")},onClearItem:()=>{this.onHandleChange("","reduce_amount")},value:this.state.model.reduce_amount,placeholder:"\u8bf7\u8f93\u5165",labelWidth:"0px",unit:"\u5143",disabled:!(null===(p=this.props.data)||void 0===p||!p.id),countShow:!1,maxLength:7,height:"36px",width:"231px",alignment:"left"},void 0,!1,{fileName:Ce,lineNumber:1018,columnNumber:15},this)]},void 0,!0,{fileName:Ce,lineNumber:997,columnNumber:13},this),Object(h.jsxDEV)(s.a,{id:"all_budget",labelname:"\u603b\u9884\u7b97",prop:"all_budget",children:Object(h.jsxDEV)(n.a,{onChange:e=>{this.onHandleChange(e,"all_budget")},onClearItem:()=>{this.onHandleChange("","all_budget")},value:this.state.model.all_budget,placeholder:"\u8bf7\u8f93\u5165",disabled:!(null===(N=this.props.data)||void 0===N||!N.id),labelWidth:"0px",maxLength:9,height:"36px",unit:"\u5143",countShow:!1,width:"520px",alignment:"left"},void 0,!1,{fileName:Ce,lineNumber:1038,columnNumber:15},this)},void 0,!1,{fileName:Ce,lineNumber:1037,columnNumber:13},this),Object(h.jsxDEV)(s.a,{id:"day_budget",labelname:"\u5355\u5929\u9884\u7b97\u53d1\u653e\u4e0a\u9650",prop:"day_budget",children:Object(h.jsxDEV)(n.a,{onChange:e=>{this.onHandleChange(e,"day_budget")},onClearItem:()=>{this.onHandleChange("","day_budget")},disabled:!(null===(v=this.props.data)||void 0===v||!v.id),value:this.state.model.day_budget,placeholder:"\u8bf7\u8f93\u5165",labelWidth:"0px",maxLength:9,height:"36px",unit:"\u5143",countShow:!1,width:"520px",alignment:"left"},void 0,!1,{fileName:Ce,lineNumber:1059,columnNumber:15},this)},void 0,!1,{fileName:Ce,lineNumber:1058,columnNumber:13},this),Object(h.jsxDEV)(s.a,{id:"send_num",labelname:"\u5355\u6b21\u5230\u8d26",prop:"send_num",children:Object(h.jsxDEV)(n.a,{onChange:e=>{this.onHandleChange(e,"send_num")},onClearItem:()=>{this.onHandleChange("","send_num")},disabled:!(null===(g=this.props.data)||void 0===g||!g.id),value:this.state.model.send_num,placeholder:"\u8bf7\u8f93\u5165",labelWidth:"0px",maxLength:9,height:"36px",unit:"\u5f20",countShow:!1,width:"520px",alignment:"left"},void 0,!1,{fileName:Ce,lineNumber:1079,columnNumber:15},this)},void 0,!1,{fileName:Ce,lineNumber:1078,columnNumber:13},this),Object(h.jsxDEV)(s.a,{id:"receive_number",labelname:"\u7528\u6237\u53ef\u9886\u4e2a\u6570",prop:"receive_number",children:[Object(h.jsxDEV)(n.a,{onChange:e=>{this.onHandleChange(e,"receive_number")},onClearItem:()=>{this.onHandleChange("","receive_number")},disabled:!(null===(f=this.props.data)||void 0===f||!f.id),value:this.state.model.receive_number,placeholder:"\u8bf7\u8f93\u5165",labelWidth:"0px",maxLength:4,height:"36px",unit:"\u4e2a",countShow:!1,width:"304px",alignment:"left"},void 0,!1,{fileName:Ce,lineNumber:1099,columnNumber:15},this),Object(h.jsxDEV)(Q.a,{disabled:!(null===(_=this.props.data)||void 0===_||!_.id),onChange:({target:e})=>{this.onHandleChange(e.value,"receive_type")},value:this.state.model.receive_type,children:Ie.map((({key:e,text:t})=>Object(h.jsxDEV)(ne.a,{value:e,children:t},e,!1,{fileName:Ce,lineNumber:1125,columnNumber:19},this)))},void 0,!1,{fileName:Ce,lineNumber:1117,columnNumber:15},this)]},void 0,!0,{fileName:Ce,lineNumber:1098,columnNumber:13},this),Object(h.jsxDEV)(s.a,{id:"card_type",labelname:"\u5361\u79cd",prop:"card_type",children:Object(h.jsxDEV)(oe.a,{disabled:!(null===(x=this.props.data)||void 0===x||!x.id),value:this.state.model.card_type,onChange:e=>{this.onHandleChange(e,"card_type")},children:Te.map((e=>Object(h.jsxDEV)(j.a,{value:e.key,children:e.text},e.key,!1,{fileName:Ce,lineNumber:1140,columnNumber:19},this)))},void 0,!1,{fileName:Ce,lineNumber:1132,columnNumber:15},this)},void 0,!1,{fileName:Ce,lineNumber:1131,columnNumber:13},this),Object(h.jsxDEV)(s.a,{id:"natural_limit",labelname:"\u662f\u5426\u5f00\u542f\u81ea\u7136\u4eba\u9650\u5236",prop:"natural_limit",children:Object(h.jsxDEV)(Q.a,{disabled:!(null===(y=this.props.data)||void 0===y||!y.id),onChange:({target:e})=>{this.onHandleChange(e.value,"natural_limit")},value:this.state.model.natural_limit,children:[Object(h.jsxDEV)(ne.a,{value:"1",children:"\u662f"},void 0,!1,{fileName:Ce,lineNumber:1154,columnNumber:17},this),Object(h.jsxDEV)(ne.a,{value:"5",children:"\u5426"},void 0,!1,{fileName:Ce,lineNumber:1155,columnNumber:17},this)]},void 0,!0,{fileName:Ce,lineNumber:1147,columnNumber:15},this)},void 0,!1,{fileName:Ce,lineNumber:1146,columnNumber:13},this),Object(h.jsxDEV)(s.a,{id:"brush_limit",labelname:"\u662f\u5426\u5f00\u542f\u9632\u5237\u62e6\u622a",prop:"brush_limit",children:Object(h.jsxDEV)(Q.a,{disabled:!(null===(O=this.props.data)||void 0===O||!O.id),onChange:({target:e})=>{this.onHandleChange(e.value,"brush_limit")},value:this.state.model.brush_limit,children:[Object(h.jsxDEV)(ne.a,{value:"1",children:"\u662f"},void 0,!1,{fileName:Ce,lineNumber:1166,columnNumber:17},this),Object(h.jsxDEV)(ne.a,{value:"5",children:"\u5426"},void 0,!1,{fileName:Ce,lineNumber:1167,columnNumber:17},this)]},void 0,!0,{fileName:Ce,lineNumber:1159,columnNumber:15},this)},void 0,!1,{fileName:Ce,lineNumber:1158,columnNumber:13},this)]},void 0,!0,{fileName:Ce,lineNumber:996,columnNumber:11},this)},void 0,!1,{fileName:Ce,lineNumber:995,columnNumber:9},this),Object(h.jsxDEV)(d.a,{style:{width:"70%",margin:"10px 0"},title:"\u65f6\u95f4\u9650\u5236",children:Object(h.jsxDEV)(l.a,{model:this.state.model,rules:ue.time,ref:"form2",children:[this.props.combining?null:Object(h.jsxDEV)(s.a,{id:"entry_time",labelname:"\u751f\u6548\u65f6\u95f4\u6bb5",prop:"entry_time",children:[Object(h.jsxDEV)(ee.a,{className:"zent-datepicker-plan",showTime:{format:"HH:mm:ss",defaultTime:["00:00:00","23:59:59"]},format:"YYYY-MM-DD HH:mm:ss",disabled:[!(null===(D=this.props.data)||void 0===D||!D.id),!(null===(E=this.props.data)||void 0===E||!E.id)],width:245,value:this.state.model.entry_time,onChange:e=>{this.onHandleChange(e,"entry_time"),this.getTimeDiff()},disabledTime:this.onDisabledTime,disabledDate:this.onDisabledRange1},void 0,!1,{fileName:Ce,lineNumber:1177,columnNumber:17},this),Object(h.jsxDEV)(Q.a,{style:{marginLeft:"20px"},onChange:({target:e})=>{this.onHandleChange(e.value,"timer_show")},value:this.state.model.timer_show,children:[Object(h.jsxDEV)(ne.a,{value:1,children:"\u663e\u793a"},void 0,!1,{fileName:Ce,lineNumber:1201,columnNumber:19},this),Object(h.jsxDEV)(ne.a,{value:2,children:"\u9690\u85cf"},void 0,!1,{fileName:Ce,lineNumber:1202,columnNumber:19},this)]},void 0,!0,{fileName:Ce,lineNumber:1194,columnNumber:17},this)]},void 0,!0,{fileName:Ce,lineNumber:1176,columnNumber:15},this),this.props.combining?null:Object(h.jsxDEV)(h.Fragment,{children:"2"===this.state.model.timer_type?Object(h.jsxDEV)(s.a,{id:"timer",labelname:"\u9886\u53d6\u65f6\u95f4\u6bb5",prop:"timer",children:[Object(h.jsxDEV)(re.a,{disabled:!(null===(V=this.props.data)||void 0===V||!V.id),className:"zent-datepicker-plan",showTime:{format:"HH:mm:ss",defaultTime:[Y()().format("HH:mm:ss"),"23:59:59"]},value:this.state.model.timer,onChange:e=>{this.onHandleChange(e,"timer")},width:"240px",disabledTime:this.onDisabledRange},void 0,!1,{fileName:Ce,lineNumber:1210,columnNumber:21},this),Object(h.jsxDEV)(Q.a,{onChange:({target:e})=>{this.onHandleChange(e.value,"timer_type"),"1"===e.value&&this.onHandleChange("","timer")},disabled:!(null===(k=this.props.data)||void 0===k||!k.id),value:this.state.model.timer_type,children:[Object(h.jsxDEV)(ne.a,{value:"1",children:"\u4e0d\u8bbe\u7f6e"},void 0,!1,{fileName:Ce,lineNumber:1234,columnNumber:23},this),Object(h.jsxDEV)(ne.a,{value:"2",children:"\u6bcf\u65e5"},void 0,!1,{fileName:Ce,lineNumber:1235,columnNumber:23},this)]},void 0,!0,{fileName:Ce,lineNumber:1224,columnNumber:21},this)]},void 0,!0,{fileName:Ce,lineNumber:1209,columnNumber:19},this):Object(h.jsxDEV)(s.a,{id:"timer",labelname:"\u9886\u53d6\u65f6\u95f4\u6bb5",children:Object(h.jsxDEV)(Q.a,{onChange:({target:e})=>{this.onHandleChange(e.value,"timer_type")},disabled:!(null===(S=this.props.data)||void 0===S||!S.id),value:this.state.model.timer_type,children:[Object(h.jsxDEV)(ne.a,{value:"1",children:"\u4e0d\u8bbe\u7f6e"},void 0,!1,{fileName:Ce,lineNumber:1247,columnNumber:23},this),Object(h.jsxDEV)(ne.a,{value:"2",children:"\u6bcf\u65e5"},void 0,!1,{fileName:Ce,lineNumber:1248,columnNumber:23},this)]},void 0,!0,{fileName:Ce,lineNumber:1240,columnNumber:21},this)},void 0,!1,{fileName:Ce,lineNumber:1239,columnNumber:19},this)},void 0,!1),Object(h.jsxDEV)(s.a,{id:"usable_time",labelname:"\u53ef\u7528\u65f6\u95f4\u6bb5",prop:"official_price",children:[Object(h.jsxDEV)("div",{className:"boxTime",children:[Object(h.jsxDEV)(Q.a,{value:this.state.model.usable_time,disabled:!(null===(w=this.props.data)||void 0===w||!w.id),onChange:({target:e})=>{this.onHandleChange(e.value,"usable_time"),this.onHandleChange([],"fixed_time"),this.onHandleChange([[]],"irregularDate"),this.onHandleChange([[]],"irregularTime"),this.onHandleChange([],"ruleWeek"),this.onHandleChange([[]],"ruleDate")},children:Object(h.jsxDEV)(Z.a,{value:"received",children:"\u9886\u53d6\u540e"},void 0,!1,{fileName:Ce,lineNumber:1269,columnNumber:19},this)},void 0,!1,{fileName:Ce,lineNumber:1257,columnNumber:17},this),"received"===this.state.model.usable_time?Object(h.jsxDEV)(h.Fragment,{children:[Object(h.jsxDEV)("div",{className:"zent-demo-select-basic select-basic",children:Object(h.jsxDEV)(X.a,{clearable:!0,options:this.state.getTimeList,placeholder:"\u9009\u62e9\u4e00\u9879",onChange:e=>{this.onHandleChange(e,"effect_date_type")},value:this.state.model.effect_date_type,className:"select-basic",disabled:!(null===(C=this.props.data)||void 0===C||!C.id),width:"195px",popupWidth:"195px",disableSearch:!0},void 0,!1,{fileName:Ce,lineNumber:1274,columnNumber:23},this)},void 0,!1,{fileName:Ce,lineNumber:1273,columnNumber:21},this),Object(h.jsxDEV)("span",{className:"effect_dates",children:"\u6709\u6548\u671f"},void 0,!1,{fileName:Ce,lineNumber:1289,columnNumber:21},this),Object(h.jsxDEV)(n.a,{onChange:e=>{this.onHandleChange(e,"effect_date")},onClearItem:()=>{this.onHandleChange("","effect_date")},disabled:!(null===(T=this.props.data)||void 0===T||!T.id),value:this.state.model.effect_date,placeholder:"\u8bf7\u8f93\u5165",labelWidth:"0px",maxLength:3,height:"36px",unit:"\u5929",countShow:!1,width:"172px",alignment:"left"},void 0,!1,{fileName:Ce,lineNumber:1290,columnNumber:21},this)]},void 0,!0):null]},void 0,!0,{fileName:Ce,lineNumber:1256,columnNumber:15},this),Object(h.jsxDEV)("div",{className:"boxTime",style:{marginTop:"15px"},children:[Object(h.jsxDEV)(Q.a,{disabled:!(null===(I=this.props.data)||void 0===I||!I.id),value:this.state.model.usable_time,onChange:({target:e})=>{this.onHandleChange(e.value,"usable_time"),this.onHandleChange("","effect_date_type"),this.onHandleChange("","effect_date"),this.onHandleChange([[]],"irregularDate"),this.onHandleChange([[]],"irregularTime"),this.onHandleChange([],"ruleWeek"),this.onHandleChange([[]],"ruleDate")},children:Object(h.jsxDEV)(Z.a,{value:"fiexd",children:"\u56fa\u5b9a\u65f6\u95f4"},void 0,!1,{fileName:Ce,lineNumber:1325,columnNumber:19},this)},void 0,!1,{fileName:Ce,lineNumber:1312,columnNumber:17},this),"fiexd"===this.state.model.usable_time?Object(h.jsxDEV)(ee.a,{className:"zent-datepicker-plan",showTime:{format:"HH:mm:ss",defaultTime:[Y()().format("HH:mm:ss"),"23:59:59"]},format:"YYYY-MM-DD HH:mm:ss",disabled:[!(null===(F=this.props.data)||void 0===F||!F.id),!(null===(L=this.props.data)||void 0===L||!L.id)],width:195,value:this.state.model.fixed_time,onChange:e=>{this.onHandleChange(e,"fixed_time")},disabledDate:this.onDisabledRange2,disabledTime:this.onDisabledTime1},void 0,!1,{fileName:Ce,lineNumber:1328,columnNumber:19},this):null]},void 0,!0,{fileName:Ce,lineNumber:1311,columnNumber:15},this),Object(h.jsxDEV)("div",{className:"boxTime column",children:[Object(h.jsxDEV)(Q.a,{className:"column_label",disabled:!(null===(H=this.props.data)||void 0===H||!H.id),value:this.state.model.usable_time,onChange:({target:e})=>{this.onHandleChange(e.value,"usable_time"),this.onHandleChange("","effect_date_type"),this.onHandleChange("","effect_date"),this.onHandleChange([[]],"fixed_time"),this.onHandleChange([[]],"irregularDate"),this.onHandleChange([[]],"irregularTime")},children:Object(h.jsxDEV)(Z.a,{value:"week",children:"\u6709\u6548\u671f\u5185\uff0c\u89c4\u5219\u65e5\u671f\u53ef\u7528"},void 0,!1,{fileName:Ce,lineNumber:1360,columnNumber:19},this)},void 0,!1,{fileName:Ce,lineNumber:1347,columnNumber:17},this),"week"===this.state.model.usable_time?Object(h.jsxDEV)(h.Fragment,{children:[Object(h.jsxDEV)(j.a.Group,{value:this.state.model.ruleWeek,onChange:e=>this.onHandleChange(e,"ruleWeek"),style:{marginLeft:"25px",marginTop:"20px"},children:Fe.map((e=>{var t;return Object(h.jsxDEV)(j.a,{className:"checkbox",disabled:!(null===(t=this.props.data)||void 0===t||!t.id),value:e.text,children:e.text},e.key,!1,{fileName:Ce,lineNumber:1370,columnNumber:25},this)}))},void 0,!1,{fileName:Ce,lineNumber:1364,columnNumber:21},this),this.state.model.ruleDate.map(((e,t)=>{var i;return Object(h.jsxDEV)("div",{className:"options_time",children:[Object(h.jsxDEV)(re.a,{disabled:!(null===(i=this.props.data)||void 0===i||!i.id),className:"zent-datepicker-plan column_datepicker",showTime:{format:"HH:mm:ss",defaultTime:[Y()().format("HH:mm:ss"),"23:59:59"]},value:this.state.model.ruleDate[t],onChange:e=>{const i=this.state.model.ruleDate;i[t]=e,this.onHandleChange(i,"ruleDate")},width:205,disabledTime:this.onDisabledRange},void 0,!1,{fileName:Ce,lineNumber:1382,columnNumber:25},this),this.addOrMoveFunction(t,"ruleDate",this.state.model.ruleDate,!1,"\u6700\u591a\u8bbe\u7f6e3\u4e2a\u65f6\u6bb5")]},t,!0,{fileName:Ce,lineNumber:1381,columnNumber:23},this)})),Object(h.jsxDEV)("p",{className:"notice",children:"\u8bf7\u6309\u716724\u5c0f\u65f6\u5236\u8f93\u5165\u53ef\u7528\u65f6\u6bb5\uff0c\u6700\u591a\u8bbe\u7f6e3\u4e2a\u65f6\u6bb5"},void 0,!1,{fileName:Ce,lineNumber:1407,columnNumber:21},this)]},void 0,!0):null]},void 0,!0,{fileName:Ce,lineNumber:1346,columnNumber:15},this),Object(h.jsxDEV)("div",{className:"boxTime column",style:{marginTop:"15px"},children:[Object(h.jsxDEV)(Q.a,{disabled:!(null===(q=this.props.data)||void 0===q||!q.id),value:this.state.model.usable_time,onChange:({target:e})=>{this.onHandleChange(e.value,"usable_time"),this.onHandleChange("","effect_date_type"),this.onHandleChange("","effect_date"),this.onHandleChange([[]],"fixed_time"),this.onHandleChange([],"ruleWeek"),this.onHandleChange([[]],"ruleDate")},children:Object(h.jsxDEV)(Z.a,{value:"irregular",children:"\u6709\u6548\u671f\u5185\uff0c\u4e0d\u89c4\u5219\u65e5\u671f\u53ef\u7528"},void 0,!1,{fileName:Ce,lineNumber:1424,columnNumber:19},this)},void 0,!1,{fileName:Ce,lineNumber:1412,columnNumber:17},this),"irregular"===this.state.model.usable_time?Object(h.jsxDEV)(h.Fragment,{children:[Object(h.jsxDEV)("p",{className:"notice",style:{width:"500px"},children:"\u53ef\u5728\u6709\u6548\u671f\u5185\u4efb\u610f\u9009\u62e9\u65f6\u95f4\u5929\u6570\uff0c\u4ee5\u53ca\u53ef\u7528\u65f6\u6bb5\u3002 \u56e0\u5f53\u524d\u5fae\u4fe1\u652f\u6301\u95ee\u9898\uff0c\u5982\u9009\u62e9\u4e0d\u89c4\u5219\u65f6\u95f4\uff0c\u5fae\u4fe1\u5361\u5305\u5185\u5f53\u524d\u4ec5\u4f1a\u5c55\u793a\u6709\u6548\u671f\uff0c\u5efa\u8bae \u5c06\u5177\u4f53\u53ef\u7528\u65e5\u671f\u4ee5\u53ca\u65f6\u95f4\u6bb5\u586b\u5199\u5728\u4f7f\u7528\u8bf4\u660e\u5185\u3002"},void 0,!1,{fileName:Ce,lineNumber:1428,columnNumber:21},this),this.state.model.irregularDate.map(((e,t)=>{var i,a;return Object(h.jsxDEV)("div",{className:"options_time",children:[Object(h.jsxDEV)(ee.a,{className:"zent-datepicker-plan column_datepicker",format:"YYYY-MM-DD",disabled:[!(null===(i=this.props.data)||void 0===i||!i.id),!(null===(a=this.props.data)||void 0===a||!a.id)],width:205,value:this.state.model.irregularDate[t],onChange:e=>{const i=this.state.model.irregularDate;i[t]=e,this.onHandleChange(i,"irregularDate")},disabledDate:this.onDisabledRange2,disabledTime:this.onDisabledTime1},void 0,!1,{fileName:Ce,lineNumber:1435,columnNumber:25},this),this.addOrMoveFunction(t,"irregularDate",this.state.model.irregularDate,!0)]},t,!0,{fileName:Ce,lineNumber:1434,columnNumber:23},this)})),this.state.model.irregularTime.map(((e,t)=>{var i;return Object(h.jsxDEV)("div",{className:"options_time",children:[Object(h.jsxDEV)(re.a,{disabled:!(null===(i=this.props.data)||void 0===i||!i.id),className:"zent-datepicker-plan column_datepicker",showTime:{format:"HH:mm:ss",defaultTime:[Y()().format("HH:mm:ss"),"23:59:59"]},value:this.state.model.irregularTime[t],onChange:e=>{const i=this.state.model.irregularTime;i[t]=e,this.onHandleChange(i,"irregularTime")},width:205,disabledTime:this.onDisabledRange},void 0,!1,{fileName:Ce,lineNumber:1459,columnNumber:25},this),this.addOrMoveFunction(t,"irregularTime",this.state.model.irregularTime,!1,"\u6700\u591a\u8bbe\u7f6e3\u4e2a\u65f6\u6bb5")]},t,!0,{fileName:Ce,lineNumber:1458,columnNumber:23},this)}))]},void 0,!0):null]},void 0,!0,{fileName:Ce,lineNumber:1411,columnNumber:15},this)]},void 0,!0,{fileName:Ce,lineNumber:1255,columnNumber:13},this)]},void 0,!0,{fileName:Ce,lineNumber:1174,columnNumber:11},this)},void 0,!1,{fileName:Ce,lineNumber:1173,columnNumber:9},this),Object(h.jsxDEV)(d.a,{style:{width:"70%",margin:"10px 0"},title:"\u9884\u8b66\u89c4\u5219",children:[Object(h.jsxDEV)(l.a,{model:this.state.model,rules:ue.warning,ref:"form4",children:[Object(h.jsxDEV)(s.a,{id:"early_per",labelname:"\u9884\u8b66\u767e\u5206\u6bd4",children:[Object(h.jsxDEV)(oe.a,{value:this.state.model.early_per,onChange:e=>{this.onHandleChange(e,"early_per")},children:[Le.map((e=>Object(h.jsxDEV)(j.a,{value:e,children:[e,"%"]},e,!0,{fileName:Ce,lineNumber:1501,columnNumber:19},this))),Object(h.jsxDEV)(j.a,{value:this.state.input_early_per},void 0,!1,{fileName:Ce,lineNumber:1505,columnNumber:17},this)]},void 0,!0,{fileName:Ce,lineNumber:1494,columnNumber:15},this),Object(h.jsxDEV)(n.a,{className:"percent",onChange:e=>{this.filterEarlyPer(),this.setState({input_early_per:e})},onClearItem:()=>{this.filterEarlyPer(),this.setState({input_early_per:""})},value:this.state.input_early_per,placeholder:"",labelWidth:"0px",maxLength:3,height:"36px",unit:"%",countShow:!1,width:"190px",alignment:"left"},void 0,!1,{fileName:Ce,lineNumber:1507,columnNumber:15},this)]},void 0,!0,{fileName:Ce,lineNumber:1493,columnNumber:13},this),Object(h.jsxDEV)(s.a,{id:"early_notifier",labelname:"\u9884\u8b66\u901a\u77e5\u4eba",children:[Object(h.jsxDEV)("div",{className:"bt_se",children:Object(h.jsxDEV)(X.a,{className:"bt_se_select",options:this.state.userSelectList,placeholder:"\u9009\u62e9\u4e00\u9879",size:"xl",value:this.state.warningInput,onChange:e=>{const t=this.state.model;e&&(t.early_notifier.push(e),t.early_notifier=te(t.early_notifier,"key")),this.setState({warningInput:e,model:t})}},void 0,!1,{fileName:Ce,lineNumber:1530,columnNumber:17},this)},void 0,!1,{fileName:Ce,lineNumber:1529,columnNumber:15},this),Object(h.jsxDEV)("div",{className:"userSelect",children:Object(h.jsxDEV)("ol",{children:Object(le.a)(this.state.model.early_notifier)&&(null===(M=this.state.model.early_notifier)||void 0===M?void 0:M.map((e=>Object(h.jsxDEV)(me.a,{closable:null===e||void 0===e?void 0:e.closable,onClose:()=>this.closeCallback(e),children:null===e||void 0===e?void 0:e.text},null===e||void 0===e?void 0:e.key,!1,{fileName:Ce,lineNumber:1551,columnNumber:23},this))))},void 0,!1,{fileName:Ce,lineNumber:1548,columnNumber:17},this)},void 0,!1,{fileName:Ce,lineNumber:1547,columnNumber:15},this)]},void 0,!0,{fileName:Ce,lineNumber:1528,columnNumber:13},this)]},void 0,!0,{fileName:Ce,lineNumber:1492,columnNumber:11},this),Object(h.jsxDEV)(ce.a,{visible:this.state.visible,className:"questModal",onClose:()=>this.setState({visible:!1}),title:"\u52a0\u6b3e",children:Object(h.jsxDEV)(be,{data:this.state.model,onChangeMoney:(e,t=0)=>{const i=this.state.model;i.recharge_amount=(t+Number(i.recharge_amount)).toFixed(2),this.setState({visible:e,model:i})}},void 0,!1,{fileName:Ce,lineNumber:1569,columnNumber:13},this)},void 0,!1,{fileName:Ce,lineNumber:1563,columnNumber:11},this)]},void 0,!0,{fileName:Ce,lineNumber:1491,columnNumber:9},this),Object(h.jsxDEV)(d.a,{style:{width:"70%",margin:"10px 0"},title:"\u6837\u5f0f\u8bbe\u7f6e",children:Object(h.jsxDEV)(l.a,{ref:"form3",children:Object(h.jsxDEV)(s.a,{id:"instruction",labelname:"\u4f7f\u7528\u8bf4\u660e",required:"",children:Object(h.jsxDEV)(Oe,{pageType:"detaileditor",setEdittext:e=>{this.onHandleChange(e,"instruction")},width:"520px",text:this.state.model.instruction,limitLength:5e3},this.state.model.channel,!1,{fileName:Ce,lineNumber:1583,columnNumber:15},this)},void 0,!1,{fileName:Ce,lineNumber:1582,columnNumber:13},this)},void 0,!1,{fileName:Ce,lineNumber:1581,columnNumber:11},this)},void 0,!1,{fileName:Ce,lineNumber:1580,columnNumber:9},this),this.switchComponents()]},void 0,!0,{fileName:Ce,lineNumber:790,columnNumber:7},this)}}var Me=i(469),Pe=i(445),Be=(i(87),"/Users/zhangds/web/blue-brother/frontend/src/components/redPackets/timeComponent.jsx"),Ae=({data:e})=>{const[t,i]=Object(r.useState)([]);return Object(r.useEffect)((()=>{i(se(e.receive_rule.week))}),[e.receive_rule.week,e.receive_irregular]),function(){var i,a;switch(e.receive_type){case 1:return Object(h.jsxDEV)("div",{className:"available_time",children:[Object(h.jsxDEV)("p",{className:"available_time_text",children:"\u9886\u53d6\u65f6\u95f4"},void 0,!1,{fileName:Be,lineNumber:14,columnNumber:13},this),Object(h.jsxDEV)("ul",{className:"timeList",children:null===t||void 0===t?void 0:t.map((t=>Object(h.jsxDEV)("li",{children:[t,e.receive_rule.time.map(((e,t)=>{if(e[1])return Object(h.jsxDEV)("p",{style:{textAlign:"center",marginTop:"5px"},children:[e[0],"~",e[1]]},t,!0,{fileName:Be,lineNumber:22,columnNumber:25},this)}))]},t,!0,{fileName:Be,lineNumber:17,columnNumber:17},this)))},void 0,!1,{fileName:Be,lineNumber:15,columnNumber:13},this)]},void 0,!0,{fileName:Be,lineNumber:13,columnNumber:11},this);case 2:return Object(h.jsxDEV)("div",{className:"available_time",children:[Object(h.jsxDEV)("p",{className:"available_time_text",children:"\u9886\u53d6\u65f6\u95f4"},void 0,!1,{fileName:Be,lineNumber:35,columnNumber:13},this),Object(h.jsxDEV)("ul",{className:"timeList",children:null===(i=e.receive_irregular)||void 0===i?void 0:i.map((e=>Object(h.jsxDEV)("li",{children:[e.date,e.time.map((e=>{if(e[1])return Object(h.jsxDEV)("p",{style:{marginTop:"5px"},children:[e[0],"~",e[1]]},e[1],!0,{fileName:Be,lineNumber:43,columnNumber:25},this)}))]},e.data,!0,{fileName:Be,lineNumber:38,columnNumber:17},this)))},void 0,!1,{fileName:Be,lineNumber:36,columnNumber:13},this)]},void 0,!0,{fileName:Be,lineNumber:34,columnNumber:11},this);case 3:return Object(h.jsxDEV)("div",{className:"available_time",children:[Object(h.jsxDEV)("p",{className:"available_time_text",children:"\u9886\u53d6\u65f6\u95f4"},void 0,!1,{fileName:Be,lineNumber:56,columnNumber:13},this),Object(h.jsxDEV)("ul",{className:"timeList",children:null===(a=e.receive_day)||void 0===a?void 0:a.map((e=>Object(h.jsxDEV)("li",{children:e.join(" ~ ")},e.item,!1,{fileName:Be,lineNumber:59,columnNumber:17},this)))},void 0,!1,{fileName:Be,lineNumber:57,columnNumber:13},this)]},void 0,!0,{fileName:Be,lineNumber:55,columnNumber:11},this);default:return Object(h.jsxDEV)(h.Fragment,{},void 0,!1)}}()},ze="/Users/zhangds/web/blue-brother/frontend/src/components/redPackets/mobileComponent.jsx";const Je=[24,100,100,100,80,100,100,100,80,100,100,100,80,100,100,100,100];var Ue=({data:e})=>{function t(){const{cash_amount_type:t,min_denomination:i,max_denomination:a}=e,s={b:"20px",a:"40px"};if("2"===t){const e=String(parseFloat(i)).length+String(parseFloat(a)).length+1;return e>6?{a:32-1.1*(e-6)+"px",b:20-(e-6)+"px"}:s}return s}return Object(h.jsxDEV)("div",{id:"redPacketsViews",className:"mobile",children:Object(h.jsxDEV)("div",{className:"box",children:[Object(h.jsxDEV)("div",{className:"top",children:[Object(h.jsxDEV)("p",{className:"title",children:e.batch_goods_name||Object(h.jsxDEV)("span",{children:"\u798f\u5229\u6765\u88ad \xa0\u7ea2\u5305\u5151\u6362"},void 0,!1,{fileName:ze,lineNumber:32,columnNumber:58},void 0)},void 0,!1,{fileName:ze,lineNumber:32,columnNumber:11},void 0),Object(h.jsxDEV)("p",{className:"effect_date",children:Object(h.jsxDEV)("span",{children:["\u7ea2\u5305\u6709\u9650\u671f\u622a\u6b62:",e.effect_date[1]||"2023-12-30 23:59:59"]},void 0,!0,{fileName:ze,lineNumber:34,columnNumber:13},void 0)},void 0,!1,{fileName:ze,lineNumber:33,columnNumber:11},void 0),Object(h.jsxDEV)("p",{className:"money",style:{fontSize:t().a},children:[Object(h.jsxDEV)("span",{className:"tag",style:{fontSize:t().b},children:"\uffe5"},void 0,!1,{fileName:ze,lineNumber:40,columnNumber:13},void 0),"1"===e.cash_amount_type?parseFloat(e.denomination||.01):`${parseFloat(e.min_denomination||.01)}~${parseFloat(e.max_denomination||88.88)}`]},void 0,!0,{fileName:ze,lineNumber:39,columnNumber:11},void 0),Object(h.jsxDEV)("p",{className:"type",children:Object(h.jsxDEV)("span",{children:"1"===e.cash_amount_type?"\u56fa\u989d\u7ea2\u5305":"\u968f\u673a\u7ea2\u5305"},void 0,!1,{fileName:ze,lineNumber:50,columnNumber:13},void 0)},void 0,!1,{fileName:ze,lineNumber:49,columnNumber:11},void 0),Object(h.jsxDEV)("img",{src:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/redPacktes/common_btn_receive.png",className:"bt",alt:""},void 0,!1,{fileName:ze,lineNumber:52,columnNumber:11},void 0)]},void 0,!0,{fileName:ze,lineNumber:31,columnNumber:9},void 0),Object(h.jsxDEV)("div",{className:"instruction-box",children:[Object(h.jsxDEV)("div",{className:"instruction-header"},void 0,!1,{fileName:ze,lineNumber:59,columnNumber:11},void 0),Object(h.jsxDEV)("div",{className:"instruction",children:Object(h.jsxDEV)("div",{className:"instruction-1",children:[Object(h.jsxDEV)("p",{className:"center",children:Object(h.jsxDEV)("img",{className:"notice",src:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/redPacktes/common_title_notice.png",alt:""},void 0,!1,{fileName:ze,lineNumber:63,columnNumber:17},void 0)},void 0,!1,{fileName:ze,lineNumber:62,columnNumber:15},void 0),e.instruction||[1,2,3].includes(e.receive_type)?Object(h.jsxDEV)(h.Fragment,{children:[Object(h.jsxDEV)(Ae,{data:e},void 0,!1,{fileName:ze,lineNumber:72,columnNumber:19},void 0),Object(h.jsxDEV)("h3",{className:"instruction-text",children:"\u4f7f\u7528\u89c4\u5219"},void 0,!1,{fileName:ze,lineNumber:73,columnNumber:19},void 0),Object(h.jsxDEV)("p",{className:"scroll",dangerouslySetInnerHTML:{__html:e.instruction}},void 0,!1,{fileName:ze,lineNumber:74,columnNumber:19},void 0)]},void 0,!0):Object(h.jsxDEV)(pe.a.TextBlock,{className:"TextBlock",animate:!0,widths:Je,rows:20,dashed:!1},void 0,!1,{fileName:ze,lineNumber:82,columnNumber:17},void 0)]},void 0,!0,{fileName:ze,lineNumber:61,columnNumber:13},void 0)},void 0,!1,{fileName:ze,lineNumber:60,columnNumber:11},void 0)]},void 0,!0,{fileName:ze,lineNumber:58,columnNumber:9},void 0)]},void 0,!0,{fileName:ze,lineNumber:30,columnNumber:7},void 0)},void 0,!1,{fileName:ze,lineNumber:29,columnNumber:5},void 0)},We=i(502);const Re=/^\d+(\.\d{1,2})?$/,Ke={type:"regExp",message:"\u6700\u591a\u4fdd\u75592\u4f4d\u5c0f\u6570",reg:Re};var Ye={basic:{batch_goods_name:[{type:"required",message:"\u8bf7\u8f93\u5165\u6279\u6b21\u5546\u54c1\u540d\u79f0"}],wishing:[{type:"required",message:"\u8bf7\u8f93\u5165"},{type:"regExp",message:"\u4e0d\u5141\u8bb8\u8f93\u5165\u7a7a\u683c\uff0c\u8bf7\u91cd\u65b0\u8f93\u5165",reg:/^\S*$/}]},grant:{num:[{type:"required",message:"\u8bf7\u8f93\u5165\u7ea2\u5305\u4e2a\u6570"},{type:"regExp",message:"\u8bf7\u8f93\u51651 ~ 100000\u4e2a\u6b63\u6574\u6570\u7ea2\u5305",reg:/^[1-9]\d{0,4}$|^100000$/}],denomination:[{type:"required",message:"\u8bf7\u8f93\u5165\u652f\u4ed8\u5b9d\uff080.01\uff09/ \u5fae\u4fe1\uff080.1\uff09 ~ 200\u9762\u989d"},{...Ke}],total_contract_price:[{type:"required",message:"\u8bf7\u8f93\u5165\u5408\u540c\u603b\u4ef7"},{...Ke}],all_budget:[{type:"required",message:"\u8bf7\u8f93\u5165\u603b\u9884\u7b97"},{...Ke}],day_budget:[{type:"required",message:"\u8bf7\u8f93\u5165\u5355\u5929\u9884\u7b97"},{...Ke}],receive_num:[{type:"required",message:"\u8bf7\u8f93\u5165\u7528\u6237\u53ef\u9886\u4e2a\u6570"},{type:"regExp",message:"\u8bf7\u8f93\u51651 ~ 100000\u4e2a\u6b63\u6574\u6570\u7ea2\u5305",reg:/^[1-9]\d{0,4}$|^100000$/}]},time:{effect_date:[{type:"required",message:"\u8bf7\u9009\u62e9\u751f\u6548\u65f6\u95f4\u6bb5"}]}};function $e(e,t,i){const a=Object(de.a)(e.model);if(a.all_budget=Number(a.all_budget),a.day_budget=Number(a.day_budget),a.receive_num=Number(a.receive_num),a.num=Number(a.num),a.min_denomination=Number(a.min_denomination),a.max_denomination=Number(a.max_denomination),a.denomination=Number(a.denomination),3===a.receive_type){if(a.receive_day.length<1)return c.a.error("\u8bf7\u9009\u62e9\u6bcf\u65e5\u53ef\u9886\u65f6\u95f4"),!1;if(Ze(a.receive_day))return c.a.error("\u6bcf\u65e5\u53ef\u9886\u65f6\u95f4\u5b58\u5728\u4ea4\u96c6"),!1}if(1===a.receive_type){if(a.receive_rule.time.length<1||a.receive_rule.week.length<1)return c.a.error("\u8bf7\u5b8c\u6574\u7684\u9009\u62e9\u89c4\u5219\u65e5\u671f\u548c\u65f6\u95f4"),!1;if(Ze(a.receive_rule.time))return c.a.error("\u6709\u6548\u671f\u5185\uff0c\u89c4\u5219\u65f6\u95f4\u5b58\u5728\u4ea4\u96c6"),!1}if(2===a.receive_type){let e=!1,t=!1,i=[];if(a.receive_irregular.map((a=>{a.date||(e=!0),a.date&&i.push(a.date),Ze(a.time)&&(t=!0),a.time.map((t=>{t.length<2&&(e=!0)}))})),e)return c.a.error("\u8bf7\u5b8c\u6574\u7684\u9009\u62e9\u4e0d\u89c4\u5219\u65e5\u671f\u548c\u65f6\u95f4"),!1;if(Object(We.a)(i).length!==a.receive_irregular.length)return c.a.error("\u6709\u6548\u671f\u5185\uff0c\u4e0d\u89c4\u5219\u65e5\u671f\u5b58\u5728\u4ea4\u96c6"),!1;if(t)return c.a.error("\u6709\u6548\u671f\u5185\uff0c\u4e0d\u89c4\u5219\u65f6\u95f4\u5b58\u5728\u4ea4\u96c6"),!1}if(a.early_per.filter((e=>e)).length<1)return c.a.error("\u8bf7\u9009\u9884\u8b66\u767e\u5206\u6bd4"),!1;if(a.numa.day_budget)return c.a.error("\u5355\u5929\u9884\u7b97\u53d1\u653e\u4e0a\u9650\u5e94\u8be5\u5927\u4e8e\u6216\u7b49\u4e8e\u9762\u989d"),!1;if(a.day_budget>a.all_budget)return c.a.error("\u5355\u5929\u9884\u7b97\u53d1\u653e\u4e0a\u9650\u9700\u8981\u5c0f\u4e8e\u6216\u7b49\u4e8e\u603b\u9884\u7b97"),!1;if(1===a.receive_every&&a.receive_num>10)return c.a.error("\u6bcf\u65e5\u7ea2\u5305\u6700\u9ad8\u4e0a\u9650\u4e3a10\u4e2a"),!1;if(2===a.receive_every&&a.receive_num>70)return c.a.error("\u6bcf\u5468\u7ea2\u5305\u6700\u9ad8\u4e0a\u9650\u4e3a70\u4e2a"),!1;if(3===a.receive_every&&a.receive_num>310)return c.a.error("\u6bcf\u6708\u7ea2\u5305\u6700\u9ad8\u4e0a\u9650\u4e3a310\u4e2a"),!1;if(a.early_notifier.length>14)return c.a.error("\u76ee\u524d\u4ec5\u652f\u6301\u65b0\u589e10\u4e2a\u9884\u8b66\u901a\u77e5\u4eba"),!1;if("2"===a.cash_amount_type){if(2===a.channel&&Ge(a,.1))return!1;if([1,3].includes(a.channel)&&Ge(a,.01))return!1;if(a.all_budgeta.max_denomination)return c.a.error("\u968f\u673a\u6700\u5927\u9762\u989d\u4e0d\u80fd\u5c0f\u4e8e\u6700\u5927\u9762\u989d\u7684\u6700\u5c0f\u503c"),!1;if(a.all_budgeta.day_budget)return c.a.error("\u5355\u5929\u9884\u7b97\u53d1\u653e\u4e0a\u9650\u5e94\u8be5\u5927\u4e8e\u6216\u7b49\u4e8e\u6700\u5c0f\u9762\u989d"),!1;if(a.day_budgeta.all_budget)return c.a.error("\u5355\u65e5\u53d1\u653e\u9884\u7b97\u4e0d\u5f97\u5c0f\u4e8e\u9762\u989d\u4e14\u4e0d\u5927\u4e8e\u603b\u9884\u7b97"),!1}if("1"===a.cash_amount_type){if(2===a.channel&&Qe(a,.1))return!1;if([1,3].includes(a.channel)&&Qe(a,.01))return!1;if(a.all_budgeta.all_budget)return c.a.error("\u5355\u65e5\u53d1\u653e\u9884\u7b97\u4e0d\u5f97\u5c0f\u4e8e\u9762\u989d\u4e14\u4e0d\u5927\u4e8e\u603b\u9884\u7b97"),!1}}function Ge(e,t){if(e.min_denomination200||!Re.test(e.max_denomination)||!Re.test(e.min_denomination))return e.min_denomination>e.max_denomination?(c.a.error("\u968f\u673a\u7ea2\u5305\u6700\u5c0f\u9762\u989d\u4e0d\u5f97\u5927\u4e8e\u6700\u5927\u9762\u989d"),!0):(c.a.error(`\u8bf7\u8f93\u5165${t} ~ 200\u7684\u9762\u989d\u4e14\u4fdd\u75592\u4f4d\u5c0f\u6570`),!0)}function Qe(e,t){if(e.denomination200||!Re.test(e.denomination))return c.a.error(`\u8bf7\u8f93\u5165${t} ~ 200\u7684\u9762\u989d\u4e14\u4fdd\u75592\u4f4d\u5c0f\u6570`),!0}function Ze(e){for(var t=0;t=l&&il}}const Xe=[{key:1,text:"\u6bcf\u65e5"},{key:2,text:"\u6bcf\u5468"},{key:3,text:"\u6bcf\u6708"},{key:0,text:"\u603b\u5171"}],et=[{key:"1",text:"\u5468\u4e00"},{key:"2",text:"\u5468\u4e8c"},{key:"3",text:"\u5468\u4e09"},{key:"4",text:"\u5468\u56db"},{key:"5",text:"\u5468\u4e94"},{key:"6",text:"\u5468\u516d"},{key:"7",text:"\u5468\u65e5"}],tt=["70","50","30","20"];function it({data:e}){return{model:{channel:1,cash_amount_type:"1",cash_activity_id:ie(8),batch_goods_name:"",num:"",denomination:"",min_denomination:"",max_denomination:"",all_budget:"",total_contract_price:"",day_budget:"",receive_num:"",receive_every:1,early_per:[],early_notifier:[],instruction:"",effect_date:[],begin_time:"",end_time:"",receive_type:0,wishing:"",receive_mode:1,receive_irregular:[{date:"",time:[[]]}],receive_rule:{week:[],time:[[]]},receive_day:[[]]},TimeDiffer:"",warningInput:[],input_early_per:"",userSelectList:[],form_data:{},isEdit:!(null===e||void 0===e||!e.id),computeMax:""}}var at="/Users/zhangds/web/blue-brother/frontend/src/components/redPackets/wangEditor.jsx";class st extends m.a.Component{constructor(e){super(e),this.state={editorHtml:"",count:0}}componentDidMount(){let e=this;const t=new xe.a("#wangeditorDom");this.setState({editor:t}),t.config.colors=["#696969","#9093a2","#fgddbb","#e3e7eb"],t.config.pasteText=!0,t.config.height=200,t.config.showFullScreen=!1,t.config.menus=["bold","foreColor","italic","indent","link","justify"],t.config.onchange=function(i){var a=t.txt.text();if(0==a.length&&e.props.setEdittext(""),a.length>e.props.limitLength){let i=a.slice(0,e.props.limitLength);return e.setState({editorHtml:i}),t.txt.html(i),void e.props.setEdittext(i)}e.setState({count:a.length}),e.setState({editorHtml:i}),e.props.setEdittext(i)},t.create();const i=setTimeout((()=>{t.txt.html(this.props.text),clearTimeout(i)}),500)}render(){return Object(h.jsxDEV)("div",{className:"countBox_par",children:[Object(h.jsxDEV)("div",{id:"wangeditorDom",style:{width:this.props.width}},void 0,!1,{fileName:at,lineNumber:54,columnNumber:9},this),Object(h.jsxDEV)("p",{className:"countBox",children:this.state.count+"/"+this.props.limitLength},void 0,!1,{fileName:at,lineNumber:55,columnNumber:9},this)]},void 0,!0,{fileName:at,lineNumber:53,columnNumber:7},this)}}var lt="/Users/zhangds/web/blue-brother/frontend/src/components/redPackets/ysf-mobileComponent.jsx";const nt=[24,100,100,100,80,100,100,100,80,100,100,100,80,100,100,100,100];var ot=({data:e})=>Object(h.jsxDEV)("div",{id:"ysf-redPacketsViews",className:"mobile",children:[Object(h.jsxDEV)("img",{className:"bubble",src:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/ysf-logo.png",alt:""},void 0,!1,{fileName:lt,lineNumber:8,columnNumber:7},void 0),Object(h.jsxDEV)("div",{className:"content",children:[Object(h.jsxDEV)("p",{className:"title",children:e.batch_goods_name||"\u4e91\u95ea\u4ed8"},void 0,!1,{fileName:lt,lineNumber:14,columnNumber:9},void 0),Object(h.jsxDEV)("div",{className:"information",children:[Object(h.jsxDEV)("p",{className:"money",style:{fontSize:"32px"},children:[Object(h.jsxDEV)("span",{className:"tag",style:{fontSize:"20px"},children:"\uffe5"},void 0,!1,{fileName:lt,lineNumber:17,columnNumber:13},void 0),"1"===e.cash_amount_type?parseFloat(e.denomination||.01):`${parseFloat(e.min_denomination||.01)} ~ ${parseFloat(e.max_denomination||88.88)}`]},void 0,!0,{fileName:lt,lineNumber:16,columnNumber:11},void 0),Object(h.jsxDEV)("p",{className:"information-p2",children:["\u8bf7\u5728\xa0",e.effect_date[1]||"2023-12-30 23:59:59","\xa0\u5185\u9886\u53d6"]},void 0,!0,{fileName:lt,lineNumber:26,columnNumber:11},void 0),Object(h.jsxDEV)("p",{className:"type",children:Object(h.jsxDEV)("span",{children:"1"===e.cash_amount_type?"\u56fa\u989d\u7ea2\u5305":"\u968f\u673a\u7ea2\u5305"},void 0,!1,{fileName:lt,lineNumber:32,columnNumber:13},void 0)},void 0,!1,{fileName:lt,lineNumber:31,columnNumber:11},void 0)]},void 0,!0,{fileName:lt,lineNumber:15,columnNumber:9},void 0),Object(h.jsxDEV)("div",{className:"form","v-if":"coupon.status===3",children:[Object(h.jsxDEV)("p",{className:"form-label",children:"\u4e91\u95ea\u4ed8\u8d26\u53f7"},void 0,!1,{fileName:lt,lineNumber:36,columnNumber:11},void 0),Object(h.jsxDEV)("input",{className:"form-input",disabled:!0,type:"text",placeholder:"\u8bf7\u8f93\u5165\u624b\u673a\u53f7"},void 0,!1,{fileName:lt,lineNumber:37,columnNumber:11},void 0),Object(h.jsxDEV)("input",{className:"form-input mt0",disabled:!0,type:"text",placeholder:"\u8bf7\u518d\u6b21\u8f93\u5165\u624b\u673a\u53f7"},void 0,!1,{fileName:lt,lineNumber:38,columnNumber:11},void 0),Object(h.jsxDEV)("p",{className:"form-note",children:"\u60a8\u53ef\u5728\u4e91\u95ea\u4ed8\u7684\u4e2a\u4eba\u4fe1\u606f\u4e2d\u67e5\u770b\u3010\u4e91\u95ea\u4ed8\u8d26\u53f7\u3011"},void 0,!1,{fileName:lt,lineNumber:39,columnNumber:11},void 0),Object(h.jsxDEV)("button",{className:"form-button",children:"\u7acb\u5373\u9886\u53d6"},void 0,!1,{fileName:lt,lineNumber:40,columnNumber:11},void 0)]},void 0,!0,{fileName:lt,lineNumber:35,columnNumber:9},void 0),Object(h.jsxDEV)("div",{className:"segmentation",children:[Object(h.jsxDEV)("i",{className:"left"},void 0,!1,{fileName:lt,lineNumber:43,columnNumber:11},void 0),Object(h.jsxDEV)("i",{className:"middle"},void 0,!1,{fileName:lt,lineNumber:44,columnNumber:11},void 0),Object(h.jsxDEV)("i",{className:"right"},void 0,!1,{fileName:lt,lineNumber:45,columnNumber:11},void 0)]},void 0,!0,{fileName:lt,lineNumber:42,columnNumber:9},void 0),Object(h.jsxDEV)("div",{className:"illustrate",children:e.instruction||[1,2,3].includes(e.receive_type)?Object(h.jsxDEV)(h.Fragment,{children:[Object(h.jsxDEV)(Ae,{data:e},void 0,!1,{fileName:lt,lineNumber:50,columnNumber:15},void 0),Object(h.jsxDEV)("p",{className:"illustrate-title",children:"\u6d3b\u52a8\u8bf4\u660e"},void 0,!1,{fileName:lt,lineNumber:51,columnNumber:15},void 0),Object(h.jsxDEV)("p",{className:"illustrate-text",dangerouslySetInnerHTML:{__html:e.instruction}},void 0,!1,{fileName:lt,lineNumber:52,columnNumber:15},void 0)]},void 0,!0):Object(h.jsxDEV)(pe.a.TextBlock,{className:"TextBlock",animate:!0,widths:nt,rows:12,dashed:!1},void 0,!1,{fileName:lt,lineNumber:60,columnNumber:13},void 0)},void 0,!1,{fileName:lt,lineNumber:47,columnNumber:9},void 0)]},void 0,!0,{fileName:lt,lineNumber:13,columnNumber:7},void 0)]},void 0,!0,{fileName:lt,lineNumber:7,columnNumber:5},void 0),rt="/Users/zhangds/web/blue-brother/frontend/src/components/redPackets/zfb-mobileComponent.jsx";const mt=[24,100,100,100,80,100,100,100,80,100,100,100,80,100,100,100,100];var ct=({data:e})=>{function t(){const{cash_amount_type:t,min_denomination:i,max_denomination:a}=e,s={b:"20px",a:"40px"};if("2"===t){const e=String(parseFloat(i)).length+String(parseFloat(a)).length+1;return e>6?{a:32-1.1*(e-6)+"px",b:20-(e-6)+"px"}:s}return s}return Object(h.jsxDEV)("div",{id:"zfb-mobileComponent",className:"mobile",children:Object(h.jsxDEV)("div",{className:"box",children:[Object(h.jsxDEV)("div",{className:"top",children:[Object(h.jsxDEV)("p",{className:"title",children:e.batch_goods_name||Object(h.jsxDEV)("span",{children:"\u798f\u5229\u6765\u88ad \xa0\u7ea2\u5305\u5151\u6362"},void 0,!1,{fileName:rt,lineNumber:32,columnNumber:58},void 0)},void 0,!1,{fileName:rt,lineNumber:32,columnNumber:11},void 0),Object(h.jsxDEV)("p",{className:"effect_date",children:Object(h.jsxDEV)("span",{children:["\u7ea2\u5305\u6709\u9650\u671f\u622a\u6b62:",e.effect_date[1]||"2023-12-30 23:59:59"]},void 0,!0,{fileName:rt,lineNumber:34,columnNumber:13},void 0)},void 0,!1,{fileName:rt,lineNumber:33,columnNumber:11},void 0),Object(h.jsxDEV)("p",{className:"money",style:{fontSize:t().a},children:[Object(h.jsxDEV)("span",{className:"tag",style:{fontSize:t().b},children:"\uffe5"},void 0,!1,{fileName:rt,lineNumber:40,columnNumber:13},void 0),"1"===e.cash_amount_type?parseFloat(e.denomination||.01):`${parseFloat(e.min_denomination||.01)}~${parseFloat(e.max_denomination||88.88)}`]},void 0,!0,{fileName:rt,lineNumber:39,columnNumber:11},void 0),Object(h.jsxDEV)("p",{className:"type",children:Object(h.jsxDEV)("span",{children:"1"===e.cash_amount_type?"\u56fa\u989d\u7ea2\u5305":"\u968f\u673a\u7ea2\u5305"},void 0,!1,{fileName:rt,lineNumber:50,columnNumber:13},void 0)},void 0,!1,{fileName:rt,lineNumber:49,columnNumber:11},void 0)]},void 0,!0,{fileName:rt,lineNumber:31,columnNumber:9},void 0),Object(h.jsxDEV)("div",{className:"form",children:[Object(h.jsxDEV)("input",{className:"form-input",disabled:!0,type:"text",placeholder:"\u8bf7\u8f93\u5165\u771f\u5b9e\u59d3\u540d"},void 0,!1,{fileName:rt,lineNumber:54,columnNumber:11},void 0),Object(h.jsxDEV)("input",{className:"form-input mt0",disabled:!0,type:"text",placeholder:"\u8bf7\u8f93\u5165\u652f\u4ed8\u5b9d\u8d26\u53f7"},void 0,!1,{fileName:rt,lineNumber:55,columnNumber:11},void 0),Object(h.jsxDEV)("p",{className:"form-note",children:"\u60a8\u53ef\u5728\u652f\u4ed8\u5b9d\u7684\u4e2a\u4eba\u4fe1\u606f\u4e2d\u67e5\u770b\u3010\u652f\u4ed8\u5b9d\u8d26\u53f7\u3011"},void 0,!1,{fileName:rt,lineNumber:56,columnNumber:11},void 0),Object(h.jsxDEV)("img",{src:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/zfb-red-but.png",className:"but",alt:""},void 0,!1,{fileName:rt,lineNumber:57,columnNumber:11},void 0)]},void 0,!0,{fileName:rt,lineNumber:53,columnNumber:9},void 0),Object(h.jsxDEV)("div",{className:"instruction-box",children:[Object(h.jsxDEV)("div",{className:"instruction-header"},void 0,!1,{fileName:rt,lineNumber:64,columnNumber:11},void 0),Object(h.jsxDEV)("div",{className:"instruction",children:Object(h.jsxDEV)("div",{className:"instruction-1",children:[Object(h.jsxDEV)("p",{className:"center",children:Object(h.jsxDEV)("img",{className:"notice",src:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/redPacktes/common_title_notice.png",alt:""},void 0,!1,{fileName:rt,lineNumber:68,columnNumber:17},void 0)},void 0,!1,{fileName:rt,lineNumber:67,columnNumber:15},void 0),e.instruction||[1,2,3].includes(e.receive_type)?Object(h.jsxDEV)(h.Fragment,{children:[Object(h.jsxDEV)(Ae,{data:e},void 0,!1,{fileName:rt,lineNumber:77,columnNumber:19},void 0),Object(h.jsxDEV)("h3",{className:"instruction-text",children:"\u4f7f\u7528\u89c4\u5219"},void 0,!1,{fileName:rt,lineNumber:78,columnNumber:19},void 0),Object(h.jsxDEV)("p",{className:"scroll",dangerouslySetInnerHTML:{__html:e.instruction}},void 0,!1,{fileName:rt,lineNumber:79,columnNumber:19},void 0)]},void 0,!0):Object(h.jsxDEV)(pe.a.TextBlock,{className:"TextBlock",animate:!0,widths:mt,rows:20,dashed:!1},void 0,!1,{fileName:rt,lineNumber:87,columnNumber:17},void 0)]},void 0,!0,{fileName:rt,lineNumber:66,columnNumber:13},void 0)},void 0,!1,{fileName:rt,lineNumber:65,columnNumber:11},void 0)]},void 0,!0,{fileName:rt,lineNumber:63,columnNumber:9},void 0)]},void 0,!0,{fileName:rt,lineNumber:30,columnNumber:7},void 0)},void 0,!1,{fileName:rt,lineNumber:29,columnNumber:5},void 0)},dt="/Users/zhangds/web/blue-brother/frontend/src/components/redPackets/index.jsx";const ut=e=>Array.from({length:e},((e,t)=>t));class ht extends r.Component{constructor(e){super(e),this.onDisabledRange1=(e,t)=>{let i=JSON.parse(sessionStorage.getItem("redPackets_effectDate")),a=!1,s=Y()(e).format("YYYY-MM-DD HH:mm:ss");const l=Y()(i.end_time).format("HH:mm:ss");return"start"==t&&(a=l<"23:59:59"?Y()(s).isBefore(i.begin_time)||Y()(s).subtract(1,"days").isAfter(i.end_time):Y()(s).isBefore(i.begin_time)||Y()(s).isAfter(i.end_time)),"end"==t&&(a=Y()(s).add(1,"days").isBefore(i.begin_time)||Y()(s).isAfter(i.end_time)),a},this.onDisabledTime=(e,t)=>{let i=JSON.parse(sessionStorage.getItem("redPackets_effectDate"));const a=new Date(i.begin_time),s=a.getHours(),l=a.getMinutes(),n=a.getSeconds();return Object(R.a)(e,a)?{disabledHours:()=>ut(s),disabledMinutes:e=>e===s?ut(l):[],disabledSeconds:(e,t)=>e===s&&t===l?ut(n):[]}:{}},this.state={...it(this.props)}}componentWillMount(){this.getUserSelectList()}ruleComponents(e){return Object(h.jsxDEV)(h.Fragment,{children:[e>0&&Object(h.jsxDEV)("p",{className:"move",onClick:()=>{const t=this.state.model;t.receive_rule.time.splice(e,1),this.setState({model:t})},children:"\u5220\u9664"},void 0,!1,{fileName:dt,lineNumber:55,columnNumber:11},this),e===this.state.model.receive_rule.time.length-1&&Object(h.jsxDEV)("p",{className:"add",onClick:()=>{if(this.state.model.receive_rule.time.length<3){const e=this.state.model;e.receive_rule.time.push([]),this.setState({model:e})}else c.a.warn("\u6700\u591a\u8bbe\u7f6e3\u4e2a\u65f6\u6bb5")},children:"\u6dfb\u52a0"},void 0,!1,{fileName:dt,lineNumber:67,columnNumber:11},this)]},void 0,!0)}ruleDayComponents(e){return Object(h.jsxDEV)(h.Fragment,{children:[e>0&&Object(h.jsxDEV)("p",{className:"move",onClick:()=>{const t=this.state.model;t.receive_day.splice(e,1),this.setState({model:t})},children:"\u5220\u9664"},void 0,!1,{fileName:dt,lineNumber:91,columnNumber:11},this),e===this.state.model.receive_day.length-1&&Object(h.jsxDEV)("p",{className:"add",onClick:()=>{if(this.state.model.receive_day.length<3){const e=this.state.model;e.receive_day.push([]),this.setState({model:e})}else c.a.warn("\u6700\u591a\u8bbe\u7f6e3\u4e2a\u65f6\u6bb5")},children:"\u6dfb\u52a0"},void 0,!1,{fileName:dt,lineNumber:103,columnNumber:11},this)]},void 0,!0)}irregularComponents(){return Object(h.jsxDEV)(h.Fragment,{children:this.state.model.receive_irregular.map(((e,t)=>Object(h.jsxDEV)("div",{children:[Object(h.jsxDEV)(Me.a,{className:"item-time",title:`\u7b2c${0===t?"\u4e00":1===t?"\u4e8c":"\u4e09"}\u7ec4\u4e0d\u89c4\u5219\u65e5\u671f`},void 0,!1,{fileName:dt,lineNumber:128,columnNumber:13},this),Object(h.jsxDEV)("div",{className:"options_time",children:[Object(h.jsxDEV)(Pe.a,{className:"zent-datepicker-plan column_datepicker",format:"YYYY-MM-DD",width:205,value:e.date,onChange:e=>{const i=this.state.model.receive_irregular;i[t].date=e,this.onHandleChange(i,"receive_irregular")},disabledDate:{min:this.state.model.effect_date[0],max:this.state.model.effect_date[1]}},void 0,!1,{fileName:dt,lineNumber:133,columnNumber:15},this),t>0&&Object(h.jsxDEV)("p",{className:"move",onClick:()=>{const e=this.state.model;e.receive_irregular.splice(t,1),this.setState({model:e})},children:"\u5220\u9664"},void 0,!1,{fileName:dt,lineNumber:149,columnNumber:17},this),t===this.state.model.receive_irregular.length-1&&Object(h.jsxDEV)("p",{className:"add",onClick:()=>{if(this.state.model.receive_irregular.length<3){const e=this.state.model;e.receive_irregular.push({date:"",time:[[]]}),this.setState({model:e})}else c.a.warn("\u6700\u591a\u8bbe\u7f6e3\u4e2a\u65e5\u671f")},children:"\u6dfb\u52a0"},void 0,!1,{fileName:dt,lineNumber:161,columnNumber:17},this)]},t,!0,{fileName:dt,lineNumber:132,columnNumber:13},this),e.time.map(((i,a)=>Object(h.jsxDEV)("div",{className:"options_time",children:[Object(h.jsxDEV)(re.a,{className:"zent-datepicker-plan column_datepicker",showTime:{format:"HH:mm:ss",defaultTime:[Y()().format("HH:mm:ss"),"23:59:59"]},value:i,onChange:e=>{const i=this.state.model;i.receive_irregular[t].time[a]=e,this.setState({model:i})},width:205},void 0,!1,{fileName:dt,lineNumber:182,columnNumber:17},this),a>0&&Object(h.jsxDEV)("p",{className:"move",onClick:()=>{const e=this.state.model;e.receive_irregular[t].time.splice(a,1),this.setState({model:e})},children:"\u5220\u9664"},void 0,!1,{fileName:dt,lineNumber:198,columnNumber:19},this),a===e.time.length-1&&Object(h.jsxDEV)("p",{className:"add",onClick:()=>{if(e.time.length<3){const e=this.state.model;e.receive_irregular[t].time.push([]),this.setState({model:e})}else c.a.warn("\u6700\u591a\u8bbe\u7f6e3\u4e2a\u65f6\u6bb5")},children:"\u6dfb\u52a0"},void 0,!1,{fileName:dt,lineNumber:211,columnNumber:19},this)]},a,!0,{fileName:dt,lineNumber:181,columnNumber:15},this)))]},t,!0,{fileName:dt,lineNumber:127,columnNumber:11},this)))},void 0,!1)}echoFun(e=[]){const t=Object(de.a)(this.props.data);if(t){const{early_notifier:i,early_per:a,begin_time:s,end_time:l,receive_mode:n}=t;t.early_notifier=i.map((t=>e.map((e=>{if((null===t||void 0===t?void 0:t.mobile)===e.key||(null===t||void 0===t?void 0:t.real_name)===e.text)return e})).filter((e=>e))[0])).filter((e=>e)),t.effect_date=[],t.effect_date[0]=s,t.receive_mode=n||1,t.effect_date[1]=l,t.copy&&(t.cash_activity_id=ie(8));(a||[]).map((e=>-1===tt.indexOf(e)?this.setState({input_early_per:e,model:t}):this.setState({model:t})))}}getUserSelectList(){Object(a.Jb)().then((e=>Object(a.Tb)(e,((e,t)=>{const i=e.default.map((e=>e.real_name)),a=e.default.map((e=>e.mobile)),s=[],l=e.data.map((e=>{if(-1!==i.indexOf(e.real_name)||-1!==a.indexOf(e.mobile)){const t={key:e.mobile,text:e.real_name,disabled:!0,closable:!1};return s.push(t),t}return{key:e.mobile,text:e.real_name,closable:!0}}));this.onHandleChange(s,"early_notifier"),this.setState({userSelectList:l}),this.echoFun(l)}),(e=>{c.a.error(e)}))))}filterEarlyPer(){const e=this.state.model.early_per.filter((e=>e!==this.state.input_early_per));this.onHandleChange(e,"early_per")}async submit(){if(this.refs.form.validator()&&this.refs.form1.validator()&&this.refs.form2.validator()&&this.refs.form4.validator()){let e=[];const t=sessionStorage.getItem("redPacketsData");if(t&&(e=JSON.parse(t)),this.props.data){let t=e.findIndex((e=>e.cash_activity_id===this.props.data.cash_activity_id));return!1!==$e(this.state,this.computeMin(),this.computeMax_Min(!1))&&(this.props.data.cash_activity_id?e[t]=Object.assign(this.props.data,this.transformDataCode()):e[t]=this.transformDataCode(),sessionStorage.setItem("redPacketsData",JSON.stringify(e)),this.setState({form_data:e[t]}),!0)}{if(!1===$e(this.state,this.computeMin(),this.computeMax_Min(!1)))return!1;let t=e||[];const i=this.transformDataCode();return t.find((e=>e.cash_activity_id===i.cash_activity_id))?(c.a.error("\u4e0d\u5141\u8bb8\u8f93\u5165\u91cd\u590d\u7684\u5e73\u53f0\u6279\u6b21\u53f7"),!1):(t.push(i),sessionStorage.setItem("redPacketsData",JSON.stringify(t)),this.setState({form_data:i}),!0)}}}transformDataCode(){const{model:e}=this.state,t=Object(de.a)(e);t.begin_time=e.effect_date[0],t.end_time=e.effect_date[1];const{receive_num:i,num:a,early_notifier:s}=e;return t.receive_num=Number(i),t.num=Number(a),t.early_notifier=s.map((({text:e,key:t})=>({real_name:e,mobile:t}))),Object(o.a)(t,["effect_date"])}onHandleChange(e,t,i){let a=this.state.model;i?a[t][i]=e:a[t]=e,this.setState({model:a})}computeAllBudget(){const{num:e,cash_amount_type:t,denomination:i}=this.state.model;"1"===t&&this.onHandleChange((i*e).toFixed(2),"all_budget")}computeMax_Min(e=!0){const{min_denomination:t,num:i,all_budget:a}=this.state.model,s=1===this.state.model.channel?.01:.1,l=a-(i-1)*t;let n=0;return n=l>200?200:l200?200:i}else e=t;return e.toFixed(2)}closeCallback(e){const t=this.state.model.early_notifier.filter((t=>t.key!==e.key));this.onHandleChange(t,"early_notifier"),t.length<1&&this.setState({warningInput:[]})}dynamicPlaceholder(){return this.state.model.min_denomination*this.state.model.num>this.state.model.all_budget?"\u8bf7\u8f93\u5165":this.state.computeMax?`\u6700\u5927\u9762\u989d\u4e3a${this.computeMin()} ~ ${this.state.computeMax}`:"\u8bf7\u8f93\u5165"}switchComponents(){return 1==this.state.model.channel&&2===this.state.model.receive_mode?Object(h.jsxDEV)(ct,{data:this.state.model},void 0,!1,{fileName:dt,lineNumber:513,columnNumber:14},this):3==this.state.model.channel?Object(h.jsxDEV)(ot,{data:this.state.model},void 0,!1,{fileName:dt,lineNumber:516,columnNumber:14},this):Object(h.jsxDEV)(Ue,{data:this.state.model},void 0,!1,{fileName:dt,lineNumber:518,columnNumber:12},this)}render(){var e;return Object(h.jsxDEV)("div",{id:"redPackets",children:[Object(h.jsxDEV)(d.a,{style:{width:"70%",margin:"10px 0"},title:"\u57fa\u672c\u4fe1\u606f",children:Object(h.jsxDEV)(l.a,{model:this.state.model,rules:Ye.basic,ref:"form",children:[Object(h.jsxDEV)(s.a,{labelname:"\u6e20\u9053\u5e73\u53f0",prop:"channel",id:"type",children:Object(h.jsxDEV)(Q.a,{disabled:this.state.isEdit,onChange:({target:e})=>{this.onHandleChange(e.value,"channel"),3===e.value?this.onHandleChange("\u7528\u6237\u53ef\u5728\u4e91\u95ea\u4ed8APP-\u6211\u7684\u7ea2\u5305\u4e2d\u67e5\u770b\u6700\u8fd160\u5929\u5185\u5373\u5c06\u8fc7\u671f\u7684\u4e91\u95ea\u4ed8\u7ea2\u5305\u91d1\u989d\u53ca\u5230\u671f\u65f6\u95f4\u3002\u7528\u6237\u53c2\u52a0\u6d3b\u52a8 (\u5982\u5929\u5929\u9886\u7ea2\u5305\u3001\u79fb\u52a8\u79ef\u5206\u5151\u6362\u7ea2\u5305\u7b49\u6d3b\u52a8)\u83b7\u5f97\u7684\u4e91\u95ea\u4ed8\u7ea2\u5305\u6709\u6548\u671f\u4ee5\u8425\u9500\u6d3b\u52a8\u9875\u9762\u89c4\u5219\u8bf4\u660e\u4e3a\u51c6\uff0c\u5230\u671f\u540e\u81ea\u52a8\u5931\u6548\u3002\n
(\u4e00)\u5728\u4e91\u95ea\u4ed8\u7ea2\u5305\u7684\u6709\u6548\u671f\u5185\u4e0d\u9650\u4f7f\u7528\u65f6\u95f4\n
(\u4e8c) \u4f7f\u7528\u5546\u6237:\u4e13\u4eab\u7ea2\u5305\u652f\u6301\u4e91\u95ea\u4ed8APP\u5185\u624b\u673a\u5145\u503c\u3001\u6c34\u7535\u7164\u7f34\u8d39\u5546\u57ce\u8d2d\u7269\u7b49\u591a\u573a\u666f\u62b5\u6263\u652f\u4ed8\u3002\u4e5f\u53ef\u901a\u8fc7\u4e91\u95ea\u4ed8APP\u5728\u4e91\u95ea\u4ed8\u7ebf\u4e0b\u53d7\u7406\u5546\u6237\u8fdb\u884c\u4e8c\u7ef4\u7801\u4e3b\u626b\u6216\u88ab\u626b\u652f\u4ed8\u65f6\u62b5\u6263\u3002\u4e2a\u522b\u5546\u6237\u4e0d\u652f\u6301\u7ea2\u5305\u62b5\u6263\uff0c\u5177\u4f53\u4ee5\u652f\u4ed8\u7ed3\u679c\u4e3a\u51c6\u3002\n
(\u4e09) \u4f7f\u7528\u89c4\u5219:\n
1\u3001\u7ebf\u4e0b\u5546\u6237:\u7528\u6237\u5728\u4e91\u95ea\u4ed8\u7ebf\u4e0b\u53d7\u7406\u5546\u6237\u4f7f\u7528\u4e91\u95ea\u4ed8APP\uff0c\u51fa\u793a\u4ed8\u6b3e\u7801\u652f\u4ed8\u65f6\uff0c\u53ef\u4f7f\u7528\u4e91\u95ea\u4ed8\u7ea2\u5305\u62b5\u6263\u8ba2\u5355\u91d1\u989d\uff0c\u5982\u80af\u5fb7\u57fa\u3001\u5168\u5bb6\u4fbf\u5229\u5e97\u3001\u661f\u5df4\u514b\u3001\u5c48\u81e3\u6c0f\u3001\u7f57\u68ee\u4fbf\u5229\u5e97\u3001DQ\u3001\u6765\u4f0a\u4efd\u7b49\u3002\n
2\u3001\u7ebf\u4e0a\u5546\u6237:\u5728\u4e91\u95ea\u4ed8APP\u5185\u6216\u7ebf\u4e0a\u5546\u6237\uff0c\u9009\u62e9\u4e91\u95ea\u4ed8APP\u652f\u4ed8\u65f6\uff0c\u53ef\u4f7f\u7528\u4e91\u95ea\u4ed8\u7ea2\u5305\u62b5\u6263\u8ba2\u5355\u91d1\u989d\uff0c\u598212306\u3001\u4eac\u4e1c\u5230\u5bb6\u3001\u672c\u6765\u751f\u6d3b\u7b49\u3002\n
3\u30011\u5143\u4e91\u95ea\u4ed8\u7ea2\u5305\u53ef\u62b5\u62631\u5143\u4eba\u6c11\u5e01\u8ba2\u5355\u91d1\u989d\u3002\n
4\u3001\u8ba2\u5355\u91d1\u989d\u6ee10.01\u5143\u65f6\uff0c\u65b9\u53ef\u4f7f\u7528\u4e91\u95ea\u4ed8\u7ea2\u5305;\u62b5\u6263\u8ba2\u5355\u91d1\u989d\u65f6\uff0c\u9700\u81f3\u5c11\u652f\u4ed80.01\u5143\u3002\n
5\u3001\u4e91\u95ea\u4ed8\u7ea2\u5305\u4e0d\u53ef\u7528\u4e8e\u63d0\u73b0\u3001\u8d2d\u4e70\u6d3b\u671f+\u6216\u8005\u5176\u4ed6\u7406\u8d22\u4ea7\u54c1\u3002","instruction"):this.onHandleChange("","instruction"),1!==e.value&&this.onHandleChange(1,"receive_mode")},value:this.state.model.channel,children:[Object(h.jsxDEV)(ne.a,{value:1,children:"\u652f\u4ed8\u5b9d"},void 0,!1,{fileName:dt,lineNumber:543,columnNumber:17},this),Object(h.jsxDEV)(ne.a,{value:2,children:"\u5fae\u4fe1"},void 0,!1,{fileName:dt,lineNumber:544,columnNumber:17},this),Object(h.jsxDEV)(ne.a,{value:3,children:"\u4e91\u95ea\u4ed8"},void 0,!1,{fileName:dt,lineNumber:545,columnNumber:17},this)]},void 0,!0,{fileName:dt,lineNumber:528,columnNumber:15},this)},void 0,!1,{fileName:dt,lineNumber:527,columnNumber:13},this),Object(h.jsxDEV)(s.a,{labelname:"\u7ea2\u5305\u7c7b\u578b",prop:"cash_amount_type",id:"type",children:Object(h.jsxDEV)(Q.a,{disabled:this.state.isEdit,onChange:({target:e})=>{this.onHandleChange(e.value,"cash_amount_type"),this.onHandleChange("","all_budget"),this.onHandleChange("","max_denomination"),this.onHandleChange("","min_denomination"),this.onHandleChange("","denomination"),this.onHandleChange("","total_contract_price")},value:this.state.model.cash_amount_type,children:[Object(h.jsxDEV)(ne.a,{value:"1",children:"\u56fa\u989d"},void 0,!1,{fileName:dt,lineNumber:561,columnNumber:17},this),Object(h.jsxDEV)(ne.a,{value:"2",children:"\u968f\u673a"},void 0,!1,{fileName:dt,lineNumber:562,columnNumber:17},this)]},void 0,!0,{fileName:dt,lineNumber:549,columnNumber:15},this)},void 0,!1,{fileName:dt,lineNumber:548,columnNumber:13},this),1===this.state.model.channel?Object(h.jsxDEV)(s.a,{labelname:"\u9886\u53d6\u65b9\u5f0f",prop:"receive_mode",id:"receive_mode",children:Object(h.jsxDEV)(Q.a,{onChange:({target:e})=>{this.onHandleChange(e.value,"receive_mode")},value:this.state.model.receive_mode,children:[Object(h.jsxDEV)(ne.a,{value:1,children:"\u5b98\u65b9\u9886\u53d6"},void 0,!1,{fileName:dt,lineNumber:578,columnNumber:19},this),Object(h.jsxDEV)(ne.a,{value:2,children:"\u8d26\u53f7\u9886\u53d6"},void 0,!1,{fileName:dt,lineNumber:579,columnNumber:19},this)]},void 0,!0,{fileName:dt,lineNumber:572,columnNumber:17},this)},"receive_mode",!1,{fileName:dt,lineNumber:566,columnNumber:15},this):null,Object(h.jsxDEV)(s.a,{labelname:"\u7ea2\u5305\u6279\u6b21\u53f7",prop:"channel_activity_id",id:"batch_number",children:[Object(h.jsxDEV)(n.a,{disabled:!0,onChange:e=>{this.onHandleChange(e,"cash_activity_id")},onClearItem:()=>{this.onHandleChange("","cash_activity_id")},value:this.state.model.cash_activity_id,placeholder:"\u8bf7\u8f93\u5165",labelWidth:"0px",maxLength:50,height:"36px",width:"452px",alignment:"left"},void 0,!1,{fileName:dt,lineNumber:584,columnNumber:15},this),Object(h.jsxDEV)(u.a,{type:"icon",icon:"refresh",onClick:()=>this.onHandleChange(ie(8),"cash_activity_id"),disabled:this.state.isEdit},void 0,!1,{fileName:dt,lineNumber:600,columnNumber:15},this)]},void 0,!0,{fileName:dt,lineNumber:583,columnNumber:13},this),Object(h.jsxDEV)(s.a,{labelname:"\u6279\u6b21\u5546\u54c1\u540d\u79f0",prop:"batch_goods_name",id:"batch_goods_name",children:Object(h.jsxDEV)(n.a,{onChange:e=>{this.onHandleChange(e,"batch_goods_name")},onClearItem:()=>{this.onHandleChange("","batch_goods_name")},value:this.state.model.batch_goods_name,placeholder:"\u8bf7\u8f93\u5165",labelWidth:"0px",maxLength:12,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:dt,lineNumber:608,columnNumber:15},this)},void 0,!1,{fileName:dt,lineNumber:607,columnNumber:13},this),Object(h.jsxDEV)(s.a,{labelname:3===this.state.model.channel?"\u53d1\u653e\u5907\u6ce8":"\u795d\u798f\u8bed",prop:"wishing",id:"wishing",children:Object(h.jsxDEV)(n.a,{onChange:e=>{this.onHandleChange(e,"wishing")},onClearItem:()=>{this.onHandleChange("","wishing")},value:this.state.model.wishing,placeholder:"\u8bf7\u8f93\u5165",labelWidth:"0px",maxLength:32,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:dt,lineNumber:629,columnNumber:15},this)},void 0,!1,{fileName:dt,lineNumber:624,columnNumber:13},this)]},void 0,!0,{fileName:dt,lineNumber:526,columnNumber:11},this)},void 0,!1,{fileName:dt,lineNumber:525,columnNumber:9},this),Object(h.jsxDEV)(d.a,{style:{width:"70%",margin:"10px 0"},title:"\u53d1\u653e\u89c4\u5219",children:Object(h.jsxDEV)(l.a,{model:this.state.model,rules:Ye.grant,ref:"form1",children:[Object(h.jsxDEV)(s.a,{id:"all_budget",labelname:"\u603b\u9884\u7b97",prop:"all_budget",children:Object(h.jsxDEV)(n.a,{value:this.state.model.all_budget,placeholder:"\u8bf7\u8f93\u5165",disabled:this.state.isEdit||"1"===this.state.model.cash_amount_type,onChange:e=>{this.onHandleChange(e,"all_budget"),this.onHandleChange("","min_denomination"),this.onHandleChange("","num"),"2"===this.state.model.cash_amount_type&&this.computeMax_Min()},onClearItem:()=>{this.onHandleChange("","all_budget"),this.onHandleChange("","min_denomination"),this.onHandleChange("","num"),"2"===this.state.model.cash_amount_type&&this.computeMax_Min()},labelWidth:"0px",maxLength:9,height:"36px",unit:"\u5143",countShow:!1,width:"520px",alignment:"left"},void 0,!1,{fileName:dt,lineNumber:650,columnNumber:15},this)},void 0,!1,{fileName:dt,lineNumber:649,columnNumber:13},this),Object(h.jsxDEV)(s.a,{id:"redPackets_number",labelname:"\u7ea2\u5305\u4e2a\u6570",prop:"num",children:Object(h.jsxDEV)(n.a,{onChange:e=>{this.onHandleChange(e,"num"),"1"===this.state.model.cash_amount_type?this.computeAllBudget():this.computeMax_Min()},onClearItem:()=>{this.onHandleChange("","num"),"1"===this.state.model.cash_amount_type?this.computeAllBudget():this.computeMax_Min()},value:this.state.model.num,placeholder:"\u8bf7\u8f93\u5165",disabled:this.state.isEdit,labelWidth:"0px",maxLength:9,height:"36px",unit:"\u4e2a",countShow:!1,width:"520px",alignment:"left"},void 0,!1,{fileName:dt,lineNumber:680,columnNumber:15},this)},void 0,!1,{fileName:dt,lineNumber:679,columnNumber:13},this),"1"===this.state.model.cash_amount_type?Object(h.jsxDEV)(s.a,{labelname:"\u9762\u989d",prop:"denomination",children:Object(h.jsxDEV)(n.a,{onChange:e=>{this.onHandleChange(e,"denomination"),this.computeAllBudget()},onClearItem:()=>{this.onHandleChange("","denomination"),this.computeAllBudget()},value:this.state.model.denomination,placeholder:"\u8bf7\u8f93\u5165",disabled:this.state.isEdit,labelWidth:"0px",maxLength:6,height:"36px",unit:"\u5143",countShow:!1,width:"520px",alignment:"left"},void 0,!1,{fileName:dt,lineNumber:711,columnNumber:17},this)},"denomination",!1,{fileName:dt,lineNumber:710,columnNumber:15},this):Object(h.jsxDEV)(s.a,{id:"denomination",labelname:"\u9762\u989d",children:[Object(h.jsxDEV)(n.a,{onChange:e=>{this.onHandleChange(e,"min_denomination"),this.computeMax_Min()},onClearItem:()=>{this.onHandleChange("","min_denomination"),this.computeMax_Min()},value:this.state.model.min_denomination,placeholder:"\u8bf7\u8f93\u5165",labelWidth:"0px",unit:"\u5143",disabled:this.state.isEdit,countShow:!1,maxLength:6,height:"36px",width:"245px",alignment:"left"},void 0,!1,{fileName:dt,lineNumber:734,columnNumber:17},this),Object(h.jsxDEV)("span",{className:"JIan",children:"~"},void 0,!1,{fileName:dt,lineNumber:754,columnNumber:17},this),Object(h.jsxDEV)(n.a,{id:"denomination",onChange:e=>{this.onHandleChange(e,"max_denomination")},onClearItem:()=>{this.onHandleChange("","max_denomination")},value:this.state.model.max_denomination,prolong:!0,placeholder:this.dynamicPlaceholder(),labelWidth:"0px",unit:"\u5143",disabled:this.state.isEdit||!this.state.model.min_denomination||this.state.model.min_denomination*this.state.model.num>this.state.model.all_budget,countShow:!1,maxLength:6,height:"36px",width:"245px",alignment:"left"},void 0,!1,{fileName:dt,lineNumber:755,columnNumber:17},this)]},"random-denomination",!0,{fileName:dt,lineNumber:733,columnNumber:15},this),Object(h.jsxDEV)(s.a,{id:"all_budget",labelname:"\u5408\u540c\u603b\u4ef7",prop:"total_contract_price",children:Object(h.jsxDEV)(n.a,{value:this.state.model.total_contract_price,onChange:e=>{this.onHandleChange(e,"total_contract_price")},onClearItem:()=>{this.onHandleChange("","total_contract_price")},placeholder:"\u8bf7\u8f93\u5165",disabled:this.state.isEdit,labelWidth:"0px",maxLength:9,height:"36px",unit:"\u5143",countShow:!1,width:"520px",alignment:"left"},void 0,!1,{fileName:dt,lineNumber:788,columnNumber:15},this)},"amount",!1,{fileName:dt,lineNumber:782,columnNumber:13},this),Object(h.jsxDEV)(s.a,{id:"day_budget",labelname:"\u5355\u5929\u9884\u7b97\u53d1\u653e\u4e0a\u9650",prop:"day_budget",children:Object(h.jsxDEV)(n.a,{onChange:e=>{this.onHandleChange(e,"day_budget")},onClearItem:()=>{this.onHandleChange("","day_budget")},disabled:this.state.isEdit,value:this.state.model.day_budget,placeholder:"\u8bf7\u8f93\u5165",labelWidth:"0px",maxLength:9,height:"36px",unit:"\u5143",countShow:!1,width:"520px",alignment:"left"},void 0,!1,{fileName:dt,lineNumber:808,columnNumber:15},this)},void 0,!1,{fileName:dt,lineNumber:807,columnNumber:13},this),Object(h.jsxDEV)(s.a,{id:"receive_number",labelname:"\u7528\u6237\u53ef\u9886\u4e2a\u6570",prop:"receive_num",children:[Object(h.jsxDEV)(n.a,{onChange:e=>{this.onHandleChange(e,"receive_num")},onClearItem:()=>{this.onHandleChange("","receive_num")},disabled:this.state.isEdit,value:this.state.model.receive_num,placeholder:"\u8bf7\u8f93\u5165",labelWidth:"0px",height:"36px",unit:"\u4e2a",countShow:!1,width:"304px",alignment:"left"},void 0,!1,{fileName:dt,lineNumber:828,columnNumber:15},this),Object(h.jsxDEV)(Q.a,{disabled:this.state.isEdit,onChange:({target:e})=>{this.onHandleChange(e.value,"receive_every")},value:Number(this.state.model.receive_every),children:Xe.map((({key:e,text:t})=>Object(h.jsxDEV)(ne.a,{value:e,children:t},e,!1,{fileName:dt,lineNumber:853,columnNumber:19},this)))},void 0,!1,{fileName:dt,lineNumber:845,columnNumber:15},this)]},void 0,!0,{fileName:dt,lineNumber:827,columnNumber:13},this)]},void 0,!0,{fileName:dt,lineNumber:648,columnNumber:11},this)},void 0,!1,{fileName:dt,lineNumber:647,columnNumber:9},this),Object(h.jsxDEV)(d.a,{style:{width:"70%",margin:"10px 0"},title:"\u65f6\u95f4\u9650\u5236",children:Object(h.jsxDEV)(l.a,{model:this.state.model,rules:Ye.time,ref:"form2",children:[Object(h.jsxDEV)(s.a,{id:"entry_time",labelname:"\u751f\u6548\u65f6\u95f4\u6bb5",prop:"effect_date",children:Object(h.jsxDEV)(ee.a,{className:"zent-datepicker-plan",showTime:{format:"HH:mm:ss",defaultTime:["00:00:00","23:59:59"]},format:"YYYY-MM-DD HH:mm:ss",disabled:[this.state.isEdit,this.state.isEdit],width:245,value:this.state.model.effect_date,onChange:e=>{this.onHandleChange(e,"effect_date")},disabledTime:this.onDisabledTime,disabledDate:this.onDisabledRange1},void 0,!1,{fileName:dt,lineNumber:865,columnNumber:15},this)},void 0,!1,{fileName:dt,lineNumber:864,columnNumber:13},this),Object(h.jsxDEV)(s.a,{id:"usable_time",labelname:"\u9886\u53d6\u65f6\u95f4\u6bb5",prop:"official_price",children:[Object(h.jsxDEV)("div",{className:"boxTime",children:Object(h.jsxDEV)(Q.a,{value:this.state.model.receive_type,onChange:({target:e})=>{this.onHandleChange(e.value,"receive_type"),this.onHandleChange([[]],"receive_day"),this.onHandleChange([{date:"",time:[[]]}],"receive_irregular"),this.onHandleChange({week:[],time:[[]]},"receive_rule")},children:Object(h.jsxDEV)(Z.a,{value:0,children:"\u4e0d\u8bbe\u7f6e"},void 0,!1,{fileName:dt,lineNumber:907,columnNumber:19},this)},void 0,!1,{fileName:dt,lineNumber:884,columnNumber:17},this)},void 0,!1,{fileName:dt,lineNumber:883,columnNumber:15},this),Object(h.jsxDEV)("div",{className:"boxTime column ",style:{marginTop:"15px"},children:[Object(h.jsxDEV)(Q.a,{value:this.state.model.receive_type,onChange:({target:e})=>{this.onHandleChange(e.value,"receive_type"),this.onHandleChange([{date:"",time:[[]]}],"receive_irregular"),this.onHandleChange({week:[],time:[[]]},"receive_rule")},children:Object(h.jsxDEV)(Z.a,{value:3,children:"\u6bcf\u65e5\u53ef\u9886"},void 0,!1,{fileName:dt,lineNumber:933,columnNumber:19},this)},void 0,!1,{fileName:dt,lineNumber:911,columnNumber:17},this),3===this.state.model.receive_type?Object(h.jsxDEV)(h.Fragment,{children:this.state.model.receive_day.map(((e,t)=>Object(h.jsxDEV)("div",{className:"options_time",children:[Object(h.jsxDEV)(re.a,{className:"zent-datepicker-plan column_datepicker",showTime:{format:"HH:mm:ss",defaultTime:[Y()().format("HH:mm:ss"),"23:59:59"]},width:195,value:e,onChange:e=>{const i=this.state.model;i.receive_day[t]=e,this.setState({model:i})}},void 0,!1,{fileName:dt,lineNumber:939,columnNumber:25},this),this.ruleDayComponents(t)]},t,!0,{fileName:dt,lineNumber:938,columnNumber:23},this)))},void 0,!1):null]},void 0,!0,{fileName:dt,lineNumber:910,columnNumber:15},this),Object(h.jsxDEV)("div",{className:"boxTime column",children:[Object(h.jsxDEV)(Q.a,{className:"column_label",value:this.state.model.receive_type,onChange:({target:e})=>{this.onHandleChange(e.value,"receive_type"),this.onHandleChange([{date:"",time:[[]]}],"receive_irregular"),this.onHandleChange([[]],"receive_day")},children:Object(h.jsxDEV)(Z.a,{value:1,children:"\u6709\u6548\u671f\u5185\uff0c\u89c4\u5219\u65e5\u671f\u53ef\u9886"},void 0,!1,{fileName:dt,lineNumber:978,columnNumber:19},this)},void 0,!1,{fileName:dt,lineNumber:961,columnNumber:17},this),1===this.state.model.receive_type?Object(h.jsxDEV)(h.Fragment,{children:[Object(h.jsxDEV)(j.a.Group,{value:this.state.model.receive_rule.week,onChange:e=>this.onHandleChange(e,"receive_rule","week"),style:{marginLeft:"25px",marginTop:"20px"},children:et.map((e=>Object(h.jsxDEV)(j.a,{className:"checkbox",value:e.key,children:e.text},e.key,!1,{fileName:dt,lineNumber:988,columnNumber:25},this)))},void 0,!1,{fileName:dt,lineNumber:982,columnNumber:21},this),this.state.model.receive_rule.time.map(((e,t)=>Object(h.jsxDEV)("div",{className:"options_time",children:[Object(h.jsxDEV)(re.a,{className:"zent-datepicker-plan column_datepicker",showTime:{format:"HH:mm:ss",defaultTime:[Y()().format("HH:mm:ss"),"23:59:59"]},value:e,onChange:e=>{const i=this.state.model;i.receive_rule.time[t]=e,this.setState({model:i})},width:205},void 0,!1,{fileName:dt,lineNumber:995,columnNumber:25},this),this.ruleComponents(t)]},t,!0,{fileName:dt,lineNumber:994,columnNumber:23},this))),Object(h.jsxDEV)("p",{className:"notice",children:"\u8bf7\u6309\u716724\u5c0f\u65f6\u5236\u8f93\u5165\u53ef\u7528\u65f6\u6bb5\uff0c\u6700\u591a\u8bbe\u7f6e3\u4e2a\u65f6\u6bb5"},void 0,!1,{fileName:dt,lineNumber:1013,columnNumber:21},this)]},void 0,!0):null]},void 0,!0,{fileName:dt,lineNumber:960,columnNumber:15},this),Object(h.jsxDEV)("div",{className:"boxTime column",style:{marginTop:"15px"},children:[Object(h.jsxDEV)(Q.a,{value:this.state.model.receive_type,onChange:({target:e})=>{this.onHandleChange(e.value,"receive_type"),this.onHandleChange({week:[],time:[[]]},"receive_rule"),this.onHandleChange([[]],"receive_day")},children:Object(h.jsxDEV)(Z.a,{value:2,children:"\u6709\u6548\u671f\u5185\uff0c\u4e0d\u89c4\u5219\u65e5\u671f\u53ef\u9886"},void 0,!1,{fileName:dt,lineNumber:1026,columnNumber:19},this)},void 0,!1,{fileName:dt,lineNumber:1018,columnNumber:17},this),2===this.state.model.receive_type?Object(h.jsxDEV)(h.Fragment,{children:[Object(h.jsxDEV)("p",{className:"notice",style:{width:"500px"},children:"\u53ef\u5728\u6709\u6548\u671f\u5185\u4efb\u610f\u9009\u62e9\u65f6\u95f4\u5929\u6570\uff0c\u4ee5\u53ca\u53ef\u7528\u65f6\u6bb5\u3002 \u56e0\u5f53\u524d\u5fae\u4fe1\u652f\u6301\u95ee\u9898\uff0c\u5982\u9009\u62e9\u4e0d\u89c4\u5219\u65f6\u95f4\uff0c\u5fae\u4fe1\u5361\u5305\u5185\u5f53\u524d\u4ec5\u4f1a\u5c55\u793a\u6709\u6548\u671f\uff0c\u5efa\u8bae \u5c06\u5177\u4f53\u53ef\u7528\u65e5\u671f\u4ee5\u53ca\u65f6\u95f4\u6bb5\u586b\u5199\u5728\u4f7f\u7528\u8bf4\u660e\u5185\u3002"},void 0,!1,{fileName:dt,lineNumber:1030,columnNumber:21},this),this.irregularComponents()]},void 0,!0):null]},void 0,!0,{fileName:dt,lineNumber:1017,columnNumber:15},this)]},void 0,!0,{fileName:dt,lineNumber:882,columnNumber:13},this)]},void 0,!0,{fileName:dt,lineNumber:863,columnNumber:11},this)},void 0,!1,{fileName:dt,lineNumber:862,columnNumber:9},this),Object(h.jsxDEV)(d.a,{style:{width:"70%",margin:"10px 0"},title:"\u9884\u8b66\u89c4\u5219",children:Object(h.jsxDEV)(l.a,{model:this.state.model,rules:Ye.warning,ref:"form4",children:[Object(h.jsxDEV)(s.a,{id:"early_per",labelname:"\u9884\u8b66\u767e\u5206\u6bd4",children:[Object(h.jsxDEV)(oe.a,{value:this.state.model.early_per,onChange:e=>{this.onHandleChange(e,"early_per")},children:[tt.map((e=>Object(h.jsxDEV)(j.a,{value:e,children:[e,"%"]},e,!0,{fileName:dt,lineNumber:1053,columnNumber:19},this))),Object(h.jsxDEV)(j.a,{value:this.state.input_early_per},void 0,!1,{fileName:dt,lineNumber:1057,columnNumber:17},this)]},void 0,!0,{fileName:dt,lineNumber:1046,columnNumber:15},this),Object(h.jsxDEV)(n.a,{className:"percent",onChange:e=>{this.filterEarlyPer(),this.setState({input_early_per:e})},onClearItem:()=>{this.filterEarlyPer(),this.setState({input_early_per:""})},value:this.state.input_early_per,placeholder:"",labelWidth:"0px",maxLength:3,height:"36px",unit:"%",countShow:!1,width:"190px",alignment:"left"},void 0,!1,{fileName:dt,lineNumber:1059,columnNumber:15},this)]},void 0,!0,{fileName:dt,lineNumber:1045,columnNumber:13},this),Object(h.jsxDEV)(s.a,{id:"early_notifier",labelname:"\u9884\u8b66\u901a\u77e5\u4eba",children:[Object(h.jsxDEV)("div",{className:"bt_se",children:Object(h.jsxDEV)(X.a,{className:"bt_se_select",options:this.state.userSelectList,placeholder:"\u9009\u62e9\u4e00\u9879",size:"xl",value:this.state.warningInput,onChange:e=>{const t=this.state.model;e&&(t.early_notifier.push(e),t.early_notifier=te(t.early_notifier,"key")),this.setState({warningInput:e,model:t})}},void 0,!1,{fileName:dt,lineNumber:1082,columnNumber:17},this)},void 0,!1,{fileName:dt,lineNumber:1081,columnNumber:15},this),Object(h.jsxDEV)("div",{className:"userSelect",children:Object(h.jsxDEV)("ol",{children:Object(le.a)(this.state.model.early_notifier)?null===(e=this.state.model.early_notifier)||void 0===e?void 0:e.map((e=>Object(h.jsxDEV)(me.a,{closable:null===e||void 0===e?void 0:e.closable,onClose:()=>this.closeCallback(e),children:null===e||void 0===e?void 0:e.text},null===e||void 0===e?void 0:e.key,!1,{fileName:dt,lineNumber:1103,columnNumber:25},this))):null},void 0,!1,{fileName:dt,lineNumber:1100,columnNumber:17},this)},void 0,!1,{fileName:dt,lineNumber:1099,columnNumber:15},this)]},void 0,!0,{fileName:dt,lineNumber:1080,columnNumber:13},this)]},void 0,!0,{fileName:dt,lineNumber:1044,columnNumber:11},this)},void 0,!1,{fileName:dt,lineNumber:1043,columnNumber:9},this),Object(h.jsxDEV)(d.a,{style:{width:"70%",margin:"10px 0"},title:"\u6837\u5f0f\u8bbe\u7f6e",children:Object(h.jsxDEV)(l.a,{ref:"form3",children:Object(h.jsxDEV)(s.a,{id:"instruction",labelname:"\u4f7f\u7528\u8bf4\u660e",required:"",children:Object(h.jsxDEV)(st,{pageType:"detaileditor",setEdittext:e=>{this.onHandleChange(e,"instruction")},width:"520px",text:this.state.model.instruction,limitLength:5e3},this.state.model.channel,!1,{fileName:dt,lineNumber:1121,columnNumber:15},this)},void 0,!1,{fileName:dt,lineNumber:1120,columnNumber:13},this)},void 0,!1,{fileName:dt,lineNumber:1119,columnNumber:11},this)},void 0,!1,{fileName:dt,lineNumber:1118,columnNumber:9},this),this.switchComponents()]},void 0,!0,{fileName:dt,lineNumber:523,columnNumber:7},this)}}var bt=i(491),pt=i(522),Nt=(i(346),i(347)),jt=i.n(Nt),vt=i(211),gt=i(488),ft=(i(215),"/Users/zhangds/web/blue-brother/frontend/src/components/UseProductPop/index.jsx");const _t={product_id:[{type:"required",message:"\u8bf7\u9009\u62e9\u6620\u5c04\u5546\u54c1"}],quantity:[{type:"required",message:"\u8bf7\u8f93\u5165\u5546\u54c1\u5e93\u5b58"},{type:"regExp",message:"\u8bf7\u8f93\u5165\u5c0f\u4e8e100\u4e07\u7684\u6574\u6570",reg:"^(?!0)(?:[0-9]{1,6}|1000000)$"}],contract_price:[{type:"required",message:"\u8bf7\u8f93\u5165\u5408\u540c\u4ef7"},{type:"regExp",message:"\u6700\u591a\u4fdd\u75594\u4f4d\u5c0f\u6570",reg:"^[0-9]+(.[0-9]{1,4})?$"}],product_name:[{type:"required",message:"\u8bf7\u8f93\u5165\u5546\u54c1\u540d\u79f0"}],weight:[{type:"required",message:"\u8bf7\u8f93\u5165\u6743\u91cd"},{type:"regExp",message:"\u8bf7\u8f93\u51650~100\u6743\u91cd\u6570\u5b57",reg:"^([0-9]{0,2}|100)$"}],end_time:[{type:"required",message:"\u8bf7\u9009\u62e9\u5151\u6362\u7ed3\u675f\u65f6\u95f4"}],card_show:[{type:"required",message:"\u8bf7\u9009\u62e9\u5361\u5bc6\u53d1\u653e\u7c7b\u578b"}]};var xt=Object(r.forwardRef)(((e,t)=>{const{productData:i,checkedProduct:o,directResellerId:m,productType:d}=e,u=Object(r.useRef)(null),b=Object(r.useRef)(null);Object(r.useImperativeHandle)(t,(()=>({submit:O,getFormModel:y})));const[p,N]=Object(W.a)({productOption:[],productDataAll:[],productPic:[],isUpdatePic:!1,loading:!0}),[j,v]=Object(W.a)({cur_product:void 0,code_batch_id:"",product_type:Number(d),cost_price:"",weight:"0",quantity:"",contract_price:"",product_name:"",official_price:"",show_url:[],describe_url:[],detail_url:[],product_id:"",account_type:"",map_product_name:"",end_time:"",card_show:2});Object(r.useEffect)((()=>{_().then((e=>{if(i){let t=e.find((e=>e.key===Number(i.product_id)));t&&v({cur_product:t})}x()}))}),[]),Object(pt.a)((()=>{_()}),[j.product_type]),Object(r.useEffect)((()=>{N({productPic:j.describe_url})}),[p.isUpdatePic]);let[g,f]=Object(r.useState)(null);Object(r.useEffect)((()=>{let e=new jt.a(".swiper-container",{slidesPerView:1,centeredSlides:!0,loop:!0,autoplay:3e3,initialSlide:0,observer:!0,observeParents:!1,pagination:".swiper-pagination",paginationClickable:!0});f(e)}),[]);const _=()=>(N({loading:!0}),new Promise(((e,t)=>{if(m){const i=3===j.product_type;let s={reseller_id:m,type:i?1:j.product_type};Object(a.tb)(s).then((i=>{Object(a.Tb)(i,((t,i)=>{let a=t.data.map((e=>({key:e.id,text:e.title,disabled:-1!==o.indexOf(e.id)})));N({productOption:a,loading:!1,productDataAll:t.data}),e(a)}),(e=>{N({loading:!1}),t(!1)}))}))}else e(!1)}))),x=()=>new Promise(((e,t)=>{i?(v({goods_id:i.goods_id,cost_price:i.cost_price,weight:String(i.weight),quantity:i.quantity,contract_price:i.contract_price,product_name:i.product_name,official_price:i.official_price,product_id:i.product_id,account_type:i.account_type,map_product_name:i.map_product_name,product_type:i.is_e_card?3:j.product_type,card_show:Number(i.card_show),code_batch_id:i.code_batch_id,end_time:i.end_time,show_url:[{id:(new Date).getTime(),src:i.show_url,name:"\u5546\u54c1Logo"}],detail_url:i.detail_url?[{id:(new Date).getTime(),src:i.detail_url,name:"\u5546\u54c1\u8be6\u60c5"}]:[],describe_url:i.describe_url.map(((e,t)=>({id:`${(new Date).getTime()}-${t}`,src:e,name:`${t}`})))}),setTimeout((()=>{N({isUpdatePic:!p.isUpdatePic})}),300),e(!0)):e(!1)})),y=()=>{const t=3===j.product_type;return{product_id:j.product_id,product_type:t?1:j.product_type,is_e_card:Number(t),product_name:j.product_name,contract_price:j.contract_price,cost_price:j.cost_price,official_price:j.official_price,quantity:j.quantity,weight:j.weight,show_url:1!==e.isSettlement?j.show_url[0].src:"https://lsxd-customcard-h5.oss-cn-hangzhou.aliyuncs.com/vip.png",describe_url:j.describe_url.map((e=>e.src)),detail_url:j.detail_url[0]?j.detail_url[0].src:"",account_type:j.account_type,map_product_name:j.product_name,goods_id:j.goods_id,end_time:j.end_time,card_show:j.card_show}},O=async()=>{let t=!1;if(u.current.validator()){if(j.show_url.length<=0&&1!==e.isSettlement)return void c.a.error("\u8bf7\u4e0a\u4f20\u5546\u54c1Logo");if(j.describe_url.length<=0)return void c.a.error("\u8bf7\u4e0a\u4f20\u5546\u54c1\u56fe\u7247");t=!0}return t},D=e=>{v({cur_product:void 0,code_batch_id:"",cost_price:"",weight:"0",quantity:"",contract_price:"",product_name:"",product_type:1,product_id:"",official_price:"",show_url:[],describe_url:[],detail_url:[],account_type:"",map_product_name:"",end_time:"",card_show:2}),setTimeout((()=>{N({isUpdatePic:!p.isUpdatePic})}),300),v({product_type:e.target.value}),3==e.target.value&&v({show_url:[{id:(new Date).getTime(),src:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/commonproductlogo/goods-pic/jd_logo.png",name:"common-pic.png"}],describe_url:[{id:(new Date).getTime(),src:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/commonproductlogo/goods-pic/jd_card.png",name:"common-pic.png"}]})},E=(e,t)=>{"overMaxAmount"===e?c.a.error(`\u6700\u591a\u53ef\u4e0a\u4f20 ${t.maxAmount} \u5f20\u56fe\u7247`):"overMaxSize"===e&&c.a.error(`\u56fe\u7247\u5927\u5c0f\u4e0d\u80fd\u8d85\u8fc7 ${t.formattedMaxSize}`)},V=e=>new Promise(((t,i)=>{try{let s=new FormData;s.append("file",e),s.append("path","common_image"),Object(a.cd)(s).then((e=>{Object(a.Tb)(e,((e,i)=>{t(e.path)}),(e=>{c.a.error(e),i(e)}))}))}catch(s){i(s)}})),k=(e,t)=>{e.length>0?V(e[0].file).then((i=>{v(0===t?{show_url:[{src:i,id:`${(new Date).getTime()}-0`,name:e[0].file.name}]}:{detail_url:[{src:i,id:`${(new Date).getTime()}-0`,name:e[0].file.name}]})})):v(0===t?{show_url:[]}:{detail_url:[]})};return Object(h.jsxDEV)("div",{className:"addProduct",children:Object(h.jsxDEV)(vt.a,{loading:p.loading,iconSize:16,textSize:12,icon:"circle",iconText:"\u52a0\u8f7d\u4e2d",children:[Object(h.jsxDEV)(l.a,{model:j,rules:_t,ref:u,children:[Object(h.jsxDEV)(s.a,{labelname:"\u5546\u54c1\u7c7b\u578b",prop:"type",id:"type",children:Object(h.jsxDEV)(Q.a,{onChange:e=>{D(e)},value:j.product_type,disabled:!!j.code_batch_id,children:[Object(h.jsxDEV)(ne.a,{value:1,disabled:1===e.isSettlement&&e.settlementData&&(8===e.settlementData.key||9===e.settlementData.key),children:"\u76f4\u5145"},void 0,!1,{fileName:ft,lineNumber:533,columnNumber:15},void 0),Object(h.jsxDEV)(ne.a,{value:2,disabled:1===e.isSettlement&&e.settlementData&&7===e.settlementData.key,children:"\u5361\u5bc6"},void 0,!1,{fileName:ft,lineNumber:543,columnNumber:15},void 0),Object(h.jsxDEV)(ne.a,{value:3,disabled:1===e.isSettlement&&e.settlementData&&(8===e.settlementData.key||9===e.settlementData.key),children:"\u4eac\u4e1cE\u5361"},void 0,!1,{fileName:ft,lineNumber:551,columnNumber:15},void 0)]},void 0,!0,{fileName:ft,lineNumber:526,columnNumber:13},void 0)},void 0,!1,{fileName:ft,lineNumber:525,columnNumber:11},void 0),2===j.product_type?Object(h.jsxDEV)(s.a,{labelname:"\u53d1\u653e\u7c7b\u578b",prop:"card_show",id:"type",children:Object(h.jsxDEV)(Q.a,{onChange:e=>{v({card_show:e.target.value})},value:j.card_show,disabled:!!j.code_batch_id,children:[Object(h.jsxDEV)(ne.a,{value:2,children:"\u5e73\u53f0\u67e5\u770b"},void 0,!1,{fileName:ft,lineNumber:572,columnNumber:17},void 0),Object(h.jsxDEV)(ne.a,{value:1,children:"\u77ed\u4fe1\u4e0b\u53d1"},void 0,!1,{fileName:ft,lineNumber:573,columnNumber:17},void 0)]},void 0,!0,{fileName:ft,lineNumber:565,columnNumber:15},void 0)},void 0,!1,{fileName:ft,lineNumber:564,columnNumber:13},void 0):null,Object(h.jsxDEV)(s.a,{labelname:"\u6620\u5c04\u5546\u54c1",prop:"product_id",id:"product",children:Object(h.jsxDEV)(X.a,{clearable:!0,width:520,options:p.productOption,placeholder:"\u8bf7\u9009\u62e9\u5546\u54c1",value:j.cur_product,disabled:!!j.code_batch_id,onChange:e=>{(e=>{v({cur_product:e});let t=e?p.productDataAll.find((t=>t.id===e.key)):{},i=window.goods.find((e=>Number(e.id)===Number(t.product_category_id)));v({product_id:t.id||"",official_price:t.official_price||"",cost_price:t.cost_price||"",product_name:t.title||"",account_type:t.account_type||0,quantity:"",contract_price:""});const a=[{id:(new Date).getTime(),src:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/commonproductlogo/goods-pic/common-pic.png",name:"common-pic.png"}];if(i){let e=[];const s=i.products.find((e=>Number(e.id)===Number(t.id)));null===s||void 0===s||s.pic.map(((t,i)=>{e.push({id:(new Date).getTime(),src:t,name:s.title+i})})),v({show_url:[{id:(new Date).getTime(),src:i.pic,name:i.name}],describe_url:e.length?e:a,map_product_name:t.title})}else v({show_url:[],describe_url:a});setTimeout((()=>{N({isUpdatePic:!p.isUpdatePic})}),300)})(e)}},void 0,!1,{fileName:ft,lineNumber:579,columnNumber:13},void 0)},void 0,!1,{fileName:ft,lineNumber:578,columnNumber:11},void 0),2===j.product_type?Object(h.jsxDEV)(s.a,{id:"end_time",labelname:"\u5361\u5bc6\u6709\u6548\u671f\u81f3",prop:"end_time",children:Object(h.jsxDEV)(Pe.a,{className:"zent-datepicker-plan",showTime:{defaultTime:"23:59:59"},value:j.end_time,width:520,format:"YYYY-MM-DD HH:mm:ss",onChange:e=>{v({end_time:e})}},void 0,!1,{fileName:ft,lineNumber:593,columnNumber:15},void 0)},void 0,!1,{fileName:ft,lineNumber:592,columnNumber:13},void 0):null,Object(h.jsxDEV)(s.a,{labelname:"\u9884\u4f30\u6210\u672c\u4ef7",prop:"cost_price",id:"cost_price",children:Object(h.jsxDEV)(n.a,{onChange:e=>{},onClearItem:e=>{},value:j.cost_price,placeholder:"\u8bf7\u8f93\u5165",labelWidth:"0px",maxLength:3,height:"36px",countShow:!1,width:"520px",alignment:"left",disabled:!0},void 0,!1,{fileName:ft,lineNumber:610,columnNumber:13},void 0)},void 0,!1,{fileName:ft,lineNumber:609,columnNumber:11},void 0),Object(h.jsxDEV)(s.a,{labelname:"\u5546\u54c1\u6743\u91cd",prop:"weight",id:"weight",children:Object(h.jsxDEV)(n.a,{onChange:e=>{v({weight:e})},onClearItem:e=>{v({weight:0})},value:j.weight,placeholder:"\u8bf7\u8f93\u5165",labelWidth:"0px",maxLength:3,height:"36px",countShow:!1,width:"520px",alignment:"left"},void 0,!1,{fileName:ft,lineNumber:625,columnNumber:13},void 0)},void 0,!1,{fileName:ft,lineNumber:624,columnNumber:11},void 0),Object(h.jsxDEV)(s.a,{labelname:"\u5546\u54c1\u5e93\u5b58",prop:"quantity",id:"quantity",children:Object(h.jsxDEV)(n.a,{onChange:e=>{v({quantity:e})},onClearItem:e=>{v({quantity:""})},value:j.quantity,placeholder:"\u8bf7\u8f93\u5165",labelWidth:"0px",maxLength:7,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:ft,lineNumber:643,columnNumber:13},void 0)},void 0,!1,{fileName:ft,lineNumber:642,columnNumber:11},void 0),Object(h.jsxDEV)(s.a,{id:"contract_price",labelname:"\u5408\u540c\u4ef7",prop:"contract_price",children:Object(h.jsxDEV)(n.a,{onChange:e=>{v({contract_price:e})},onClearItem:e=>{v({contract_price:""})},value:j.contract_price,placeholder:"\u8bf7\u8f93\u5165",labelWidth:"0px",maxLength:16,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:ft,lineNumber:661,columnNumber:13},void 0)},void 0,!1,{fileName:ft,lineNumber:660,columnNumber:11},void 0),Object(h.jsxDEV)(s.a,{id:"product_name",labelname:"\u5546\u54c1\u540d\u79f0",prop:"product_name",children:Object(h.jsxDEV)(n.a,{onChange:e=>{v({product_name:e})},onClearItem:e=>{v({product_name:""})},value:j.product_name,placeholder:"\u8bf7\u8f93\u5165",labelWidth:"0px",maxLength:20,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:ft,lineNumber:678,columnNumber:13},void 0)},void 0,!1,{fileName:ft,lineNumber:677,columnNumber:11},void 0),Object(h.jsxDEV)(s.a,{id:"official_price",labelname:"\u5546\u54c1\u5b98\u65b9\u4ef7",prop:"official_price",children:Object(h.jsxDEV)(n.a,{onChange:e=>{},onClearItem:e=>{},value:j.official_price,placeholder:"\u8bf7\u8f93\u5165",labelWidth:"0px",maxLength:3,height:"36px",countShow:!1,width:"520px",alignment:"left",disabled:!0},void 0,!1,{fileName:ft,lineNumber:696,columnNumber:13},void 0)},void 0,!1,{fileName:ft,lineNumber:695,columnNumber:11},void 0),1!==e.isSettlement?Object(h.jsxDEV)(s.a,{id:"show_url",prop:"show_url",labelname:"\u5546\u54c1Logo",children:Object(h.jsxDEV)(gt.a,{className:"zent-image-upload-demo",maxSize:5242880,tips:"\u56fe\u7247\u4e0d\u8d85\u8fc7 5M",maxAmount:1,onError:E,onChange:e=>{k(e,0)},fileList:j.show_url},void 0,!1,{fileName:ft,lineNumber:713,columnNumber:15},void 0)},void 0,!1,{fileName:ft,lineNumber:712,columnNumber:13},void 0):null,Object(h.jsxDEV)(s.a,{prop:"describe_url",labelname:"\u5546\u54c1\u56fe",id:"describe_url",children:Object(h.jsxDEV)(gt.a,{className:"good-image-upload-demo",maxSize:5242880,tips:"\u56fe\u7247\u4e0d\u8d85\u8fc7 5M",maxAmount:9,onError:E,onChange:(e,t)=>{((e,t)=>{if(t)if("add"===t.type)V(t.item.file).then((e=>{let i=j.describe_url;i.push({id:t.item.id,name:t.item.name,src:e}),v({describe_url:i})}));else{let e=j.describe_url.filter((e=>e.id!==t.item.id));v({describe_url:e})}else v({describe_url:e});setTimeout((()=>{N({isUpdatePic:!p.isUpdatePic})}),300)})(e,t)},sortable:!0,fileList:j.describe_url,multiple:!0},void 0,!1,{fileName:ft,lineNumber:728,columnNumber:13},void 0)},void 0,!1,{fileName:ft,lineNumber:727,columnNumber:11},void 0),Object(h.jsxDEV)(s.a,{prop:"detail_url",labelname:"\u5546\u54c1\u8be6\u60c5",id:"detail_url",required:!1,children:Object(h.jsxDEV)(gt.a,{className:"zent-image-upload-demo",maxSize:5242880,tips:"\u56fe\u7247\u4e0d\u8d85\u8fc7 5M",maxAmount:1,onError:E,fileList:j.detail_url,onChange:e=>{k(e,1)}},void 0,!1,{fileName:ft,lineNumber:743,columnNumber:13},void 0)},void 0,!1,{fileName:ft,lineNumber:742,columnNumber:11},void 0)]},void 0,!0,{fileName:ft,lineNumber:524,columnNumber:9},void 0),Object(h.jsxDEV)("div",{className:"mobile",children:[Object(h.jsxDEV)("div",{className:"mobile_top",children:p.productPic?Object(h.jsxDEV)("div",{className:"swiper-container",children:[Object(h.jsxDEV)("div",{className:"swiper-wrapper",ref:b,children:p.productPic.map(((e,t)=>Object(h.jsxDEV)("div",{className:"swiper-slide",children:Object(h.jsxDEV)("img",{src:e.src,alt:""},void 0,!1,{fileName:ft,lineNumber:765,columnNumber:25},void 0)},t,!1,{fileName:ft,lineNumber:764,columnNumber:23},void 0)))},void 0,!1,{fileName:ft,lineNumber:761,columnNumber:17},void 0),Object(h.jsxDEV)("div",{className:"swiper-pagination"},void 0,!1,{fileName:ft,lineNumber:770,columnNumber:17},void 0)]},void 0,!0,{fileName:ft,lineNumber:760,columnNumber:15},void 0):null},void 0,!1,{fileName:ft,lineNumber:758,columnNumber:11},void 0),Object(h.jsxDEV)("div",{children:[Object(h.jsxDEV)("div",{className:"mobile_center"},void 0,!1,{fileName:ft,lineNumber:508,columnNumber:9},void 0),Object(h.jsxDEV)("div",{className:"mobile_bottom",children:j.detail_url.length>0?Object(h.jsxDEV)("img",{src:j.detail_url[0].src,alt:""},void 0,!1,{fileName:ft,lineNumber:510,columnNumber:42},void 0):null},void 0,!1,{fileName:ft,lineNumber:509,columnNumber:9},void 0)]},void 0,!0,{fileName:ft,lineNumber:507,columnNumber:7},void 0)]},void 0,!0,{fileName:ft,lineNumber:757,columnNumber:9},void 0)]},void 0,!0,{fileName:ft,lineNumber:517,columnNumber:7},void 0)},void 0,!1,{fileName:ft,lineNumber:516,columnNumber:5},void 0)})),yt="/Users/zhangds/web/blue-brother/frontend/src/components/UseGoodsScopePop/index.jsx";var Ot=Object(r.forwardRef)(((e,t)=>{const{product_title:i,drawerVisible:a,onClose:s,type:l,productData:n,submit:o,tableData:m,table_index:c,directResellerId:b,productType:p,checkedProduct:N,isCoupon:j}=e,v=Object(r.useRef)(null),g=Object(r.useRef)(null),f=Object(r.useRef)(null),_=async()=>{try{let e=!1;if(e="addProduct"===l?await v.current.submit():"addKnockGold"===l?await g.current.submit():await f.current.submit(),e){let e={};e="addProduct"===l?(()=>{let e=m,t=v.current.getFormModel();if(t.upstream="\u76f4\u8fde\u5929\u4e0b",t.type=1,t.stock=t.quantity,t.all_budget=F(Number(t.contract_price),Number(t.quantity)),t.effectDate="-","\u7f16\u8f91\u5546\u54c1"===i){if(-1!==c){let i=e[c].checked;e[c]=t,e[c].checked=i}}else e.push(t);return e})():"addKnockGold"===l?(()=>{let e=m,t=g.current.state.form_data,a=q(t);if("\u7f16\u8f91\u7acb\u51cf\u91d1"===i){if(-1!==c){let i=e[c].checked;e[c]=a,e[c].only=t,e[c].checked=i}}else e.push(a);return e})():(()=>{let e=m,t=f.current.state.form_data,a=M(t);if(a.only.copy=!1,"\u7f16\u8f91\u7ea2\u5305"===i){if(-1!==c){let i=e[c].checked;e[c]=a,e[c].only=t,e[c].checked=i}}else e.push(a);return e})(),o(e),s()}}catch(e){}};return Object(h.jsxDEV)(bt.a,{className:"draw",width:"86%",title:i,footer:Object(h.jsxDEV)("div",{style:{textAlign:"center"},children:[Object(h.jsxDEV)(u.a,{type:"primary",onClick:e=>{_()},children:"\u63d0\u4ea4"},void 0,!1,{fileName:yt,lineNumber:161,columnNumber:11},void 0),Object(h.jsxDEV)(u.a,{onClick:e=>s(),children:"\u53d6\u6d88"},void 0,!1,{fileName:yt,lineNumber:169,columnNumber:11},void 0)]},void 0,!0,{fileName:yt,lineNumber:160,columnNumber:9},void 0),visible:a,onClose:e=>s(),maskClosable:!1,children:Object(h.jsxDEV)("div",{className:"draw2",children:Object(h.jsxDEV)(d.a,{className:"borderNone",style:{width:"95%",margin:"10px auto"},children:function(){switch(l){case"addKnockGold":return Object(h.jsxDEV)(qe,{className:"addKnockGold",data:n,ref:g,ysf:j&&!0},void 0,!1,{fileName:yt,lineNumber:128,columnNumber:11},this);case"addProduct":return Object(h.jsxDEV)(xt,{ref:v,checkedProduct:N,productData:n,directResellerId:b,productType:p,isSettlement:e.isSettlement,settlementData:e.settlementData},void 0,!1,{fileName:yt,lineNumber:137,columnNumber:11},this);case"redPackets":return Object(h.jsxDEV)(ht,{ref:f,data:n},void 0,!1,{fileName:yt,lineNumber:148,columnNumber:16},this)}}()},void 0,!1,{fileName:yt,lineNumber:177,columnNumber:9},void 0)},void 0,!1,{fileName:yt,lineNumber:176,columnNumber:7},void 0)},void 0,!1,{fileName:yt,lineNumber:155,columnNumber:5},void 0)})),Dt=(i(217),"/Users/zhangds/web/blue-brother/frontend/src/components/UseCouponAddEdit/index.jsx");const Et=e=>Array.from({length:e},((e,t)=>t)),Vt=[{title:"\u5546\u54c1\u7f16\u53f7",name:"product_id",prop:"product_id",type:"slot",width:"auto"},{title:"\u5546\u54c1\u540d\u79f0",name:"product_name",prop:"product_name",type:"normal",width:"auto"},{title:"\u5b98\u65b9\u4ef7",name:"official_price",prop:"official_price",type:"normal",width:"auto"},{title:"\u5408\u540c\u5355\u4ef7",name:"contract_price",prop:"contract_price",type:"normal",width:"auto"},{title:"\u5e93\u5b58\u6570\u91cf",name:"stock",prop:"stock",type:"normal",width:"auto"},{title:"\u6279\u6b21\u53f7",name:"channel_activity_id",prop:"channel_activity_id",type:"normal",width:"auto"},{title:"\u603b\u9884\u7b97",name:"all_budget",prop:"all_budget",type:"normal",width:"auto"},{title:"\u6709\u6548\u65f6\u95f4\u6bb5",width:"300px",name:"effectDate",prop:"effectDate",type:"normal"},{title:"\u521b\u5efa\u65f6\u95f4",width:"350px",name:"create_time",prop:"create_time",type:"normal"},{title:"\u7c7b\u578b",name:"type",prop:"type",type:"slot",width:"auto"},{title:"\u4e0a\u6e38\u5e73\u53f0",name:"upstream",prop:"upstream",type:"normal",width:"auto"},{title:"",name:"",prop:"",type:"",width:""},{title:"\u64cd\u4f5c",name:"opearo",prop:"opearo",type:"slot",width:"auto"}],kt={plan_id:[{type:"required",message:"\u8bf7\u9009\u62e9\u5f52\u5c5e\u8ba1\u5212"}],key_batch_id:[{type:"required",message:"\u8bf7\u9009\u62e9\u5f52\u5c5ekey"}],title:[{type:"required",message:"\u8bf7\u8f93\u5165\u6279\u6b21\u540d\u79f0"}],date_time:[{type:"required",message:"\u8bf7\u9009\u62e9\u65f6\u95f4"}]},St={full:[{type:"required",message:"\u8bf7\u8f93\u5165\u9762\u989d"},{type:"regExp",message:"\u8bf7\u8f93\u5165\u4e24\u4f4d\u5c0f\u6570",reg:"^[0-9][0-9]*([.][0-9]{1,2})?$"}],reduce:[{type:"required",message:"\u8bf7\u8f93\u5165\u51cf"},{type:"regExp",message:"\u8bf7\u8f93\u5165\u4e24\u4f4d\u5c0f\u6570",reg:"^[0-9][0-9]*([.][0-9]{1,2})?$"}],quantity:[{type:"required",message:"\u8bf7\u8f93\u5165\u53d1\u653e\u603b\u91cf"},{type:"regExp",message:"\u8bf7\u8f93\u5165\u6b63\u6574\u6570",reg:"^[1-9][0-9]*$"}],restrict:[{type:"required",message:"\u8bf7\u8f93\u5165\u7ed1\u5b9a\u6570"},{type:"regExp",message:"\u8bf7\u8f93\u5165\u6b63\u6574\u6570",reg:"^[1-9][0-9]*$"}]};var wt=Object(r.forwardRef)(((e,t)=>{const{couponType:i=0,direct_reseller_id:o,editData:m}=e,[b,p]=Object(W.a)({setup1_title:"\u57fa\u672c\u4fe1\u606f",setup2_title:"\u53d1\u653e\u89c4\u5219",setup3_title:"\u5546\u54c1\u8303\u56f4",tableData:[],tableHeight:500,page:1,dataCount:0,rankOptions:[],rank:[],newGoodsBtnLoading:!1,newGoldLoading:!1,lodgingTable:!0,isQuantity:!0,plan_OPTIONS:[],key_OPTIONS:[],product_title:"",showScopePop:!1,scopePopType:"",productData:{},direct_reseller_id:o||0,table_index:-1,examinePopShow:!1,payType:3,payment_direction:["\u5bf9\u79c1\u8d26\u6237","\u5bf9\u516c\u8d26\u6237","\u9884\u4ed8\u6b3e\u6263\u9664"],coupon_batch_id:"",oldProduct:{},id:"",status:-1,statusDisabled:!1,productType:1,checkedProduct:[],KeyPcType:sessionStorage.getItem("KeyPcType"),isLoadingBtn:!1}),[N,j]=Object(W.a)({plan_id:"",key_batch_id:"",title:"",date_time:""}),v=Object(r.useRef)(null),[_,x]=Object(W.a)({full:"",reduce:"",quantity:"",budget:"",restrict:""}),y=Object(r.useRef)(null),O=Object(r.useRef)(null);Object(r.useEffect)((()=>{!async function(){sessionStorage.getItem("KeyPcType");if(0===i)m&&""!==m?await V().then((e=>{let t=e.find((e=>e.text===m.plan_title));t&&void 0!==t&&"undefined"!==t&&(j({plan_id:t}),sessionStorage.setItem("knockGold_effectDate",JSON.stringify({begin_time:t.key.dateTime[0],end_time:t.key.dateTime[1]})),T(t.key.reseller_id),j({key_batch_id:{key:m.key_batch_id,text:m.key_batch_name}}),D(),"2"===b.KeyPcType&&j({title:`${m.title}_${m.copy_count+1}`.substring(0,12)}),"1"===b.KeyPcType&&p({oldProduct:m.product}),E(m.status))})):await V();else if(m&&""!==m)p({id:m.id,status:m.status}),D(),E(m.status);else{let e=sessionStorage.getItem("knockGold_effectDate");if(e){let t=JSON.parse(e);j({date_time:[t.begin_time,t.end_time]})}}}()}),[]);const D=()=>{try{j({title:m.title,date_time:[m.begin_time,m.end_time]}),x({full:m.full,reduce:m.reduce,quantity:m.quantity,budget:F(Number(m.reduce),Number(m.quantity)),restrict:m.restrict});let e=m.product.legal.map((e=>("2"===b.KeyPcType&&delete e.id,{...e,type:1,upstream:"\u76f4\u8fde\u5929\u4e0b",all_budget:F(Number(e.contract_price),Number(e.quantity)),effectDate:"-"}))),t=m.product.reduce.map((e=>("2"===b.KeyPcType&&(delete e.id,delete e.goods_id),q(e)))),i=e.concat(t);i=Object(f.a)(i,(e=>(2===e.type?e.only.is_delete?e.checked=!1:e.checked=!0:e.is_delete?e.checked=!1:e.checked=!0,e)));let a=Object(f.a)(i,(e=>{let t={};return t.key=e.product_id,t.text=e.product_name,t}));p({rankOptions:a,rank:a,tableData:i})}catch(e){}},E=e=>{"2"!==b.KeyPcType&&[1,2,3].includes(e)&&p({statusDisabled:!0})},V=()=>new Promise(((e,t)=>{try{Object(a.Oc)({bind_object:"2"}).then((t=>{Object(a.Tb)(t,((t,i)=>{let a=t.map((e=>({key:{key:e.id,reseller_id:e.reseller_id,dateTime:[e.begin_time,e.end_time]},text:e.title})));p({plan_OPTIONS:a}),e(a)}))}))}catch(i){t(i)}}));Object(r.useEffect)((()=>{A()}),[_.reduce,_.full]),Object(r.useEffect)((()=>{z()}),[_.reduce,_.quantity]);const k=Object(r.useRef)(null);Object(r.useImperativeHandle)(t,(()=>({submit:S,getModel:w,clearCouponForm:C})));const S=()=>{let e=!1;if(!v.current.validator())return e=!1,e;if(e=!0,!y.current.validator())return e=!1,e;if(e=!0,e){if(!(b.rank.length>0))return c.a.error("\u8bf7\u9009\u62e9\u5546\u54c1\u8303\u56f4"),!1;{let e=b.tableData.filter((e=>e.checked)),t=0;if(e.map((e=>{t+=parseInt(e.quantity)})),t{let e={id:b.id,status:b.status,title:N.title,begin_time:N.date_time[0],end_time:N.date_time[1],quantity:_.quantity,budget:_.budget,full:_.full,reduce:_.reduce,restrict:_.restrict,product:{legal:[],reduce:[]}},t=b.tableData.filter((e=>e.checked));e.product.legal=t.filter((e=>1===e.type));let i=t.filter((e=>2===e.type));return e.product.reduce=i.map((e=>({...e.only}))),e},C=()=>{p({id:"",status:""}),x({full:"",reduce:"",quantity:"",budget:"",restrict:""}),j({plan_id:"",key_batch_id:"",title:""}),p({rank:[],rankOptions:[],tableData:[]})},T=e=>{Object(a.vb)(e).then((e=>{Object(a.Tb)(e,((e,t)=>{p({direct_reseller_id:e.direct_reseller_id})}),(e=>{c.a.error(e)}))}))},L=async e=>{var t;sessionStorage.setItem("knockGold_effectDate",JSON.stringify({begin_time:e.key.dateTime[0],end_time:e.key.dateTime[1]})),j({plan_id:e,key_batch_id:"",date_time:e.key.dateTime}),T(e.key.reseller_id),await(t=e.key.key,new Promise(((e,i)=>{try{Object(a.Nc)({status:"4,5",plan_id:t,bind_object:2}).then((t=>{Object(a.Tb)(t,((t,i)=>{let a=t.map((e=>({key:e.id,text:e.batch_name})));p({key_OPTIONS:a}),e(a)}))}))}catch(s){i(s)}})))},H=()=>{b.tableData.length<=0&&(sessionStorage.setItem("productData",""),sessionStorage.setItem("knockGoldData",""));let e=b.tableData.filter((e=>1===e.type));e.length<=0?sessionStorage.setItem("productData",""):sessionStorage.setItem("productData",JSON.stringify(e));let t=b.tableData.filter((e=>2===e.type));t.length<=0?sessionStorage.setItem("knockGoldData",""):sessionStorage.setItem("knockGoldData",JSON.stringify(t))},M=()=>b.tableData.map((e=>Number(e.product_id))),P=e=>{try{const t=b.direct_reseller_id;if(!N.plan_id&&0===i)return void c.a.error("\u8bf7\u9009\u62e9\u5f52\u5c5e\u8ba1\u5212");if(t<=0)return void c.a.error("\u8bf7\u6dfb\u52a0\u6620\u5c04\u5206\u9500\u5546");H(),"addProduct"===e?p({product_title:"\u65b0\u5efa\u5546\u54c1",scopePopType:"addProduct",checkedProduct:M(),productData:null,table_index:-1,productType:1,showScopePop:!0}):(sessionStorage.setItem("knockGold_effectDate",JSON.stringify({begin_time:N.date_time[0],end_time:N.date_time[1]})),p({product_title:"\u65b0\u589e\u7acb\u51cf\u91d1",scopePopType:"addKnockGold",productData:null,showScopePop:!0}))}catch(t){}},B=(e,t)=>Object(h.jsxDEV)($.a,{height:272,itemCount:e.length,itemSize:32,width:240,children:({index:i,style:a})=>Object(h.jsxDEV)("div",{style:a,children:t(e[i],i)},void 0,!1,{fileName:Dt,lineNumber:954,columnNumber:32},void 0)},void 0,!1,{fileName:Dt,lineNumber:953,columnNumber:7},void 0),A=()=>{U(_.reduce)&&U(_.full)?p({isQuantity:!1}):p({isQuantity:!0})},z=()=>{if(U(_.reduce)&&U(_.quantity)){let e=F(Number(_.reduce),Number(_.quantity));x({budget:e})}else x({budget:""})};return Object(h.jsxDEV)("div",{className:"coupon-box",children:[Object(h.jsxDEV)(d.a,{style:{margin:"10px auto"},title:b.setup1_title,children:Object(h.jsxDEV)(l.a,{model:N,rules:kt,ref:v,children:[0===i?Object(h.jsxDEV)(s.a,{labelname:"\u5f52\u5c5e\u8ba1\u5212",prop:"plan_id",children:Object(h.jsxDEV)(X.a,{clearable:!0,placeholder:"\u9009\u62e9\u4e00\u9879",renderOptionList:B,options:b.plan_OPTIONS,value:N.plan_id,disabled:"2"===b.KeyPcType||"1"===b.KeyPcType,onChange:e=>{L(e)}},void 0,!1,{fileName:Dt,lineNumber:1115,columnNumber:15},void 0)},void 0,!1,{fileName:Dt,lineNumber:1114,columnNumber:13},void 0):null,0===i?Object(h.jsxDEV)(s.a,{labelname:"\u5f52\u5c5ekey",prop:"key_batch_id",children:Object(h.jsxDEV)(X.a,{clearable:!0,placeholder:"\u9009\u62e9\u4e00\u9879",renderOptionList:B,options:b.key_OPTIONS,value:N.key_batch_id,disabled:"2"===b.KeyPcType||"1"===b.KeyPcType,onChange:e=>{j({key_batch_id:e})}},void 0,!1,{fileName:Dt,lineNumber:1131,columnNumber:15},void 0)},void 0,!1,{fileName:Dt,lineNumber:1130,columnNumber:13},void 0):null,Object(h.jsxDEV)(s.a,{labelname:"\u6279\u6b21\u540d\u79f0",prop:"title",children:Object(h.jsxDEV)(n.a,{onChange:e=>{j({title:e})},onClearItem:()=>{j({title:""})},value:N.title,placeholder:"\u8bf7\u8f93\u5165",labelWidth:"0px",maxLength:20,height:"36px",countShow:!0,width:"520px",alignment:"left"},void 0,!1,{fileName:Dt,lineNumber:1146,columnNumber:13},void 0)},void 0,!1,{fileName:Dt,lineNumber:1145,columnNumber:11},void 0),Object(h.jsxDEV)(s.a,{labelname:"\u751f\u6548\u65f6\u95f4\u6bb5",prop:"date_time",children:Object(h.jsxDEV)(ee.a,{className:"zent-datepicker-plan",showTime:{format:"HH:mm:ss",defaultTime:["00:00:00","23:59:59"]},format:"YYYY-MM-DD HH:mm:ss",disabled:["2"!==b.KeyPcType&&(1===m.status||2===m.status||3===m.status||void 0),!1],value:N.date_time,onChange:e=>{(e=>{j({date_time:e}),sessionStorage.setItem("knockGold_effectDate",JSON.stringify({begin_time:e[0],end_time:e[1]}))})(e)},disabledTime:e=>{let t=JSON.parse(sessionStorage.getItem("knockGold_effectDate"));const i=new Date(t.begin_time),a=i.getHours(),s=i.getMinutes(),l=i.getSeconds();return Object(R.a)(e,i)?{disabledHours:()=>Et(a),disabledMinutes:e=>e===a?Et(s):[],disabledSeconds:(e,t)=>e===a&&t===s?Et(l):[]}:{}},disabledDate:(e,t)=>{let i=JSON.parse(sessionStorage.getItem("knockGold_effectDate")),a=!1,s=Y()(e).format("YYYY-MM-DD HH:mm:ss");const l=Y()(i.end_time).format("HH:mm:ss");return"start"==t&&(a=l<"23:59:59"?Y()(s).isBefore(i.begin_time)||Y()(s).subtract(1,"days").isAfter(i.end_time):Y()(s).isBefore(i.begin_time)||Y()(s).isAfter(i.end_time)),"end"==t&&(a=Y()(s).add(1,"days").isBefore(i.begin_time)||Y()(s).isAfter(i.end_time)),a}},void 0,!1,{fileName:Dt,lineNumber:1165,columnNumber:13},void 0)},void 0,!1,{fileName:Dt,lineNumber:1164,columnNumber:11},void 0)]},void 0,!0,{fileName:Dt,lineNumber:1112,columnNumber:9},void 0)},void 0,!1,{fileName:Dt,lineNumber:1111,columnNumber:7},void 0),Object(h.jsxDEV)(d.a,{style:{margin:"10px auto"},title:b.setup2_title,children:Object(h.jsxDEV)(l.a,{model:_,rules:St,ref:y,children:[Object(h.jsxDEV)(s.a,{labelname:"\u9762\u989d",prop:"full",myClassName:"sel1 coupon-form-box",children:Object(h.jsxDEV)(n.a,{onChange:e=>{x({full:e})},onClearItem:()=>{x({full:""})},value:_.full,placeholder:"\u8bf7\u8f93\u5165",labelWidth:"0px",maxLength:20,height:"36px",countShow:!1,width:"234px",alignment:"left",front:"\u6ee1",disabled:b.statusDisabled},void 0,!1,{fileName:Dt,lineNumber:1187,columnNumber:13},void 0)},void 0,!1,{fileName:Dt,lineNumber:1186,columnNumber:11},void 0),Object(h.jsxDEV)(s.a,{labelname:"",labelwidth:"0px",prop:"reduce",myClassName:"sel2",required:!1,children:Object(h.jsxDEV)(n.a,{onChange:e=>{x({reduce:e})},onClearItem:()=>{x({reduce:""})},value:_.reduce,placeholder:"\u8bf7\u8f93\u5165",labelWidth:"0px",maxLength:20,height:"36px",countShow:!1,width:"234px",alignment:"left",front:"\u51cf",unit:"\u5143",disabled:b.statusDisabled},void 0,!1,{fileName:Dt,lineNumber:1208,columnNumber:13},void 0)},void 0,!1,{fileName:Dt,lineNumber:1207,columnNumber:11},void 0),Object(h.jsxDEV)(s.a,{labelname:"\u53d1\u653e\u603b\u91cf",prop:"quantity",children:Object(h.jsxDEV)(n.a,{onChange:e=>{x({quantity:e})},onClearItem:()=>{x({quantity:""})},disabled:b.isQuantity||b.statusDisabled,value:_.quantity,placeholder:"\u8bf7\u8f93\u5165",labelWidth:"0px",maxLength:20,height:"36px",countShow:!1,width:"520px",alignment:"left",unit:"\u4e2a"},void 0,!1,{fileName:Dt,lineNumber:1230,columnNumber:13},void 0)},void 0,!1,{fileName:Dt,lineNumber:1229,columnNumber:11},void 0),Object(h.jsxDEV)(s.a,{labelname:"\u603b\u9884\u7b97",prop:"budget",children:Object(h.jsxDEV)(n.a,{disabled:!0,value:_.budget,placeholder:"\u8bf7\u8f93\u5165",labelWidth:"0px",maxLength:20,height:"36px",countShow:!1,width:"520px",alignment:"left",unit:"\u5143"},void 0,!1,{fileName:Dt,lineNumber:1252,columnNumber:13},void 0)},void 0,!1,{fileName:Dt,lineNumber:1251,columnNumber:11},void 0),Object(h.jsxDEV)(s.a,{labelname:"\u7ed1\u5b9a\u6570",prop:"restrict",children:Object(h.jsxDEV)(n.a,{onChange:e=>{x({restrict:e})},onClearItem:()=>{x({restrict:""})},value:_.restrict,placeholder:"\u8bf7\u8f93\u5165",labelWidth:"0px",maxLength:20,height:"36px",countShow:!1,width:"520px",alignment:"left",disabled:b.statusDisabled},void 0,!1,{fileName:Dt,lineNumber:1266,columnNumber:13},void 0)},void 0,!1,{fileName:Dt,lineNumber:1265,columnNumber:11},void 0)]},void 0,!0,{fileName:Dt,lineNumber:1185,columnNumber:9},void 0)},void 0,!1,{fileName:Dt,lineNumber:1184,columnNumber:7},void 0),Object(h.jsxDEV)(d.a,{style:{margin:"10px auto"},title:b.setup3_title,children:[Object(h.jsxDEV)(s.a,{labelname:"\u5546\u54c1\u8303\u56f4",prop:"rank",id:"rank",children:Object(h.jsxDEV)("div",{className:"goods-boxs",children:[Object(h.jsxDEV)(X.a,{options:b.rankOptions,multiple:!0,value:b.rank,placeholder:"\u9009\u62e9\u4e00\u9879",width:405,onChange:e=>{(e=>{let t=b.tableData.map((t=>(t.checked=e.findIndex((e=>e.key==t.product_id))>-1,t)));p({tableData:t,rank:e})})(e)}},void 0,!1,{fileName:Dt,lineNumber:1292,columnNumber:13},void 0),Object(h.jsxDEV)(u.a,{type:"primary",style:{marginLeft:"20px"},onClick:()=>{P("addProduct")},children:"\u65b0\u5efa\u5546\u54c1"},void 0,!1,{fileName:Dt,lineNumber:1302,columnNumber:13},void 0),Object(h.jsxDEV)(u.a,{type:"primary",style:{marginLeft:"20px"},onClick:()=>{P("addKnockGold")},disabled:!JSON.parse(sessionStorage.getItem("isEarlyWarningMan")),children:"\u65b0\u5efa\u7acb\u51cf\u91d1"},void 0,!1,{fileName:Dt,lineNumber:1311,columnNumber:13},void 0)]},void 0,!0,{fileName:Dt,lineNumber:1291,columnNumber:11},void 0)},void 0,!1,{fileName:Dt,lineNumber:1290,columnNumber:9},void 0),Object(h.jsxDEV)(s.a,{labelname:"",prop:"range",id:"range",children:Object(h.jsxDEV)(I,{headBackgroud:"#f9fafc",maxheight:200,isBorder:!0,spliteColor:"#fff",tableData:b.tableData,Column:Vt,countbarVisible:!1,isSwitch:!1,isShowPageBar:!1,page:b.page,ref:k,dataCount:b.dataCount,pageChange:e=>{},emptyText:"\u62b1\u6b49\uff0c\u6682\u65e0\u76f8\u5173\u6570\u636e\u8bb0\u5f55",countChange:e=>{},checkChange:e=>(e=>{let t=[];Object(f.a)(e,(e=>{let i={};return i.key=e.product_id,i.text=e.product_name,t.push(i),i})),p({rank:t})})(e),ComponentHandler:(e,t,i)=>"opearo"===e?Object(h.jsxDEV)("div",{children:Object(h.jsxDEV)("span",{className:"grid-link",onClick:()=>((e,t)=>{try{if(b.direct_reseller_id<=0)return void c.a.error("\u8bf7\u6dfb\u52a0\u6620\u5c04\u5206\u9500\u5546");if(H(),1===e.type){p({product_title:"\u7f16\u8f91\u5546\u54c1",scopePopType:"addProduct",table_index:t,checkedProduct:M(),productType:e.product_type});let i=sessionStorage.getItem("plan_status");"2"!==b.KeyPcType&&"0"!==i||delete e.code_batch_id,p({productData:e,showScopePop:!0})}else{let i=e.only;"2"===b.KeyPcType&&delete i.id,p({product_title:"\u7f16\u8f91\u7acb\u51cf\u91d1",productData:i,scopePopType:"addKnockGold",showScopePop:!0,table_index:t})}}catch(i){}})(t,i),children:"\u7f16\u8f91"},void 0,!1,{fileName:Dt,lineNumber:1346,columnNumber:21},void 0)},void 0,!1,{fileName:Dt,lineNumber:1345,columnNumber:19},void 0):"product_id"===e?Object(h.jsxDEV)("span",{children:"2"===b.KeyPcType&&2===t.type?"-":t.product_id},void 0,!1,{fileName:Dt,lineNumber:1355,columnNumber:19},void 0):"type"===e?Object(h.jsxDEV)("span",{children:1===t.type?"\u5546\u54c1":"\u7acb\u51cf\u91d1"},void 0,!1,{fileName:Dt,lineNumber:1362,columnNumber:24},void 0):void 0},void 0,!1,{fileName:Dt,lineNumber:1325,columnNumber:11},void 0)},void 0,!1,{fileName:Dt,lineNumber:1324,columnNumber:9},void 0)]},void 0,!0,{fileName:Dt,lineNumber:1289,columnNumber:7},void 0),0===i?Object(h.jsxDEV)("div",{className:"step-btn-group",children:[Object(h.jsxDEV)(u.a,{type:"primary",onClick:()=>S(),children:"\u63d0\u4ea4\u5ba1\u6838"},void 0,!1,{fileName:Dt,lineNumber:1371,columnNumber:11},void 0),Object(h.jsxDEV)(u.a,{type:"normal",onClick:()=>{G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:" \u662f\u5426\u8fd4\u56de?"},void 0,!1,{fileName:Dt,lineNumber:764,columnNumber:16},void 0),onConfirm:()=>{window.history.back()},onCancel(){},className:"questModal",parentComponent:void 0})},children:"\u53d6\u6d88"},void 0,!1,{fileName:Dt,lineNumber:1374,columnNumber:11},void 0)]},void 0,!0,{fileName:Dt,lineNumber:1370,columnNumber:9},void 0):null,b.examinePopShow?Object(h.jsxDEV)("div",{className:"audit",children:[Object(h.jsxDEV)("div",{className:"modal",children:" "},void 0,!1,{fileName:Dt,lineNumber:1059,columnNumber:9},void 0),Object(h.jsxDEV)("div",{className:"audit-box",style:{zIndex:99},children:[Object(h.jsxDEV)(g.a,{type:"close",className:"audit-close",onClick:e=>{p({examinePopShow:!1})}},void 0,!1,{fileName:Dt,lineNumber:1061,columnNumber:11},void 0),Object(h.jsxDEV)("div",{className:"audit-box-title",children:"\u63d0\u4ea4\u5ba1\u6838"},void 0,!1,{fileName:Dt,lineNumber:1070,columnNumber:11},void 0),Object(h.jsxDEV)("div",{className:"payType",children:Object(h.jsxDEV)(Q.a,{onChange:e=>{p({payType:e.target.value})},value:b.payType,className:"audit-obj",children:[Object(h.jsxDEV)(Z.a,{value:3,children:"\u9884\u4ed8\u6b3e\u6263\u9664"},void 0,!1,{fileName:Dt,lineNumber:1079,columnNumber:15},void 0),Object(h.jsxDEV)(Z.a,{value:1,children:"\u5bf9\u79c1\u8d26\u6237"},void 0,!1,{fileName:Dt,lineNumber:1080,columnNumber:15},void 0),Object(h.jsxDEV)(Z.a,{value:2,children:"\u5bf9\u516c\u8d26\u6237"},void 0,!1,{fileName:Dt,lineNumber:1081,columnNumber:15},void 0)]},void 0,!0,{fileName:Dt,lineNumber:1072,columnNumber:13},void 0)},void 0,!1,{fileName:Dt,lineNumber:1071,columnNumber:11},void 0),Object(h.jsxDEV)("div",{className:"audit-btn-group",children:[Object(h.jsxDEV)(u.a,{onClick:e=>{p({examinePopShow:!1})},children:"\u53d6\u6d88"},void 0,!1,{fileName:Dt,lineNumber:1085,columnNumber:13},void 0),Object(h.jsxDEV)(u.a,{type:"primary",loading:b.isLoadingBtn,onClick:e=>{(()=>{if(p({isLoadingBtn:!0}),"1"===b.KeyPcType){let e={payment_direction:b.payment_direction[b.payType-1],title:N.title,begin_time:N.date_time[0],end_time:N.date_time[1],new_product:{},update_product:{},delete_product:[]},t=b.tableData.filter((e=>e.checked&&1===e.type)),i=b.tableData.filter((e=>e.checked&&2===e.type));e.new_product.legal=t.filter((e=>e.checked&&!e.goods_id)),e.update_product.legal=t.filter((e=>e.checked&&e.goods_id)),e.new_product.reduce=i.filter((e=>e.checked&&!e.only.goods_id)).map((e=>e.only)),e.update_product.reduce=i.filter((e=>e.checked&&e.only.goods_id)).map((e=>e.only)),e.delete_product=b.tableData.filter((e=>!e.checked&&(e.goods_id||e.only))).map((e=>e.only?e.only.goods_id:e.goods_id)),Object(a.H)(m.id,e).then((e=>{Object(a.Tb)(e,((t,i)=>{c.a.success(e.message),setTimeout((()=>{p({isLoadingBtn:!1}),window.history.back()}),500)}),(e=>{p({isLoadingBtn:!1}),c.a.error(e)}))}))}else{let e={plan_id:N.plan_id.key.key,key_batch_id:N.key_batch_id.key,title:N.title,begin_time:N.date_time[0],end_time:N.date_time[1],full:_.full,reduce:_.reduce,quantity:_.quantity,budget:_.budget,restrict:_.restrict,payment_direction:"",product:{legal:[],reduce:[]}};e.payment_direction=b.payment_direction[b.payType-1];let t=b.tableData.filter((e=>e.checked));e.product.legal=t.filter((e=>1===e.type));let i=t.filter((e=>2===e.type));if(e.product.reduce=i.map((e=>({...e.only}))),"2"===b.KeyPcType&&(e.copy_code_batch_id=m.id,e.product.legal=e.product.legal.map((e=>(delete e.code_batch_id,delete e.goods_id,e))),e.product.reduce=e.product.reduce.map((e=>(delete e.goods_id,e)))),!1===(e.product.legal,!0))return void p({isLoadingBtn:!1});Object(a.a)(e).then((e=>{Object(a.Tb)(e,((t,i)=>{c.a.success(e.message),setTimeout((()=>{p({isLoadingBtn:!1}),window.history.back()}),500)}),(e=>{p({isLoadingBtn:!1}),c.a.error(e)}))}))}})()},children:"\u786e\u5b9a"},void 0,!1,{fileName:Dt,lineNumber:1094,columnNumber:13},void 0)]},void 0,!0,{fileName:Dt,lineNumber:1084,columnNumber:11},void 0)]},void 0,!0,{fileName:Dt,lineNumber:1060,columnNumber:9},void 0)]},void 0,!0,{fileName:Dt,lineNumber:1058,columnNumber:7},void 0):null,Object(h.jsxDEV)(Ot,{ref:O,product_title:b.product_title,drawerVisible:b.showScopePop,type:b.scopePopType,productData:b.productData,onClose:()=>{p({showScopePop:!1})},tableData:b.tableData,checkedProduct:b.checkedProduct,table_index:b.table_index,directResellerId:b.direct_reseller_id,productType:b.productType,isCoupon:!0,submit:e=>(e=>{try{let t=e,i=[];t.map((e=>{let t={};t.key=e.product_id,t.text=e.product_name,i.push(t)}));let a=[];t.map((e=>{let t={};e.checked&&(t.key=e.product_id,t.text=e.product_name,a.push(t))})),p({tableData:t,rankOptions:i,rank:a})}catch(t){}})(e)},void 0,!1,{fileName:Dt,lineNumber:1382,columnNumber:7},void 0)]},void 0,!0,{fileName:Dt,lineNumber:1110,columnNumber:5},void 0)})),Ct="/Users/zhangds/web/blue-brother/frontend/src/pages/coupon/addEdit/index.jsx";var Tt=()=>{const e=Object(r.useRef)(null),[t,i]=Object(W.a)({isShow:!1,editModel:"",direct_reseller_id:0,comType:0});return Object(r.useEffect)((()=>{const e=sessionStorage.getItem("code_id");e&&"undefined"!==e&&void 0!==e?Object(a.W)(e).then((e=>{Object(a.Tb)(e,((e,t)=>{i({editModel:e,isShow:!0})}))})):i({isShow:!0})}),[]),Object(h.jsxDEV)("div",{className:"coupon-add-edit",children:t.isShow?Object(h.jsxDEV)(wt,{couponType:0,editData:t.editModel,isAuditButton:!1,ref:e,direct_reseller_id:t.direct_reseller_id},void 0,!1,{fileName:Ct,lineNumber:32,columnNumber:9},void 0):null},void 0,!1,{fileName:Ct,lineNumber:30,columnNumber:5},void 0)},It=(i(218),"/Users/zhangds/web/blue-brother/frontend/src/components/tabPage/main.js");class Ft extends m.a.Component{constructor(e){super(e),this.state={activeIndex:0,tabList:e.tabs,width:e.width?e.width:220}}componentDidMount(){if(this.props.first){this.setState({activeIndex:0});let e=[];for(let t=0;t1&&this.props.tabChange(e)}render(){const{tabs:e}=this.props;return Object(h.jsxDEV)("div",{className:"tabpage",children:[Object(h.jsxDEV)("div",{className:"tabbar-group",children:[this.state.tabList.map(((e,t)=>Object(h.jsxDEV)("div",{className:e.className,style:{width:this.state.width},onClick:()=>{this.tabChange(t)},children:Object(h.jsxDEV)("div",{className:"tabbar-title",children:[" ",e.title," "]},void 0,!0,{fileName:It,lineNumber:69,columnNumber:17},this)},t,!1,{fileName:It,lineNumber:62,columnNumber:15},this))),Object(h.jsxDEV)("div",{className:"tabbar-slot",children:this.props.slot},void 0,!1,{fileName:It,lineNumber:74,columnNumber:11},this)]},void 0,!0,{fileName:It,lineNumber:59,columnNumber:9},this),Object(h.jsxDEV)("div",{className:"tab-body",children:this.props.children},void 0,!1,{fileName:It,lineNumber:76,columnNumber:9},this)]},void 0,!0,{fileName:It,lineNumber:58,columnNumber:7},this)}}var Lt=i(515),Ht=i(516),qt=i(470),Mt="/Users/zhangds/web/blue-brother/frontend/src/pages/coupon/commodity/index.jsx";const Pt=[{title:"\u5546\u54c1\u7f16\u53f7",name:"product_id",prop:"product_id",className:"name",type:"normal",width:"auto"},{title:"\u5546\u54c1\u540d\u79f0",prop:"product_name",name:"product_name",width:"200px",type:"normal"},{title:"\u7acb\u51cf\u91d1\u5e73\u53f0\u6279\u6b21\u53f7",width:"200px",prop:"channel_activity_id",name:"channel_activity_id",type:"normal"},{title:"\u4e0a\u6e38\u5e73\u53f0",width:"auto",prop:"upstream",name:"upstream",type:"normal"},{title:"\u5546\u54c1\u6743\u91cd",width:"auto",prop:"weight",name:"weight",type:"normal"},{title:"\u6709\u6548\u65f6\u95f4\u6bb5",width:"500px",prop:"effectDate",name:"effectDate",type:"normal"},{title:"\u5b98\u65b9\u4ef7\u683c",name:"official_price",prop:"official_price",type:"normal",width:"auto"},{title:"\u5408\u540c\u4ef7",name:"contract_price",type:"normal",prop:"contract_price",width:"auto"},{title:"\u521b\u5efa\u65f6\u95f4",name:"create_time",type:"normal",prop:"create_time",width:"250px"},{title:"\u7c7b\u578b",name:"product_type_text",type:"normal",prop:"product_type_text",width:"auto"},{title:"\u64cd\u4f5c",prop:"opearo",name:"opearo",type:"slot",width:"200px"}];var Bt=()=>{const[e,t]=Object(W.a)({tabList:[{title:"\u5546\u54c1\u8303\u56f4\u5217\u8868",index:0}],tableData:[],tableHeight:500,lodgingTable:!0,combinedValue:[],key_word:"",page:1,limit:10,total:0,isQuery:!1}),i=Object(r.useRef)(null),s=()=>{let i=(()=>{let t={key_word:e.key_word||null,code_batch_id:sessionStorage.getItem("code_id"),page:e.page,limit:e.limit};return t=Object(Lt.a)({...t},(e=>Object(Ht.a)(e)||Object(qt.a)(e))),t})();Object(a.R)(i).then((e=>{Object(a.Tb)(e,((e,i)=>{let a=[];e.data.map((e=>{1===e.type?(e.entity.upstream="\u76f4\u8fde\u5929\u4e0b",e.entity.only=e.entity.product_id,e.entity.id=e.id,e.entity.weight=e.weight,e.entity.all_budget=Number(e.entity.contract_price)*Number(e.entity.quantity),e.entity.type=1,a.push(e.entity)):2===e.type&&a.push({product_id:e.entity.goods_id,product_type_text:"\u7acb\u51cf\u91d1",only:e.entity.channel_activity_id,id:e.id,upstream:P(e.entity.channel),code_batch_id:e.code_batch_id,contract_price:e.entity.price,create_time:e.create_time,official_price:e.entity.reduce_amount,channel_activity_id:e.entity.channel_activity_id,product_name:e.entity.batch_goods_name,quantity:e.stock,weight:e.weight,effectDate:e.entity.time_limit.effect_time.start_time+" \u81f3 "+e.entity.time_limit.effect_time.end_time})})),t({tableData:a})}))}))};Object(r.useEffect)((()=>{s()}),[e.isQuery]);return Object(h.jsxDEV)("div",{className:"table-box-app",children:[Object(h.jsxDEV)(Ft,{tabs:e.tabList,tabChange:i=>(i=>{t({page:1,limit:10,status:i,isQuery:!e.isQuery})})(i)},void 0,!1,{fileName:Mt,lineNumber:219,columnNumber:7},void 0),Object(h.jsxDEV)("div",{className:"query-box",children:[Object(h.jsxDEV)("div",{},void 0,!1,{fileName:Mt,lineNumber:221,columnNumber:9},void 0),Object(h.jsxDEV)(n.a,{onChange:e=>t({key_word:e}),value:e.key_word,wordSearch:()=>s(),icon:"search",placeholder:"\u8bf7\u8f93\u5165\u5546\u54c1\u540d\u79f0\u8fdb\u884c\u5339\u914d\u67e5\u8be2",countShow:!1,height:"36px",width:"260px",onClearItem:i=>t({key_word:"",isQuery:!e.isQuery}),alignment:"left"},void 0,!1,{fileName:Mt,lineNumber:222,columnNumber:9},void 0)]},void 0,!0,{fileName:Mt,lineNumber:220,columnNumber:7},void 0),Object(h.jsxDEV)(I,{spliteColor:"#fff",tableData:e.tableData,Column:Pt,maxheight:e.tableHeight,isSwitch:!1,isShowPageBar:!1,countbarVisible:!1,page:e.page,ref:i,dataCount:e.total,pageChange:i=>{t({page:i,isQuery:!e.isQuery})},emptyText:e.lodgingTable?"\u62b1\u6b49\uff0c\u6682\u65e0\u76f8\u5173\u6570\u636e\u8bb0\u5f55":"\u67e5\u8be2 \u8bf7\u8f93\u5165\u3010\u5206\u9500\u5546\u3011\u6216\u3010\u8ba1\u5212\u540d\u79f0\u3011\u6216\u3010key\u3011\u8fdb\u884c\u67e5\u8be2",countChange:i=>{t({limit:i,isQuery:!e.isQuery})},ComponentHandler:(i,s)=>"dates"===i?Object(h.jsxDEV)("span",{children:[s.begin_time," \u81f3 ",s.end_time]},void 0,!0,{fileName:Mt,lineNumber:256,columnNumber:15},void 0):"opearo"===i?Object(h.jsxDEV)("div",{children:Object(h.jsxDEV)("span",{style:{color:"red"},className:"grid-link",onClick:()=>{return i=s,void G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:"\u4f60\u786e\u5b9a\u8981\u5220\u9664\u6539\u6761\u6570\u636e?"},void 0,!1,{fileName:Mt,lineNumber:193,columnNumber:16},void 0),onConfirm(){Object(a.E)(i.id).then((i=>{Object(a.Tb)(i,((i,a)=>{c.a.clear(),c.a.success(a),t({isQuery:!e.isQuery})}),(e=>{c.a.error(e)}))})).catch((e=>{}))},onCancel(){},className:"questModal",parentComponent:void 0});var i},children:"\u5220\u9664"},void 0,!1,{fileName:Mt,lineNumber:265,columnNumber:17},void 0)},void 0,!1,{fileName:Mt,lineNumber:264,columnNumber:15},void 0):void 0},void 0,!1,{fileName:Mt,lineNumber:235,columnNumber:7},void 0)]},void 0,!0,{fileName:Mt,lineNumber:218,columnNumber:5},void 0)};var At={exchangeStatus(e){switch(e){case 0:return"\u672a\u5f00\u59cb";case 1:return"\u8fdb\u884c\u4e2d";case-1:return"\u6682\u505c";case 2:return"\u5df2\u7ed3\u675f";case 5:return"\u5df2\u4f5c\u5e9f"}},exchangeStatusBg(e){switch(e){case 0:return"#BFBFBF";case 1:return"#3575C7";case-1:return"#F6C041";case 2:return"#43A65D";case 5:return"#DC4F40"}},orderStatus(e){switch(e){case 0:return"\u5f85\u652f\u4ed8";case 1:return"\u5145\u503c\u4e2d";case 2:return"\u5df2\u5b8c\u6210";case 3:return"\u5145\u503c\u5931\u8d25"}},orderStatusBg(e){if(1===e.status&&2===e.type)return"#43A65D";switch(e.status){case 0:case 1:return"#3575C7";case 2:return"#43A65D";case 3:return"#ff0000";case 4:return"#c9c9c9";case 5:case 6:return"#ca6b61";case 7:return"#9655b4";case 8:return"#9f19dd";default:return"transparent"}},orderPayStatusBg(e){switch(e){case 1:return"#3575C7";case 2:return"#43A65D";case 3:return"#ff0000";default:return"transparent"}},orderVoucherStatusBg(e){switch(e){case 1:case 5:case 6:return"#3575C7";case 2:return"#43A65D";case 3:return"#ff0000";case 4:return"#0026ff";case 7:return"#9655b4";case 8:return"#9f19dd";default:return"transparent"}},planStatus(e){switch(e){case 0:return"\u521b\u5efa\u4e2d";case 2:return"\u5ba1\u6838\u4e2d";case 3:return"\u5f85\u751f\u6548";case 4:return"\u8fdb\u884c\u4e2d";case 5:return"\u6682\u505c\u4e2d";case 6:return"\u5df2\u5b8c\u7ed3";case 7:return"\u672a\u901a\u8fc7"}},planStatusBg(e){switch(e){case 0:return"#BFBFBF";case 2:return"#ffaa00";case 3:return"#3575C7";case 4:return"#55ff7f";case 5:return"#55aaff";case 6:return"#e64c00";case 7:return"#b6bcb8"}},keyStatus(e){switch(e){case 1:return"\u5f85\u4f7f\u7528";case 2:return"\u5df2\u4f7f\u7528";case 3:return"\u5df2\u5931\u6548";case 4:return"\u5df2\u4f5c\u5e9f";case 5:return"\u4f7f\u7528\u9501\u5b9a\u4e2d"}},keyStatusBg(e){switch(e){case 1:return"#BFBFBF";case 2:return"#43A65D";case 3:return"#ffaa00";case 4:return"#e64c00";case 5:return"#3575C7"}},pageStatus(e){switch(e){case 1:return"H5";case 2:return"\u5fae\u4fe1";case 4:return"\u652f\u4ed8\u5b9d"}},pageStatusBg(e){switch(e){case 1:return"#ffaa00";case 2:return"#55ff7f";case 4:return"#55aaff"}},pageTypeStatus(e){switch(e){case 3:return"\u5151\u6362\u7801";case 1:return"\u767d\u540d\u5355";case 2:return"\u7acb\u51cf\u91d1";case 4:return"\u4f18\u60e0\u5238";case 8:return"\u4f18\u60e0\u5238\u767d\u540d\u5355"}},pageTypeStatusBg(e){switch(e){case 1:return"#ffaa00";case 2:return"#e64c00";case 3:return"#55aaff";case 4:return"#79AF83";case 8:return"#F2A505"}},keysStatus(e){switch(e){case 1:return"\u521b\u5efa\u4e2d";case 2:return"\u5ba1\u6838\u4e2d";case 4:return"\u8fdb\u884c\u4e2d";case 5:return"\u5df2\u6682\u505c";case 6:return"\u5df2\u5b8c\u7ed3";case 7:return"\u5df2\u4f5c\u5e9f";case 8:return"\u5ba1\u6279\u9a73\u56de"}},keysStatusBg(e){switch(e){case 1:return"#ffaa00";case 2:return"#55ff7f";case 5:case 8:return"#e64c00";case 4:return"#55aaff";case 6:return"#555500";case 7:return"#3575C7"}}},zt=i(5),Jt=i(495);i(219);const Ut=(e,t=3)=>new Promise((async(i,s)=>{let l=null;l=1===t?await Object(a.Sc)(e):2===t?await Object(a.Tc)(e):await Object(a.Uc)(e),200===l.code?!0===l.data.have?G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:["\u8be5key\u6279\u6b21(key\u3001\u5151\u6362\u7801)\uff0c\u4e0b\u9762\u6709",l.data.order.status_text,"\u8ba2\u5355\uff0c\u662f\u5426\u7ee7\u7eed\u4f5c\u5e9f \uff1f"]},void 0,!0,{fileName:"/Users/zhangds/web/blue-brother/frontend/src/tools/apiTools.js",lineNumber:34,columnNumber:13},void 0),onConfirm(){i(2)},onCancel(){i(0)},className:"questModal",parentComponent:void 0}):i(1):s(l)}));var Wt="/Users/zhangds/web/blue-brother/frontend/src/pages/coupon/list/index.jsx";const Rt=[{title:"\u4f18\u60e0\u5238-\u6279\u6b21ID",name:"id",prop:"id",type:"normal",width:"auto"},{title:"\u4f18\u60e0\u5238\u6279\u6b21\u540d\u79f0",width:"auto",type:"slot",prop:"title",name:"title"},{title:"\u6709\u6548\u671f",type:"slot",prop:"dates",name:"dates",width:"250px"},{title:"\u5f52\u5c5e\u8425\u9500\u8ba1\u5212\u540d\u79f0",width:"auto",type:"normal",prop:"plan_title",name:"plan_title"},{title:"\u5f52\u5c5ekey\u6279\u6b21id",width:"auto",type:"normal",prop:"key_batch_id",name:"key_batch_id"},{title:"\u542f\u7528/\u6682\u505c",width:"auto",type:"slot",prop:"switch"},{title:"\u64cd\u4f5c",prop:"opearo",name:"opearo",type:"slot",width:"250px"},{title:"\u72b6\u6001",width:"auto",type:"slot",prop:"status",name:"status"},{title:"\u5238\u603b\u6570(\u5df2\u53d1\u653e)",width:"auto",type:"normal",prop:"quantity",name:"quantity"},{title:"\u5df2\u9886\u53d6",width:"auto",type:"normal",prop:"received",name:"received"},{title:"\u5df2\u4f7f\u7528",width:"auto",type:"normal",prop:"usage",name:"usage"},{title:"\u5269\u4f59\u6570",width:"auto",type:"normal",prop:"stock",name:"stock"},{title:"\u5df2\u5931\u6548",width:"auto",type:"normal",prop:"expired",name:"expired"},{title:"\u5df2\u4f5c\u5e9f",width:"auto",type:"normal",prop:"invalid",name:"invalid"}];var Kt=()=>{const[e,t]=Object(W.a)({tabList:[{title:"\u5168\u90e8",index:0},{title:"\u521b\u5efa\u4e2d",index:-1},{title:"\u672a\u5f00\u59cb",index:3},{title:"\u5ba1\u6838\u4e2d",index:6},{title:"\u672a\u901a\u8fc7",index:7},{title:"\u8fdb\u884c\u4e2d",index:1},{title:"\u751f\u6210\u4e2d",index:8},{title:"\u6682\u505c\u4e2d",index:2},{title:"\u5df2\u7ed3\u675f",index:4},{title:"\u5df2\u4f5c\u5e9f",index:5}],tableData:[],tableHeight:500,lodgingTable:!0,search:{plan_title:"",key_batch_id:"",code_batch_id:"",code_batch_name:""},planOptions:[],combinedValue:[],begin_time:"",end_time:"",status:"",page:1,limit:10,total:0,isQuery:!1}),i=Object(r.useRef)(null),o=Object(zt.f)(),m=()=>{let i=(()=>{var t;const i=Object(de.a)(e.search);i.plan_title=(null===(t=i.plan_title)||void 0===t?void 0:t.text)||"";let a={...i,begin_time:e.begin_time||null,end_time:e.end_time||null,status:999!==e.status&&""!==e.status?e.status:null,page:e.page,limit:e.limit};return a=Object(Lt.a)({...a},(e=>Object(Ht.a)(e)||Object(qt.a)(e))),a})();Object(a.X)(i).then((e=>{Object(a.Tb)(e,((e,i)=>{t({page:e.page,total:e.total,tableData:e.data})}))}))};function d(i,a){const s=e.search;s[i]=a,t({search:s})}Object(r.useEffect)((()=>{Object(a.rb)().then((e=>Object(a.Tb)(e,((e,i)=>{const a=e.map((e=>({key:e.id,text:e.title})));t({planOptions:a})}),(e=>{}))))}),[]),Object(r.useEffect)((()=>{m()}),[e.isQuery]);const b=(e,t)=>{let i="3";sessionStorage.setItem("knockGold_effectDate",JSON.stringify({}));let a=[{pagetitle:"\u65b0\u5efa\u5151\u6362\u7801",items:[{path:"/home/coupon-list",name:"\u4f18\u60e0\u5238\u7ba1\u7406"},{path:"/home/coupon-add-edit",name:"\u65b0\u5efa\u4f18\u60e0\u5238"}]}];1===e?(a[0].pagetitle="\u590d\u5236",a[0].items[1].name=`\u590d\u5236:${t.title}`,sessionStorage.setItem("knockGold_effectDate",JSON.stringify(t.keyBatch.plan)),sessionStorage.setItem("keyBatch_id",t.key_batch_id),i="2"):2===e?(a[0].pagetitle="\u7f16\u8f91",a[0].items[1].name=`\u7f16\u8f91:${t.title}`,sessionStorage.setItem("approval_id",t.approval_id),sessionStorage.setItem("approval_status",t.status),sessionStorage.setItem("knockGold_effectDate",JSON.stringify(t.keyBatch.plan)),i="1"):(i="3",sessionStorage.setItem("knockGold_effectDate","")),sessionStorage.setItem("code_id",null===t||void 0===t?void 0:t.id),sessionStorage.setItem("breaknav",JSON.stringify(a)),sessionStorage.setItem("pathname2","/home/coupon-add-edit"),sessionStorage.setItem("keyType","2"),sessionStorage.setItem("KeyPcType",i),o.push("/home/coupon-add-edit")},p=i=>{Object(a.s)(i).then((i=>{Object(a.Tb)(i,((i,a)=>{c.a.clear(),c.a.success(a),t({isQuery:!e.isQuery})}),(e=>{c.a.error(e)}))})).catch((e=>{}))},N=(i,s)=>{switch(i){case 1:return[4,5,6,8].includes(s.status)?Object(h.jsxDEV)("span",{style:{color:"#d8dbdd"},className:"grid-link",children:"\u7f16\u8f91"},void 0,!1,{fileName:Wt,lineNumber:469,columnNumber:13},void 0):Object(h.jsxDEV)("span",{className:"grid-link",onClick:e=>b(2,s),children:"\u7f16\u8f91"},void 0,!1,{fileName:Wt,lineNumber:475,columnNumber:13},void 0);case 2:let i="";return i=[1,2,3].includes(s.status)||[4,5].includes(s.status)&&[4,5,8].includes(s.keyBatch.status)&&[3,5,4].includes(s.keyBatch.plan.status)?Object(h.jsxDEV)("span",{className:"grid-link",style:{},onClick:e=>b(1,s),children:"\u590d\u5236"},void 0,!1,{fileName:Wt,lineNumber:494,columnNumber:13},void 0):Object(h.jsxDEV)("span",{style:{paddingRight:"10px",color:"#d8dbdd"},children:"\u590d\u5236"},void 0,!1,{fileName:Wt,lineNumber:500,columnNumber:13},void 0),i;case 3:return-1===s.status||7===s.status&&-1===s.old_status?Object(h.jsxDEV)("span",{className:"grid-link",style:{color:"red"},onClick:()=>{return i=s,void G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:"\u4f60\u786e\u5b9a\u8981\u5220\u9664\u8be5\u6761\u6570\u636e?"},void 0,!1,{fileName:Wt,lineNumber:396,columnNumber:16},void 0),onConfirm:()=>{Object(a.C)(i.id).then((i=>{Object(a.Tb)(i,((i,a)=>{c.a.clear(),c.a.success(a),t({isQuery:!e.isQuery})}),(e=>{c.a.error(e)}))}))},onCancel(){},className:"questModal",parentComponent:void 0});var i},children:"\u5220\u9664"},void 0,!1,{fileName:Wt,lineNumber:515,columnNumber:13},void 0):[1,2,3].includes(s.old_status)?1===s.approval_status?Object(h.jsxDEV)("span",{style:{paddingRight:"10px",color:"#d8dbdd"},children:"\u4f5c\u5e9f"},void 0,!1,{fileName:Wt,lineNumber:529,columnNumber:15},void 0):Object(h.jsxDEV)("span",{className:"grid-link",onClick:e=>((e,t)=>{if(6==t.status)return void c.a.error("\u5ba1\u6838\u4e2d\u7684\u6570\u636e\u4e0d\u5141\u8bb8\u4f5c\u5e9f");let i={type:3,object_value:t.id};try{Ut(i).then((e=>{2===e?p(t.id):1===e&&G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:["\u786e\u5b9a\u4f5c\u5e9f",t.title,"\uff1f"]},void 0,!0,{fileName:Wt,lineNumber:375,columnNumber:22},void 0),onConfirm(){p(t.id)},onCancel(){},className:"questModal",parentComponent:void 0})}))}catch(a){}})(0,s),children:"\u4f5c\u5e9f"},void 0,!1,{fileName:Wt,lineNumber:540,columnNumber:13},void 0):Object(h.jsxDEV)("span",{style:{paddingRight:"10px",color:"#d8dbdd"},children:"\u4f5c\u5e9f"},void 0,!1,{fileName:Wt,lineNumber:546,columnNumber:13},void 0);case 4:return 6===s.status&&Number(s.approval_id)>0?Object(h.jsxDEV)("span",{className:"grid-link",onClick:e=>j(e,s),children:"\u64a4\u9500\u5ba1\u6279"},void 0,!1,{fileName:Wt,lineNumber:560,columnNumber:13},void 0):Object(h.jsxDEV)("span",{style:{color:"#d8dbdd"},children:"\u64a4\u9500\u5ba1\u6279"},void 0,!1,{fileName:Wt,lineNumber:565,columnNumber:18},void 0);default:return}},j=(i,s)=>{let l=s.approval_id;G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:"\u8be5\u6570\u636e\u6b63\u5728\u5ba1\u6279\u4e2d,\u662f\u5426\u786e\u8ba4\u64a4\u9500\u5ba1\u6279\uff1f"},void 0,!1,{fileName:Wt,lineNumber:579,columnNumber:16},void 0),onConfirm:()=>{Object(a.bd)(l).then((i=>{Object(a.Tb)(i,((i,a)=>{c.a.success("\u64a4\u9500\u5ba1\u6279\u6210\u529f"),setTimeout((()=>{t({isQuery:!e.isQuery})}),3e3)}),(e=>{c.a.error(e)}))}))},onCancel:()=>{},className:"questModal",parentComponent:void 0})},g=Object(h.jsxDEV)(Jt.a,{className:"zent-datepicker-demo",value:e.combinedValue,showTime:{format:"HH:mm:ss",defaultTime:["00:00:00","23:59:59"]},format:"YYYY-MM-DD HH:mm:ss",onChange:i=>(i=>{if(i[0]){if(Y()(i[1]).diff(Y()(i[0]),"years")>2)return void c.a.error("\u67e5\u8be2\u65f6\u95f4\u4e0d\u80fd\u8d85\u8fc73\u5e74");t({begin_time:i[0],end_time:i[1],isQuery:!e.isQuery,combinedValue:i})}else t({combinedValue:i,begin_time:"",end_time:"",isQuery:!e.isQuery})})(i)},void 0,!1,{fileName:Wt,lineNumber:622,columnNumber:5},void 0);return Object(h.jsxDEV)("div",{className:"table-box-app",children:[Object(h.jsxDEV)(Ft,{tabs:e.tabList,tabChange:i=>(i=>{let a=e.tabList[i].index;t({page:1,limit:10,status:a,isQuery:!e.isQuery})})(i),width:130,first:!0,slot:g},void 0,!1,{fileName:Wt,lineNumber:635,columnNumber:7},void 0),Object(h.jsxDEV)("div",{className:"query-box",children:[Object(h.jsxDEV)(u.a,{type:"primary",icon:"plus",onClick:()=>b(),children:"\u65b0\u589e\u4f18\u60e0\u5238"},void 0,!1,{fileName:Wt,lineNumber:643,columnNumber:9},void 0),Object(h.jsxDEV)("div",{className:"codesFind",children:Object(h.jsxDEV)(l.a,{children:[Object(h.jsxDEV)(s.a,{labelname:"\u8ba1\u5212\u540d\u79f0\uff1a",required:"",labelwidth:"90px",children:Object(h.jsxDEV)(X.a,{name:"state",value:e.search.plan_title,options:e.planOptions,placeholder:"\u8bf7\u8f93\u5165",width:204,clearable:!0,onChange:e=>{d("plan_title",e)}},void 0,!1,{fileName:Wt,lineNumber:649,columnNumber:15},void 0)},void 0,!1,{fileName:Wt,lineNumber:648,columnNumber:13},void 0),Object(h.jsxDEV)(s.a,{labelname:"key\u6279\u6b21ID\uff1a",required:"",labelwidth:"100px",children:Object(h.jsxDEV)(n.a,{value:e.search.key_batch_id,countShow:!1,labelWidth:"0px",placeholder:"\u8bf7\u8f93\u5165",width:204,onChange:e=>{d("key_batch_id",e)},onClearItem:e=>{d("key_batch_id","")}},void 0,!1,{fileName:Wt,lineNumber:662,columnNumber:15},void 0)},void 0,!1,{fileName:Wt,lineNumber:661,columnNumber:13},void 0),Object(h.jsxDEV)(s.a,{labelname:"\u4f18\u60e0\u5238\u6279\u6b21\u540d\u79f0\uff1a",required:"",labelwidth:"155px",children:Object(h.jsxDEV)(n.a,{value:e.search.code_batch_name,countShow:!1,labelWidth:"0px",placeholder:"\u8bf7\u8f93\u5165",width:204,onChange:e=>{d("code_batch_name",e)},onClearItem:e=>{d("code_batch_name","")}},void 0,!1,{fileName:Wt,lineNumber:677,columnNumber:15},void 0)},void 0,!1,{fileName:Wt,lineNumber:676,columnNumber:13},void 0),Object(h.jsxDEV)(s.a,{labelname:"\u4f18\u60e0\u5238\u6279\u6b21ID\uff1a",required:"",labelwidth:"130px",children:Object(h.jsxDEV)(n.a,{value:e.search.code_batch_id,countShow:!1,labelWidth:"0px",placeholder:"\u8bf7\u8f93\u5165",width:204,onChange:e=>{d("code_batch_id",e)},onClearItem:e=>{d("code_batch_id","")}},void 0,!1,{fileName:Wt,lineNumber:692,columnNumber:15},void 0)},void 0,!1,{fileName:Wt,lineNumber:691,columnNumber:13},void 0),Object(h.jsxDEV)("div",{className:"button_box",children:[Object(h.jsxDEV)(u.a,{type:"primary",onClick:()=>m(),children:"\u67e5\u8be2"},void 0,!1,{fileName:Wt,lineNumber:707,columnNumber:15},void 0),Object(h.jsxDEV)(u.a,{onClick:()=>{t({search:{plan_title:"",key_batch_id:"",code_batch_id:"",code_batch_name:""},isQuery:!e.isQuery})},children:"\u91cd\u7f6e"},void 0,!1,{fileName:Wt,lineNumber:710,columnNumber:15},void 0)]},void 0,!0,{fileName:Wt,lineNumber:706,columnNumber:13},void 0)]},void 0,!0,{fileName:Wt,lineNumber:647,columnNumber:11},void 0)},void 0,!1,{fileName:Wt,lineNumber:646,columnNumber:9},void 0)]},void 0,!0,{fileName:Wt,lineNumber:642,columnNumber:7},void 0),Object(h.jsxDEV)(I,{spliteColor:"#fff",tableData:e.tableData,Column:Rt,maxheight:e.tableHeight,isSwitch:!1,isMultiple:!1,countbarVisible:!1,page:e.page,ref:i,dataCount:e.total,pageChange:i=>{t({page:i,isQuery:!e.isQuery})},emptyText:e.lodgingTable?"\u62b1\u6b49\uff0c\u6682\u65e0\u76f8\u5173\u6570\u636e\u8bb0\u5f55":"\u67e5\u8be2 \u8bf7\u8f93\u5165\u3010\u5206\u9500\u5546\u3011\u6216\u3010\u8ba1\u5212\u540d\u79f0\u3011\u6216\u3010key\u3011\u8fdb\u884c\u67e5\u8be2",countChange:i=>{t({limit:i,isQuery:!e.isQuery})},ComponentHandler:(i,s)=>"title"===i?Object(h.jsxDEV)("span",{className:"grid-link",onClick:e=>((e,t)=>{sessionStorage.setItem("pathname2","/home/coupon-commodity");let i=[{pagetitle:"\u7f16\u8f91",items:[{path:"/home/coupon-list",name:"\u4f18\u60e0\u5238\u7ba1\u7406"},{path:"/home/coupon-add-edit",name:t.title+"\u4f18\u60e0\u5238\u7684\u5546\u54c1\u8303\u56f4\u5217\u8868"}]}];sessionStorage.setItem("code_id",t.id),sessionStorage.setItem("breaknav",JSON.stringify(i)),window.open("#/home/coupon-commodity")})(0,s),children:s.title},void 0,!1,{fileName:Wt,lineNumber:742,columnNumber:15},void 0):"dates"===i?Object(h.jsxDEV)("span",{children:[s.begin_time," \u81f3 ",s.end_time]},void 0,!0,{fileName:Wt,lineNumber:749,columnNumber:15},void 0):"switch"==i?Object(h.jsxDEV)(v.a,{size:"small",checked:2!=s.old_status,onChange:i=>{return l=s,void G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:["\u662f\u5426",2==l.old_status?"\u542f\u7528":"\u505c\u7528","\u8be5\u4f18\u60e0\u5238\u6279\u6b21\uff1f"]},void 0,!0,{fileName:Wt,lineNumber:425,columnNumber:16},void 0),onConfirm:()=>{Object(a.yc)(l.id,{operation:1==l.old_status?"2":"1"}).then((i=>{Object(a.Tb)(i,((i,a)=>{c.a.clear(),c.a.success(a),t({isQuery:!e.isQuery})}),(e=>{c.a.error(e)}))})).catch((e=>{}))},onCancel(){},className:"questModal",parentComponent:void 0});var l},disabled:4==s.status||5==s.status},void 0,!1,{fileName:Wt,lineNumber:757,columnNumber:15},void 0):"status"==i?Object(h.jsxDEV)("p",{className:"dflexa",children:Object(h.jsxDEV)("span",{children:[Object(h.jsxDEV)("font",{className:"icon",style:{background:At.exchangeStatusBg(parseInt(s.status))}},void 0,!1,{fileName:Wt,lineNumber:770,columnNumber:19},void 0),s.status_text]},void 0,!0,{fileName:Wt,lineNumber:769,columnNumber:17},void 0)},void 0,!1,{fileName:Wt,lineNumber:768,columnNumber:15},void 0):"opearo"==i?Object(h.jsxDEV)("div",{children:[N(1,s),N(2,s),N(3,s),s.approval_id&&6===s.status?Object(h.jsxDEV)("span",{className:"grid-link",onClick:i=>{return l=s.approval_id,void Object(a.G)(l).then((i=>{Object(a.Tb)(i,((i,a)=>{c.a.success(a),t({isQuery:!e.isQuery})}),(e=>{c.a.error(e)}))}));var l},children:"\u9489\u9489\u5ba1\u6279\u67e5\u8be2"},void 0,!1,{fileName:Wt,lineNumber:789,columnNumber:19},void 0):Object(h.jsxDEV)("span",{className:"grid-link disabled",children:"\u9489\u9489\u5ba1\u6279\u67e5\u8be2"},void 0,!1,{fileName:Wt,lineNumber:793,columnNumber:19},void 0),N(4,s)]},void 0,!0,{fileName:Wt,lineNumber:784,columnNumber:15},void 0):void 0},void 0,!1,{fileName:Wt,lineNumber:721,columnNumber:7},void 0)]},void 0,!0,{fileName:Wt,lineNumber:634,columnNumber:5},void 0)},Yt=(i(36),i(220),i(500)),$t=i(69),Gt=i(471),Qt=i(343),Zt=(i(221),"/Users/zhangds/web/blue-brother/frontend/src/components/UseLazyLoadingSelect/index.js");var Xt=({options:e,clearable:t=!1,placeholder:i="\u8bf7\u8f93\u5165",value:a,onChange:s,width:l,onChangePage:n,disabled:o=!1,onKeywordChange:m,keyword:c=""})=>{let d=!0;const[u,b]=Object(r.useState)(!0),[p,N]=Object(r.useState)(!1),j=e=>{setTimeout((()=>{n(e)}),2e3)};return Object(h.jsxDEV)("div",{children:Object(h.jsxDEV)(X.a,{options:e,placeholder:i,value:a,onChange:s,width:l,loading:u,open:p,disabled:o,onOpenChange:e=>{N(e),e&&d&&(d=!1,b(!0),setTimeout((()=>{b(!1)}),2e3))},renderOptionList:(e,t)=>Object(h.jsxDEV)(Gt.a,{hasMore:!0,skipLoadOnMount:!0,loadMore:j,className:"infinite-scroller-demo",loader:Object(h.jsxDEV)("div",{className:"loading-text",children:Object(h.jsxDEV)(Qt.a,{iconSize:18,loading:!0,icon:"circle",iconText:"\u52a0\u8f7d\u4e2d\u2026",textPosition:"right",colorPreset:"grey"},void 0,!1,{fileName:Zt,lineNumber:50,columnNumber:13},void 0)},void 0,!1,{fileName:Zt,lineNumber:49,columnNumber:11},void 0),children:e.map(((e,i)=>t(e,i)))},void 0,!1,{fileName:Zt,lineNumber:43,columnNumber:7},void 0),onKeywordChange:m,keyword:c},void 0,!1,{fileName:Zt,lineNumber:67,columnNumber:7},void 0)},void 0,!1,{fileName:Zt,lineNumber:66,columnNumber:5},void 0)},ei="/Users/zhangds/web/blue-brother/frontend/src/pages/distributor/adddistributorinfo/adddistributorinfo.js";const ti=[{type:"required",message:"\u8bf7\u8f93\u5165\u8054\u7cfb\u4eba\u624b\u673a\u53f7"},{type:"regExp",message:"\u624b\u673a\u53f7\u683c\u5f0f\u4e0d\u5bf9",reg:/^[1][3,4,5,6,7,8,9][0-9]{9}$/}],ii=[{type:"required",message:"\u8bf7\u8f93\u5165\u8054\u7cfb\u4eba\u90ae\u7bb1"}];class ai extends m.a.Component{constructor(e){super(e),this.onUploadError=(e,t)=>{"overMaxAmount"===e?(c.a.clear(),c.a.error(`\u6700\u591a\u53ef\u4e0a\u4f20 ${t.maxAmount} \u5f20\u56fe\u7247`)):"overMaxSize"===e&&(c.a.clear(),c.a.error(`\u56fe\u7247\u5927\u5c0f\u4e0d\u80fd\u8d85\u8fc7 ${t.formattedMaxSize}b`))},this.state={phone_nums:1,id:"",headImg:"",uploadimgFile:"",email_nums:1,disabled:!1,pwdtype:"text",phoneSwitch:[!1,!1,!1,!1],emailSwitch:[!1,!1,!1,!1],defaultFileList:[{src:""}],isSelectDirect:!1,model:{name:"",account:"",password:"",subject:"",contact_name:"",contact_phone:"",contact_email:"",salesman_id:"",company_id:"",identity_type:"",phone1:"",phone2:"",phone3:"",phone4:"",email1:"",email2:"",email3:"",email4:"",direct_reseller_id:""},rules:{fullname:[{type:"required",message:"\u8bf7\u8f93\u5165\u5206\u9500\u5546\u5168\u79f0"}],subject:[{type:"required",message:"\u8bf7\u8f93\u5165\u5206\u9500\u5546\u4e3b\u4f53"}],account:[{type:"required",message:"\u8bf7\u8f93\u5165\u767b\u5f55\u8d26\u53f7"}],pwd:[{type:"required",message:"\u8bf7\u8f93\u5165\u5bc6\u7801"},{type:"regExp",message:"6-16\u4f4d\u5b57\u7b26,\u6570\u5b57+\u5b57\u6bcd\u7ec4\u6210\uff0c(\u5b57\u6bcd\u533a\u5206\u5927\u5c0f\u5199)",reg:/^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,16}$/}],contacts:[{type:"required",message:"\u8bf7\u8f93\u5165\u8054\u7cfb\u4eba"},{type:"regExp",message:"2-16\u5b57\u6c49\u5b57/\u5b57\u6bcd\u7ec4\u6210",reg:/^([\u4e00-\u9fa5]|[a-zA-Z]){2,16}$/}],contacts_phone:ti,contacts_email:[{type:"required",message:"\u8bf7\u8f93\u5165\u8054\u7cfb\u4eba\u90ae\u7bb1"}],sale:[{type:"required",message:"\u8bf7\u9009\u62e9\u9500\u552e\u4eba\u5458"}],identity:[{type:"required",message:"\u8bf7\u9009\u62e9\u8eab\u4efd\u7c7b\u578b"}],sign:[{type:"required",message:"\u8bf7\u9009\u62e9\u7b7e\u7ea6\u516c\u53f8"}],phone1:ti,phone2:ti,phone3:ti,phone4:ti,email1:ii,email2:ii,email3:ii,email4:ii,direct_reseller_id:[{type:"required",message:"\u8bf7\u9009\u62e9\u6620\u5c04\u5206\u9500\u5546"}]},companyList:[],directList:[],personnelList:[],fieldArr:[],fieldTitle:"",addfield:{},identityType:[{key:1,text:"\u76f4\u5ba2"},{key:2,text:"\u53cb\u5546"}],limit:15,page:1,keyword:""}}setZentOpt(e){return e.map((e=>({key:e.id,text:e.name,disabled:e.disabled})))}componentDidMount(){let e={limit:this.state.limit,page:this.state.page};this.directList(e)}directList(e){Object(a.ab)(e).then((e=>{if(200===e.code){let t=this.state.directList;t=t.concat(this.setZentOpt(e.data.data)),this.setState({directList:t})}}))}submit(){return this.refs.form1.validator()}onUploadChange(e){let t=this;if(e&&e.length>0){let i=new FormData;i.append("file",e[0].file),i.append("path","reseller_avatar"),Object(a.cd)(i).then((e=>{Object(a.Tb)(e,((e,i)=>{t.setState({headImg:e.path}),c.a.clear(),c.a.success(i)}),(e=>{c.a.error(e)}))})).catch((e=>{}))}else t.setState({headImg:""})}onSetAll(e,t){let i=this.state.model;i[e]=t,this.setState({model:i})}onDirectChange(e){let t=this.state.model;t.direct_reseller_id=e,this.setState({page:1,model:t})}onChangePageSelect(e){let t=this.state.page;this.setState({page:t+1});let i={limit:this.state.limit,page:t+1};this.directList(i),e&&e()}NameblurFn(e){if(0==this.props.enumer)Object(a.db)(e).then((e=>{Object(a.Tb)(e,((e,t)=>{}),(e=>{c.a.error(e)}))})).catch((e=>{}));else{let t={id:JSON.parse(sessionStorage.getItem("dataInfo")).id};Object(a.Ob)(e,t).then((e=>{Object(a.Tb)(e,((e,t)=>{}),(e=>{c.a.error(e)}))})).catch((e=>{}))}}AccountblurFn(e){if(0==this.props.enumer)Object(a.cb)(e).then((e=>{Object(a.Tb)(e,((e,t)=>{}),(e=>{c.a.error(e)}))})).catch((e=>{}));else{let t={id:JSON.parse(sessionStorage.getItem("dataInfo")).id};Object(a.Nb)(e,t).then((e=>{Object(a.Tb)(e,((e,t)=>{}),(e=>{c.a.error(e)}))})).catch((e=>{}))}}cancel(){this.setState({model:{}}),this.refs.form1.cancel()}componentWillMount(){if(this.getPersonnelFn(),this.getCompanyFn(),1==this.props.enumer){let e=JSON.parse(sessionStorage.getItem("dataInfo")),t="",i="";e&&(t=0===e.direct_reseller_id?"":{key:e.direct_reseller_id,text:e.direct_reseller_name},i=0!==e.direct_reseller_id);let a=Object(de.a)(e),s={name:a.name,password:"yxtx2021",account:a.account,contact_name:a.contact_name,company_id:{key:a.company_id,text:a.company_name},identity_type:{key:a.identity_type,text:a.identity_type_text},salesman_id:{key:a.salesman_id,text:a.salesman_name},subject:a.subject,direct_reseller_id:t},l=a.contact_phone,n=this.state.phoneSwitch;for(let c=0;c0){n[c-1]=!0,s["phone"+c]=l[c]}this.setState({pwdtype:"password"}),this.setState({phoneSwitch:n});let o=this.state.emailSwitch,r=a.contact_email;for(let c=0;c0){o[c-1]=!0,s["email"+c]=r[c]}this.setState({emailSwitch:o});let m={};m.src=a.head_img,this.setState({id:a.id,phone_nums:l.length,email_nums:r.length,model:s,disabled:!0,isSelectDirect:i,defaultFileList:[m],id:a.id,headImg:a.head_img})}}getPersonnelFn(){let e=this;Object(a.qb)().then((t=>{Object(a.Tb)(t,((t,i)=>{let a=t.map((e=>({key:e.id,text:e.real_name})));e.setState({personnelList:a})}),(e=>{c.a.error(e)}))})).catch((e=>{}))}getCompanyFn(){let e=this;Object(a.V)().then((t=>{Object(a.Tb)(t,((t,i)=>{let a=t.map((e=>({key:e.id,text:e.company_name})));e.setState({companyList:a})}),(e=>{c.a.error(e)}))})).catch((e=>{}))}addfieldArr(){if(4==this.state.phoneSwitch.filter((e=>1==e)).length)c.a.clear(),c.a.error("\u6dfb\u52a0\u7684\u624b\u673a\u53f7\u7801\u6570\u91cf\u5df2\u7ecf\u8fbe\u5230\u4e0a\u9650\uff01");else{let e=this.state.phoneSwitch;for(let t=0;t<4;t++)if(0==e[t]){e[t]=!0;break}this.setState({phoneSwicth:e})}}addEmailArr(){if(4==this.state.emailSwitch.filter((e=>1==e)).length)c.a.clear(),c.a.error("\u6dfb\u52a0\u7684\u90ae\u7bb1\u53f7\u7801\u6570\u91cf\u5df2\u7ecf\u8fbe\u5230\u4e0a\u9650\uff01");else{let e=this.state.emailSwitch;for(let t=0;t<4;t++)if(0==e[t]){e[t]=!0;break}this.setState({emailSwitch:e})}}changeType(e){this.setState({pwdtype:e})}changeKind(){this.setState({pwdtype:"password"})}onKeywordChange(e){this.setState({keyword:e});let t={limit:this.state.limit,page:1,key_word:e};t.key_word||delete t.key_word,Object(a.ab)(t).then((e=>{if(200===e.code){let t=this.state.directList;t=this.setZentOpt(e.data.data),this.setState({directList:t})}}))}render(){return Object(h.jsxDEV)("div",{id:"addaccinfo",className:"addreseller",children:[Object(h.jsxDEV)(l.a,{model:this.state.model,rules:this.state.rules,ref:"form1",className:"addform",children:[Object(h.jsxDEV)(s.a,{labelname:"\u5206\u9500\u5546\u5168\u79f0",prop:"fullname",children:Object(h.jsxDEV)(n.a,{onChange:e=>{this.onSetAll("name",e)},onClearItem:e=>{this.onSetAll("name","")},onblurFn:e=>{this.NameblurFn(e)},countShow:!1,value:this.state.model.name,placeholder:"\u8bf7\u8f93\u5165\u5206\u9500\u5546\u5168\u79f0",labelWidth:"0px",maxLength:32,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:ei,lineNumber:503,columnNumber:13},this)},void 0,!1,{fileName:ei,lineNumber:502,columnNumber:11},this),Object(h.jsxDEV)(s.a,{labelname:"\u4e3b\u4f53\u540d\u79f0",prop:"subject",children:Object(h.jsxDEV)(n.a,{onChange:e=>{this.onSetAll("subject",e)},onClearItem:e=>{this.onSetAll("subject","")},countShow:!1,value:this.state.model.subject,placeholder:"\u8bf7\u8f93\u5165\u4e3b\u4f53\u5168\u79f0",labelWidth:"0px",maxLength:32,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:ei,lineNumber:524,columnNumber:13},this)},void 0,!1,{fileName:ei,lineNumber:523,columnNumber:11},this),Object(h.jsxDEV)(s.a,{labelname:"\u767b\u5f55\u8d26\u53f7",prop:"account",children:Object(h.jsxDEV)("div",{className:"phonet",children:[Object(h.jsxDEV)(n.a,{onChange:e=>{this.onSetAll("account",e)},disabled:this.state.disabled,onblurFn:e=>{this.AccountblurFn(e)},onClearItem:e=>{this.onSetAll("account","")},countShow:!1,value:this.state.model.account,placeholder:"\u8bf7\u8f93\u5165\u767b\u5f55\u8d26\u53f7",labelWidth:"0px",maxLength:32,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:ei,lineNumber:544,columnNumber:15},this),0==this.props.enumer?Object(h.jsxDEV)(Yt.a,{text:"\u8d26\u53f7\uff1a"+this.state.model.account+";\u5bc6\u7801\uff1a"+this.state.model.password,onCopySuccess:()=>{c.a.clear(),c.a.success("\u590d\u5236\u6210\u529f\uff01")},children:Object(h.jsxDEV)(u.a,{type:"info",disabled:!this.state.model.account||this.state.model.password.length<6,children:"\u590d\u5236\u8d26\u53f7\u5bc6\u7801"},void 0,!1,{fileName:ei,lineNumber:572,columnNumber:19},this)},void 0,!1,{fileName:ei,lineNumber:565,columnNumber:17},this):null]},void 0,!0,{fileName:ei,lineNumber:543,columnNumber:13},this)},void 0,!1,{fileName:ei,lineNumber:542,columnNumber:11},this),Object(h.jsxDEV)(s.a,{labelname:"\u5bc6\u7801",prop:"pwd",children:Object(h.jsxDEV)(n.a,{markedShow:e=>{this.changeType(e)},kind:this.state.pwdtype,onChange:e=>{this.onSetAll("password",e)},disabled:this.state.disabled,countShow:!0,onfocusFn:e=>this.changeKind(),onClearItem:e=>{this.onSetAll("password","")},value:this.state.model.password,placeholder:"\u8bf7\u8f93\u5165\u5bc6\u7801",labelWidth:"0px",maxLength:16,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:ei,lineNumber:584,columnNumber:13},this)},void 0,!1,{fileName:ei,lineNumber:583,columnNumber:11},this),Object(h.jsxDEV)(s.a,{labelname:"\u8054\u7cfb\u4eba",prop:"contacts",children:Object(h.jsxDEV)(n.a,{onChange:e=>{this.onSetAll("contact_name",e)},onClearItem:e=>{this.onSetAll("contact_name","")},countShow:!0,value:this.state.model.contact_name,placeholder:"\u8bf7\u8f93\u5165\u8054\u7cfb\u4eba",labelWidth:"0px",maxLength:16,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:ei,lineNumber:608,columnNumber:13},this)},void 0,!1,{fileName:ei,lineNumber:607,columnNumber:11},this),Object(h.jsxDEV)(s.a,{labelname:"\u8054\u7cfb\u4eba\u624b\u673a\u53f7",prop:"contacts_phone",children:Object(h.jsxDEV)("div",{className:"phonet",children:[Object(h.jsxDEV)(n.a,{onChange:e=>{this.onSetAll("contact_phone",e)},onClearItem:e=>{this.onSetAll("contact_phone","")},countShow:!1,value:this.state.model.contact_phone,placeholder:"\u8bf7\u8f93\u5165\u8054\u7cfb\u4eba\u624b\u673a\u53f7",labelWidth:"0px",maxLength:11,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:ei,lineNumber:627,columnNumber:15},this),Object(h.jsxDEV)(u.a,{onClick:()=>this.addfieldArr(),children:"\u6dfb\u52a0\u53f7\u7801"},void 0,!1,{fileName:ei,lineNumber:643,columnNumber:15},this)]},void 0,!0,{fileName:ei,lineNumber:626,columnNumber:13},this)},void 0,!1,{fileName:ei,lineNumber:625,columnNumber:11},this),1==this.state.phoneSwitch[0]?Object(h.jsxDEV)(s.a,{labelname:"\u8054\u7cfb\u4eba\u624b\u673a\u53f71",prop:"phone1",id:"phone1",children:Object(h.jsxDEV)("div",{className:"phonet",children:[Object(h.jsxDEV)(n.a,{onChange:e=>{this.onSetAll("phone1",e),$t.a.emit("input","phone1",e)},onClearItem:e=>{this.onSetAll("phone1","")},countShow:!1,value:this.state.model.phone1,placeholder:"\u8bf7\u8f93\u5165\u8054\u7cfb\u4eba\u624b\u673a\u53f7",labelWidth:"0px",maxLength:11,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:ei,lineNumber:650,columnNumber:17},this),Object(h.jsxDEV)(u.a,{type:"danger",onClick:e=>{this.onSetAll("phone1","");let t=this.state.phoneSwitch;t[0]=!1,this.setState({phoneSwitch:t});let i=this.state.phone_nums-1;this.setState({phone_nums:i})},children:"\u5220\u9664\u6b64\u9879"},void 0,!1,{fileName:ei,lineNumber:667,columnNumber:17},this)]},void 0,!0,{fileName:ei,lineNumber:649,columnNumber:15},this)},void 0,!1,{fileName:ei,lineNumber:648,columnNumber:13},this):null,1==this.state.phoneSwitch[1]?Object(h.jsxDEV)(s.a,{labelname:"\u8054\u7cfb\u4eba\u624b\u673a\u53f72",prop:"phone2",id:"phone2",children:Object(h.jsxDEV)("div",{className:"phonet",children:[Object(h.jsxDEV)(n.a,{onChange:e=>{this.onSetAll("phone2",e),$t.a.emit("input","phone2",e)},onClearItem:e=>{this.onSetAll("phone2","")},countShow:!1,value:this.state.model.phone2,placeholder:"\u8bf7\u8f93\u5165\u8054\u7cfb\u4eba\u624b\u673a\u53f7",labelWidth:"0px",maxLength:11,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:ei,lineNumber:686,columnNumber:17},this),Object(h.jsxDEV)(u.a,{type:"danger",onClick:e=>{this.onSetAll("phone2","");let t=this.state.phoneSwitch;t[1]=!1,this.setState({phoneSwitch:t});let i=this.state.phone_nums-1;this.setState({phone_nums:i})},children:"\u5220\u9664\u6b64\u9879"},void 0,!1,{fileName:ei,lineNumber:703,columnNumber:17},this)]},void 0,!0,{fileName:ei,lineNumber:685,columnNumber:15},this)},void 0,!1,{fileName:ei,lineNumber:684,columnNumber:13},this):null,1==this.state.phoneSwitch[2]?Object(h.jsxDEV)(s.a,{labelname:"\u8054\u7cfb\u4eba\u624b\u673a\u53f73",prop:"phone3",id:"phone3",children:Object(h.jsxDEV)("div",{className:"phonet",children:[Object(h.jsxDEV)(n.a,{onChange:e=>{this.onSetAll("phone3",e),$t.a.emit("input","phone3",e)},onClearItem:e=>{this.onSetAll("phone3","")},countShow:!1,value:this.state.model.phone3,placeholder:"\u8bf7\u8f93\u5165\u8054\u7cfb\u4eba\u624b\u673a\u53f7",labelWidth:"0px",maxLength:11,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:ei,lineNumber:722,columnNumber:17},this),Object(h.jsxDEV)(u.a,{type:"danger",onClick:e=>{this.onSetAll("phone3","");let t=this.state.phoneSwitch;t[2]=!1,this.setState({phoneSwitch:t});let i=this.state.phone_nums-1;this.setState({phone_nums:i})},children:"\u5220\u9664\u6b64\u9879"},void 0,!1,{fileName:ei,lineNumber:739,columnNumber:17},this)]},void 0,!0,{fileName:ei,lineNumber:721,columnNumber:15},this)},void 0,!1,{fileName:ei,lineNumber:720,columnNumber:13},this):null,1==this.state.phoneSwitch[3]?Object(h.jsxDEV)(s.a,{labelname:"\u8054\u7cfb\u4eba\u624b\u673a\u53f74",prop:"phone4",id:"phone4",children:Object(h.jsxDEV)("div",{className:"phonet",children:[Object(h.jsxDEV)(n.a,{onChange:e=>{this.onSetAll("phone4",e),$t.a.emit("input","phone4",e)},onClearItem:e=>{this.onSetAll("phone4","")},countShow:!1,value:this.state.model.phone4,placeholder:"\u8bf7\u8f93\u5165\u8054\u7cfb\u4eba\u624b\u673a\u53f7",labelWidth:"0px",maxLength:11,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:ei,lineNumber:758,columnNumber:17},this),Object(h.jsxDEV)(u.a,{type:"danger",onClick:e=>{this.onSetAll("phone4","");let t=this.state.phoneSwitch;t[3]=!1,this.setState({phoneSwitch:t});let i=this.state.phone_nums-1;this.setState({phone_nums:i})},children:"\u5220\u9664\u6b64\u9879"},void 0,!1,{fileName:ei,lineNumber:775,columnNumber:17},this)]},void 0,!0,{fileName:ei,lineNumber:757,columnNumber:15},this)},void 0,!1,{fileName:ei,lineNumber:756,columnNumber:13},this):null,Object(h.jsxDEV)(s.a,{labelname:"\u8054\u7cfb\u4eba\u90ae\u7bb1",prop:"contacts_email",id:"contacts_email",children:Object(h.jsxDEV)("div",{className:"phonet",children:[Object(h.jsxDEV)(n.a,{onChange:e=>{this.onSetAll("contact_email",e)},onClearItem:e=>{this.onSetAll("contact_email","")},countShow:!1,value:this.state.model.contact_email,placeholder:"\u8bf7\u8f93\u5165\u8054\u7cfb\u4eba\u90ae\u7bb1",labelWidth:"0px",maxLength:50,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:ei,lineNumber:794,columnNumber:15},this),Object(h.jsxDEV)(u.a,{onClick:()=>this.addEmailArr(),children:"\u6dfb\u52a0\u90ae\u7bb1"},void 0,!1,{fileName:ei,lineNumber:811,columnNumber:15},this)]},void 0,!0,{fileName:ei,lineNumber:793,columnNumber:13},this)},void 0,!1,{fileName:ei,lineNumber:792,columnNumber:11},this),1==this.state.emailSwitch[0]?Object(h.jsxDEV)(s.a,{labelname:"\u8054\u7cfb\u4eba\u90ae\u7bb11",prop:"email1",id:"email1",children:Object(h.jsxDEV)("div",{className:"phonet",children:[Object(h.jsxDEV)(n.a,{onChange:e=>{this.onSetAll("email1",e),$t.a.emit("input","email1",e)},onClearItem:e=>{this.onSetAll("email1","")},countShow:!1,value:this.state.model.email1,placeholder:"\u8bf7\u8f93\u5165\u8054\u7cfb\u4eba\u90ae\u7bb1",labelWidth:"0px",maxLength:50,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:ei,lineNumber:817,columnNumber:17},this),Object(h.jsxDEV)(u.a,{type:"danger",onClick:e=>{this.onSetAll("email1","");let t=this.state.emailSwitch;t[0]=!1,this.setState({emailSwitch:t})},children:"\u5220\u9664\u6b64\u9879"},void 0,!1,{fileName:ei,lineNumber:834,columnNumber:17},this)]},void 0,!0,{fileName:ei,lineNumber:816,columnNumber:15},this)},void 0,!1,{fileName:ei,lineNumber:815,columnNumber:13},this):null,1==this.state.emailSwitch[1]?Object(h.jsxDEV)(s.a,{labelname:"\u8054\u7cfb\u4eba\u90ae\u7bb12",prop:"email2",id:"email2",children:Object(h.jsxDEV)("div",{className:"phonet",children:[Object(h.jsxDEV)(n.a,{onChange:e=>{this.onSetAll("email2",e),$t.a.emit("input","email2",e)},onClearItem:e=>{this.onSetAll("email2",e)},countShow:!1,value:this.state.model.email2,placeholder:"\u8bf7\u8f93\u5165\u8054\u7cfb\u4eba\u90ae\u7bb1",labelWidth:"0px",maxLength:50,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:ei,lineNumber:851,columnNumber:17},this),Object(h.jsxDEV)(u.a,{type:"danger",onClick:e=>{this.onSetAll("email2","");let t=this.state.emailSwitch;t[1]=!1,this.setState({emailSwitch:t})},children:"\u5220\u9664\u6b64\u9879"},void 0,!1,{fileName:ei,lineNumber:868,columnNumber:17},this)]},void 0,!0,{fileName:ei,lineNumber:850,columnNumber:15},this)},void 0,!1,{fileName:ei,lineNumber:849,columnNumber:13},this):null,1==this.state.emailSwitch[2]?Object(h.jsxDEV)(s.a,{labelname:"\u8054\u7cfb\u4eba\u90ae\u7bb13",prop:"email3",id:"email3",children:Object(h.jsxDEV)("div",{className:"phonet",children:[Object(h.jsxDEV)(n.a,{onChange:e=>{this.onSetAll("email3",e),$t.a.emit("input","email3",e)},onClearItem:e=>{this.onSetAll("email3","")},countShow:!1,value:this.state.model.email3,placeholder:"\u8bf7\u8f93\u5165\u8054\u7cfb\u4eba\u90ae\u7bb1",labelWidth:"0px",maxLength:50,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:ei,lineNumber:885,columnNumber:17},this),Object(h.jsxDEV)(u.a,{type:"danger",onClick:e=>{this.onSetAll("email3","");let t=this.state.emailSwitch;t[2]=!1,this.setState({emailSwitch:t})},children:"\u5220\u9664\u6b64\u9879"},void 0,!1,{fileName:ei,lineNumber:902,columnNumber:17},this)]},void 0,!0,{fileName:ei,lineNumber:884,columnNumber:15},this)},void 0,!1,{fileName:ei,lineNumber:883,columnNumber:13},this):null,1==this.state.emailSwitch[3]?Object(h.jsxDEV)(s.a,{labelname:"\u8054\u7cfb\u4eba\u90ae\u7bb14",prop:"email4",id:"email4",children:Object(h.jsxDEV)("div",{className:"phonet",children:[Object(h.jsxDEV)(n.a,{onChange:e=>{this.onSetAll("email4",e),$t.a.emit("input","email4",e)},onClearItem:e=>{this.onSetAll("email4","")},countShow:!1,value:this.state.model.email4,placeholder:"\u8bf7\u8f93\u5165\u8054\u7cfb\u4eba\u90ae\u7bb1",labelWidth:"0px",maxLength:50,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:ei,lineNumber:919,columnNumber:17},this),Object(h.jsxDEV)(u.a,{type:"danger",onClick:e=>{this.onSetAll("email4","");let t=this.state.emailSwitch;t[3]=!1,this.setState({emailSwitch:t})},children:"\u5220\u9664\u6b64\u9879"},void 0,!1,{fileName:ei,lineNumber:936,columnNumber:17},this)]},void 0,!0,{fileName:ei,lineNumber:918,columnNumber:15},this)},void 0,!1,{fileName:ei,lineNumber:917,columnNumber:13},this):null,Object(h.jsxDEV)(s.a,{prop:"sale",labelname:"\u9500\u552e\u4eba\u5458",id:"sale",children:Object(h.jsxDEV)(X.a,{options:this.state.personnelList,clearable:!0,placeholder:"\u8bf7\u9009\u62e9\u9500\u552e\u4eba\u5458",value:this.state.model.salesman_id,onChange:e=>{this.onSetAll("salesman_id",e),$t.a.emit("change","sale",e)},popupWidth:"360px",width:"520px"},void 0,!1,{fileName:ei,lineNumber:951,columnNumber:13},this)},void 0,!1,{fileName:ei,lineNumber:950,columnNumber:11},this),Object(h.jsxDEV)(s.a,{prop:"identity",labelname:"\u8eab\u4efd\u7c7b\u578b",id:"identity",children:Object(h.jsxDEV)(X.a,{options:this.state.identityType,clearable:!0,placeholder:"\u8bf7\u9009\u62e9\u8eab\u4efd\u7c7b\u578b",value:this.state.model.identity_type,onChange:e=>{this.onSetAll("identity_type",e),$t.a.emit("change","identity",e)},popupWidth:"360px",width:"520px"},void 0,!1,{fileName:ei,lineNumber:965,columnNumber:13},this)},void 0,!1,{fileName:ei,lineNumber:964,columnNumber:11},this),Object(h.jsxDEV)(s.a,{prop:"sign",labelname:"\u7b7e\u7ea6\u516c\u53f8",id:"sign",children:Object(h.jsxDEV)(X.a,{options:this.state.companyList,clearable:!0,placeholder:"\u8bf7\u9009\u62e9\u7b7e\u7ea6\u516c\u53f8",value:this.state.model.company_id,onChange:e=>{this.onSetAll("company_id",e),$t.a.emit("change","sign",e)},popupWidth:"520px",width:"520px"},void 0,!1,{fileName:ei,lineNumber:979,columnNumber:13},this)},void 0,!1,{fileName:ei,lineNumber:978,columnNumber:11},this),Object(h.jsxDEV)(s.a,{prop:"direct_reseller_id",labelname:"\u6620\u5c04\u5206\u9500\u5546",id:"direct_reseller_id",children:[Object(h.jsxDEV)(Xt,{options:this.state.directList,clearable:!0,page:this.state.page,placeholder:"\u8bf7\u9009\u62e9\u6620\u5c04\u5206\u9500\u5546",value:this.state.model.direct_reseller_id,onChangePage:this.onChangePageSelect.bind(this),disabled:this.state.isSelectDirect,keyword:this.state.keyword,onKeywordChange:this.onKeywordChange.bind(this),onChange:e=>{this.onDirectChange(e),$t.a.emit("change","direct_reseller_id",e)},width:"520px"},void 0,!1,{fileName:ei,lineNumber:994,columnNumber:13},this),Object(h.jsxDEV)("p",{className:"tip-reseller",children:"\u63d0\u793a\uff1a\u6620\u5c04\u5206\u9500\u5546\u4fdd\u5b58\u540e\u4e0d\u53ef\u7f16\u8f91\uff0c\u8bf7\u8c28\u614e\u9009\u62e9\uff01"},void 0,!1,{fileName:ei,lineNumber:1010,columnNumber:13},this)]},void 0,!0,{fileName:ei,lineNumber:993,columnNumber:11},this)]},void 0,!0,{fileName:ei,lineNumber:501,columnNumber:9},this),Object(h.jsxDEV)("div",{className:"mypic",children:[Object(h.jsxDEV)("b",{children:"\u5206\u9500\u5546\u5934\u50cf"},void 0,!1,{fileName:ei,lineNumber:1014,columnNumber:11},this),Object(h.jsxDEV)("div",{className:"changepic dflexac",children:this.state.defaultFileList[0].src.includes("lsxd")?Object(h.jsxDEV)(gt.a,{className:"zent-image-upload-demo",maxSize:512e3,tips:"\u5efa\u8bae\u5c3a\u5bf8 80*80\uff0c\u56fe\u7247\u4e0d\u8d85\u8fc7 500kb",maxAmount:1,onChange:e=>{this.onUploadChange(e)},onUpload:this.onUpload,defaultFileList:this.state.defaultFileList,onError:this.onUploadError},void 0,!1,{fileName:ei,lineNumber:1017,columnNumber:15},this):Object(h.jsxDEV)(gt.a,{className:"zent-image-upload-demo",maxSize:512e3,tips:"\u5efa\u8bae\u5c3a\u5bf8 80*80\uff0c\u56fe\u7247\u4e0d\u8d85\u8fc7 500kb",maxAmount:1,onChange:e=>{this.onUploadChange(e)},onUpload:this.onUpload,onError:this.onUploadError},void 0,!1,{fileName:ei,lineNumber:1030,columnNumber:15},this)},void 0,!1,{fileName:ei,lineNumber:1015,columnNumber:11},this)]},void 0,!0,{fileName:ei,lineNumber:1013,columnNumber:9},this)]},void 0,!0,{fileName:ei,lineNumber:500,columnNumber:7},this)}}i(222);var si="/Users/zhangds/web/blue-brother/frontend/src/pages/distributor/add/add.js";class li extends m.a.Component{constructor(e){super(e),this.state={enumer:0}}activeFn(){let e=this.refs.disbutorForm.submit(),t=this.refs.disbutorForm.state.model,i=this;e?G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:0==i.state.enumer?Object(h.jsxDEV)("p",{children:["\u662f\u5426\u65b0\u589e",Object(h.jsxDEV)("b",{children:["[",t.name,"]"]},void 0,!0,{fileName:si,lineNumber:30,columnNumber:19},this),"\u5206\u9500\u5546\uff1f"]},void 0,!0,{fileName:si,lineNumber:29,columnNumber:13},this):Object(h.jsxDEV)("p",{children:["\u662f\u5426\u4fee\u6539",Object(h.jsxDEV)("b",{children:["[",t.name,"]"]},void 0,!0,{fileName:si,lineNumber:34,columnNumber:19},this),"\u5206\u9500\u5546\u4fe1\u606f\uff1f"]},void 0,!0,{fileName:si,lineNumber:33,columnNumber:13},this),onConfirm:()=>{let e=Object(de.a)(t);i.refs.disbutorForm.state.headImg&&(e.head_img=i.refs.disbutorForm.state.headImg),e.salesman_id=t.salesman_id.key,e.salesman_name=t.salesman_id.text,e.company_id=t.company_id.key,e.company_name=t.company_id.text,e.identity_type=t.identity_type.key;let s=[t.contact_phone];s.push(e.phone1),s.push(e.phone2),s.push(e.phone3),s.push(e.phone4);let l=s.filter((e=>e));e.contact_phone=l.join(",");let n=[t.contact_email];n.push(e.email1),n.push(e.email2),n.push(e.email3),n.push(e.email4);let r=n.filter((e=>e));if(e.contact_email=r.join(","),e=Object(o.a)(e,["phone1","phone2","phone3","phone4","email1","email2","email3","email4"]),e.direct_reseller_id=t.direct_reseller_id.key,0==i.state.enumer)Object(a.jc)(e).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.clear(),c.a.success(t),setTimeout((()=>{window.location.replace("#/home/distributor-list")}),1e3)}),(e=>{c.a.error(e)}))})).catch((e=>{}));else{let t=i.refs.disbutorForm.state.id;delete e.account,delete e.password,e.head=i.state.headImg,Object(a.Fc)(t,e).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.clear(),c.a.success(t),setTimeout((()=>{window.location.replace("#/home/distributor-list")}),1e3)}),(e=>{c.a.error(e)}))})).catch((e=>{}))}},onCancel:this.onCancel,className:"questModal",parentComponent:this}):(c.a.clear(),c.a.error("\u8bf7\u5b8c\u5584\u8868\u5355\u6570\u636e"))}componentWillMount(){let e=JSON.parse(sessionStorage.getItem("breaknav"))[0].pagetitle,t=e.includes("\u65b0\u5efa")?0:1;this.setState({pagetitle:e+"\u5206\u9500\u5546",enumer:t})}cancel(){G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:"\u662f\u5426\u53d6\u6d88\u672c\u6b21\u64cd\u4f5c\uff1f"},void 0,!1,{fileName:si,lineNumber:138,columnNumber:16},this),onConfirm:()=>{window.location.replace("#/home/distributor-list")},onCancel:this.onCancel,className:"questModal",parentComponent:this})}render(){return Object(h.jsxDEV)("div",{className:"maincenter",children:[Object(h.jsxDEV)(d.a,{style:{width:"100%"},title:this.state.pagetitle,children:Object(h.jsxDEV)("div",{className:"adddistributor",children:Object(h.jsxDEV)(ai,{ref:"disbutorForm",enumer:this.state.enumer},void 0,!1,{fileName:si,lineNumber:153,columnNumber:13},this)},void 0,!1,{fileName:si,lineNumber:152,columnNumber:11},this)},void 0,!1,{fileName:si,lineNumber:151,columnNumber:9},this),Object(h.jsxDEV)("div",{className:"distributorbtn",children:[Object(h.jsxDEV)(u.a,{type:"primary",onClick:this.activeFn.bind(this),children:"\u63d0\u4ea4"},void 0,!1,{fileName:si,lineNumber:157,columnNumber:11},this),Object(h.jsxDEV)(u.a,{type:"normal",onClick:this.cancel.bind(this),children:"\u53d6\u6d88"},void 0,!1,{fileName:si,lineNumber:160,columnNumber:11},this)]},void 0,!0,{fileName:si,lineNumber:156,columnNumber:9},this)]},void 0,!0,{fileName:si,lineNumber:150,columnNumber:7},this)}}i(223),i(224);var ni=i(517),oi=(i(225),i(444)),ri="/Users/zhangds/web/blue-brother/frontend/src/components/menu/main.js";class mi extends m.a.Component{constructor(e){super(e),this.state={checkVisble:!0,visible:e.visible,data:e.data}}componentDidUpdate(e,t){e.data.length!==t.data.length&&this.setState({data:e.data})}clearAllCheck(){}clearIndexCheck(e){let t=Object(oi.a)(this.props.data,(function(t){return t.id==e}));this.state.data[t].check=!1,this.setState({data:this.state.data})}checkChange(e,t){e.stopPropagation(),e.nativeEvent.stopImmediatePropagation();let i=[];if(this.props.multiple)i=this.state.data;else{for(let e=0;eObject(h.jsxDEV)("div",{className:e.check?"menu-item active":"menu-item",onClick:t=>{this.checkChange(t,e.id)},children:[Object(h.jsxDEV)("div",{className:"check-box",children:e.check?Object(h.jsxDEV)(g.a,{type:"check",className:"check-icon"},void 0,!1,{fileName:ri,lineNumber:86,columnNumber:31},this):null},void 0,!1,{fileName:ri,lineNumber:85,columnNumber:15},this),Object(h.jsxDEV)("div",{className:"menu-name",children:[" ",e.name]},void 0,!0,{fileName:ri,lineNumber:88,columnNumber:15},this)]},t,!0,{fileName:ri,lineNumber:78,columnNumber:13},this)))},void 0,!1,{fileName:ri,lineNumber:75,columnNumber:7},this):null}}i(226);var ci="/Users/zhangds/web/blue-brother/frontend/src/components/filterSelect/main.js";class di extends m.a.Component{constructor(e){super(e);let t=Object(f.a)(e.data.menuList,(e=>(e.check=!1,e)));this.state={id:e.data.id,label:e.data.label,selectedMenu:e.data.menuList[0],multiple:!1|e.multiple,menuList:t,visible:!0,menuShow:!0,propName:e.data.prop,selectList:[],text:""}}onHandlerClick(){let e=!this.state.menuShow;this.setState({menuShow:e})}mouseLeaveFn(){this.setState({menuShow:!1})}mouseMenuFn(){this.setState({menuShow:!0})}onMenuClick(e,t){if(this.state.multiple){let e=Object(de.a)(this.state.selectList);e.includes(t)?e=e.filter((e=>e!=t)):e.push(t),this.setState({selectList:e});let i=Object(_.a)(this.state.menuList,(function(t){return e.includes(t.id)})),a=i.map((e=>e.id)),s=i.map((e=>e.name));this.props.selectFn(a,this.state.propName),this.setState({text:s.join(",")})}else{let e=Object(ni.a)(this.state.menuList,(function(e){return e.id==t}));this.setState({selectedMenu:e}),this.setState({text:e.name}),this.props.selectFn(t,this.state.propName),this.setState({menuShow:!1})}}onMenuHide(){this.setState({menuShow:!1})}onselectFn(e){}onClose(e,t){this.props.onClose(e,this.state.id,this.state.propName);let i=Object(f.a)(this.state.menuList,(e=>(e.check=!1,e)));this.setState({menuList:i})}componentDidMount(){window.document.addEventListener("click",(()=>{this.setState({menuShow:!1})}))}render(){return Object(h.jsxDEV)("div",{className:"filterComponent",children:[Object(h.jsxDEV)("div",{className:"filterSelect",children:Object(h.jsxDEV)("span",{className:"filter-item",onClick:()=>{this.onHandlerClick()},onMouseEnter:()=>this.mouseMenuFn(),children:[Object(h.jsxDEV)("span",{className:"filter-label",children:this.state.label},void 0,!1,{fileName:ci,lineNumber:98,columnNumber:13},this),Object(h.jsxDEV)("span",{className:"filter-maohao",children:":"},void 0,!1,{fileName:ci,lineNumber:99,columnNumber:13},this),Object(h.jsxDEV)("span",{className:"filter-placeholder",children:this.state.text||"\u8bf7\u9009\u62e9"},void 0,!1,{fileName:ci,lineNumber:100,columnNumber:13},this),Object(h.jsxDEV)(g.a,{type:"down",className:"icon-down-arrow"},void 0,!1,{fileName:ci,lineNumber:101,columnNumber:13},this),Object(h.jsxDEV)(g.a,{type:"close",className:"icon-del",onClick:e=>{this.onClose(e,this.state.id)}},void 0,!1,{fileName:ci,lineNumber:102,columnNumber:13},this)]},void 0,!0,{fileName:ci,lineNumber:90,columnNumber:11},this)},void 0,!1,{fileName:ci,lineNumber:89,columnNumber:9},this),this.state.menuShow?Object(h.jsxDEV)("div",{onMouseLeave:()=>this.mouseLeaveFn(),children:Object(h.jsxDEV)(mi,{onItemClick:(e,t)=>{this.onMenuClick(e,t)},className:"menu",ref:"menu",data:this.state.menuList,multiple:this.state.multiple,visible:this.state.menuShow,selectFn:e=>{this.onselectFn(e)},onClose:()=>{this.onMenuHide()}},void 0,!1,{fileName:ci,lineNumber:114,columnNumber:13},this)},void 0,!1,{fileName:ci,lineNumber:113,columnNumber:11},this):null]},void 0,!0,{fileName:ci,lineNumber:88,columnNumber:7},this)}}var ui="/Users/zhangds/web/blue-brother/frontend/src/components/filterbar/main.js";class hi extends m.a.Component{constructor(e){super(e),this.state={filterList:e.filterList,menuList:e.menuList,showItemList:[],menuShow:!1,multiple:!1|e.multiple},this.hideMenu=this.hideMenu.bind(this),this.onselectFn=this.onselectFn.bind(this)}componentDidMount(){document.addEventListener("click",this.hideMenu)}componentWillUnmount(){document.removeEventListener("click",this.hideMenu,!1)}componentDidUpdate(e,t){e.menuList.length!==t.menuList.length&&(t.menuList.map((t=>{e.menuList.map((e=>{t.id==e.id&&(e.check=t.check)}))})),this.setState({menuList:e.menuList}))}onCloseSelect(e,t,i){this.removeItem(e,t,i),this.refs.menu.clearIndexCheck(t),this.props.onClose(i)}removeItem(e,t,i){this.state.showItemList.forEach(((e,a,s)=>{e.id===t&&(this.props.onClose(i),delete this.state.showItemList[a])})),this.setState({showItemList:this.state.showItemList})}addItem(e){e.nativeEvent.stopImmediatePropagation(),this.setState({menuShow:!this.state.menuShow})}onselectFn(e,t){this.props.selectFn(e,t)}onMenuClick(e,t){let i=Object(ni.a)(this.state.filterList,(function(e){return e.id==t}));this.state.showItemList.indexOf(i)<0?this.state.showItemList.push(i):this.removeItem(e,t,i.prop),this.setState({showItemList:this.state.showItemList}),this.setState({menuShow:!1})}onSelect(e){this.props.onSelect(e)}hideMenu(e,t){this.setState({menuShow:!1})}onClose(){this.setState({menuShow:!1});let e=Object(f.a)(this.state.menuList,(e=>(e.check=!1,e)));this.setState({menuList:e})}render(){return Object(h.jsxDEV)("div",{className:"filterbar",children:[Object(h.jsxDEV)(g.a,{type:"filter-o",className:"filter-icon"},void 0,!1,{fileName:ui,lineNumber:104,columnNumber:9},this),this.state.showItemList.map(((e,t)=>Object(h.jsxDEV)(di,{data:e,selectFn:(e,t)=>{this.onselectFn(e,t)},multiple:this.state.multiple,onClose:(e,t,i)=>{this.onCloseSelect(e,t,i)}},t,!1,{fileName:ui,lineNumber:107,columnNumber:13},this))),Object(h.jsxDEV)("div",{className:this.state.menuShow?"add-filter active":"add-filter",onClick:e=>this.addItem(e),children:[Object(h.jsxDEV)(g.a,{type:"plus"},void 0,!1,{fileName:ui,lineNumber:124,columnNumber:11},this),"\u6dfb\u52a0\u7b5b\u9009\u9879",Object(h.jsxDEV)(mi,{onItemClick:(e,t)=>{this.onMenuClick(e,t)},className:"menu",ref:"menu",data:this.state.menuList,multiple:!0,visible:this.state.menuShow,tt:3,onClose:(e,t)=>{this.onClose(e,t)}},void 0,!1,{fileName:ui,lineNumber:126,columnNumber:11},this)]},void 0,!0,{fileName:ui,lineNumber:120,columnNumber:9},this)]},void 0,!0,{fileName:ui,lineNumber:103,columnNumber:7},this)}}var bi=i(486),pi=i(474),Ni=i(493),ji=i(162),vi="/Users/zhangds/web/blue-brother/frontend/src/pages/distributor/list/modifydispwd.js";function gi(e,t){return e!==t.getSectionValue("password").password?{name:"passwordEqual",message:"\u4e24\u6b21\u586b\u5199\u7684\u5bc6\u7801\u4e0d\u4e00\u81f4"}:null}var fi=e=>{const t=bi.a.useForm(pi.b.View),i=m.a.useCallback((t=>{const i=t.getValue();if(i){let t=Object(de.a)(i),s=e.id;Object(a.Gc)(s,t).then((t=>{Object(a.Tb)(t,((t,i)=>{c.a.clear(),c.a.success(i),e.visibleShow(!1)}),(e=>{c.a.error(e)}))})).catch((e=>{}))}}),[]);return Object(h.jsxDEV)(bi.a,{form:t,layout:"horizontal",scrollToError:!0,onSubmit:i,children:[Object(h.jsxDEV)(Ni.a,{name:"password",label:"\u65b0\u5bc6\u7801",required:!0,helpDesc:"",validators:[ji.b.required("\u8bf7\u8f93\u5165\u65b0\u5bc6\u7801"),ji.b.pattern(/^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,16}$/,"6-16\u4f4d\u5b57\u7b26,\u6570\u5b57+\u5b57\u6bcd\u7ec4\u6210\uff0c(\u5b57\u6bcd\u533a\u5206\u5927\u5c0f\u5199)")],notice:"6-16\u4f4d\u5b57\u7b26,\u6570\u5b57+\u5b57\u6bcd\u7ec4\u6210\uff0c\u5b57\u6bcd(\u533a\u5206\u5927\u5c0f\u5199)",props:{type:"password"}},void 0,!1,{fileName:vi,lineNumber:46,columnNumber:7},void 0),Object(h.jsxDEV)(Ni.a,{name:"re_password",label:"\u786e\u8ba4\u5bc6\u7801",required:!0,notice:"\u5fc5\u987b\u4e0e\u65b0\u5bc6\u7801\u8f93\u5165\u4e00\u81f4",validators:[ji.b.required("\u8bf7\u786e\u8ba4\u5bc6\u7801"),gi],props:{type:"password"}},void 0,!1,{fileName:vi,lineNumber:63,columnNumber:7},void 0),Object(h.jsxDEV)("p",{className:"dflexajce",children:[Object(h.jsxDEV)(u.a,{type:"primary",htmlType:"submit",children:"\u786e\u5b9a"},void 0,!1,{fileName:vi,lineNumber:74,columnNumber:9},void 0),",",Object(h.jsxDEV)(u.a,{onClick:()=>{e.visibleShow(!1)},children:"\u53d6\u6d88"},void 0,!1,{fileName:vi,lineNumber:77,columnNumber:10},void 0)]},void 0,!0,{fileName:vi,lineNumber:73,columnNumber:7},void 0)]},void 0,!0,{fileName:vi,lineNumber:45,columnNumber:5},void 0)},_i="/Users/zhangds/web/blue-brother/frontend/src/pages/distributor/list/list.js";const xi=[{title:"\u7f16\u53f7",name:"code",prop:"code",type:"normal",width:"20%"},{title:"\u5546\u6237\u7f16\u53f7",name:"merchant",prop:"merchant[merchant_id]",type:"normal",width:"20%"},{title:"\u5206\u9500\u5546\u540d\u79f0",prop:"name",name:"name",width:"20%",type:"normal"},{title:"\u767b\u5f55\u8d26\u53f7",name:"account",prop:"account",type:"normal",width:"20%"},{title:"\u4e3b\u4f53\u540d\u79f0",name:"subject",type:"normal",prop:"subject",width:"auto"},{title:"\u72b6\u6001",width:"20%",type:"slot",prop:"name"},{title:"\u64cd\u4f5c",prop:"opearo",name:"opearo",type:"slot",width:"20%",defaultText:0}],yi=[{title:"\u64cd\u4f5c\u4eba",name:"reseller.name",prop:"reseller.name",type:"normal",width:"33%"},{title:"\u521b\u5efa\u65f6\u95f4",prop:"create_time",name:"create_time",width:"33%",type:"normal"},{title:"\u8be6\u60c5",name:"detail",prop:"detail",type:"normal",width:"33%"}];class Oi extends m.a.Component{constructor(e){super(e),this.state={tabList:[{title:"\u5206\u9500\u5546\u5217\u8868"}],logVisible:!1,pwdVisible:!1,status:null,resellid:null,key_word:"",limit:10,page:1,total:0,resellerList:[],menuList:[{id:0,name:"\u5206\u9500\u5546\u72b6\u6001",check:!1}],filterList:[{id:0,label:"\u5206\u9500\u5546\u72b6\u6001",prop:"status",menuList:[{id:999,name:"\u5168\u90e8"},{id:1,name:"\u5f00\u542f"},{id:2,name:"\u5173\u95ed"}]}]}}clickFn(){sessionStorage.setItem("pathname2","/home/system/distributor-add");sessionStorage.setItem("breaknav",JSON.stringify([{pagetitle:"\u65b0\u5efa",items:[{path:"distributor-list",name:"\u5206\u9500\u5546\u7ba1\u7406"},{path:"distributor-add",name:"\u65b0\u5efa\u5206\u9500\u5546"}]}])),window.open("#/home/distributor-add")}delFn(e,t){let i=this;G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:["\u662f\u5426\u5220\u9664",Object(h.jsxDEV)("b",{children:["[",t.name,"]"]},void 0,!0,{fileName:_i,lineNumber:167,columnNumber:15},this),"\u5206\u9500\u5546\uff1f"]},void 0,!0,{fileName:_i,lineNumber:166,columnNumber:9},this),onConfirm:()=>{Object(a.w)(t.id).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.clear(),c.a.success(t),i.getReseller()}),(e=>{c.a.error(e)}))})).catch((e=>{}))},onCancel:this.onCancel,className:"questModal",parentComponent:this})}editFn(e,t){Object(a.vb)(t.id).then((e=>{Object(a.Tb)(e,((e,t)=>{sessionStorage.setItem("dataInfo",JSON.stringify(e)),sessionStorage.setItem("pathname2","distributor-add"),sessionStorage.getItem("distributor-data");sessionStorage.setItem("breaknav",JSON.stringify([{pagetitle:"\u7f16\u8f91",items:[{path:"distributor-list",name:"\u5206\u9500\u5546\u7ba1\u7406"},{path:"distributor-add",name:"\u7f16\u8f91\u5206\u9500\u5546"}]}])),window.open("#/home/distributor-edit")}),(e=>{c.a.error(e)}))})).catch((e=>{}))}openInformation(e){sessionStorage.setItem("merchant",JSON.stringify(e)),sessionStorage.setItem("pathname2","distributor-merchant");sessionStorage.setItem("breaknav",JSON.stringify([{pagetitle:"\u7f16\u8f91",items:[{path:"distributor-list",name:"\u5206\u9500\u5546\u7ba1\u7406"},{path:"distributor-merchant",name:"\u66f4\u65b0\u5546\u6237"}]}])),sessionStorage.setItem("linkshowname","\u5206\u9500\u5546\u7ba1\u7406"),this.props.history.push("/home/distributor-merchant")}callBack(e){sessionStorage.setItem("callBackId",JSON.stringify(e.id)),sessionStorage.setItem("callBackType",JSON.stringify(1)),sessionStorage.setItem("pathname2","callback-message");let t=[{pagetitle:"\u56de\u8c03\u5730\u5740",items:[{path:"distributor-list",name:"\u5206\u9500\u5546\u4e00"+e.name},{path:"callback-message",name:"\u8bbe\u7f6e\u56de\u8c03\u901a\u77e5\u5730\u5740"}]}];sessionStorage.setItem("breaknav",JSON.stringify(t)),sessionStorage.setItem("linkshowname","\u5206\u9500\u5546\u7ba1\u7406"),this.props.history.push("/home/callback-message")}onSwitchChange(e,t){let i=this;G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:["\u662f\u5426",1==t.status?"\u505c\u7528":"\u542f\u7528",Object(h.jsxDEV)("b",{children:["[",t.name,"]"]},void 0,!0,{fileName:_i,lineNumber:287,columnNumber:11},this),"\u5206\u9500\u5546\u72b6\u6001\uff1f"]},void 0,!0,{fileName:_i,lineNumber:285,columnNumber:9},this),onConfirm:()=>{Object(a.Hc)(t.id,{operation:1==t.status?2:1}).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.clear(),c.a.success(t),i.getReseller()}),(e=>{c.a.error(e)}))})).catch((e=>{}))},onCancel:this.onCancel,className:"questModal",parentComponent:this})}onMenuItemClick(e,t,i){switch(Number(t)){case 1:this.setState({pwdVisible:!0,resellid:i.id});break;case 2:this.setState({logVisible:!0});break;case 3:this.openInformation(i)}}setLogVisible(e){this.setState({logVisible:!1})}setVisible(e){this.setState({pwdVisible:!1})}pageChange(e){this.setState({page:e}),setTimeout((()=>{this.getReseller()}),0)}onFilterClose(e){let t={};t[e]=null,this.setState(t)}selectedId(e,t){let i={};i[t]=999==e?null:e,this.setState(i)}countChange(e){this.setState({page:1,limit:e}),setTimeout((()=>{this.getReseller()}),0)}sureFn(){this.setState({page:1}),setTimeout((()=>{this.getReseller()}),300)}getReseller(){let e=this,{page:t,limit:i,key_word:s,status:l}=e.state,n={page:t,limit:i};s&&(n.key_word=s),l&&(n.status=l),Object(a.wb)(n).then((t=>{Object(a.Tb)(t,((t,i)=>{const a=t.data,{total:s}=t;e.setState({resellerList:a,total:s})}),(e=>{c.a.error(e)}))})).catch((e=>{}))}componentWillMount(){this.getReseller()}componentDidUpdate(e,t){t.key_word==this.state.key_word||this.state.key_word||this.getReseller(),t.status!=this.state.status&&this.getReseller()}render(){const{current:e,pageSize:t}=this.state;return Object(h.jsxDEV)("div",{id:"dislist",children:Object(h.jsxDEV)(Ft,{tabs:this.state.tabList,children:[Object(h.jsxDEV)("div",{className:"distable dflexj",children:[Object(h.jsxDEV)(u.a,{type:"primary",icon:"plus",onClick:this.clickFn.bind(this),children:"\u65b0\u5efa\u5206\u9500\u5546"},void 0,!1,{fileName:_i,lineNumber:428,columnNumber:13},this),Object(h.jsxDEV)(n.a,{onClearItem:e=>{this.setState({key_word:""})},wordSearch:this.sureFn.bind(this),onChange:e=>this.setState({key_word:e}),value:this.state.key_word,icon:"search",placeholder:"\u8bf7\u8f93\u5165\u5206\u9500\u5546\u540d\u79f0\u3001\u767b\u5f55\u8d26\u53f7\u3001\u8054\u7cfb\u4eba\u3001\u624b\u673a\u53f7\u8fdb\u884c\u641c\u7d22",countShow:!1,height:"36px",width:"260px",alignment:"left"},void 0,!1,{fileName:_i,lineNumber:432,columnNumber:13},this)]},void 0,!0,{fileName:_i,lineNumber:427,columnNumber:11},this),Object(h.jsxDEV)(hi,{onClose:e=>{this.onFilterClose(e)},selectFn:(e,t)=>{this.selectedId(e,t)},filterList:this.state.filterList,menuList:this.state.menuList},void 0,!1,{fileName:_i,lineNumber:447,columnNumber:11},this),Object(h.jsxDEV)("div",{children:[Object(h.jsxDEV)(I,{spliteColor:"#fff",tableData:this.state.resellerList,Column:xi,dataCount:this.state.total,isMultiple:!1,countbarVisible:!1,isSwitch:!1,pageChange:e=>{this.pageChange(e)},countChange:e=>{this.countChange(e)},checkChange:e=>{},ComponentHandler:(e,t)=>"name"==e?Object(h.jsxDEV)(v.a,{size:"small",checked:2!=t.status,onChange:e=>{this.onSwitchChange(e,t)}},void 0,!1,{fileName:_i,lineNumber:476,columnNumber:21},this):"opearo"==e?Object(h.jsxDEV)("span",{children:[Object(h.jsxDEV)("a",{className:"grid-link",onClick:e=>{this.editFn(e,t)},children:"\u7f16\u8f91"},void 0,!1,{fileName:_i,lineNumber:488,columnNumber:23},this),Object(h.jsxDEV)("a",{className:"grid-link",onClick:e=>{this.callBack(t)},children:"\u8bbe\u7f6e\u56de\u8c03"},void 0,!1,{fileName:_i,lineNumber:496,columnNumber:23},this),Object(h.jsxDEV)(y.a,{position:y.d.RightTop,children:[Object(h.jsxDEV)(y.b,{children:Object(h.jsxDEV)("div",{className:"linkmore",children:[" ","\u66f4\u591a ",Object(h.jsxDEV)(g.a,{type:"down"},void 0,!1,{fileName:_i,lineNumber:508,columnNumber:32},this)," "]},void 0,!0,{fileName:_i,lineNumber:506,columnNumber:27},this)},void 0,!1,{fileName:_i,lineNumber:505,columnNumber:25},this),Object(h.jsxDEV)(y.c,{children:Object(h.jsxDEV)(O.a,{onClick:(e,i)=>{this.onMenuItemClick(e,i,t)},children:[Object(h.jsxDEV)(D.a,{children:"\u91cd\u7f6e\u5bc6\u7801"},"1",!1,{fileName:_i,lineNumber:517,columnNumber:29},this),Object(h.jsxDEV)(D.a,{children:"\u66f4\u65b0\u5546\u6237"},"3",!1,{fileName:_i,lineNumber:518,columnNumber:29},this)]},void 0,!0,{fileName:_i,lineNumber:512,columnNumber:27},this)},void 0,!1,{fileName:_i,lineNumber:511,columnNumber:25},this)]},void 0,!0,{fileName:_i,lineNumber:504,columnNumber:23},this)]},void 0,!0,{fileName:_i,lineNumber:487,columnNumber:21},this):void 0},void 0,!1,{fileName:_i,lineNumber:458,columnNumber:13},this),Object(h.jsxDEV)(ce.a,{visible:this.state.pwdVisible,className:"questModal",onClose:()=>this.setVisible(!1),title:"\u91cd\u7f6e\u5bc6\u7801",children:Object(h.jsxDEV)("div",{children:Object(h.jsxDEV)(fi,{visibleShow:e=>this.setVisible(e),id:this.state.resellid},void 0,!1,{fileName:_i,lineNumber:535,columnNumber:17},this)},void 0,!1,{fileName:_i,lineNumber:534,columnNumber:15},this)},void 0,!1,{fileName:_i,lineNumber:528,columnNumber:13},this),Object(h.jsxDEV)(ce.a,{visible:this.state.logVisible,onClose:()=>this.setLogVisible(!1),footer:Object(h.jsxDEV)(u.a,{onClick:()=>this.setLogVisible(!1),style:{width:"100px"},children:"\u5173\u95ed"},void 0,!1,{fileName:_i,lineNumber:546,columnNumber:17},this),title:"\u65e5\u5fd7",style:{width:"60%"},children:Object(h.jsxDEV)(I,{spliteColor:"#fff",tableData:this.state.distdata2,Column:yi,isMultiple:!1,isShowPageBar:!1,countbarVisible:!1,isSwitch:!1,pageChange:e=>{this.pageChange(e)},checkChange:e=>{},ComponentHandler:(e,t)=>{}},void 0,!1,{fileName:_i,lineNumber:553,columnNumber:15},this)},void 0,!1,{fileName:_i,lineNumber:542,columnNumber:13},this)]},void 0,!0,{fileName:_i,lineNumber:457,columnNumber:11},this)]},void 0,!0,{fileName:_i,lineNumber:426,columnNumber:9},this)},void 0,!1,{fileName:_i,lineNumber:425,columnNumber:7},this)}}var Di=i(503),Ei=i(288),Vi=(i(232),"/Users/zhangds/web/blue-brother/frontend/src/pages/distributor/merchant/index.jsx");var ki=i(518),Si=(i(233),"/Users/zhangds/web/blue-brother/frontend/src/pages/exchangecode/commodity/commodity.js");const wi=[{title:"\u5546\u54c1\u7f16\u53f7",name:"product_id",prop:"product_id",className:"name",type:"normal",width:"auto"},{title:"\u5546\u54c1\u540d\u79f0",prop:"product_name",name:"product_name",width:"auto",type:"normal"},{title:"\u5e73\u53f0\u6279\u6b21\u53f7",width:"auto",prop:"channel_activity_id",name:"channel_activity_id",type:"normal"},{title:"\u4e0a\u6e38\u5e73\u53f0",width:"auto",prop:"upstream",name:"upstream",type:"normal"},{title:"\u5546\u54c1\u6743\u91cd",width:"auto",prop:"weight",name:"weight",type:"normal"},{title:"\u6709\u6548\u65f6\u95f4\u6bb5",width:"auto",prop:"effectDate",name:"effectDate",type:"normal"},{title:"\u5b98\u65b9\u4ef7\u683c",name:"official_price",prop:"official_price",type:"normal",width:"auto"},{title:"\u5408\u540c\u4ef7",name:"contract_price",type:"normal",prop:"contract_price",width:"auto"},{title:"\u521b\u5efa\u65f6\u95f4",name:"create_time",type:"normal",prop:"create_time",width:"auto"},{title:"\u7c7b\u578b",name:"product_type_text",type:"normal",prop:"product_type_text",width:"auto"},{title:"\u64cd\u4f5c",prop:"opearo",name:"opearo",type:"slot",width:"200px"}];class Ci extends m.a.Component{constructor(e){super(e),this.state={dataCount:0,page:1,tabList:[{title:"\u5546\u54c1\u8303\u56f4\u5217\u8868"}],tableData:[],selectionData:[],isCombining:sessionStorage.getItem("isCombining"),limit:10,tableHeight:500,contractPrice:0,totalPrice:0}}onPageChange(e){let t={code_batch_id:sessionStorage.getItem("code_id"),page:e,limit:this.state.limit};this.getTableList(t)}componentDidMount(e){let t={code_batch_id:sessionStorage.getItem("code_id"),page:1,limit:10};this.getTableList(t)}getTableList(e){Object(a.R)(e).then((e=>{Object(a.Tb)(e,((e,t)=>{const i=[];e.data.map((e=>{if(1===e.type)e.entity.upstream="\u76f4\u8fde\u5929\u4e0b",e.entity.weight=e.weight,e.entity.product_id=e.entity.goods_id,i.push(e.entity);else if(2===e.type)i.push({product_id:e.entity.goods_id,product_type_text:"\u7acb\u51cf\u91d1",upstream:P(e.entity.channel),contract_price:e.entity.price,create_time:e.entity.create_time,official_price:e.entity.reduce_amount,channel_activity_id:e.entity.channel_activity_id,product_name:e.entity.batch_goods_name,weight:e.weight,effectDate:e.entity.time_limit.effect_time.start_time+" \u81f3 "+e.entity.time_limit.effect_time.end_time});else{const t="1"===e.entity.cash_amount_type?e.entity.denomination:`${e.entity.min_denomination}~${e.entity.max_denomination}`;i.push({product_id:e.entity.goods_id,product_type_text:"2"===e.entity.cash_amount_type?"\u968f\u673a\u7ea2\u5305":"\u56fa\u989d\u7ea2\u5305",upstream:P(e.entity.channel),contract_price:(e.entity.total_contract_price/e.entity.num).toFixed(2),create_time:e.entity.create_time,official_price:t,channel_activity_id:e.entity.cash_activity_id,product_name:e.entity.batch_goods_name,weight:e.weight,effectDate:e.entity.begin_time+" \u81f3 "+e.entity.end_time})}})),this.setState({tableData:i}),this.setState({dataCount:e.total})}),(e=>{}))})).catch((e=>{}))}selection(e){this.setState({selectionData:e});let t=0,i=0;e.forEach((e=>{t+=Number(e.official_price),i+=Number(e.contract_price)})),this.setState({contractPrice:t,totalPrice:i})}deleteFn(e,t){let i=this;G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:"\u662f\u5426\u5220\u9664\u8be5\u5546\u54c1\uff1f"},void 0,!1,{fileName:Si,lineNumber:203,columnNumber:16},this),onConfirm(){Object(a.q)(t.product_id).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.clear(),c.a.success(t);let a={code_batch_id:sessionStorage.getItem("code_id"),page:i.state.page,limit:i.state.limit};i.getTableList(a)}),(e=>{c.a.error(e)}))})).catch((e=>{}))},onCancel(){},className:"questModal",parentComponent:this})}sureFn(){let e={code_batch_id:sessionStorage.getItem("code_id"),page:this.state.page,limit:this.state.limit,key_word:this.state.key_word};this.getTableList(e)}componentWillMount(){this.setState({tableHeight:window.innerHeight-430})}onCountChange(e){this.setState({page:1,limit:e}),setTimeout((()=>{this.getTableList()}),200)}render(){return Object(h.jsxDEV)("div",{id:"exchangecodeaboutlist",children:Object(h.jsxDEV)(Ft,{tabs:this.state.tabList,children:[Object(h.jsxDEV)("div",{className:"codetable dflexj",children:[Object(h.jsxDEV)("span",{},void 0,!1,{fileName:Si,lineNumber:264,columnNumber:13},this),Object(h.jsxDEV)(n.a,{icon:"search",placeholder:"\u8bf7\u8f93\u5165\u5546\u54c1\u540d\u79f0\u8fdb\u884c\u5339\u914d\u67e5\u8be2",countShow:!1,height:"36px",width:"260px",value:this.state.key_word,onChange:e=>this.setState({key_word:e}),wordSearch:this.sureFn.bind(this),alignment:"left"},void 0,!1,{fileName:Si,lineNumber:265,columnNumber:13},this)]},void 0,!0,{fileName:Si,lineNumber:263,columnNumber:11},this),Object(h.jsxDEV)("div",{},void 0,!1,{fileName:Si,lineNumber:277,columnNumber:11},this),this.state.selectionData.length>0?Object(h.jsxDEV)(ki.a,{type:"info",extraContent:Object(h.jsxDEV)(u.a,{type:"primary",onClick:()=>{const e=this.state.tableData.map((e=>(e.checked=!1,e)));this.setState({selectionData:[],tableData:e})},children:"\u6e05\u7a7a"},void 0,!1,{fileName:Si,lineNumber:282,columnNumber:17},this),children:["\u5df2\u9009\u62e9",Object(h.jsxDEV)("font",{color:"#296bef",style:{fontWeight:"bold"},children:this.state.selectionData.length},void 0,!1,{fileName:Si,lineNumber:298,columnNumber:15},this),"\u9879\uff0c\u5b98\u65b9\u4ef7\u683c\u603b\u8ba1:",this.state.contractPrice.toFixed(4),"\uff0c\u5408\u540c\u4ef7\u603b\u8ba1\uff1a",this.state.totalPrice.toFixed(4)]},void 0,!0,{fileName:Si,lineNumber:279,columnNumber:13},this):null,Object(h.jsxDEV)("div",{className:"code-table",children:Object(h.jsxDEV)(I,{isMultiple:!0,spliteColor:"#fff",dataCount:this.state.dataCount,tableData:this.state.tableData,Column:wi,countbarVisible:!1,isSwitch:!1,maxheight:this.state.tableHeight,pageChange:e=>{this.onPageChange(e)},countChange:e=>{this.onCountChange(e)},checkChange:this.selection.bind(this),ComponentHandler:(e,t)=>"status"==e?Object(h.jsxDEV)(me.a,{theme:"blue",outline:!0,children:t.status},void 0,!1,{fileName:Si,lineNumber:325,columnNumber:21},this):"opearo"==e?Object(h.jsxDEV)(h.Fragment,{children:1==this.state.isCombining?Object(h.jsxDEV)("span",{className:"grid-link",style:{color:"red"},onClick:e=>this.deleteFn(e,t),children:"\u5220\u9664"},void 0,!1,{fileName:Si,lineNumber:334,columnNumber:25},this):Object(h.jsxDEV)("span",{className:"grid-link",style:{color:"rgb(216, 219, 221)"},children:"\u5220\u9664"},void 0,!1,{fileName:Si,lineNumber:342,columnNumber:25},this)},void 0,!1):void 0},void 0,!1,{fileName:Si,lineNumber:306,columnNumber:13},this)},void 0,!1,{fileName:Si,lineNumber:305,columnNumber:11},this)]},void 0,!0,{fileName:Si,lineNumber:262,columnNumber:9},this)},void 0,!1,{fileName:Si,lineNumber:261,columnNumber:7},this)}}var Ti=i(519),Ii=i(520),Fi=i(478);i(234);const Li={code_name:[{type:"required",message:"\u8bf7\u8f93\u5165\u5151\u6362\u7801\u540d\u79f0"}],planSelect:[{type:"required",message:"\u8bf7\u9009\u62e9\u5f52\u5c5e\u8ba1\u5212"}],keyBatchSelect:[{type:"required",message:"\u8bf7\u9009\u62e9\u5f52\u5c5eKey"}],issued:[{type:"required",message:"\u8bf7\u8f93\u5165\u53d1\u653e\u603b\u91cf"}],restrict:[{type:"required",message:"\u8bf7\u8f93\u5165\u7ed1\u5b9a\u6570\u91cf"},{type:"regExp",message:"\u8bf7\u8f93\u5165\u5927\u4e8e0\u7684\u6b63\u6574\u6570",reg:"^[0-9]*[1-9][0-9]*$"}]},Hi={date_time:[{type:"required",message:"\u8bf7\u9009\u62e9\u751f\u6548\u65f6\u95f4\u6bb5"}]},qi=[{title:"\u5546\u54c1ID",name:"product_id",prop:"product_id",width:"auto",type:"normal"},{title:"\u5546\u54c1\u540d\u79f0",width:"auto",prop:"product_name",name:"product_name",type:"normal"},{title:"\u603b\u9884\u7b97",name:"all_budget",prop:"all_budget",type:"normal",width:"auto"},{title:"\u5408\u540c\u5355\u4ef7",name:"contract_price",prop:"contract_price",type:"normal",width:"auto"},{title:"\u5546\u54c1\u5b98\u65b9\u4ef7",type:"normal",prop:"official_price",width:"auto"},{title:"\u7c7b\u578b",width:"auto",prop:"type",name:"type",type:"slot"},{title:"\u4e0a\u6e38\u5e73\u53f0",width:"auto",prop:"upstream",name:"upstream",type:"normal"},{title:"\u6279\u6b21\u53f7",width:"auto",prop:"channel_activity_id",name:"channel_activity_id",type:"normal"},{title:"\u6709\u6548\u65f6\u95f4\u6bb5",width:"auto",prop:"effectDate",name:"effectDate",type:"normal"},{title:"\u5f53\u524d\u6210\u672c\u4ef7\u683c",prop:"cost_price",name:"cost_price",width:"auto",type:"slot"},{title:"\u5e93\u5b58\u603b\u6570\u91cf",prop:"quantity",name:"quantity",type:"normal",width:"auto"},{title:"\u5269\u4f59\u6570\u91cf",prop:"stock",name:"stock",type:"normal",width:"auto"},{title:"\u5df2\u4f7f\u7528\u6570\u91cf",prop:"usage",name:"usage",type:"normal",width:"auto"},{title:"\u64cd\u4f5c",prop:"edit",name:"edit",type:"slot",width:"auto"}];function Mi(e){const t={},i="1"===e.cash_amount_type?e.denomination:`${e.min_denomination}~${e.max_denomination}`;return t.product_name=e.batch_goods_name,t.channel_activity_id=e.cash_activity_id,t.cash_activity_id=e.cash_activity_id,t.only=e.cash_activity_id,t.type=3,t.checked=null===e||void 0===e?void 0:e.checked,t.upstream=P(e.channel),t.edit="edit",t.all_budget=e.all_budget,t.effectDate=e.begin_time+" \u81f3 "+e.end_time,t.contract_price=(e.total_contract_price/e.num).toFixed(2),t.cost_price=i,t.official_price=i,t.quantity=e.total_stock||e.num,t.stock=e.stock||e.num,t.usage=e.usage||0,t.id=e.goods_id||e.id,t.product_id=e.goods_id||"-",t.origin=e,t}function Pi(e){var t,i;const a=parseInt(L(e.all_budget,F(e.reduce_amount,e.send_num))),s={};return s.product_name=e.batch_goods_name||e.product_name,s.channel_activity_id=e.channel_activity_id,s.only=e.channel_activity_id,s.type=2,s.checked=null===e||void 0===e?void 0:e.checked,s.upstream=P(e.channel),s.edit="edit",s.all_budget=e.all_budget,s.effectDate=e.effectDate||(null===(t=e.time_limit)||void 0===t?void 0:t.effect_time.start_time)+" \u81f3 "+(null===(i=e.time_limit)||void 0===i?void 0:i.effect_time.end_time),s.contract_price=e.contract_price||e.price,s.official_price=e.official_price||e.reduce_amount,s.quantity=e.quantity||a,s.stock=e.stock||a,s.usage=e.usage||0,s.origin=e,s.id=e.goods_id||e.id,s.product_id=e.goods_id||"-",s}var Bi="/Users/zhangds/web/blue-brother/frontend/src/pages/exchangecode/exchangecodeAdd/index.jsx";const Ai=e=>Array.from({length:e},((e,t)=>t));let zi="";class Ji extends m.a.Component{constructor(e){super(e),this.onDisabledTime=e=>{let t=JSON.parse(sessionStorage.getItem("knockGold_effectDate"));const i=new Date(t.begin_time),a=i.getHours(),s=i.getMinutes(),l=i.getSeconds();return Object(R.a)(e,i)?{disabledHours:()=>Ai(a),disabledMinutes:e=>e===a?Ai(s):[],disabledSeconds:(e,t)=>e===a&&t===s?Ai(l):[]}:{}},this.onDisabledRange=(e,t)=>{let i=!1,a=Y()(e).format("YYYY-MM-DD HH:mm:ss");const s=Y()(this.state.plan_time[1]).format("HH:mm:ss");return"start"===t&&(i=s<"23:59:59"?Y()(a).isBefore(this.state.plan_time[0])||Y()(a).subtract(1,"days").isAfter(this.state.plan_time[1]):Y()(a).isBefore(this.state.plan_time[0])||Y()(a).isAfter(this.state.plan_time[1])),"end"===t&&(i=Y()(a).add(1,"days").isBefore(this.state.plan_time[0])||Y()(a).isAfter(this.state.plan_time[1])),i},this.state={uploading:!1,model:{product_id:"",product_type:"1",contract_price:"",official_price:"",cost_price:"",quantity:"",product_name:"",show_url:"",describe_url:"",detail_url:"",weight:"0"},codeInfo:{code_name:"",issued:"",describe:"",date_time:"",range:"",stock:"",planSelect:"",keyBatchSelect:"",restrict:""},isload:!1,tempdata:[],oldProduct:[],deleteProduct:[],new_product:[],cur_product:null,productOption:[],rankoptions:[],rank:[],recall_visible:!1,approvalLoading:!1,timer:3,payType:3,reseller:null,payment_direction:["\u5bf9\u79c1\u8d26\u6237","\u5bf9\u516c\u8d26\u6237","\u9884\u4ed8\u6b3e\u6263\u9664"],isAudit:!1,approvalsStatus:!1,oldTable:[],product_title:"\u65b0\u5efa\u5546\u54c1",plan_time:"",direct_reseller_id:0,newGoodsBtnLoading:!1,tableLoading:!1,addIsType:1,isState:0,planSelectData:[],keyBatchSelectData:[],codeStatus:"",productData:null,settlement_type:0,isSettlement:2,settlementData:null}}componentDidMount(){const e=~~sessionStorage.getItem("isState");zi=~~sessionStorage.getItem("code_id"),this.setState({isState:e}),e&&this.getDetailFunction(e),2!==e&&(sessionStorage.setItem("productData",[]),sessionStorage.setItem("knockGoldData",[]),sessionStorage.setItem("redPacketsData",[]),this.getPlanSelect())}getPlanSelect(){Object(a.Oc)({bind_object:"1"}).then((e=>{Object(a.Tb)(e,((e,t)=>{const i=e.filter((e=>e.settlement_type<=0)).map((e=>({key:e.id,text:e.title,...e})));this.setState({planSelectData:i})}),(e=>{c.a.error(e)}))}))}getKeyBatchSelect(e){Object(a.Nc)({status:"4,5",plan_id:e,bind_object:1}).then((e=>{Object(a.Tb)(e,((e,t)=>{const i=e.map((e=>({key:e.id,text:e.batch_name,...e})));this.setState({keyBatchSelectData:i})}),(e=>{c.a.error(e)}))}))}getResellerFunction(e){Object(a.vb)(e).then((e=>{Object(a.Tb)(e,((e,t)=>{let i={id:e.id,name:e.name,company_name:e.company_name,receive_email:e.contact_email[0]};this.setState({direct_reseller_id:e.direct_reseller_id,reseller:i})}))}))}getDetailFunction(){Object(a.T)(zi).then((e=>{Object(a.Tb)(e,(e=>{let t=Object(de.a)(e);this.codeStatus=e.status;const i=this.transFormData(t.goods);t.goods=i;let a={code_name:t.title,issued:t.quantity,stock:t.stock,restrict:t.restrict,describe:t.describe,date_time:[t.begin_time,t.end_time],range:[],planSelect:{key:e.plan.id,text:e.plan.title},keyBatchSelect:{key:e.key_batch_id,text:e.key_batch.batch_name}};const s=[];if(i.length>0){let e=[],t=[];a.range=i.map((i=>{null!==i&&void 0!==i&&i.id?(s.push({key:i.only,text:i.product_name,id:i.id}),i.checked=!0,t.push(i.id)):(i.checked=!1,e.push(i.only))})),this.setState({new_product:e,oldProduct:t})}1===this.state.isState&&(a.code_name=`${t.title}_${t.copy_count+1}`.substring(0,12)),this.getResellerFunction(t.plan.reseller_id);let l=[];Object(f.a)(t.goods,(e=>{let t={};return t.key=e.only,t.text=e.product_name,t.id=e.id,l.push(t),t})),this.setState({codeInfo:a,isload:!0,tempdata:t.goods||[],plan_time:[t.plan.begin_time,t.plan.end_time],rank:s,rankoptions:l,settlement_type:t.plan.settlement_type,isSettlement:t.plan.settlement_type>0?1:2,settlementData:t.plan.settlement_type>0?{key:t.plan.settlement_type}:null})}),(e=>{}))})).catch((e=>{}))}getTableList(){if(sessionStorage.getItem("addMoneyData")){const e=JSON.parse(sessionStorage.getItem("addMoneyData")),t=Object(de.a)(this.state.tempdata).map((t=>(e.map((e=>{t.channel_activity_id===e.channel_activity_id&&(t.origin.recharge_amount=e.recharge_amount)})),t)));this.setState({tempdata:t})}}transFormData(e){const t=[],i=[],a=[],s=[];return e.legal.map((e=>{var a;e.type=1,e.only=e.product_id,e.upstream="\u76f4\u8fde\u5929\u4e0b",[0,1].includes(this.state.isState)&&(e.stock=e.quantity,e.usage=0),2===this.state.isState&&(e.stock=e.stock||e.quantity,e.usage=e.usage||0),null!==(a=e)&&void 0!==a&&a.goods_id&&(e.id=e.goods_id),1===this.state.isState&&(e=Object(o.a)(e,["code_batch_id"])),t.push(e),i.push(e)})),e.reduce.map((e=>{2===this.state.isState&&(e.quantity=e.total_stock,e.usage=e.use_stock);let i=Pi(e);if(1===this.state.isState){const t=parseInt(L(e.all_budget,F(e.reduce_amount,e.send_num)));i.quantity=t,i.stock=t,i.usage=0,i.origin=Object(o.a)(e,["id","total_stock","use_stock","stock","goods_id"]),i=Object(o.a)(i,["product_id"])}if(2===this.state.isState){i.stock=e.stock,i.quantity=e.total_stock;const t=["total_stock","use_stock"];i.origin=Object(o.a)(e,t),i=Object(o.a)(i,t)}t.push(i),a.push(i.origin)})),e.cash.map((e=>{2===this.state.isState&&(e.quantity=e.total_stock,e.usage=e.use_stock);let i=Mi(e);if(1===this.state.isState&&(i.stock=e.num,i.usage=0,i.origin.copy=!0,i.origin=Object(o.a)(e,["id","total_stock","use_stock","stock","goods_id","update_time","delete_time"]),i=Object(o.a)(i,["product_id"])),2===this.state.isState){i.stock=e.stock,i.quantity=e.total_stock;const t=["total_stock","use_stock"];i.origin=Object(o.a)(e,t),i=Object(o.a)(i,t)}t.push(i),s.push(i.origin)})),sessionStorage.setItem("productData",JSON.stringify(i)),sessionStorage.setItem("knockGoldData",JSON.stringify(a)),sessionStorage.setItem("redPacketsData",JSON.stringify(s)),t}onRankChange(e){Object(Ti.a)(this.state.tempdata,(t=>{t.checked=e.findIndex((e=>e.key==t.only))>-1})),this.setState({tempdata:this.state.tempdata}),this.setState({rank:e})}cancel(){G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:"\u662f\u5426\u53d6\u6d88\u672c\u6b21\u64cd\u4f5c\uff1f"},void 0,!1,{fileName:Bi,lineNumber:361,columnNumber:16},this),onConfirm:()=>{window.location.replace("#/home/exchangecode-list")},onCancel:this.onCancel,className:"questModal",parentComponent:this})}buildData(){let e=[];Object(f.a)(this.state.rank,(t=>{e.push(t.text)}));let t=this.refs.tempdata.getSelectData(),i=t.filter((e=>this.state.oldProduct.indexOf(e.id)<0)),a=[],s=[];Object(f.a)(t,(e=>{if(this.state.oldProduct.indexOf(e.id)>-1){a.push(e.id);let t={};1===e.type?(t.contract_price=e.contract_price,t.cost_price=e.cost_price,t.describe_url=e.describe_url,t.official_price=e.official_price,t.product_id=e.product_id,t.account_type=e.account_type,t.product_name=e.product_name,t.product_type=e.product_type,t.weight=e.weight,t.quantity=e.quantity,t.show_url=e.show_url,t.end_time=e.end_time,t.detail_url=e.detail_url,t.map_product_name=e.map_product_name,t.goods_id=e.goods_id,t.type=e.type):t={...e.origin,type:e.type},s.push(t)}}));let l=Object(Ii.a)(this.state.oldProduct,a,Fi.a);l=l.filter((e=>this.state.new_product.indexOf(e)<0)),this.state.deleteProduct.length>0&&(l=l.concat(this.state.deleteProduct).map(Number)),a=Object(f.a)(s,(e=>e.only)),l=Object(_.a)(l,(e=>a.indexOf(e)<0));const n={legal:[],reduce:[],cash:[]};i.map((e=>{2===e.type?e.origin&&n.reduce.push(e.origin):3===e.type?n.cash.push(e.origin):n.legal.push(e)}));const o={legal:[],reduce:[],cash:[]};return s.map((e=>{2===e.type?o.reduce.push(e):3===e.type?o.cash.push(e):o.legal.push(e)})),{data:{reseller_id:this.state.reseller.id,reseller_name:this.state.reseller.name,company_name:this.state.reseller.company_name,receive_email:this.state.reseller.receive_email,payment_direction:this.state.payment_direction[this.state.payType-1],title:this.state.codeInfo.code_name,recharge_type:1,range:e,describe:this.state.codeInfo.describe,begin_time:this.state.codeInfo.date_time[0],end_time:this.state.codeInfo.date_time[1],quantity:this.state.codeInfo.issued,new_product:n,update_product:o,delete_product:l},addProduct:i,updateProduct:s}}copyOrAddBuildData(){let e=[];Object(f.a)(this.state.rank,(t=>{e.push(t.text)}));let t=this.refs.tempdata.getSelectData();const i={begin_time:this.state.codeInfo.date_time[0],end_time:this.state.codeInfo.date_time[1],describe:this.state.codeInfo.describe,quantity:this.state.codeInfo.issued,range:e.join(),recharge_type:1,title:this.state.codeInfo.code_name,restrict:this.state.codeInfo.restrict,product:{legal:t.filter((e=>{if(1==e.type)return Object(o.a)(e,["type","only","id","goods_id"])})),reduce:t.filter((e=>2===e.type)).map((e=>Object(o.a)(e.origin,["goods_id"]))),cash:t.filter((e=>3===e.type)).map((e=>e.origin))}};return 1===this.state.isState&&(i.copy_code_batch_id=zi),{code_batch:[i],reseller_id:this.state.reseller.id,reseller_name:this.state.reseller.name,company_name:this.state.reseller.company_name,receive_email:this.state.reseller.receive_email,payment_direction:this.state.payment_direction[this.state.payType-1],addCode:!0}}submitCodeData(){if(!this.state.reseller)return void c.a.error("\u8be5\u5151\u6362\u7801\u5bf9\u5e94\u5206\u9500\u5546\u4e0d\u5b58\u5728");let{data:e}=this.buildData();Object(a.xc)(zi,e).then((e=>{Object(a.Tb)(e,((e,t)=>{let i=this.state.model;i.show_url=e.path,this.setState({model:i}),c.a.clear(),c.a.success(t),setTimeout((()=>{window.location.replace("#/home/exchangecode-list")}),1e3)}),(e=>{c.a.error(e)}))}))}submitCopyOrAddCodeData(){let e=this.copyOrAddBuildData(),t=sessionStorage.getItem("keyBatch_id");Object(a.Zb)(t,e).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.success("\u6210\u529f\u53d1\u8d77\u5ba1\u6279"),setTimeout((()=>{window.history.back()}),1e3)}),(e=>{c.a.error(e)}))}))}submit(){if(this.refs.code_info.validator()&&this.refs.code_rule.validator())if(2===this.state.isState){if(this.state.uploading)return void c.a.error("\u8fd8\u6709\u56fe\u7247\u4e0a\u4f20\u4e2d\uff0c\u4e0d\u53ef\u63d0\u4ea4");let{data:e,addProduct:t,updateProduct:i}=this.buildData();if([...i,...t].length<1)return c.a.error("\u8bf7\u7ed1\u5b9a\u5bf9\u8c61");if(this.state.settlement_type>0){if([...i,...t].length>1)return void c.a.error("\u5305\u7801\u53ea\u80fd\u521b\u5efa\u4e00\u4e2a\u5546\u54c1")}let s=sessionStorage.getItem("approval_id");Number(s)<=0?Object(a.eb)(zi,e).then((e=>{Object(a.Tb)(e,((e,t)=>{e.is_require_approval?this.setState({audit_visible:!0}):this.submitCodeData()}),(e=>{c.a.error(e)}))})):Object(a.Q)(s).then((t=>{Object(a.Tb)(t,((t,i)=>{0==t.status&&(this.setState({approvalsStatus:!0}),this.setState({recall_visible:!0})),1!=t.status&&2!=t.status&&3!=t.status||Object(a.eb)(zi,e).then((e=>{Object(a.Tb)(e,((e,t)=>{e.is_require_approval?this.setState({audit_visible:!0}):this.submitCodeData()}),(e=>{c.a.error(e)}))}))}),(e=>{c.a.error(e)}))}))}else{let e=this.refs.tempdata.getSelectData();if(this.state.uploading)return c.a.error("\u8fd8\u6709\u56fe\u7247\u4e0a\u4f20\u4e2d\uff0c\u4e0d\u53ef\u63d0\u4ea4");if(e.length<1)return c.a.error("\u8bf7\u7ed1\u5b9a\u5bf9\u8c61");if(!this.state.reseller)return c.a.error("\u8be5\u5151\u6362\u7801\u5bf9\u5e94\u5206\u9500\u5546\u4e0d\u5b58\u5728");this.setState({audit_visible:!0})}}onConfirm(){this.setState({audit_visible:!1}),2!==this.state.isState?this.submitCopyOrAddCodeData():this.submitCodeData()}addProduct(e){let t=this.state.direct_reseller_id;if(!this.state.isState&&!this.state.codeInfo.planSelect.key)return c.a.error("\u8bf7\u9009\u62e9\u5f52\u5c5e\u8ba1\u5212");if(!t)return c.a.error("\u8bf7\u6dfb\u52a0\u6620\u5c04\u5206\u9500\u5546");let i="";switch(e){case 1:i="\u65b0\u5efa\u5546\u54c1";break;case 2:i="\u65b0\u589e\u7acb\u51cf\u91d1";break;case 3:i="\u65b0\u589e\u7ea2\u5305"}this.setState({productData:null,drawerVisible:!0,addIsType:e,product_title:i})}async productEditShow(e){if(!this.state.direct_reseller_id)return c.a.error("\u8bf7\u6dfb\u52a0\u6620\u5c04\u5206\u9500\u5546");1===e.type?this.setState({product_title:"\u7f16\u8f91\u5546\u54c1",productData:e,addIsType:1}):2===e.type?this.setState({product_title:"\u7f16\u8f91\u7acb\u51cf\u91d1",productData:e.origin,addIsType:2}):this.setState({product_title:"\u7f16\u8f91\u7ea2\u5305",productData:e.origin,addIsType:3}),this.setState({drawerVisible:!0})}switchProductType(){switch(this.state.addIsType){case 1:const{tempdata:e,productData:t,direct_reseller_id:i}=this.state,a=e.map((e=>1===e.type&&e.product_id)),s=t?t.product_type:1;return Object(h.jsxDEV)(xt,{ref:"product",checkedProduct:a,productData:t,directResellerId:i,productType:s,isSettlement:this.state.isSettlement,settlementData:this.state.settlementData},void 0,!1,{fileName:Bi,lineNumber:744,columnNumber:11},this);case 2:return Object(h.jsxDEV)(qe,{ref:"knockGold",data:this.state.productData},void 0,!1,{fileName:Bi,lineNumber:755,columnNumber:16},this);case 3:return Object(h.jsxDEV)(ht,{ref:"redPackets",data:this.state.productData},void 0,!1,{fileName:Bi,lineNumber:757,columnNumber:16},this)}}onChangeCombinedDate(e){let t=this.state.codeInfo;t.date_time=e,this.setState({codeInfo:t})}async productSubmit(){let e="";if(e=1===this.state.addIsType?await this.refs.product.submit():2===this.state.addIsType?await this.refs.knockGold.submit():await this.refs.redPackets.submit(),e){this.setState({drawerVisible:!1});let e=[],t=[],i=[];if(1===this.state.addIsType){const e=await this.refs.product.getFormModel();i=this.state.tempdata;let a=this.state.tempdata.findIndex((t=>t.product_id==e.product_id));a>-1?(e.stock=e.quantity-i[a].usage,i[a]=Object.assign(i[a],e)):(e.type=1,e.upstream="\u76f4\u8fde\u5929\u4e0b",e.only=e.product_id,e.stock=e.quantity,e.usage=0,t.push(e))}else 2===this.state.addIsType?(e=JSON.parse(sessionStorage.getItem("knockGoldData")),i=this.state.tempdata.filter((e=>2!==e.type)),t=Object(f.a)(e,(e=>{let t=this.state.tempdata.findIndex((t=>t.channel_activity_id===e.channel_activity_id));return t>-1&&(e.checked=this.state.tempdata[t].checked),Pi(e)}))):(e=JSON.parse(sessionStorage.getItem("redPacketsData")),i=this.state.tempdata.filter((e=>3!==e.type)),t=Object(f.a)(e,((e,t)=>{let i=this.state.tempdata.findIndex((t=>t.cash_activity_id===e.cash_activity_id));return i>-1&&(e.checked=this.state.tempdata[i].checked),e.copy=!1,Mi(e)})));let a=te(t.concat(i),"only"),s=[],l=[];Object(f.a)(a,(e=>{s.push({key:e.only,text:e.product_name}),e.checked&&l.push({key:e.only,text:e.product_name})})),s=te(s,"key"),this.setState({tempdata:a,rankoptions:s,rank:l}),this.getTableList()}}onReCall(){let e=sessionStorage.getItem("approval_id");this.setState({recall_visible:!1}),Object(a.bd)(e).then((e=>{Object(a.Tb)(e,((e,t)=>{this.setState({approvalLoading:!0});let i=setInterval((()=>{this.state.timer<=0&&(clearInterval(i),this.setState({approvalLoading:!1}),c.a.success("\u64a4\u9500\u6210\u529f,\u8bf7\u91cd\u65b0\u63d0\u4ea4\u5ba1\u6838"));let e=this.state.timer-1;this.setState({timer:e})}),1e3)}),(e=>{c.a.error(e)}))}))}handleChange(e,t){let i=this.state.codeInfo;i[t]=e,this.setState({codeInfo:i})}vestingPlanFunction(e){if(null===e||void 0===e||!e.key)return;this.getKeyBatchSelect(e.key),this.getResellerFunction(e.reseller_id),this.handleChange("","keyBatchSelect"),this.setState({plan_time:[e.begin_time,e.end_time]});const t={begin_time:e.begin_time,end_time:e.end_time};sessionStorage.setItem("knockGold_effectDate",JSON.stringify(t)),sessionStorage.setItem("redPackets_effectDate",JSON.stringify(t))}render(){return Object(h.jsxDEV)("div",{id:"editcode",children:[Object(h.jsxDEV)("div",{children:Object(h.jsxDEV)(d.a,{style:{width:"90%",margin:"10px auto"},title:"\u57fa\u672c\u4fe1\u606f",children:Object(h.jsxDEV)("div",{className:"addcode",children:Object(h.jsxDEV)(l.a,{model:this.state.codeInfo,rules:Li,ref:"code_info",className:"addform",children:[Object(h.jsxDEV)(s.a,{labelname:"\u5f52\u5c5e\u8ba1\u5212",prop:"planSelect",id:"planSelect",children:Object(h.jsxDEV)(X.a,{onChange:e=>{this.handleChange(e,"planSelect"),this.vestingPlanFunction(e)},clearable:!0,value:this.state.codeInfo.planSelect,options:this.state.planSelectData,placeholder:"\u8bf7\u9009\u62e9",labelWidth:"0px",height:"36px",width:"520px",disabled:this.state.isState,alignment:"left"},void 0,!1,{fileName:Bi,lineNumber:953,columnNumber:19},this)},void 0,!1,{fileName:Bi,lineNumber:952,columnNumber:17},this),Object(h.jsxDEV)(s.a,{labelname:"\u5f52\u5c5ekey",prop:"keyBatchSelect",id:"keyBatchSelect",children:Object(h.jsxDEV)(X.a,{onChange:e=>{this.handleChange(e,"keyBatchSelect"),sessionStorage.setItem("keyBatch_id",null===e||void 0===e?void 0:e.id)},clearable:!0,value:this.state.codeInfo.keyBatchSelect,options:this.state.keyBatchSelectData,placeholder:"\u8bf7\u9009\u62e9",labelWidth:"0px",height:"36px",width:"520px",disabled:this.state.isState,alignment:"left"},void 0,!1,{fileName:Bi,lineNumber:971,columnNumber:19},this)},void 0,!1,{fileName:Bi,lineNumber:970,columnNumber:17},this),Object(h.jsxDEV)(s.a,{labelname:"\u5151\u6362\u7801\u540d\u79f0",prop:"code_name",id:"code_name",children:Object(h.jsxDEV)(n.a,{onChange:e=>this.handleChange(e,"code_name"),onClearItem:()=>this.handleChange("","code_name"),value:this.state.codeInfo.code_name,placeholder:"\u8bf7\u8f93\u5165\u5151\u6362\u7801\u540d\u79f0",labelWidth:"0px",maxLength:12,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:Bi,lineNumber:990,columnNumber:19},this)},void 0,!1,{fileName:Bi,lineNumber:989,columnNumber:17},this),2!==this.state.isState?Object(h.jsxDEV)(s.a,{labelname:"\u7ed1\u5b9a\u6570",prop:"restrict",id:"restrict",children:Object(h.jsxDEV)(n.a,{onChange:e=>this.handleChange(e,"restrict"),onClearItem:()=>this.handleChange("","restrict"),value:this.state.codeInfo.restrict,placeholder:"\u8bf7\u8f93\u5165\u7ed1\u5b9a\u6570\u91cf",labelWidth:"0px",maxLength:6,countShow:!1,unit:"\u6761",height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:Bi,lineNumber:1005,columnNumber:21},this)},void 0,!1,{fileName:Bi,lineNumber:1004,columnNumber:19},this):null,2===this.state.isState?Object(h.jsxDEV)(h.Fragment,{children:[Object(h.jsxDEV)(s.a,{labelname:"\u53d1\u653e\u603b\u91cf",prop:"issued",id:"issued",children:Object(h.jsxDEV)("div",{className:"line",children:this.state.codeInfo.issued},void 0,!1,{fileName:Bi,lineNumber:1024,columnNumber:23},this)},void 0,!1,{fileName:Bi,lineNumber:1023,columnNumber:21},this),Object(h.jsxDEV)(s.a,{labelname:"\u5269\u4f59\u5e93\u5b58\u91cf",prop:"stock",id:"stock",children:Object(h.jsxDEV)("div",{className:"line",children:this.state.codeInfo.stock},void 0,!1,{fileName:Bi,lineNumber:1027,columnNumber:23},this)},void 0,!1,{fileName:Bi,lineNumber:1026,columnNumber:21},this)]},void 0,!0):Object(h.jsxDEV)(s.a,{labelname:"\u53d1\u653e\u603b\u91cf",prop:"issued",id:"issued",children:Object(h.jsxDEV)(n.a,{onChange:e=>this.handleChange(e,"issued"),onClearItem:()=>this.handleChange("","issued"),value:this.state.codeInfo.issued,placeholder:"\u8bf7\u8f93\u5165\u53d1\u653e\u603b\u91cf",labelWidth:"0px",maxLength:6,countShow:!1,unit:"\u6761",height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:Bi,lineNumber:1032,columnNumber:21},this)},void 0,!1,{fileName:Bi,lineNumber:1031,columnNumber:19},this),Object(h.jsxDEV)(s.a,{labelname:"\u4f7f\u7528\u8bf4\u660e",prop:"describe",id:"describe",required:!1,children:Object(h.jsxDEV)(Di.a,{type:"textarea",autoSize:!0,width:"520px",maxLength:100,value:this.state.codeInfo.describe,onChange:e=>this.handleChange(e.target.value,"describe"),maxCharacterCount:100,showCount:!0},void 0,!1,{fileName:Bi,lineNumber:1049,columnNumber:19},this)},void 0,!1,{fileName:Bi,lineNumber:1048,columnNumber:17},this)]},void 0,!0,{fileName:Bi,lineNumber:946,columnNumber:15},this)},void 0,!1,{fileName:Bi,lineNumber:945,columnNumber:13},this)},void 0,!1,{fileName:Bi,lineNumber:944,columnNumber:11},this)},void 0,!1,{fileName:Bi,lineNumber:943,columnNumber:9},this),Object(h.jsxDEV)("div",{children:Object(h.jsxDEV)(d.a,{style:{width:"90%",margin:"10px auto"},title:"\u57fa\u672c\u89c4\u5219",children:Object(h.jsxDEV)("div",{children:Object(h.jsxDEV)(l.a,{model:this.state.codeInfo,rules:Hi,ref:"code_rule",className:"addform",children:[Object(h.jsxDEV)(s.a,{labelname:"\u751f\u6548\u65f6\u95f4\u6bb5",prop:"date_time",id:"date_time",children:Object(h.jsxDEV)(ee.a,{className:"zent-datepicker-plan",showTime:{format:"HH:mm:ss",defaultTime:["00:00:00","23:59:59"]},disabled:[2===this.state.isState&&[1,2,3,7].includes(this.codeStatus),!1],format:"YYYY-MM-DD HH:mm:ss",value:this.state.codeInfo.date_time,onChange:e=>{$t.a.emit("change","date_time",e),this.onChangeCombinedDate(e)},width:245,disabledTime:this.onDisabledTime,disabledDate:this.onDisabledRange},void 0,!1,{fileName:Bi,lineNumber:1074,columnNumber:19},this)},void 0,!1,{fileName:Bi,lineNumber:1073,columnNumber:17},this),Object(h.jsxDEV)(s.a,{labelname:"\u5546\u54c1\u8303\u56f4",prop:"rank",id:"rank",children:Object(h.jsxDEV)("div",{className:"goods-boxs",children:[Object(h.jsxDEV)(X.a,{options:this.state.rankoptions,multiple:!0,value:this.state.rank,placeholder:"\u9009\u62e9\u4e00\u9879",width:410,onChange:e=>{this.onRankChange(e)}},void 0,!1,{fileName:Bi,lineNumber:1097,columnNumber:21},this),Object(h.jsxDEV)(u.a,{type:"primary",style:{marginLeft:"20px"},onClick:()=>{this.addProduct(1)},disabled:1===this.state.isSettlement&&this.state.settlementData&&(8===this.state.settlementData.key||9===this.state.settlementData.key),children:"\u65b0\u5efa\u5546\u54c1"},void 0,!1,{fileName:Bi,lineNumber:1107,columnNumber:21},this),Object(h.jsxDEV)(u.a,{type:"primary",style:{marginLeft:"20px"},onClick:()=>{this.addProduct(2)},disabled:!JSON.parse(sessionStorage.getItem("isEarlyWarningMan"))||1===this.state.isSettlement&&this.state.settlementData&&7===this.state.settlementData.key,children:"\u65b0\u5efa\u7acb\u51cf\u91d1"},void 0,!1,{fileName:Bi,lineNumber:1121,columnNumber:21},this),Object(h.jsxDEV)(u.a,{type:"primary",style:{marginLeft:"20px"},onClick:()=>{this.addProduct(3)},disabled:!JSON.parse(sessionStorage.getItem("isEarlyWarningMan"))||1===this.state.isSettlement&&this.state.settlementData&&(7===this.state.settlementData.key||8===this.state.settlementData.key),children:"\u65b0\u5efa\u7ea2\u5305"},void 0,!1,{fileName:Bi,lineNumber:1136,columnNumber:21},this)]},void 0,!0,{fileName:Bi,lineNumber:1096,columnNumber:19},this)},void 0,!1,{fileName:Bi,lineNumber:1095,columnNumber:17},this),Object(h.jsxDEV)(s.a,{labelname:"",prop:"range",id:"range",children:Object(h.jsxDEV)(I,{ref:"tempdata",headBackgroud:"#f9fafc",isShowPageBar:!1,spliteColor:"#fff",tableData:this.state.tempdata,value:this.state.tempdata,Column:qi,maxheight:200,countbarVisible:!1,isBorder:!0,isSwitch:!1,pageChange:e=>{this.pageChange(e)},checkChange:e=>{let t=[];Object(f.a)(e,(e=>{let i={};return i.key=e.only,i.text=e.product_name,t.push(i),i})),this.setState({rank:t})},ComponentHandler:(e,t)=>"type"==e?Object(h.jsxDEV)(h.Fragment,{children:2===t.type?"\u7acb\u51cf\u91d1":3===t.type?"2"===t.origin.cash_amount_type?"\u968f\u673a\u7ea2\u5305":"\u56fa\u989d\u7ea2\u5305":"\u5546\u54c1"},void 0,!1):"cost_price"==e?Object(h.jsxDEV)(h.Fragment,{children:2===t.type?t.official_price:t.cost_price},void 0,!1):"edit"==e?Object(h.jsxDEV)("a",{className:"grid-link",onClick:e=>{this.productEditShow(t)},children:"\u7f16\u8f91"},void 0,!1,{fileName:Bi,lineNumber:1202,columnNumber:27},this):void 0},void 0,!1,{fileName:Bi,lineNumber:1155,columnNumber:19},this)},void 0,!1,{fileName:Bi,lineNumber:1154,columnNumber:17},this)]},void 0,!0,{fileName:Bi,lineNumber:1067,columnNumber:15},this)},void 0,!1,{fileName:Bi,lineNumber:1066,columnNumber:13},this)},void 0,!1,{fileName:Bi,lineNumber:1065,columnNumber:11},this)},void 0,!1,{fileName:Bi,lineNumber:1064,columnNumber:9},this),Object(h.jsxDEV)(bt.a,{className:"draw",width:"86%",title:this.state.product_title,footer:Object(h.jsxDEV)("div",{style:{textAlign:"center"},children:[Object(h.jsxDEV)(u.a,{type:"primary",onClick:e=>{this.productSubmit()},children:"\u63d0\u4ea4"},void 0,!1,{fileName:Bi,lineNumber:1225,columnNumber:15},this),Object(h.jsxDEV)(u.a,{onClick:e=>{this.setState({drawerVisible:!1}),this.getTableList()},children:"\u53d6\u6d88"},void 0,!1,{fileName:Bi,lineNumber:1233,columnNumber:15},this)]},void 0,!0,{fileName:Bi,lineNumber:1224,columnNumber:13},this),visible:this.state.drawerVisible,onClose:e=>{this.setState({drawerVisible:!1})},maskClosable:!1,children:Object(h.jsxDEV)("div",{className:"draw2",children:Object(h.jsxDEV)(d.a,{style:{width:"95%",margin:"10px auto",border:0},children:this.switchProductType()},void 0,!1,{fileName:Bi,lineNumber:1250,columnNumber:13},this)},void 0,!1,{fileName:Bi,lineNumber:1249,columnNumber:11},this)},void 0,!1,{fileName:Bi,lineNumber:1219,columnNumber:9},this),this.state.audit_visible?Object(h.jsxDEV)("div",{className:"audit",children:[Object(h.jsxDEV)("div",{className:"modal",children:" "},void 0,!1,{fileName:Bi,lineNumber:1258,columnNumber:13},this),Object(h.jsxDEV)("div",{className:"audit-box",children:[Object(h.jsxDEV)(g.a,{type:"close",className:"audit-close",onClick:e=>{this.setState({audit_visible:!1})}},void 0,!1,{fileName:Bi,lineNumber:1260,columnNumber:15},this),Object(h.jsxDEV)("div",{className:"audit-box-title",children:"\u63d0\u4ea4\u5ba1\u6838"},void 0,!1,{fileName:Bi,lineNumber:1267,columnNumber:15},this),Object(h.jsxDEV)("div",{className:"payType",children:Object(h.jsxDEV)(Q.a,{onChange:e=>this.setState({payType:e.target.value}),value:this.state.payType,className:"audit-obj",children:[Object(h.jsxDEV)(Z.a,{value:3,children:"\u9884\u4ed8\u6b3e\u6263\u9664"},void 0,!1,{fileName:Bi,lineNumber:1274,columnNumber:19},this),Object(h.jsxDEV)(Z.a,{value:1,children:"\u5bf9\u79c1\u8d26\u6237"},void 0,!1,{fileName:Bi,lineNumber:1275,columnNumber:19},this),Object(h.jsxDEV)(Z.a,{value:2,children:"\u5bf9\u516c\u8d26\u6237"},void 0,!1,{fileName:Bi,lineNumber:1276,columnNumber:19},this)]},void 0,!0,{fileName:Bi,lineNumber:1269,columnNumber:17},this)},void 0,!1,{fileName:Bi,lineNumber:1268,columnNumber:15},this),Object(h.jsxDEV)("div",{className:"audit-btn-group",children:[Object(h.jsxDEV)(u.a,{onClick:e=>{this.setState({audit_visible:!1})},children:"\u53d6\u6d88"},void 0,!1,{fileName:Bi,lineNumber:1280,columnNumber:17},this),Object(h.jsxDEV)(u.a,{type:"primary",onClick:e=>{this.onConfirm(e)},children:"\u786e\u5b9a"},void 0,!1,{fileName:Bi,lineNumber:1287,columnNumber:17},this)]},void 0,!0,{fileName:Bi,lineNumber:1279,columnNumber:15},this)]},void 0,!0,{fileName:Bi,lineNumber:1259,columnNumber:13},this)]},void 0,!0,{fileName:Bi,lineNumber:1257,columnNumber:11},this):null,this.state.recall_visible?Object(h.jsxDEV)("div",{className:"audit",children:[Object(h.jsxDEV)("div",{className:"modal",children:" "},void 0,!1,{fileName:Bi,lineNumber:1301,columnNumber:13},this),Object(h.jsxDEV)("div",{className:"audit-box",children:[Object(h.jsxDEV)(g.a,{type:"close",className:"audit-close",onClick:e=>{this.setState({recall_visible:!1})}},void 0,!1,{fileName:Bi,lineNumber:1303,columnNumber:15},this),Object(h.jsxDEV)("div",{className:"audit-box-title",children:"\u5f53\u524d\u6b63\u5728\u5ba1\u6838\u4e2d"},void 0,!1,{fileName:Bi,lineNumber:1310,columnNumber:15},this),Object(h.jsxDEV)("div",{className:"audit-box-txt",children:"\u63d0\u4ea4\u5ba1\u6838\u4f1a\u5c06\u539f\u6765\u5ba1\u6279\u64a4\u56de\u624d\u53ef\u8fdb\u884c\u63d0\u4ea4,\u662f\u5426\u64a4\u56de?"},void 0,!1,{fileName:Bi,lineNumber:1311,columnNumber:15},this),Object(h.jsxDEV)("div",{className:"audit-btn-group",children:[Object(h.jsxDEV)(u.a,{onClick:e=>{this.setState({recall_visible:!1})},children:"\u53d6\u6d88"},void 0,!1,{fileName:Bi,lineNumber:1313,columnNumber:17},this),Object(h.jsxDEV)(u.a,{type:"primary",onClick:e=>{this.onReCall(e)},children:"\u786e\u5b9a"},void 0,!1,{fileName:Bi,lineNumber:1320,columnNumber:17},this)]},void 0,!0,{fileName:Bi,lineNumber:1312,columnNumber:15},this)]},void 0,!0,{fileName:Bi,lineNumber:1302,columnNumber:13},this)]},void 0,!0,{fileName:Bi,lineNumber:1300,columnNumber:11},this):null,this.state.approvalLoading?Object(h.jsxDEV)("div",{className:"audit",children:[Object(h.jsxDEV)("div",{className:"modal",children:" "},void 0,!1,{fileName:Bi,lineNumber:1334,columnNumber:13},this),Object(h.jsxDEV)("div",{className:"audit-box",children:[Object(h.jsxDEV)("div",{className:"audit-box-title",children:"\u64a4\u9500\u5ba1\u6279\u4e2d"},void 0,!1,{fileName:Bi,lineNumber:1336,columnNumber:15},this),Object(h.jsxDEV)("div",{className:"audit-box-txt",children:["\u6b63\u5728\u53d1\u8d77\u64a4\u9500...,\u8bf7\u7b49\u5f85 ",Object(h.jsxDEV)("span",{style:{color:"red"},children:[" ",this.state.timer]},void 0,!0,{fileName:Bi,lineNumber:1338,columnNumber:31},this)," \u79d2"]},void 0,!0,{fileName:Bi,lineNumber:1337,columnNumber:15},this)]},void 0,!0,{fileName:Bi,lineNumber:1335,columnNumber:13},this)]},void 0,!0,{fileName:Bi,lineNumber:1333,columnNumber:11},this):null,Object(h.jsxDEV)("div",{className:"edit-btnList",children:[Object(h.jsxDEV)(u.a,{type:"primary",onClick:()=>this.submit(),children:"\u63d0\u4ea4\u5ba1\u6838"},void 0,!1,{fileName:Bi,lineNumber:1345,columnNumber:11},this),Object(h.jsxDEV)(u.a,{type:"normal",onClick:()=>this.cancel(),children:"\u53d6\u6d88"},void 0,!1,{fileName:Bi,lineNumber:1348,columnNumber:11},this)]},void 0,!0,{fileName:Bi,lineNumber:1344,columnNumber:9},this)]},void 0,!0,{fileName:Bi,lineNumber:942,columnNumber:7},this)}}i(136);var Ui="/Users/zhangds/web/blue-brother/frontend/src/components/combining/wangEditor.jsx";class Wi extends m.a.Component{constructor(e){super(e),this.state={editorHtml:"",count:0}}componentDidMount(){let e=this;const t=new xe.a("#wangeditorCombining");this.setState({editor:t}),t.config.colors=["#696969","#9093a2","#fgddbb","#e3e7eb"],t.config.pasteText=!0,t.config.height=200,t.config.showFullScreen=!1,t.config.menus=["bold","foreColor","italic","indent","link","justify"],t.config.onchange=function(i){var a=t.txt.text();if(0==a.length&&e.props.setEdittext(""),a.length>e.props.limitLength){let i=a.slice(0,e.props.limitLength);return e.setState({editorHtml:i}),t.txt.html(i),void e.props.setEdittext(i)}e.setState({count:a.length}),e.setState({editorHtml:i}),e.props.setEdittext(i)},t.create();const i=setTimeout((()=>{t.txt.html(this.props.text),clearTimeout(i)}),500)}render(){return Object(h.jsxDEV)("div",{className:"countBox_par",children:[Object(h.jsxDEV)("div",{id:"wangeditorCombining",style:{width:this.props.width}},void 0,!1,{fileName:Ui,lineNumber:54,columnNumber:9},this),Object(h.jsxDEV)("p",{className:"countBox",children:this.state.count+"/"+this.props.limitLength},void 0,!1,{fileName:Ui,lineNumber:55,columnNumber:9},this)]},void 0,!0,{fileName:Ui,lineNumber:53,columnNumber:7},this)}}i(236);var Ri="/Users/zhangds/web/blue-brother/frontend/src/components/combiningMobile/index.jsx";const Ki=[80,100,100,100,80,24,100,100,100];var Yi=({data:e,products:t})=>{function i(){switch(Number(e.channel)){case 1:return{bg:"#4989f5",title_color:"#fff",banner:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/combining/zfb_common_img_banner.png",goods_bg:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/combining/zfb_redenvelope_img.png",footer_top:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/combining/zfb_common_img_top.png",footer_middle:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/combining/zfb_common_img_middle.png",footer_bottom:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/combining/zfb_common_img_d.png",footer_color:"#4989F5",notis_color:"#FF486D",goods_a:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/combining/zfb_redenvelope_tobeused.png",goods_b:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/combining/zfb_redenvelope_overdue.png"};case 2:return{bg:"#cee5be",title_color:"#239700",banner:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/combining/wx_common_img_banner.png",goods_bg:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/combining/wx_redenvelope_img.png",footer_top:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/combining/wx_common_img_top.png",footer_middle:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/combining/wx_common_img_middle.png",footer_bottom:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/combining/wx_common_img_d.png",footer_color:"#5eb145",time_color:"#5eb145",notis_color:"#239700",goods_a:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/combining/zfb_redenvelope_tobeused.png",goods_b:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/combining/zfb_redenvelope_overdue.png"};case 3:return{bg:"#ff4830",title_color:"#FF3024",banner:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/combining/ysf_common_img_banner.png",goods_bg:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/combining/ysf_redenvelope_img.png",footer_top:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/combining/ysf_common_img_top.png",footer_middle:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/combining/ysf_common_img_middle.png",footer_bottom:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/combining/ysf_common_img_d.png",footer_color:"#FF4901",notis_color:"#FFD3D8",goods_a:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/combining/ysf_redenvelope_tobeused.png",goods_b:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/combining/ysf_redenvelope_overdue.png"};default:return{}}}return Object(h.jsxDEV)("div",{id:"combiningMobile",children:Object(h.jsxDEV)("div",{className:"content",style:{background:i().bg},children:[Object(h.jsxDEV)("img",{className:"banner",src:i().banner,alt:""},void 0,!1,{fileName:Ri,lineNumber:107,columnNumber:9},void 0),Object(h.jsxDEV)("div",{className:"box",children:[Object(h.jsxDEV)("div",{className:"box-cotent",children:[Object(h.jsxDEV)("div",{className:"goods-box",style:{backgroundImage:`url(${i().goods_bg})`,paddingTop:1==e.channel?"28px":2==e.channel?"16px":"20px"},children:[Object(h.jsxDEV)("p",{className:"title",style:{color:i().title_color},children:e.code_name||"\u7acb\u51cf\u91d1\u7ec4\u5408\u5546\u54c1"},void 0,!1,{fileName:Ri,lineNumber:117,columnNumber:15},void 0),Object(h.jsxDEV)("ul",{className:"g-b-u",style:{marginLeft:1==e.channel?"12px":"14px",marginTop:2==e.channel?"12px":"28px"},children:t.map((e=>Object(h.jsxDEV)("li",{style:{backgroundImage:`url(${i().goods_b})`},"v-for":"item in goods.product",children:[Object(h.jsxDEV)("p",{className:"g-b-u-t",children:"\u7acb\u51cf\u91d1"},void 0,!1,{fileName:Ri,lineNumber:135,columnNumber:21},void 0),Object(h.jsxDEV)("p",{className:"money",children:[Object(h.jsxDEV)("span",{children:"\uffe5"},void 0,!1,{fileName:Ri,lineNumber:137,columnNumber:23},void 0),e.origin.reduce_amount]},void 0,!0,{fileName:Ri,lineNumber:136,columnNumber:21},void 0),Object(h.jsxDEV)("p",{className:"reduce",children:["\u6ee1",e.origin.denomination,"\u53ef\u7528"]},void 0,!0,{fileName:Ri,lineNumber:140,columnNumber:21},void 0),Object(h.jsxDEV)("p",{className:"g-b-but","v-if":"goods.receive_status==1",children:["\u5f85\u9886\u53d6(0/",e.send_num,")"]},void 0,!0,{fileName:Ri,lineNumber:141,columnNumber:21},void 0)]},e.channel_activity_id,!0,{fileName:Ri,lineNumber:128,columnNumber:19},void 0)))},void 0,!1,{fileName:Ri,lineNumber:120,columnNumber:15},void 0),Object(h.jsxDEV)("p",{className:"notis",style:{color:i().notis_color,marginBottom:1!=e.channel&&"18px"},children:"\u6ed1\u52a8\u67e5\u770b\u66f4\u591a"},void 0,!1,{fileName:Ri,lineNumber:147,columnNumber:15},void 0)]},void 0,!0,{fileName:Ri,lineNumber:110,columnNumber:13},void 0),3==e.channel||1==e.channel&&2==e.receive_mode?Object(h.jsxDEV)("p",{className:"g_b_title",children:[Object(h.jsxDEV)("img",{src:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/combining/ysf_title_icon.png",alt:""},void 0,!1,{fileName:Ri,lineNumber:160,columnNumber:17},void 0),1==e.channel?"\u652f\u4ed8\u5b9d\u8d26\u53f7":"\u4e91\u95ea\u4ed8\u8d26\u53f7",Object(h.jsxDEV)("img",{src:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/combining/ysf_title_icon.png",alt:""},void 0,!1,{fileName:Ri,lineNumber:165,columnNumber:17},void 0)]},void 0,!0,{fileName:Ri,lineNumber:159,columnNumber:15},void 0):null,3==e.channel||1==e.channel&&2==e.receive_mode?Object(h.jsxDEV)(h.Fragment,{children:[Object(h.jsxDEV)("input",{type:"text",maxlength:"50",readOnly:!0,placeholder:3==e.channel?"\u8bf7\u8f93\u5165\u624b\u673a\u53f7":"\u8bf7\u8f93\u5165\u8d26\u53f7","v-model":"form.confirm"},void 0,!1,{fileName:Ri,lineNumber:173,columnNumber:17},void 0),Object(h.jsxDEV)("input",{type:"text",maxlength:"50",readOnly:!0,placeholder:3==e.channel?"\u8bf7\u518d\u6b21\u8f93\u5165\u624b\u673a\u53f7":"\u8bf7\u518d\u6b21\u8f93\u5165\u8d26\u53f7","v-model":"form.receive_account"},void 0,!1,{fileName:Ri,lineNumber:180,columnNumber:17},void 0)]},void 0,!0):null,Object(h.jsxDEV)("img",{className:"but",style:{marginTop:2==e.channel||1==e.channel&&1==e.receive_mode&&"12px"},src:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/combining/ysf_but.png",alt:""},void 0,!1,{fileName:Ri,lineNumber:190,columnNumber:13},void 0),1==e.timer_show?Object(h.jsxDEV)("p",{className:"time",style:{marginTop:0},children:["\u751f\u6548\u65f6\u95f4\uff1a",e.date_time.length>1?`${e.date_time[0]} ~ ${e.date_time[1]}`:"2024-01-01 00:00:00 ~ 2029-01-01 00:00:00"]},void 0,!0,{fileName:Ri,lineNumber:201,columnNumber:15},void 0):null,e.timer.length>1?Object(h.jsxDEV)("p",{className:"time",style:{marginTop:"10px"},children:["\u9886\u53d6\u65f6\u95f4\uff1a",`${e.timer[0]} ~ ${e.timer[1]}`]},void 0,!0,{fileName:Ri,lineNumber:210,columnNumber:15},void 0):null]},void 0,!0,{fileName:Ri,lineNumber:109,columnNumber:11},void 0),Object(h.jsxDEV)("div",{className:"box-footer",children:[Object(h.jsxDEV)("img",{className:"b-f-img",src:i().footer_top,alt:""},void 0,!1,{fileName:Ri,lineNumber:218,columnNumber:13},void 0),Object(h.jsxDEV)("div",{className:"b-f-b",style:{backgroundImage:`url(${i().footer_middle})`},children:function(){var t;return 2==e.instructionType&&e.group_image[0]?Object(h.jsxDEV)("img",{className:"group_image",src:null===(t=e.group_image[0])||void 0===t?void 0:t.src},void 0,!1,{fileName:Ri,lineNumber:8,columnNumber:14},this):1==e.instructionType&&e.instruction?Object(h.jsxDEV)("div",{className:"b-f-i",dangerouslySetInnerHTML:{__html:e.instruction},style:{color:i().footer_color},"v-if":"data.instructionType==1"},void 0,!1,{fileName:Ri,lineNumber:11,columnNumber:9},this):Object(h.jsxDEV)(pe.a.TextBlock,{className:"TextBlock",animate:!0,widths:Ki,rows:8,dashed:!1},void 0,!1,{fileName:Ri,lineNumber:22,columnNumber:9},this)}()},void 0,!1,{fileName:Ri,lineNumber:219,columnNumber:13},void 0),Object(h.jsxDEV)("img",{className:"b-f-img",src:i().footer_bottom,alt:""},void 0,!1,{fileName:Ri,lineNumber:225,columnNumber:13},void 0)]},void 0,!0,{fileName:Ri,lineNumber:217,columnNumber:11},void 0)]},void 0,!0,{fileName:Ri,lineNumber:108,columnNumber:9},void 0)]},void 0,!0,{fileName:Ri,lineNumber:106,columnNumber:7},void 0)},void 0,!1,{fileName:Ri,lineNumber:105,columnNumber:5},void 0)};i(237);const $i={code_name:[{type:"required",message:"\u8bf7\u8f93\u5165\u5151\u6362\u7801\u540d\u79f0"}],planSelect:[{type:"required",message:"\u8bf7\u9009\u62e9\u5f52\u5c5e\u8ba1\u5212"}],keyBatchSelect:[{type:"required",message:"\u8bf7\u9009\u62e9\u5f52\u5c5eKey"}],issued:[{type:"required",message:"\u8bf7\u8f93\u5165\u53d1\u653e\u603b\u91cf"},{type:"regExp",message:"\u8bf7\u8f93\u5165\u6b63\u6574\u6570",reg:"^([1-9][0-9]*){1,3}$"}]},Gi={date_time:[{type:"required",message:"\u8bf7\u9009\u62e9\u751f\u6548\u65f6\u95f4\u6bb5"}],timer:[{type:"required",message:"\u8bf7\u9009\u62e9\u9886\u53d6\u65f6\u95f4\u6bb5"}]},Qi=[{title:"\u5546\u54c1ID",name:"product_id",prop:"product_id",width:"auto",type:"normal"},{title:"\u5546\u54c1\u540d\u79f0",width:"auto",prop:"product_name",name:"product_name",type:"normal"},{title:"\u603b\u9884\u7b97",name:"all_budget",prop:"all_budget",type:"normal",width:"auto"},{title:"\u5408\u540c\u5355\u4ef7",name:"contract_price",prop:"contract_price",type:"normal",width:"auto"},{title:"\u5546\u54c1\u5b98\u65b9\u4ef7",type:"normal",prop:"official_price",width:"auto"},{title:"\u7c7b\u578b",width:"auto",prop:"type",name:"type",type:"slot"},{title:"\u4e0a\u6e38\u5e73\u53f0",width:"auto",prop:"upstream",name:"upstream",type:"normal"},{title:"\u6279\u6b21\u53f7",width:"auto",prop:"channel_activity_id",name:"channel_activity_id",type:"normal"},{title:"\u6709\u6548\u65f6\u95f4\u6bb5",width:"300px",prop:"effectDate",name:"effectDate",type:"slot"},{title:"\u5f53\u524d\u6210\u672c\u4ef7\u683c",prop:"cost_price",name:"cost_price",width:"auto",type:"slot"},{title:"\u5e93\u5b58\u603b\u6570\u91cf",prop:"quantity",name:"quantity",type:"normal",width:"auto"},{title:"\u5269\u4f59\u6570\u91cf",prop:"stock",name:"stock",type:"normal",width:"auto"},{title:"\u5355\u6b21\u5230\u8d26",prop:"send_num",name:"send_num",type:"normal",width:"auto"},{title:"\u5df2\u4f7f\u7528\u6570\u91cf",prop:"usage",name:"usage",type:"normal",width:"auto"},{title:"\u64cd\u4f5c",prop:"edit",name:"edit",type:"slot",width:"auto"}];function Zi(e){const t=parseInt(L(e.all_budget,F(e.reduce_amount,e.send_num))),i={};return i.product_name=e.batch_goods_name||e.product_name,i.channel_activity_id=e.channel_activity_id,i.only=e.channel_activity_id,i.type=2,i.checked=e.checked||!1,i.disabled=e.disabled||!1,i.upstream=P(e.channel),i.edit="edit",i.all_budget=e.all_budget,i.send_num=e.send_num||1,i.contract_price=e.contract_price||e.price,i.official_price=e.official_price||e.reduce_amount,i.quantity=e.quantity||t,i.stock=e.stock||t,i.usage=e.usage||0,i.origin=e,i.id=e.goods_id||e.id,i.product_id=e.goods_id||"-",i}var Xi="/Users/zhangds/web/blue-brother/frontend/src/pages/exchangecode/combiningAdd/index.jsx";const ea=e=>Array.from({length:e},((e,t)=>t));let ta="";class ia extends m.a.Component{constructor(e){super(e),this.onDisabledTime=e=>{let t=JSON.parse(sessionStorage.getItem("knockGold_effectDate"));const i=new Date(t.begin_time),a=i.getHours(),s=i.getMinutes(),l=i.getSeconds();return Object(R.a)(e,i)?{disabledHours:()=>ea(a),disabledMinutes:e=>e===a?ea(s):[],disabledSeconds:(e,t)=>e===a&&t===s?ea(l):[]}:{}},this.onDisabledRange=(e,t)=>{let i=!1,a=Y()(e).format("YYYY-MM-DD HH:mm:ss");const s=Y()(this.state.plan_time[1]).format("HH:mm:ss");return"start"===t&&(i=s<"23:59:59"?Y()(a).isBefore(this.state.plan_time[0])||Y()(a).subtract(1,"days").isAfter(this.state.plan_time[1]):Y()(a).isBefore(this.state.plan_time[0])||Y()(a).isAfter(this.state.plan_time[1])),"end"===t&&(i=Y()(a).add(1,"days").isBefore(this.state.plan_time[0])||Y()(a).isAfter(this.state.plan_time[1])),i},this.state={uploading:!1,model:{product_id:"",product_type:"1",contract_price:"",official_price:"",cost_price:"",quantity:"",product_name:"",show_url:"",describe_url:"",detail_url:"",weight:"0"},codeInfo:{code_name:"",issued:"",describe:"",date_time:[],range:"",stock:"",instruction:z,planSelect:"",keyBatchSelect:"",restrict:1,group_cover:"",group_image:[],timer:[],timer_type:1,channel:"1",receive_mode:1,instructionType:1,is_webview:0,timer_show:1},isload:!1,tempdata:[],oldProduct:[],deleteProduct:[],new_product:[],cur_product:null,productOption:[],rankoptions:[],rank:[],recall_visible:!1,approvalLoading:!1,timer:3,payType:3,reseller:null,payment_direction:["\u5bf9\u79c1\u8d26\u6237","\u5bf9\u516c\u8d26\u6237","\u9884\u4ed8\u6b3e\u6263\u9664"],isAudit:!1,approvalsStatus:!1,oldTable:[],product_title:"\u65b0\u5efa\u5546\u54c1",plan_time:"",direct_reseller_id:0,newGoodsBtnLoading:!1,tableLoading:!1,addIsType:1,isState:0,planSelectData:[],keyBatchSelectData:[],codeStatus:"",productData:null}}componentDidMount(){const e=~~sessionStorage.getItem("isState");ta=~~sessionStorage.getItem("code_id"),this.setState({isState:e}),e&&this.getDetailFunction(e),2!==e&&(sessionStorage.setItem("knockGoldData",[]),this.getPlanSelect())}getPlanSelect(){Object(a.Oc)({bind_object:"1"}).then((e=>{Object(a.Tb)(e,((e,t)=>{const i=e.map((e=>({key:e.id,text:e.title,...e})));this.setState({planSelectData:i})}),(e=>{c.a.error(e)}))}))}getKeyBatchSelect(e){Object(a.Nc)({status:"4,5",plan_id:e,bind_object:1}).then((e=>{Object(a.Tb)(e,((e,t)=>{const i=e.map((e=>({key:e.id,text:e.batch_name,...e})));this.setState({keyBatchSelectData:i})}),(e=>{c.a.error(e)}))}))}getResellerFunction(e){Object(a.vb)(e).then((e=>{Object(a.Tb)(e,((e,t)=>{let i={id:e.id,name:e.name,company_name:e.company_name,receive_email:e.contact_email[0]};this.setState({direct_reseller_id:e.direct_reseller_id,reseller:i})}))}))}getDetailFunction(){Object(a.T)(ta).then((e=>{Object(a.Tb)(e,(e=>{let t=Object(de.a)(e);this.codeStatus=e.status;const i=this.transFormData(t.goods),{channel:a,receive_mode:s,instruction:l,group_image:n,time_limit:o,is_webview:r,timer_show:m}=t.group_info;this.handleChange(l,"instruction"),t.goods=i;let c={code_name:t.title,is_webview:Number(r)||0,timer_show:Number(m)||1,issued:t.quantity,instructionType:Number(t.group_info.instructionType)||1,stock:t.stock,restrict:t.restrict,instruction:l,date_time:[t.begin_time,t.end_time],group_image:n?[{id:(new Date).getTime(),src:n,name:"\u5546\u54c1\u63cf\u8ff0"}]:[],timer:o.receive_time.start_time?[o.receive_time.start_time,o.receive_time.end_time]:[],timer_type:o.receive_time.end_time?2:1,channel:a,receive_mode:Number(s),range:[],planSelect:{key:e.plan.id,text:e.plan.title},keyBatchSelect:{key:e.key_batch_id,text:e.key_batch.batch_name}};const d=[];if(i.length>0){let e=[],t=[];c.range=i.map((i=>{null!==i&&void 0!==i&&i.id?(d.push({key:i.only,text:i.product_name,id:i.id}),i.checked=!0,t.push(i.id)):(i.checked=!1,e.push(i.only))})),this.setState({new_product:e,oldProduct:t})}1===this.state.isState&&(c.code_name=`${t.title}_${t.copy_count+1}`.substring(0,12)),this.getResellerFunction(t.plan.reseller_id);let u=[];Object(f.a)(t.goods,(e=>{let t={};return t.key=e.only,t.text=e.product_name,t.id=e.id,u.push(t),t})),this.setState({codeInfo:c,isload:!0,tempdata:t.goods||[],plan_time:[t.plan.begin_time,t.plan.end_time],rank:d,rankoptions:u})}),(e=>{}))})).catch((e=>{}))}getTableList(){if(sessionStorage.getItem("addMoneyData")){const e=JSON.parse(sessionStorage.getItem("addMoneyData")),t=Object(de.a)(this.state.tempdata).map((t=>(e.map((e=>{t.channel_activity_id===e.channel_activity_id&&(t.origin.recharge_amount=e.recharge_amount)})),t)));this.setState({tempdata:t})}}transFormData(e){const t=[],i=[];return e.reduce.map((e=>{2===this.state.isState&&(e.quantity=e.total_stock,e.usage=e.use_stock);let a=Zi(e);if(1===this.state.isState){const t=parseInt(L(e.all_budget,F(e.reduce_amount,e.send_num)));a.quantity=t,a.stock=t,a.usage=0,a.origin=Object(o.a)(e,["id","total_stock","use_stock","stock","goods_id"]),a=Object(o.a)(a,["product_id"])}if(2===this.state.isState){a.disabled=-1!==this.codeStatus,a.stock=e.stock,a.quantity=e.total_stock;const t=["total_stock","use_stock"];a.origin=Object(o.a)(e,t),a=Object(o.a)(a,t)}a.send_num=e.send_num,t.push(a),i.push(a.origin)})),sessionStorage.setItem("knockGoldData",JSON.stringify(i)),t}onRankChange(e){Object(Ti.a)(this.state.tempdata,(t=>{t.checked=e.findIndex((e=>e.key==t.only))>-1})),this.setState({tempdata:this.state.tempdata}),this.setState({rank:e})}cancel(){G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:"\u662f\u5426\u53d6\u6d88\u672c\u6b21\u64cd\u4f5c\uff1f"},void 0,!1,{fileName:Xi,lineNumber:319,columnNumber:16},this),onConfirm:()=>{window.location.replace("#/home/exchangecode-list")},onCancel:this.onCancel,className:"questModal",parentComponent:this})}buildData(){let e=[];Object(f.a)(this.state.rank,(t=>{e.push(t.text)}));let t=this.refs.tempdata.getSelectData(),i=t.filter((e=>this.state.oldProduct.indexOf(e.id)<0)),a=[],s=[];Object(f.a)(t,(e=>{if(this.state.oldProduct.indexOf(e.id)>-1){a.push(e.id);let t={};1===e.type?(t.contract_price=e.contract_price,t.cost_price=e.cost_price,t.describe_url=e.describe_url,t.official_price=e.official_price,t.product_id=e.product_id,t.account_type=e.account_type,t.product_name=e.product_name,t.product_type=e.product_type,t.weight=e.weight,t.quantity=e.quantity,t.show_url=e.show_url,t.end_time=e.end_time,t.detail_url=e.detail_url,t.map_product_name=e.map_product_name,t.goods_id=e.goods_id,t.type=e.type):t={...e.origin,type:e.type},s.push(t)}}));let l=Object(Ii.a)(this.state.oldProduct,a,Fi.a);l=l.filter((e=>this.state.new_product.indexOf(e)<0)),this.state.deleteProduct.length>0&&(l=l.concat(this.state.deleteProduct).map(Number)),a=Object(f.a)(s,(e=>e.only)),l=Object(_.a)(l,(e=>a.indexOf(e)<0));const n={legal:[],reduce:[],cash:[]};i.map((e=>{2===e.type?e.origin&&n.reduce.push(e.origin):3===e.type?n.cash.push(e.origin):n.legal.push(e)}));const o={legal:[],reduce:[],cash:[]};s.map((e=>{2===e.type?o.reduce.push(e):3===e.type?o.cash.push(e):o.legal.push(e)}));const{codeInfo:r}=this.state;return{data:{reseller_id:this.state.reseller.id,reseller_name:this.state.reseller.name,company_name:this.state.reseller.company_name,receive_email:this.state.reseller.receive_email,payment_direction:this.state.payment_direction[this.state.payType-1],title:r.code_name,range:e,recharge_type:2,restrict:1,group_info:{type:2,is_webview:r.is_webview,quantity:r.quantity,instructionType:r.instructionType,group_cover:"",group_image:r.group_image[0]?r.group_image[0].src:"",instruction:r.instruction,receive_mode:r.receive_mode,channel:r.channel,time_limit:{timer_show:r.timer_show,effect_time:{end_time:r.date_time[1],start_time:r.date_time[0]},receive_time:{end_time:r.timer[1]||"",start_time:r.timer[0]||""}}},instruction:r.instruction,begin_time:r.date_time[0],end_time:r.date_time[1],quantity:r.issued,new_product:n,update_product:o,delete_product:l},addProduct:i,updateProduct:s}}copyOrAddBuildData(){let e=[];Object(f.a)(this.state.rank,(t=>{e.push(t.text)}));let t=this.refs.tempdata.getSelectData();const{codeInfo:i}=this.state,a={begin_time:i.date_time[0],end_time:i.date_time[1],instruction:i.instruction,quantity:i.issued,range:e.join(),title:i.code_name,restrict:i.restrict,recharge_type:2,group_info:{type:2,is_webview:i.is_webview,quantity:i.quantity,instructionType:i.instructionType,group_cover:"",group_image:i.group_image[0]?i.group_image[0].src:"",instruction:i.instruction,receive_mode:i.receive_mode,channel:i.channel,time_limit:{timer_show:i.timer_show,effect_time:{end_time:i.date_time[1],start_time:i.date_time[0]},receive_time:{end_time:i.timer[1]||"",start_time:i.timer[0]||""}}},product:{legal:[],reduce:t.filter((e=>2===e.type)).map((e=>Object(o.a)(e.origin,["goods_id"]))),cash:[]}};return 1===this.state.isState&&(a.copy_code_batch_id=ta),{code_batch:[a],reseller_id:this.state.reseller.id,reseller_name:this.state.reseller.name,company_name:this.state.reseller.company_name,receive_email:this.state.reseller.receive_email,payment_direction:this.state.payment_direction[this.state.payType-1],addCode:!0}}submitCodeData(){if(!this.state.reseller)return void c.a.error("\u8be5\u5151\u6362\u7801\u5bf9\u5e94\u5206\u9500\u5546\u4e0d\u5b58\u5728");let{data:e}=this.buildData();Object(a.xc)(ta,e).then((e=>{Object(a.Tb)(e,((e,t)=>{let i=this.state.model;i.show_url=e.path,this.setState({model:i}),c.a.clear(),c.a.success(t),setTimeout((()=>{window.location.replace("#/home/exchangecode-list")}),1e3)}),(e=>{c.a.error(e)}))}))}submitCopyOrAddCodeData(){let e=this.copyOrAddBuildData(),t=sessionStorage.getItem("keyBatch_id");Object(a.Zb)(t,e).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.success("\u6210\u529f\u53d1\u8d77\u5ba1\u6279"),setTimeout((()=>{window.history.back()}),1e3)}),(e=>{c.a.error(e)}))}))}submit(){if(!this.refs.code_info.validator()||!this.refs.code_rule.validator())return;let e=this.state.tempdata.filter((e=>e.checked)),t=!1;if(e.map((e=>{e.quantity{Object(a.Tb)(e,((e,t)=>{e.is_require_approval?this.setState({audit_visible:!0}):this.submitCodeData()}),(e=>{c.a.error(e)}))})):Object(a.Q)(s).then((t=>{Object(a.Tb)(t,((t,i)=>{0==t.status&&(this.setState({approvalsStatus:!0}),this.setState({recall_visible:!0})),1!=t.status&&2!=t.status&&3!=t.status||Object(a.eb)(ta,e).then((e=>{Object(a.Tb)(e,((e,t)=>{e.is_require_approval?this.setState({audit_visible:!0}):this.submitCodeData()}),(e=>{c.a.error(e)}))}))}),(e=>{c.a.error(e)}))}))}else{let e=this.refs.tempdata.getSelectData();if(this.state.uploading)return c.a.error("\u8fd8\u6709\u56fe\u7247\u4e0a\u4f20\u4e2d\uff0c\u4e0d\u53ef\u63d0\u4ea4");if(e.length<1)return c.a.error("\u8bf7\u7ed1\u5b9a\u5bf9\u8c61");if(!this.state.reseller)return c.a.error("\u8be5\u5151\u6362\u7801\u5bf9\u5e94\u5206\u9500\u5546\u4e0d\u5b58\u5728");this.setState({audit_visible:!0})}}onConfirm(){this.setState({audit_visible:!1}),2!==this.state.isState?this.submitCopyOrAddCodeData():this.submitCodeData()}addProduct(e){let t=this.state.direct_reseller_id;return this.state.isState||this.state.codeInfo.planSelect.key?this.state.codeInfo.date_time.filter((e=>e)).length<2?c.a.error("\u8bf7\u9009\u62e9\u751f\u6548\u65f6\u95f4\u6bb5"):t?void this.setState({productData:null,drawerVisible:!0,addIsType:e,product_title:"\u65b0\u589e\u7acb\u51cf\u91d1"}):c.a.error("\u8bf7\u6dfb\u52a0\u6620\u5c04\u5206\u9500\u5546"):c.a.error("\u8bf7\u9009\u62e9\u5f52\u5c5e\u8ba1\u5212")}async productEditShow(e){if(!this.state.direct_reseller_id)return c.a.error("\u8bf7\u6dfb\u52a0\u6620\u5c04\u5206\u9500\u5546");this.setState({product_title:"\u7f16\u8f91\u7acb\u51cf\u91d1",productData:e.origin,addIsType:2,drawerVisible:!0})}onChangeCombinedDate(e){let t=this.state.codeInfo;t.date_time=e,this.setState({codeInfo:t}),this.state.tempdata.map((e=>{e.origin.time_limit.effect_time.start_time=this.state.codeInfo.date_time[0],e.origin.time_limit.effect_time.end_time=this.state.codeInfo.date_time[1]}))}async productSubmit(){if(await this.refs.knockGold.submit()){this.setState({drawerVisible:!1});let e=[],t=[],i=[];e=JSON.parse(sessionStorage.getItem("knockGoldData")),i=this.state.tempdata.filter((e=>2!==e.type)),t=Object(f.a)(e,(e=>{let t=this.state.tempdata.findIndex((t=>t.channel_activity_id===e.channel_activity_id));return t>-1&&(e.checked=this.state.tempdata[t].checked),e.id&&(e.disabled=!0),Zi(e)}));let a=te(t.concat(i),"only"),s=[],l=[];Object(f.a)(a,(e=>{s.push({key:e.only,text:e.product_name}),e.checked&&l.push({key:e.only,text:e.product_name})})),s=te(s,"key"),this.setState({tempdata:a,rankoptions:s,rank:l}),this.getTableList()}}onReCall(){let e=sessionStorage.getItem("approval_id");this.setState({recall_visible:!1}),Object(a.bd)(e).then((e=>{Object(a.Tb)(e,((e,t)=>{this.setState({approvalLoading:!0});let i=setInterval((()=>{this.state.timer<=0&&(clearInterval(i),this.setState({approvalLoading:!1}),c.a.success("\u64a4\u9500\u6210\u529f,\u8bf7\u91cd\u65b0\u63d0\u4ea4\u5ba1\u6838"));let e=this.state.timer-1;this.setState({timer:e})}),1e3)}),(e=>{c.a.error(e)}))}))}handleChange(e,t){let i=this.state.codeInfo;i[t]=e,this.setState({codeInfo:i})}vestingPlanFunction(e){if(null===e||void 0===e||!e.key)return;this.getKeyBatchSelect(e.key),this.getResellerFunction(e.reseller_id),this.handleChange("","keyBatchSelect"),this.setState({plan_time:[e.begin_time,e.end_time]});const t={begin_time:e.begin_time,end_time:e.end_time};sessionStorage.setItem("knockGold_effectDate",JSON.stringify(t))}onUploadError(e,t){"overMaxAmount"===e?c.a.error(`\u6700\u591a\u53ef\u4e0a\u4f20 ${t.maxAmount} \u5f20\u56fe\u7247`):"overMaxSize"===e&&c.a.error(`\u56fe\u7247\u5927\u5c0f\u4e0d\u80fd\u8d85\u8fc7 ${t.formattedMaxSize}`)}imgUpload(e){return new Promise(((t,i)=>{try{let s=new FormData;s.append("file",e),s.append("path","common_image"),Object(a.cd)(s).then((e=>{Object(a.Tb)(e,((e,i)=>{t(e.path)}),(e=>{c.a.error(e),i(e)}))}))}catch(s){i(s)}}))}onUploadChangeGoods(e){e.length>0?this.imgUpload(e[0].file).then((t=>{this.handleChange([{src:t,id:`${(new Date).getTime()}-0`,name:e[0].file.name}],"group_image")})):this.handleChange([],"group_image")}onDisabledRange1(e,t){let i=!1;return"end"==t&&(i=Y()(e.getTime()).add(1,"days")<=(new Date).getTime()),"start"==t&&(i=e.getTime()<=(new Date).getTime()),i}render(){return Object(h.jsxDEV)("div",{id:"combiningAdd",children:[Object(h.jsxDEV)("div",{children:Object(h.jsxDEV)(d.a,{className:"card1",title:"\u57fa\u672c\u4fe1\u606f",children:[Object(h.jsxDEV)("div",{className:"addcode",children:Object(h.jsxDEV)(l.a,{model:this.state.codeInfo,rules:$i,ref:"code_info",className:"addform",children:[Object(h.jsxDEV)(s.a,{labelname:"\u5f52\u5c5e\u8ba1\u5212",prop:"planSelect",id:"planSelect",children:Object(h.jsxDEV)(X.a,{onChange:e=>{this.handleChange(e,"planSelect"),this.vestingPlanFunction(e)},clearable:!0,value:this.state.codeInfo.planSelect,options:this.state.planSelectData,placeholder:"\u8bf7\u9009\u62e9",labelWidth:"0px",height:"36px",width:"520px",disabled:this.state.isState,alignment:"left"},void 0,!1,{fileName:Xi,lineNumber:954,columnNumber:19},this)},void 0,!1,{fileName:Xi,lineNumber:953,columnNumber:17},this),Object(h.jsxDEV)(s.a,{labelname:"\u5f52\u5c5ekey",prop:"keyBatchSelect",id:"keyBatchSelect",children:Object(h.jsxDEV)(X.a,{onChange:e=>{this.handleChange(e,"keyBatchSelect"),sessionStorage.setItem("keyBatch_id",null===e||void 0===e?void 0:e.id)},clearable:!0,value:this.state.codeInfo.keyBatchSelect,options:this.state.keyBatchSelectData,placeholder:"\u8bf7\u9009\u62e9",labelWidth:"0px",height:"36px",width:"520px",disabled:this.state.isState,alignment:"left"},void 0,!1,{fileName:Xi,lineNumber:972,columnNumber:19},this)},void 0,!1,{fileName:Xi,lineNumber:971,columnNumber:17},this),Object(h.jsxDEV)(s.a,{labelname:"\u7ec4\u5408\u5546\u54c1\u540d\u79f0",prop:"code_name",id:"code_name",children:Object(h.jsxDEV)(n.a,{onChange:e=>this.handleChange(e,"code_name"),onClearItem:()=>this.handleChange("","code_name"),value:this.state.codeInfo.code_name,placeholder:"\u8bf7\u8f93\u5165\u7ec4\u5408\u5546\u54c1\u540d\u79f0",labelWidth:"0px",maxLength:12,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:Xi,lineNumber:991,columnNumber:19},this)},void 0,!1,{fileName:Xi,lineNumber:990,columnNumber:17},this),Object(h.jsxDEV)(s.a,{labelname:"\u7ed1\u5b9a\u6570",prop:"restrict",id:"restrict",children:Object(h.jsxDEV)("div",{className:"line",children:this.state.codeInfo.restrict},void 0,!1,{fileName:Xi,lineNumber:1005,columnNumber:19},this)},void 0,!1,{fileName:Xi,lineNumber:1004,columnNumber:17},this),2===this.state.isState&&-1!==this.codeStatus?Object(h.jsxDEV)(h.Fragment,{children:[Object(h.jsxDEV)(s.a,{labelname:"\u53d1\u653e\u603b\u91cf",prop:"issued",id:"issued",children:Object(h.jsxDEV)("div",{className:"line",children:this.state.codeInfo.issued},void 0,!1,{fileName:Xi,lineNumber:1011,columnNumber:23},this)},void 0,!1,{fileName:Xi,lineNumber:1010,columnNumber:21},this),Object(h.jsxDEV)(s.a,{labelname:"\u5269\u4f59\u5e93\u5b58\u91cf",prop:"stock",id:"stock",children:Object(h.jsxDEV)("div",{className:"line",children:this.state.codeInfo.stock},void 0,!1,{fileName:Xi,lineNumber:1014,columnNumber:23},this)},void 0,!1,{fileName:Xi,lineNumber:1013,columnNumber:21},this)]},void 0,!0):Object(h.jsxDEV)(s.a,{labelname:"\u53d1\u653e\u603b\u91cf",prop:"issued",id:"issued",children:Object(h.jsxDEV)(n.a,{onChange:e=>this.handleChange(e,"issued"),onClearItem:()=>this.handleChange("","issued"),value:this.state.codeInfo.issued,placeholder:"\u8bf7\u8f93\u5165\u53d1\u653e\u603b\u91cf",labelWidth:"0px",maxLength:6,countShow:!1,unit:"\u6761",height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:Xi,lineNumber:1019,columnNumber:21},this)},void 0,!1,{fileName:Xi,lineNumber:1018,columnNumber:19},this),Object(h.jsxDEV)(s.a,{labelname:"\u53d1\u653e\u6e20\u9053",prop:"channel",id:"type",children:Object(h.jsxDEV)(Q.a,{disabled:!!this.state.tempdata.length&&1!==this.state.isState,onChange:({target:e})=>{this.handleChange(e.value,"channel"),"3"===e.value?this.handleChange(2,"receive_mode"):this.handleChange(1,"receive_mode"),"1"===e.value?this.handleChange(z,"instruction"):"2"===e.value?this.handleChange(A,"instruction"):this.handleChange(J,"instruction"),1===this.state.isState&&(this.setState({tempdata:[],tempdata:[],rankoptions:[],rank:[]}),sessionStorage.setItem("knockGoldData",JSON.stringify([]))),this.handleChange(0,"is_webview")},value:this.state.codeInfo.channel,children:Object(h.jsxDEV)(Ei.a,{trigger:"hover",content:"\u53ea\u80fd\u7ec4\u5408\u540c\u4e00\u79cd\u6e20\u9053\u7acb\u51cf\u91d1",children:[Object(h.jsxDEV)(ne.a,{value:"1",children:"\u652f\u4ed8\u5b9d"},void 0,!1,{fileName:Xi,lineNumber:1062,columnNumber:23},this),Object(h.jsxDEV)(ne.a,{value:"2",children:"\u5fae\u4fe1"},void 0,!1,{fileName:Xi,lineNumber:1063,columnNumber:23},this),Object(h.jsxDEV)(ne.a,{value:"3",children:"\u4e91\u95ea\u4ed8"},void 0,!1,{fileName:Xi,lineNumber:1064,columnNumber:23},this)]},void 0,!0,{fileName:Xi,lineNumber:1061,columnNumber:21},this)},void 0,!1,{fileName:Xi,lineNumber:1036,columnNumber:19},this)},void 0,!1,{fileName:Xi,lineNumber:1035,columnNumber:17},this),2==this.state.codeInfo.channel?Object(h.jsxDEV)(s.a,{labelname:"\u6253\u5f00\u65b9\u5f0f",prop:"is_webview",id:"is_webview",children:Object(h.jsxDEV)(Q.a,{disabled:2===this.state.isState,onChange:({target:e})=>{this.handleChange(e.value,"is_webview")},value:this.state.codeInfo.is_webview,children:[Object(h.jsxDEV)(ne.a,{value:0,children:"\u5c0f\u7a0b\u5e8f"},void 0,!1,{fileName:Xi,lineNumber:1077,columnNumber:23},this),Object(h.jsxDEV)(ne.a,{value:1,children:"\u516c\u4f17\u53f7"},void 0,!1,{fileName:Xi,lineNumber:1078,columnNumber:23},this)]},void 0,!0,{fileName:Xi,lineNumber:1070,columnNumber:21},this)},"is_webview",!1,{fileName:Xi,lineNumber:1069,columnNumber:19},this):null,1==this.state.codeInfo.channel?Object(h.jsxDEV)(s.a,{labelname:"\u9886\u53d6\u65b9\u5f0f",prop:"receive_mode",id:"receive_mode",children:Object(h.jsxDEV)(Q.a,{disabled:!!this.state.tempdata.length&&1!==this.state.isState,onChange:({target:e})=>{this.handleChange(e.value,"receive_mode"),1===this.state.isState&&(this.setState({tempdata:[],rankoptions:[],rank:[]}),sessionStorage.setItem("knockGoldData",JSON.stringify([])))},value:this.state.codeInfo.receive_mode,children:Object(h.jsxDEV)(Ei.a,{trigger:"hover",content:"\u53ea\u80fd\u7ec4\u5408\u540c\u4e00\u79cd\u9886\u53d6\u65b9\u5f0f\u7acb\u51cf\u91d1",children:[Object(h.jsxDEV)(ne.a,{value:1,children:"\u5b98\u65b9\u9886\u53d6"},void 0,!1,{fileName:Xi,lineNumber:1096,columnNumber:25},this),Object(h.jsxDEV)(ne.a,{value:2,children:"\u8d26\u53f7\u9886\u53d6"},void 0,!1,{fileName:Xi,lineNumber:1097,columnNumber:25},this)]},void 0,!0,{fileName:Xi,lineNumber:1095,columnNumber:23},this)},void 0,!1,{fileName:Xi,lineNumber:1084,columnNumber:21},this)},void 0,!1,{fileName:Xi,lineNumber:1083,columnNumber:19},this):null,Object(h.jsxDEV)(s.a,{labelname:"\u63cf\u8ff0\u7c7b\u578b",prop:"instructionType",id:"instructionType",children:Object(h.jsxDEV)(Q.a,{onChange:({target:e})=>{this.handleChange(e.value,"instructionType")},value:this.state.codeInfo.instructionType,children:[Object(h.jsxDEV)(ne.a,{value:1,children:"\u6587\u5b57\u63cf\u8ff0"},void 0,!1,{fileName:Xi,lineNumber:1109,columnNumber:21},this),Object(h.jsxDEV)(ne.a,{value:2,children:"\u56fe\u7247\u63cf\u8ff0"},void 0,!1,{fileName:Xi,lineNumber:1110,columnNumber:21},this)]},void 0,!0,{fileName:Xi,lineNumber:1103,columnNumber:19},this)},void 0,!1,{fileName:Xi,lineNumber:1102,columnNumber:17},this),2===this.state.codeInfo.instructionType?Object(h.jsxDEV)(s.a,{prop:"group_image",labelname:"\u5546\u54c1\u63cf\u8ff0",id:"group_image",required:"",children:Object(h.jsxDEV)(gt.a,{className:"good-image-upload-demo",maxSize:5242880,tips:"\u56fe\u7247\u4e0d\u8d85\u8fc7 5M",maxAmount:1,onError:this.onUploadError,onChange:(e,t)=>{this.onUploadChangeGoods(e,t)},sortable:!0,fileList:this.state.codeInfo.group_image,multiple:!0},void 0,!1,{fileName:Xi,lineNumber:1115,columnNumber:21},this)},void 0,!1,{fileName:Xi,lineNumber:1114,columnNumber:19},this):Object(h.jsxDEV)(s.a,{labelname:"\u4f7f\u7528\u8bf4\u660e",prop:"instruction",id:"instruction",required:!1,children:Object(h.jsxDEV)(Wi,{pageType:"detaileditor",setEdittext:e=>{this.handleChange(e,"instruction")},width:"520px",text:this.state.codeInfo.instruction,limitLength:5e3},this.state.codeInfo.channel,!1,{fileName:Xi,lineNumber:1136,columnNumber:21},this)},void 0,!1,{fileName:Xi,lineNumber:1130,columnNumber:19},this)]},void 0,!0,{fileName:Xi,lineNumber:947,columnNumber:15},this)},void 0,!1,{fileName:Xi,lineNumber:946,columnNumber:13},this),Object(h.jsxDEV)(Yi,{data:this.state.codeInfo,products:this.state.tempdata},void 0,!1,{fileName:Xi,lineNumber:1150,columnNumber:13},this)]},void 0,!0,{fileName:Xi,lineNumber:945,columnNumber:11},this)},void 0,!1,{fileName:Xi,lineNumber:944,columnNumber:9},this),Object(h.jsxDEV)("div",{children:Object(h.jsxDEV)(d.a,{style:{width:"90%",margin:"10px auto"},title:"\u57fa\u672c\u89c4\u5219",children:Object(h.jsxDEV)("div",{children:Object(h.jsxDEV)(l.a,{model:this.state.codeInfo,rules:Gi,ref:"code_rule",className:"addform",children:[Object(h.jsxDEV)(s.a,{labelname:"\u751f\u6548\u65f6\u95f4\u6bb5",prop:"date_time",id:"date_time",children:[Object(h.jsxDEV)(ee.a,{className:"zent-datepicker-plan",showTime:{format:"HH:mm:ss",defaultTime:["00:00:00","23:59:59"]},disabled:[2===this.state.isState&&[1,2,3,7].includes(this.codeStatus),!1],format:"YYYY-MM-DD HH:mm:ss",value:this.state.codeInfo.date_time,onChange:e=>{$t.a.emit("change","date_time",e),this.onChangeCombinedDate(e)},width:245,disabledTime:this.onDisabledTime,disabledDate:this.onDisabledRange},void 0,!1,{fileName:Xi,lineNumber:1163,columnNumber:19},this),Object(h.jsxDEV)(Q.a,{style:{marginLeft:"20px"},onChange:({target:e})=>{this.handleChange(e.value,"timer_show")},value:this.state.codeInfo.timer_show,children:[Object(h.jsxDEV)(ne.a,{value:1,children:"\u663e\u793a"},void 0,!1,{fileName:Xi,lineNumber:1190,columnNumber:21},this),Object(h.jsxDEV)(ne.a,{value:2,children:"\u9690\u85cf"},void 0,!1,{fileName:Xi,lineNumber:1191,columnNumber:21},this)]},void 0,!0,{fileName:Xi,lineNumber:1183,columnNumber:19},this)]},void 0,!0,{fileName:Xi,lineNumber:1162,columnNumber:17},this),2===this.state.codeInfo.timer_type?Object(h.jsxDEV)(s.a,{id:"timer",labelname:"\u9886\u53d6\u65f6\u95f4\u6bb5",prop:"timer",children:[Object(h.jsxDEV)(re.a,{className:"zent-datepicker-plan",showTime:{format:"HH:mm:ss",defaultTime:[Y()().format("HH:mm:ss"),"23:59:59"]},value:this.state.codeInfo.timer,onChange:e=>{this.handleChange(e,"timer")},width:"240px",disabledTime:this.onDisabledRange1},void 0,!1,{fileName:Xi,lineNumber:1196,columnNumber:21},this),Object(h.jsxDEV)(Q.a,{style:{marginLeft:"15px"},onChange:({target:e})=>{this.handleChange(e.value,"timer_type"),1===e.value&&this.handleChange([],"timer")},value:this.state.codeInfo.timer_type,children:[Object(h.jsxDEV)(ne.a,{value:1,children:"\u4e0d\u8bbe\u7f6e"},void 0,!1,{fileName:Xi,lineNumber:1219,columnNumber:23},this),Object(h.jsxDEV)(ne.a,{value:2,children:"\u6bcf\u65e5"},void 0,!1,{fileName:Xi,lineNumber:1220,columnNumber:23},this)]},void 0,!0,{fileName:Xi,lineNumber:1209,columnNumber:21},this)]},void 0,!0,{fileName:Xi,lineNumber:1195,columnNumber:19},this):Object(h.jsxDEV)(s.a,{id:"timer",labelname:"\u9886\u53d6\u65f6\u95f4\u6bb5",children:Object(h.jsxDEV)(Q.a,{onChange:({target:e})=>{this.handleChange(e.value,"timer_type")},value:this.state.codeInfo.timer_type,children:[Object(h.jsxDEV)(ne.a,{value:1,children:"\u4e0d\u8bbe\u7f6e"},void 0,!1,{fileName:Xi,lineNumber:1231,columnNumber:23},this),Object(h.jsxDEV)(ne.a,{value:2,children:"\u6bcf\u65e5"},void 0,!1,{fileName:Xi,lineNumber:1232,columnNumber:23},this)]},void 0,!0,{fileName:Xi,lineNumber:1225,columnNumber:21},this)},void 0,!1,{fileName:Xi,lineNumber:1224,columnNumber:19},this),Object(h.jsxDEV)(s.a,{labelname:"\u5546\u54c1\u8303\u56f4",prop:"rank",id:"rank",children:Object(h.jsxDEV)("div",{className:"goods-boxs",children:[Object(h.jsxDEV)(X.a,{options:this.state.rankoptions,multiple:!0,value:this.state.rank,placeholder:"\u9009\u62e9\u4e00\u9879",disabled:2==this.state.isState&&-1!==this.codeStatus,width:410,onChange:e=>{this.onRankChange(e)}},void 0,!1,{fileName:Xi,lineNumber:1238,columnNumber:21},this),2!==this.state.isState||-1===this.codeStatus?Object(h.jsxDEV)(u.a,{type:"primary",style:{marginLeft:"20px"},onClick:()=>{this.addProduct()},disabled:!JSON.parse(sessionStorage.getItem("isEarlyWarningMan")),children:"\u65b0\u5efa\u7acb\u51cf\u91d1"},void 0,!1,{fileName:Xi,lineNumber:1250,columnNumber:23},this):null]},void 0,!0,{fileName:Xi,lineNumber:1237,columnNumber:19},this)},void 0,!1,{fileName:Xi,lineNumber:1236,columnNumber:17},this),Object(h.jsxDEV)(s.a,{labelname:"",prop:"range",id:"range",children:Object(h.jsxDEV)(I,{ref:"tempdata",headBackgroud:"#f9fafc",isShowPageBar:!1,spliteColor:"#fff",tableData:this.state.tempdata,value:this.state.tempdata,Column:Qi,maxheight:200,countbarVisible:!1,isBorder:!0,isSwitch:!1,pageChange:e=>{this.pageChange(e)},checkChange:e=>{let t=[];Object(f.a)(e,(e=>{let i={};return i.key=e.only,i.text=e.product_name,t.push(i),i})),this.setState({rank:t})},ComponentHandler:(e,t)=>"type"==e?Object(h.jsxDEV)(h.Fragment,{children:"\u7acb\u51cf\u91d1"},void 0,!1):"effectDate"==e?Object(h.jsxDEV)(h.Fragment,{children:[this.state.codeInfo.date_time[0]," \u81f3 ",this.state.codeInfo.date_time[1]]},void 0,!0):"cost_price"==e?Object(h.jsxDEV)(h.Fragment,{children:2===t.type?t.official_price:t.cost_price},void 0,!1):"edit"==e?Object(h.jsxDEV)("a",{className:"grid-link",onClick:e=>{this.productEditShow(t)},children:"\u7f16\u8f91"},void 0,!1,{fileName:Xi,lineNumber:1308,columnNumber:27},this):void 0},void 0,!1,{fileName:Xi,lineNumber:1264,columnNumber:19},this)},void 0,!1,{fileName:Xi,lineNumber:1263,columnNumber:17},this)]},void 0,!0,{fileName:Xi,lineNumber:1156,columnNumber:15},this)},void 0,!1,{fileName:Xi,lineNumber:1155,columnNumber:13},this)},void 0,!1,{fileName:Xi,lineNumber:1154,columnNumber:11},this)},void 0,!1,{fileName:Xi,lineNumber:1153,columnNumber:9},this),Object(h.jsxDEV)(bt.a,{className:"draw",width:"86%",title:this.state.product_title,footer:Object(h.jsxDEV)("div",{style:{textAlign:"center"},children:[Object(h.jsxDEV)(u.a,{type:"primary",onClick:e=>{this.productSubmit()},children:"\u63d0\u4ea4"},void 0,!1,{fileName:Xi,lineNumber:1331,columnNumber:15},this),Object(h.jsxDEV)(u.a,{onClick:e=>{this.setState({drawerVisible:!1}),this.getTableList()},children:"\u53d6\u6d88"},void 0,!1,{fileName:Xi,lineNumber:1339,columnNumber:15},this)]},void 0,!0,{fileName:Xi,lineNumber:1330,columnNumber:13},this),visible:this.state.drawerVisible,onClose:e=>{this.setState({drawerVisible:!1})},maskClosable:!1,children:Object(h.jsxDEV)("div",{className:"draw2",children:Object(h.jsxDEV)(d.a,{style:{width:"95%",margin:"10px auto",border:0},children:Object(h.jsxDEV)(qe,{ref:"knockGold",data:this.state.productData,combining:this.state.codeInfo},void 0,!1,{fileName:Xi,lineNumber:1357,columnNumber:15},this)},void 0,!1,{fileName:Xi,lineNumber:1356,columnNumber:13},this)},void 0,!1,{fileName:Xi,lineNumber:1355,columnNumber:11},this)},void 0,!1,{fileName:Xi,lineNumber:1325,columnNumber:9},this),this.state.audit_visible?Object(h.jsxDEV)("div",{className:"audit",children:[Object(h.jsxDEV)("div",{className:"modal",children:" "},void 0,!1,{fileName:Xi,lineNumber:1368,columnNumber:13},this),Object(h.jsxDEV)("div",{className:"audit-box",children:[Object(h.jsxDEV)(g.a,{type:"close",className:"audit-close",onClick:e=>{this.setState({audit_visible:!1})}},void 0,!1,{fileName:Xi,lineNumber:1370,columnNumber:15},this),Object(h.jsxDEV)("div",{className:"audit-box-title",children:"\u63d0\u4ea4\u5ba1\u6838"},void 0,!1,{fileName:Xi,lineNumber:1377,columnNumber:15},this),Object(h.jsxDEV)("div",{className:"payType",children:Object(h.jsxDEV)(Q.a,{onChange:e=>this.setState({payType:e.target.value}),value:this.state.payType,className:"audit-obj",children:[Object(h.jsxDEV)(Z.a,{value:3,children:"\u9884\u4ed8\u6b3e\u6263\u9664"},void 0,!1,{fileName:Xi,lineNumber:1384,columnNumber:19},this),Object(h.jsxDEV)(Z.a,{value:1,children:"\u5bf9\u79c1\u8d26\u6237"},void 0,!1,{fileName:Xi,lineNumber:1385,columnNumber:19},this),Object(h.jsxDEV)(Z.a,{value:2,children:"\u5bf9\u516c\u8d26\u6237"},void 0,!1,{fileName:Xi,lineNumber:1386,columnNumber:19},this)]},void 0,!0,{fileName:Xi,lineNumber:1379,columnNumber:17},this)},void 0,!1,{fileName:Xi,lineNumber:1378,columnNumber:15},this),Object(h.jsxDEV)("div",{className:"audit-btn-group",children:[Object(h.jsxDEV)(u.a,{onClick:e=>{this.setState({audit_visible:!1})},children:"\u53d6\u6d88"},void 0,!1,{fileName:Xi,lineNumber:1390,columnNumber:17},this),Object(h.jsxDEV)(u.a,{type:"primary",onClick:e=>{this.onConfirm(e)},children:"\u786e\u5b9a"},void 0,!1,{fileName:Xi,lineNumber:1397,columnNumber:17},this)]},void 0,!0,{fileName:Xi,lineNumber:1389,columnNumber:15},this)]},void 0,!0,{fileName:Xi,lineNumber:1369,columnNumber:13},this)]},void 0,!0,{fileName:Xi,lineNumber:1367,columnNumber:11},this):null,this.state.recall_visible?Object(h.jsxDEV)("div",{className:"audit",children:[Object(h.jsxDEV)("div",{className:"modal",children:" "},void 0,!1,{fileName:Xi,lineNumber:1411,columnNumber:13},this),Object(h.jsxDEV)("div",{className:"audit-box",children:[Object(h.jsxDEV)(g.a,{type:"close",className:"audit-close",onClick:e=>{this.setState({recall_visible:!1})}},void 0,!1,{fileName:Xi,lineNumber:1413,columnNumber:15},this),Object(h.jsxDEV)("div",{className:"audit-box-title",children:"\u5f53\u524d\u6b63\u5728\u5ba1\u6838\u4e2d"},void 0,!1,{fileName:Xi,lineNumber:1420,columnNumber:15},this),Object(h.jsxDEV)("div",{className:"audit-box-txt",children:"\u63d0\u4ea4\u5ba1\u6838\u4f1a\u5c06\u539f\u6765\u5ba1\u6279\u64a4\u56de\u624d\u53ef\u8fdb\u884c\u63d0\u4ea4,\u662f\u5426\u64a4\u56de?"},void 0,!1,{fileName:Xi,lineNumber:1421,columnNumber:15},this),Object(h.jsxDEV)("div",{className:"audit-btn-group",children:[Object(h.jsxDEV)(u.a,{onClick:e=>{this.setState({recall_visible:!1})},children:"\u53d6\u6d88"},void 0,!1,{fileName:Xi,lineNumber:1423,columnNumber:17},this),Object(h.jsxDEV)(u.a,{type:"primary",onClick:e=>{this.onReCall(e)},children:"\u786e\u5b9a"},void 0,!1,{fileName:Xi,lineNumber:1430,columnNumber:17},this)]},void 0,!0,{fileName:Xi,lineNumber:1422,columnNumber:15},this)]},void 0,!0,{fileName:Xi,lineNumber:1412,columnNumber:13},this)]},void 0,!0,{fileName:Xi,lineNumber:1410,columnNumber:11},this):null,this.state.approvalLoading?Object(h.jsxDEV)("div",{className:"audit",children:[Object(h.jsxDEV)("div",{className:"modal",children:" "},void 0,!1,{fileName:Xi,lineNumber:1444,columnNumber:13},this),Object(h.jsxDEV)("div",{className:"audit-box",children:[Object(h.jsxDEV)("div",{className:"audit-box-title",children:"\u64a4\u9500\u5ba1\u6279\u4e2d"},void 0,!1,{fileName:Xi,lineNumber:1446,columnNumber:15},this),Object(h.jsxDEV)("div",{className:"audit-box-txt",children:["\u6b63\u5728\u53d1\u8d77\u64a4\u9500...,\u8bf7\u7b49\u5f85 ",Object(h.jsxDEV)("span",{style:{color:"red"},children:[" ",this.state.timer]},void 0,!0,{fileName:Xi,lineNumber:1448,columnNumber:31},this)," \u79d2"]},void 0,!0,{fileName:Xi,lineNumber:1447,columnNumber:15},this)]},void 0,!0,{fileName:Xi,lineNumber:1445,columnNumber:13},this)]},void 0,!0,{fileName:Xi,lineNumber:1443,columnNumber:11},this):null,Object(h.jsxDEV)("div",{className:"edit-btnList",children:[Object(h.jsxDEV)(u.a,{type:"primary",onClick:()=>this.submit(),children:"\u63d0\u4ea4\u5ba1\u6838"},void 0,!1,{fileName:Xi,lineNumber:1455,columnNumber:11},this),Object(h.jsxDEV)(u.a,{type:"normal",onClick:()=>this.cancel(),children:"\u53d6\u6d88"},void 0,!1,{fileName:Xi,lineNumber:1458,columnNumber:11},this)]},void 0,!0,{fileName:Xi,lineNumber:1454,columnNumber:9},this)]},void 0,!0,{fileName:Xi,lineNumber:943,columnNumber:7},this)}}i(238);const aa=[{title:"\u5151\u6362\u7801-\u6279\u6b21ID",name:"id",prop:"id",type:"normal",width:"auto"},{title:"\u5151\u6362\u7801\u540d\u79f0",prop:"title",name:"title",width:"auto",type:"solt"},{title:"\u6709\u6548\u671f",name:"time",prop:"time",type:"slot",width:"250px"},{title:"\u8425\u9500\u8ba1\u5212\u5f52\u5c5e",name:"plan_title",type:"normal",prop:"plan_title",width:"auto"},{title:"\u5f52\u5c5eKEY\u6279\u6b21ID",name:"key_batch_id",type:"normal",prop:"key_batch_id",width:"auto"},{title:"\u542f\u7528/\u6682\u505c",width:"auto",type:"slot",prop:"switch"},{title:"\u64cd\u4f5c",prop:"opearo",name:"opearo",type:"slot",width:"280px"},{title:"\u72b6\u6001",name:"status",type:"slot",prop:"status",width:"auto"},{title:"\u5238\u603b\u6570(\u5df2\u53d1\u653e)",name:"quantity",type:"normal",prop:"quantity",width:"auto"},{title:"\u5df2\u9886\u53d6",name:"received",type:"normal",prop:"received",width:"auto"},{title:"\u5df2\u4f7f\u7528",name:"usage",type:"normal",prop:"usage",width:"auto"},{title:"\u5269\u4f59\u6570",name:"stock",type:"normal",prop:"stock",width:"auto"},{title:"\u5df2\u5931\u6548",name:"expired",type:"normal",prop:"expired",width:"auto"},{title:"\u5df2\u4f5c\u5e9f",name:"invalid",type:"normal",prop:"invalid",width:"auto"}],sa=[{title:"\u5168\u90e8",index:0},{title:"\u521b\u5efa\u4e2d",index:-1},{title:"\u672a\u5f00\u59cb",index:3},{title:"\u5ba1\u6838\u4e2d",index:6},{title:"\u672a\u901a\u8fc7",index:7},{title:"\u8fdb\u884c\u4e2d",index:1},{title:"\u6682\u505c\u4e2d",index:2},{title:"\u751f\u6210\u4e2d",index:8},{title:"\u5df2\u7ed3\u675f",index:4},{title:"\u5df2\u4f5c\u5e9f",index:5}];var la="/Users/zhangds/web/blue-brother/frontend/src/pages/exchangecode/list/list.js";class na extends m.a.Component{constructor(e){super(e),this.state={codeList:[],total:0,page:1,limit:10,tabList:[...sa],combinedValue:[],DateTime:"",search:this.initSearch(),status:0,tableHeight:600,tabIndex:0,planOptions:[]}}addCodeFunction(e,t){sessionStorage.setItem("knockGold_effectDate",JSON.stringify({})),sessionStorage.setItem("redPackets_effectDate",JSON.stringify({}));let i=[{pagetitle:"\u65b0\u5efa\u5151\u6362\u7801",items:[{path:"/home/exchangecode-list",name:"\u5151\u6362\u7801\u7ba1\u7406"},{path:"/home/exchangecode-exchangecodeAdd",name:"\u65b0\u5efa\u5151\u6362\u7801"}]}];1===e?(i[0].pagetitle="\u590d\u5236",i[0].items[1].name=`\u590d\u5236:${t.title}`,sessionStorage.setItem("keyBatch_id",t.key_batch_id)):2===e&&(i[0].pagetitle="\u7f16\u8f91",i[0].items[1].name=`\u7f16\u8f91:${t.title}\u5151\u6362\u7801\u7684\u5546\u54c1\u8303\u56f4\u5217\u8868`,sessionStorage.setItem("approval_id",t.approval_id),sessionStorage.setItem("approval_status",t.status)),e&&(sessionStorage.setItem("knockGold_effectDate",JSON.stringify(t.keyBatch.plan)),sessionStorage.setItem("redPackets_effectDate",JSON.stringify(t.keyBatch.plan))),sessionStorage.setItem("keyType","1"),sessionStorage.setItem("code_id",null===t||void 0===t?void 0:t.id),sessionStorage.setItem("isState",e),sessionStorage.setItem("breaknav",JSON.stringify(i)),sessionStorage.setItem("pathname2","/home/exchangecode-exchangecodeAdd"),this.props.history.push("/home/exchangecode-exchangecodeAdd")}aboutFn(e,t){sessionStorage.setItem("pathname2","/home/exchange-addcommodity");let i=[{pagetitle:"\u7f16\u8f91",items:[{path:"/home/exchangecode-list",name:"\u5151\u6362\u7801\u7ba1\u7406"},{path:"/home/exchange-addcommodity",name:t.title+"\u5151\u6362\u7801\u7684\u5546\u54c1\u8303\u56f4\u5217\u8868"}]}];sessionStorage.setItem("code_id",t.id),sessionStorage.setItem("isCombining",t.recharge_type),sessionStorage.setItem("breaknav",JSON.stringify(i)),window.open("#/home/exchange-addcommodity")}initSearch(){return{plan_title:"",key_batch_id:"",code_batch_id:"",code_batch_name:""}}searchChange(e,t){const i=this.state.search;i[e]=t,this.setState({search:i})}getPlan(){Object(a.rb)().then((e=>Object(a.Tb)(e,((e,t)=>{const i=e.map((e=>({key:e.id,text:e.title})));this.setState({planOptions:i})}),(e=>{}))))}copyElementFunction(e){var t,i;let a="";return a=([1,2,3].includes(null===e||void 0===e?void 0:e.status)||[4,5].includes(null===e||void 0===e?void 0:e.status)&&[4,5,8].includes(null===(t=e.keyBatch)||void 0===t?void 0:t.status)&&[3,5,4].includes(null===(i=e.keyBatch.plan)||void 0===i?void 0:i.status))&&0===e.keyBatch.plan.settlement_type?Object(h.jsxDEV)("span",{className:"grid-link",style:{},onClick:t=>this.addCodeFunction(1,e),children:"\u590d\u5236"},void 0,!1,{fileName:la,lineNumber:161,columnNumber:9},this):Object(h.jsxDEV)("span",{style:{paddingRight:"10px",color:"#d8dbdd"},children:"\u590d\u5236"},void 0,!1,{fileName:la,lineNumber:167,columnNumber:9},this),a}deleteCodeFunction(e){const t=this;G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:"\u662f\u5426\u5220\u9664\u8be5\u5151\u6362\u7801\uff1f"},void 0,!1,{fileName:la,lineNumber:187,columnNumber:16},this),onConfirm(){Object(a.B)(e.id).then((e=>{Object(a.Tb)(e,((e,i)=>{c.a.clear(),c.a.success(i),t.getCodeListFn()}),(e=>{c.a.error(e)}))})).catch((e=>{}))},onCancel:this.onCancel,className:"questModal",parentComponent:this})}tabFn(e){this.setState({tabIndex:e,search:this.initSearch(),page:1,limit:10}),setTimeout((()=>{this.getCodeListFn({},e)}),10)}pageChange(e){this.setState({page:e}),setTimeout((()=>{this.getCodeListFn()}),10)}countChange(e){this.setState({page:1,limit:e}),setTimeout((()=>{this.getCodeListFn()}),10)}sureFn(){this.setState({page:1,limit:10},(()=>{this.getCodeListFn()}))}delCodeFun(e){let t=this;Object(a.p)(e).then((e=>{Object(a.Tb)(e,((e,i)=>{c.a.clear(),c.a.success(i),t.getCodeListFn()}),(e=>{c.a.error(e)}))})).catch((e=>{}))}delFn(e,t){if(6==t.status)return void c.a.error("\u5ba1\u6838\u4e2d\u7684\u6570\u636e\u4e0d\u5141\u8bb8\u4f5c\u5e9f");let i=this,a={type:2,object_value:t.id};try{Ut(a).then((e=>{2===e?i.delCodeFun(t.id):1===e&&G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:["\u786e\u5b9a\u4f5c\u5e9f",t.title,"\uff1f"]},void 0,!0,{fileName:la,lineNumber:281,columnNumber:22},this),onConfirm(){i.delCodeFun(t.id)},onCancel(){},className:"questModal",parentComponent:this})}))}catch(s){}}changestatus(e,t){let i=this;G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:["\u662f\u5426",1==t.old_status?"\u505c\u7528":"\u542f\u7528","\u8be5\u5151\u6362\u7801\u6279\u6b21\uff1f"]},void 0,!0,{fileName:la,lineNumber:301,columnNumber:16},this),onConfirm:()=>{Object(a.wc)(t.id,{operation:1==t.old_status?"2":"1"}).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.clear(),c.a.success(t),i.getCodeListFn()}),(e=>{c.a.error(e)}))})).catch((e=>{}))},onCancel:this.onCancel,className:"questModal",parentComponent:this})}onChangeCombinedDate(e){this.setState({combinedValue:e}),this.getCodeListFn(e)}getCodeListFn(e={},t=this.state.tabIndex){var i;let s=this,{page:l,limit:n,search:o}=Object(de.a)(s.state);o.plan_title=(null===(i=o.plan_title)||void 0===i?void 0:i.text)||"";let r={page:l,limit:n,...o};this.state.combinedValue&&this.state.combinedValue[0]&&(r.begin_time=this.state.combinedValue[0],r.end_time=this.state.combinedValue[1]),e&&e[0]&&(r.begin_time=e[0],r.end_time=e[1]),e&&null==e[0]&&e.length>1&&r.begin_time&&(delete r.begin_time,delete r.end_time),t&&(r.status=this.state.tabList[t].index,0==t&&(r.status=null)),Object(a.U)(r).then((e=>{let t=JSON.parse(e);if(200==t.code){const e=t.data.data,{total:i}=t.data;s.setState({codeList:e,total:i})}})).catch((e=>{}))}componentWillMount(){this.setState({tableHeight:window.innerHeight-390}),this.getPlan()}onReCall(e,t){let i=t.approval_id;G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:"\u8be5\u6570\u636e\u6b63\u5728\u5ba1\u6279\u4e2d,\u662f\u5426\u786e\u8ba4\u64a4\u9500\u5ba1\u6279\uff1f"},void 0,!1,{fileName:la,lineNumber:384,columnNumber:16},this),onConfirm:()=>{Object(a.bd)(i).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.success("\u64a4\u9500\u5ba1\u6279\u6210\u529f"),setTimeout((()=>{this.getCodeListFn()}),3e3)}),(e=>{c.a.error(e)}))}))},onCancel:this.onCancel,className:"questModal",parentComponent:this})}dingTask(e){Object(a.G)(e).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.success(t),this.getCodeListFn()}),(e=>{c.a.error(e)}))}))}render(){const e=Object(h.jsxDEV)(Jt.a,{showTime:{format:"HH:mm:ss",defaultTime:["00:00:00","23:59:59"]},format:"YYYY-MM-DD HH:mm:ss",className:"zent-datepicker-demo",value:this.state.combinedValue,onChange:e=>{this.onChangeCombinedDate(e)}},void 0,!1,{fileName:la,lineNumber:425,columnNumber:7},this);return Object(h.jsxDEV)("div",{id:"exchangecodelist",children:Object(h.jsxDEV)(Ft,{slot:e,tabs:this.state.tabList,tabChange:this.tabFn.bind(this),width:130,children:[Object(h.jsxDEV)("div",{className:"codetable ",children:[Object(h.jsxDEV)(u.a,{type:"primary",icon:"plus",onClick:()=>this.addCodeFunction(),children:"\u65b0\u5efa\u5151\u6362\u7801"},void 0,!1,{fileName:la,lineNumber:447,columnNumber:13},this),Object(h.jsxDEV)("div",{className:"codesFind",children:Object(h.jsxDEV)(l.a,{children:[Object(h.jsxDEV)(s.a,{labelname:"\u8ba1\u5212\u540d\u79f0\uff1a",required:"",labelwidth:"90px",children:Object(h.jsxDEV)(X.a,{name:"state",value:this.state.search.plan_title,options:this.state.planOptions,placeholder:"\u8bf7\u8f93\u5165",width:204,clearable:!0,onChange:e=>{this.searchChange("plan_title",e)}},void 0,!1,{fileName:la,lineNumber:453,columnNumber:19},this)},void 0,!1,{fileName:la,lineNumber:452,columnNumber:17},this),Object(h.jsxDEV)(s.a,{labelname:"key\u6279\u6b21ID\uff1a",required:"",labelwidth:"100px",children:Object(h.jsxDEV)(n.a,{value:this.state.search.key_batch_id,countShow:!1,labelWidth:"0px",placeholder:"\u8bf7\u8f93\u5165",width:204,onChange:e=>{this.searchChange("key_batch_id",e)},onClearItem:e=>{this.searchChange("key_batch_id","")}},void 0,!1,{fileName:la,lineNumber:466,columnNumber:19},this)},void 0,!1,{fileName:la,lineNumber:465,columnNumber:17},this),Object(h.jsxDEV)(s.a,{labelname:"\u5151\u6362\u7801\u6279\u6b21\u540d\u79f0\uff1a",required:"",labelwidth:"155px",children:Object(h.jsxDEV)(n.a,{value:this.state.search.code_batch_name,countShow:!1,labelWidth:"0px",placeholder:"\u8bf7\u8f93\u5165",width:204,onChange:e=>{this.searchChange("code_batch_name",e)},onClearItem:e=>{this.searchChange("code_batch_name","")}},void 0,!1,{fileName:la,lineNumber:481,columnNumber:19},this)},void 0,!1,{fileName:la,lineNumber:480,columnNumber:17},this),Object(h.jsxDEV)(s.a,{labelname:"\u5151\u6362\u7801\u6279\u6b21ID\uff1a",required:"",labelwidth:"130px",children:Object(h.jsxDEV)(n.a,{value:this.state.search.code_batch_id,countShow:!1,labelWidth:"0px",placeholder:"\u8bf7\u8f93\u5165",width:204,onChange:e=>{this.searchChange("code_batch_id",e)},onClearItem:e=>{this.searchChange("code_batch_id","")}},void 0,!1,{fileName:la,lineNumber:496,columnNumber:19},this)},void 0,!1,{fileName:la,lineNumber:495,columnNumber:17},this),Object(h.jsxDEV)("div",{className:"button_box",children:[Object(h.jsxDEV)(u.a,{type:"primary",onClick:()=>this.getCodeListFn(),children:"\u67e5\u8be2"},void 0,!1,{fileName:la,lineNumber:511,columnNumber:19},this),Object(h.jsxDEV)(u.a,{onClick:()=>this.setState({search:this.initSearch()},(()=>this.getCodeListFn())),children:"\u91cd\u7f6e"},void 0,!1,{fileName:la,lineNumber:514,columnNumber:19},this)]},void 0,!0,{fileName:la,lineNumber:510,columnNumber:17},this)]},void 0,!0,{fileName:la,lineNumber:451,columnNumber:15},this)},void 0,!1,{fileName:la,lineNumber:450,columnNumber:13},this)]},void 0,!0,{fileName:la,lineNumber:446,columnNumber:11},this),Object(h.jsxDEV)("div",{className:"code-table",children:Object(h.jsxDEV)(I,{spliteColor:"#fff",tableData:this.state.codeList,Column:aa,maxheight:this.state.tableHeight,countbarVisible:!1,isSwitch:!1,page:this.state.page,dataCount:this.state.total,isMultiple:!1,pageChange:e=>{this.pageChange(e)},countChange:e=>{this.countChange(e)},checkChange:e=>{},ComponentHandler:(e,t)=>"time"==e?Object(h.jsxDEV)("span",{children:[t.begin_time,"\u81f3",t.end_time]},void 0,!0,{fileName:la,lineNumber:546,columnNumber:21},this):"title"==e?Object(h.jsxDEV)("span",{className:"grid-link",onClick:e=>this.aboutFn(e,t),children:t.title},void 0,!1,{fileName:la,lineNumber:553,columnNumber:21},this):"switch"==e?Object(h.jsxDEV)(v.a,{size:"small",checked:2!=t.old_status,onChange:e=>this.changestatus(e,t),disabled:4==t.status||5==t.status},void 0,!1,{fileName:la,lineNumber:560,columnNumber:21},this):"status"==e?Object(h.jsxDEV)("p",{className:"dflexa",children:Object(h.jsxDEV)("span",{children:[Object(h.jsxDEV)("font",{className:"icon",style:{background:At.exchangeStatusBg(parseInt(t.status))}},void 0,!1,{fileName:la,lineNumber:572,columnNumber:25},this),t.status_text]},void 0,!0,{fileName:la,lineNumber:571,columnNumber:23},this)},void 0,!1,{fileName:la,lineNumber:570,columnNumber:21},this):"opearo"==e?Object(h.jsxDEV)("div",{children:[4!=t.status&&5!=t.status&&8!=t.status&&6!=t.status?Object(h.jsxDEV)("span",{className:"grid-link",onClick:e=>this.addCodeFunction(2,t),children:"\u7f16\u8f91"},void 0,!1,{fileName:la,lineNumber:590,columnNumber:25},this):Object(h.jsxDEV)("span",{style:{color:"#d8dbdd"},className:"grid-link",children:"\u7f16\u8f91"},void 0,!1,{fileName:la,lineNumber:597,columnNumber:25},this),this.copyElementFunction(t),[4,5,8,6,-1].includes(t.status)||7===t.status&&-1===t.old_status?Object(h.jsxDEV)("span",{style:{paddingRight:"10px",color:"#d8dbdd"},children:"\u4f5c\u5e9f"},void 0,!1,{fileName:la,lineNumber:604,columnNumber:25},this):Object(h.jsxDEV)("span",{className:"grid-link",onClick:e=>this.delFn(e,t),children:"\u4f5c\u5e9f"},void 0,!1,{fileName:la,lineNumber:613,columnNumber:25},this),6==t.status&&Number(t.approval_id)>0?Object(h.jsxDEV)("span",{className:"grid-link",onClick:e=>this.onReCall(e,t),children:"\u64a4\u9500\u5ba1\u6279"},void 0,!1,{fileName:la,lineNumber:618,columnNumber:25},this):Object(h.jsxDEV)("span",{style:{color:"#d8dbdd",marginRight:"12px"},children:"\u64a4\u9500\u5ba1\u6279"},void 0,!1,{fileName:la,lineNumber:622,columnNumber:25},this),t.approval_id&&6===t.status?Object(h.jsxDEV)("span",{className:"grid-link",onClick:e=>{this.dingTask(t.approval_id)},children:"\u9489\u9489\u5ba1\u6279\u67e5\u8be2"},void 0,!1,{fileName:la,lineNumber:625,columnNumber:25},this):Object(h.jsxDEV)("span",{className:"grid-link disabled",children:"\u9489\u9489\u5ba1\u6279\u67e5\u8be2"},void 0,!1,{fileName:la,lineNumber:634,columnNumber:25},this),[-1,7].includes(t.status)&&-1==t.old_status?Object(h.jsxDEV)("span",{className:"grid-link",style:{color:"red"},onClick:e=>this.deleteCodeFunction(t),children:"\u5220\u9664"},void 0,!1,{fileName:la,lineNumber:638,columnNumber:25},this):Object(h.jsxDEV)("span",{style:{color:"#d8dbdd"},className:"grid-link",children:"\u5220\u9664"},void 0,!1,{fileName:la,lineNumber:646,columnNumber:25},this)]},void 0,!0,{fileName:la,lineNumber:585,columnNumber:21},this):void 0},void 0,!1,{fileName:la,lineNumber:526,columnNumber:13},this)},void 0,!1,{fileName:la,lineNumber:525,columnNumber:11},this)]},void 0,!0,{fileName:la,lineNumber:440,columnNumber:9},this)},void 0,!1,{fileName:la,lineNumber:439,columnNumber:7},this)}}i(239);const oa=[{title:"\u5151\u6362\u7801-\u6279\u6b21ID",name:"id",prop:"id",type:"normal",width:"auto"},{title:"\u5151\u6362\u7801\u540d\u79f0",prop:"title",name:"title",width:"auto",type:"solt"},{title:"\u6709\u6548\u671f",name:"time",prop:"time",type:"slot",width:"250px"},{title:"\u8425\u9500\u8ba1\u5212\u5f52\u5c5e",name:"plan_title",type:"normal",prop:"plan_title",width:"auto"},{title:"\u5f52\u5c5eKEY\u6279\u6b21ID",name:"key_batch_id",type:"normal",prop:"key_batch_id",width:"auto"},{title:"\u542f\u7528/\u6682\u505c",width:"auto",type:"slot",prop:"switch"},{title:"\u64cd\u4f5c",prop:"opearo",name:"opearo",type:"slot",width:"280px"},{title:"\u72b6\u6001",name:"status",type:"slot",prop:"status",width:"auto"},{title:"\u5238\u603b\u6570(\u5df2\u53d1\u653e)",name:"quantity",type:"normal",prop:"quantity",width:"auto"},{title:"\u5df2\u9886\u53d6",name:"received",type:"normal",prop:"received",width:"auto"},{title:"\u5df2\u4f7f\u7528",name:"usage",type:"normal",prop:"usage",width:"auto"},{title:"\u5269\u4f59\u6570",name:"stock",type:"normal",prop:"stock",width:"auto"},{title:"\u5df2\u5931\u6548",name:"expired",type:"normal",prop:"expired",width:"auto"},{title:"\u5df2\u4f5c\u5e9f",name:"invalid",type:"normal",prop:"invalid",width:"auto"}],ra=[{title:"\u5168\u90e8",index:0},{title:"\u521b\u5efa\u4e2d",index:-1},{title:"\u672a\u5f00\u59cb",index:3},{title:"\u5ba1\u6838\u4e2d",index:6},{title:"\u672a\u901a\u8fc7",index:7},{title:"\u8fdb\u884c\u4e2d",index:1},{title:"\u6682\u505c\u4e2d",index:2},{title:"\u751f\u6210\u4e2d",index:8},{title:"\u5df2\u7ed3\u675f",index:4},{title:"\u5df2\u4f5c\u5e9f",index:5}];var ma="/Users/zhangds/web/blue-brother/frontend/src/pages/exchangecode/combiningList/list.js";class ca extends m.a.Component{constructor(e){super(e),this.state={codeList:[],total:0,page:1,limit:10,tabList:[...ra],combinedValue:[],DateTime:"",search:this.initSearch(),status:0,tableHeight:600,tabIndex:0,planOptions:[]}}addCodeFunction(e,t){sessionStorage.setItem("knockGold_effectDate",JSON.stringify({})),sessionStorage.setItem("redPackets_effectDate",JSON.stringify({}));let i=[{pagetitle:"\u65b0\u5efa\u7ec4\u5408\u5546\u54c1",items:[{path:"/home/combining-list",name:"\u7ec4\u5408\u5546\u54c1\u7ba1\u7406"},{path:"/home/combiningAdd",name:"\u65b0\u5efa\u7ec4\u5408\u5546\u54c1"}]}];1===e?(i[0].pagetitle="\u590d\u5236",i[0].items[1].name=`\u590d\u5236:${t.title}`,sessionStorage.setItem("keyBatch_id",t.key_batch_id)):2===e&&(i[0].pagetitle="\u7f16\u8f91",i[0].items[1].name=`\u7f16\u8f91:${t.title}\u5151\u6362\u7801\u7684\u5546\u54c1\u8303\u56f4\u5217\u8868`,sessionStorage.setItem("approval_id",t.approval_id),sessionStorage.setItem("approval_status",t.status)),e&&(sessionStorage.setItem("knockGold_effectDate",JSON.stringify(t.keyBatch.plan)),sessionStorage.setItem("redPackets_effectDate",JSON.stringify(t.keyBatch.plan))),sessionStorage.setItem("code_id",null===t||void 0===t?void 0:t.id),sessionStorage.setItem("isState",e),sessionStorage.setItem("breaknav",JSON.stringify(i)),sessionStorage.setItem("pathname2","/home/combiningAdd"),this.props.history.push("/home/combiningAdd")}aboutFn(e,t){sessionStorage.setItem("pathname2","/home/exchange-addcommodity");let i=[{pagetitle:"\u7f16\u8f91",items:[{path:"/home/exchangecode-list",name:"\u5151\u6362\u7801\u7ba1\u7406"},{path:"/home/exchange-addcommodity",name:t.title+"\u5151\u6362\u7801\u7684\u5546\u54c1\u8303\u56f4\u5217\u8868"}]}];sessionStorage.setItem("code_id",t.id),sessionStorage.setItem("breaknav",JSON.stringify(i)),window.open("#/home/exchange-addcommodity")}initSearch(){return{plan_title:"",key_batch_id:"",code_batch_id:"",code_batch_name:""}}searchChange(e,t){const i=this.state.search;i[e]=t,this.setState({search:i})}getPlan(){Object(a.rb)().then((e=>Object(a.Tb)(e,((e,t)=>{const i=e.map((e=>({key:e.id,text:e.title})));this.setState({planOptions:i})}),(e=>{}))))}copyElementFunction(e){var t,i;let a="";return a=([1,2,3].includes(null===e||void 0===e?void 0:e.status)||[4,5].includes(null===e||void 0===e?void 0:e.status)&&[4,5,8].includes(null===(t=e.keyBatch)||void 0===t?void 0:t.status)&&[3,5,4].includes(null===(i=e.keyBatch.plan)||void 0===i?void 0:i.status))&&0===e.keyBatch.plan.settlement_type?Object(h.jsxDEV)("span",{className:"grid-link",style:{},onClick:t=>this.addCodeFunction(1,e),children:"\u590d\u5236"},void 0,!1,{fileName:ma,lineNumber:159,columnNumber:9},this):Object(h.jsxDEV)("span",{style:{paddingRight:"10px",color:"#d8dbdd"},children:"\u590d\u5236"},void 0,!1,{fileName:ma,lineNumber:165,columnNumber:9},this),a}deleteCodeFunction(e){const t=this;G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:"\u662f\u5426\u5220\u9664\u8be5\u5151\u6362\u7801\uff1f"},void 0,!1,{fileName:ma,lineNumber:185,columnNumber:16},this),onConfirm(){Object(a.B)(e.id).then((e=>{Object(a.Tb)(e,((e,i)=>{c.a.clear(),c.a.success(i),t.getCodeListFn()}),(e=>{c.a.error(e)}))})).catch((e=>{}))},onCancel:this.onCancel,className:"questModal",parentComponent:this})}tabFn(e){this.setState({tabIndex:e,search:this.initSearch(),page:1,limit:10}),setTimeout((()=>{this.getCodeListFn({},e)}),10)}pageChange(e){this.setState({page:e}),setTimeout((()=>{this.getCodeListFn()}),10)}countChange(e){this.setState({page:1,limit:e}),setTimeout((()=>{this.getCodeListFn()}),10)}sureFn(){this.setState({page:1,limit:10},(()=>{this.getCodeListFn()}))}delCodeFun(e){let t=this;Object(a.p)(e).then((e=>{Object(a.Tb)(e,((e,i)=>{c.a.clear(),c.a.success(i),t.getCodeListFn()}),(e=>{c.a.error(e)}))})).catch((e=>{}))}delFn(e,t){if(6==t.status)return void c.a.error("\u5ba1\u6838\u4e2d\u7684\u6570\u636e\u4e0d\u5141\u8bb8\u4f5c\u5e9f");let i=this,a={type:2,object_value:t.id};try{Ut(a).then((e=>{2===e?i.delCodeFun(t.id):1===e&&G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:["\u786e\u5b9a\u4f5c\u5e9f",t.title,"\uff1f"]},void 0,!0,{fileName:ma,lineNumber:279,columnNumber:22},this),onConfirm(){i.delCodeFun(t.id)},onCancel(){},className:"questModal",parentComponent:this})}))}catch(s){}}changestatus(e,t){let i=this;G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:["\u662f\u5426",1==t.old_status?"\u505c\u7528":"\u542f\u7528","\u8be5\u5151\u6362\u7801\u6279\u6b21\uff1f"]},void 0,!0,{fileName:ma,lineNumber:299,columnNumber:16},this),onConfirm:()=>{Object(a.wc)(t.id,{operation:1==t.old_status?"2":"1"}).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.clear(),c.a.success(t),i.getCodeListFn()}),(e=>{c.a.error(e)}))})).catch((e=>{}))},onCancel:this.onCancel,className:"questModal",parentComponent:this})}onChangeCombinedDate(e){this.setState({combinedValue:e}),this.getCodeListFn(e)}getCodeListFn(e={},t=this.state.tabIndex){var i;let s=this,{page:l,limit:n,search:o}=Object(de.a)(s.state);o.plan_title=(null===(i=o.plan_title)||void 0===i?void 0:i.text)||"";let r={page:l,limit:n,...o,recharge_type:2};this.state.combinedValue&&this.state.combinedValue[0]&&(r.begin_time=this.state.combinedValue[0],r.end_time=this.state.combinedValue[1]),e&&e[0]&&(r.begin_time=e[0],r.end_time=e[1]),e&&null==e[0]&&e.length>1&&r.begin_time&&(delete r.begin_time,delete r.end_time),t&&(r.status=this.state.tabList[t].index,0==t&&(r.status=null)),Object(a.U)(r).then((e=>{let t=JSON.parse(e);if(200==t.code){const e=t.data.data,{total:i}=t.data;s.setState({codeList:e,total:i})}})).catch((e=>{}))}componentWillMount(){this.setState({tableHeight:window.innerHeight-390}),this.getPlan()}onReCall(e,t){let i=t.approval_id;G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:"\u8be5\u6570\u636e\u6b63\u5728\u5ba1\u6279\u4e2d,\u662f\u5426\u786e\u8ba4\u64a4\u9500\u5ba1\u6279\uff1f"},void 0,!1,{fileName:ma,lineNumber:382,columnNumber:16},this),onConfirm:()=>{Object(a.bd)(i).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.success("\u64a4\u9500\u5ba1\u6279\u6210\u529f"),setTimeout((()=>{this.getCodeListFn()}),3e3)}),(e=>{c.a.error(e)}))}))},onCancel:this.onCancel,className:"questModal",parentComponent:this})}dingTask(e){Object(a.G)(e).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.success(t),this.getCodeListFn()}),(e=>{c.a.error(e)}))}))}render(){const e=Object(h.jsxDEV)(Jt.a,{showTime:{format:"HH:mm:ss",defaultTime:["00:00:00","23:59:59"]},format:"YYYY-MM-DD HH:mm:ss",className:"zent-datepicker-demo",value:this.state.combinedValue,onChange:e=>{this.onChangeCombinedDate(e)}},void 0,!1,{fileName:ma,lineNumber:423,columnNumber:7},this);return Object(h.jsxDEV)("div",{id:"exchangecodelist",children:Object(h.jsxDEV)(Ft,{slot:e,tabs:this.state.tabList,tabChange:this.tabFn.bind(this),width:130,children:[Object(h.jsxDEV)("div",{className:"codetable ",children:[Object(h.jsxDEV)(u.a,{type:"primary",icon:"plus",onClick:()=>this.addCodeFunction(),children:"\u65b0\u5efa\u7ec4\u5408\u5546\u54c1"},void 0,!1,{fileName:ma,lineNumber:445,columnNumber:13},this),Object(h.jsxDEV)("div",{className:"codesFind",children:Object(h.jsxDEV)(l.a,{children:[Object(h.jsxDEV)(s.a,{labelname:"\u8ba1\u5212\u540d\u79f0\uff1a",required:"",labelwidth:"90px",children:Object(h.jsxDEV)(X.a,{name:"state",value:this.state.search.plan_title,options:this.state.planOptions,placeholder:"\u8bf7\u8f93\u5165",width:204,clearable:!0,onChange:e=>{this.searchChange("plan_title",e)}},void 0,!1,{fileName:ma,lineNumber:451,columnNumber:19},this)},void 0,!1,{fileName:ma,lineNumber:450,columnNumber:17},this),Object(h.jsxDEV)(s.a,{labelname:"key\u6279\u6b21ID\uff1a",required:"",labelwidth:"100px",children:Object(h.jsxDEV)(n.a,{value:this.state.search.key_batch_id,countShow:!1,labelWidth:"0px",placeholder:"\u8bf7\u8f93\u5165",width:204,onChange:e=>{this.searchChange("key_batch_id",e)},onClearItem:e=>{this.searchChange("key_batch_id","")}},void 0,!1,{fileName:ma,lineNumber:464,columnNumber:19},this)},void 0,!1,{fileName:ma,lineNumber:463,columnNumber:17},this),Object(h.jsxDEV)(s.a,{labelname:"\u5151\u6362\u7801\u6279\u6b21\u540d\u79f0\uff1a",required:"",labelwidth:"155px",children:Object(h.jsxDEV)(n.a,{value:this.state.search.code_batch_name,countShow:!1,labelWidth:"0px",placeholder:"\u8bf7\u8f93\u5165",width:204,onChange:e=>{this.searchChange("code_batch_name",e)},onClearItem:e=>{this.searchChange("code_batch_name","")}},void 0,!1,{fileName:ma,lineNumber:479,columnNumber:19},this)},void 0,!1,{fileName:ma,lineNumber:478,columnNumber:17},this),Object(h.jsxDEV)(s.a,{labelname:"\u5151\u6362\u7801\u6279\u6b21ID\uff1a",required:"",labelwidth:"130px",children:Object(h.jsxDEV)(n.a,{value:this.state.search.code_batch_id,countShow:!1,labelWidth:"0px",placeholder:"\u8bf7\u8f93\u5165",width:204,onChange:e=>{this.searchChange("code_batch_id",e)},onClearItem:e=>{this.searchChange("code_batch_id","")}},void 0,!1,{fileName:ma,lineNumber:494,columnNumber:19},this)},void 0,!1,{fileName:ma,lineNumber:493,columnNumber:17},this),Object(h.jsxDEV)("div",{className:"button_box",children:[Object(h.jsxDEV)(u.a,{type:"primary",onClick:()=>this.getCodeListFn(),children:"\u67e5\u8be2"},void 0,!1,{fileName:ma,lineNumber:509,columnNumber:19},this),Object(h.jsxDEV)(u.a,{onClick:()=>this.setState({search:this.initSearch()},(()=>this.getCodeListFn())),children:"\u91cd\u7f6e"},void 0,!1,{fileName:ma,lineNumber:512,columnNumber:19},this)]},void 0,!0,{fileName:ma,lineNumber:508,columnNumber:17},this)]},void 0,!0,{fileName:ma,lineNumber:449,columnNumber:15},this)},void 0,!1,{fileName:ma,lineNumber:448,columnNumber:13},this)]},void 0,!0,{fileName:ma,lineNumber:444,columnNumber:11},this),Object(h.jsxDEV)("div",{className:"code-table",children:Object(h.jsxDEV)(I,{spliteColor:"#fff",tableData:this.state.codeList,Column:oa,maxheight:this.state.tableHeight,countbarVisible:!1,isSwitch:!1,page:this.state.page,dataCount:this.state.total,isMultiple:!1,pageChange:e=>{this.pageChange(e)},countChange:e=>{this.countChange(e)},checkChange:e=>{},ComponentHandler:(e,t)=>"time"==e?Object(h.jsxDEV)("span",{children:[t.begin_time,"\u81f3",t.end_time]},void 0,!0,{fileName:ma,lineNumber:544,columnNumber:21},this):"title"==e?Object(h.jsxDEV)("span",{className:"grid-link",onClick:e=>this.aboutFn(e,t),children:t.title},void 0,!1,{fileName:ma,lineNumber:551,columnNumber:21},this):"switch"==e?Object(h.jsxDEV)(v.a,{size:"small",checked:2!=t.old_status,onChange:e=>this.changestatus(e,t),disabled:4==t.status||5==t.status},void 0,!1,{fileName:ma,lineNumber:558,columnNumber:21},this):"status"==e?Object(h.jsxDEV)("p",{className:"dflexa",children:Object(h.jsxDEV)("span",{children:[Object(h.jsxDEV)("font",{className:"icon",style:{background:At.exchangeStatusBg(parseInt(t.status))}},void 0,!1,{fileName:ma,lineNumber:570,columnNumber:25},this),t.status_text]},void 0,!0,{fileName:ma,lineNumber:569,columnNumber:23},this)},void 0,!1,{fileName:ma,lineNumber:568,columnNumber:21},this):"opearo"==e?Object(h.jsxDEV)("div",{children:[4!=t.status&&5!=t.status&&8!=t.status&&6!=t.status?Object(h.jsxDEV)("span",{className:"grid-link",onClick:e=>this.addCodeFunction(2,t),children:"\u7f16\u8f91"},void 0,!1,{fileName:ma,lineNumber:588,columnNumber:25},this):Object(h.jsxDEV)("span",{style:{color:"#d8dbdd"},className:"grid-link",children:"\u7f16\u8f91"},void 0,!1,{fileName:ma,lineNumber:595,columnNumber:25},this),this.copyElementFunction(t),[4,5,8,6,-1].includes(t.status)||7===t.status&&-1===t.old_status?Object(h.jsxDEV)("span",{style:{paddingRight:"10px",color:"#d8dbdd"},children:"\u4f5c\u5e9f"},void 0,!1,{fileName:ma,lineNumber:602,columnNumber:25},this):Object(h.jsxDEV)("span",{className:"grid-link",onClick:e=>this.delFn(e,t),children:"\u4f5c\u5e9f"},void 0,!1,{fileName:ma,lineNumber:611,columnNumber:25},this),6==t.status&&Number(t.approval_id)>0?Object(h.jsxDEV)("span",{className:"grid-link",onClick:e=>this.onReCall(e,t),children:"\u64a4\u9500\u5ba1\u6279"},void 0,!1,{fileName:ma,lineNumber:616,columnNumber:25},this):Object(h.jsxDEV)("span",{style:{color:"#d8dbdd",marginRight:"12px"},children:"\u64a4\u9500\u5ba1\u6279"},void 0,!1,{fileName:ma,lineNumber:620,columnNumber:25},this),t.approval_id&&6===t.status?Object(h.jsxDEV)("span",{className:"grid-link",onClick:e=>{this.dingTask(t.approval_id)},children:"\u9489\u9489\u5ba1\u6279\u67e5\u8be2"},void 0,!1,{fileName:ma,lineNumber:623,columnNumber:25},this):Object(h.jsxDEV)("span",{className:"grid-link disabled",children:"\u9489\u9489\u5ba1\u6279\u67e5\u8be2"},void 0,!1,{fileName:ma,lineNumber:632,columnNumber:25},this),[-1,7].includes(t.status)&&-1==t.old_status?Object(h.jsxDEV)("span",{className:"grid-link",style:{color:"red"},onClick:e=>this.deleteCodeFunction(t),children:"\u5220\u9664"},void 0,!1,{fileName:ma,lineNumber:636,columnNumber:25},this):Object(h.jsxDEV)("span",{style:{color:"#d8dbdd"},className:"grid-link",children:"\u5220\u9664"},void 0,!1,{fileName:ma,lineNumber:644,columnNumber:25},this)]},void 0,!0,{fileName:ma,lineNumber:583,columnNumber:21},this):void 0},void 0,!1,{fileName:ma,lineNumber:524,columnNumber:13},this)},void 0,!1,{fileName:ma,lineNumber:523,columnNumber:11},this)]},void 0,!0,{fileName:ma,lineNumber:438,columnNumber:9},this)},void 0,!1,{fileName:ma,lineNumber:437,columnNumber:7},this)}}var da=i(240),ua=(i(241),"/Users/zhangds/web/blue-brother/frontend/src/pages/exchangepage/main/main.js"),ha=i(155);let ba={1:"access_conf",3:"exchange",4:"coupon",8:"coupon"};const pa=[{title:"\u57fa\u672c\u4fe1\u606f",name:"thumb",prop:"thumb",className:"name",type:"slot",width:"10%"},{title:"\u6807\u9898",prop:"title",name:"title",width:"200px",type:"normal"},{title:"\u843d\u5730\u9875\u7c7b\u578b",name:"page",prop:"page",type:"slot",defaultText:0,width:"auto"},{title:"\u66f4\u65b0\u65f6\u95f4",name:"update_time",type:"normal",prop:"update_time",defaultText:"PM",width:"auto"},{title:"\u5f52\u5c5e\u8ba1\u5212",name:"plan.title",type:"normal",prop:"plan.title",defaultText:0,width:"auto",type:"normal"},{title:"\u94fe\u63a5\u5730\u5740",name:"href",type:"slot",prop:"href",defaultText:0,width:"auto"},{title:"\u521b\u5efa\u4eba",width:"auto",type:"normal",prop:"user_name",name:"user_name"},{title:"\u64cd\u4f5c",prop:"edit",name:"edit",type:"slot",width:"300px",defaultText:0}];class Na extends m.a.Component{constructor(e){super(e),this.state={tabList:[{title:"\u5168\u90e8"},{title:"\u672a\u5f00\u59cb"},{title:"\u8fdb\u884c\u4e2d"},{title:"\u6682\u505c\u4e2d"},{title:"\u5df2\u7ed3\u675f"}],distdata:[],tableHeight:500,filterList:[{id:0,label:"\u5206\u9500\u5546\u72b6\u6001",menuList:[{id:0,name:"\u5f00"},{id:1,name:"\u5173"}]}],menuList:[{id:0,name:"\u5206\u9500\u5546\u72b6\u6001",check:!1}],page:1,limit:10,key_word:"",status:null,dataCount:0,preview_visible:!1,preview_url:"",previewData:{},showType:1}}getTableList(e){this.state.key_word&&(e.title=this.state.key_word);let t=Object(Lt.a)(e,(e=>Object(Ht.a)(e)||Object(qt.a)(e)));Object(a.Gb)(t).then((e=>{Object(a.Tb)(e,((e,t)=>{this.setState({dataCount:e.total}),this.setState({distdata:e.data})}))}))}countChange(e){this.setState({limit:e});let t={page:this.state.page,limit:e,title:this.state.key_word};this.getTableList(t)}pageChange(e){this.setState({page:e});let t={page:e,limit:this.state.limit,title:this.state.key_word,status:this.state.status};this.getTableList(t)}editFn(e,t){sessionStorage.setItem("mouldType",2),sessionStorage.setItem("pageChange",1),sessionStorage.setItem("pageInfo",JSON.stringify(t)),window.location.href="/#/edittemplate"}delFn(e,t){let i=this;G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:["\u662f\u5426\u5220\u9664",Object(h.jsxDEV)("b",{children:["[",t.plan.title,"]"]},void 0,!0,{fileName:ua,lineNumber:195,columnNumber:15},this),"\uff1f"]},void 0,!0,{fileName:ua,lineNumber:194,columnNumber:9},this),onConfirm:()=>{Object(a.z)(t.id).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.clear(),c.a.success(t),i.getAccountFn()}),(e=>{}))})).catch((e=>{}))},onCancel:this.onCancel,className:"questModal",parentComponent:this})}tabChange(e){this.setState({page:1}),this.setState({limit:10}),this.setState({key_word:""});let t={page:1,limit:10},i=null;i=e>0?3==e?5:4==e?3:e:null,t.status=i,this.setState({status:i}),setTimeout((()=>{this.getTableList(t)}),10)}onPreview(e,t){let i=t[ba[t.page]];this.setState({preview_visible:!0,previewData:i,showType:t.page})}closePhone(e){this.setState({preview_visible:!1})}sureFn(){this.setState({page:1}),this.setState({limit:10});let e={page:1,limit:10,title:this.state.key_word,status:this.state.status};this.getTableList(e)}componentDidUpdate(e,t){t.key_word==this.state.key_word||this.state.key_word||this.sureFn()}componentWillMount(){this.setState({tableHeight:window.innerHeight-430})}onBack(){this.refs.preview.popPage()}onClose(){this.setState({preview_visible:!1})}render(){const{current:e,pageSize:t}=this.state;return Object(h.jsxDEV)("div",{id:"dislist",children:[Object(h.jsxDEV)(Ft,{tabs:this.state.tabList,tabChange:e=>this.tabChange(e),children:[Object(h.jsxDEV)("div",{className:"distable dflexj",children:[Object(h.jsxDEV)("div",{children:" "},void 0,!1,{fileName:ua,lineNumber:294,columnNumber:13},this),Object(h.jsxDEV)(n.a,{icon:"search",placeholder:"\u8bf7\u8f93\u5165\u5173\u952e\u5b57\u8fdb\u884c\u641c\u7d22",countShow:!1,value:this.state.key_word,height:"36px",width:"260px",alignment:"left",onClearItem:e=>{this.setState({key_word:""})},onChange:e=>{this.setState({key_word:e})},wordSearch:e=>{this.sureFn()}},void 0,!1,{fileName:ua,lineNumber:295,columnNumber:13},this)]},void 0,!0,{fileName:ua,lineNumber:293,columnNumber:11},this),Object(h.jsxDEV)("div",{children:Object(h.jsxDEV)(I,{isBorder:!0,spliteColor:"#fff",page:this.state.page,maxheight:this.state.tableHeight,tableData:this.state.distdata,Column:pa,isMultiple:!1,countbarVisible:!1,isSwitch:!1,dataCount:this.state.dataCount,countChange:e=>{this.countChange(e)},pageChange:e=>{this.pageChange(e)},checkChange:e=>{},ComponentHandler:(e,t)=>{if("thumb"==e)return Object(h.jsxDEV)(Ei.a,{trigger:"hover",position:"right-center",content:Object(h.jsxDEV)("img",{src:t.thumb,alt:"",style:{width:"375px",transform:"scale(.8)"}},void 0,!1,{fileName:ua,lineNumber:340,columnNumber:25},this),children:Object(h.jsxDEV)("img",{src:t.thumb,alt:"",style:{width:"30px",height:"30px"}},void 0,!1,{fileName:ua,lineNumber:347,columnNumber:23},this)},void 0,!1,{fileName:ua,lineNumber:336,columnNumber:21},this);if("name"==e)return Object(h.jsxDEV)(v.a,{size:"small",checked:!0},void 0,!1,{fileName:ua,lineNumber:352,columnNumber:26},this);if("client"==e)return Object(h.jsxDEV)("span",{children:[Object(h.jsxDEV)("font",{className:"icon",style:{background:At.pageStatusBg(parseInt(t.client))}},void 0,!1,{fileName:ua,lineNumber:358,columnNumber:23},this),At.pageStatus(parseInt(t.client))]},void 0,!0,{fileName:ua,lineNumber:357,columnNumber:21},this);if("page"==e)return Object(h.jsxDEV)("span",{children:[Object(h.jsxDEV)("font",{className:"icon",style:{background:At.pageTypeStatusBg(parseInt(t.page))}},void 0,!1,{fileName:ua,lineNumber:371,columnNumber:23},this),At.pageTypeStatus(parseInt(t.page))]},void 0,!0,{fileName:ua,lineNumber:370,columnNumber:21},this);if("edit"==e)return Object(h.jsxDEV)("span",{children:[Object(h.jsxDEV)("a",{className:"grid-link",onClick:e=>{this.editFn(e,t)},children:"\u7f16\u8f91"},void 0,!1,{fileName:ua,lineNumber:384,columnNumber:23},this),Object(h.jsxDEV)("a",{onClick:e=>{this.onPreview(e,t)},className:"grid-link",children:"\u9884\u89c8"},void 0,!1,{fileName:ua,lineNumber:392,columnNumber:23},this)]},void 0,!0,{fileName:ua,lineNumber:383,columnNumber:21},this);if("href"==e){const e=Object(h.jsxDEV)(ha,{value:t.href},void 0,!1,{fileName:ua,lineNumber:404,columnNumber:35},this);return Object(h.jsxDEV)(Ei.a,{trigger:"hover",content:e,children:Object(h.jsxDEV)("a",{href:t.href,children:t.href},void 0,!1,{fileName:ua,lineNumber:408,columnNumber:23},this)},void 0,!1,{fileName:ua,lineNumber:407,columnNumber:21},this)}}},void 0,!1,{fileName:ua,lineNumber:315,columnNumber:13},this)},void 0,!1,{fileName:ua,lineNumber:314,columnNumber:11},this)]},void 0,!0,{fileName:ua,lineNumber:292,columnNumber:9},this),this.state.preview_visible?Object(h.jsxDEV)(da.a,{previewData:this.state.previewData,showType:this.state.showType,onCloseFn:this.onClose.bind(this)},void 0,!1,{fileName:ua,lineNumber:417,columnNumber:11},this):null]},void 0,!0,{fileName:ua,lineNumber:291,columnNumber:7},this)}}i(244);var ja="/Users/zhangds/web/blue-brother/frontend/src/pages/exchangepage/mytemplate/main.js";const va=[{title:"\u7f29\u7565\u56fe",name:"thumb",prop:"thumb",type:"slot",width:"10%"},{title:"\u6807\u9898",prop:"title",name:"title",width:"auto",type:"normal"},{title:"\u843d\u5730\u9875\u7c7b\u578b",prop:"client",name:"client",type:"slot",width:"auto"},{title:"\u66f4\u65b0\u65f6\u95f4",prop:"update_time",name:"update_time",type:"normal",width:"auto"},{title:"\u521b\u5efa\u4eba",prop:"user_name",name:"user_name",type:"normal",width:"auto"},{title:"\u64cd\u4f5c",prop:"edit",name:"edit",type:"slot",width:"auto"}];class ga extends m.a.Component{constructor(e){super(e),this.state={distdata:[],total:0,combinedValue:[],page:1,limit:10,tabList:[{title:"\u6211\u7684\u6a21\u677f\u5217\u8868"}],DateTime:"",key_word:"",tableHeight:600,dataCount:0}}componentDidUpdate(e,t){t.key_word==this.state.key_word||this.state.key_word||this.sureFn()}sureFn(){this.setState({page:1}),this.setState({limit:10});let e={page:1,limit:10,title:this.state.key_word};this.getTableList(e)}editFn(e,t){if(0==t.creator)return c.a.clear(),void c.a.error("\u7cfb\u7edf\u6a21\u677f\u4e0d\u53ef\u7f16\u8f91");sessionStorage.setItem("pageInfo",JSON.stringify(t)),sessionStorage.setItem("mouldType",1),sessionStorage.setItem("pageChange",1),window.location.href="/#/edittemplate"}getTableList(e){Object(a.Eb)(e).then((e=>{Object(a.Tb)(e,((e,t)=>{this.setState({dataCount:e.total}),this.setState({distdata:e.data})}),(e=>{}))})).catch((e=>{}))}componentWillMount(){this.setState({tableHeight:window.innerHeight-390});let e={page:this.state.page,limit:this.state.limit};this.state.combinedValue&&this.state.combinedValue[0]&&(e.begin_time=this.state.combinedValue[0],e.end_time=this.state.combinedValue[1]),this.getTableList(e)}countChange(e){this.setState({page:1,limit:e});let t={page:e,limit:this.state.limit};this.getTableList(t)}pageChange(e){this.setState({page:e});let t={page:e,limit:this.state.limit};this.state.key_word&&(t.title=this.state.key_word),this.getTableList(t)}newTemplate(e){sessionStorage.setItem("pageInfo",null);let t=window.location.href.replace(window.location.hash,"#/home/mytempMould");window.open(t,"_blank")}delFn(e,t){if(0==t.creator)return void c.a.error("\u7cfb\u7edf\u6a21\u677f\u4e0d\u53ef\u5220\u9664");let i=this;G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:[" ","\u662f\u5426\u5220\u9664 ",Object(h.jsxDEV)("b",{children:[" [",t.title,"] "]},void 0,!0,{fileName:ja,lineNumber:197,columnNumber:16},this),"\uff1f"]},void 0,!0,{fileName:ja,lineNumber:195,columnNumber:9},this),onConfirm:()=>{Object(a.z)(t.id).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.clear(),c.a.success(t);let a={page:this.state.page,limit:this.state.limit,title:this.state.key_word};i.getTableList(a)}),(e=>{}))})).catch((e=>{}))},onCancel:this.onCancel,className:"questModal",parentComponent:this})}render(){const{current:e,pageSize:t}=this.state;return Object(h.jsxDEV)("div",{id:"exchangecodelist",children:[Object(h.jsxDEV)(Ft,{tabs:this.state.tabList,children:[Object(h.jsxDEV)("div",{className:"codetable dflexj",children:[Object(h.jsxDEV)(u.a,{type:"primary",icon:"plus",onClick:e=>{this.newTemplate(e)},children:["\u65b0\u589e\u6a21\u677f"," "]},void 0,!0,{fileName:ja,lineNumber:232,columnNumber:13},this)," "," ",Object(h.jsxDEV)(n.a,{onClearItem:e=>{this.setState({key_word:""})},wordSearch:this.sureFn.bind(this),onChange:e=>this.setState({key_word:e}),value:this.state.key_word,icon:"search",placeholder:"\u8bf7\u8f93\u5165\u5173\u952e\u5b57\u8fdb\u884c\u5339\u914d\u67e5\u8be2",countShow:!1,height:"36px",width:"260px",alignment:"left"},void 0,!1,{fileName:ja,lineNumber:242,columnNumber:13},this)," "]},void 0,!0,{fileName:ja,lineNumber:231,columnNumber:11},this)," ",Object(h.jsxDEV)("div",{className:"code-table",children:[Object(h.jsxDEV)(I,{spliteColor:"#fff",tableData:this.state.distdata,Column:va,maxheight:this.state.tableHeight,countbarVisible:!1,isSwitch:!1,page:this.state.page,dataCount:this.state.dataCount,isMultiple:!1,pageChange:e=>{this.pageChange(e)},countChange:e=>{this.countChange(e)},checkChange:e=>{},ComponentHandler:(e,t)=>"thumb"==e?Object(h.jsxDEV)(Ei.a,{trigger:"hover",position:"right-center",content:Object(h.jsxDEV)("img",{src:t.thumb,alt:"",style:{width:"375px",transform:"scale(.8)"}},void 0,!1,{fileName:ja,lineNumber:288,columnNumber:25},this),children:[" ",Object(h.jsxDEV)("img",{src:t.thumb,alt:"",style:{width:"30px",height:"30px"}},void 0,!1,{fileName:ja,lineNumber:299,columnNumber:23},this)," "]},void 0,!0,{fileName:ja,lineNumber:284,columnNumber:21},this):"client"==e?Object(h.jsxDEV)("span",{children:[" ",Object(h.jsxDEV)("font",{className:"icon",style:{background:At.pageTypeStatusBg(parseInt(t.page))},children:" "},void 0,!1,{fileName:ja,lineNumber:314,columnNumber:23},this),At.pageTypeStatus(parseInt(t.page))]},void 0,!0,{fileName:ja,lineNumber:312,columnNumber:21},this):"edit"==e?Object(h.jsxDEV)("span",{children:[Object(h.jsxDEV)("a",{className:"grid-link",onClick:e=>{this.editFn(e,t)},children:[" ","\u7f16\u8f91"," "]},void 0,!0,{fileName:ja,lineNumber:330,columnNumber:23},this)," ",Object(h.jsxDEV)("a",{onClick:e=>{this.delFn(e,t)},className:"grid-link",children:[" ","\u5220\u9664"," "]},void 0,!0,{fileName:ja,lineNumber:339,columnNumber:23},this)]},void 0,!0,{fileName:ja,lineNumber:329,columnNumber:21},this):void 0},void 0,!1,{fileName:ja,lineNumber:264,columnNumber:13},this)," "]},void 0,!0,{fileName:ja,lineNumber:263,columnNumber:11},this)," "]},void 0,!0,{fileName:ja,lineNumber:230,columnNumber:9},this)," "]},void 0,!0,{fileName:ja,lineNumber:229,columnNumber:7},this)}}i(242);var fa=i(243),_a="/Users/zhangds/web/blue-brother/frontend/src/pages/exchangepage/template/main.js";let xa={1:"access_conf",3:"exchange",4:"coupon",8:"coupon"};class ya extends m.a.Component{constructor(e){super(e),this.state={tabList:[{id:0,title:"H5"}],sourceList:[{id:0,title:"\u7cfb\u7edf\u63a8\u8350\u6a21\u677f"},{id:1,title:"\u6211\u7684\u6a21\u677f"}],typeList:[{id:-1,title:"\u5168\u90e8"}],tabIndex:0,sourceIndex:0,page:1,typeIndex:0,showPage:1,activeHeight:667,showType:1,previewData:{},moudleData:{},previewwhite:{},previewexchange:{},system_template:[],pageStep:1,fontSize:1e4/281.25,preview_visible:!1,topbar:"",setStyle:{width:"375px",height:"667px",transform:"scale(0.75)"},top:"",toTopshow:!1,toTopFlag:!1,endreq:!0,center:"",bottom:"",detailType:3}}onpageChange(e){this.setState({showPage:e.target.value,pageStep:e.target.value,detailType:3})}ondetailTypeChange(e){this.setState({detailType:e.target.value,pageStep:e.target.value})}onTypeChange(e){this.setState({showType:e.target.value,pageStep:1,showPage:1,detailType:3});let t=Object(de.a)(this.state.moudleData)[xa[e.target.value]];t||(t={land:{describe:{}},product_list:{list:"",describe:{}},product_detail:{describe:{}}}),this.setState({previewData:t})}componentDidMount(){let e=this;Object(a.Hb)().then((t=>{Object(a.Tb)(t,(()=>{let i=t.data.map((e=>({id:e.id,title:e.name}))),a=e.state.typeList.concat(i);e.setState({typeList:a})}),(()=>{}))})).catch((()=>{}));Object(a.Db)({page:1,limit:10}).then((e=>{Object(a.Tb)(e,(e=>{this.setState({system_template:e.data})}),(()=>{}))})).catch((()=>{})),this.refs.component.addEventListener("scroll",(e=>{let t=e.target.scrollTop,i=this.state.endreq;if(t>300){this.setState({toTopFlag:!0,toTopshow:!1});let t=e.target.scrollHeight-e.target.clientHeight;if(Math.round(t)==Math.round(e.target.scrollTop)&&i){let e=this.state.system_template,t=this.state.page;t+=1;let i={page:t,limit:10};0==this.state.sourceIndex?(0!=this.state.typeIndex&&(i.type_id=this.state.typeIndex),Object(a.Db)(i).then((i=>{Object(a.Tb)(i,(i=>{if(0{}))})).catch((()=>{}))):Object(a.Eb)(i).then((i=>{Object(a.Tb)(i,(i=>{if(i.data.length>0){let a=e.concat(i.data);this.setState({system_template:a,page:t})}else this.setState({endreq:!1})}),(()=>{}))})).catch((()=>{}))}}else this.setState({toTopFlag:!1})}))}componentWillUnmount(){window.removeEventListener("scroll",this.bindHandleScroll)}createBox(){sessionStorage.removeItem("pageInfo"),sessionStorage.setItem("mouldType",1),window.location.href="/#/edittemplate"}typeClick(e){this.setState({typeIndex:e,page:1,endreq:!0});let t={page:1,limit:10};e&&(t.type_id=e),Object(a.Db)(t).then((e=>{Object(a.Tb)(e,(e=>{this.setState({system_template:e.data}),e.data.length<10&&this.setState({endreq:!1})}),(()=>{}))})).catch((()=>{}))}sourceClick(e){this.setState({sourceIndex:e,page:1,endreq:!0});let t={page:1,limit:10};0==e?Object(a.Db)(t).then((e=>{Object(a.Tb)(e,(e=>{this.setState({system_template:e.data})}),(()=>{}))})).catch((()=>{})):Object(a.Eb)(t).then((e=>{Object(a.Tb)(e,(e=>{this.setState({system_template:e.data})}),(()=>{}))})).catch((()=>{}))}onPreview(e){let t;t=1==this.state.sourceIndex?e[xa[e.page]]:e.exchange,t||(t={land:{describe:{}},product_list:{list:"",describe:{}},product_detail:{describe:{}}}),this.setState({preview_visible:!0,previewData:t,showType:e.page,moudleData:e,showPage:1,pageStep:1,activeHeight:667,setStyle:{width:"375px",height:"667px",transform:"scale(0.75)"}})}onUse(e,t){0!=e.edit?0==this.state.sourceIndex?Object(a.n)(e.id).then((i=>{Object(a.Tb)(i,(i=>{e.id=i.id,sessionStorage.setItem("pageInfo",JSON.stringify(e)),sessionStorage.setItem("isSort",0),sessionStorage.setItem("pageChange",0),sessionStorage.setItem("mouldType",1),window.location.href=t?"/#/edittemplate?type="+t:"/#/edittemplate?type="+e.page}),(()=>{}))})).catch((()=>{})):(sessionStorage.setItem("pageInfo",JSON.stringify(e)),sessionStorage.setItem("pageChange",1),sessionStorage.setItem("mouldType",1),window.location.href=t?"/#/edittemplate?type="+t:"/#/edittemplate?type="+e.page):c.a.error("\u8be5\u6a21\u677f\u662f\u5b9a\u5236\u6a21\u677f\u65e0\u6cd5\u7f16\u8f91")}toTop(){this.refs.component.scrollTo({top:0,behavior:"smooth"})}onBack(){this.refs.preview.popPage()}onClose(){this.setState({preview_visible:!1})}mouseupFn(){this.setState({toTopshow:!0})}mouseoverFn(){this.setState({toTopshow:!1})}handleSize(e,t){let i={width:e+"px",height:t+"px",transform:"scale(0.75)"};this.setState({setStyle:i,activeHeight:t})}render(){return Object(h.jsxDEV)("div",{className:"mytemplate",children:Object(h.jsxDEV)("div",{className:"scroller-page",ref:"component",children:[Object(h.jsxDEV)("div",{className:"scroller-page-banner basic",children:[Object(h.jsxDEV)("div",{className:"scroller-page-banner-content",children:[Object(h.jsxDEV)("h1",{className:"title",children:["\u6a21\u677f\u4e2d\u5fc3",Object(h.jsxDEV)("div",{className:"editor-type-basic-only",children:Object(h.jsxDEV)("span",{className:"toggle-inner",children:Object(h.jsxDEV)("i",{children:"(v2.0.0)"},void 0,!1,{fileName:_a,lineNumber:341,columnNumber:21},this)},void 0,!1,{fileName:_a,lineNumber:340,columnNumber:19},this)},void 0,!1,{fileName:_a,lineNumber:339,columnNumber:17},this)]},void 0,!0,{fileName:_a,lineNumber:337,columnNumber:15},this),Object(h.jsxDEV)("p",{className:"desc",children:"\u652f\u6301\u591a\u5e73\u53f0,\u591a\u573a\u666f\u4e30\u5bcc\u901a\u7528\u843d\u5730\u9875\u6a21\u677f,\u5e2e\u52a9\u4f7f\u7528\u8005\u66f4\u9ad8\u8f6c\u5316"},void 0,!1,{fileName:_a,lineNumber:345,columnNumber:15},this)]},void 0,!0,{fileName:_a,lineNumber:336,columnNumber:13},this),Object(h.jsxDEV)("div",{className:"scroller-page-banner-mask"},void 0,!1,{fileName:_a,lineNumber:347,columnNumber:13},this)]},void 0,!0,{fileName:_a,lineNumber:335,columnNumber:11},this),Object(h.jsxDEV)("div",{className:"scroller-page-body",children:Object(h.jsxDEV)("div",{className:"scroller-page-body-content",children:Object(h.jsxDEV)("div",{className:"scroller-page-body-content-inner",children:[Object(h.jsxDEV)("div",{className:"xj-simple-tabs scroller-page-tabs",children:this.state.tabList.map(((e,t)=>Object(h.jsxDEV)("div",{className:this.state.tabIndex==t?" xj-simple-tabs-item active":" xj-simple-tabs-item",children:e.title},t,!1,{fileName:_a,lineNumber:355,columnNumber:23},this)))},void 0,!1,{fileName:_a,lineNumber:352,columnNumber:17},this),Object(h.jsxDEV)("div",{className:"block-selector-list-group",children:[Object(h.jsxDEV)("div",{className:"block-selector-list",children:[Object(h.jsxDEV)("span",{className:"block-selector-list-label",children:"\u6765\u6e90\uff1a"},void 0,!1,{fileName:_a,lineNumber:370,columnNumber:21},this),Object(h.jsxDEV)("div",{className:"block-selector",children:this.state.sourceList.map(((e,t)=>Object(h.jsxDEV)("div",{className:this.state.sourceIndex==t?"block-selector-item active":"block-selector-item",onClick:()=>{this.sourceClick(t)},children:e.title},t,!1,{fileName:_a,lineNumber:374,columnNumber:27},this)))},void 0,!1,{fileName:_a,lineNumber:371,columnNumber:21},this)]},void 0,!0,{fileName:_a,lineNumber:369,columnNumber:19},this),0==this.state.sourceIndex?Object(h.jsxDEV)("div",{className:"block-selector-list",children:[Object(h.jsxDEV)("span",{className:"block-selector-list-label",children:"\u5206\u7c7b\uff1a"},void 0,!1,{fileName:_a,lineNumber:393,columnNumber:23},this),Object(h.jsxDEV)("div",{className:"block-selector",children:this.state.typeList.map(((e,t)=>Object(h.jsxDEV)("div",{className:this.state.typeIndex==t?"block-selector-item active":"block-selector-item",onClick:()=>{this.typeClick(t)},children:e.title},t,!1,{fileName:_a,lineNumber:397,columnNumber:29},this)))},void 0,!1,{fileName:_a,lineNumber:394,columnNumber:23},this)]},void 0,!0,{fileName:_a,lineNumber:392,columnNumber:21},this):null,Object(h.jsxDEV)("div",{children:[Object(h.jsxDEV)("div",{className:"xj-template-list",children:[Object(h.jsxDEV)("div",{className:"xj-template-blank-card",children:Object(h.jsxDEV)("div",{className:"xj-template-blank-card-content",children:Object(h.jsxDEV)("div",{className:"xj-template-blank-card-create-box",onClick:this.createBox,children:[Object(h.jsxDEV)("div",{className:"xj-template-blank-card-icon-create",children:Object(h.jsxDEV)("span",{children:"+"},void 0,!1,{fileName:_a,lineNumber:424,columnNumber:31},this)},void 0,!1,{fileName:_a,lineNumber:423,columnNumber:29},this),Object(h.jsxDEV)("div",{className:"xj-template-blank-card-text"},void 0,!1,{fileName:_a,lineNumber:426,columnNumber:29},this)]},void 0,!0,{fileName:_a,lineNumber:419,columnNumber:27},this)},void 0,!1,{fileName:_a,lineNumber:418,columnNumber:25},this)},void 0,!1,{fileName:_a,lineNumber:417,columnNumber:23},this),this.state.system_template.map(((e,t)=>Object(h.jsxDEV)("div",{className:"xj-template-preview-card",children:[Object(h.jsxDEV)("div",{className:"xj-template-preview-card-label",children:Object(h.jsxDEV)("span",{children:e.title},void 0,!1,{fileName:_a,lineNumber:434,columnNumber:31},this)},void 0,!1,{fileName:_a,lineNumber:433,columnNumber:29},this),Object(h.jsxDEV)("div",{className:"xj-template-preview-card-background",style:{backgroundImage:"url("+e.thumb+")",animationDuration:"10.7493s"},children:[Object(h.jsxDEV)("div",{className:"xj-template-preview-card-tag",children:Object(h.jsxDEV)("i",{className:""},void 0,!1,{fileName:_a,lineNumber:444,columnNumber:33},this)},void 0,!1,{fileName:_a,lineNumber:443,columnNumber:31},this),Object(h.jsxDEV)("div",{className:"xj-template-preview-card-operation",children:[Object(h.jsxDEV)("a",{onClick:()=>{this.onPreview(e)},children:[Object(h.jsxDEV)("div",{className:"svg-icon-container",style:{width:"22px",height:"16px",marginRight:"8px"},children:Object(h.jsxDEV)("div",{className:"svg-icon svg-icon-preview"},void 0,!1,{fileName:_a,lineNumber:460,columnNumber:37},this)},void 0,!1,{fileName:_a,lineNumber:452,columnNumber:35},this)," ","\u9884\u89c8"]},void 0,!0,{fileName:_a,lineNumber:447,columnNumber:33},this),Object(h.jsxDEV)("a",{onClick:()=>{this.onUse(e)},children:[Object(h.jsxDEV)("div",{className:"svg-icon-container",style:{width:"20px",height:"16px",marginRight:"8px"},children:Object(h.jsxDEV)("div",{className:"svg-icon svg-icon-use"},void 0,!1,{fileName:_a,lineNumber:477,columnNumber:37},this)},void 0,!1,{fileName:_a,lineNumber:469,columnNumber:35},this)," ","\u4f7f\u7528"]},void 0,!0,{fileName:_a,lineNumber:464,columnNumber:33},this)]},void 0,!0,{fileName:_a,lineNumber:446,columnNumber:31},this)]},void 0,!0,{fileName:_a,lineNumber:436,columnNumber:29},this)]},t,!0,{fileName:_a,lineNumber:432,columnNumber:27},this)))]},void 0,!0,{fileName:_a,lineNumber:416,columnNumber:21},this),this.state.toTopFlag?Object(h.jsxDEV)("div",{ref:"toTop",className:"toTop-canvas",onMouseEnter:this.mouseupFn.bind(this),onMouseLeave:this.mouseoverFn.bind(this),children:Object(h.jsxDEV)("img",{className:"toTopBtn",onClick:this.toTop.bind(this),src:this.state.toTopshow?"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/totopbtn.svg":"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/willtotop.svg",alt:""},void 0,!1,{fileName:_a,lineNumber:494,columnNumber:25},this)},void 0,!1,{fileName:_a,lineNumber:488,columnNumber:23},this):null,Object(h.jsxDEV)("div",{style:{textAlign:"center",color:"#BBC1D2",marginBottom:"15px"},children:this.state.endreq?"\u6b63\u5728\u52a0\u8f7d\u4e2d...":"\u5230\u5e95\u90e8\u4e86\u54df,\u6ca1\u6709\u4e86\u54e6"},void 0,!1,{fileName:_a,lineNumber:506,columnNumber:21},this)]},void 0,!0,{fileName:_a,lineNumber:415,columnNumber:19},this)]},void 0,!0,{fileName:_a,lineNumber:368,columnNumber:17},this)]},void 0,!0,{fileName:_a,lineNumber:351,columnNumber:15},this)},void 0,!1,{fileName:_a,lineNumber:350,columnNumber:13},this)},void 0,!1,{fileName:_a,lineNumber:349,columnNumber:11},this),this.state.preview_visible?Object(h.jsxDEV)("div",{children:[Object(h.jsxDEV)("div",{className:"modal",style:{background:"rgba(0,0,0,0.8)",zIndex:999}},void 0,!1,{fileName:_a,lineNumber:522,columnNumber:15},this),Object(h.jsxDEV)("div",{className:"preview-box",children:[Object(h.jsxDEV)(g.a,{type:"close",className:"preview-top-close",onClick:e=>{this.onClose(e)}},void 0,!1,{fileName:_a,lineNumber:524,columnNumber:17},this),Object(h.jsxDEV)("div",{style:{height:"100%"},children:Object(h.jsxDEV)("div",{className:"previewComponent",children:[Object(h.jsxDEV)("div",{className:"previewbody",children:Object(h.jsxDEV)("div",{className:"ctorSize",style:this.state.setStyle,children:Object(h.jsxDEV)(fa.a,{data:this.state.previewData,pageType:this.state.showType,fontSize:this.state.fontSize,ref:"preview",step:this.state.pageStep},void 0,!1,{fileName:_a,lineNumber:535,columnNumber:25},this)},void 0,!1,{fileName:_a,lineNumber:534,columnNumber:23},this)},void 0,!1,{fileName:_a,lineNumber:533,columnNumber:21},this),Object(h.jsxDEV)("div",{className:"left-choice",children:[Object(h.jsxDEV)("div",{className:"exchange-page",children:[Object(h.jsxDEV)("p",{className:"preview-setting",children:"\u843d\u5730\u9875\u9884\u89c8:"},void 0,!1,{fileName:_a,lineNumber:546,columnNumber:25},this),Object(h.jsxDEV)("section",{className:"screen-size-selector",children:[Object(h.jsxDEV)("div",{className:667==this.state.activeHeight?"size active":"size",onClick:()=>this.handleSize(375,667),children:["\u4e3b\u6d41\u673a\u578b",Object(h.jsxDEV)("span",{children:"375x667"},void 0,!1,{fileName:_a,lineNumber:552,columnNumber:33},this)]},void 0,!0,{fileName:_a,lineNumber:548,columnNumber:27},this),Object(h.jsxDEV)("div",{className:750==this.state.activeHeight?"size active":"size",onClick:()=>this.handleSize(375,750),children:["\u5168\u9762\u5c4f",Object(h.jsxDEV)("span",{children:"375x750"},void 0,!1,{fileName:_a,lineNumber:558,columnNumber:32},this)]},void 0,!0,{fileName:_a,lineNumber:554,columnNumber:27},this),Object(h.jsxDEV)("div",{className:812==this.state.activeHeight?"size active":"size",onClick:()=>this.handleSize(375,812),children:["\u5218\u6d77\u5c4f",Object(h.jsxDEV)("span",{children:"375x812"},void 0,!1,{fileName:_a,lineNumber:564,columnNumber:32},this)]},void 0,!0,{fileName:_a,lineNumber:560,columnNumber:27},this),Object(h.jsxDEV)("div",{className:500==this.state.activeHeight?"size active":"size",onClick:()=>this.handleSize(375,500),children:["\u5c0f\u5c4f\u624b\u673a",Object(h.jsxDEV)("span",{children:"375x500"},void 0,!1,{fileName:_a,lineNumber:570,columnNumber:33},this)]},void 0,!0,{fileName:_a,lineNumber:566,columnNumber:27},this)]},void 0,!0,{fileName:_a,lineNumber:547,columnNumber:25},this),Object(h.jsxDEV)("p",{children:"\u843d\u5730\u9875\u7c7b\u578b:"},void 0,!1,{fileName:_a,lineNumber:573,columnNumber:25},this),Object(h.jsxDEV)(Q.a,{onChange:e=>{this.onTypeChange(e)},value:this.state.showType,children:[Object(h.jsxDEV)(ne.a,{value:3,disabled:1==this.state.sourceIndex,children:"\u5151\u6362\u7801"},void 0,!1,{fileName:_a,lineNumber:580,columnNumber:27},this),Object(h.jsxDEV)(ne.a,{value:1,disabled:1==this.state.sourceIndex,children:"\u767d\u540d\u5355"},void 0,!1,{fileName:_a,lineNumber:583,columnNumber:27},this),Object(h.jsxDEV)(ne.a,{value:4,disabled:1==this.state.sourceIndex,children:"\u4f18\u60e0\u5238"},void 0,!1,{fileName:_a,lineNumber:586,columnNumber:27},this),Object(h.jsxDEV)(ne.a,{value:8,disabled:1==this.state.sourceIndex,children:"\u4f18\u60e0\u5238\u767d\u540d\u5355"},void 0,!1,{fileName:_a,lineNumber:589,columnNumber:27},this)]},void 0,!0,{fileName:_a,lineNumber:574,columnNumber:25},this)]},void 0,!0,{fileName:_a,lineNumber:545,columnNumber:23},this),Object(h.jsxDEV)("div",{className:"exchange-page",children:[Object(h.jsxDEV)("p",{children:"\u9875\u9762\u7c7b\u578b:"},void 0,!1,{fileName:_a,lineNumber:595,columnNumber:25},this),Object(h.jsxDEV)(Q.a,{onChange:e=>{this.onpageChange(e)},value:this.state.showPage,children:[Object(h.jsxDEV)(ne.a,{value:1,children:"\u843d\u5730\u9875"},void 0,!1,{fileName:_a,lineNumber:602,columnNumber:27},this),Object(h.jsxDEV)(ne.a,{value:2,children:"\u5217\u8868\u9875"},void 0,!1,{fileName:_a,lineNumber:603,columnNumber:27},this),Object(h.jsxDEV)(ne.a,{value:3,children:"\u8be6\u60c5\u9875"},void 0,!1,{fileName:_a,lineNumber:604,columnNumber:27},this)]},void 0,!0,{fileName:_a,lineNumber:596,columnNumber:25},this)]},void 0,!0,{fileName:_a,lineNumber:594,columnNumber:23},this),3==this.state.showPage?Object(h.jsxDEV)("div",{className:"exchange-page",children:[Object(h.jsxDEV)("p",{children:"\u8be6\u60c5\u9875\u5206\u7c7b:"},void 0,!1,{fileName:_a,lineNumber:609,columnNumber:27},this),Object(h.jsxDEV)(Q.a,{onChange:e=>{this.ondetailTypeChange(e)},value:this.state.detailType,children:[Object(h.jsxDEV)(ne.a,{value:3,children:"\u6743\u2003\u76ca"},void 0,!1,{fileName:_a,lineNumber:616,columnNumber:29},this),Object(h.jsxDEV)(ne.a,{value:4,children:"\u7acb\u51cf\u91d1"},void 0,!1,{fileName:_a,lineNumber:617,columnNumber:29},this),Object(h.jsxDEV)(ne.a,{value:5,children:"\u7ea2\u5305"},void 0,!1,{fileName:_a,lineNumber:618,columnNumber:29},this)]},void 0,!0,{fileName:_a,lineNumber:610,columnNumber:27},this)]},void 0,!0,{fileName:_a,lineNumber:608,columnNumber:25},this):null,Object(h.jsxDEV)("div",{className:"touse",children:Object(h.jsxDEV)(u.a,{type:"primary",onClick:()=>{this.onUse(this.state.moudleData,this.state.showType)},children:[" ","\u4f7f\u7528"," "]},void 0,!0,{fileName:_a,lineNumber:623,columnNumber:25},this)},void 0,!1,{fileName:_a,lineNumber:622,columnNumber:23},this)]},void 0,!0,{fileName:_a,lineNumber:544,columnNumber:21},this)]},void 0,!0,{fileName:_a,lineNumber:532,columnNumber:19},this)},void 0,!1,{fileName:_a,lineNumber:531,columnNumber:17},this)]},void 0,!0,{fileName:_a,lineNumber:523,columnNumber:15},this)]},void 0,!0,{fileName:_a,lineNumber:521,columnNumber:13},this):null]},void 0,!0,{fileName:_a,lineNumber:334,columnNumber:9},this)},void 0,!1,{fileName:_a,lineNumber:333,columnNumber:7},this)}}var Oa=i(494),Da="/Users/zhangds/web/blue-brother/frontend/src/pages/order/downloadList/list.js";const Ea=[{title:"\u8ba2\u5355\u6587\u4ef6\u540d\u79f0",name:"file_name",prop:"file_name",type:"normal",width:"50%"},{title:"\u751f\u6210\u8fdb\u5ea6\u6761",prop:"progress",name:"progress",width:"30%",type:"slot"},{title:"\u64cd\u4f5c",name:"role",prop:"operation",type:"slot",defaultText:0,width:"20%"}];let Va;class ka extends m.a.Component{constructor(e){super(e),this.state={tabList:[{title:"\u8ba2\u5355\u4e0b\u8f7d\u5217\u8868"}],orderList:[],tableHeight:500,page:1,limit:10,file_name:"",key_word:"",total:3,loading_visible:!1}}componentWillMount(){this.setState({tableHeight:window.innerHeight-430})}componentDidMount(){this.getDownloadList(),Va=setInterval((()=>{this.getDownloadList()}),1e3)}componentWillUnmount(){clearInterval(Va)}deleteFn(e,t){let i=this;G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:["\u662f\u5426\u5220\u9664",Object(h.jsxDEV)("b",{children:["[",t.file_name,"]"]},void 0,!0,{fileName:Da,lineNumber:72,columnNumber:15},this),"\uff1f"]},void 0,!0,{fileName:Da,lineNumber:71,columnNumber:9},this),onConfirm(){Object(a.D)(t.filter_md5).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.clear(),c.a.success(t),i.getDownloadList()}),(e=>{c.a.error(e)}))})).catch()},onCancel(){},className:"questModal",parentComponent:this})}pageChange(e){this.setState({page:e}),setTimeout((()=>{this.getDownloadList()}),0)}countChange(e){this.setState({page:1,limit:e}),setTimeout((()=>{this.getDownloadList()}),0)}sureFn(){this.setState({page:1}),setTimeout((()=>{this.getDownloadList()}),0)}exportFn(e,t){this.setState({loading_visible:!0}),Object(a.I)(t.filter_md5).then((e=>{if(setTimeout((()=>{this.setState({loading_visible:!1})}),1e3),"application/json"==e.type){const t=new FileReader;t.readAsText(e,"utf-8"),t.onload=function(){const e=JSON.parse(t.result);c.a.clear(),c.a.error(e.message)}}else{let a=new Blob([e]),s=t.file_name+".zip";var i=document.createElement("a");i.href=window.URL.createObjectURL(a),i.download=s,i.click(),window.URL.revokeObjectURL(i.href)}})).catch((e=>{}))}getDownloadList(){let{page:e,limit:t,file_name:i}=this.state,s={page:e,limit:t,file_name:i};Object(a.Mb)(s).then((e=>{Object(a.Tb)(e,((e,t)=>{this.setState({total:e.total,orderList:e.data}),e.generate<1&&clearInterval(Va)}),(e=>{c.a.error(e)}))})).catch((e=>{}))}statuStyle(e){let t;return e<"70"&&(t="normal"),"80"==e&&(t="exception"),"100"==e&&(t="success"),t}render(){return Object(h.jsxDEV)("div",{id:"dislist",className:"orderList",children:Object(h.jsxDEV)(Ft,{tabs:this.state.tabList,children:Object(h.jsxDEV)(vt.a,{loading:this.state.loading_visible,icon:"circle",iconSize:32,iconText:"\u4e0b\u8f7d\u4e2d...",className:"save_loading",children:[Object(h.jsxDEV)("div",{className:"distable dflexajce",children:Object(h.jsxDEV)(n.a,{labelWidth:0,onClearItem:e=>{this.setState({file_name:"",page:1}),setTimeout((()=>{this.getDownloadList()}),0)},wordSearch:this.sureFn.bind(this),onChange:e=>this.setState({file_name:e}),value:this.state.file_name,icon:"search",placeholder:"\u8bf7\u8f93\u5165\u8ba2\u5355\u6587\u4ef6\u540d\u79f0\u641c\u7d22",countShow:!1,height:"36px",width:"260px",alignment:"left"},void 0,!1,{fileName:Da,lineNumber:203,columnNumber:15},this)},void 0,!1,{fileName:Da,lineNumber:202,columnNumber:13},this),Object(h.jsxDEV)("div",{className:"table-container",children:Object(h.jsxDEV)(I,{spliteColor:"#fff",tableData:this.state.orderList,Column:Ea,dataCount:this.state.total,itemcheck:this.state.itemcheck,allcheck:this.state.allcheck,isMultiple:!1,page:this.state.page,countbarVisible:!1,isSwitch:!1,ref:"orderList",maxheight:this.state.tableHeight,pageChange:e=>{this.pageChange(e)},countChange:e=>{this.countChange(e)},ComponentHandler:(e,t)=>"progress"==e?Object(h.jsxDEV)(Oa.a,{percent:t.process,status:this.statuStyle(t.process),width:180,strokeWidth:5,strokeLinecap:"round"},void 0,!1,{fileName:Da,lineNumber:245,columnNumber:23},this):"operation"==e?Object(h.jsxDEV)("p",{children:[Object(h.jsxDEV)("span",{className:3!=t.status||0===t.process?"grid-link disabled":"grid-link",onClick:e=>{3===t.status&&100===t.process&&this.exportFn(e,t)},children:"\u4e0b\u8f7d"},void 0,!1,{fileName:Da,lineNumber:257,columnNumber:25},this),Object(h.jsxDEV)("span",{className:1==t.status||0===t.process?"grid-link ml15 disabled":"ml15 grid-link",onClick:e=>{3===t.status&&100===t.process&&this.deleteFn(e,t)},children:"\u5220\u9664"},void 0,!1,{fileName:Da,lineNumber:272,columnNumber:25},this)]},void 0,!0,{fileName:Da,lineNumber:256,columnNumber:23},this):void 0},void 0,!1,{fileName:Da,lineNumber:223,columnNumber:15},this)},void 0,!1,{fileName:Da,lineNumber:222,columnNumber:13},this)]},void 0,!0,{fileName:Da,lineNumber:195,columnNumber:11},this)},void 0,!1,{fileName:Da,lineNumber:194,columnNumber:9},this)},void 0,!1,{fileName:Da,lineNumber:193,columnNumber:7},this)}}const Sa=()=>{new Date;const e=new Date;return e.setTime(e.getTime()-2592e6),e},wa=()=>new Date;var Ca=i(507);i(245);const Ta=[{title:"\u8ba2\u5355\u53f7",name:"order_number",prop:"order_number",type:"normal",width:"150px"},{title:"\u5305\u7801\u7ed3\u7b97\u8ba2\u5355ID",name:"settlement_no",prop:"settlement_no",type:"normal",width:"200px"},{title:"\u5151\u6362\u7801-\u6279\u6b21ID",name:"code_batch_id",prop:"code_batch_id",type:"normal",width:"80px"},{title:"\u5546\u54c1\u540d\u79f0",prop:"product_name",name:"product_name",width:"120px",type:"normal"},{title:"\u5b98\u65b9\u4ef7\u683c",name:"official_price",prop:"official_price",type:"normal",width:"80px"},{title:"\u5408\u540c\u4ef7(\u6210\u672c\u4ef7)",name:"cost",type:"slot",prop:"cost",width:"120px"},{title:"\u5236\u5238\u5546\u6237",name:"wechat_subject",prop:"wechat_subject",width:"50px",type:"slot"},{title:"\u5206\u9500\u5546",name:"reseller_name",type:"normal",prop:"reseller_name",width:"auto"},{title:"\u5f52\u5c5ekey\u6279\u6b21",name:"key_batch_id",prop:"key_batch_id",width:"80px",type:"normal"},{title:"\u5f52\u5c5e\u8425\u9500\u8ba1\u5212",name:"plan_title",prop:"plan_title",width:"auto",type:"normal"},{title:"\u8d2d\u4e70\u6570\u91cf",name:"num",type:"normal",prop:"num",width:"50px"},{title:"\u8ba2\u5355\u72b6\u6001",name:"statusDom",prop:"statusDom",type:"slot",width:"120px"},{title:"\u652f\u4ed8\u72b6\u6001",name:"pay_status",prop:"pay_status",type:"slot",width:"80px"},{title:"\u64cd\u4f5c",prop:"opearo",name:"opearo",type:"slot",width:"220px"},{title:"\u6279\u6b21\u53f7",name:"channel_activity_id",type:"slot",prop:"channel_activity_id",width:"auto"},{title:"\u521b\u5efa\u65f6\u95f4",name:"create_time",prop:"create_time",width:"130px",type:"normal"},{title:"\u66f4\u65b0\u65f6\u95f4",name:"status_modify_time",prop:"status_modify_time",width:"130px",type:"slot"},{title:"\u8d26\u53f7",name:"account",type:"slot",prop:"account",width:"auto"},{title:"\u5546\u54c1\u7c7b\u578b",name:"product_type",prop:"product_type",width:"50px",type:"slot"},{title:"\u8ba2\u5355\u7c7b\u578b",name:"order_type",prop:"order_type",width:"50px",type:"slot"},{title:"\u6838\u9500\u72b6\u6001",name:"usage_status",prop:"usage_status",width:"120px",type:"slot"},{title:"\u5931\u8d25\u539f\u56e0",name:"receive_error",prop:"receive_error",width:"150px",type:"slot"},{title:"\u51cf\u6263\uff08\u5143\uff09",name:"discount_amount",prop:"discount_amount",type:"normal",width:"80px"},{title:"\u5238\u540e\u4ef7\uff08\u5143\uff09",name:"pay_amount",prop:"pay_amount",type:"normal",width:"80px"},{title:"key",name:"key",prop:"key",width:"140px",type:"normal"}],Ia=[{key:"order_number",text:"\u8ba2\u5355\u53f7",placeholder:"\u8bf7\u8f93\u5165\u8ba2\u5355\u53f7\u67e5\u8be2"},{key:"key",text:"key\u67e5\u8be2",placeholder:"\u8bf7\u8f93\u5165key\u67e5\u8be2"},{key:"key_batch_id",text:"key\u6279\u6b21",placeholder:"\u8bf7\u8f93\u5165key\u6279\u6b21\u67e5\u8be2"},{key:"account",text:"\u5145\u503c\u8d26\u53f7",placeholder:"\u8bf7\u8f93\u5165\u5145\u503c\u8d26\u53f7\u67e5\u8be2"},{key:"cash_activity_id",text:"\u7ea2\u5305\u6279\u6b21\u53f7",placeholder:"\u8bf7\u8f93\u5165\u7ea2\u5305\u6279\u6b21\u53f7\u67e5\u8be2"},{key:"code_batch_id",text:"\u5151\u6362\u7801\u6279\u6b21ID",placeholder:"\u8bf7\u8f93\u5165\u5151\u6362\u7801\u6279\u6b21ID\u67e5\u8be2"},{key:"channel_activity_id",text:"\u7acb\u51cf\u91d1\u6279\u6b21\u53f7",placeholder:"\u8bf7\u8f93\u5165"},{key:"receive_user_id",text:"\u7ea2\u5305\u8ba2\u5355\u7528\u6237openId",placeholder:"\u8bf7\u8f93\u5165"},{key:"channel_user_id",text:"\u7acb\u51cf\u91d1\u8ba2\u5355\u7528\u6237openId",placeholder:"\u8bf7\u8f93\u5165"},{key:"settlement_no",text:"\u5305\u7801\u7ed3\u7b97\u8ba2\u5355ID",placeholder:"\u8bf7\u8f93\u5165"}],Fa=[{id:0,label:"\u8ba2\u5355\u72b6\u6001",prop:"status",menuList:[{id:0,name:"\u76f4\u5145-\u5f85\u5145\u503c"},{id:1,name:"\u76f4\u5145-\u5145\u503c\u4e2d"},{id:2,name:"\u76f4\u5145-\u5df2\u5b8c\u6210"},{id:3,name:"\u76f4\u5145-\u5145\u503c\u5931\u8d25"},{id:4,name:"\u76f4\u5145-\u5df2\u53d6\u6d88"},{id:111,name:"\u7acb\u51cf\u91d1-\u5f85\u9886\u53d6"},{id:222,name:"\u7acb\u51cf\u91d1-\u5df2\u9886\u53d6"},{id:5,name:"\u7acb\u51cf\u91d1-\u5df2\u8fc7\u671f"},{id:6,name:"\u73b0\u91d1\u7ea2\u5305-\u5f85\u53d1\u653e"},{id:7,name:"\u73b0\u91d1\u7ea2\u5305-\u5df2\u6838\u9500"},{id:8,name:"\u73b0\u91d1\u7ea2\u5305-\u5df2\u8fc7\u671f"},{id:9,name:"\u73b0\u91d1\u7ea2\u5305-\u5df2\u5931\u8d25"}]},{id:1,label:"\u652f\u4ed8\u72b6\u6001",prop:"pay_status",menuList:[{id:1,name:"\u5f85\u652f\u4ed8"},{id:2,name:"\u5df2\u652f\u4ed8"},{id:3,name:"\u5df2\u9000\u6b3e"}]},{id:3,label:"\u6838\u9500\u72b6\u6001",prop:"voucher_status",menuList:[{id:1,name:"\u672a\u6838\u9500"},{id:2,name:"\u5df2\u6838\u9500"},{id:3,name:"\u5df2\u8fc7\u671f"},{id:4,name:"\u5df2\u9000\u6b3e"},{id:7,name:"\u90e8\u5206\u9000\u56de"},{id:8,name:"\u5df2\u9000\u56de"}]}],La={account:[{type:"required",message:"\u8bf7\u8f93\u5165\u8d26\u53f7"}]};var Ha="/Users/zhangds/web/blue-brother/frontend/src/pages/order/list/list.js",qa=i(67);let Ma=qa(wa()).format("YYYY-MM-DD"),Pa=qa(Sa()).format("YYYY-MM-DD");class Ba extends m.a.Component{constructor(e){super(e),this.state={orderType:"",tabList:[{title:"\u8ba2\u5355\u5217\u8868"}],orderList:[],filterList:Fa,selectiondata:[],menuList:[{id:0,name:"\u8ba2\u5355\u72b6\u6001",check:!1},{id:1,name:"\u652f\u4ed8\u72b6\u6001",check:!1}],allcheck:!1,itemcheck:!1,menuVisible:!1,combinedValue:[],tableHeight:500,status:null,pay_status:null,voucher_status:null,planOptions:[],resellerOptions:[],productOptions:[],page:1,limit:10,key_word:"",officialprice:0,contractprice:0,costprice:0,totalprice:0,placeholder:"\u8bf7\u8f93\u5165key\u67e5\u8be2",visible:!1,model:{account:""},search:this.initSearch()},this.onChangeCombinedDate=this.onChangeCombinedDate.bind(this)}initSearch(){return{plan_id:"",reseller_id:"",product_id:""}}searchChange(e,t){const i=this.state.search;i[e]=t,this.setState({search:i})}selection(e){this.setState({selectiondata:e});let t=0,i=0,a=0,s=0;e.forEach((e=>{t+=Number(e.official_price),i+=Number(e.contract_price),a+=Number(e.cost_price),s+=Number(e.total)})),this.setState({officialprice:t,contractprice:i,costprice:a,totalprice:s})}getPlan(){Object(a.rb)().then((e=>Object(a.Tb)(e,((e,t)=>{const i=e.map((e=>({key:e.id,text:e.title})));this.setState({planOptions:i})}),(e=>{})))),Object(a.ub)().then((e=>{Object(a.Tb)(e,((e,t)=>{const i=e.map((e=>({key:e.id,text:e.name})));this.setState({resellerOptions:i})}))}))}getProducts(e){Object(a.Sb)(e).then((e=>Object(a.Tb)(e,((e,t)=>{const i=e.map((e=>({key:e.goods_id,text:e.goods_name})));this.setState({productOptions:i})}),(e=>{}))))}handlerRefundFunction(){this.refs.form.validator()&&Object(a.Ub)(this.state.orderNumber,{refund_account:this.state.model.account}).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.clear(),c.a.success(t),this.setState({visible:!1})}),(e=>{c.a.error(e)}))})).catch((e=>{}))}refundFunction(e){Object(a.Qc)(e).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.clear(),c.a.success(t)}),(e=>{c.a.error(e)}))})).catch((e=>{}))}exportFn(){let{status:e,orderType:t,option:i,key_word:s,pay_status:l,voucher_status:n,search:o}=this.state;const{plan_id:r,product_id:m,reseller_id:d}=o;let u={};if(u.plan_id=r?r.key:"",u.product_id=m?m.key:"",u.reseller_id=d?d.key:"",t&&e&&(u.type=t),this.state.combinedValue&&this.state.combinedValue[0]&&(u.begin_time=this.state.combinedValue[0],u.end_time=this.state.combinedValue[1]),null!==e&&void 0!==e&&e.length&&(u.status=null===e||void 0===e?void 0:e.join(",")),null!==l&&void 0!==l&&l.length&&(u.pay_status=null===l||void 0===l?void 0:l.join(",")),null!==n&&void 0!==n&&n.length&&(u.voucher_status=null===n||void 0===n?void 0:n.join(",")),i&&(u[i.key]=s),this.state.selectiondata&&this.state.selectiondata.length>0){let e=this.state.selectiondata.map((e=>e.order_number));u.order_numbers=e.join(",")}let b=this;G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:"\u662f\u5426\u5bfc\u51fa\u8ba2\u5355\uff1f"},void 0,!1,{fileName:Ha,lineNumber:246,columnNumber:16},this),onConfirm(){Object(a.mb)(u).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.clear(),c.a.success(t),b.props.history.push("/home/download-orderlist")}),(e=>{c.a.error(e)}))})).catch((e=>{c.a.error(e.message)}))},onCancel(){},className:"questModal",parentComponent:this})}deleteFn(e,t){let i=this;G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:["\u662f\u5426\u4f5c\u5e9f",Object(h.jsxDEV)("b",{children:["[",t.order_number,"]"]},void 0,!0,{fileName:Ha,lineNumber:282,columnNumber:15},this),"\uff1f"]},void 0,!0,{fileName:Ha,lineNumber:281,columnNumber:9},this),onConfirm(){Object(a.Cc)(t.order_number).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.clear(),c.a.success(t),i.getOrderFn()}),(e=>{c.a.error(e)}))})).catch((e=>{}))},onCancel(){},className:"questModal",parentComponent:this})}changeSuccessFn(e,t){let i=this;G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:["\u662f\u5426\u5c06",Object(h.jsxDEV)("b",{children:["[",t.order_number,"]"]},void 0,!0,{fileName:Ha,lineNumber:317,columnNumber:14},this),"\u8ba2\u5355\u6539\u4e3a\u6210\u529f\u72b6\u6001\uff1f"]},void 0,!0,{fileName:Ha,lineNumber:316,columnNumber:9},this),onConfirm(){Object(a.Dc)(t.order_number).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.clear(),c.a.success(t),i.getOrderFn()}),(e=>{c.a.error(e)}))})).catch((e=>{}))},onCancel(){},className:"questModal",parentComponent:this})}moreFn(e,t){this.props.history.push("/home/order-addetails?oid="+t.order_number),sessionStorage.setItem("pathname2","/home/order-addetails");sessionStorage.setItem("breaknav",JSON.stringify([{items:[{path:"/home/order-list",name:"\u8ba2\u5355\u7ba1\u7406"},{path:"/home/order-addetails",name:"\u8ba2\u5355\u8be6\u60c5"}]}]))}clearFn(){this.setState({allcheck:!1,selectiondata:[],itemcheck:!1})}onChangeCombinedDate(e){this.setState({combinedValue:e,page:1,limit:10,selectiondata:[]},(()=>{this.getOrderFn()}))}pageChange(e){this.setState({selectiondata:[],page:e},(()=>{this.getOrderFn()}))}countChange(e){this.setState({selectiondata:[],page:1,limit:e},(()=>{this.getOrderFn()}))}dynamicVoucher(){3===this.state.menuList.length&&this.refs.filterBar.onCloseSelect("",3,"voucher_status"),this.setState({menuList:[{id:0,name:"\u8ba2\u5355\u72b6\u6001",check:!1},{id:1,name:"\u652f\u4ed8\u72b6\u6001",check:!1}]})}onFilterClose(e){"status"===e&&this.dynamicVoucher();let t={};t[e]=null,this.setState(t),this.setState({orderType:null})}getOrderFn(e={}){let t=this,{page:i,limit:s,status:l,option:n,key_word:o,orderType:r,pay_status:m,voucher_status:d,search:u}=t.state;const{plan_id:h,product_id:b,reseller_id:p}=u;let N={page:i,limit:s,plan_id:h?h.key:"",product_id:b?b.key:"",reseller_id:p?p.key:""};r&&(N.type=r),this.state.combinedValue&&this.state.combinedValue[0]&&(N.begin_time=this.state.combinedValue[0],N.end_time=this.state.combinedValue[1]),e&&e[0]&&(N.begin_time=e[0],N.end_time=e[1]),e&&null==e[0]&&e.length>1&&(delete N.begin_time,delete N.end_time),n&&(N[n.key]=o),null!==l&&void 0!==l&&l.length&&(N.status=null===l||void 0===l?void 0:l.join(",")),null!==m&&void 0!==m&&m.length&&(N.pay_status=null===m||void 0===m?void 0:m.join(",")),null!==d&&void 0!==d&&d.length&&(N.voucher_status=null===d||void 0===d?void 0:d.join(",")),Object(a.nb)(N).then((e=>{Object(a.Tb)(e,((e,i)=>{const a=e.data,{total:s}=e;t.setState({orderList:a,total:s})}),(e=>{c.a.error(e)}))})).catch((e=>{}))}componentWillMount(){let e=[Pa+" 00:00:00",Ma+" 23:59:59"];this.getOrderFn(e),this.getPlan(),this.setState({tableHeight:window.innerHeight-490,combinedValue:e})}selectedId(e,t){if("status"===t){const t=[111,222,5];Object(Ca.a)(t,e).length>0?this.setState({menuList:[{id:0,name:"\u8ba2\u5355\u72b6\u6001",check:!1},{id:1,name:"\u652f\u4ed8\u72b6\u6001",check:!1},{id:3,name:"\u6838\u9500\u72b6\u6001",check:!1}]}):this.dynamicVoucher()}let i={},a=[];e.length&&"status"===t&&(e.map(((t,i)=>{[6,7,8,9].includes(t)?a.push(3):[111,222,5].includes(t)?a.push(2):a.push(1),111===t&&(e[i]=1),[222,7].includes(t)&&(e[i]=2),9===t&&(e[i]=3),6===t&&(e[i]=0),8===t&&(e[i]=5)})),a=[...new Set(a)].join(","),this.setState({orderType:a})),e.length<1&&"status"===t&&this.setState({orderType:""}),i[t]=e,this.setState(i),this.setState({page:1})}usageFunction(e){switch(e){case 1:case 5:case 6:return"\u672a\u6838\u9500";case 2:return"\u5df2\u6838\u9500";case 3:return"\u5df2\u8fc7\u671f";case 4:return"\u5df2\u9000\u6b3e";case 7:return"\u90e8\u5206\u9000\u56de";case 8:return"\u5df2\u9000\u56de";default:return"-"}}sendSms({order_number:e}){Object(a.Rc)({order_number:e}).then((({code:e,message:t})=>{c.a.clear(),200===e?c.a.success(t):c.a.error(t)}))}handlerReceiveRetry(e){Object(a.Pc)({order_number:e}).then((({code:e,message:t})=>{c.a.clear(),200===e?(c.a.success(t),this.getOrderFn()):c.a.error(t)}))}componentDidUpdate(e,t){t.status!=this.state.status&&this.getOrderFn(),t.pay_status!=this.state.pay_status&&this.getOrderFn(),t.voucher_status!=this.state.voucher_status&&this.getOrderFn()}reset(){this.setState({search:this.initSearch(),page:1,limit:10,key_word:"",placeholder:"",option:""},(()=>this.getOrderFn()))}menuItemClick(e,t){0==e?Object(a.dd)({order_number:t}).then((({code:e,message:t})=>{c.a.clear(),200===e?(this.getOrderFn(),c.a.success(t)):c.a.error(t)})):Object(a.bc)({order_number:t,event:e}).then((({code:e,message:t})=>{c.a.clear(),200===e?c.a.success(t):c.a.error(t)}))}render(){const e=Object(h.jsxDEV)(Jt.a,{className:"zent-datepicker-demo",value:this.state.combinedValue,showTime:{format:"HH:mm:ss",defaultTime:["00:00:00","23:59:59"]},format:"YYYY-MM-DD HH:mm:ss",onChange:this.onChangeCombinedDate},void 0,!1,{fileName:Ha,lineNumber:650,columnNumber:7},this);return Object(h.jsxDEV)("div",{id:"dislist",className:"orderList",children:Object(h.jsxDEV)(Ft,{tabs:this.state.tabList,slot:e,children:[Object(h.jsxDEV)("div",{className:"order-query",children:[Object(h.jsxDEV)(l.a,{children:[Object(h.jsxDEV)(s.a,{labelname:"\u8ba1\u5212\u540d\u79f0\uff1a",required:"",labelwidth:"95px",children:Object(h.jsxDEV)(X.a,{name:"state",value:this.state.search.plan_id,options:this.state.planOptions,placeholder:"\u8bf7\u9009\u62e9",width:204,clearable:!0,onChange:e=>{this.searchChange("plan_id",e),e?this.getProducts(e.key):(this.setState({productOptions:[]}),this.searchChange("product_id",""))}},void 0,!1,{fileName:Ha,lineNumber:668,columnNumber:17},this)},void 0,!1,{fileName:Ha,lineNumber:667,columnNumber:15},this),Object(h.jsxDEV)(s.a,{labelname:"\u5546\u54c1\u540d\u79f0\uff1a",required:"",labelwidth:"100px",children:Object(h.jsxDEV)(X.a,{name:"state",value:this.state.search.product_id,options:this.state.productOptions,placeholder:"\u8bf7\u5148\u9009\u62e9\u8ba1\u5212",width:204,clearable:!0,onChange:e=>{this.searchChange("product_id",e)}},void 0,!1,{fileName:Ha,lineNumber:687,columnNumber:17},this)},void 0,!1,{fileName:Ha,lineNumber:686,columnNumber:15},this),Object(h.jsxDEV)(s.a,{labelname:"\u5206\u9500\u5546\u540d\u79f0\uff1a",required:"",labelwidth:"120px",children:Object(h.jsxDEV)(X.a,{name:"state",value:this.state.search.reseller_id,options:this.state.resellerOptions,placeholder:"\u8bf7\u9009\u62e9",width:204,clearable:!0,onChange:e=>{this.searchChange("reseller_id",e)}},void 0,!1,{fileName:Ha,lineNumber:700,columnNumber:17},this)},void 0,!1,{fileName:Ha,lineNumber:699,columnNumber:15},this),Object(h.jsxDEV)(s.a,{labelname:"\u591a\u529f\u80fd\u67e5\u8be2\uff1a",required:"",labelwidth:"120px",children:Object(h.jsxDEV)(X.a,{width:"204px",value:this.state.option,style:{marginBottom:"5px"},onChange:e=>this.setState({option:e,key_word:"",placeholder:e&&e.placeholder}),disableSearch:!0,options:Ia,clearable:!0,placeholder:"\u8bf7\u9009\u62e9\u67e5\u8be2\u5206\u7c7b"},void 0,!1,{fileName:Ha,lineNumber:713,columnNumber:17},this)},void 0,!1,{fileName:Ha,lineNumber:712,columnNumber:15},this),this.state.option?Object(h.jsxDEV)(s.a,{labelname:"",required:"",labelwidth:"0",children:Object(h.jsxDEV)(n.a,{className:"query-ip",labelWidth:0,onClearItem:e=>{this.setState({key_word:""})},onChange:e=>this.setState({key_word:e}),value:this.state.key_word,placeholder:this.state.placeholder,countShow:!1,height:32,width:270},void 0,!1,{fileName:Ha,lineNumber:729,columnNumber:19},this)},void 0,!1,{fileName:Ha,lineNumber:728,columnNumber:17},this):null,Object(h.jsxDEV)(s.a,{labelname:"",required:"",labelwidth:"0",children:Object(h.jsxDEV)("div",{style:{width:"200px"},children:[Object(h.jsxDEV)(u.a,{type:"primary",onClick:()=>{this.setState({page:1},(()=>{this.getOrderFn()}))},children:"\u67e5\u8be2"},void 0,!1,{fileName:Ha,lineNumber:747,columnNumber:19},this),Object(h.jsxDEV)(u.a,{onClick:()=>this.reset(),children:"\u91cd\u7f6e"},void 0,!1,{fileName:Ha,lineNumber:757,columnNumber:19},this)]},void 0,!0,{fileName:Ha,lineNumber:746,columnNumber:17},this)},void 0,!1,{fileName:Ha,lineNumber:745,columnNumber:15},this)]},void 0,!0,{fileName:Ha,lineNumber:666,columnNumber:13},this),Object(h.jsxDEV)(u.a,{className:"exportOrder",type:"default",icon:"download",onClick:this.exportFn.bind(this),children:"\u5bfc\u51fa\u8ba2\u5355"},void 0,!1,{fileName:Ha,lineNumber:761,columnNumber:13},this)]},void 0,!0,{fileName:Ha,lineNumber:665,columnNumber:11},this),Object(h.jsxDEV)(hi,{onClose:e=>{this.onFilterClose(e)},selectFn:(e,t)=>{this.selectedId(e,t)},ref:"filterBar",multiple:!0,filterList:this.state.filterList,menuList:this.state.menuList},void 0,!1,{fileName:Ha,lineNumber:770,columnNumber:11},this),Object(h.jsxDEV)("div",{children:[this.state.selectiondata.length>0?Object(h.jsxDEV)(ki.a,{type:"info",extraContent:Object(h.jsxDEV)(u.a,{type:"primary",onClick:this.clearFn.bind(this),children:"\u6e05\u7a7a"},void 0,!1,{fileName:Ha,lineNumber:787,columnNumber:19},this),children:["\u5df2\u9009\u62e9",Object(h.jsxDEV)("font",{color:"#296bef",style:{fontWeight:"bold"},children:this.state.selectiondata.length},void 0,!1,{fileName:Ha,lineNumber:793,columnNumber:17},this),"\u9879\uff0c\u5b98\u65b9\u4ef7\u91d1\u989d\u603b\u8ba1\uffe5",this.state.officialprice.toFixed(4),"\uff0c\u5408\u540c\u4ef7\u91d1\u989d\u603b\u8ba1\uffe5",this.state.contractprice.toFixed(4),"\uff0c\u6210\u672c\u4ef7\u91d1\u989d\u603b\u8ba1\uff1a\uffe5",this.state.costprice.toFixed(4),"\uff0c\u7ed3\u7b97\u4ef7\u91d1\u989d\u603b\u8ba1\uff1a\uffe5",this.state.totalprice.toFixed(4)]},void 0,!0,{fileName:Ha,lineNumber:784,columnNumber:15},this):null,Object(h.jsxDEV)(I,{spliteColor:"#fff",tableData:this.state.orderList,Column:Ta,dataCount:this.state.total,itemcheck:this.state.itemcheck,allcheck:this.state.allcheck,isMultiple:!0,page:this.state.page,countbarVisible:!1,isSwitch:!1,ref:"orderList",maxheight:this.state.tableHeight,pageChange:e=>{this.pageChange(e)},countChange:e=>{this.countChange(e)},checkChange:this.selection.bind(this),ComponentHandler:(e,t)=>{return"cost"==e?Object(h.jsxDEV)("span",{children:[t.contract_price,"(",1===t.type?t.cost_price:t.official_price,")"]},void 0,!0,{fileName:Ha,lineNumber:825,columnNumber:21},this):"account"==e?Object(h.jsxDEV)("span",{children:t.account||"-"},void 0,!1,{fileName:Ha,lineNumber:832,columnNumber:26},this):"statusDom"==e?Object(h.jsxDEV)("p",{className:"dflexa",children:Object(h.jsxDEV)("span",{children:[Object(h.jsxDEV)("font",{className:"icon",style:{background:At.orderStatusBg(t)}},void 0,!1,{fileName:Ha,lineNumber:838,columnNumber:25},this),t.status_text,2===t.type&&[1,2].includes(t.status)?`\uff08${t.received_num}/${t.num}\uff09`:""]},void 0,!0,{fileName:Ha,lineNumber:837,columnNumber:23},this)},void 0,!1,{fileName:Ha,lineNumber:836,columnNumber:21},this):"pay_status"==e&&1===t.use_coupon?Object(h.jsxDEV)("p",{className:"dflexa",children:Object(h.jsxDEV)("span",{children:[Object(h.jsxDEV)("font",{className:"icon",style:{background:At.orderPayStatusBg(1===t.pay_status?"":parseInt(t.pay_status))}},void 0,!1,{fileName:Ha,lineNumber:856,columnNumber:25},this),t.pay_status_text]},void 0,!0,{fileName:Ha,lineNumber:855,columnNumber:23},this)},void 0,!1,{fileName:Ha,lineNumber:854,columnNumber:21},this):"channel_activity_id"==e?Object(h.jsxDEV)("span",{children:t.channel_activity_id||t.cash_activity_id||"-"},void 0,!1,{fileName:Ha,lineNumber:871,columnNumber:21},this):"order_type"==e?Object(h.jsxDEV)("span",{children:"\u865a\u62df"},void 0,!1,{fileName:Ha,lineNumber:875,columnNumber:26},this):"receive_error"==e?Object(h.jsxDEV)("span",{children:t.orderVoucher?t.orderVoucher.receive_error:"-"},void 0,!1,{fileName:Ha,lineNumber:879,columnNumber:21},this):"usage_status"==e?Object(h.jsxDEV)("p",{className:"dflexa",children:Object(h.jsxDEV)("span",{children:[Object(h.jsxDEV)("font",{className:"icon",style:{background:At.orderVoucherStatusBg(parseInt(t.orderVoucher?t.orderVoucher.status:0))}},void 0,!1,{fileName:Ha,lineNumber:886,columnNumber:25},this),this.usageFunction(null===(i=t.orderVoucher)||void 0===i?void 0:i.status),2===t.type&&2===(null===(a=t.orderVoucher)||void 0===a?void 0:a.status)?`\uff08${t.used_num}/${t.num}\uff09`:""]},void 0,!0,{fileName:Ha,lineNumber:885,columnNumber:23},this)},void 0,!1,{fileName:Ha,lineNumber:884,columnNumber:21},this):"status_modify_time"==e?Object(h.jsxDEV)("span",{children:3==t.type?t.update_time:(null===(s=t.orderVoucher)||void 0===s?void 0:s.status_modify_time)||"-"},void 0,!1,{fileName:Ha,lineNumber:905,columnNumber:21},this):"wechat_subject"==e?Object(h.jsxDEV)(h.Fragment,{children:t.wechat_subject||"-"},void 0,!1):"product_type"==e?Object(h.jsxDEV)("span",{children:1===t.type&&2==t.product_type?"\u5361\u5bc6":1==t.type?"\u76f4\u51b2":2==t.type?"\u7acb\u51cf\u91d1":3==t.type?"\u5151\u6362\u7801\u73b0\u91d1\u7ea2\u5305":"-"},void 0,!1,{fileName:Ha,lineNumber:918,columnNumber:21},this):"opearo"==e?Object(h.jsxDEV)("div",{children:[Object(h.jsxDEV)("span",{className:"grid-link",onClick:e=>this.moreFn(e,t),children:"\u8be6\u60c5"},void 0,!1,{fileName:Ha,lineNumber:934,columnNumber:23},this),2!=t.type&&(1==t.status||0==t.status&&1==t.type||6==t.status||0==t.status&&3==t.type)?Object(h.jsxDEV)("span",{className:"grid-link",onClick:e=>this.deleteFn(e,t),children:"\u4f5c\u5e9f"},void 0,!1,{fileName:Ha,lineNumber:942,columnNumber:25},this):null,2!=t.type&&(1==t.status||0==t.status&&3==t.type)&&Object(h.jsxDEV)("span",{className:"grid-link",onClick:e=>this.changeSuccessFn(e,t),children:"\u6539\u4e3a\u6210\u529f"},void 0,!1,{fileName:Ha,lineNumber:948,columnNumber:27},this),3==t.status&&2==t.pay_status?Object(h.jsxDEV)(h.Fragment,{children:[Object(h.jsxDEV)("span",{className:"grid-link",onClick:()=>this.refundFunction(t.order_number),children:"\u91cd\u8bd5\u9000\u6b3e"},void 0,!1,{fileName:Ha,lineNumber:957,columnNumber:27},this),Object(h.jsxDEV)("span",{className:"grid-link",onClick:e=>{this.setState({orderNumber:t.order_number,visible:!0})},children:"\u624b\u52a8\u9000\u6b3e"},void 0,!1,{fileName:Ha,lineNumber:963,columnNumber:27},this)]},void 0,!0):null,2===t.type&&[1,2].includes(t.status)&&t.received_num!==t.num?Object(h.jsxDEV)("span",{className:"grid-link",onClick:()=>this.handlerReceiveRetry(t.order_number),children:"\u91cd\u8bd5\u9886\u53d6"},void 0,!1,{fileName:Ha,lineNumber:979,columnNumber:25},this):null,1==t.type&&2==t.product_type&&1==t.product.card_show&&2==t.status&&Object(h.jsxDEV)("span",{className:"grid-link",onClick:e=>this.sendSms(t),children:"\u53d1\u9001\u5361\u5bc6\u77ed\u4fe1"},void 0,!1,{fileName:Ha,lineNumber:990,columnNumber:27},this),Object(h.jsxDEV)(y.a,{position:y.d.RightTop,visible:this.state.menuVisible,onVisibleChange:e=>this.setState({visible1:e}),children:[Object(h.jsxDEV)(y.b,{children:Object(h.jsxDEV)("div",{className:"linkmore grid-link",children:["\u66f4\u591a ",Object(h.jsxDEV)(g.a,{type:"down"},void 0,!1,{fileName:Ha,lineNumber:1001,columnNumber:32},this)]},void 0,!0,{fileName:Ha,lineNumber:1e3,columnNumber:27},this)},void 0,!1,{fileName:Ha,lineNumber:999,columnNumber:25},this),Object(h.jsxDEV)(y.c,{children:Object(h.jsxDEV)(O.a,{onClick:(e,i)=>this.menuItemClick(i,t.order_number),children:[t.notifyEvent&&t.notifyEvent.map((e=>Object(h.jsxDEV)(D.a,{disabled:2==e.disable,children:e.name},e.event,!1,{fileName:Ha,lineNumber:1008,columnNumber:33},this))),2===t.type&&t.orderVoucher&&1===t.orderVoucher.status&&Object(h.jsxDEV)(D.a,{children:"\u6838\u9500\u67e5\u8be2"},0,!1,{fileName:Ha,lineNumber:1015,columnNumber:33},this)]},void 0,!0,{fileName:Ha,lineNumber:1005,columnNumber:27},this)},void 0,!1,{fileName:Ha,lineNumber:1004,columnNumber:25},this)]},void 0,!0,{fileName:Ha,lineNumber:994,columnNumber:23},this)]},void 0,!0,{fileName:Ha,lineNumber:933,columnNumber:21},this):void 0;var i,a,s}},void 0,!1,{fileName:Ha,lineNumber:802,columnNumber:13},this)]},void 0,!0,{fileName:Ha,lineNumber:782,columnNumber:11},this),Object(h.jsxDEV)(ce.a,{visible:this.state.visible,className:"questModal refundForm",onClose:()=>this.setState({visible:!1}),title:"\u9000\u6b3e",children:[Object(h.jsxDEV)(l.a,{model:this.state.model,rules:La,ref:"form",children:[Object(h.jsxDEV)(s.a,{labelname:"\u9000\u6b3e\u8d26\u53f7",id:"account",prop:"account",labelwidth:"80px",children:Object(h.jsxDEV)(n.a,{onChange:e=>{const t=this.state.model;t.account=e,this.setState({model:t})},onClearItem:()=>{const e=this.state.model;e.account="",this.setState({model:e})},value:this.state.model.account,placeholder:"",labelWidth:"0px",maxLength:40,height:"36px",unit:"",countShow:!1,width:"300px",alignment:"left"},void 0,!1,{fileName:Ha,lineNumber:1035,columnNumber:17},this)},void 0,!1,{fileName:Ha,lineNumber:1034,columnNumber:15},this),Object(h.jsxDEV)(s.a,{labelname:"",id:"account-none",prop:"account",children:Object(h.jsxDEV)(n.a,{onChange:e=>{},onClearItem:()=>{},value:this.state.model.account,placeholder:"",labelWidth:"0px",maxLength:40,height:"36px",unit:"",countShow:!1,width:"520px",alignment:"left"},void 0,!1,{fileName:Ha,lineNumber:1058,columnNumber:17},this)},void 0,!1,{fileName:Ha,lineNumber:1057,columnNumber:15},this)]},void 0,!0,{fileName:Ha,lineNumber:1033,columnNumber:13},this),Object(h.jsxDEV)("p",{className:"dflexajce",children:[Object(h.jsxDEV)(u.a,{onClick:()=>this.setState({visible:!1}),children:"\u53d6\u6d88"},void 0,!1,{fileName:Ha,lineNumber:1074,columnNumber:15},this),Object(h.jsxDEV)(u.a,{type:"primary",onClick:()=>this.handlerRefundFunction(),htmlType:"submit",children:"\u63d0\u4ea4"},void 0,!1,{fileName:Ha,lineNumber:1075,columnNumber:15},this)]},void 0,!0,{fileName:Ha,lineNumber:1073,columnNumber:13},this)]},void 0,!0,{fileName:Ha,lineNumber:1027,columnNumber:11},this)]},void 0,!0,{fileName:Ha,lineNumber:664,columnNumber:9},this)},void 0,!1,{fileName:Ha,lineNumber:663,columnNumber:7},this)}}var Aa=i(156),za=i.n(Aa),Ja=(i(246),"/Users/zhangds/web/blue-brother/frontend/src/pages/order/more/more.js");const Ua=[{title:"\u5e8f\u53f7",name:"index",prop:"index",type:"slot",width:"20%"},{title:"\u521b\u5efa\u65f6\u95f4",name:"time",prop:"time",type:"slot",width:"20%"},{title:"\u64cd\u4f5c\u63cf\u8ff0",name:"message",prop:"message",type:"normal",width:"20%"},{title:"\u8be6\u60c5",name:"opearo",type:"slot",prop:"opearo",width:"50%"}];class Wa extends m.a.Component{constructor(e){super(e),this.state={tabList:[{title:"\u8be6\u60c5"},{title:"\u65e5\u5fd7"}],tabactive:0,orderDetailLog_data:[],orderDetail_data:{},tableHeight:500,page:1,orderNo:"",limit:10,total:0}}tabFn(e){this.setState({tabactive:e});let t=[];t=0==e?[{items:[{path:"/order-list",name:"\u8ba2\u5355\u7ba1\u7406"},{path:"/order-addetails",name:"\u8ba2\u5355\u8be6\u60c5"}]}]:[{items:[{path:"/order-list",name:"\u8ba2\u5355\u7ba1\u7406"},{path:"/order-addetails",name:"\u8ba2\u5355\u65e5\u5fd7"}]}],sessionStorage.setItem("breaknav",JSON.stringify(t)),this.getOrderLogFn()}selection(){}getOrderLogFn(){let e=this,{page:t,limit:i,orderNo:s}=this.state,l={page:t,limit:i};Object(a.ob)(s,l).then((t=>{Object(a.Tb)(t,((t,i)=>{const a=t.data;e.setState({orderDetailLog_data:a,total:t.total})}),(e=>{c.a.error(e)}))})).catch((e=>{}))}getDetails(e){let t=this;Object(a.lb)(e).then((e=>{Object(a.Tb)(e,((e,i)=>{t.setState({orderDetail_data:e})}),(e=>{c.a.error(e)}))})).catch((e=>{}))}pageChange(e){this.setState({page:e}),setTimeout((()=>{this.getOrderLogFn()}),0)}countChange(e){this.setState({page:1,limit:e}),setTimeout((()=>{this.getOrderLogFn()}),0)}componentWillMount(){let e=window.location.href,t=e.lastIndexOf("="),i=e.substr(t+1,e.length);this.setState({orderNo:i}),this.getDetails(i),this.setState({tableHeight:window.innerHeight-430})}render(){var e,t,i,a;let s=this.state.orderDetail_data;return Object(h.jsxDEV)("div",{id:"more",className:"maincenter",children:Object(h.jsxDEV)(Ft,{tabs:this.state.tabList,tabChange:this.tabFn.bind(this),children:0==this.state.tabactive?Object(h.jsxDEV)("ul",{className:"main-body",children:[Object(h.jsxDEV)("li",{children:[Object(h.jsxDEV)("span",{children:"\u8ba2\u5355\u53f7"},void 0,!1,{fileName:Ja,lineNumber:166,columnNumber:17},this),Object(h.jsxDEV)("font",{children:s.order_number},void 0,!1,{fileName:Ja,lineNumber:167,columnNumber:17},this)]},void 0,!0,{fileName:Ja,lineNumber:165,columnNumber:15},this),Object(h.jsxDEV)("li",{children:[Object(h.jsxDEV)("span",{children:"\u521b\u5efa\u65f6\u95f4"},void 0,!1,{fileName:Ja,lineNumber:170,columnNumber:17},this),Object(h.jsxDEV)("font",{children:s.create_time},void 0,!1,{fileName:Ja,lineNumber:171,columnNumber:17},this)]},void 0,!0,{fileName:Ja,lineNumber:169,columnNumber:15},this),Object(h.jsxDEV)("li",{children:[Object(h.jsxDEV)("span",{children:"\u5546\u54c1\u540d\u79f0"},void 0,!1,{fileName:Ja,lineNumber:174,columnNumber:17},this),Object(h.jsxDEV)("font",{children:null===(e=s.orderDetail)||void 0===e?void 0:e.product_name},void 0,!1,{fileName:Ja,lineNumber:175,columnNumber:17},this)]},void 0,!0,{fileName:Ja,lineNumber:173,columnNumber:15},this),Object(h.jsxDEV)("li",{children:[Object(h.jsxDEV)("span",{children:"\u6620\u5c04\u5546\u54c1"},void 0,!1,{fileName:Ja,lineNumber:178,columnNumber:17},this),Object(h.jsxDEV)("font",{children:s.map_product_name||"-"},void 0,!1,{fileName:Ja,lineNumber:179,columnNumber:17},this)]},void 0,!0,{fileName:Ja,lineNumber:177,columnNumber:15},this),Object(h.jsxDEV)("li",{children:[Object(h.jsxDEV)("span",{children:"\u5b98\u65b9\u4ef7"},void 0,!1,{fileName:Ja,lineNumber:182,columnNumber:17},this),Object(h.jsxDEV)("font",{children:null===(t=s.orderDetail)||void 0===t?void 0:t.official_price},void 0,!1,{fileName:Ja,lineNumber:183,columnNumber:17},this)]},void 0,!0,{fileName:Ja,lineNumber:181,columnNumber:15},this),Object(h.jsxDEV)("li",{children:[Object(h.jsxDEV)("span",{children:"\u6210\u672c\u4ef7"},void 0,!1,{fileName:Ja,lineNumber:186,columnNumber:17},this),Object(h.jsxDEV)("font",{children:null===(i=s.orderDetail)||void 0===i?void 0:i.cost_price},void 0,!1,{fileName:Ja,lineNumber:187,columnNumber:17},this)]},void 0,!0,{fileName:Ja,lineNumber:185,columnNumber:15},this),Object(h.jsxDEV)("li",{children:[Object(h.jsxDEV)("span",{children:"\u5408\u540c\u4ef7"},void 0,!1,{fileName:Ja,lineNumber:190,columnNumber:17},this),Object(h.jsxDEV)("font",{children:s.contract_price},void 0,!1,{fileName:Ja,lineNumber:191,columnNumber:17},this)]},void 0,!0,{fileName:Ja,lineNumber:189,columnNumber:15},this),Object(h.jsxDEV)("li",{children:[Object(h.jsxDEV)("span",{children:"\u8d2d\u4e70\u6570\u91cf"},void 0,!1,{fileName:Ja,lineNumber:194,columnNumber:17},this),Object(h.jsxDEV)("font",{children:s.num},void 0,!1,{fileName:Ja,lineNumber:195,columnNumber:17},this)]},void 0,!0,{fileName:Ja,lineNumber:193,columnNumber:15},this),Object(h.jsxDEV)("li",{children:[Object(h.jsxDEV)("span",{children:"\u603b\u8ba1"},void 0,!1,{fileName:Ja,lineNumber:198,columnNumber:17},this),Object(h.jsxDEV)("font",{children:(s.num*s.contract_price).toFixed(4)},void 0,!1,{fileName:Ja,lineNumber:199,columnNumber:17},this)]},void 0,!0,{fileName:Ja,lineNumber:197,columnNumber:15},this),1===(null===(a=s.orderDetail)||void 0===a?void 0:a.product.product_type)?Object(h.jsxDEV)("li",{children:[Object(h.jsxDEV)("span",{children:"\u5145\u503c\u8d26\u53f7"},void 0,!1,{fileName:Ja,lineNumber:203,columnNumber:19},this),Object(h.jsxDEV)("font",{children:s.account},void 0,!1,{fileName:Ja,lineNumber:204,columnNumber:19},this)]},void 0,!0,{fileName:Ja,lineNumber:202,columnNumber:17},this):null,Object(h.jsxDEV)("li",{children:[Object(h.jsxDEV)("span",{children:"\u72b6\u6001"},void 0,!1,{fileName:Ja,lineNumber:209,columnNumber:17},this),Object(h.jsxDEV)("font",{children:s.status_text},void 0,!1,{fileName:Ja,lineNumber:210,columnNumber:17},this)]},void 0,!0,{fileName:Ja,lineNumber:208,columnNumber:15},this)]},void 0,!0,{fileName:Ja,lineNumber:164,columnNumber:13},this):Object(h.jsxDEV)("div",{className:"main-body",children:Object(h.jsxDEV)(I,{spliteColor:"#fff",tableData:this.state.orderDetailLog_data,Column:Ua,isMultiple:!1,maxheight:this.state.tableHeight,dataCount:this.state.total,countChange:e=>{this.countChange(e)},countbarVisible:!1,isSwitch:!1,pageChange:e=>{this.pageChange(e)},checkChange:this.selection.bind(this),ComponentHandler:(e,t,i)=>"time"==e?Object(h.jsxDEV)("div",{children:Y.a.unix(t.time).format("YYYY-MM-DD HH:mm:ss")},void 0,!1,{fileName:Ja,lineNumber:233,columnNumber:28},this):"index"==e?Object(h.jsxDEV)("span",{children:i+1},void 0,!1,{fileName:Ja,lineNumber:236,columnNumber:28},this):"opearo"==e?Object(h.jsxDEV)("div",{children:t.data?Object(h.jsxDEV)(za.a,{collapsed:!0,name:!1,src:t.data,displayDataTypes:!1},void 0,!1,{fileName:Ja,lineNumber:242,columnNumber:27},this):Object(h.jsxDEV)("span",{children:"-"},void 0,!1,{fileName:Ja,lineNumber:249,columnNumber:27},this)},void 0,!1,{fileName:Ja,lineNumber:240,columnNumber:23},this):void 0},void 0,!1,{fileName:Ja,lineNumber:215,columnNumber:15},this)},void 0,!1,{fileName:Ja,lineNumber:214,columnNumber:13},this)},void 0,!1,{fileName:Ja,lineNumber:162,columnNumber:9},this)},void 0,!1,{fileName:Ja,lineNumber:161,columnNumber:7},this)}}i(247);const Ra=[{title:"\u5305\u7801\u7ed3\u7b97\u8ba2\u5355ID",name:"settlement_no",prop:"settlement_no",type:"normal",width:"320px"},{title:"\u7ed3\u7b97\u7c7b\u578b",name:"type_text",prop:"type_text",type:"normal",width:"auto"},{title:"key\u7801",name:"key",prop:"key",type:"normal",width:"auto"},{title:"\u8ba1\u5212\u540d\u79f0",prop:"plan_title",name:"plan_title",width:"auto",type:"normal"},{title:"key\u6279\u6b21\u540d\u79f0",prop:"key_batch_name",name:"key_batch_name",width:"auto",type:"normal"},{title:"\u5206\u9500\u5546",name:"reseller_name",prop:"reseller_name",type:"normal",width:"auto"},{title:"\u5b98\u65b9\u4ef7\uff08\u5143\uff09",name:"key_official_price",prop:"key_official_price",type:"normal",width:"auto"},{title:"\u521b\u5efa\u65f6\u95f4",name:"create_time",prop:"create_time",type:"normal",width:"220px"},{title:"\u6210\u672c\u4ef7\uff08\u5143\uff09",name:"key_cost_price",prop:"key_cost_price",type:"normal",width:"auto"},{title:"\u64cd\u4f5c",prop:"opearo",name:"opearo",type:"slot",width:"auto"}];var Ka=i(446),Ya="/Users/zhangds/web/blue-brother/frontend/src/pages/order/settlementList/list.jsx",$a=i(67);let Ga=$a(wa()).format("YYYY-MM-DD"),Qa=$a(Sa()).format("YYYY-MM-DD");class Za extends m.a.Component{constructor(e){super(e),this.state={tabList:[{title:"\u5305\u7801\u5217\u8868"}],orderList:[],selectionData:[],allcheck:!1,itemcheck:!1,tableHeight:500,combinedValue:[],planOptions:[],resellerOptions:[],keysOptions:[],settlementOptions:[],page:1,limit:10,officialPrice:0,costPrice:0,search:this.initSearch()},this.onChangeCombinedDate=this.onChangeCombinedDate.bind(this)}initSearch(){return{plan_id:"",reseller_id:"",key_batch_id:"",type:"",key:"",settlement_no:""}}searchChange(e,t){const i=this.state.search;i[e]=t,this.setState({search:i})}selection(e){this.setState({selectionData:e});let t=0,i=0;e.forEach((e=>{t+=Number(e.key_official_price),i+=Number(e.key_cost_price)})),this.setState({officialPrice:t,costPrice:i})}getPlan(){Object(a.rb)().then((e=>Object(a.Tb)(e,((e,t)=>{const i=e.filter((e=>e.settlement_type>0)).map((e=>({key:e.id,text:e.title})));this.setState({planOptions:i})}),(e=>{})))),Object(a.ub)().then((e=>{Object(a.Tb)(e,((e,t)=>{const i=e.map((e=>({key:e.id,text:e.name})));this.setState({resellerOptions:i})}))})),Object(a.Bb)().then((e=>Object(a.Tb)(e,((e,t)=>{const i=e.map((e=>({key:e.settlement_type,text:e.settlement_text})));this.setState({settlementOptions:i})}),(e=>{}))))}getBatchKeys(e){Object(a.Nc)({status:"4,5",plan_id:e,bind_object:1}).then((e=>{Object(a.Tb)(e,((e,t)=>{const i=e.map((e=>({key:e.id,text:e.batch_name})));this.setState({keysOptions:i})}),(e=>{c.a.error(e)}))}))}moreFn(e,t){this.props.history.push("/home/packageDetail?id="+t.id),sessionStorage.setItem("pathname2","/home/packageDetail");sessionStorage.setItem("breaknav",JSON.stringify([{items:[{path:"/home/settlementList",name:"\u5305\u7801\u5217\u8868"},{path:"/home/packageDetail",name:"\u5305\u7801\u8be6\u60c5"}]}]))}clearFn(){this.setState({allcheck:!1,selectionData:[],itemcheck:!1})}onChangeCombinedDate(e){this.setState({combinedValue:e,page:1,selectionData:[]},(()=>{this.getOrderFn()}))}bachExportOrder(){let e={};if(this.state.selectionData.length>0)e.ids=this.state.selectionData.map((e=>e.id));else{let{page:t,limit:i,search:a,combinedValue:s}=this.state,{key:l,key_batch_id:n,plan_id:o,reseller_id:r,type:m,settlement_no:d}=a;if(!o||!s)return void c.a.error("\u8ba2\u5355\u5bfc\u51fa\u5fc5\u987b\u6709\u8ba1\u5212id\u548c\u65f6\u95f4");e={page:t,limit:i,begin_time:s[0],end_time:s[1],key:l||"",key_batch_id:n?n.key:"",plan_id:o?o.key:"",reseller_id:r?r.key:"",type:m?m.key:"",settlement_no:d}}try{Object(a.zb)(e).then((e=>{if("application/json"==e.type){const t=new FileReader;t.readAsText(e,"utf-8"),t.onload=function(){const e=JSON.parse(t.result);c.a.clear(),c.a.error(e.message)}}else{let i=new Blob([e]),a="\u5305\u7801\u7ed3\u7b97\u8ba2\u5355\u5217\u8868"+ae()+".xlsx";var t=document.createElement("a");t.href=window.URL.createObjectURL(i),t.download=a,t.click(),window.URL.revokeObjectURL(t.href)}}))}catch(t){}}pageChange(e){this.setState({selectionData:[],page:e},(()=>{this.getOrderFn()}))}countChange(e){this.setState({selectionData:[],page:1,limit:e},(()=>{this.getOrderFn()}))}getOrderFn(){let{page:e,limit:t,search:i,combinedValue:s}=this.state,{key:l,key_batch_id:n,plan_id:o,reseller_id:r,type:m,settlement_no:d}=i,u={page:e,limit:t,begin_time:s[0],end_time:s[1],key:l||"",key_batch_id:n?n.key:"",plan_id:o?o.key:"",reseller_id:r?r.key:"",type:m?m.key:"",settlement_no:d};Object(a.Ab)(Object(Ka.a)(u)).then((e=>{Object(a.Tb)(e,((e,t)=>{const i=e.data,{total:a}=e;this.setState({orderList:i,total:a})}),(e=>{c.a.error(e)}))})).catch((e=>{}))}componentWillMount(){let e=[Qa+" 00:00:00",Ga+" 23:59:59"];this.getPlan(),this.setState({tableHeight:window.innerHeight-490,combinedValue:e},(()=>{this.getOrderFn()}))}reset(){this.setState({search:this.initSearch(),page:1},(()=>this.getOrderFn()))}render(){const e=Object(h.jsxDEV)(Jt.a,{className:"zent-datepicker-demo",value:this.state.combinedValue,dateSpan:90,showTime:{format:"HH:mm:ss",defaultTime:["00:00:00","23:59:59"]},format:"YYYY-MM-DD HH:mm:ss",onChange:this.onChangeCombinedDate},void 0,!1,{fileName:Ya,lineNumber:293,columnNumber:7},this);return Object(h.jsxDEV)("div",{id:"dislist",className:"settlementList",children:Object(h.jsxDEV)(Ft,{tabs:this.state.tabList,slot:e,children:[Object(h.jsxDEV)("div",{className:"order-query",children:[Object(h.jsxDEV)(l.a,{children:[Object(h.jsxDEV)(s.a,{labelname:"\u8425\u9500\u8ba1\u5212\uff1a",required:"",labelwidth:"95px",children:Object(h.jsxDEV)(X.a,{name:"state",value:this.state.search.plan_id,options:this.state.planOptions,placeholder:"\u8bf7\u9009\u62e9",width:204,clearable:!0,onChange:e=>{this.searchChange("plan_id",e),e?this.getBatchKeys(e.key):(this.setState({keysOptions:[]}),this.searchChange("key_batch_id",""))}},void 0,!1,{fileName:Ya,lineNumber:311,columnNumber:17},this)},void 0,!1,{fileName:Ya,lineNumber:310,columnNumber:15},this),Object(h.jsxDEV)(s.a,{labelname:"key\u6279\u6b21\uff1a",required:"",labelwidth:"86px",children:Object(h.jsxDEV)(X.a,{name:"state",value:this.state.search.key_batch_id,options:this.state.keysOptions,placeholder:"\u8bf7\u5148\u9009\u62e9\u8ba1\u5212",width:204,clearable:!0,onChange:e=>{this.searchChange("key_batch_id",e)}},void 0,!1,{fileName:Ya,lineNumber:331,columnNumber:17},this)},void 0,!1,{fileName:Ya,lineNumber:330,columnNumber:15},this),Object(h.jsxDEV)(s.a,{labelname:"\u5206\u9500\u5546\uff1a",required:"",labelwidth:"80px",children:Object(h.jsxDEV)(X.a,{name:"state",value:this.state.search.reseller_id,options:this.state.resellerOptions,placeholder:"\u8bf7\u9009\u62e9",width:204,clearable:!0,onChange:e=>{this.searchChange("reseller_id",e)}},void 0,!1,{fileName:Ya,lineNumber:344,columnNumber:17},this)},void 0,!1,{fileName:Ya,lineNumber:343,columnNumber:15},this),Object(h.jsxDEV)(s.a,{labelname:"\u7ed3\u7b97\u7c7b\u578b\uff1a",required:"",labelwidth:"100px",children:Object(h.jsxDEV)(X.a,{name:"state",value:this.state.search.type,options:this.state.settlementOptions,placeholder:"\u8bf7\u9009\u62e9",width:204,clearable:!0,onChange:e=>{this.searchChange("type",e)}},void 0,!1,{fileName:Ya,lineNumber:357,columnNumber:17},this)},void 0,!1,{fileName:Ya,lineNumber:356,columnNumber:15},this),Object(h.jsxDEV)(s.a,{labelname:"key\u7801\uff1a",required:"",labelwidth:"65px",children:Object(h.jsxDEV)(n.a,{value:this.state.search.key,countShow:!1,labelWidth:"0px",placeholder:"\u8bf7\u8f93\u5165",width:204,onChange:e=>{this.searchChange("key",e)},onClearItem:e=>{this.searchChange("key","")}},void 0,!1,{fileName:Ya,lineNumber:370,columnNumber:17},this)},void 0,!1,{fileName:Ya,lineNumber:369,columnNumber:15},this),Object(h.jsxDEV)(s.a,{labelname:"\u5305\u7801\u8ba2\u5355ID\uff1a",required:"",labelwidth:"105px",style:{marginLeft:"0px"},children:Object(h.jsxDEV)(n.a,{value:this.state.search.settlement_no,countShow:!1,labelWidth:"0px",placeholder:"\u8bf7\u8f93\u5165",style:{marginLeft:"0px"},width:204,onChange:e=>{this.searchChange("settlement_no",e)},onClearItem:e=>{this.searchChange("settlement_no","")}},void 0,!1,{fileName:Ya,lineNumber:390,columnNumber:17},this)},void 0,!1,{fileName:Ya,lineNumber:384,columnNumber:15},this),Object(h.jsxDEV)(s.a,{labelname:"",required:"",labelwidth:"0",children:Object(h.jsxDEV)("div",{style:{width:"200px",marginLeft:"20px"},children:[Object(h.jsxDEV)(u.a,{type:"primary",onClick:()=>{this.setState({page:1},(()=>{this.getOrderFn()}))},children:"\u67e5\u8be2"},void 0,!1,{fileName:Ya,lineNumber:407,columnNumber:19},this),Object(h.jsxDEV)(u.a,{onClick:()=>this.reset(),children:"\u91cd\u7f6e"},void 0,!1,{fileName:Ya,lineNumber:417,columnNumber:19},this)]},void 0,!0,{fileName:Ya,lineNumber:406,columnNumber:17},this)},void 0,!1,{fileName:Ya,lineNumber:405,columnNumber:15},this)]},void 0,!0,{fileName:Ya,lineNumber:309,columnNumber:13},this),Object(h.jsxDEV)(u.a,{className:"exportOrder",type:"default",icon:"download",onClick:this.bachExportOrder.bind(this),children:"\u5bfc\u51fa\u8ba2\u5355"},void 0,!1,{fileName:Ya,lineNumber:421,columnNumber:13},this)]},void 0,!0,{fileName:Ya,lineNumber:308,columnNumber:11},this),Object(h.jsxDEV)("div",{children:[this.state.selectionData.length>0?Object(h.jsxDEV)(ki.a,{type:"info",extraContent:Object(h.jsxDEV)(u.a,{type:"primary",onClick:this.clearFn.bind(this),children:"\u6e05\u7a7a"},void 0,!1,{fileName:Ya,lineNumber:435,columnNumber:19},this),children:["\u5df2\u9009\u62e9",Object(h.jsxDEV)("font",{color:"#296bef",style:{fontWeight:"bold"},children:this.state.selectionData.length},void 0,!1,{fileName:Ya,lineNumber:441,columnNumber:17},this),"\u9879\uff0c\u5b98\u65b9\u4ef7\u91d1\u989d\u603b\u8ba1\uffe5",this.state.officialPrice.toFixed(4),"\uff0c\u6210\u672c\u4ef7\u91d1\u989d\u603b\u8ba1\uff1a\uffe5",this.state.costPrice.toFixed(4)]},void 0,!0,{fileName:Ya,lineNumber:432,columnNumber:15},this):null,Object(h.jsxDEV)(I,{spliteColor:"#fff",tableData:this.state.orderList,Column:Ra,dataCount:this.state.total,itemcheck:this.state.itemcheck,allcheck:this.state.allcheck,isMultiple:!0,page:this.state.page,countbarVisible:!1,isSwitch:!1,ref:"orderList",maxheight:this.state.tableHeight,pageChange:e=>{this.pageChange(e)},countChange:e=>{this.countChange(e)},checkChange:this.selection.bind(this),ComponentHandler:(e,t)=>{if("opearo"==e)return Object(h.jsxDEV)("span",{className:"grid-link",onClick:e=>this.moreFn(e,t),children:"\u8be6\u60c5"},void 0,!1,{fileName:Ya,lineNumber:471,columnNumber:21},this)}},void 0,!1,{fileName:Ya,lineNumber:448,columnNumber:13},this)]},void 0,!0,{fileName:Ya,lineNumber:430,columnNumber:11},this)]},void 0,!0,{fileName:Ya,lineNumber:307,columnNumber:9},this)},void 0,!1,{fileName:Ya,lineNumber:306,columnNumber:7},this)}}i(248);var Xa="/Users/zhangds/web/blue-brother/frontend/src/pages/order/packageDetail/index.js";const es=[{title:"\u521b\u5efa\u65f6\u95f4",name:"time",prop:"time",type:"slot",width:"20%"},{title:"\u64cd\u4f5c\u63cf\u8ff0",name:"message",prop:"message",type:"normal",width:"20%"},{title:"\u8be6\u60c5",name:"opearo",type:"slot",prop:"opearo",width:"50%"}];class ts extends m.a.Component{constructor(e){super(e),this.state={tabList:[{title:"\u8be6\u60c5"}],tabactive:0,orderDetailLog_data:[],orderDetail_data:{},tableHeight:500,page:1,orderNo:"",limit:10,total:0}}tabFn(e){this.setState({tabactive:e});let t=[];0==e&&(t=[{items:[{path:"/settlementList",name:"\u5305\u7801\u7ed3\u7b97\u5217\u8868"},{path:"/packageDetail",name:"\u5305\u7801\u8be6\u60c5"}]}]),sessionStorage.setItem("breaknav",JSON.stringify(t))}selection(){}getDetails(e){let t=this;Object(a.pb)(e).then((e=>{Object(a.Tb)(e,((e,i)=>{t.setState({orderDetail_data:e})}),(e=>{c.a.error(e)}))})).catch((e=>{}))}componentWillMount(){let e=window.location.href,t=e.lastIndexOf("="),i=e.substr(t+1,e.length);this.setState({orderNo:i}),this.getDetails(i),this.setState({tableHeight:window.innerHeight-430})}render(){let e=this.state.orderDetail_data;return Object(h.jsxDEV)("div",{id:"more2",className:"maincenter",children:Object(h.jsxDEV)(Ft,{tabs:this.state.tabList,tabChange:this.tabFn.bind(this),children:0==this.state.tabactive?Object(h.jsxDEV)("ul",{className:"main-body",children:[Object(h.jsxDEV)("li",{children:[Object(h.jsxDEV)("span",{children:"\u7ed3\u7b97\u8ba2\u5355\u53f7:"},void 0,!1,{fileName:Xa,lineNumber:106,columnNumber:17},this),Object(h.jsxDEV)("span",{children:e.settlement_no},void 0,!1,{fileName:Xa,lineNumber:107,columnNumber:17},this)]},void 0,!0,{fileName:Xa,lineNumber:105,columnNumber:15},this),Object(h.jsxDEV)("li",{children:[Object(h.jsxDEV)("span",{children:"\u521b\u5efa\u65f6\u95f4:"},void 0,!1,{fileName:Xa,lineNumber:110,columnNumber:17},this),Object(h.jsxDEV)("span",{children:e.create_time},void 0,!1,{fileName:Xa,lineNumber:111,columnNumber:17},this)]},void 0,!0,{fileName:Xa,lineNumber:109,columnNumber:15},this),Object(h.jsxDEV)("li",{children:[Object(h.jsxDEV)("span",{children:"\u5151\u6362\u6570\u91cf:"},void 0,!1,{fileName:Xa,lineNumber:114,columnNumber:17},this),Object(h.jsxDEV)("span",{children:e.order_rows?e.order_rows.length:"0"},void 0,!1,{fileName:Xa,lineNumber:115,columnNumber:17},this)]},void 0,!0,{fileName:Xa,lineNumber:113,columnNumber:15},this),e.order_rows?e.order_rows.map((e=>Object(h.jsxDEV)("li",{children:[Object(h.jsxDEV)("span",{children:"\u5173\u8054\u8ba2\u5355\u53f7:"},void 0,!1,{fileName:Xa,lineNumber:123,columnNumber:25},this),Object(h.jsxDEV)("span",{children:e.order_number},void 0,!1,{fileName:Xa,lineNumber:124,columnNumber:25},this),Object(h.jsxDEV)("span",{children:e.create_time},void 0,!1,{fileName:Xa,lineNumber:125,columnNumber:25},this)]},e.order_number,!0,{fileName:Xa,lineNumber:122,columnNumber:23},this))):null]},void 0,!0,{fileName:Xa,lineNumber:104,columnNumber:13},this):Object(h.jsxDEV)("div",{className:"main-body",children:Object(h.jsxDEV)(I,{spliteColor:"#fff",tableData:this.state.orderDetailLog_data,Column:es,isMultiple:!1,maxheight:this.state.tableHeight,dataCount:this.state.total,countChange:e=>{this.countChange(e)},countbarVisible:!1,isSwitch:!1,pageChange:e=>{this.pageChange(e)},checkChange:this.selection.bind(this),ComponentHandler:(e,t)=>{if("time"==e)return Object(h.jsxDEV)("div",{children:Y.a.unix(t.time).format("YYYY-MM-DD HH:mm:ss")},void 0,!1,{fileName:Xa,lineNumber:151,columnNumber:28},this)}},void 0,!1,{fileName:Xa,lineNumber:133,columnNumber:15},this)},void 0,!1,{fileName:Xa,lineNumber:132,columnNumber:13},this)},void 0,!1,{fileName:Xa,lineNumber:102,columnNumber:9},this)},void 0,!1,{fileName:Xa,lineNumber:101,columnNumber:7},this)}}i(102);var is="/Users/zhangds/web/blue-brother/frontend/src/pages/plan/add/step1.js";class as extends m.a.Component{constructor(e){super(e),this.onDisabledRange=(e,t)=>{let i=!1;return"end"==t&&(i=Y()(e.getTime()).add(1,"days")<=(new Date).getTime()),"start"==t&&(i=e.getTime()<=(new Date).getTime()),i},this.state={model:{title:"",type:2,reseller:null,return_id:"1",date_time:["",""],stock_id:null,settlement_type:null},settlementOptions:[],reseller_option:[],lodshow:!1,loading:!1,isSettlement:2}}componentDidMount(e){Object(a.ub)().then((e=>{Object(a.Tb)(e,((e,t)=>{let i=Object(f.a)(e,(e=>{let t={};return t.key=e.id,t.text=e.name,t.direct_reseller_id=e.direct_reseller_id,t}));this.setState({reseller_option:i})}),(e=>{c.a.error(e)}))})),Object(a.Bb)().then((e=>{Object(a.Tb)(e,((e,t)=>{let i=Object(f.a)(e,(e=>{let t={};return t.key=e.settlement_type,t.text=e.settlement_text,t}));this.setState({settlementOptions:i})}),(e=>{c.a.error(e)}))}))}edit(e){let t={};t.title=e.title,t.type=parseInt(e.type),t.return_id=e.return_type,t.stock_id=e.stock_id,t.reseller={key:e.reseller_id,text:e.reseller_name},t.date_time=[e.begin_time,e.end_time];const i={begin_time:t.date_time[0],end_time:t.date_time[1]};sessionStorage.setItem("knockGold_effectDate",JSON.stringify(i)),sessionStorage.setItem("redPackets_effectDate",JSON.stringify(i)),sessionStorage.setItem("plan_item",JSON.stringify(i));let a=sessionStorage.getItem("bm_obj");if(a){let e=JSON.parse(a);e.settlement_type>0?(this.setState({isSettlement:1}),t.settlement_type={key:e.settlement_type,text:e.settlement_type_text}):this.setState({isSettlement:2})}this.setState({model:t,lodshow:!0})}async submit(e){let t=!1;if(this.refs.form1.validator()){if(""==this.state.model.date_time[1])return c.a.error("\u7ed3\u675f\u65e5\u671f\u4e0d\u80fd\u4e3a\u7a7a"),!1;if(this.state.model.stock_id&&!/^[a-zA-Z0-9]+$/.test(this.state.model.stock_id))return c.a.error("\u8bf7\u8f93\u5165\u7531\u5b57\u6bcd\u6216\u6570\u5b57\u7ec4\u6210\u7684\u8ba1\u5212\u7f16\u53f7"),!1;let i={};if(i.title=this.state.model.title,i.stock_id=this.state.model.stock_id,i.type=parseInt(this.state.model.type),i.return_type=1,i.reseller_id=this.state.model.reseller.key,i.reseller_name=this.state.model.reseller.text,i.begin_time=this.state.model.date_time[0],i.end_time=this.state.model.date_time[1],1===this.state.isSettlement&&this.state.model.settlement_type&&(i.settlement_type=this.state.model.settlement_type.key),this.state.loading)return;if(this.setState({loading:!0}),e){let s={title:i.title,begin_time:i.begin_time,end_time:i.end_time,settlement_type:i.settlement_type};1===this.state.isSettlement&&this.state.model.settlement_type&&(s.settlement_type=i.settlement_type),await Object(a.Ec)(e,s).then((e=>{this.setState({loading:!1}),Object(a.Tb)(e,((e,i)=>{c.a.success("\u4fdd\u5b58\u6210\u529f"),t=!0}),(e=>{c.a.error(e)}))}))}else{let e={};e.info=i;let s=sessionStorage.getItem("plan_id");if(e.info.copy_plan_id=sessionStorage.getItem("plan_id_copy"),""!=s)return this.setState({loading:!1}),delete i.copy_plan_id,sessionStorage.setItem("step1",JSON.stringify(i)),sessionStorage.setItem("knockGold_effectDate",JSON.stringify(i)),sessionStorage.setItem("redPackets_effectDate",JSON.stringify(i)),sessionStorage.setItem("plan_item",JSON.stringify(i)),!0;await Object(a.d)("",e).then((e=>{this.setState({loading:!1}),Object(a.Tb)(e,((e,a)=>{sessionStorage.setItem("plan_id",e.id),delete i.copy_plan_id,sessionStorage.setItem("step1",JSON.stringify(i)),sessionStorage.setItem("knockGold_effectDate",JSON.stringify(i)),sessionStorage.setItem("redPackets_effectDate",JSON.stringify(i)),sessionStorage.setItem("plan_item",JSON.stringify(i)),t=!0}),(e=>{c.a.error(e)}))}))}}return t}onCancel(){this.refs.form1.cancel()}updateData(e,t){if(sessionStorage.getItem("step1")){let i=JSON.parse(sessionStorage.getItem("step1"));i[e]=t,sessionStorage.setItem("knockGold_effectDate",JSON.stringify(i)),sessionStorage.setItem("redPackets_effectDate",JSON.stringify(i)),sessionStorage.setItem("plan_item",JSON.stringify(i)),sessionStorage.setItem("step1",i)}}onTypeChange(e){let t=this.state.model;t.type=e.target.value,this.setState({model:t})}onResellerChange(e){this.props.onGetDirectResellerId(e);let t=this.state.model;t.reseller=e,this.setState({model:t})}onChangeCombinedDate(e){let t=this.state.model;t.date_time=e,this.setState({model:t});const i={begin_time:t.date_time[0],end_time:t.date_time[1]};sessionStorage.setItem("knockGold_effectDate",JSON.stringify(i)),sessionStorage.setItem("redPackets_effectDate",JSON.stringify(i)),sessionStorage.setItem("plan_item",JSON.stringify(i))}render(){return Object(h.jsxDEV)("div",{id:"step1",children:Object(h.jsxDEV)(l.a,{model:this.state.model,rules:{title:[{type:"required",message:"\u8bf7\u8f93\u5165\u8425\u9500\u8ba1\u5212\u540d\u79f0"},{type:"regExp",message:"\u53ea\u5141\u8bb8\u5305\u542b\u5b57\u6bcd\u6570\u5b57\u6c49\u5b57\u548c\u3001\u3002\uff0c ( ) & - +",reg:/^[\u4e00-\u9fa5a-zA-Z0-9\u3002\uff0c\u3001_.\\\uff08\uff09&\-+]+$/}],reseller:[{type:"required",message:"\u8bf7\u9009\u62e9\u5206\u9500\u5546"}],date_time:[{type:"required",message:"\u8bf7\u9009\u62e9\u65f6\u95f4\u6bb5"}],settlement_type:[{type:"required",message:"\u8bf7\u9009\u62e9\u5305\u7801\u7ed3\u7b97\u65b9\u5f0f"}]},ref:"form1",children:[Object(h.jsxDEV)(s.a,{labelname:"\u8425\u9500\u8ba1\u5212\u540d\u79f0",prop:"title",id:"title",children:Object(h.jsxDEV)(n.a,{onChange:e=>{let t=this.state.model;t.title=e,this.setState({model:t})},onClearItem:e=>{let t=this.state.model;t.title="",this.setState({model:t})},value:this.state.model.title,countShow:!1,placeholder:"\u8bf7\u8f93\u5165",labelWidth:"0px",maxLength:12,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:is,lineNumber:292,columnNumber:13},this)},void 0,!1,{fileName:is,lineNumber:291,columnNumber:11},this),Object(h.jsxDEV)(s.a,{labelname:"\u8425\u9500\u8ba1\u5212\u7f16\u53f7",prop:"stock_id",id:"stock_id",required:"",children:Object(h.jsxDEV)(n.a,{disabled:this.props.disabled,onChange:e=>{let t=this.state.model;t.stock_id=e,this.setState({model:t})},onClearItem:e=>{let t=this.state.model;t.stock_id="",this.setState({model:t})},value:this.state.model.stock_id,countShow:!1,placeholder:"\u5b57\u6bb5\u4e3a\u7a7a\u81ea\u52a8\u751f\u6210ID",labelWidth:"0px",maxLength:16,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:is,lineNumber:315,columnNumber:13},this)},void 0,!1,{fileName:is,lineNumber:314,columnNumber:11},this),Object(h.jsxDEV)(s.a,{labelname:"\u8ba1\u5212\u7c7b\u578b",prop:"type",id:"type",children:Object(h.jsxDEV)(Q.a,{onChange:e=>{this.onTypeChange(e)},value:this.state.model.type,children:[Object(h.jsxDEV)(ne.a,{value:1,disabled:!0,children:"\u6d3b\u52a8"},void 0,!1,{fileName:is,lineNumber:345,columnNumber:15},this),Object(h.jsxDEV)(ne.a,{value:2,children:"\u4ec5\u5151\u6362"},void 0,!1,{fileName:is,lineNumber:348,columnNumber:15},this)]},void 0,!0,{fileName:is,lineNumber:339,columnNumber:13},this)},void 0,!1,{fileName:is,lineNumber:338,columnNumber:11},this),Object(h.jsxDEV)(s.a,{labelname:"\u5305\u7801\u7ed3\u7b97",prop:"isSettlement",required:"",id:"isSettlement",children:Object(h.jsxDEV)(Q.a,{disabled:this.props.disabled,onChange:e=>{this.props.setTlementType(e.target.value),this.setState({isSettlement:e.target.value})},value:this.state.isSettlement,children:[Object(h.jsxDEV)(ne.a,{value:1,children:"\u662f"},void 0,!1,{fileName:is,lineNumber:360,columnNumber:15},this),Object(h.jsxDEV)(ne.a,{value:2,children:"\u5426"},void 0,!1,{fileName:is,lineNumber:361,columnNumber:15},this)]},void 0,!0,{fileName:is,lineNumber:352,columnNumber:13},this)},void 0,!1,{fileName:is,lineNumber:351,columnNumber:11},this),1===this.state.isSettlement?Object(h.jsxDEV)(s.a,{labelname:"\u5305\u7801\u7ed3\u7b97\u65b9\u5f0f",prop:"settlement_type",id:"settlement_type",children:Object(h.jsxDEV)(X.a,{options:this.state.settlementOptions,placeholder:"\u9009\u62e9\u4e00\u9879",disabled:this.props.disabled,width:515,value:this.state.model.settlement_type,onChange:e=>{let t=this.state.model;t.settlement_type=e,this.setState({model:t}),this.props.setTlementData(e)}},void 0,!1,{fileName:is,lineNumber:366,columnNumber:15},this)},void 0,!1,{fileName:is,lineNumber:365,columnNumber:13},this):null,Object(h.jsxDEV)(s.a,{labelname:"\u5206\u9500\u5546",prop:"reseller",id:"reseller",children:Object(h.jsxDEV)(X.a,{options:this.state.reseller_option,placeholder:"\u9009\u62e9\u4e00\u9879",disabled:this.props.disabled,width:515,value:this.state.model.reseller,onChange:e=>{this.onResellerChange(e),$t.a.emit("change","reseller",e)}},void 0,!1,{fileName:is,lineNumber:382,columnNumber:13},this)},void 0,!1,{fileName:is,lineNumber:381,columnNumber:11},this),Object(h.jsxDEV)(s.a,{labelname:"\u5f00\u59cb~\u7ed3\u675f\u65f6\u95f4",prop:"date_time",id:"date_time",children:Object(h.jsxDEV)(ee.a,{className:"zent-datepicker-plan",showTime:{format:"HH:mm:ss",defaultTime:[Y()().format("HH:mm:ss"),"23:59:59"]},format:"YYYY-MM-DD HH:mm:ss",disabled:[this.props.disabled,!1],value:this.state.model.date_time,onChange:e=>{$t.a.emit("change","date_time",e),this.onChangeCombinedDate(e)},disabledDate:this.onDisabledRange},void 0,!1,{fileName:is,lineNumber:396,columnNumber:13},this)},void 0,!1,{fileName:is,lineNumber:395,columnNumber:11},this)]},void 0,!0,{fileName:is,lineNumber:290,columnNumber:9},this)},void 0,!1,{fileName:is,lineNumber:289,columnNumber:7},this)}}i(249);var ss="/Users/zhangds/web/blue-brother/frontend/src/components/UseExchangeAddEdit/index.jsx";const ls=e=>Array.from({length:e},((e,t)=>t)),ns=[{title:"\u5546\u54c1ID",name:"product_id",prop:"product_id",width:"auto",type:"normal"},{title:"\u5546\u54c1\u540d\u79f0",width:"auto",prop:"product_name",name:"product_name",type:"normal"},{title:"\u5e73\u53f0\u6279\u6b21\u53f7",width:"250px",prop:"channel_activity_id",name:"channel_activity_id",type:"normal"},{title:"\u7c7b\u578b",width:"auto",prop:"type",name:"type",type:"slot"},{title:"\u4e0a\u6e38\u5e73\u53f0",width:"auto",prop:"upstream",name:"upstream",type:"normal"},{title:"\u6709\u6548\u65f6\u95f4\u6bb5",width:"350px",prop:"effectDate",name:"effectDate",type:"normal"},{title:"\u603b\u9884\u7b97",prop:"all_budget",name:"all_budget",width:"auto",type:"normal"},{title:"\u5f53\u524d\u6210\u672c\u4ef7\u683c",prop:"cost_price",name:"cost_price",width:"200px",type:"slot"},{title:"\u5408\u540c\u4ef7",name:"contract_price",prop:"contract_price",type:"normal",width:"auto"},{title:"\u5546\u54c1\u5b98\u65b9\u4ef7",type:"normal",prop:"official_price",width:"auto"},{title:"\u5e93\u5b58",type:"normal",prop:"quantity",width:"auto"},{title:"\u64cd\u4f5c",prop:"opearo",name:"opearo",type:"slot",width:"auto"}],os={code_name:[{type:"required",message:"\u8bf7\u8f93\u5165\u5151\u6362\u7801\u540d\u79f0"}],issued:[{type:"required",message:"\u8bf7\u8f93\u5165\u53d1\u653e\u603b\u91cf"},{type:"regExp",message:"\u8bf7\u8f93\u5165\u6b63\u6574\u6570",reg:"^([1-9][0-9]*){1,3}$"}]},rs={date_time:[{type:"required",message:"\u8bf7\u9009\u62e9\u751f\u6548\u65f6\u95f4\u6bb5"}],rank:[{type:"required",message:"\u8bf7\u9009\u62e9\u5546\u54c1\u8303\u56f4"}]};var ms=Object(r.forwardRef)(((e,t)=>{const{direct_reseller_id:i,editData:a}=e,o=Object(r.useRef)(null),m=Object(r.useRef)(null),b=Object(r.useRef)(null),p=Object(r.useRef)(null),[N,j]=Object(W.a)({rankOptions:[],rank:[],tableData:[],addProductBtnLoading:!1,tableLoading:!1,direct_reseller_id:i||0,showScopePop:!1,scopePopType:"",productData:[],table_index:-1,id:"",status:"",checkedProduct:[],KeyPcType:sessionStorage.getItem("KeyPcType")}),[v,g]=Object(W.a)({code_name:"",issued:"",describe:"",date_time:"",range:"",restrict:""});Object(r.useImperativeHandle)(t,(()=>({submit:_,getModel:x,clearExchangeForm:y}))),Object(r.useEffect)((()=>{if(a&&""!==a)j({id:a.id,status:a.status}),O();else{let e=sessionStorage.getItem("knockGold_effectDate");if(e){let t=JSON.parse(e);g({date_time:[t.begin_time,t.end_time]})}}}),[]);const _=()=>{let e=!1;if(!o.current.validator())return e=!1,e;if(e=!0,!m.current.validator())return e=!1,e;if(e=!0,e){if(!(N.rank.length>0))return c.a.error("\u8bf7\u9009\u62e9\u5546\u54c1\u8303\u56f4"),!1;{let e=N.tableData.filter((e=>e.checked)),t=0;if(e.map((e=>{t+=parseInt(e.quantity)})),t{let e={id:N.id,status:N.status,title:v.code_name,describe:v.describe,begin_time:v.date_time[0],recharge_type:1,end_time:v.date_time[1],quantity:v.issued,restrict:v.restrict,range:v.range,product:{legal:[],reduce:[],cash:[]}},t=N.tableData.filter((e=>e.checked));e.product.legal=t.filter((e=>1===e.type));let i=t.filter((e=>2===e.type));const a=t.filter((e=>3===e.type));return e.product.reduce=i.map((e=>({...e.only}))),e.product.cash=a.map((e=>({...e.only}))),e},y=()=>{j({id:"",status:"",rank:[],rankOptions:[],tableData:[]}),g({code_name:"",issued:"",describe:"",range:"",restrict:""})},O=()=>{var e;g({code_name:a.title,issued:a.quantity,describe:a.describe,date_time:[a.begin_time,a.end_time],range:a.range,restrict:a.restrict});let t=a.product.legal.map((e=>({...e,type:1,upstream:"\u76f4\u8fde\u5929\u4e0b",effectDate:"-"}))),i=a.product.reduce.map((e=>q(e))),s=null===(e=a.product.cash)||void 0===e?void 0:e.map((e=>{let t=M(e);return t.only.copy=!0,t})),l=t.concat(i,s);l=Object(f.a)(l,(e=>(e.checked=!0,e)));let n=Object(f.a)(l,(e=>{let t={};return t.key=e.product_id,t.text=e.product_name,t}));j({rankOptions:n,rank:n,tableData:l})},D=()=>{N.tableData.length<=0&&(sessionStorage.setItem("productData",""),sessionStorage.setItem("knockGoldData",""),sessionStorage.setItem("redPacketsData","")),E("productData",1),E("knockGoldData",2),E("redPacketsData",3)},E=(e,t)=>{let i=N.tableData.filter((e=>e.type===t));i.length<=0?sessionStorage.setItem(e,""):sessionStorage.setItem(e,JSON.stringify(i))},V=()=>N.tableData.map((e=>Number(e.product_id))),k=e=>{try{if(N.direct_reseller_id<=0)return void c.a.error("\u8bf7\u6dfb\u52a0\u6620\u5c04\u5206\u9500\u5546");switch(D(),e){case"addKnockGold":return sessionStorage.setItem("knockGold_effectDate",JSON.stringify({begin_time:v.date_time[0],end_time:v.date_time[1]})),void j({product_title:"\u65b0\u589e\u7acb\u51cf\u91d1",scopePopType:"addKnockGold",productData:null,showScopePop:!0});case"addProduct":return void j({product_title:"\u65b0\u5efa\u5546\u54c1",scopePopType:"addProduct",checkedProduct:V(),productData:null,table_index:-1,productType:1,showScopePop:!0});case"redPackets":return sessionStorage.setItem("redPackets_effectDate",JSON.stringify({begin_time:v.date_time[0],end_time:v.date_time[1]})),void j({product_title:"\u65b0\u589e\u7ea2\u5305",scopePopType:"redPackets",productData:null,showScopePop:!0})}}catch(t){}};return Object(h.jsxDEV)("div",{className:"draw",children:[Object(h.jsxDEV)(d.a,{style:{width:"95%",margin:"10px auto"},title:"\u57fa\u672c\u4fe1\u606f",children:Object(h.jsxDEV)("div",{className:"addcode",children:Object(h.jsxDEV)(l.a,{model:v,rules:os,ref:o,className:"addform",children:[Object(h.jsxDEV)(s.a,{labelname:"\u5151\u6362\u7801\u540d\u79f0",prop:"code_name",id:"code_name",children:Object(h.jsxDEV)(n.a,{onChange:e=>{g({code_name:e})},onClearItem:e=>{g({code_name:""})},value:v.code_name,placeholder:"\u8bf7\u8f93\u5165\u5151\u6362\u7801\u540d\u79f0",labelWidth:"0px",maxLength:10,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:ss,lineNumber:588,columnNumber:15},void 0)},void 0,!1,{fileName:ss,lineNumber:587,columnNumber:13},void 0),Object(h.jsxDEV)(s.a,{labelname:"\u53d1\u653e\u603b\u91cf",prop:"issued",id:"issued",children:Object(h.jsxDEV)(n.a,{onChange:e=>{g({issued:e})},onClearItem:e=>{g({issued:""})},unit:"\u6761",countShow:!1,value:v.issued,placeholder:"\u8bf7\u8f93\u5165\u53d1\u653e\u603b\u91cf",labelWidth:"0px",maxLength:12,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:ss,lineNumber:605,columnNumber:15},void 0)},void 0,!1,{fileName:ss,lineNumber:604,columnNumber:13},void 0),Object(h.jsxDEV)(s.a,{labelname:"\u4f7f\u7528\u8bf4\u660e",prop:"describe",id:"describe",required:!1,children:Object(h.jsxDEV)(Di.a,{type:"textarea",autoSize:!0,width:"520px",maxLength:100,maxCharacterCount:100,showCount:!0,value:v.describe,onChange:e=>{g({describe:e.target.value})}},void 0,!1,{fileName:ss,lineNumber:624,columnNumber:15},void 0)},void 0,!1,{fileName:ss,lineNumber:623,columnNumber:13},void 0)]},void 0,!0,{fileName:ss,lineNumber:586,columnNumber:11},void 0)},void 0,!1,{fileName:ss,lineNumber:585,columnNumber:9},void 0)},void 0,!1,{fileName:ss,lineNumber:581,columnNumber:7},void 0),Object(h.jsxDEV)(d.a,{style:{width:"95%",margin:"10px auto"},title:"\u57fa\u672c\u89c4\u5219",children:[Object(h.jsxDEV)("div",{children:Object(h.jsxDEV)(l.a,{model:v,rules:rs,ref:m,className:"addform",children:[Object(h.jsxDEV)(s.a,{labelname:"\u751f\u6548\u65f6\u95f4\u6bb5",prop:"date_time",id:"date_time",children:Object(h.jsxDEV)(ee.a,{className:"zent-datepicker-plan",showTime:{format:"HH:mm:ss",defaultTime:["00:00:00","23:59:59"]},format:"YYYY-MM-DD HH:mm:ss",value:v.date_time,onChange:e=>{g({date_time:e})},disabledTime:(e,t)=>{let i=JSON.parse(sessionStorage.getItem("knockGold_effectDate"));const a=new Date(i.begin_time),s=a.getHours(),l=a.getMinutes(),n=a.getSeconds();return Object(R.a)(e,a)?{disabledHours:()=>ls(s),disabledMinutes:e=>e===s?ls(l):[],disabledSeconds:(e,t)=>e===s&&t===l?ls(n):[]}:{}},disabledDate:(e,t)=>{let i=JSON.parse(sessionStorage.getItem("knockGold_effectDate")),a=!1,s=Y()(e).format("YYYY-MM-DD HH:mm:ss");const l=Y()(i.end_time).format("HH:mm:ss");return"start"==t&&(a=l<"23:59:59"?Y()(s).isBefore(i.begin_time)||Y()(s).subtract(1,"days").isAfter(i.end_time):Y()(s).isBefore(i.begin_time)||Y()(s).isAfter(i.end_time)),"end"==t&&(a=Y()(s).add(1,"days").isBefore(i.begin_time)||Y()(s).isAfter(i.end_time)),a}},void 0,!1,{fileName:ss,lineNumber:645,columnNumber:15},void 0)},void 0,!1,{fileName:ss,lineNumber:644,columnNumber:13},void 0),Object(h.jsxDEV)(s.a,{labelname:"\u5546\u54c1\u8303\u56f4",prop:"rank",id:"rank",children:Object(h.jsxDEV)("div",{className:"goods-boxs",children:[Object(h.jsxDEV)(X.a,{options:N.rankOptions,multiple:!0,value:N.rank,placeholder:"\u9009\u62e9\u4e00\u9879",width:405,onChange:e=>{(e=>{let t=N.tableData.map((t=>(t.checked=e.findIndex((e=>e.key==t.product_id))>-1,t)));j({tableData:t,rank:e})})(e)}},void 0,!1,{fileName:ss,lineNumber:662,columnNumber:17},void 0),Object(h.jsxDEV)(u.a,{type:"primary",style:{marginLeft:"20px"},loading:N.addProductBtnLoading,disabled:1===e.isSettlement&&e.settlementData&&(8===e.settlementData.key||9===e.settlementData.key),onClick:()=>{k("addProduct")},children:"\u65b0\u5efa\u5546\u54c1"},void 0,!1,{fileName:ss,lineNumber:672,columnNumber:17},void 0),Object(h.jsxDEV)(u.a,{type:"primary",style:{marginLeft:"20px"},onClick:()=>{k("addKnockGold")},disabled:!JSON.parse(sessionStorage.getItem("isEarlyWarningMan"))||1===e.isSettlement&&e.settlementData&&7===e.settlementData.key,children:"\u65b0\u5efa\u7acb\u51cf\u91d1"},void 0,!1,{fileName:ss,lineNumber:687,columnNumber:17},void 0),Object(h.jsxDEV)(u.a,{type:"primary",style:{marginLeft:"20px"},onClick:()=>{k("redPackets")},disabled:!JSON.parse(sessionStorage.getItem("isEarlyWarningMan"))||1===e.isSettlement&&e.settlementData&&(7===e.settlementData.key||8===e.settlementData.key),children:"\u65b0\u5efa\u7ea2\u5305"},void 0,!1,{fileName:ss,lineNumber:702,columnNumber:17},void 0)]},void 0,!0,{fileName:ss,lineNumber:661,columnNumber:15},void 0)},void 0,!1,{fileName:ss,lineNumber:660,columnNumber:13},void 0)]},void 0,!0,{fileName:ss,lineNumber:643,columnNumber:11},void 0)},void 0,!1,{fileName:ss,lineNumber:642,columnNumber:9},void 0),Object(h.jsxDEV)(s.a,{labelname:"",prop:"range",id:"range",children:Object(h.jsxDEV)(vt.a,{loading:N.tableLoading,iconSize:16,textSize:12,icon:"circle",iconText:"\u52a0\u8f7d\u4e2d",children:Object(h.jsxDEV)(I,{headBackgroud:"#f9fafc",isBorder:!0,spliteColor:"#fff",tableData:N.tableData,Column:ns,countbarVisible:!1,maxheight:N.tableHeight,isSwitch:!1,isShowPageBar:!1,page:N.page,ref:b,dataCount:N.dataCount,emptyText:"\u62b1\u6b49\uff0c\u6682\u65e0\u76f8\u5173\u6570\u636e\u8bb0\u5f55",checkChange:e=>(e=>{let t=[];Object(f.a)(e,(e=>{let i={};return i.key=e.product_id,i.text=e.product_name,t.push(i),i})),j({rank:t})})(e),ComponentHandler:(e,t,i)=>"opearo"===e?Object(h.jsxDEV)("div",{children:Object(h.jsxDEV)("span",{className:"grid-link",onClick:()=>((e,t)=>{try{if(N.direct_reseller_id<=0)return void c.a.error("\u8bf7\u6dfb\u52a0\u6620\u5c04\u5206\u9500\u5546");if(D(),1===e.type){j({product_title:"\u7f16\u8f91\u5546\u54c1",scopePopType:"addProduct",checkedProduct:V(),table_index:t,productType:e.product_type});let i=sessionStorage.getItem("plan_status");"2"!==N.KeyPcType&&"0"!==i||delete e.code_batch_id,j({productData:e,showScopePop:!0})}else if(2===e.type){let i=e.only;"2"===N.KeyPcType&&delete i.id,j({product_title:"\u7f16\u8f91\u7acb\u51cf\u91d1",productData:i,scopePopType:"addKnockGold",showScopePop:!0,table_index:t})}else{let i=e.only;"2"===N.KeyPcType&&delete i.id,j({product_title:"\u7f16\u8f91\u7ea2\u5305",productData:i,scopePopType:"redPackets",showScopePop:!0,table_index:t})}}catch(i){}})(t,i),children:"\u7f16\u8f91"},void 0,!1,{fileName:ss,lineNumber:748,columnNumber:23},void 0)},void 0,!1,{fileName:ss,lineNumber:747,columnNumber:21},void 0):"type"===e?Object(h.jsxDEV)("span",{children:1===t.type?"\u5546\u54c1":3===t.type?"2"===t.only.cash_amount_type?"\u968f\u673a\u7ea2\u5305":"\u56fa\u989d\u7ea2\u5305":"\u7acb\u51cf\u91d1"},void 0,!1,{fileName:ss,lineNumber:759,columnNumber:21},void 0):"cost_price"===e?Object(h.jsxDEV)(h.Fragment,{children:2===t.type?t.official_price:t.cost_price},void 0,!1):void 0},void 0,!1,{fileName:ss,lineNumber:729,columnNumber:13},void 0)},void 0,!1,{fileName:ss,lineNumber:722,columnNumber:11},void 0)},void 0,!1,{fileName:ss,lineNumber:721,columnNumber:9},void 0)]},void 0,!0,{fileName:ss,lineNumber:641,columnNumber:7},void 0),Object(h.jsxDEV)(Ot,{ref:p,product_title:N.product_title,drawerVisible:N.showScopePop,type:N.scopePopType,productData:N.productData,onClose:()=>{j({showScopePop:!1})},tableData:N.tableData,checkedProduct:N.checkedProduct,table_index:N.table_index,directResellerId:N.direct_reseller_id,productType:N.productType,submit:e=>(e=>{try{let t=e,i=[];t.map((e=>{let t={};t.key=e.product_id,t.text=e.product_name,i.push(t)}));let a=[];t.map((e=>{let t={};e.checked&&(t.key=e.product_id,t.text=e.product_name,a.push(t))})),j({tableData:t,rankOptions:i,rank:a})}catch(t){}})(e),isSettlement:e.isSettlement,settlementData:e.settlementData},void 0,!1,{fileName:ss,lineNumber:779,columnNumber:7},void 0)]},void 0,!0,{fileName:ss,lineNumber:580,columnNumber:5},void 0)}));const cs=[{title:"\u5546\u54c1ID",name:"product_id",prop:"product_id",width:"auto",type:"normal"},{title:"\u5546\u54c1\u540d\u79f0",width:"auto",prop:"product_name",name:"product_name",type:"normal"},{title:"\u5e73\u53f0\u6279\u6b21\u53f7",width:"250px",prop:"channel_activity_id",name:"channel_activity_id",type:"normal"},{title:"\u7c7b\u578b",width:"auto",prop:"type",name:"type",type:"slot"},{title:"\u4e0a\u6e38\u5e73\u53f0",width:"auto",prop:"upstream",name:"upstream",type:"normal"},{title:"\u6709\u6548\u65f6\u95f4\u6bb5",width:"300px",prop:"effectDate",name:"effectDate",type:"slot"},{title:"\u603b\u9884\u7b97",prop:"all_budget",name:"all_budget",width:"auto",type:"normal"},{title:"\u5f53\u524d\u6210\u672c\u4ef7\u683c",prop:"cost_price",name:"cost_price",width:"200px",type:"slot"},{title:"\u5408\u540c\u4ef7",name:"contract_price",prop:"contract_price",type:"normal",width:"auto"},{title:"\u5546\u54c1\u5b98\u65b9\u4ef7",type:"normal",prop:"official_price",width:"auto"},{title:"\u5355\u6b21\u5230\u8d26",type:"normal",prop:"send_num",width:"auto"},{title:"\u5e93\u5b58",type:"normal",prop:"quantity",width:"auto"},{title:"\u64cd\u4f5c",prop:"opearo",name:"opearo",type:"slot",width:"auto"}],ds={code_name:[{type:"required",message:"\u8bf7\u8f93\u5165\u5151\u6362\u7801\u540d\u79f0"}],quantity:[{type:"required",message:"\u8bf7\u8f93\u5165\u53d1\u653e\u603b\u91cf"},{type:"regExp",message:"\u8bf7\u8f93\u5165\u6b63\u6574\u6570",reg:"^([1-9][0-9]*){1,3}$"}]},us={date_time:[{type:"required",message:"\u8bf7\u9009\u62e9\u751f\u6548\u65f6\u95f4\u6bb5"}],timer:[{type:"required",message:"\u8bf7\u9009\u62e9\u9886\u53d6\u65f6\u95f4\u6bb5"}],rank:[{type:"required",message:"\u8bf7\u9009\u62e9\u5546\u54c1\u8303\u56f4"}]};var hs="/Users/zhangds/web/blue-brother/frontend/src/components/combining/index.jsx";function bs(e){return Array.from({length:e},((e,t)=>t))}var ps=Object(r.forwardRef)(((e,t)=>{const{propsData:i}=e,o=Object(r.useRef)(null),m=Object(r.useRef)(null),b=Object(r.useRef)(null),p=Object(r.useRef)(null),[N,j]=Object(W.a)(x()),[v,g]=Object(W.a)(y()),_=()=>{j(x()),g(y())};function x(){return{rankOptions:[],rank:[],tableData:[],productData:null,visible:!1,keyPcType:Number(sessionStorage.getItem("KeyPcType"))||0}}function y(){return{instruction:z,code_name:"",quantity:"",date_time:[],channel:"1",receive_mode:1,timer_type:1,timer:[],group_cover:"",group_image:[],instructionType:1,is_webview:0,timer_show:1}}function O(){let e=!1;if(!o.current.validator())return e=!1,e;if(e=!0,!m.current.validator())return e=!1,e;if(e=!0,e){if(!(N.rank.length>0))return c.a.error("\u8bf7\u9009\u62e9\u5546\u54c1\u8303\u56f4"),!1;{let e=N.tableData.filter((e=>e.checked)),t=!1;if(e.map((e=>{e.quantitye.checked));return e.product.reduce=t.map((e=>({...e.origin}))),e}Object(r.useEffect)((()=>{i&&""!==i?function(){let e=i.product.reduce.map((e=>{const t=q(e);return t.origin=t.only,t.send_num=e.send_num,t.checked=!0,2==N.keyPcType&&delete e.id,t})),t=Object(f.a)(e,(e=>{let t={};return t.key=e.product_id,t.text=e.product_name,t.checked=!0,t}));j({rankOptions:t,rank:t,tableData:e});const{quantity:a,group_info:s,title:l,begin_time:n,end_time:o}=i,{channel:r,receive_mode:m,instruction:c,group_image:d,time_limit:u,is_webview:h,timer_show:b}=s;g({quantity:a,is_webview:Number(h)||0,timer_show:Number(b)||1,instructionType:Number(s.instructionType)||1,code_name:l,date_time:[n,o],channel:r,receive_mode:Number(m),instruction:c,timer_type:u.receive_time.start_time?2:1,group_image:d?[{id:(new Date).getTime(),src:d,name:"\u5546\u54c1\u63cf\u8ff0"}]:[],timer:[u.receive_time.start_time,u.receive_time.end_time]}),sessionStorage.setItem("knockGoldData",JSON.stringify(i.product.reduce))}():sessionStorage.setItem("knockGoldData",JSON.stringify([]))}),[]),Object(r.useImperativeHandle)(t,(()=>({submit:O,getModel:D,clearExchangeForm:_})));const E=e=>{e.length>0?(e=>new Promise(((t,i)=>{try{let s=new FormData;s.append("file",e),s.append("path","common_image"),Object(a.cd)(s).then((e=>{Object(a.Tb)(e,((e,i)=>{t(e.path)}),(e=>{c.a.error(e),i(e)}))}))}catch(s){i(s)}})))(e[0].file).then((t=>{g({group_image:[{src:t,id:`${(new Date).getTime()}-0`,name:e[0].file.name}]})})):g({group_image:[]})};return Object(h.jsxDEV)("div",{className:"combiningCommon",children:[Object(h.jsxDEV)(d.a,{className:"card1",title:"\u57fa\u672c\u4fe1\u606f",children:[Object(h.jsxDEV)("div",{className:"addcode",children:Object(h.jsxDEV)(l.a,{model:v,rules:ds,ref:o,className:"addform",children:[Object(h.jsxDEV)(s.a,{labelname:"\u53d1\u653e\u6e20\u9053",prop:"channel",id:"type",children:Object(h.jsxDEV)(Q.a,{disabled:!!N.tableData.length&&2!==N.keyPcType,onChange:({target:e})=>{g({channel:e.value,is_webview:0}),"3"===e.value?g({receive_mode:2}):g({receive_mode:1}),"1"===e.value?g({instruction:z}):"2"===e.value?g({instruction:A}):g({instruction:J}),2===N.keyPcType&&(j({rankOptions:[],rank:[],tableData:[]}),sessionStorage.setItem("knockGoldData",JSON.stringify([])))},value:v.channel,children:Object(h.jsxDEV)(Ei.a,{trigger:"hover",content:"\u53ea\u80fd\u7ec4\u5408\u540c\u4e00\u79cd\u6e20\u9053\u7acb\u51cf\u91d1",children:[Object(h.jsxDEV)(ne.a,{value:"1",children:"\u652f\u4ed8\u5b9d"},void 0,!1,{fileName:hs,lineNumber:445,columnNumber:19},void 0),Object(h.jsxDEV)(ne.a,{value:"2",children:"\u5fae\u4fe1"},void 0,!1,{fileName:hs,lineNumber:446,columnNumber:19},void 0),Object(h.jsxDEV)(ne.a,{value:"3",children:"\u4e91\u95ea\u4ed8"},void 0,!1,{fileName:hs,lineNumber:447,columnNumber:19},void 0)]},void 0,!0,{fileName:hs,lineNumber:444,columnNumber:17},void 0)},void 0,!1,{fileName:hs,lineNumber:421,columnNumber:15},void 0)},void 0,!1,{fileName:hs,lineNumber:420,columnNumber:13},void 0),2==v.channel?Object(h.jsxDEV)(s.a,{labelname:"\u6253\u5f00\u65b9\u5f0f",prop:"is_webview",id:"is_webview",children:Object(h.jsxDEV)(Q.a,{onChange:({target:e})=>{g({is_webview:e.value})},value:v.is_webview,children:[Object(h.jsxDEV)(ne.a,{value:0,children:"\u5c0f\u7a0b\u5e8f"},void 0,!1,{fileName:hs,lineNumber:459,columnNumber:19},void 0),Object(h.jsxDEV)(ne.a,{value:1,children:"\u516c\u4f17\u53f7"},void 0,!1,{fileName:hs,lineNumber:460,columnNumber:19},void 0)]},void 0,!0,{fileName:hs,lineNumber:453,columnNumber:17},void 0)},"is_webview",!1,{fileName:hs,lineNumber:452,columnNumber:15},void 0):null,1==v.channel?Object(h.jsxDEV)(s.a,{labelname:"\u9886\u53d6\u65b9\u5f0f",prop:"receive_mode",id:"receive_mode",children:Object(h.jsxDEV)(Q.a,{disabled:!!N.tableData.length&&2!==N.keyPcType,onChange:({target:e})=>{g({receive_mode:e.value}),2===N.keyPcType&&(j({rankOptions:[],rank:[],tableData:[]}),sessionStorage.setItem("knockGoldData",JSON.stringify([])))},value:v.receive_mode,children:Object(h.jsxDEV)(Ei.a,{trigger:"hover",content:"\u53ea\u80fd\u7ec4\u5408\u540c\u4e00\u79cd\u9886\u53d6\u65b9\u5f0f\u7acb\u51cf\u91d1",children:[Object(h.jsxDEV)(ne.a,{value:1,children:"\u5b98\u65b9\u9886\u53d6"},void 0,!1,{fileName:hs,lineNumber:478,columnNumber:21},void 0),Object(h.jsxDEV)(ne.a,{value:2,children:"\u8d26\u53f7\u9886\u53d6"},void 0,!1,{fileName:hs,lineNumber:479,columnNumber:21},void 0)]},void 0,!0,{fileName:hs,lineNumber:477,columnNumber:19},void 0)},void 0,!1,{fileName:hs,lineNumber:466,columnNumber:17},void 0)},void 0,!1,{fileName:hs,lineNumber:465,columnNumber:15},void 0):null,Object(h.jsxDEV)(s.a,{labelname:"\u7ec4\u5408\u5546\u54c1\u540d\u79f0",prop:"code_name",id:"code_name",children:Object(h.jsxDEV)(n.a,{onChange:e=>{g({code_name:e})},onClearItem:e=>{g({code_name:""})},value:v.code_name,placeholder:"\u8bf7\u8f93\u5165\u7ec4\u5408\u5546\u54c1\u540d\u79f0",labelWidth:"0px",maxLength:10,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:hs,lineNumber:485,columnNumber:15},void 0)},void 0,!1,{fileName:hs,lineNumber:484,columnNumber:13},void 0),Object(h.jsxDEV)(s.a,{labelname:"\u53d1\u653e\u603b\u91cf",prop:"quantity",id:"quantity",children:Object(h.jsxDEV)(n.a,{onChange:e=>{g({quantity:e})},onClearItem:e=>{g({quantity:""})},unit:"\u6761",countShow:!1,value:v.quantity,placeholder:"\u8bf7\u8f93\u5165\u53d1\u653e\u603b\u91cf",labelWidth:"0px",maxLength:12,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:hs,lineNumber:502,columnNumber:15},void 0)},void 0,!1,{fileName:hs,lineNumber:501,columnNumber:13},void 0),Object(h.jsxDEV)(s.a,{labelname:"\u63cf\u8ff0\u7c7b\u578b",prop:"instructionType",id:"instructionType",children:Object(h.jsxDEV)(Q.a,{onChange:({target:e})=>{g({instructionType:e.value})},value:v.instructionType,children:[Object(h.jsxDEV)(ne.a,{value:1,children:"\u6587\u5b57\u63cf\u8ff0"},void 0,!1,{fileName:hs,lineNumber:527,columnNumber:17},void 0),Object(h.jsxDEV)(ne.a,{value:2,children:"\u56fe\u7247\u63cf\u8ff0"},void 0,!1,{fileName:hs,lineNumber:528,columnNumber:17},void 0)]},void 0,!0,{fileName:hs,lineNumber:521,columnNumber:15},void 0)},void 0,!1,{fileName:hs,lineNumber:520,columnNumber:13},void 0),2===v.instructionType?Object(h.jsxDEV)(s.a,{prop:"group_image",labelname:"\u5546\u54c1\u63cf\u8ff0",id:"group_image",required:"",children:Object(h.jsxDEV)(gt.a,{className:"good-image-upload-demo",maxSize:5242880,tips:"\u56fe\u7247\u4e0d\u8d85\u8fc7 5M",maxAmount:1,onError:(e,t)=>{"overMaxAmount"===e?c.a.error(`\u6700\u591a\u53ef\u4e0a\u4f20 ${t.maxAmount} \u5f20\u56fe\u7247`):"overMaxSize"===e&&c.a.error(`\u56fe\u7247\u5927\u5c0f\u4e0d\u80fd\u8d85\u8fc7 ${t.formattedMaxSize}`)},onChange:(e,t)=>{E(e)},sortable:!0,fileList:v.group_image,multiple:!0},void 0,!1,{fileName:hs,lineNumber:533,columnNumber:17},void 0)},void 0,!1,{fileName:hs,lineNumber:532,columnNumber:15},void 0):Object(h.jsxDEV)(s.a,{labelname:"\u4f7f\u7528\u8bf4\u660e",prop:"instruction",id:"instruction",required:!1,children:Object(h.jsxDEV)(Wi,{pageType:"detaileditor",setEdittext:e=>{g({instruction:e})},width:"520px",text:v.instruction,limitLength:5e3},v.channel,!1,{fileName:hs,lineNumber:549,columnNumber:17},void 0)},void 0,!1,{fileName:hs,lineNumber:548,columnNumber:15},void 0)]},void 0,!0,{fileName:hs,lineNumber:419,columnNumber:11},void 0)},void 0,!1,{fileName:hs,lineNumber:418,columnNumber:9},void 0),Object(h.jsxDEV)(Yi,{data:v,products:N.tableData},void 0,!1,{fileName:hs,lineNumber:563,columnNumber:9},void 0)]},void 0,!0,{fileName:hs,lineNumber:417,columnNumber:7},void 0),Object(h.jsxDEV)(d.a,{style:{width:"95%",margin:"10px auto"},title:"\u57fa\u672c\u89c4\u5219",children:[Object(h.jsxDEV)("div",{children:Object(h.jsxDEV)(l.a,{model:v,rules:us,ref:m,className:"addform",children:[Object(h.jsxDEV)(s.a,{labelname:"\u751f\u6548\u65f6\u95f4\u6bb5",prop:"date_time",id:"date_time",children:[Object(h.jsxDEV)(ee.a,{className:"zent-datepicker-plan",showTime:{format:"HH:mm:ss",defaultTime:["00:00:00","23:59:59"]},format:"YYYY-MM-DD HH:mm:ss",value:v.date_time,onChange:e=>{g({date_time:e}),N.tableData.map((t=>{t.origin.time_limit.effect_time.start_time=e[0],t.origin.time_limit.effect_time.end_time=e[1],t.only.time_limit.effect_time.start_time=e[0],t.only.time_limit.effect_time.end_time=e[1]}))},disabledTime:function(e,t){let i=JSON.parse(sessionStorage.getItem("plan_item"));const a=new Date(i.begin_time),s=a.getHours(),l=a.getMinutes(),n=a.getSeconds();return Object(R.a)(e,a)?{disabledHours:()=>bs(s),disabledMinutes:e=>e===s?bs(l):[],disabledSeconds:(e,t)=>e===s&&t===l?bs(n):[]}:{}},disabledDate:function(e,t){let i=JSON.parse(sessionStorage.getItem("plan_item")),a=!1,s=Y()(e).format("YYYY-MM-DD HH:mm:ss");const l=Y()(i.end_time).format("HH:mm:ss");return"start"==t&&(a=l<"23:59:59"?Y()(s).isBefore(i.begin_time)||Y()(s).subtract(1,"days").isAfter(i.end_time):Y()(s).isBefore(i.begin_time)||Y()(s).isAfter(i.end_time)),"end"==t&&(a=Y()(s).add(1,"days").isBefore(i.begin_time)||Y()(s).isAfter(i.end_time)),a}},void 0,!1,{fileName:hs,lineNumber:570,columnNumber:15},void 0),Object(h.jsxDEV)(Q.a,{style:{marginLeft:"20px"},onChange:({target:e})=>{g({timer_show:e.value})},value:v.timer_show,children:[Object(h.jsxDEV)(ne.a,{value:1,children:"\u663e\u793a"},void 0,!1,{fileName:hs,lineNumber:597,columnNumber:17},void 0),Object(h.jsxDEV)(ne.a,{value:2,children:"\u9690\u85cf"},void 0,!1,{fileName:hs,lineNumber:598,columnNumber:17},void 0)]},void 0,!0,{fileName:hs,lineNumber:590,columnNumber:15},void 0)]},void 0,!0,{fileName:hs,lineNumber:569,columnNumber:13},void 0),2===v.timer_type?Object(h.jsxDEV)(s.a,{id:"timer",labelname:"\u9886\u53d6\u65f6\u95f4\u6bb5",prop:"timer",children:[Object(h.jsxDEV)(re.a,{className:"zent-datepicker-plan",showTime:{format:"HH:mm:ss",defaultTime:[Y()().format("HH:mm:ss"),"23:59:59"]},value:v.timer,onChange:e=>{g({timer:e})},width:"240px",disabledTime:function(e,t){let i=!1;return"end"==t&&(i=Y()(e.getTime()).add(1,"days")<=(new Date).getTime()),"start"==t&&(i=e.getTime()<=(new Date).getTime()),i}},void 0,!1,{fileName:hs,lineNumber:603,columnNumber:17},void 0),Object(h.jsxDEV)(Q.a,{style:{marginLeft:"15px"},onChange:({target:e})=>{g({timer_type:e.value}),1===e.value&&g({timer:[]})},value:v.timer_type,children:[Object(h.jsxDEV)(ne.a,{value:1,children:"\u4e0d\u8bbe\u7f6e"},void 0,!1,{fileName:hs,lineNumber:626,columnNumber:19},void 0),Object(h.jsxDEV)(ne.a,{value:2,children:"\u6bcf\u65e5"},void 0,!1,{fileName:hs,lineNumber:627,columnNumber:19},void 0)]},void 0,!0,{fileName:hs,lineNumber:616,columnNumber:17},void 0)]},void 0,!0,{fileName:hs,lineNumber:602,columnNumber:15},void 0):Object(h.jsxDEV)(s.a,{id:"timer",labelname:"\u9886\u53d6\u65f6\u95f4\u6bb5",children:Object(h.jsxDEV)(Q.a,{onChange:({target:e})=>{g({timer_type:e.value})},value:v.timer_type,children:[Object(h.jsxDEV)(ne.a,{value:1,children:"\u4e0d\u8bbe\u7f6e"},void 0,!1,{fileName:hs,lineNumber:638,columnNumber:19},void 0),Object(h.jsxDEV)(ne.a,{value:2,children:"\u6bcf\u65e5"},void 0,!1,{fileName:hs,lineNumber:639,columnNumber:19},void 0)]},void 0,!0,{fileName:hs,lineNumber:632,columnNumber:17},void 0)},void 0,!1,{fileName:hs,lineNumber:631,columnNumber:15},void 0),Object(h.jsxDEV)(s.a,{labelname:"\u5546\u54c1\u8303\u56f4",prop:"rank",id:"rank",children:Object(h.jsxDEV)("div",{className:"goods-boxs",children:[Object(h.jsxDEV)(X.a,{options:N.rankOptions,multiple:!0,value:N.rank,placeholder:"\u9009\u62e9\u4e00\u9879",width:405,onChange:e=>{!function(e){let t=N.tableData.map((t=>(t.checked=e.findIndex((e=>e.key==t.product_id))>-1,t)));j({tableData:t,rank:e})}(e)}},void 0,!1,{fileName:hs,lineNumber:645,columnNumber:17},void 0),Object(h.jsxDEV)(u.a,{type:"primary",style:{marginLeft:"20px"},onClick:()=>{!function(){if(v.date_time.filter((e=>e)).length<2)return c.a.error("\u8bf7\u5148\u9009\u62e9\u751f\u6548\u65f6\u95f4\u6bb5");sessionStorage.setItem("knockGold_effectDate",JSON.stringify({begin_time:v.date_time[0],end_time:v.date_time[1]})),j({visible:!0,productData:null})}()},children:"\u65b0\u5efa\u7acb\u51cf\u91d1"},void 0,!1,{fileName:hs,lineNumber:655,columnNumber:17},void 0)]},void 0,!0,{fileName:hs,lineNumber:644,columnNumber:15},void 0)},void 0,!1,{fileName:hs,lineNumber:643,columnNumber:13},void 0)]},void 0,!0,{fileName:hs,lineNumber:568,columnNumber:11},void 0)},void 0,!1,{fileName:hs,lineNumber:567,columnNumber:9},void 0),Object(h.jsxDEV)(s.a,{labelname:"",prop:"range",id:"range",children:Object(h.jsxDEV)(I,{headBackgroud:"#f9fafc",isBorder:!0,spliteColor:"#fff",tableData:N.tableData,Column:cs,countbarVisible:!1,maxheight:N.tableHeight,isSwitch:!1,isShowPageBar:!1,page:N.page,ref:b,dataCount:N.dataCount,emptyText:"\u62b1\u6b49\uff0c\u6682\u65e0\u76f8\u5173\u6570\u636e\u8bb0\u5f55",checkChange:e=>function(e){let t=[];Object(f.a)(e,(e=>{let i={};return i.key=e.product_id,i.text=e.product_name,t.push(i),i})),j({rank:t})}(e),ComponentHandler:(e,t,i)=>"opearo"===e?Object(h.jsxDEV)("div",{children:Object(h.jsxDEV)("span",{className:"grid-link",onClick:()=>function(e){j({visible:!0,productData:e.origin})}(t),children:"\u7f16\u8f91"},void 0,!1,{fileName:hs,lineNumber:688,columnNumber:21},void 0)},void 0,!1,{fileName:hs,lineNumber:687,columnNumber:19},void 0):"cost_price"===e?Object(h.jsxDEV)(h.Fragment,{children:2===t.type?t.official_price:t.cost_price},void 0,!1):"type"===e?Object(h.jsxDEV)(h.Fragment,{children:"\u7acb\u51cf\u91d1"},void 0,!1):"effectDate"==e?Object(h.jsxDEV)(h.Fragment,{children:[v.date_time[0]," \u81f3 ",v.date_time[1]]},void 0,!0):void 0},void 0,!1,{fileName:hs,lineNumber:669,columnNumber:11},void 0)},void 0,!1,{fileName:hs,lineNumber:668,columnNumber:9},void 0)]},void 0,!0,{fileName:hs,lineNumber:566,columnNumber:7},void 0),Object(h.jsxDEV)(bt.a,{className:"draw",width:"86%",title:"\u65b0\u5efa\u7acb\u51cf\u91d1",footer:Object(h.jsxDEV)("div",{style:{textAlign:"center"},children:[Object(h.jsxDEV)(u.a,{type:"primary",onClick:async function(){if(await p.current.submit()){const e=JSON.parse(sessionStorage.getItem("knockGoldData")).map((e=>{const t=q(e);return t.origin=t.only,t.send_num=e.send_num,t.checked=!0,t}));let t=Object(f.a)(e,(e=>{let t={};return t.key=e.product_id,t.text=e.product_name,t.checked=!0,t}));j({visible:!1,tableData:e,rank:t,rankOptions:t})}},children:"\u63d0\u4ea4"},void 0,!1,{fileName:hs,lineNumber:717,columnNumber:13},void 0),Object(h.jsxDEV)(u.a,{onClick:e=>{j({visible:!1})},children:"\u53d6\u6d88"},void 0,!1,{fileName:hs,lineNumber:720,columnNumber:13},void 0)]},void 0,!0,{fileName:hs,lineNumber:716,columnNumber:11},void 0),visible:N.visible,onClose:e=>{j({visible:!1})},maskClosable:!1,children:Object(h.jsxDEV)("div",{className:"draw2",children:Object(h.jsxDEV)(d.a,{style:{width:"95%",margin:"10px auto",border:0},children:Object(h.jsxDEV)(qe,{ref:p,data:N.productData,combining:v},void 0,!1,{fileName:hs,lineNumber:737,columnNumber:13},void 0)},void 0,!1,{fileName:hs,lineNumber:736,columnNumber:11},void 0)},void 0,!1,{fileName:hs,lineNumber:735,columnNumber:9},void 0)},void 0,!1,{fileName:hs,lineNumber:711,columnNumber:7},void 0)]},void 0,!0,{fileName:hs,lineNumber:416,columnNumber:5},void 0)})),Ns=(i(250),"/Users/zhangds/web/blue-brother/frontend/src/pages/plan/add/step2.js");const js=e=>Array.from({length:e},((e,t)=>t)),vs=[{title:"\u884c\u53f7",name:"line",prop:"line",width:"30px",type:"normal"},{title:"\u624b\u673a\u53f7",width:"80px",prop:"mobile",name:"mobile",type:"normal"},{title:"\u9519\u8bef\u539f\u56e0",width:"80px",prop:"tips",name:"tips",type:"normal"},{title:"\u662f\u5426\u5bfc\u5165",width:"50px",prop:"is_import",name:"is_import",type:"slot"}];class gs extends m.a.Component{constructor(e){super(e),this.onCheckChange=({target:e})=>{sessionStorage.setItem("keyType",e.value),this.props.setKeyType(e.value),this.props.getStep3Theme&&this.props.getStep3Theme()},this.onDisabledCombinedDate=e=>{let t=JSON.parse(sessionStorage.getItem("step1")),i=Y()(e).format("YYYY-MM-DD HH:mm:ss");return!Y()(i).isBetween(t.begin_time,t.end_time,null,"(]")},this.onDisabledTime=(e,t)=>{const i=new Date,a=i.getHours(),s=i.getMinutes(),l=i.getSeconds();return Object(R.a)(e,i)?{disabledHours:()=>js(a),disabledMinutes:e=>e===a?js(s):[],disabledSeconds:(e,t)=>e===a&&t===s?js(l):[]}:{}},this.onDisabledRange=(e,t)=>{let i=JSON.parse(sessionStorage.getItem("knockGold_effectDate")),a=!1,s=Y()(e).format("YYYY-MM-DD HH:mm:ss"),l=Y()(i.end_time).format("HH:mm:ss");return"start"==t&&(a=l<"23:59:59"?Y()(s).isBefore(i.begin_time)||Y()(s).subtract(1,"days").isAfter(i.end_time):Y()(s).isBefore(i.begin_time)||Y()(s).isAfter(i.end_time)),"end"==t&&(a=Y()(s).add(1,"days").isBefore(i.begin_time)||Y()(s).isAfter(i.end_time)),a},this.onUpload=(e,t)=>new Promise(((i,s)=>{let l="",n=new FormData;n.append("file",e),n.append("path","common_image"),Object(a.cd)(n).then((e=>{Object(a.Tb)(e,((e,t)=>{l=e.path}),(e=>{s()}))}));let o=0;const r=()=>{l?i(l):o<100?(o+=2,t(o),setTimeout(r,500)):s()};setTimeout(r,500)})),this.onUploadError=(e,t)=>{"overMaxAmount"===e?c.a.error(`\u6700\u591a\u53ef\u4e0a\u4f20 ${t.maxAmount} \u5f20\u56fe\u7247`):"overMaxSize"===e&&c.a.error(`\u56fe\u7247\u5927\u5c0f\u4e0d\u80fd\u8d85\u8fc7 ${t.formattedMaxSize}`)},this.clearTableData=()=>{this.setState({distdata:[],couponData:[]})},this.state={model:{style:1,quantity:0,allow_repetition:0,allow_loss:0,merge_stock:1,code_batch:"",draw_title:"",batch_name:"",key_official_price:"",key_cost_price:"",expiration_type:"1",expiration_value:""},drawerVisible:!1,drawerVisible2:!1,exchangeType:1,productData:[],codeInfo:{code_name:"",issued:"",describe:"",date_time:"",range:""},rank:null,rankoptions:[],tempdata:[],distdata:[],couponData:[],column_distdata:[],exceldata:[],oldData:null,uploading:!1,rowIndex:-1,isload:!!e.isload&&e.isload,import_visible:!1,white_visible:!1,success_visible:!1,fail_visible:!1,file_loading:!1,upload_visible:!1,excel_visible:!1,accessVerify:!1,mobile_excel:"",mobile_repeat:[],execel_path:"",excel_count:0,success_count:0,error_count:0,whiteStyle:!1,import_success:!1,product_title:"\u65b0\u5efa\u5546\u54c1",newGoodsBtnLoading:!1,newGoldLoading:!1,direct_reseller_id:0,tableLoading:!1,isCopy:!!e.isCopy,rowCouponData:"",rowExchangeData:"",Column:[{title:"\u5151\u6362\u540d\u79f0",name:"title",prop:"title",type:"normal",width:"auto"},{title:"\u5151\u6362\u7801\u8303\u56f4",prop:"product",name:"product",width:"auto",type:"slot"},{title:"\u6709\u6548\u5f00\u59cb\u65e5\u671f",prop:"begin_time",name:"begin_time",width:"auto",type:"normal"},{title:"\u6709\u6548\u7ed3\u675f\u65e5\u671f",name:"end_time",prop:"end_time",type:"normal",width:"auto"},{title:"\u5151\u6362\u7801\u6570\u91cf",name:"quantity",type:"normal",prop:"quantity",defaultText:"PM",width:"auto"},{title:"\u7ed1\u5b9a\u6570",prop:"restrict",name:"restrict",type:"slot",width:"auto"},{title:"\u64cd\u4f5c",prop:"edit",name:"edit",type:"slot",width:"auto"}],Column_coupon:[{title:"\u4f18\u60e0\u5238\u540d\u79f0",name:"title",prop:"title",type:"normal",width:"auto"},{title:"\u4f18\u60e0\u5238\u8303\u56f4",prop:"product",name:"product",width:"auto",type:"slot"},{title:"\u6709\u6548\u5f00\u59cb\u65e5\u671f",prop:"begin_time",name:"begin_time",width:"auto",type:"normal"},{title:"\u6709\u6548\u7ed3\u675f\u65e5\u671f",name:"end_time",prop:"end_time",type:"normal",width:"auto"},{title:"\u4f18\u60e0\u5238\u6570\u91cf",name:"quantity",type:"normal",prop:"quantity",defaultText:"PM",width:"auto"},{title:"\u7ed1\u5b9a\u6570",prop:"restrict",name:"restrict",type:"slot",width:"auto"},{title:"\u64cd\u4f5c",prop:"edit",name:"edit",type:"slot",width:"auto"}]}}componentDidMount(e){if(N.a.findDOMNode(this).getElementsByClassName("form-Item")[1].getElementsByTagName("input")[0].focus(),this.props.name>0){let e=this.state.model;e.style=this.props.keyStyle,this.setState({whiteStyle:this.props.whiteStyle,white_visible:this.props.whiteStyle,model:e})}}submit(){if(1===this.props.keyType){if(this.refs.form1.validator()){const e=this.refs.tempdata.getSelectData();let t={};return t.batch_name=this.state.model.batch_name,t.style=this.state.model.style,t.quantity=this.state.model.quantity,t.bind_object=[this.props.keyType],t.allow_repetition=this.state.model.allow_repetition,t.allow_loss=this.state.model.allow_loss,t.merge_stock=this.state.model.merge_stock,t.code_batch=e,t.mobile_excel=this.state.mobile_excel,t.mobile_repeat=this.state.mobile_repeat,t.key_official_price=this.state.model.key_official_price,t.key_cost_price=this.state.model.key_cost_price,t.expiration_conf={expiration_type:this.state.model.expiration_type,expiration_value:this.state.model.expiration_value},t}}else if(this.refs.form1.validator()){let e=this.state.couponData.filter((e=>e.checked)),t={};t.batch_name=this.state.model.batch_name,t.style=this.state.model.style,t.quantity=this.state.model.quantity,t.bind_object=[this.props.keyType],t.allow_repetition=this.state.model.allow_repetition,t.allow_loss=this.state.model.allow_loss,t.merge_stock=this.state.model.merge_stock,t.coupon=e,t.mobile_excel=this.state.mobile_excel,t.mobile_repeat=this.state.mobile_repeat,t.expiration_conf={expiration_type:this.state.model.expiration_type,expiration_value:this.state.model.expiration_value};for(let i=0;i{this.refs.addEditExchangeEl.clearExchangeForm()}),300);break;case 1:this.setState({draw_title:"\u65b0\u5efa\u4f18\u60e0\u5238"}),setTimeout((()=>{this.refs.addEditCouponEl.clearCouponForm()}),300);break;case 2:this.setState({draw_title:"\u65b0\u5efa\u7ec4\u5408\u5546\u54c1",exchangeType:2,rowExchangeData:null}),setTimeout((()=>{this.refs.addEditExchangeEl.clearExchangeForm()}),300)}this.setState({drawerVisible:!0,rowIndex:-1})}closeDraw(){2===this.props.keyType&&setTimeout((()=>{this.refs.addEditCouponEl.clearCouponForm()}),300),1===this.props.keyType&&setTimeout((()=>{this.refs.addEditExchangeEl.clearExchangeForm()}),300),this.setState({drawerVisible:!1})}getProductInfoSelectData(e){return new Promise(((t,i)=>{let s={reseller_id:e};Object(a.tb)(s).then((e=>{200===e.code?t(e.data.data):i([])}))}))}addProduct(e){this.setState({addIsType:e});let t=this.props.direct_reseller_id;t<=0?c.a.error("\u8bf7\u6dfb\u52a0\u6620\u5c04\u5206\u9500\u5546"):("addProduct"===e?this.setState({product_title:"\u65b0\u5efa\u5546\u54c1",newGoodsBtnLoading:!0}):this.setState({product_title:"\u65b0\u589e\u7acb\u51cf\u91d1",newGoldLoading:!0}),this.getProductInfoSelectData(t).then((t=>{sessionStorage.setItem("productsList",JSON.stringify(t)),"addProduct"===e?this.setState({newGoodsBtnLoading:!1}):this.setState({newGoldLoading:!1}),this.setState({drawerVisible2:!0,productData:null})})))}async productSubmit(){let e="";e="addProduct"===this.state.addIsType?await this.refs.product.submit():await this.refs.knockGold.submit(),e&&(c.a.success("\u4fdd\u5b58\u6210\u529f"),this.setState({drawerVisible2:!1}),setTimeout((()=>{let e=null,t=null,i=[];"addProduct"===this.state.addIsType?(e=JSON.parse(sessionStorage.getItem("productData")).filter((e=>2!==e.type)),i=this.state.tempdata.filter((e=>1!==e.type)),t=Object(f.a)(e,(e=>{let t=this.state.tempdata.findIndex((t=>t.product_id==e.product_id));return t>-1&&(e.checked=this.state.tempdata[t].checked),e.type=1,e.only=e.product_id,e.upstream="\u76f4\u8fde\u5929\u4e0b",e}))):(e=JSON.parse(sessionStorage.getItem("knockGoldData")).filter((e=>1!==e.type)),i=this.state.tempdata.filter((e=>2!==e.type)),t=Object(f.a)(e,(e=>{var t,i;let a=this.state.tempdata.findIndex((t=>t.channel_activity_id===e.channel_activity_id));a>-1&&(e.checked=this.state.tempdata[a].checked);const s={};return s.product_name=e.batch_goods_name?e.batch_goods_name:e.product_name,s.map_product_name=e.product_name,s.channel_activity_id=e.channel_activity_id,s.only=e.channel_activity_id,s.type=2,s.checked=null===e||void 0===e?void 0:e.checked,s.upstream=P(e.channel),s.edit="edit",s.effectDate=e.effectDate?e.effectDate:(null===(t=e.time_limit)||void 0===t?void 0:t.effect_time.start_time)+" \u81f3 "+(null===(i=e.time_limit)||void 0===i?void 0:i.effect_time.end_time),s.contract_price=e.contract_price?e.contract_price:e.price,s.official_price=e.official_price?e.official_price:e.reduce_amount,s.quantity=e.quantity?e.quantity:parseInt(L(e.all_budget,e.reduce_amount)),s.origin=null!==e&&void 0!==e&&e.origin?null===e||void 0===e?void 0:e.origin:e,s})));let a=te(t.concat(i),"only"),s=[],l=[];Object(f.a)(a,(e=>{s.push({key:e.only,text:e.product_name}),e.checked&&l.push({key:e.only,text:e.product_name})})),s=te(s,"key"),this.setState({tempdata:a,rankoptions:s,rank:l})}),500))}setkeyStyle(e){6==e?this.setState({white_visible:!0,whiteStyle:!0}):this.setState({white_visible:!1,whiteStyle:!1});let t=this.state.model;t.style=e,this.setState({model:t})}componentWillReceiveProps(e){}onChangeCombinedDate(e){let t=this.state.codeInfo;t.date_time=e,this.setState({codeInfo:t})}submit2(){this.refs.form2.validator()}onRankChange(e){Object(Ti.a)(this.state.tempdata,(t=>{t.checked=e.findIndex((e=>e.key==t.only))>-1})),this.setState({tempdata:this.state.tempdata,rank:e})}codeSubmit(){if(2!==this.props.keyType)if(1!==this.props.keyType);else{if(this.refs.addEditExchangeEl.submit()){let e=this.refs.addEditExchangeEl.getModel();if(1===this.props.isSettlement&&(e.restrict="1"),1===this.props.isSettlement&&2!==this.state.exchangeType){if([...e.product.legal,...e.product.reduce,...e.product.cash].length>1)return void c.a.error("\u5305\u7801\u53ea\u80fd\u521b\u5efa\u4e00\u4e2a\u5546\u54c1")}let t=this.state.distdata;this.state.rowIndex>-1?(t[this.state.rowIndex]=e,this.setState({distdata:t})):(t.push(e),this.setState({distdata:t})),this.setState({drawerVisible:!1})}}else{if(this.refs.addEditCouponEl.submit()){let e=this.refs.addEditCouponEl.getModel(),t=this.state.couponData;this.state.rowIndex>-1?(t[this.state.rowIndex]=e,this.setState({couponData:t})):(t.push(e),this.setState({couponData:t})),this.setState({drawerVisible:!1})}}}addNewKey(){this.props.addNewkey()}onRestrict(e,t,i){let a=e.target.value;a=a.replace(/[^\d]/g,""),1===this.props.keyType?(this.state.distdata[i].restrict=a,this.setState({distdata:this.state.distdata})):(this.state.couponData[i].restrict=a,this.setState({couponData:this.state.couponData}))}edit(e){let t={batch_name:e.batch_name,style:parseInt(e.style),quantity:e.quantity,allow_repetition:parseInt(e.allow_repetition),allow_loss:parseInt(e.allow_loss),merge_stock:e.merge_stock,code_batch:e.code_batch,draw_title:e.draw_title,key_official_price:e.key_official_price,key_cost_price:e.key_cost_price,expiration_type:e.expiration_conf?e.expiration_conf.expiration_type:"1",expiration_value:e.expiration_conf?e.expiration_conf.expiration_value:""},i=sessionStorage.getItem("bm_obj");if(i){let e=JSON.parse(i);e.settlement_type>0?(this.setState({isSettlement:1}),t.settlement_type={key:e.settlement_type,text:e.settlement_type_text}):this.setState({isSettlement:2})}6==t.style?(sessionStorage.setItem("white",1),this.setState({white_visible:!0})):sessionStorage.setItem("white",3);let a=Object(f.a)(e.code_batch,(e=>(e.checked=!0,e)));this.setState({mobile_repeat:e.mobile_repeat,mobile_excel:e.mobile_excel,model:t,checkedList:e.bind_object.map(Number)[0],distdata:a,isload:!0})}coupon_edit(e){let t={batch_name:e.batch_name,style:parseInt(e.style),quantity:e.quantity,allow_repetition:parseInt(e.allow_repetition),allow_loss:parseInt(e.allow_loss),merge_stock:e.merge_stock,draw_title:e.draw_title,coupon:e.coupon};6==t.style?(sessionStorage.setItem("white",1),this.setState({white_visible:!0})):sessionStorage.setItem("white",3);let i=Object(f.a)(e.coupon,(e=>(e.checked=!0,e)));this.setState({mobile_repeat:e.mobile_repeat,mobile_excel:e.mobile_excel,model:t,couponData:i,isload:!0})}onUploadChange1(e,t){if(e.length>0&&"success"==e[0].status){let i=this.state.tempdata.findIndex((e=>e.product_id==t.product_id));this.state.tempdata[i].describe_url=e[0].src,this.setState({tempdata:this.state.tempdata})}}onUploadChange2(e,t){if(e.length>0&&"success"==e[0].status){let i=this.state.tempdata.findIndex((e=>e.product_id==t.product_id));this.state.tempdata[i].describe_url=e[0].src,this.setState({tempdata:this.state.tempdata})}}onNameChange(e,t,i){this.state.tempdata[i].product_name=e.target.value;let a=Object(f.a)(this.state.tempdata,(e=>{let t={};return t.key=e.product_id,t.text=e.product_name,t}));this.setState({rank:a,rankoptions:a,tempdata:this.state.tempdata})}onQuantityChange(e,t,i){this.state.tempdata[i].quantity=""==e.target.value?0:e.target.value,this.setState({tempdata:this.state.tempdata})}onPriceChange(e,t,i){let a=e.target.value.replace(/[^\d^\.]+/g,"").replace(".","$#$").replace(/\./g,"").replace("$#$",".");this.state.tempdata[i].contract_price=a,this.setState({tempdata:this.state.tempdata})}rowItemClick(e,t){1===this.props.keyType?2==e.recharge_type?this.setState({draw_title:"\u7f16\u8f91\u7ec4\u5408\u5546\u54c1",rowIndex:t,rowExchangeData:e,drawerVisible:!0,exchangeType:2}):this.setState({draw_title:"\u7f16\u8f91\u5151\u6362\u7801",rowIndex:t,rowExchangeData:e,drawerVisible:!0,exchangeType:1}):this.setState({draw_title:"\u7f16\u8f91\u4f18\u60e0\u5238",rowIndex:t,rowCouponData:e,drawerVisible:!0})}initUpload(){this.setState({accessVerify:!1,excel_visible:!1,upload_visible:!1,file_loading:!1,fail_visible:!1,success_visible:!1,import_visible:!1})}isPositiveInteger(e){return/^[1-9]\d*$/.test(e)}importConfirmClick(){let e=this.state.exceldata.filter((e=>"success"==e.type)),t=Object(f.a)(e,(e=>e.mobile)),i=this.state.model;i.quantity=this.state.excel_count-this.state.error_count+t.length,this.setState({import_success:!0,model:i,accessVerify:!1,excel_visible:!1,import_visible:!1,mobile_repeat:t})}importClick(){this.state.file_loading?c.a.error("\u6587\u4ef6\u6b63\u5728\u89e3\u6790\u4e2d\u8bf7\u7a0d\u7b49"):this.state.success_visible?this.setState({excel_visible:!0,accessVerify:!1,import_visible:!1}):c.a.error("\u8bf7\u4e0a\u4f20\u6b63\u786e\u7684\u6587\u4ef6")}fileChange(e){let t=e.target.files[0];if(this.setState({upload_visible:!0,myfile:t}),t.name.indexOf(".xls")||t.name.indexOf(".xlsx")||t.name.indexOf(".csv")){if(t.size>1024e3)return void c.a.error("\u6587\u4ef6\u5927\u5c0f\u4e0d\u80fd\u5927\u4e8e2M");let e=new FormData;e.append("file",t),e.append("path","white_list_excel"),this.setState({file_loading:!0}),Object(a.cd)(e).then((e=>{Object(a.Tb)(e,((e,t)=>{let i={excel:e.path};(sessionStorage.getItem("plan_id")||sessionStorage.getItem("plan_id_copy"))&&(i.plan_id=sessionStorage.getItem("plan_id")||sessionStorage.getItem("plan_id_copy")),1===this.props.isSettlement&&(i.plan_creat=!0),this.setState({mobile_excel:e.path}),Object(a.L)(i).then((e=>{this.setState({file_loading:!1}),Object(a.Tb)(e,((e,t)=>{let i=e.count-e.errorCount;this.setState({excel_count:e.count,accessVerify:!0,error_count:e.errorCount,success_count:i,exceldata:e.validationFailed,success_visible:!0});let a=sessionStorage.getItem("phone_number_all")?JSON.parse(sessionStorage.getItem("phone_number_all")):[],s=a.find((e=>e.key===this.props.step_id));s?s.phone_number=e.phone_number:a.push({key:this.props.step_id,phone_number:e.phone_number}),sessionStorage.setItem("phone_number_all",JSON.stringify(a))}),(e=>{c.a.error(e),this.setState({success_visible:!1})}))}))}),(e=>{c.a.error(e),this.setState({success_visible:!1})}))}))}else this.setState({success_visible:!1})}resetUpload(){this.setState({import_visible:!0,excel_visible:!1,accessVerify:!0})}switchChange(e,t){t.type=e?"success":"success"==t.type?"repeat":"error"}downLoadTemplate(){window.location.href="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/%E7%99%BD%E5%90%8D%E5%8D%95%E6%A8%A1%E6%9D%BF.xlsx"}productEditShow(e){if(this.props.direct_reseller_id>0)if(this.setState({tableLoading:!0}),2===e.type){let t=e.origin;this.state.isCopy&&delete t.id,this.setState({product_title:"\u7f16\u8f91\u7acb\u51cf\u91d1",productData:t,addIsType:"addKnockGold"}),setTimeout((()=>{this.setState({drawerVisible2:!0,tableLoading:!1})}),300)}else if(3===e.type){let t=e.origin;this.state.isCopy&&delete t.id,this.setState({product_title:"\u7f16\u8f91\u7ea2\u5305",productData:t,addIsType:"redPackets"}),setTimeout((()=>{this.setState({tableLoading:!1,drawerVisible2:!0})}),300)}else this.getProductInfoSelectData(this.props.direct_reseller_id).then((t=>{sessionStorage.setItem("productsList",JSON.stringify(t)),"2"===sessionStorage.getItem("KeyPcType")&&delete e.code_batch_id,this.setState({product_title:"\u7f16\u8f91\u5546\u54c1",productData:e,addIsType:"addProduct"}),setTimeout((()=>{this.setState({drawerVisible2:!0,tableLoading:!1})}),300)}));else c.a.error("\u8bf7\u6dfb\u52a0\u6620\u5c04\u5206\u9500\u5546")}dynamicComponents(){return 1===this.props.keyType?1===this.state.exchangeType?Object(h.jsxDEV)(ms,{ref:"addEditExchangeEl",editData:this.state.rowExchangeData,direct_reseller_id:this.props.direct_reseller_id,isSettlement:this.props.isSettlement,settlementData:this.props.settlementData},void 0,!1,{fileName:Ns,lineNumber:1141,columnNumber:11},this):Object(h.jsxDEV)(ps,{propsData:this.state.rowExchangeData,ref:"addEditExchangeEl"},void 0,!1,{fileName:Ns,lineNumber:1150,columnNumber:16},this):Object(h.jsxDEV)(wt,{couponType:1,editData:this.state.rowCouponData,isAuditButton:!1,ref:"addEditCouponEl",direct_reseller_id:this.props.direct_reseller_id},void 0,!1,{fileName:Ns,lineNumber:1154,columnNumber:9},this)}render(){const e=e=>{var t;let i=e.legal.map((e=>e.product_name)),a=e.reduce.map((e=>e.batch_goods_name)),s=null===(t=e.cash)||void 0===t?void 0:t.map((e=>e.batch_goods_name)),l=i.concat(a,s);return l=l.join(","),Object(h.jsxDEV)("span",{children:l},void 0,!1,{fileName:Ns,lineNumber:1199,columnNumber:14},this)};return Object(h.jsxDEV)("div",{id:"step2",children:[Object(h.jsxDEV)(l.a,{model:this.state.model,rules:{bind_object:[{type:"required",message:"\u8bf7\u9009\u62e9\u7ed1\u5b9a\u7c7b\u578b"}],batch_name:[{type:"required",message:"\u8bf7\u8f93\u5165key\u6279\u6b21\u540d\u79f0"}],key_official_price:[{type:"required",message:"\u8bf7\u8f93\u5165\u5b98\u65b9\u4ef7"},{type:"regExp",message:"\u6700\u591a\u4fdd\u75594\u4f4d\u5c0f\u6570",reg:"^[0-9]+(.[0-9]{1,4})?$"}],key_cost_price:[{type:"required",message:"\u8bf7\u8f93\u5165\u6210\u672c\u4ef7"},{type:"regExp",message:"\u6700\u591a\u4fdd\u75594\u4f4d\u5c0f\u6570",reg:"^[0-9]+(.[0-9]{1,4})?$"}]},ref:"form1",children:[Object(h.jsxDEV)(s.a,{labelname:" key\u6837\u5f0f",prop:"style",id:"style",children:Object(h.jsxDEV)(Q.a,{onChange:e=>{this.onStyleChange(e)},value:this.state.model.style,children:[Object(h.jsxDEV)(ne.a,{value:1,disabled:this.props.name>0&&6==this.state.model.style,children:"\u4e32\u7801"},void 0,!1,{fileName:Ns,lineNumber:1212,columnNumber:15},this),Object(h.jsxDEV)(ne.a,{value:2,disabled:this.props.name>0&&6==this.state.model.style||1===this.props.isSettlement&&this.props.settlementData&&2===this.props.settlementData.key,children:"\u94fe\u63a5"},void 0,!1,{fileName:Ns,lineNumber:1216,columnNumber:15},this),Object(h.jsxDEV)(ne.a,{value:4,disabled:this.props.name>0&&6==this.state.model.style||1===this.props.isSettlement&&this.props.settlementData&&2===this.props.settlementData.key,children:"\u4e8c\u7ef4\u7801"},void 0,!1,{fileName:Ns,lineNumber:1228,columnNumber:15},this),Object(h.jsxDEV)(ne.a,{value:6,disabled:this.props.name>0&&6!=this.state.model.style,children:"\u767d\u540d\u5355"},void 0,!1,{fileName:Ns,lineNumber:1240,columnNumber:15},this)]},void 0,!0,{fileName:Ns,lineNumber:1206,columnNumber:13},this)},void 0,!1,{fileName:Ns,lineNumber:1205,columnNumber:11},this),this.state.isload&&1===this.props.isSettlement?Object(h.jsxDEV)(s.a,{labelname:"\u6210\u672c\u4ef7",prop:"key_cost_price",id:"key_cost_price",children:Object(h.jsxDEV)(n.a,{onChange:e=>{let t=this.state.model;t.key_cost_price=e,this.setState({model:t})},onClearItem:e=>{let t=this.state.model;t.key_cost_price="",this.setState({model:t})},value:this.state.model.key_cost_price,placeholder:"\u8bf7\u8f93\u5165",labelWidth:"0px",maxLength:12,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:Ns,lineNumber:1248,columnNumber:15},this)},void 0,!1,{fileName:Ns,lineNumber:1247,columnNumber:13},this):null,this.state.isload&&1===this.props.isSettlement?Object(h.jsxDEV)(s.a,{labelname:"\u5b98\u65b9\u4ef7",prop:"key_official_price",id:"key_official_price",children:Object(h.jsxDEV)(n.a,{onChange:e=>{let t=this.state.model;t.key_official_price=e,this.setState({model:t})},onClearItem:e=>{let t=this.state.model;t.key_official_price="",this.setState({model:t})},value:this.state.model.key_official_price,placeholder:"\u8bf7\u8f93\u5165",labelWidth:"0px",maxLength:12,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:Ns,lineNumber:1272,columnNumber:15},this)},void 0,!1,{fileName:Ns,lineNumber:1271,columnNumber:13},this):null,this.state.isload?Object(h.jsxDEV)(s.a,{labelname:"key\u6279\u6b21\u540d\u79f0",prop:"batch_name",id:"batch_name",children:Object(h.jsxDEV)(n.a,{onChange:e=>{let t=this.state.model;t.batch_name=e,this.setState({model:t})},onClearItem:e=>{let t=this.state.model;t.batch_name="",this.setState({model:t})},value:this.state.model.batch_name,placeholder:"\u8bf7\u8f93\u5165",labelWidth:"0px",maxLength:12,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:Ns,lineNumber:1296,columnNumber:15},this)},void 0,!1,{fileName:Ns,lineNumber:1295,columnNumber:13},this):null,this.state.isload?Object(h.jsxDEV)(s.a,{labelname:"key\u6570\u91cf",prop:"quantity",id:"quantity",children:Object(h.jsxDEV)("div",{className:"key_number",children:[Object(h.jsxDEV)(n.a,{onChange:e=>{let t=this.state.model;t.quantity=e,this.setState({model:t})},onClearItem:e=>{let t=this.state.model;t.quantity="",this.setState({model:t})},value:this.state.model.quantity,disabled:6==this.state.model.style,placeholder:"\u8bf7\u8f93\u5165",labelWidth:"0px",maxLength:5,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:Ns,lineNumber:1321,columnNumber:17},this),this.state.white_visible?Object(h.jsxDEV)(u.a,{type:"primary",onClick:e=>{this.initUpload(),this.setState({import_visible:!0})},children:"\u5bfc\u5165\u767d\u540d\u5355"},void 0,!1,{fileName:Ns,lineNumber:1343,columnNumber:19},this):null]},void 0,!0,{fileName:Ns,lineNumber:1320,columnNumber:15},this)},void 0,!1,{fileName:Ns,lineNumber:1319,columnNumber:13},this):null,Object(h.jsxDEV)(s.a,{labelname:"key\u7801\u6709\u6548\u671f",prop:"expiration_type",id:"expiration_type",children:Object(h.jsxDEV)(Z.a.Group,{value:this.state.model.expiration_type,onChange:e=>{let t=this.state.model;t.expiration_value="",t.expiration_type=e.target.value,this.setState({model:t})},children:[Object(h.jsxDEV)(Z.a,{value:"1",children:"\u4e0d\u8bbe\u7f6e"},void 0,!1,{fileName:Ns,lineNumber:1367,columnNumber:15},this),Object(h.jsxDEV)(Z.a,{value:"2",children:"\u56fa\u5b9a\u65f6\u95f4\u6bb5"},void 0,!1,{fileName:Ns,lineNumber:1368,columnNumber:15},this),Object(h.jsxDEV)(Z.a,{value:"3",children:"\u63a5\u53e3\u8c03\u53d6\u540e\u6709\u6548\u671f"},void 0,!1,{fileName:Ns,lineNumber:1369,columnNumber:15},this)]},void 0,!0,{fileName:Ns,lineNumber:1358,columnNumber:13},this)},void 0,!1,{fileName:Ns,lineNumber:1357,columnNumber:11},this),"2"===this.state.model.expiration_type?Object(h.jsxDEV)(s.a,{labelname:"\u56fa\u5b9a\u65f6\u95f4\u6bb5",children:Object(h.jsxDEV)(ee.a,{className:"zent-datepicker-plan",showTime:{format:"HH:mm:ss",defaultTime:[Y()().format("HH:mm:ss"),"23:59:59"]},format:"YYYY-MM-DD HH:mm:ss",value:this.state.model.expiration_value,onChange:e=>{let t=this.state.model;t.expiration_value=e,this.setState({model:t})},disabledDate:this.onDisabledRange},void 0,!1,{fileName:Ns,lineNumber:1375,columnNumber:15},this)},void 0,!1,{fileName:Ns,lineNumber:1374,columnNumber:13},this):null,"3"===this.state.model.expiration_type?Object(h.jsxDEV)(s.a,{labelname:"\u63a5\u53e3\u8c03\u53d6\u540e\u6709\u6548\u671f",children:Object(h.jsxDEV)(Di.a,{placeholder:"\u8bf7\u8f93\u5165\u5929\u6570",value:this.state.model.expiration_value,width:120,maxLength:5,onChange:e=>{let t=sessionStorage.getItem("knockGold_effectDate");if(t){t=JSON.parse(t);let i=new Date(t.begin_time),a=new Date(t.end_time).getTime()-i.getTime(),s=Math.ceil(a/864e5);if(!(s>=Number(e.target.value)))return void c.a.error(`key\u7801\u6709\u6548\u671f\u4e0d\u80fd\u8d85\u8fc7\u8ba1\u5212\u6709\u6548\u671f(${s}\u5929)`);{let t=this.state.model;t.expiration_value=e.target.value,this.setState({model:t})}}}},void 0,!1,{fileName:Ns,lineNumber:1395,columnNumber:15},this)},void 0,!1,{fileName:Ns,lineNumber:1394,columnNumber:13},this):null,Object(h.jsxDEV)(s.a,{labelname:"\u7ed1\u5b9a\u7c7b\u578b",prop:"bind_object",id:"bind_object",children:Object(h.jsxDEV)(Z.a.Group,{value:this.props.keyType,onChange:e=>{this.onCheckChange(e)},children:[Object(h.jsxDEV)(Z.a,{value:1,disabled:0!==this.props.name,children:"\u5151\u6362\u7801"},void 0,!1,{fileName:Ns,lineNumber:1437,columnNumber:15},this),Object(h.jsxDEV)(Z.a,{value:2,disabled:0!==this.props.name||1===this.props.isSettlement,children:"\u4f18\u60e0\u5238"},void 0,!1,{fileName:Ns,lineNumber:1440,columnNumber:15},this)]},void 0,!0,{fileName:Ns,lineNumber:1431,columnNumber:13},this)},void 0,!1,{fileName:Ns,lineNumber:1430,columnNumber:11},this),Object(h.jsxDEV)(s.a,{labelname:"",prop:"btn",required:!1,children:1===this.props.keyType?Object(h.jsxDEV)(h.Fragment,{children:[Object(h.jsxDEV)(u.a,{disabled:1===this.props.isSettlement&&this.state.distdata.length>=1,onClick:e=>{1===this.props.isSettlement&&this.state.distdata.length>=1?c.a.error("\u53ea\u80fd\u521b\u5efa\u4e00\u4e2a\u5151\u6362\u7801"):this.planAddExchangeCoupon(0)},children:"\u65b0\u5efa\u5151\u6362\u7801"},void 0,!1,{fileName:Ns,lineNumber:1449,columnNumber:17},this),Object(h.jsxDEV)(Ei.a,{trigger:"hover",content:"\u4e00\u6b21\u6027\u5145\u503c\u591a\u5f20\u7acb\u51cf\u91d1",children:Object(h.jsxDEV)(u.a,{disabled:1===this.props.isSettlement&&this.state.distdata.length>=1||1===this.props.isSettlement&&this.props.settlementData&&7===this.props.settlementData.key,onClick:e=>{1===this.props.isSettlement&&this.state.distdata.length>=1?c.a.error("\u53ea\u80fd\u521b\u5efa\u4e00\u4e2a\u5151\u6362\u7801"):this.planAddExchangeCoupon(2)},children:"\u65b0\u5efa\u7ec4\u5408\u5546\u54c1"},void 0,!1,{fileName:Ns,lineNumber:1465,columnNumber:19},this)},void 0,!1,{fileName:Ns,lineNumber:1464,columnNumber:17},this)]},void 0,!0):Object(h.jsxDEV)(u.a,{onClick:e=>{this.planAddExchangeCoupon(1)},children:"\u65b0\u5efa\u4f18\u60e0\u5238"},void 0,!1,{fileName:Ns,lineNumber:1489,columnNumber:15},this)},void 0,!1,{fileName:Ns,lineNumber:1446,columnNumber:11},this),Object(h.jsxDEV)(s.a,{labelname:"\u7ed1\u5b9a\u5bf9\u8c61",prop:"grid",children:Object(h.jsxDEV)(I,{headBackgroud:"#f9fafc",isShowPageBar:!1,spliteColor:"#fff",tableData:1===this.props.keyType?this.state.distdata:this.state.couponData,Column:1===this.props.keyType?this.state.Column:this.state.Column_coupon,ref:"tempdata",countbarVisible:!1,isBorder:!0,isSwitch:!1,pageChange:e=>{this.pageChange(e)},checkChange:e=>{},ComponentHandler:(t,i,a)=>"restrict"==t?Object(h.jsxDEV)(Di.a,{placeholder:"\u8bf7\u8f93\u5165\u6570\u91cf",width:120,maxLength:5,disabled:2==i.recharge_type||1===this.props.isSettlement,value:1===this.props.isSettlement?1:i.restrict,onChange:e=>{this.onRestrict(e,i,a)}},void 0,!1,{fileName:Ns,lineNumber:1517,columnNumber:21},this):"product"===t?e(i.product):"edit"==t?Object(h.jsxDEV)("span",{onClick:e=>{this.rowItemClick(i,a)},style:{color:"#2B66F2"},children:"\u7f16\u8f91"},void 0,!1,{fileName:Ns,lineNumber:1535,columnNumber:21},this):void 0},void 0,!1,{fileName:Ns,lineNumber:1500,columnNumber:13},this)},void 0,!1,{fileName:Ns,lineNumber:1499,columnNumber:11},this),Object(h.jsxDEV)(s.a,{labelname:"\u91cd\u590d\u9009\u62e9\u5546\u54c1",id:"allow_repetition",prop:"allow_repetition",children:Object(h.jsxDEV)(Q.a,{onChange:e=>this.onRepetitionChange(e),value:this.state.model.allow_repetition,children:[Object(h.jsxDEV)(ne.a,{value:1,children:"\u662f"},void 0,!1,{fileName:Ns,lineNumber:1553,columnNumber:15},this),Object(h.jsxDEV)(ne.a,{value:0,children:"\u5426"},void 0,!1,{fileName:Ns,lineNumber:1554,columnNumber:15},this)]},void 0,!0,{fileName:Ns,lineNumber:1549,columnNumber:13},this)},void 0,!1,{fileName:Ns,lineNumber:1548,columnNumber:11},this),Object(h.jsxDEV)(s.a,{labelname:"\u662f\u5426\u5141\u8bb8\u4e8f\u635f",id:"allow_loss",prop:"allow_loss",children:Object(h.jsxDEV)(Q.a,{onChange:e=>this.onLossChange(e),value:this.state.model.allow_loss,children:[Object(h.jsxDEV)(ne.a,{value:1,children:"\u662f"},void 0,!1,{fileName:Ns,lineNumber:1560,columnNumber:15},this),Object(h.jsxDEV)(ne.a,{value:0,children:"\u5426"},void 0,!1,{fileName:Ns,lineNumber:1561,columnNumber:15},this)]},void 0,!0,{fileName:Ns,lineNumber:1559,columnNumber:13},this)},void 0,!1,{fileName:Ns,lineNumber:1558,columnNumber:11},this)]},void 0,!0,{fileName:Ns,lineNumber:1204,columnNumber:9},this),Object(h.jsxDEV)("div",{className:"btnadd-key",onClick:()=>{this.addNewKey()},children:"\u6dfb\u52a0\u65b0\u7684\u6279\u6b21key"},void 0,!1,{fileName:Ns,lineNumber:1565,columnNumber:9},this),Object(h.jsxDEV)(bt.a,{width:"90%",title:this.state.draw_title,footer:Object(h.jsxDEV)("div",{style:{textAlign:"center"},children:[Object(h.jsxDEV)(u.a,{type:"primary",onClick:e=>{this.codeSubmit(e)},children:"\u63d0\u4ea4"},void 0,!1,{fileName:Ns,lineNumber:1579,columnNumber:15},this),Object(h.jsxDEV)(u.a,{onClick:e=>{this.closeDraw()},children:"\u53d6\u6d88"},void 0,!1,{fileName:Ns,lineNumber:1587,columnNumber:15},this)]},void 0,!0,{fileName:Ns,lineNumber:1578,columnNumber:13},this),visible:this.state.drawerVisible,onClose:e=>{this.closeDraw()},maskClosable:!1,children:this.dynamicComponents()},void 0,!1,{fileName:Ns,lineNumber:1574,columnNumber:9},this),this.state.import_visible?Object(h.jsxDEV)("div",{children:[Object(h.jsxDEV)("div",{className:"modal"},void 0,!1,{fileName:Ns,lineNumber:1607,columnNumber:13},this),Object(h.jsxDEV)("div",{className:"import-excel",children:[Object(h.jsxDEV)("div",{className:"import-header",children:[Object(h.jsxDEV)("div",{className:"import-title",children:"\u4eceExcel\u5bfc\u5165\u767d\u540d\u5355"},void 0,!1,{fileName:Ns,lineNumber:1610,columnNumber:17},this),Object(h.jsxDEV)(g.a,{type:"close",className:"import-close",onClick:e=>{this.setState({import_visible:!1})}},void 0,!1,{fileName:Ns,lineNumber:1612,columnNumber:17},this)]},void 0,!0,{fileName:Ns,lineNumber:1609,columnNumber:15},this),Object(h.jsxDEV)("div",{className:"step-bar",children:[Object(h.jsxDEV)("div",{className:"step-group",children:[Object(h.jsxDEV)("div",{className:"step-code active",children:"1"},void 0,!1,{fileName:Ns,lineNumber:1622,columnNumber:19},this),Object(h.jsxDEV)("span",{className:"step-label active",children:"\u4e0a\u4f20\u6587\u4ef6"},void 0,!1,{fileName:Ns,lineNumber:1623,columnNumber:19},this)]},void 0,!0,{fileName:Ns,lineNumber:1621,columnNumber:17},this),Object(h.jsxDEV)("div",{className:"step-center",children:Object(h.jsxDEV)("div",{className:"step-line"},void 0,!1,{fileName:Ns,lineNumber:1626,columnNumber:19},this)},void 0,!1,{fileName:Ns,lineNumber:1625,columnNumber:17},this),Object(h.jsxDEV)("div",{className:"step-group",children:[Object(h.jsxDEV)("div",{className:"step-code",children:"2"},void 0,!1,{fileName:Ns,lineNumber:1629,columnNumber:19},this),Object(h.jsxDEV)("span",{className:"step-label",children:"\u5bfc\u5165\u5b8c\u6210"},void 0,!1,{fileName:Ns,lineNumber:1630,columnNumber:19},this)]},void 0,!0,{fileName:Ns,lineNumber:1628,columnNumber:17},this)]},void 0,!0,{fileName:Ns,lineNumber:1620,columnNumber:15},this),Object(h.jsxDEV)("div",{className:"upload-panel1",children:[Object(h.jsxDEV)("div",{className:"upload-label",children:"\u76f4\u63a5\u4e0a\u4f20"},void 0,!1,{fileName:Ns,lineNumber:1635,columnNumber:17},this),Object(h.jsxDEV)("div",{className:"upload-info",children:[Object(h.jsxDEV)("div",{children:"\u652f\u6301\u6587\u4ef6\u7c7b\u578b\uff1axls\uff0cxlsx\uff0ccsv"},void 0,!1,{fileName:Ns,lineNumber:1638,columnNumber:19},this),Object(h.jsxDEV)("div",{children:"- \u652f\u6301\u6240\u6709\u57fa\u7840\u5b57\u6bb5\u7684\u5bfc\u5165\uff0c\u4e00\u6b21\u81f3\u591a\u5bfc\u5165 10000 \u6761\u624b\u673a\u53f7\uff08\u4e0d\u7b26\u5408\u89c4\u5219\u6574\u6761\u4efb\u52a1\u4e0d\u4e88\u4ee5\u5bfc\u5165\uff09"},void 0,!1,{fileName:Ns,lineNumber:1639,columnNumber:19},this)]},void 0,!0,{fileName:Ns,lineNumber:1637,columnNumber:17},this)]},void 0,!0,{fileName:Ns,lineNumber:1634,columnNumber:15},this),this.state.upload_visible?Object(h.jsxDEV)("div",{children:[Object(h.jsxDEV)("div",{className:"upload-msgbar",children:[Object(h.jsxDEV)("div",{className:"execel-name",children:[Object(h.jsxDEV)(g.a,{type:"text-guide-o",className:"doc-flag"},void 0,!1,{fileName:Ns,lineNumber:1649,columnNumber:23},this),Object(h.jsxDEV)("span",{className:"excel-txt",children:this.state.myfile.name},void 0,!1,{fileName:Ns,lineNumber:1650,columnNumber:23},this)]},void 0,!0,{fileName:Ns,lineNumber:1648,columnNumber:21},this),this.state.file_loading?Object(h.jsxDEV)("div",{className:"file-tag",children:[Object(h.jsxDEV)(g.a,{type:"loading",spin:!0,className:"file-loading"},void 0,!1,{fileName:Ns,lineNumber:1655,columnNumber:25},this),Object(h.jsxDEV)("span",{className:"excel-txt",children:"\u89e3\u6790\u4e2d "},void 0,!1,{fileName:Ns,lineNumber:1656,columnNumber:25},this)]},void 0,!0,{fileName:Ns,lineNumber:1654,columnNumber:23},this):Object(h.jsxDEV)("div",{className:"file-tag",children:[Object(h.jsxDEV)("input",{type:"file",className:"upload-input",onChange:e=>this.fileChange(e)},void 0,!1,{fileName:Ns,lineNumber:1660,columnNumber:25},this),Object(h.jsxDEV)(g.a,{type:"up-circle-o",className:"upload-flag"},void 0,!1,{fileName:Ns,lineNumber:1665,columnNumber:25},this),Object(h.jsxDEV)("span",{className:"excel-txt",children:"\u66f4\u65b0\u6587\u4ef6 "},void 0,!1,{fileName:Ns,lineNumber:1666,columnNumber:25},this)]},void 0,!0,{fileName:Ns,lineNumber:1659,columnNumber:23},this)]},void 0,!0,{fileName:Ns,lineNumber:1647,columnNumber:19},this),this.state.success_visible?Object(h.jsxDEV)("div",{className:"file-tip success",children:[Object(h.jsxDEV)(g.a,{type:"check-circle",className:"success-icon"},void 0,!1,{fileName:Ns,lineNumber:1672,columnNumber:23},this),"\u6587\u4ef6\u89e3\u6790\u6210\u529f,\u70b9\u51fb\u786e\u5b9a\u5bfc\u5165 \u5373\u53ef\u5bfc\u5165"]},void 0,!0,{fileName:Ns,lineNumber:1671,columnNumber:21},this):null,this.state.fail_visible?Object(h.jsxDEV)("div",{className:"file-tip error",children:[Object(h.jsxDEV)(g.a,{type:"error-circle",className:"error-icon"},void 0,!1,{fileName:Ns,lineNumber:1678,columnNumber:23},this),"\u6587\u4ef6\u89e3\u6790\u5931\u8d25,\u8bf7\u67e5\u770b\u5bfc\u5165\u89c4\u5219\u5e76\u66f4\u65b0\u6587\u4ef6"]},void 0,!0,{fileName:Ns,lineNumber:1677,columnNumber:21},this):null]},void 0,!0,{fileName:Ns,lineNumber:1646,columnNumber:17},this):Object(h.jsxDEV)("div",{children:[Object(h.jsxDEV)("input",{type:"file",className:"upload-input",onChange:e=>this.fileChange(e)},void 0,!1,{fileName:Ns,lineNumber:1685,columnNumber:19},this),Object(h.jsxDEV)(u.a,{className:"btn-upload",style:{background:"#1890ff",color:"#FFFFFF",border:"none"},children:"\u4e0a\u4f20\u6587\u4ef6"},void 0,!1,{fileName:Ns,lineNumber:1690,columnNumber:19},this)," "]},void 0,!0,{fileName:Ns,lineNumber:1684,columnNumber:17},this),Object(h.jsxDEV)("div",{className:"upload-panel1",children:[Object(h.jsxDEV)("div",{className:"upload-label",children:"\u4e0b\u8f7d\u6a21\u677f\u5e76\u586b\u5199\u540e\u4e0a\u4f20"},void 0,!1,{fileName:Ns,lineNumber:1704,columnNumber:17},this),Object(h.jsxDEV)("div",{className:"upload-info",children:Object(h.jsxDEV)("div",{children:"\u8bf7\u5148\u4e0b\u8f7d\u300c\u6570\u5b57\u4e16\u754c\u8425\u9500\u7ba1\u7406\u7cfb\u7edf_\u767d\u540d\u5355_\u6a21\u677f\u300d\u5e76\u6309\u7167\u6a21\u677f\u586b\u5199\u540e\u518d\u4e0a\u4f20\u3002"},void 0,!1,{fileName:Ns,lineNumber:1707,columnNumber:19},this)},void 0,!1,{fileName:Ns,lineNumber:1706,columnNumber:17},this)]},void 0,!0,{fileName:Ns,lineNumber:1703,columnNumber:15},this),Object(h.jsxDEV)(u.a,{type:"default",className:"btn-download",onClick:e=>{this.downLoadTemplate(e)},children:"\u4e0b\u8f7d\u6a21\u677f"},void 0,!1,{fileName:Ns,lineNumber:1710,columnNumber:15},this),Object(h.jsxDEV)("div",{className:"foot-bar",children:Object(h.jsxDEV)("div",{className:"btn-group",children:[Object(h.jsxDEV)(u.a,{type:"default",onClick:e=>{this.setState({import_visible:!1})},children:"\u53d6\u6d88"},void 0,!1,{fileName:Ns,lineNumber:1721,columnNumber:19},this),Object(h.jsxDEV)(u.a,{type:"primary",onClick:e=>{this.importClick(e)},style:{background:"#1890ff",color:"#FFFFFF",border:"none"},children:"\u786e\u5b9a\u5bfc\u5165"},void 0,!1,{fileName:Ns,lineNumber:1729,columnNumber:19},this)]},void 0,!0,{fileName:Ns,lineNumber:1720,columnNumber:17},this)},void 0,!1,{fileName:Ns,lineNumber:1719,columnNumber:15},this)]},void 0,!0,{fileName:Ns,lineNumber:1608,columnNumber:13},this)]},void 0,!0,{fileName:Ns,lineNumber:1606,columnNumber:11},this):null,this.state.excel_visible?Object(h.jsxDEV)("div",{children:[Object(h.jsxDEV)("div",{className:"modal"},void 0,!1,{fileName:Ns,lineNumber:1750,columnNumber:13},this),Object(h.jsxDEV)("div",{className:"import-excel",children:[Object(h.jsxDEV)("div",{className:"import-header",children:[Object(h.jsxDEV)("div",{className:"import-title",children:"\u4eceExcel\u5bfc\u5165\u767d\u540d\u5355"},void 0,!1,{fileName:Ns,lineNumber:1753,columnNumber:17},this),Object(h.jsxDEV)(g.a,{type:"close",className:"import-close",onClick:e=>{this.setState({excel_visible:!1})}},void 0,!1,{fileName:Ns,lineNumber:1754,columnNumber:17},this)]},void 0,!0,{fileName:Ns,lineNumber:1752,columnNumber:15},this),Object(h.jsxDEV)("div",{className:"file-upload-tip",children:["\u6587\u4ef6\u4e0a\u4f20\u6210\u529f.\u5171",this.state.excel_count,"\u6761\u624b\u673a\u53f7,\u5176\u4e2d",this.state.success_count,"\u6761\u53ef\u6210\u529f\u5bfc\u5165"]},void 0,!0,{fileName:Ns,lineNumber:1762,columnNumber:15},this),Object(h.jsxDEV)("div",{className:"file-errmsg",children:["\u53d1\u73b0\u4ee5\u4e0b",this.state.error_count,"\u6761\u4e0d\u7b26\u5408\u8981\u6c42,\u5c06\u4e0d\u4f1a\u88ab\u5bfc\u5165"]},void 0,!0,{fileName:Ns,lineNumber:1766,columnNumber:15},this),Object(h.jsxDEV)("div",{},void 0,!1,{fileName:Ns,lineNumber:1770,columnNumber:15},this),Object(h.jsxDEV)("div",{className:"gridpanel",children:Object(h.jsxDEV)(I,{headBackgroud:"#f9fafc",isShowPageBar:!1,spliteColor:"#fff",tableData:this.state.exceldata,value:this.state.exceldata,Column:vs,maxheight:200,isMultiple:!1,countbarVisible:!1,isBorder:!0,isSwitch:!1,pageChange:e=>{this.pageChange(e)},ComponentHandler:(e,t,i)=>{if("is_import"==e){if("success"==t.type||"repeat"==t.type){let e="success"==t.type;return Object(h.jsxDEV)(v.a,{checked:e,onChange:e=>{this.switchChange(e,t)}},void 0,!1,{fileName:Ns,lineNumber:1793,columnNumber:27},this)}return Object(h.jsxDEV)("div",{className:"isImport",children:"-"},void 0,!1,{fileName:Ns,lineNumber:1801,columnNumber:32},this)}}},void 0,!1,{fileName:Ns,lineNumber:1773,columnNumber:17},this)},void 0,!1,{fileName:Ns,lineNumber:1772,columnNumber:15},this),Object(h.jsxDEV)("div",{className:"foot-bar",children:Object(h.jsxDEV)("div",{className:"btn-group",children:[Object(h.jsxDEV)(u.a,{type:"default",onClick:e=>{this.resetUpload()},children:"\u91cd\u65b0\u4e0a\u4f20"},void 0,!1,{fileName:Ns,lineNumber:1809,columnNumber:19},this),Object(h.jsxDEV)(u.a,{type:"primary",onClick:e=>{this.importConfirmClick(e)},style:{background:"#1890ff",color:"#FFFFFF",border:"none"},children:"\u786e\u5b9a\u5bfc\u5165"},void 0,!1,{fileName:Ns,lineNumber:1817,columnNumber:19},this)]},void 0,!0,{fileName:Ns,lineNumber:1808,columnNumber:17},this)},void 0,!1,{fileName:Ns,lineNumber:1807,columnNumber:15},this)]},void 0,!0,{fileName:Ns,lineNumber:1751,columnNumber:13},this)]},void 0,!0,{fileName:Ns,lineNumber:1749,columnNumber:11},this):null]},void 0,!0,{fileName:Ns,lineNumber:1203,columnNumber:7},this)}}var fs="/Users/zhangds/web/blue-brother/frontend/src/pages/plan/add/step3.js";class _s extends m.a.Component{constructor(e){super(e),this.state={model:{theme_id:"",use:1,link:1},select_theme:null,keyType:sessionStorage.getItem("keyType")}}componentDidMount(e){this.getThemeData()}getThemeData(){let e={},t=sessionStorage.getItem("white"),i=sessionStorage.getItem("keyType");if(this.setState({keyType:i}),"2"===i){let i=this.state.model;i.link=1,this.setState({model:i}),e.page="1"===t?8:4}else e.page="1"===t?1:3;Object(a.Fb)(e).then((e=>{Object(a.Tb)(e,((e,t)=>{let i=Object(f.a)(e,(e=>{let t={};return t.key=e.id,t.text=e.title,t})),a=this.state.model;if(a.theme_id="",this.setState({model:a,options:i}),this.props.data&&this.props.data.theme_id){let e=this.state.options.find((e=>e.key==this.props.data.theme_id)),t=this.state.model;t.theme_id=e,this.setState({model:t,theme_id:this.props.data.theme_id})}}),(e=>{}))}))}submit(){let e=!1;return this.refs.form1.validator()&&(e={},e.theme_id=this.state.model.theme_id.key,e.use=this.state.model.use,e.link=this.state.model.link),e}onCancel(){this.refs.form1.cancel()}onLinkChange(e){let t=this.state.model;t.link=e.target.value,this.setState({model:t})}onListChange(e){let t=this.state.model;t.list=e.target.value,this.setState({model:t})}onUserChange(e){let t=this.state.model;t.link=e.target.value,this.setState({model:t})}onThemeChange(e){let t=this.state.model;t.theme_id=e,this.setState({model:t})}linkToPage(){let e=window.location.href.replace(window.location.hash,"#/home/mytempMould");window.open(e,"_blank")}refresh(){this.getThemeData()}edit(e){let t={theme_id:192,use:e.use,link:e.link};this.setState({model:t})}render(){return Object(h.jsxDEV)("div",{id:"step3",children:Object(h.jsxDEV)(l.a,{model:this.state.model,rules:{theme_id:[{type:"required",message:"\u8bf7\u9009\u62e9\u843d\u5730\u9875"}]},ref:"form1",children:[Object(h.jsxDEV)(s.a,{labelname:"\u9009\u62e9\u843d\u5730\u9875",prop:"theme_id",id:"theme_id",children:[Object(h.jsxDEV)(X.a,{options:this.state.options,placeholder:"\u9009\u62e9\u4e00\u9879",width:355,value:this.state.model.theme_id,onChange:e=>{this.onThemeChange(e),$t.a.emit("change","theme_id",e)}},void 0,!1,{fileName:fs,lineNumber:147,columnNumber:13},this),Object(h.jsxDEV)("a",{type:"refresh",onClick:()=>{this.refresh()},className:"refresh-btn",children:"\u5237\u65b0"},void 0,!1,{fileName:fs,lineNumber:157,columnNumber:13},this),Object(h.jsxDEV)("a",{type:"primary",onClick:()=>{this.linkToPage()},className:"newpage",children:"\u65b0\u5efa\u843d\u5730\u9875"},void 0,!1,{fileName:fs,lineNumber:166,columnNumber:13},this)]},void 0,!0,{fileName:fs,lineNumber:146,columnNumber:11},this),Object(h.jsxDEV)(s.a,{labelname:"\u57df\u540d\u9009\u62e9",prop:"link",children:Object(h.jsxDEV)(Q.a,{onChange:e=>{this.onUserChange(e)},value:this.state.model.link,children:[Object(h.jsxDEV)(Ei.a,{trigger:"hover",content:"22233.cn ",children:Object(h.jsxDEV)(ne.a,{value:1,children:"\u5927\u5ba2\u6237"},void 0,!1,{fileName:fs,lineNumber:184,columnNumber:17},this)},void 0,!1,{fileName:fs,lineNumber:183,columnNumber:15},this),Object(h.jsxDEV)(Ei.a,{trigger:"hover",content:"83323.cn",children:Object(h.jsxDEV)(ne.a,{value:2,disabled:"2"===this.state.keyType,children:"\u666e\u901a\u5546\u6237"},void 0,!1,{fileName:fs,lineNumber:187,columnNumber:17},this)},void 0,!1,{fileName:fs,lineNumber:186,columnNumber:15},this),Object(h.jsxDEV)(Ei.a,{trigger:"hover",content:"86885.cn",children:Object(h.jsxDEV)(ne.a,{value:3,disabled:"2"===this.state.keyType,children:"\u5907\u7528"},void 0,!1,{fileName:fs,lineNumber:192,columnNumber:17},this)},void 0,!1,{fileName:fs,lineNumber:191,columnNumber:15},this)]},void 0,!0,{fileName:fs,lineNumber:177,columnNumber:13},this)},void 0,!1,{fileName:fs,lineNumber:176,columnNumber:11},this)]},void 0,!0,{fileName:fs,lineNumber:145,columnNumber:9},this)},void 0,!1,{fileName:fs,lineNumber:144,columnNumber:7},this)}}var xs="/Users/zhangds/web/blue-brother/frontend/src/pages/plan/add/add.js";class ys extends m.a.Component{constructor(e){super(e),this.setTlementType=e=>{this.setState({isSettlement:e}),this.setState({keys:["step2-0"]})},this.setTlementData=e=>{this.setState({settlementData:e})},this.phoneChange=e=>{this.setState({phone:e.target.value})},this.emailChange=e=>{this.setState({email:e.target.value})},this.getDirectResellerId=e=>{this.setState({direct_reseller_id:e.direct_reseller_id})},this.state={keys:["step2-0"],step1_pagetitle:"\u65b0\u5efa\u8ba1\u5212",step2_pagetitle:"\u751f\u6210key",step3_pagetitle:"\u7ed1\u5b9a\u843d\u5730\u9875",curstep:1,menuList:[{id:1,title:"\u8425\u9500\u8ba1\u5212",child:[{step:1,title:"\u65b0\u5efa\u8ba1\u5212"}]},{id:2,title:"key",child:[{step:1,title:"\u751f\u6210key"},{step:2,title:"\u7ed1\u5b9a\u5361\u5238"}]},{id:3,title:"\u843d\u5730\u9875",child:[{step:1,title:"\u7ed1\u5b9a\u843d\u5730\u9875"}]}],phone_list:[],email_list:[],phone:"",email:"",email_radio:-1,phone_radio:-1,audit_visible:!1,card_visible:!1,step1:null,paytype:3,reseller:"",payment_direction:["\u5bf9\u79c1\u8d26\u6237","\u5bf9\u516c\u8d26\u6237","\u9884\u4ed8\u6b3e\u6263\u9664"],isload:!1,is_audit:!1,whiteStyle:!1,keyStyle:1,direct_reseller_id:0,keyType:1,isSettlement:2,settlementData:null}}submit(){this.refs.step1.submit()}onReturn(){let e=this;G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:" \u662f\u5426\u8fd4\u56de\u8ba1\u5212\u5217\u8868?"},void 0,!1,{fileName:xs,lineNumber:63,columnNumber:16},this),onConfirm:()=>{e.props.history.push("/home/plan-list/")},onCancel:this.onCancel,className:"questModal",parentComponent:this})}componentDidMount(e){sessionStorage.setItem("white",3),sessionStorage.setItem("plan_id",""),sessionStorage.setItem("keyType","1")}onConfirm(e){let t=sessionStorage.getItem("plan_id");this.setState({audit_visible:!1,is_audit:!0});let i={reseller_id:this.state.reseller.id,reseller_name:this.state.reseller.name,company_name:this.state.reseller.company_name,receive_email:this.state.email_list[0],payment_direction:this.state.payment_direction[this.state.paytype-1]};Object(a.g)(t,i).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.success("\u6210\u529f\u53d1\u8d77\u5ba1\u6279"),this.props.history.push("/home/plan-list/"),this.setState({is_audit:!1})}),(e=>{c.a.error(e)}))}))}onPayTypeChange(e){this.setState({paytype:e.target.value})}async onNextStep(){if(this.state.curstep>=1){if(1!=await this.refs.step1.submit())return;this.setState({curstep:2,isload:!0})}if(this.state.curstep>=2){let e=[];for(let a=0;a{Object(a.Tb)(t,((t,i)=>{sessionStorage.setItem("step2",JSON.stringify(e)),this.setState({card_visible:!0,curstep:3})}),(e=>{c.a.error(e)}))}))}if(3==this.state.curstep){if(this.state.direct_reseller_id<=0)return void c.a.error("\u8bf7\u6dfb\u52a0\u6620\u5c04\u5206\u9500\u5546");let e=this.refs.step3.submit();if(!e)return;{let t={info:JSON.parse(sessionStorage.getItem("step1")),key:JSON.parse(sessionStorage.getItem("step2")),theme:e,complete:!0},i=sessionStorage.getItem("plan_id");Object(a.d)(i,t).then((e=>{Object(a.Tb)(e,((e,i)=>{let s=t.info.reseller_id;Object(a.vb)(s).then((e=>{Object(a.Tb)(e,((e,t)=>{this.setState({phone_list:e.contact_phone,reseller:e,email_list:e.contact_email,audit_visible:!0})}))}))}),(e=>{c.a.error(e)}))}))}}}addNewkey(){let e="step2-"+this.state.keys.length;this.state.keys.push(e),this.setState({isload:!0,keys:this.state.keys}),6==this.refs[this.state.keys[0]].state.model.style?this.setState({keyStyle:6,whiteStyle:!0}):this.setState({whiteStyle:!1,keyStyle:1})}onStyleChange(e){if(6==e.target.value){this.setState({keyStyle:6,whiteStyle:!0}),sessionStorage.setItem("white",1);for(let e=0;e0&&this.refs[this.state.keys[e]].setkeyStyle(6)}else{sessionStorage.setItem("white",3);for(let e=0;e0&&this.refs[this.state.keys[e]].setkeyStyle(1);this.setState({whiteStyle:!1})}}onPhoneChange(e){this.setState({phone_radio:e.target.value})}onEmailChange(e){this.setState({email_radio:e.target.value})}cancel(e){this.setState({audit_visible:!1})}closeStep(e){this.state.keys[e]="",this.setState({keys:this.state.keys})}getStep3Theme(){this.state.card_visible&&this.refs.step3.getThemeData()}send(e){let t=sessionStorage.getItem("plan_id"),i={phone:this.state.phone_radio>-1?this.state.phone_list[this.state.phone_radio]:this.state.phone,email:this.state.email_radio>-1?this.state.email_list[this.state.email_radio]:this.state.email};new RegExp("^[1][3,4,5,6,7,8,9][0-9]{9}$").test(i.phone)?Object(a.dc)(t,i).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.success("\u53d1\u9001\u6210\u529f,\u8bf7\u57281-2\u5206\u949f\u540e\u67e5\u770b"),this.props.history.push("/home/plan-list/")}),(e=>{c.a.error(e),this.props.history.push("/home/plan-list/")}))})):c.a.error("\u624b\u673a\u53f7\u683c\u5f0f\u4e0d\u6b63\u786e")}render(){return Object(h.jsxDEV)("div",{id:"plan-add",children:[Object(h.jsxDEV)("div",{className:"plan-left",children:this.state.menuList.map(((e,t)=>Object(h.jsxDEV)("div",{className:"box-item",children:[Object(h.jsxDEV)("div",{className:"main-title",children:e.title},void 0,!1,{fileName:xs,lineNumber:325,columnNumber:17},this),e.child.map(((t,i)=>Object(h.jsxDEV)("div",{className:"title-inline",children:[Object(h.jsxDEV)("div",{className:this.state.curstep>=e.id?"child-title active":"child-title",children:[t.title," "]},t.title,!0,{fileName:xs,lineNumber:329,columnNumber:23},this),this.state.curstep>=e.id?Object(h.jsxDEV)(g.a,{type:"check",className:"checkIcon"},void 0,!1,{fileName:xs,lineNumber:338,columnNumber:25},this):null]},i,!0,{fileName:xs,lineNumber:328,columnNumber:21},this))),Object(h.jsxDEV)("div",{className:"under-line"},void 0,!1,{fileName:xs,lineNumber:343,columnNumber:17},this)]},e.title,!0,{fileName:xs,lineNumber:324,columnNumber:15},this)))},void 0,!1,{fileName:xs,lineNumber:321,columnNumber:9},this),Object(h.jsxDEV)("div",{className:"plan-right",children:Object(h.jsxDEV)("div",{className:"action-panel",children:[Object(h.jsxDEV)("div",{id:"step1",className:"step1",children:[Object(h.jsxDEV)("div",{className:"plan-title",children:"\u8425\u9500\u8ba1\u5212"},void 0,!1,{fileName:xs,lineNumber:351,columnNumber:15},this),Object(h.jsxDEV)(d.a,{style:{width:"100%"},title:this.state.step1_pagetitle,children:Object(h.jsxDEV)(as,{ref:"step1",setTlementType:e=>this.setTlementType(e),setTlementData:e=>this.setTlementData(e),onGetDirectResellerId:e=>this.getDirectResellerId(e)},void 0,!1,{fileName:xs,lineNumber:353,columnNumber:17},this)},void 0,!1,{fileName:xs,lineNumber:352,columnNumber:15},this)]},void 0,!0,{fileName:xs,lineNumber:350,columnNumber:13},this),this.state.curstep>=2?Object(h.jsxDEV)("div",{id:"step2",className:"step2",children:[Object(h.jsxDEV)("div",{className:"plan-title",children:"key"},void 0,!1,{fileName:xs,lineNumber:364,columnNumber:17},this),this.state.keys.map(((e,t)=>e?Object(h.jsxDEV)(d.a,{style:{width:"100%",height:"auto",marginBottom:"10px"},title:this.state.step2_pagetitle,action:t>0?Object(h.jsxDEV)("span",{className:"zent-link",target:"_blank",onClick:e=>{this.closeStep(t)},children:"\u5173\u95ed"},void 0,!1,{fileName:xs,lineNumber:377,columnNumber:27},this):null,children:Object(h.jsxDEV)(gs,{ref:e,addNewkey:()=>{this.addNewkey()},onStyleChange:e=>{this.onStyleChange(e)},step_id:t,getStep3Theme:()=>this.getStep3Theme(),keyStyle:this.state.keyStyle,keyType:this.state.keyType,setKeyType:e=>this.setState({keyType:e}),isload:this.state.isload,curstep:this.state.curstep,direct_reseller_id:this.state.direct_reseller_id,name:t,whiteStyle:this.state.whiteStyle,isSettlement:this.state.isSettlement,settlementData:this.state.settlementData},void 0,!1,{fileName:xs,lineNumber:389,columnNumber:23},this)},t,!1,{fileName:xs,lineNumber:367,columnNumber:21},this):null))]},void 0,!0,{fileName:xs,lineNumber:363,columnNumber:15},this):null,this.state.card_visible?Object(h.jsxDEV)("div",{id:"step3",className:"step3",children:Object(h.jsxDEV)(d.a,{style:{width:"100%",height:"auto"},title:this.state.step3_pagetitle,children:Object(h.jsxDEV)(_s,{ref:"step3"},void 0,!1,{fileName:xs,lineNumber:419,columnNumber:19},this)},void 0,!1,{fileName:xs,lineNumber:418,columnNumber:17},this)},void 0,!1,{fileName:xs,lineNumber:417,columnNumber:15},this):null,3==this.state.curstep?Object(h.jsxDEV)("div",{className:"step-btn-group",children:[Object(h.jsxDEV)(u.a,{type:"primary",onClick:()=>this.onNextStep(),children:"\u63d0\u4ea4\u5ba1\u6838"},void 0,!1,{fileName:xs,lineNumber:426,columnNumber:17},this),Object(h.jsxDEV)(u.a,{type:"normal",onClick:()=>this.onReturn(),children:"\u53d6\u6d88"},void 0,!1,{fileName:xs,lineNumber:429,columnNumber:17},this)]},void 0,!0,{fileName:xs,lineNumber:425,columnNumber:15},this):Object(h.jsxDEV)("div",{className:"step-btn-group",children:[Object(h.jsxDEV)(u.a,{type:"primary",onClick:()=>this.onNextStep(),children:"\u4e0b\u4e00\u6b65"},void 0,!1,{fileName:xs,lineNumber:435,columnNumber:17},this),Object(h.jsxDEV)(u.a,{type:"normal",onClick:()=>this.onReturn(),children:"\u53d6\u6d88"},void 0,!1,{fileName:xs,lineNumber:438,columnNumber:17},this)]},void 0,!0,{fileName:xs,lineNumber:434,columnNumber:15},this),this.state.audit_visible?Object(h.jsxDEV)("div",{className:"audit",children:[Object(h.jsxDEV)("div",{className:"modal",children:" "},void 0,!1,{fileName:xs,lineNumber:446,columnNumber:17},this),Object(h.jsxDEV)("div",{className:"audit-box",children:[Object(h.jsxDEV)(g.a,{type:"close",className:"audit-close",onClick:e=>{this.setState({audit_visible:!1})}},void 0,!1,{fileName:xs,lineNumber:448,columnNumber:19},this),Object(h.jsxDEV)("div",{className:"audit-box-title",children:"\u63d0\u4ea4\u5ba1\u6838"},void 0,!1,{fileName:xs,lineNumber:455,columnNumber:19},this),Object(h.jsxDEV)("div",{className:"payType",children:Object(h.jsxDEV)(Q.a,{onChange:e=>{this.onPayTypeChange(e)},value:this.state.paytype,className:"audit-obj",children:[Object(h.jsxDEV)(Z.a,{value:3,children:"\u9884\u4ed8\u6b3e\u6263\u9664"},void 0,!1,{fileName:xs,lineNumber:464,columnNumber:23},this),Object(h.jsxDEV)(Z.a,{value:1,children:"\u5bf9\u79c1\u8d26\u6237"},void 0,!1,{fileName:xs,lineNumber:465,columnNumber:23},this),Object(h.jsxDEV)(Z.a,{value:2,children:"\u5bf9\u516c\u8d26\u6237"},void 0,!1,{fileName:xs,lineNumber:466,columnNumber:23},this)]},void 0,!0,{fileName:xs,lineNumber:457,columnNumber:21},this)},void 0,!1,{fileName:xs,lineNumber:456,columnNumber:19},this),Object(h.jsxDEV)("div",{className:"audit-btn-group",children:[Object(h.jsxDEV)(u.a,{onClick:e=>{this.setState({audit_visible:!1})},children:"\u53d6\u6d88"},void 0,!1,{fileName:xs,lineNumber:470,columnNumber:21},this),Object(h.jsxDEV)(u.a,{type:"primary",onClick:e=>{this.onConfirm(e)},children:"\u786e\u5b9a"},void 0,!1,{fileName:xs,lineNumber:477,columnNumber:21},this)]},void 0,!0,{fileName:xs,lineNumber:469,columnNumber:19},this)]},void 0,!0,{fileName:xs,lineNumber:447,columnNumber:17},this)]},void 0,!0,{fileName:xs,lineNumber:445,columnNumber:15},this):null]},void 0,!0,{fileName:xs,lineNumber:349,columnNumber:11},this)},void 0,!1,{fileName:xs,lineNumber:348,columnNumber:9},this)]},void 0,!0,{fileName:xs,lineNumber:320,columnNumber:7},this)}}i(251);var Os="/Users/zhangds/web/blue-brother/frontend/src/pages/plan/add/edit.js";class Ds extends m.a.Component{constructor(e){super(e),this.setTlementType=e=>{this.setState({isSettlement:e}),this.setState({keys:["step2-0"]}),this.refs["step2-0"]&&this.refs["step2-0"].clearTableData()},this.setTlementData=e=>{this.setState({settlementData:e}),this.setState({keys:["step2-0"]}),this.refs["step2-0"]&&this.refs["step2-0"].clearTableData()},this.getDirectResellerId=e=>{this.setState({direct_reseller_id:e.direct_reseller_id})},this.phoneChange=e=>{this.setState({phone:e.target.value})},this.emailChange=e=>{this.setState({email:e.target.value})},this.state={keys:[],step1_pagetitle:"\u4fee\u6539\u8ba1\u5212",step2_pagetitle:"\u751f\u6210key",step3_pagetitle:"\u7ed1\u5b9a\u5361\u5238",curstep:1,menuList:[{id:1,title:"\u8425\u9500\u8ba1\u5212",child:[{step:1,title:"\u65b0\u5efa\u8ba1\u5212"}]},{id:2,title:"key",child:[{step:1,title:"\u751f\u6210key"},{step:2,title:"\u7ed1\u5b9a\u5361\u5238"}]},{id:3,title:"\u843d\u5730\u9875",child:[{step:1,title:"\u7ed1\u5b9a\u843d\u5730\u9875"}]}],phone_list:[],email_list:[],phone:"",email:"",email_radio:-1,phone_radio:-1,audit_visible:!1,card_visible:!1,recall_visible:!1,step1_data:null,step2_data:null,step3_data:null,disabled:!1,disabled_time:!1,paytype:3,reseller:null,payment_direction:["\u5bf9\u79c1\u8d26\u6237","\u5bf9\u516c\u8d26\u6237","\u9884\u4ed8\u6b3e\u6263\u9664"],approvalLoading:!1,timer:3,theme_options:[],isload:!1,is_Edit:!1,whiteStyle:!1,btn_loading:!1,direct_reseller_id:0,keyType:1,isSettlement:2,settlementData:null}}submit(){this.refs.step1.submit()}onReturn(){let e=this;G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:" \u662f\u5426\u8fd4\u56de\u8ba1\u5212\u5217\u8868?"},void 0,!1,{fileName:Os,lineNumber:82,columnNumber:16},this),onConfirm:()=>{e.props.history.push("/home/plan-list/")},onCancel:this.onCancel,className:"questModal",parentComponent:this})}componentDidMount(e){let t=sessionStorage.getItem("bm_obj");if(t){let e=JSON.parse(t);e.settlement_type>0&&this.setState({isSettlement:1,settlementData:{key:e.settlement_type,text:e.settlement_type_text}})}let i=sessionStorage.getItem("plan_status");3!=i&&4!=i&&5!=i&&2!=i||this.setState({disabled:!0});let s=sessionStorage.getItem("plan_id"),l=sessionStorage.getItem("approval_id");Number(l)>0?Object(a.P)(l).then((e=>{Object(a.Tb)(e,((e,t)=>{try{Object(a.vb)(e.info.reseller_id).then((e=>{Object(a.Tb)(e,((e,t)=>{this.setState({direct_reseller_id:e.direct_reseller_id})}))}))}catch(i){}if(e.info&&(sessionStorage.setItem("step1",JSON.stringify(e.info)),this.refs.step1.edit(e.info)),e.keys.length>0&&0==this.state.disabled){this.setState({curstep:2}),e.keys=this.tranFormData(e);for(let t=0;t{for(let t=0;t{c.a.error(e)}))})):Object(a.bb)(s).then((e=>{Object(a.Tb)(e,((e,t)=>{if(Object(a.vb)(e.info.reseller_id).then((e=>{Object(a.Tb)(e,((e,t)=>{this.setState({direct_reseller_id:e.direct_reseller_id})}))})),e.info&&(sessionStorage.setItem("step1",JSON.stringify(e.info)),this.refs.step1.edit(e.info)),e.keys.length>0&&0==this.state.disabled){this.setState({curstep:2}),e.keys=this.tranFormData(e);for(let t=0;t{for(let t=0;t{c.a.error(e)}))}))}getStep3Theme(){this.state.card_visible&&this.refs.step3.getThemeData()}tranFormData(e){let t=Number(e.keys[0].bind_object[0]);return this.setState({keyType:t}),sessionStorage.setItem("keyType",t),e.keys}async onNextStep(){if(this.state.curstep>=1){if(!await this.refs.step1.submit())return;this.setState({curstep:2,isload:!0})}if(this.state.curstep>=2){let e=[];for(let a=0;a{Object(a.Tb)(t,((t,i)=>{sessionStorage.setItem("step2",JSON.stringify(e)),this.setState({card_visible:!0,curstep:3})}),(e=>{c.a.error(e)}))}))}if(3==this.state.curstep){let e=this.refs.step3.submit();if(!e)return;{let t={info:JSON.parse(sessionStorage.getItem("step1")),key:JSON.parse(sessionStorage.getItem("step2")),theme:e,complete:!0},i=sessionStorage.getItem("plan_id");Object(a.d)(i,t).then((e=>{Object(a.Tb)(e,((e,i)=>{let s=t.info.reseller_id;Object(a.vb)(s).then((e=>{Object(a.Tb)(e,((e,t)=>{this.setState({phone_list:e.contact_phone,reseller:e,email_list:e.contact_email,audit_visible:!0})}))}))}),(e=>{c.a.error(e)}))}))}}}addNewkey(){let e="step2-"+this.state.keys.length;this.state.keys.push(e),this.setState({isload:!0,keys:this.state.keys})}onPhoneChange(e){this.setState({phone_radio:e.target.value})}onEmailChange(e){this.setState({email_radio:e.target.value})}cancel(e){this.setState({audit_visible:!1})}closeStep(e){this.state.keys[e]="",this.setState({keys:this.state.keys})}send(e){let t=sessionStorage.getItem("plan_id"),i={phone:this.state.phone_radio>-1?this.state.phone_list[this.state.phone_radio]:this.state.phone,email:this.state.email_radio>-1?this.state.email_list[this.state.email_radio]:this.state.email};new RegExp("^[1][3,4,5,6,7,8,9][0-9]{9}$").test(i.phone)?Object(a.dc)(t,i).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.success("\u53d1\u9001\u6210\u529f,\u8bf7\u57281-2\u5206\u949f\u540e\u67e5\u770b"),this.props.history.push("/home/plan-list/")}),(e=>{c.a.success("\u53d1\u9001\u6210\u529f,\u8bf7\u57281-2\u5206\u949f\u540e\u67e5\u770b"),this.props.history.push("/home/plan-list/")}))})):c.a.error("\u624b\u673a\u53f7\u683c\u5f0f\u4e0d\u6b63\u786e")}async onEditInfo(){let e=sessionStorage.getItem("plan_id");this.state.is_Edit||(this.setState({is_Edit:!0}),await this.refs.step1.submit(e)?setTimeout((()=>{this.setState({is_Edit:!1}),this.props.history.push("/home/plan-list/")}),1500):this.setState({is_Edit:!1}))}onConfirm(e){if(1==this.state.btn_loading)return;this.setState({btn_loading:!0});let t=sessionStorage.getItem("plan_id");sessionStorage.getItem("plan_status");this.setState({audit_visible:!1});let i=sessionStorage.getItem("approval_id");if(i>0)Object(a.Q)(i).then((e=>{setTimeout((()=>{this.setState({btn_loading:!1})}),500),Object(a.Tb)(e,((e,i)=>{if(0==e.status&&this.setState({recall_visible:!0}),1==e.status&&(c.a.error("\u8fdb\u884c\u4e2d\u7684\u8ba1\u5212\u4e0d\u80fd\u63d0\u4ea4\u5ba1\u6838"),setTimeout((()=>{this.props.history.push("/home/plan-list/")}),2e3)),2==e.status||3==e.status){let e={reseller_id:this.state.reseller.id,reseller_name:this.state.reseller.name,company_name:this.state.reseller.company_name,receive_email:this.state.reseller.contact_email[0],payment_direction:this.state.payment_direction[this.state.paytype-1]};if(this.state.direct_reseller_id<=0)return void c.a.error("\u8bf7\u6dfb\u52a0\u6620\u5c04\u5206\u9500\u5546");Object(a.g)(t,e).then((e=>{Object(a.Tb)(e,((e,t)=>{this.setState({audit_visible:!1}),c.a.success("\u6210\u529f\u53d1\u8d77\u5ba1\u6279"),this.props.history.push("/home/plan-list/")}),(e=>{c.a.error(e)}))}))}}),(e=>{c.a.error(e)}))}));else{let e={reseller_id:this.state.reseller.id,reseller_name:this.state.reseller.name,company_name:this.state.reseller.company_name,receive_email:this.state.email_list[0],payment_direction:this.state.payment_direction[this.state.paytype-1]};Object(a.g)(t,e).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.success("\u6210\u529f\u53d1\u8d77\u5ba1\u6279"),this.setState({audit_visible:!1}),this.props.history.push("/home/plan-list/")}),(e=>{c.a.error(e)}))}))}}onPayTypeChange(e){this.setState({paytype:e.target.value})}onReCall(){let e=sessionStorage.getItem("approval_id");this.setState({recall_visible:!1}),Object(a.bd)(e).then((e=>{Object(a.Tb)(e,((e,t)=>{this.setState({approvalLoading:!0});let i=setInterval((()=>{this.state.timer<=0&&(clearInterval(i),this.setState({approvalLoading:!1}),c.a.success("\u64a4\u9500\u6210\u529f,\u8bf7\u91cd\u65b0\u63d0\u4ea4\u5ba1\u6838"));let e=this.state.timer-1;this.setState({timer:e})}),1e3)}),(e=>{c.a.error(e)}))}))}onStyleChange(e){if(6==e.target.value){this.setState({keyStyle:6,whiteStyle:!0}),sessionStorage.setItem("white",1);for(let e=0;e0&&this.refs[this.state.keys[e]].setkeyStyle(6)}else{sessionStorage.setItem("white",3);for(let e=0;e0&&this.refs[this.state.keys[e]].setkeyStyle(1);this.setState({whiteStyle:!1})}}render(){return Object(h.jsxDEV)("div",{id:"plan-edit",children:this.state.disabled?Object(h.jsxDEV)("div",{className:"plan-main",children:Object(h.jsxDEV)("div",{className:"action-panel",children:[Object(h.jsxDEV)("div",{id:"step1",className:"step1",children:[Object(h.jsxDEV)("div",{className:"plan-title",children:"\u8425\u9500\u8ba1\u5212"},void 0,!1,{fileName:Os,lineNumber:581,columnNumber:17},this),Object(h.jsxDEV)(d.a,{style:{width:"100%"},title:this.state.step1_pagetitle,children:Object(h.jsxDEV)(as,{ref:"step1",data:this.state.step1_data,disabled:this.state.disabled},void 0,!1,{fileName:Os,lineNumber:583,columnNumber:19},this)},void 0,!1,{fileName:Os,lineNumber:582,columnNumber:17},this)]},void 0,!0,{fileName:Os,lineNumber:580,columnNumber:15},this),Object(h.jsxDEV)("div",{className:"step-btn-group",children:[Object(h.jsxDEV)(u.a,{type:"primary",onClick:()=>this.onEditInfo(),children:"\u4fee\u6539"},void 0,!1,{fileName:Os,lineNumber:587,columnNumber:17},this),Object(h.jsxDEV)(u.a,{type:"normal",onClick:()=>this.onReturn(),children:"\u53d6\u6d88"},void 0,!1,{fileName:Os,lineNumber:590,columnNumber:17},this)]},void 0,!0,{fileName:Os,lineNumber:586,columnNumber:15},this)]},void 0,!0,{fileName:Os,lineNumber:579,columnNumber:13},this)},void 0,!1,{fileName:Os,lineNumber:578,columnNumber:11},this):Object(h.jsxDEV)("div",{className:"plan-main",children:[Object(h.jsxDEV)("div",{className:"plan-left",style:{top:"60px"},children:this.state.menuList.map(((e,t)=>Object(h.jsxDEV)("div",{className:"box-item",children:[Object(h.jsxDEV)("div",{className:"main-title",children:e.title},void 0,!1,{fileName:Os,lineNumber:602,columnNumber:21},this),e.child.map(((t,i)=>Object(h.jsxDEV)("div",{className:"title-inline",children:[Object(h.jsxDEV)("div",{className:this.state.curstep>=e.id?"child-title active":"child-title",children:[t.title," "]},t.title,!0,{fileName:Os,lineNumber:606,columnNumber:27},this),this.state.curstep>=e.id?Object(h.jsxDEV)(g.a,{type:"check",className:"checkIcon"},void 0,!1,{fileName:Os,lineNumber:615,columnNumber:29},this):null]},i,!0,{fileName:Os,lineNumber:605,columnNumber:25},this))),Object(h.jsxDEV)("div",{className:"under-line"},void 0,!1,{fileName:Os,lineNumber:620,columnNumber:21},this)]},e.title,!0,{fileName:Os,lineNumber:601,columnNumber:19},this)))},void 0,!1,{fileName:Os,lineNumber:598,columnNumber:13},this),Object(h.jsxDEV)("div",{className:"plan-right",children:Object(h.jsxDEV)("div",{className:"action-panel",children:[Object(h.jsxDEV)("div",{id:"step1",className:"step1",children:[Object(h.jsxDEV)("div",{className:"plan-title",children:"\u8425\u9500\u8ba1\u5212"},void 0,!1,{fileName:Os,lineNumber:629,columnNumber:19},this),Object(h.jsxDEV)(d.a,{style:{width:"100%"},title:this.state.step1_pagetitle,children:Object(h.jsxDEV)(as,{ref:"step1",data:this.state.step1_data,disabled:this.state.disabled,onGetDirectResellerId:e=>this.getDirectResellerId(e),setTlementType:e=>this.setTlementType(e),setTlementData:e=>this.setTlementData(e)},void 0,!1,{fileName:Os,lineNumber:631,columnNumber:21},this)},void 0,!1,{fileName:Os,lineNumber:630,columnNumber:19},this)]},void 0,!0,{fileName:Os,lineNumber:628,columnNumber:17},this),this.state.curstep>=2?Object(h.jsxDEV)("div",{id:"step2",className:"step2",children:[Object(h.jsxDEV)("div",{className:"plan-title",children:"key"},void 0,!1,{fileName:Os,lineNumber:644,columnNumber:21},this),this.state.keys.map(((e,t)=>e?Object(h.jsxDEV)(d.a,{style:{width:"100%",height:"auto",marginBottom:"10px"},title:this.state.step2_pagetitle,action:t>0?Object(h.jsxDEV)("span",{className:"zent-link",target:"_blank",onClick:e=>{this.closeStep(t)},children:"\u5173\u95ed"},void 0,!1,{fileName:Os,lineNumber:656,columnNumber:31},this):null,children:Object(h.jsxDEV)(gs,{ref:"step2-"+t,addNewkey:()=>{this.addNewkey()},name:t,onStyleChange:e=>{this.onStyleChange(e)},is_Edit:!0,step_id:t,keyType:this.state.keyType,setKeyType:e=>this.setState({keyType:e}),getStep3Theme:()=>this.getStep3Theme(),curstep:this.state.curstep,whiteStyle:this.state.whiteStyle,keyStyle:this.state.keyStyle,isload:this.state.isload,data:e,direct_reseller_id:this.state.direct_reseller_id,disabled:this.state.disabled,isSettlement:this.state.isSettlement,settlementData:this.state.settlementData},void 0,!1,{fileName:Os,lineNumber:668,columnNumber:27},this)},void 0,!1,{fileName:Os,lineNumber:647,columnNumber:25},this):null))]},void 0,!0,{fileName:Os,lineNumber:643,columnNumber:19},this):null,this.state.card_visible?Object(h.jsxDEV)("div",{id:"step3",className:"step3",children:Object(h.jsxDEV)(d.a,{style:{width:"100%",height:"auto"},title:this.state.step3_pagetitle,children:Object(h.jsxDEV)(_s,{ref:"step3",data:this.state.step3_data,options:this.state.theme_options,disabled:this.state.disabled},void 0,!1,{fileName:Os,lineNumber:704,columnNumber:23},this)},void 0,!1,{fileName:Os,lineNumber:700,columnNumber:21},this)},void 0,!1,{fileName:Os,lineNumber:699,columnNumber:19},this):null,this.state.card_visible?Object(h.jsxDEV)("div",{className:"step-btn-group",children:[Object(h.jsxDEV)(u.a,{type:"primary",onClick:()=>this.onNextStep(),disabled:this.state.disabled,children:"\u63d0\u4ea4\u5ba1\u6838"},void 0,!1,{fileName:Os,lineNumber:716,columnNumber:21},this),Object(h.jsxDEV)(u.a,{type:"normal",onClick:()=>this.onReturn(),children:"\u53d6\u6d88"},void 0,!1,{fileName:Os,lineNumber:723,columnNumber:21},this)]},void 0,!0,{fileName:Os,lineNumber:715,columnNumber:19},this):Object(h.jsxDEV)("div",{className:"step-btn-group",children:[Object(h.jsxDEV)(u.a,{type:"primary",onClick:()=>this.onNextStep(),disabled:this.state.disabled,children:"\u4e0b\u4e00\u6b65"},void 0,!1,{fileName:Os,lineNumber:729,columnNumber:21},this),Object(h.jsxDEV)(u.a,{type:"normal",onClick:()=>this.onReturn(),children:"\u53d6\u6d88"},void 0,!1,{fileName:Os,lineNumber:736,columnNumber:21},this)]},void 0,!0,{fileName:Os,lineNumber:728,columnNumber:19},this),this.state.audit_visible?Object(h.jsxDEV)("div",{className:"audit",children:[Object(h.jsxDEV)("div",{className:"modal",children:" "},void 0,!1,{fileName:Os,lineNumber:744,columnNumber:21},this),Object(h.jsxDEV)("div",{className:"audit-box",children:[Object(h.jsxDEV)(g.a,{type:"close",className:"audit-close",onClick:e=>{this.setState({audit_visible:!1})}},void 0,!1,{fileName:Os,lineNumber:746,columnNumber:23},this),Object(h.jsxDEV)("div",{className:"audit-box-title",children:"\u63d0\u4ea4\u5ba1\u6838"},void 0,!1,{fileName:Os,lineNumber:753,columnNumber:23},this),Object(h.jsxDEV)("div",{className:"payType",children:Object(h.jsxDEV)(Q.a,{onChange:e=>{this.onPayTypeChange(e)},value:this.state.paytype,className:"audit-obj",children:[Object(h.jsxDEV)(Z.a,{value:3,children:"\u9884\u4ed8\u6b3e\u6263\u9664"},void 0,!1,{fileName:Os,lineNumber:762,columnNumber:27},this),Object(h.jsxDEV)(Z.a,{value:1,children:"\u5bf9\u79c1\u8d26\u6237"},void 0,!1,{fileName:Os,lineNumber:763,columnNumber:27},this),Object(h.jsxDEV)(Z.a,{value:2,children:"\u5bf9\u516c\u8d26\u6237"},void 0,!1,{fileName:Os,lineNumber:764,columnNumber:27},this)]},void 0,!0,{fileName:Os,lineNumber:755,columnNumber:25},this)},void 0,!1,{fileName:Os,lineNumber:754,columnNumber:23},this),Object(h.jsxDEV)("div",{className:"audit-btn-group",children:[Object(h.jsxDEV)(u.a,{onClick:e=>{this.setState({audit_visible:!1})},children:"\u53d6\u6d88"},void 0,!1,{fileName:Os,lineNumber:768,columnNumber:25},this),Object(h.jsxDEV)(u.a,{type:"primary",onClick:e=>{this.onConfirm(e)},children:"\u786e\u5b9a"},void 0,!1,{fileName:Os,lineNumber:775,columnNumber:25},this)]},void 0,!0,{fileName:Os,lineNumber:767,columnNumber:23},this)]},void 0,!0,{fileName:Os,lineNumber:745,columnNumber:21},this)]},void 0,!0,{fileName:Os,lineNumber:743,columnNumber:19},this):null,this.state.recall_visible?Object(h.jsxDEV)("div",{className:"audit",children:[Object(h.jsxDEV)("div",{className:"modal",children:" "},void 0,!1,{fileName:Os,lineNumber:790,columnNumber:21},this),Object(h.jsxDEV)("div",{className:"audit-box",children:[Object(h.jsxDEV)(g.a,{type:"close",className:"audit-close",onClick:e=>{this.onReturn(e)}},void 0,!1,{fileName:Os,lineNumber:792,columnNumber:23},this),Object(h.jsxDEV)("div",{className:"audit-box-title",children:"\u5ba1\u6838\u4e2d"},void 0,!1,{fileName:Os,lineNumber:799,columnNumber:23},this),Object(h.jsxDEV)("div",{className:"audit-box-txt",children:"\u63d0\u4ea4\u5ba1\u6838\u4f1a\u5c06\u539f\u6765\u5ba1\u6279\u64a4\u56de\u624d\u53ef\u8fdb\u884c\u63d0\u4ea4,\u662f\u5426\u64a4\u56de?"},void 0,!1,{fileName:Os,lineNumber:800,columnNumber:23},this),Object(h.jsxDEV)("div",{className:"audit-btn-group",children:[Object(h.jsxDEV)(u.a,{onClick:e=>{this.setState({recall_visible:!1})},children:"\u53d6\u6d88"},void 0,!1,{fileName:Os,lineNumber:804,columnNumber:25},this),Object(h.jsxDEV)(u.a,{type:"primary",onClick:e=>{this.onReCall(e)},children:"\u786e\u5b9a"},void 0,!1,{fileName:Os,lineNumber:811,columnNumber:25},this)]},void 0,!0,{fileName:Os,lineNumber:803,columnNumber:23},this)]},void 0,!0,{fileName:Os,lineNumber:791,columnNumber:21},this)]},void 0,!0,{fileName:Os,lineNumber:789,columnNumber:19},this):null,this.state.approvalLoading?Object(h.jsxDEV)("div",{className:"audit",children:[Object(h.jsxDEV)("div",{className:"modal",children:" "},void 0,!1,{fileName:Os,lineNumber:826,columnNumber:21},this),Object(h.jsxDEV)("div",{className:"audit-box",children:[Object(h.jsxDEV)("div",{className:"audit-box-title",children:"\u64a4\u9500\u5ba1\u6279\u4e2d"},void 0,!1,{fileName:Os,lineNumber:828,columnNumber:23},this),Object(h.jsxDEV)("div",{className:"audit-box-txt",children:["\u6b63\u5728\u53d1\u8d77\u64a4\u9500...,\u8bf7\u7b49\u5f85",Object(h.jsxDEV)("span",{style:{color:"red"},children:[" ",this.state.timer]},void 0,!0,{fileName:Os,lineNumber:831,columnNumber:25},this),"\u79d2"]},void 0,!0,{fileName:Os,lineNumber:829,columnNumber:23},this)]},void 0,!0,{fileName:Os,lineNumber:827,columnNumber:21},this)]},void 0,!0,{fileName:Os,lineNumber:825,columnNumber:19},this):null]},void 0,!0,{fileName:Os,lineNumber:627,columnNumber:15},this)},void 0,!1,{fileName:Os,lineNumber:626,columnNumber:13},this)]},void 0,!0,{fileName:Os,lineNumber:597,columnNumber:11},this)},void 0,!1,{fileName:Os,lineNumber:576,columnNumber:7},this)}}var Es="/Users/zhangds/web/blue-brother/frontend/src/pages/plan/add/plan-copy.js";class Vs extends m.a.Component{constructor(e){super(e),this.setTlementType=e=>{this.setState({isSettlement:e}),this.setState({keys:["step2-0"]}),this.refs["step2-0"].clearTableData()},this.setTlementData=e=>{this.setState({settlementData:e}),this.setState({keys:["step2-0"]}),this.refs["step2-0"].clearTableData()},this.phoneChange=e=>{this.setState({phone:e.target.value})},this.emailChange=e=>{this.setState({email:e.target.value})},this.getDirectResellerId=e=>{this.setState({direct_reseller_id:e.direct_reseller_id})},this.state={keys:[],step1_pagetitle:"\u65b0\u5efa\u8ba1\u5212",step2_pagetitle:"\u751f\u6210key",step3_pagetitle:"\u7ed1\u5b9a\u843d\u5730\u9875",curstep:1,menuList:[{id:1,title:"\u8425\u9500\u8ba1\u5212",child:[{step:1,title:"\u65b0\u5efa\u8ba1\u5212"}]},{id:2,title:"key",child:[{step:1,title:"\u751f\u6210key"},{step:2,title:"\u7ed1\u5b9a\u5361\u5238"}]},{id:3,title:"\u843d\u5730\u9875",child:[{step:1,title:"\u7ed1\u5b9a\u843d\u5730\u9875"}]}],phone_list:[],email_list:[],phone:"",email:"",email_radio:-1,phone_radio:-1,audit_visible:!1,card_visible:!1,step1:null,paytype:3,reseller:"",payment_direction:["\u5bf9\u79c1\u8d26\u6237","\u5bf9\u516c\u8d26\u6237","\u9884\u4ed8\u6b3e\u6263\u9664"],isload:!1,is_audit:!1,whiteStyle:!1,keyStyle:1,direct_reseller_id:0,step1_data:null,step2_data:null,step3_data:null,disabled:!1,keyType:1,isSettlement:2,settlementData:null}}submit(){this.refs.step1.submit()}onReturn(){let e=this;G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:" \u662f\u5426\u8fd4\u56de\u8ba1\u5212\u5217\u8868?"},void 0,!1,{fileName:Es,lineNumber:75,columnNumber:16},this),onConfirm:()=>{e.props.history.push("/home/plan-list/")},onCancel:this.onCancel,className:"questModal",parentComponent:this})}componentDidMount(e){let t=sessionStorage.getItem("bm_obj");if(t){let e=JSON.parse(t);e.settlement_type>0&&this.setState({isSettlement:1,settlementData:{key:e.settlement_type,text:e.settlement_type_text}})}sessionStorage.setItem("plan_id","");let i=sessionStorage.getItem("plan_id_copy");this.setState({plan_id_detail:i}),this.getDetails(i)}getDetails(e){let t=sessionStorage.getItem("copy_count_golod");Object(a.Lb)(e).then((e=>{Object(a.Tb)(e,((e,i)=>{if(Object(a.vb)(e.info.reseller_id).then((e=>{Object(a.Tb)(e,((e,t)=>{this.setState({direct_reseller_id:e.direct_reseller_id})}))})),e.info&&(e.info.title=`${e.info.title}_${Number(t)+1}`.substring(0,12),sessionStorage.setItem("step1",JSON.stringify(e.info)),this.refs.step1.edit(e.info)),e.keys.length>0&&0==this.state.disabled){this.setState({curstep:2}),e.keys=this.tranFormData(e);for(let t=0;t{for(let t=0;t{c.a.error(e)}))}))}tranFormData(e){let t=Number(e.keys[0].bind_object[0]);return this.setState({keyType:t}),sessionStorage.setItem("keyType",t),e.keys}getStep3Theme(){this.state.card_visible&&this.refs.step3.getThemeData()}onConfirm(e){let t=sessionStorage.getItem("plan_id");this.setState({audit_visible:!1,is_audit:!0});let i={reseller_id:this.state.reseller.id,reseller_name:this.state.reseller.name,company_name:this.state.reseller.company_name,receive_email:this.state.email_list[0],payment_direction:this.state.payment_direction[this.state.paytype-1]};Object(a.g)(t,i).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.success("\u6210\u529f\u53d1\u8d77\u5ba1\u6279"),this.props.history.push("/home/plan-list/"),this.setState({is_audit:!1})}),(e=>{c.a.error(e)}))}))}onPayTypeChange(e){this.setState({paytype:e.target.value})}async onNextStep(){if(this.state.curstep>=1){if(1!=await this.refs.step1.submit())return;this.setState({curstep:2,isload:!0})}if(this.state.curstep>=2){let e=[];for(let a=0;a{Object(a.Tb)(t,((t,i)=>{sessionStorage.setItem("step2",JSON.stringify(e)),this.setState({card_visible:!0,curstep:3})}),(e=>{c.a.error(e)}))}))}if(3==this.state.curstep){if(this.state.direct_reseller_id<=0)return void c.a.error("\u8bf7\u6dfb\u52a0\u6620\u5c04\u5206\u9500\u5546");let e=this.refs.step3.submit();if(!e)return;{let t={info:JSON.parse(sessionStorage.getItem("step1")),key:JSON.parse(sessionStorage.getItem("step2")),theme:e,complete:!0},i=sessionStorage.getItem("plan_id");Object(a.d)(i,t).then((e=>{Object(a.Tb)(e,((e,i)=>{let s=t.info.reseller_id;Object(a.vb)(s).then((e=>{Object(a.Tb)(e,((e,t)=>{this.setState({phone_list:e.contact_phone,reseller:e,email_list:e.contact_email,audit_visible:!0})}))}))}),(e=>{c.a.error(e)}))}))}}}addNewkey(){let e="step2-"+this.state.keys.length;this.state.keys.push(e),this.setState({isload:!0,keys:this.state.keys}),6==this.refs[this.state.keys[0]].state.model.style?this.setState({keyStyle:6,whiteStyle:!0}):this.setState({whiteStyle:!1,keyStyle:1})}onStyleChange(e){if(6==e.target.value){this.setState({keyStyle:6,whiteStyle:!0}),sessionStorage.setItem("white",1);for(let e=0;e0&&this.refs[this.state.keys[e]].setkeyStyle(6)}else{sessionStorage.setItem("white",3);for(let e=0;e0&&this.refs[this.state.keys[e]].setkeyStyle(1);this.setState({whiteStyle:!1})}}onPhoneChange(e){this.setState({phone_radio:e.target.value})}onEmailChange(e){this.setState({email_radio:e.target.value})}cancel(e){this.setState({audit_visible:!1})}closeStep(e){this.state.keys[e]="",this.setState({keys:this.state.keys})}send(e){let t=sessionStorage.getItem("plan_id"),i={phone:this.state.phone_radio>-1?this.state.phone_list[this.state.phone_radio]:this.state.phone,email:this.state.email_radio>-1?this.state.email_list[this.state.email_radio]:this.state.email};new RegExp("^[1][3,4,5,6,7,8,9][0-9]{9}$").test(i.phone)?Object(a.dc)(t,i).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.success("\u53d1\u9001\u6210\u529f,\u8bf7\u57281-2\u5206\u949f\u540e\u67e5\u770b"),this.props.history.push("/home/plan-list/")}),(e=>{c.a.error(e),this.props.history.push("/home/plan-list/")}))})):c.a.error("\u624b\u673a\u53f7\u683c\u5f0f\u4e0d\u6b63\u786e")}render(){return Object(h.jsxDEV)("div",{id:"plan-add",children:[Object(h.jsxDEV)("div",{className:"plan-left",style:{paddingTop:"125px"},children:this.state.menuList.map(((e,t)=>Object(h.jsxDEV)("div",{className:"box-item",children:[Object(h.jsxDEV)("div",{className:"main-title",children:e.title},void 0,!1,{fileName:Es,lineNumber:412,columnNumber:17},this),e.child.map(((t,i)=>Object(h.jsxDEV)("div",{className:"title-inline",children:[Object(h.jsxDEV)("div",{className:this.state.curstep>=e.id?"child-title active":"child-title",children:[t.title," "]},t.title,!0,{fileName:Es,lineNumber:416,columnNumber:23},this),this.state.curstep>=e.id?Object(h.jsxDEV)(g.a,{type:"check",className:"checkIcon"},void 0,!1,{fileName:Es,lineNumber:425,columnNumber:25},this):null]},i,!0,{fileName:Es,lineNumber:415,columnNumber:21},this))),Object(h.jsxDEV)("div",{className:"under-line"},void 0,!1,{fileName:Es,lineNumber:430,columnNumber:17},this)]},e.title,!0,{fileName:Es,lineNumber:411,columnNumber:15},this)))},void 0,!1,{fileName:Es,lineNumber:408,columnNumber:9},this),Object(h.jsxDEV)("div",{className:"plan-right",children:Object(h.jsxDEV)("div",{className:"action-panel",children:[Object(h.jsxDEV)("div",{id:"step1",className:"step1",children:[Object(h.jsxDEV)("div",{className:"plan-title",children:"\u8425\u9500\u8ba1\u5212"},void 0,!1,{fileName:Es,lineNumber:438,columnNumber:15},this),Object(h.jsxDEV)(d.a,{style:{width:"100%"},title:this.state.step1_pagetitle,children:Object(h.jsxDEV)(as,{ref:"step1",data:this.state.step1_data,onGetDirectResellerId:e=>this.getDirectResellerId(e),setTlementType:e=>this.setTlementType(e),setTlementData:e=>this.setTlementData(e)},void 0,!1,{fileName:Es,lineNumber:440,columnNumber:17},this)},void 0,!1,{fileName:Es,lineNumber:439,columnNumber:15},this)]},void 0,!0,{fileName:Es,lineNumber:437,columnNumber:13},this),this.state.curstep>=2?Object(h.jsxDEV)("div",{id:"step2",className:"step2",children:[Object(h.jsxDEV)("div",{className:"plan-title",children:"key"},void 0,!1,{fileName:Es,lineNumber:452,columnNumber:17},this),this.state.keys.map(((e,t)=>e?Object(h.jsxDEV)(d.a,{style:{width:"100%",height:"auto",marginBottom:"10px"},title:this.state.step2_pagetitle,action:t>0?Object(h.jsxDEV)("span",{className:"zent-link",target:"_blank",onClick:e=>{this.closeStep(t)},children:"\u5173\u95ed"},void 0,!1,{fileName:Es,lineNumber:465,columnNumber:27},this):null,children:Object(h.jsxDEV)(gs,{ref:e,addNewkey:()=>{this.addNewkey()},onStyleChange:e=>{this.onStyleChange(e)},step_id:t,keyStyle:this.state.keyStyle,getStep3Theme:()=>this.getStep3Theme(),curstep:this.state.curstep,keyType:this.state.keyType,setKeyType:e=>this.setState({keyType:e}),isCopy:!0,isload:this.state.isload,direct_reseller_id:this.state.direct_reseller_id,name:t,whiteStyle:this.state.whiteStyle,isSettlement:this.state.isSettlement,settlementData:this.state.settlementData},void 0,!1,{fileName:Es,lineNumber:477,columnNumber:23},this)},t,!1,{fileName:Es,lineNumber:455,columnNumber:21},this):null))]},void 0,!0,{fileName:Es,lineNumber:451,columnNumber:15},this):null,this.state.card_visible?Object(h.jsxDEV)("div",{id:"step3",className:"step3",children:Object(h.jsxDEV)(d.a,{style:{width:"100%",height:"auto"},title:this.state.step3_pagetitle,children:Object(h.jsxDEV)(_s,{ref:"step3"},void 0,!1,{fileName:Es,lineNumber:508,columnNumber:19},this)},void 0,!1,{fileName:Es,lineNumber:507,columnNumber:17},this)},void 0,!1,{fileName:Es,lineNumber:506,columnNumber:15},this):null,3==this.state.curstep?Object(h.jsxDEV)("div",{className:"step-btn-group",children:[Object(h.jsxDEV)(u.a,{type:"primary",onClick:()=>this.onNextStep(),children:"\u63d0\u4ea4\u5ba1\u6838"},void 0,!1,{fileName:Es,lineNumber:515,columnNumber:17},this),Object(h.jsxDEV)(u.a,{type:"normal",onClick:()=>this.onReturn(),children:"\u53d6\u6d88"},void 0,!1,{fileName:Es,lineNumber:518,columnNumber:17},this)]},void 0,!0,{fileName:Es,lineNumber:514,columnNumber:15},this):Object(h.jsxDEV)("div",{className:"step-btn-group",children:[Object(h.jsxDEV)(u.a,{type:"primary",onClick:()=>this.onNextStep(),children:"\u4e0b\u4e00\u6b65"},void 0,!1,{fileName:Es,lineNumber:524,columnNumber:17},this),Object(h.jsxDEV)(u.a,{type:"normal",onClick:()=>this.onReturn(),children:"\u53d6\u6d88"},void 0,!1,{fileName:Es,lineNumber:527,columnNumber:17},this)]},void 0,!0,{fileName:Es,lineNumber:523,columnNumber:15},this),this.state.audit_visible?Object(h.jsxDEV)("div",{className:"audit",children:[Object(h.jsxDEV)("div",{className:"modal",children:" "},void 0,!1,{fileName:Es,lineNumber:535,columnNumber:17},this),Object(h.jsxDEV)("div",{className:"audit-box",children:[Object(h.jsxDEV)(g.a,{type:"close",className:"audit-close",onClick:e=>{this.setState({audit_visible:!1})}},void 0,!1,{fileName:Es,lineNumber:537,columnNumber:19},this),Object(h.jsxDEV)("div",{className:"audit-box-title",children:"\u63d0\u4ea4\u5ba1\u6838"},void 0,!1,{fileName:Es,lineNumber:544,columnNumber:19},this),Object(h.jsxDEV)("div",{className:"payType",children:Object(h.jsxDEV)(Q.a,{onChange:e=>{this.onPayTypeChange(e)},value:this.state.paytype,className:"audit-obj",children:[Object(h.jsxDEV)(Z.a,{value:3,children:"\u9884\u4ed8\u6b3e\u6263\u9664"},void 0,!1,{fileName:Es,lineNumber:553,columnNumber:23},this),Object(h.jsxDEV)(Z.a,{value:1,children:"\u5bf9\u79c1\u8d26\u6237"},void 0,!1,{fileName:Es,lineNumber:554,columnNumber:23},this),Object(h.jsxDEV)(Z.a,{value:2,children:"\u5bf9\u516c\u8d26\u6237"},void 0,!1,{fileName:Es,lineNumber:555,columnNumber:23},this)]},void 0,!0,{fileName:Es,lineNumber:546,columnNumber:21},this)},void 0,!1,{fileName:Es,lineNumber:545,columnNumber:19},this),Object(h.jsxDEV)("div",{className:"audit-btn-group",children:[Object(h.jsxDEV)(u.a,{onClick:e=>{this.setState({audit_visible:!1})},children:"\u53d6\u6d88"},void 0,!1,{fileName:Es,lineNumber:559,columnNumber:21},this),Object(h.jsxDEV)(u.a,{type:"primary",onClick:e=>{this.onConfirm(e)},children:"\u786e\u5b9a"},void 0,!1,{fileName:Es,lineNumber:566,columnNumber:21},this)]},void 0,!0,{fileName:Es,lineNumber:558,columnNumber:19},this)]},void 0,!0,{fileName:Es,lineNumber:536,columnNumber:17},this)]},void 0,!0,{fileName:Es,lineNumber:534,columnNumber:15},this):null]},void 0,!0,{fileName:Es,lineNumber:436,columnNumber:11},this)},void 0,!1,{fileName:Es,lineNumber:435,columnNumber:9},this)]},void 0,!0,{fileName:Es,lineNumber:407,columnNumber:7},this)}}var ks="/Users/zhangds/web/blue-brother/frontend/src/pages/plan/key/UseKeyAddEdit.jsx";const Ss={quantity:[{type:"required",message:"key\u6570\u91cf\u4e0d\u80fd\u4e3a0"},{type:"regExp",message:"\u8bf7\u8f93\u5165\u6b63\u6574\u6570",reg:"^([1-9][0-9]*){1,3}$"}],bind_object:[{type:"required",message:"\u8bf7\u9009\u62e9\u7ed1\u5b9a\u7c7b\u578b"}],batch_name:[{type:"required",message:"\u8bf7\u8f93\u5165key\u6279\u6b21\u540d\u79f0"}],key_official_price:[{type:"required",message:"\u8bf7\u8f93\u5165\u5b98\u65b9\u4ef7"},{type:"regExp",message:"\u6700\u591a\u4fdd\u75594\u4f4d\u5c0f\u6570",reg:"^[0-9]+(.[0-9]{1,4})?$"}],key_cost_price:[{type:"required",message:"\u8bf7\u8f93\u5165\u6210\u672c\u4ef7"},{type:"regExp",message:"\u6700\u591a\u4fdd\u75594\u4f4d\u5c0f\u6570",reg:"^[0-9]+(.[0-9]{1,4})?$"}]},ws=[{title:"\u884c\u53f7",name:"line",prop:"line",width:"30px",type:"normal"},{title:"\u624b\u673a\u53f7",width:"80px",prop:"mobile",name:"mobile",type:"normal"},{title:"\u9519\u8bef\u539f\u56e0",width:"80px",prop:"tips",name:"tips",type:"normal"},{title:"\u662f\u5426\u5bfc\u5165",width:"50px",prop:"is_import",name:"is_import",type:"slot"}];var Cs=()=>{const[e,t]=Object(W.a)({pageTitle:"\u7f16\u8f91key",isEdit:!1,import_visible:!1,success_visible:!1,fail_visible:!1,file_loading:!1,upload_visible:!1,excel_visible:!1,accessVerify:!1,excel_count:0,success_count:0,error_count:0,exceldata:[],myfile:{},audit_visible:!1,key_status:-1,exchangeType:1,keyType:Number(sessionStorage.getItem("keyType")),rowIndex:-1,distdata:[],couponData:[],rowCouponData:"",rowExChangeData:"",Column:[{title:"\u5151\u6362\u540d\u79f0",name:"title",prop:"title",type:"normal",width:"auto"},{title:"\u5151\u6362\u7801\u8303\u56f4",prop:"product",name:"product",width:"auto",type:"slot"},{title:"\u6709\u6548\u5f00\u59cb\u65e5\u671f",prop:"begin_time",name:"begin_time",width:"auto",type:"normal"},{title:"\u6709\u6548\u7ed3\u675f\u65e5\u671f",name:"end_time",prop:"end_time",type:"normal",width:"auto"},{title:"\u5151\u6362\u7801\u6570\u91cf",name:"quantity",type:"normal",prop:"quantity",defaultText:"PM",width:"auto"},{title:"\u7ed1\u5b9a\u6570",prop:"restrict",name:"restrict",type:"slot",width:"auto"},{title:"\u64cd\u4f5c",prop:"edit",name:"edit",type:"slot",width:"auto"}],Column_coupon:[{title:"\u4f18\u60e0\u5238\u540d\u79f0",name:"title",prop:"title",type:"normal",width:"auto"},{title:"\u4f18\u60e0\u5238\u8303\u56f4",prop:"product",name:"product",width:"auto",type:"slot"},{title:"\u6709\u6548\u5f00\u59cb\u65e5\u671f",prop:"begin_time",name:"begin_time",width:"auto",type:"normal"},{title:"\u6709\u6548\u7ed3\u675f\u65e5\u671f",name:"end_time",prop:"end_time",type:"normal",width:"auto"},{title:"\u4f18\u60e0\u5238\u6570\u91cf",name:"quantity",type:"normal",prop:"quantity",defaultText:"PM",width:"auto"},{title:"\u7ed1\u5b9a\u6570",prop:"restrict",name:"restrict",type:"slot",width:"auto"},{title:"\u64cd\u4f5c",prop:"edit",name:"edit",type:"slot",width:"auto"}],KeyPcType:sessionStorage.getItem("KeyPcType"),draw_title:"",drawerVisible:!1,direct_reseller_id:0,plan_id:"",id:"",reseller:{},payment_direction:["\u5bf9\u79c1\u8d26\u6237","\u5bf9\u516c\u8d26\u6237","\u9884\u4ed8\u6b3e\u6263\u9664"],payType:3,copyKeyCodeId:"",reseller_id:"",white_visible:!1,keyCodeId:"",settlement_type:sessionStorage.getItem("plan_list_settlement")?JSON.parse(sessionStorage.getItem("plan_list_settlement")).key:0,isSettlement:sessionStorage.getItem("isSettlement")?1:2,settlementData:sessionStorage.getItem("plan_list_settlement")?JSON.parse(sessionStorage.getItem("plan_list_settlement")):null}),i=Object(r.useRef)(null),o=Object(r.useRef)(null),m=Object(r.useRef)(null),b=Object(r.useRef)(null),[p,N]=Object(W.a)({plan_title:"",batch_name:"",style:1,allow_repetition:0,allow_loss:0,quantity:"0",stock:"",merge_stock:1,mobile_excel:"",mobile_repeat:[],key_official_price:"",key_cost_price:"",expiration_type:"1",expiration_value:""});Object(r.useEffect)((()=>{j()}),[]);const j=()=>{let i=sessionStorage.getItem("plan_item");if(i){let e=JSON.parse(i);N({plan_title:e.title}),t({plan_id:e.id,reseller_id:e.reseller_id}),s=e.reseller_id,Object(a.vb)(s).then((e=>{Object(a.Tb)(e,((e,i)=>{t({direct_reseller_id:e.direct_reseller_id}),t({reseller:e})}),(e=>{c.a.error(e)}))}))}var s;if("3"===e.KeyPcType){t({pageTitle:"\u65b0\u589ekey"});let e=sessionStorage.getItem("keyStyle");1===Number(e)&&(N({style:6}),t({white_visible:!0}))}else"1"===e.KeyPcType?(x(),t({pageTitle:"\u7f16\u8f91key"})):(x(),t({pageTitle:"\u590d\u5236key"}))},_=i=>{let s=i.target.files[0];if(t({myfile:s}),t({upload_visible:!0}),s.name.indexOf(".xls")||s.name.indexOf(".xlsx")||s.name.indexOf(".csv")){if(s.size>1024e3)return void c.a.error("\u6587\u4ef6\u5927\u5c0f\u4e0d\u80fd\u5927\u4e8e2M");let i=new FormData;i.append("file",s),i.append("path","white_list_excel"),t({file_loading:!0}),Object(a.cd)(i).then((i=>{Object(a.Tb)(i,((i,s)=>{let l={excel:i.path,plan_id:e.plan_id};N({mobile_excel:i.path}),Object(a.L)(l).then((e=>{t({file_loading:!1}),Object(a.Tb)(e,((e,i)=>{let a=e.count-e.errorCount;t({excel_count:e.count,accessVerify:!0,error_count:e.errorCount,success_count:a,exceldata:e.validationFailed,success_visible:!0})}),(e=>{c.a.error(e),t({success_visible:!1})}))}))}),(e=>{c.a.error(e),t({success_visible:!1})}))}))}else t({success_visible:!1})},x=()=>{let e=sessionStorage.getItem("keybatch_id");Object(a.fb)(e).then((e=>{Object(a.Tb)(e,((e,i)=>{t({key_status:e.status,id:e.id,keyCodeId:e.id}),y(e)}),(e=>{}))}))},y=i=>{N({batch_name:i.batch_name,style:i.style,allow_repetition:i.allow_repetition,allow_loss:i.allow_loss,quantity:i.quantity,stock:i.stock,merge_stock:i.merge_stock,mobile_excel:i.mobile_excel,mobile_repeat:i.mobile_repeat,key_official_price:i.key_official_price,key_cost_price:i.key_cost_price,expiration_type:i.expiration_conf?i.expiration_conf.expiration_type:"1",expiration_value:i.expiration_conf?i.expiration_conf.expiration_value:""});let a=[];a=1===Number(i.bind_object[0])?i.code_batch:i.coupon,"2"===e.KeyPcType?(N({batch_name:`${i.batch_name}_${++i.copy_count}`.substring(0,12)}),a=a.map((e=>{var t;delete e.id,delete e.status;let i=e.product;return i.legal.map((e=>(delete e.code_batch_id,delete e.status,delete e.goods_id,e))),i.reduce.map((e=>(delete e.id,delete e.status,delete e.goods_id,e))),null===(t=i.cash)||void 0===t||t.map((e=>(delete e.id,delete e.status,delete e.goods_id,e))),e}))):Object(f.a)(a,(e=>(e.checked=!0,e.status&&-1!==Number(e.status)&&(e.disabled=!0),e))),1===Number(i.bind_object[0])?t({distdata:a}):t({couponData:a})},O=()=>"2"!==e.KeyPcType&&("1"===e.KeyPcType?1!==e.key_status:void 0),D=e=>{switch(e){case 0:t({draw_title:"\u65b0\u5efa\u5151\u6362\u7801",exchangeType:1}),setTimeout((()=>{m.current.clearExchangeForm()}),300);break;case 1:t({draw_title:"\u65b0\u5efa\u4f18\u60e0\u5238"}),setTimeout((()=>{b.current.clearCouponForm()}),300);break;case 2:t({draw_title:"\u65b0\u5efa\u7ec4\u5408\u5546\u54c1",exchangeType:2,rowExChangeData:null}),setTimeout((()=>{m.current.clearExchangeForm()}),300)}t({drawerVisible:!0,rowIndex:-1})},E=()=>{2===e.keyType&&setTimeout((()=>{b.current.clearCouponForm()}),300),1===e.keyType&&setTimeout((()=>{m.current.clearExchangeForm()}),300),t({drawerVisible:!1})},V=()=>{if(i.current.validator()){if(1===e.keyType){if(e.distdata.length<=0)return void c.a.error("\u8bf7\u6dfb\u52a0\u7ed1\u5b9a\u5bf9\u8c61")}else if(e.couponData.length<=0)return void c.a.error("\u8bf7\u6dfb\u52a0\u7ed1\u5b9a\u5bf9\u8c61");let i=o.current.getSelectData();if(i.length<=0)return void c.a.error("\u8bf7\u52fe\u9009\u7ed1\u5b9a\u5bf9\u8c61");if(i.filter((e=>""===e.restrict)).length>0)return void c.a.error("\u7ed1\u5b9a\u6570\u4e0d\u80fd\u4e3a\u7a7a");(()=>{let i=!1,s=sessionStorage.getItem("keybatch_id"),l=[];1===e.keyType?(l=e.distdata.filter((e=>!0===e.checked&&(-1===e.status||7===e.status||""===e.id||!e.id))),O()&&l.length<=0&&(i=!0)):(l=e.couponData.filter((e=>!0===e.checked&&(-1===e.status||7===e.status||""===e.id||!e.id))),O()&&l.length<=0&&(i=!0));for(let e=0;e{Object(a.Tb)(e,((e,t)=>{setTimeout((()=>{window.history.back()}),500)}),(e=>{c.a.error(e)}))})):t({audit_visible:!0})})()}},k=(t,i)=>{let s=sessionStorage.getItem("keybatch_id");if(0===t){let t={id:"1"===e.KeyPcType?e.id:"",batch_name:p.batch_name,style:p.style,quantity:p.quantity,allow_repetition:p.allow_repetition,allow_loss:p.allow_loss,merge_stock:p.merge_stock,mobile_excel:p.mobile_excel,mobile_repeat:p.mobile_repeat,expiration_conf:{expiration_type:p.expiration_type,expiration_value:p.expiration_value},bind_object:[e.keyType],copy_key_batch_id:e.copyKeyCodeId,reseller_id:e.reseller.id,reseller_name:e.reseller.name,company_name:e.reseller.company_name,receive_email:e.reseller.contact_email[0],payment_direction:e.payment_direction[e.payType-1]};1===e.keyType?(t.code_batch=i,t.key_official_price=p.key_official_price,t.key_cost_price=p.key_cost_price):t.coupon=i,t.copy_key_batch_id=e.keyCodeId,Object(a.c)(e.plan_id,t).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.success("\u6210\u529f\u53d1\u8d77\u5ba1\u6279"),setTimeout((()=>{window.history.back()}),1e3)}),(e=>{c.a.error(e)}))}))}else{let t={reseller_id:e.reseller.id,reseller_name:e.reseller.name,company_name:e.reseller.company_name,receive_email:e.reseller.contact_email[0],payment_direction:e.payment_direction[e.payType-1]};1===e.keyType?t.code_batch=i:t.coupon=i,Object(a.Zb)(s,t).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.success("\u6210\u529f\u53d1\u8d77\u5ba1\u6279"),setTimeout((()=>{window.history.back()}),1e3)}),(e=>{c.a.error(e)}))}))}},S=()=>{1===e.keyType?(()=>{let t=e.distdata.filter((e=>!0===e.checked&&(-1===e.status||7===e.status||""===e.id||!e.id)));if("3"===e.KeyPcType||"2"===e.KeyPcType)k(0,t);else if(1===e.key_status)if(t.filter((e=>e.id&&""!==e.id)).length>0)k(1,t);else{let t=e.distdata.filter((e=>!0===e.checked&&!e.id));k(0,t)}else k(1,t)})():(()=>{let t=e.couponData.filter((e=>!0===e.checked&&(-1===e.status||7===e.status||""===e.id||!e.id)));if("3"===e.KeyPcType||"2"===e.KeyPcType)k(0,t);else if(1===e.key_status)if(e.couponData.filter((e=>e.id&&""!==e.id)).length>0)k(1,t);else{let t=e.couponData.filter((e=>!0===e.checked&&!e.id));k(0,t)}else k(1,t)})()};return Object(h.jsxDEV)("div",{id:"addkey",className:"addkey",style:{width:"98%",height:"auto",margin:"0 auto"},children:[Object(h.jsxDEV)(d.a,{title:e.pageTitle,children:Object(h.jsxDEV)(l.a,{model:p,rules:Ss,ref:i,children:[Object(h.jsxDEV)(s.a,{labelname:" key\u5f52\u5c5e\u8ba1\u5212",prop:"plan_title",id:"plan_title",children:Object(h.jsxDEV)("div",{className:"line-value",children:p.plan_title},void 0,!1,{fileName:ks,lineNumber:1075,columnNumber:13},void 0)},void 0,!1,{fileName:ks,lineNumber:1074,columnNumber:11},void 0),Object(h.jsxDEV)(s.a,{labelname:" key\u6279\u6b21\u540d\u79f0",prop:"batch_name",id:"batch_name",children:Object(h.jsxDEV)(n.a,{onChange:e=>{N({batch_name:e})},onClearItem:e=>{N({batch_name:""})},value:p.batch_name,placeholder:"\u8bf7\u8f93\u5165",labelWidth:"0px",maxLength:12,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:ks,lineNumber:1079,columnNumber:13},void 0)},void 0,!1,{fileName:ks,lineNumber:1078,columnNumber:11},void 0),Object(h.jsxDEV)(s.a,{labelname:" key\u6837\u5f0f",prop:"style",id:"style",children:Object(h.jsxDEV)(Q.a,{onChange:e=>{(e=>{O()||N({style:e.target.value})})(e)},value:p.style,disabled:O(),children:[Object(h.jsxDEV)(ne.a,{value:1,disabled:6==p.style,children:"\u4e32\u7801"},void 0,!1,{fileName:ks,lineNumber:1107,columnNumber:15},void 0),Object(h.jsxDEV)(ne.a,{value:2,disabled:6==p.style||2===e.settlement_type,children:"\u94fe\u63a5"},void 0,!1,{fileName:ks,lineNumber:1110,columnNumber:15},void 0),Object(h.jsxDEV)(ne.a,{value:4,disabled:6==p.style||2===e.settlement_type,children:"\u4e8c\u7ef4\u7801"},void 0,!1,{fileName:ks,lineNumber:1113,columnNumber:15},void 0),Object(h.jsxDEV)(ne.a,{value:6,disabled:6!=p.style,children:"\u767d\u540d\u5355"},void 0,!1,{fileName:ks,lineNumber:1116,columnNumber:15},void 0)]},void 0,!0,{fileName:ks,lineNumber:1100,columnNumber:13},void 0)},void 0,!1,{fileName:ks,lineNumber:1099,columnNumber:11},void 0),1===e.isSettlement?Object(h.jsxDEV)(s.a,{labelname:"\u6210\u672c\u4ef7",prop:"key_cost_price",id:"key_cost_price",children:Object(h.jsxDEV)(n.a,{onChange:e=>{N({key_cost_price:e})},onClearItem:e=>{N({key_cost_price:""})},value:p.key_cost_price,placeholder:"\u8bf7\u8f93\u5165",labelWidth:"0px",maxLength:12,height:"36px",disabled:"1"===e.KeyPcType,width:"520px",alignment:"left"},void 0,!1,{fileName:ks,lineNumber:1124,columnNumber:15},void 0)},void 0,!1,{fileName:ks,lineNumber:1123,columnNumber:13},void 0):null,1===e.isSettlement?Object(h.jsxDEV)(s.a,{labelname:"\u5b98\u65b9\u4ef7",prop:"key_official_price",id:"key_official_price",children:Object(h.jsxDEV)(n.a,{onChange:e=>{N({key_official_price:e})},onClearItem:e=>{N({key_official_price:""})},value:p.key_official_price,placeholder:"\u8bf7\u8f93\u5165",labelWidth:"0px",disabled:"1"===e.KeyPcType,maxLength:12,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:ks,lineNumber:1149,columnNumber:15},void 0)},void 0,!1,{fileName:ks,lineNumber:1148,columnNumber:13},void 0):null,"1"===e.KeyPcType?null:Object(h.jsxDEV)(s.a,{labelname:"key\u6570\u91cf",prop:"quantity",id:"quantity",children:Object(h.jsxDEV)("div",{className:"key_number",children:[Object(h.jsxDEV)(n.a,{onChange:e=>{N({quantity:e})},value:p.quantity,disabled:6===p.style,placeholder:"\u8bf7\u8f93\u5165",labelWidth:"0px",maxLength:5,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:ks,lineNumber:1175,columnNumber:17},void 0),e.white_visible?Object(h.jsxDEV)(u.a,{type:"primary",onClick:e=>{t({file_loading:!1,fail_visible:!1,success_visible:!1,import_visible:!1,upload_visible:!1,excel_visible:!1,accessVerify:!1}),t({import_visible:!0})},children:"\u5bfc\u5165\u767d\u540d\u5355"},void 0,!1,{fileName:ks,lineNumber:1192,columnNumber:19},void 0):null]},void 0,!0,{fileName:ks,lineNumber:1174,columnNumber:15},void 0)},void 0,!1,{fileName:ks,lineNumber:1173,columnNumber:13},void 0),Object(h.jsxDEV)(s.a,{labelname:"key\u7801\u6709\u6548\u671f",prop:"expiration_type",id:"expiration_type",children:Object(h.jsxDEV)(Z.a.Group,{value:p.expiration_type,disabled:"1"===e.KeyPcType,onChange:e=>{N({expiration_value:"",expiration_type:e.target.value})},children:[Object(h.jsxDEV)(Z.a,{value:"1",children:"\u4e0d\u8bbe\u7f6e"},void 0,!1,{fileName:ks,lineNumber:1217,columnNumber:15},void 0),Object(h.jsxDEV)(Z.a,{value:"2",children:"\u56fa\u5b9a\u65f6\u95f4\u6bb5"},void 0,!1,{fileName:ks,lineNumber:1218,columnNumber:15},void 0),Object(h.jsxDEV)(Z.a,{value:"3",children:"\u63a5\u53e3\u8c03\u53d6\u540e\u6709\u6548\u671f"},void 0,!1,{fileName:ks,lineNumber:1219,columnNumber:15},void 0)]},void 0,!0,{fileName:ks,lineNumber:1207,columnNumber:13},void 0)},void 0,!1,{fileName:ks,lineNumber:1206,columnNumber:11},void 0),"2"===p.expiration_type?Object(h.jsxDEV)(s.a,{labelname:"\u56fa\u5b9a\u65f6\u95f4\u6bb5",children:Object(h.jsxDEV)(ee.a,{disabled:"1"===e.KeyPcType,className:"zent-datepicker-plan",showTime:{format:"HH:mm:ss",defaultTime:[Y()().format("HH:mm:ss"),"23:59:59"]},format:"YYYY-MM-DD HH:mm:ss",value:p.expiration_value,onChange:e=>{N({expiration_value:e})},disabledDate:(e,t)=>{let i=JSON.parse(sessionStorage.getItem("knockGold_effectDate")),a=!1,s=Y()(e).format("YYYY-MM-DD HH:mm:ss"),l=Y()(i.end_time).format("HH:mm:ss");return"start"==t&&(a=l<"23:59:59"?Y()(s).isBefore(i.begin_time)||Y()(s).subtract(1,"days").isAfter(i.end_time):Y()(s).isBefore(i.begin_time)||Y()(s).isAfter(i.end_time)),"end"==t&&(a=Y()(s).add(1,"days").isBefore(i.begin_time)||Y()(s).isAfter(i.end_time)),a}},void 0,!1,{fileName:ks,lineNumber:1225,columnNumber:15},void 0)},void 0,!1,{fileName:ks,lineNumber:1224,columnNumber:13},void 0):null,"3"===p.expiration_type?Object(h.jsxDEV)(s.a,{labelname:"\u63a5\u53e3\u8c03\u53d6\u540e\u6709\u6548\u671f",children:Object(h.jsxDEV)(Di.a,{disabled:"1"===e.KeyPcType,placeholder:"\u8bf7\u8f93\u5165\u5929\u6570",value:p.expiration_value,width:120,maxLength:5,onChange:e=>{let t=sessionStorage.getItem("knockGold_effectDate");if(t){t=JSON.parse(t);let i=new Date(t.begin_time),a=new Date(t.end_time).getTime()-i.getTime(),s=Math.ceil(a/864e5);if(!(s>=Number(e.target.value)))return void c.a.error(`key\u7801\u6709\u6548\u671f\u4e0d\u80fd\u8d85\u8fc7\u8ba1\u5212\u6709\u6548\u671f(${s}\u5929)`);N({expiration_value:e.target.value})}}},void 0,!1,{fileName:ks,lineNumber:1246,columnNumber:15},void 0)},void 0,!1,{fileName:ks,lineNumber:1245,columnNumber:13},void 0):null,"3"===e.KeyPcType||"2"===e.KeyPcType?null:Object(h.jsxDEV)(s.a,{labelname:"key\u53d1\u653e",prop:"quantity",id:"quantity",children:Object(h.jsxDEV)(n.a,{onChange:e=>{N({quantity:e})},value:p.quantity,disabled:6===p.style||"1"===e.KeyPcType,placeholder:"\u8bf7\u8f93\u5165",labelWidth:"0px",maxLength:5,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:ks,lineNumber:1284,columnNumber:15},void 0)},void 0,!1,{fileName:ks,lineNumber:1283,columnNumber:13},void 0),1===e.key_status||"3"===e.KeyPcType||"2"===e.KeyPcType?null:Object(h.jsxDEV)(s.a,{labelname:"key\u5269\u4f59",prop:"stock",id:"stock",children:Object(h.jsxDEV)(n.a,{onChange:e=>{},value:p.stock,disabled:!0,placeholder:"\u8bf7\u8f93\u5165",labelWidth:"0px",maxLength:5,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:ks,lineNumber:1304,columnNumber:15},void 0)},void 0,!1,{fileName:ks,lineNumber:1303,columnNumber:13},void 0),Object(h.jsxDEV)(s.a,{labelname:"\u7ed1\u5b9a\u7c7b\u578b",prop:"bind_object",id:"bind_object",children:Object(h.jsxDEV)(Z.a.Group,{value:e.keyType,disabled:!0,onChange:e=>{},children:[Object(h.jsxDEV)(Z.a,{value:1,children:"\u5151\u6362\u7801"},void 0,!1,{fileName:ks,lineNumber:1320,columnNumber:15},void 0),Object(h.jsxDEV)(Z.a,{value:2,children:"\u4f18\u60e0\u5238"},void 0,!1,{fileName:ks,lineNumber:1321,columnNumber:15},void 0)]},void 0,!0,{fileName:ks,lineNumber:1319,columnNumber:13},void 0)},void 0,!1,{fileName:ks,lineNumber:1318,columnNumber:11},void 0),Object(h.jsxDEV)(s.a,{labelname:"",prop:"btn",required:!1,children:1===e.keyType?Object(h.jsxDEV)(h.Fragment,{children:[Object(h.jsxDEV)(u.a,{disabled:1===e.isSettlement&&e.distdata.length>=1,onClick:t=>{e.settlement_type>0&&e.distdata.length>=1?c.a.error("\u53ea\u80fd\u521b\u5efa\u4e00\u4e2a\u5151\u6362\u7801"):D(0)},children:"\u65b0\u5efa\u5151\u6362\u7801"},void 0,!1,{fileName:ks,lineNumber:1328,columnNumber:17},void 0),Object(h.jsxDEV)(Ei.a,{trigger:"hover",content:"\u4e00\u6b21\u6027\u5145\u503c\u591a\u5f20\u7acb\u51cf\u91d1",children:Object(h.jsxDEV)(u.a,{disabled:1===e.isSettlement&&e.distdata.length>=1||1===e.isSettlement&&e.settlementData&&7===e.settlementData.key,onClick:t=>{e.settlement_type>0&&e.distdata.length>=1?c.a.error("\u53ea\u80fd\u521b\u5efa\u4e00\u4e2a\u5151\u6362\u7801"):D(2)},children:"\u65b0\u5efa\u7ec4\u5408\u5546\u54c1"},void 0,!1,{fileName:ks,lineNumber:1343,columnNumber:19},void 0)},void 0,!1,{fileName:ks,lineNumber:1342,columnNumber:17},void 0)]},void 0,!0):Object(h.jsxDEV)(u.a,{onClick:e=>{D(1)},children:"\u65b0\u5efa\u4f18\u60e0\u5238"},void 0,!1,{fileName:ks,lineNumber:1365,columnNumber:15},void 0)},void 0,!1,{fileName:ks,lineNumber:1325,columnNumber:11},void 0),Object(h.jsxDEV)(s.a,{labelname:"\u7ed1\u5b9a\u5bf9\u8c61",prop:"grid",children:Object(h.jsxDEV)(I,{ref:o,headBackgroud:"#f9fafc",isShowPageBar:!1,spliteColor:"#fff",tableData:1===e.keyType?e.distdata:e.couponData,Column:1===e.keyType?e.Column:e.Column_coupon,countbarVisible:!1,isBorder:!0,isSwitch:!1,pageChange:e=>{},checkChange:e=>{},ComponentHandler:(i,a,s)=>{if("restrict"==i)return Object(h.jsxDEV)(Di.a,{placeholder:"\u8bf7\u8f93\u5165\u6570\u91cf",value:1===e.isSettlement?1:a.restrict,disabled:a.disabled||2==a.recharge_type||1===e.isSettlement,maxLength:5,onChange:i=>{((i,a,s)=>{1===e.keyType?(e.distdata[s].restrict=i.target.value,t({distdata:e.distdata})):(e.couponData[s].restrict=i.target.value,t({couponData:e.couponData}))})(i,0,s)}},void 0,!1,{fileName:ks,lineNumber:1391,columnNumber:21},void 0);if("product"===i)return(e=>{var t;let i=e.legal.map((e=>e.product_name)),a=e.reduce.map((e=>e.batch_goods_name)),s=null===(t=e.cash)||void 0===t?void 0:t.map((e=>e.batch_goods_name)),l=i.concat(a,s);return l=l.join(","),Object(h.jsxDEV)("span",{children:l},void 0,!1,{fileName:ks,lineNumber:602,columnNumber:12},void 0)})(a.product);if("edit"===i){let i=Object(h.jsxDEV)("span",{onClick:i=>{((i,a)=>{1===e.keyType?2==i.recharge_type?t({draw_title:"\u7f16\u8f91\u7ec4\u5408\u5546\u54c1",rowIndex:a,rowExChangeData:i,drawerVisible:!0,exchangeType:2}):t({draw_title:"\u7f16\u8f91\u5151\u6362\u7801",rowIndex:a,rowExChangeData:i,drawerVisible:!0,exchangeType:1}):t({draw_title:"\u7f16\u8f91\u4f18\u60e0\u5238",rowIndex:a,rowCouponData:i,drawerVisible:!0})})(a,s)},style:{color:"#2B66F2"},children:"\u7f16\u8f91"},void 0,!1,{fileName:ks,lineNumber:1410,columnNumber:21},void 0),l=Object(h.jsxDEV)("span",{style:{color:"#d6d6d6"},children:"\u7f16\u8f91"},void 0,!1,{fileName:ks,lineNumber:1419,columnNumber:30},void 0);return a.disabled?l:i}}},void 0,!1,{fileName:ks,lineNumber:1376,columnNumber:13},void 0)},void 0,!1,{fileName:ks,lineNumber:1375,columnNumber:11},void 0),Object(h.jsxDEV)(s.a,{labelname:"\u91cd\u590d\u9009\u62e9\u5546\u54c1",id:"allow_repetition",prop:"allow_repetition",children:Object(h.jsxDEV)(Q.a,{disabled:O(),onChange:e=>(e=>{N({allow_repetition:e.target.value})})(e),value:p.allow_repetition,children:[Object(h.jsxDEV)(ne.a,{value:1,children:"\u662f"},void 0,!1,{fileName:ks,lineNumber:1431,columnNumber:15},void 0),Object(h.jsxDEV)(ne.a,{value:0,children:"\u5426"},void 0,!1,{fileName:ks,lineNumber:1432,columnNumber:15},void 0)]},void 0,!0,{fileName:ks,lineNumber:1426,columnNumber:13},void 0)},void 0,!1,{fileName:ks,lineNumber:1425,columnNumber:11},void 0),Object(h.jsxDEV)(s.a,{labelname:"\u662f\u5426\u5141\u8bb8\u4e8f\u635f",id:"allow_loss",prop:"allow_loss",children:Object(h.jsxDEV)(Q.a,{disabled:O(),onChange:e=>(e=>{N({allow_loss:e.target.value})})(e),value:p.allow_loss,children:[Object(h.jsxDEV)(ne.a,{value:1,children:"\u662f"},void 0,!1,{fileName:ks,lineNumber:1442,columnNumber:15},void 0),Object(h.jsxDEV)(ne.a,{value:0,children:"\u5426"},void 0,!1,{fileName:ks,lineNumber:1443,columnNumber:15},void 0)]},void 0,!0,{fileName:ks,lineNumber:1437,columnNumber:13},void 0)},void 0,!1,{fileName:ks,lineNumber:1436,columnNumber:11},void 0)]},void 0,!0,{fileName:ks,lineNumber:1073,columnNumber:9},void 0)},void 0,!1,{fileName:ks,lineNumber:1072,columnNumber:7},void 0),Object(h.jsxDEV)("div",{style:{marginTop:"15px"},children:[Object(h.jsxDEV)(u.a,{type:"primary",onClick:()=>V(),children:"\u63d0\u4ea4\u5ba1\u6838"},void 0,!1,{fileName:ks,lineNumber:1449,columnNumber:9},void 0),Object(h.jsxDEV)(u.a,{type:"normal",onClick:()=>{G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:"\u662f\u5426\u53d6\u6d88\u672c\u6b21\u64cd\u4f5c\uff1f"},void 0,!1,{fileName:ks,lineNumber:831,columnNumber:16},void 0),onConfirm:()=>{window.history.back()},onCancel:()=>{},className:"questModal",parentComponent:void 0})},children:"\u53d6\u6d88"},void 0,!1,{fileName:ks,lineNumber:1452,columnNumber:9},void 0)]},void 0,!0,{fileName:ks,lineNumber:1448,columnNumber:7},void 0),Object(h.jsxDEV)(bt.a,{width:"90%",title:e.draw_title,footer:Object(h.jsxDEV)("div",{style:{textAlign:"center"},children:[Object(h.jsxDEV)(u.a,{type:"primary",onClick:i=>{(()=>{if(2!==e.keyType){if(1!==e.keyType);else if(m.current.submit()){let i=m.current.getModel();if(1===e.isSettlement&&(i.restrict="1"),1===e.isSettlement&&2!==e.exchangeType&&[...i.product.legal,...i.product.reduce,...i.product.cash].length>1&&!sessionStorage.getItem("has_combining"))return void c.a.error("\u5305\u7801\u53ea\u80fd\u521b\u5efa\u4e00\u4e2a\u5546\u54c1");let a=e.distdata;e.rowIndex>-1?(a[e.rowIndex]=i,t({distdata:a})):(a.push(i),t({distdata:a})),t({drawerVisible:!1})}}else if(b.current.submit()){let i=b.current.getModel(),a=e.couponData;e.rowIndex>-1?(a[e.rowIndex]=i,t({couponData:a})):(a.push(i),t({couponData:a})),t({drawerVisible:!1})}})()},children:"\u63d0\u4ea4"},void 0,!1,{fileName:ks,lineNumber:1462,columnNumber:13},void 0),Object(h.jsxDEV)(u.a,{onClick:e=>{E()},children:"\u53d6\u6d88"},void 0,!1,{fileName:ks,lineNumber:1470,columnNumber:13},void 0)]},void 0,!0,{fileName:ks,lineNumber:1461,columnNumber:11},void 0),visible:e.drawerVisible,onClose:e=>{E()},maskClosable:!1,children:function(){return 1===e.keyType?1===e.exchangeType?Object(h.jsxDEV)(ms,{direct_reseller_id:e.direct_reseller_id,editData:e.rowExChangeData,ref:m,isSettlement:e.isSettlement,settlementData:e.settlementData},void 0,!1,{fileName:ks,lineNumber:1044,columnNumber:11},this):Object(h.jsxDEV)(ps,{propsData:e.rowExChangeData,ref:m},void 0,!1,{fileName:ks,lineNumber:1053,columnNumber:16},this):Object(h.jsxDEV)(wt,{couponType:1,editData:e.rowCouponData,isAuditButton:!1,ref:b,direct_reseller_id:e.direct_reseller_id},void 0,!1,{fileName:ks,lineNumber:1057,columnNumber:9},this)}()},void 0,!1,{fileName:ks,lineNumber:1457,columnNumber:7},void 0),e.audit_visible?Object(h.jsxDEV)("div",{className:"audit",children:[Object(h.jsxDEV)("div",{className:"modal",children:" "},void 0,!1,{fileName:ks,lineNumber:1490,columnNumber:11},void 0),Object(h.jsxDEV)("div",{className:"audit-box",children:[Object(h.jsxDEV)(g.a,{type:"close",className:"audit-close",onClick:e=>{t({audit_visible:!1})}},void 0,!1,{fileName:ks,lineNumber:1492,columnNumber:13},void 0),Object(h.jsxDEV)("div",{className:"audit-box-title",children:"\u63d0\u4ea4\u5ba1\u6838"},void 0,!1,{fileName:ks,lineNumber:1501,columnNumber:13},void 0),Object(h.jsxDEV)("div",{className:"payType",children:Object(h.jsxDEV)(Q.a,{onChange:e=>{(e=>{t({payType:e.target.value})})(e)},value:e.payType,className:"audit-obj",children:[Object(h.jsxDEV)(Z.a,{value:3,children:"\u9884\u4ed8\u6b3e\u6263\u9664"},void 0,!1,{fileName:ks,lineNumber:1510,columnNumber:17},void 0),Object(h.jsxDEV)(Z.a,{value:1,children:"\u5bf9\u79c1\u8d26\u6237"},void 0,!1,{fileName:ks,lineNumber:1511,columnNumber:17},void 0),Object(h.jsxDEV)(Z.a,{value:2,children:"\u5bf9\u516c\u8d26\u6237"},void 0,!1,{fileName:ks,lineNumber:1512,columnNumber:17},void 0)]},void 0,!0,{fileName:ks,lineNumber:1503,columnNumber:15},void 0)},void 0,!1,{fileName:ks,lineNumber:1502,columnNumber:13},void 0),Object(h.jsxDEV)("div",{className:"audit-btn-group",children:[Object(h.jsxDEV)(u.a,{onClick:e=>{t({audit_visible:!1})},children:"\u53d6\u6d88"},void 0,!1,{fileName:ks,lineNumber:1516,columnNumber:15},void 0),Object(h.jsxDEV)(u.a,{type:"primary",onClick:e=>{S()},children:"\u786e\u5b9a"},void 0,!1,{fileName:ks,lineNumber:1525,columnNumber:15},void 0)]},void 0,!0,{fileName:ks,lineNumber:1515,columnNumber:13},void 0)]},void 0,!0,{fileName:ks,lineNumber:1491,columnNumber:11},void 0)]},void 0,!0,{fileName:ks,lineNumber:1489,columnNumber:9},void 0):null,e.import_visible?Object(h.jsxDEV)("div",{children:[Object(h.jsxDEV)("div",{className:"modal"},void 0,!1,{fileName:ks,lineNumber:1541,columnNumber:11},void 0),Object(h.jsxDEV)("div",{className:"import-excel",children:[Object(h.jsxDEV)("div",{className:"import-header",children:[Object(h.jsxDEV)("div",{className:"import-title",children:"\u4eceExcel\u5bfc\u5165\u767d\u540d\u5355"},void 0,!1,{fileName:ks,lineNumber:1544,columnNumber:15},void 0),Object(h.jsxDEV)(g.a,{type:"close",className:"import-close",onClick:e=>{t({import_visible:!1})}},void 0,!1,{fileName:ks,lineNumber:1546,columnNumber:15},void 0)]},void 0,!0,{fileName:ks,lineNumber:1543,columnNumber:13},void 0),Object(h.jsxDEV)("div",{className:"step-bar",children:[Object(h.jsxDEV)("div",{className:"step-group",children:[Object(h.jsxDEV)("div",{className:"step-code active",children:"1"},void 0,!1,{fileName:ks,lineNumber:1556,columnNumber:17},void 0),Object(h.jsxDEV)("span",{className:"step-label active",children:"\u4e0a\u4f20\u6587\u4ef6"},void 0,!1,{fileName:ks,lineNumber:1557,columnNumber:17},void 0)]},void 0,!0,{fileName:ks,lineNumber:1555,columnNumber:15},void 0),Object(h.jsxDEV)("div",{className:"step-center",children:Object(h.jsxDEV)("div",{className:"step-line"},void 0,!1,{fileName:ks,lineNumber:1560,columnNumber:17},void 0)},void 0,!1,{fileName:ks,lineNumber:1559,columnNumber:15},void 0),Object(h.jsxDEV)("div",{className:"step-group",children:[Object(h.jsxDEV)("div",{className:"step-code",children:"2"},void 0,!1,{fileName:ks,lineNumber:1563,columnNumber:17},void 0),Object(h.jsxDEV)("span",{className:"step-label",children:"\u5bfc\u5165\u5b8c\u6210"},void 0,!1,{fileName:ks,lineNumber:1564,columnNumber:17},void 0)]},void 0,!0,{fileName:ks,lineNumber:1562,columnNumber:15},void 0)]},void 0,!0,{fileName:ks,lineNumber:1554,columnNumber:13},void 0),Object(h.jsxDEV)("div",{className:"upload-panel1",children:[Object(h.jsxDEV)("div",{className:"upload-label",children:"\u76f4\u63a5\u4e0a\u4f20"},void 0,!1,{fileName:ks,lineNumber:1569,columnNumber:15},void 0),Object(h.jsxDEV)("div",{className:"upload-info",children:[Object(h.jsxDEV)("div",{children:"\u652f\u6301\u6587\u4ef6\u7c7b\u578b\uff1axls\uff0cxlsx\uff0ccsv"},void 0,!1,{fileName:ks,lineNumber:1572,columnNumber:17},void 0),Object(h.jsxDEV)("div",{children:"- \u652f\u6301\u6240\u6709\u57fa\u7840\u5b57\u6bb5\u7684\u5bfc\u5165\uff0c\u4e00\u6b21\u81f3\u591a\u5bfc\u5165 10000 \u6761\u624b\u673a\u53f7\uff08\u4e0d\u7b26\u5408\u89c4\u5219\u6574\u6761\u4efb\u52a1\u4e0d\u4e88\u4ee5\u5bfc\u5165\uff09"},void 0,!1,{fileName:ks,lineNumber:1573,columnNumber:17},void 0)]},void 0,!0,{fileName:ks,lineNumber:1571,columnNumber:15},void 0)]},void 0,!0,{fileName:ks,lineNumber:1568,columnNumber:13},void 0),e.upload_visible?Object(h.jsxDEV)("div",{children:[Object(h.jsxDEV)("div",{className:"upload-msgbar",children:[Object(h.jsxDEV)("div",{className:"execel-name",children:[Object(h.jsxDEV)(g.a,{type:"text-guide-o",className:"doc-flag"},void 0,!1,{fileName:ks,lineNumber:1583,columnNumber:21},void 0),Object(h.jsxDEV)("span",{className:"excel-txt",children:e.myfile.name},void 0,!1,{fileName:ks,lineNumber:1584,columnNumber:21},void 0)]},void 0,!0,{fileName:ks,lineNumber:1582,columnNumber:19},void 0),e.file_loading?Object(h.jsxDEV)("div",{className:"file-tag",children:[Object(h.jsxDEV)(g.a,{type:"loading",spin:!0,className:"file-loading"},void 0,!1,{fileName:ks,lineNumber:1589,columnNumber:23},void 0),Object(h.jsxDEV)("span",{className:"excel-txt",children:"\u89e3\u6790\u4e2d "},void 0,!1,{fileName:ks,lineNumber:1590,columnNumber:23},void 0)]},void 0,!0,{fileName:ks,lineNumber:1588,columnNumber:21},void 0):Object(h.jsxDEV)("div",{className:"file-tag",children:[Object(h.jsxDEV)("input",{type:"file",className:"upload-input",onChange:e=>_(e)},void 0,!1,{fileName:ks,lineNumber:1594,columnNumber:23},void 0),Object(h.jsxDEV)(g.a,{type:"up-circle-o",className:"upload-flag"},void 0,!1,{fileName:ks,lineNumber:1595,columnNumber:23},void 0),Object(h.jsxDEV)("span",{className:"excel-txt",children:"\u66f4\u65b0\u6587\u4ef6 "},void 0,!1,{fileName:ks,lineNumber:1596,columnNumber:23},void 0)]},void 0,!0,{fileName:ks,lineNumber:1593,columnNumber:21},void 0)]},void 0,!0,{fileName:ks,lineNumber:1581,columnNumber:17},void 0),e.success_visible?Object(h.jsxDEV)("div",{className:"file-tip success",children:[Object(h.jsxDEV)(g.a,{type:"check-circle",className:"success-icon"},void 0,!1,{fileName:ks,lineNumber:1602,columnNumber:21},void 0),"\u6587\u4ef6\u89e3\u6790\u6210\u529f,\u70b9\u51fb\u786e\u5b9a\u5bfc\u5165 \u5373\u53ef\u5bfc\u5165"]},void 0,!0,{fileName:ks,lineNumber:1601,columnNumber:19},void 0):null,e.fail_visible?Object(h.jsxDEV)("div",{className:"file-tip error",children:[Object(h.jsxDEV)(g.a,{type:"error-circle",className:"error-icon"},void 0,!1,{fileName:ks,lineNumber:1608,columnNumber:21},void 0),"\u6587\u4ef6\u89e3\u6790\u5931\u8d25,\u8bf7\u67e5\u770b\u5bfc\u5165\u89c4\u5219\u5e76\u66f4\u65b0\u6587\u4ef6"]},void 0,!0,{fileName:ks,lineNumber:1607,columnNumber:19},void 0):null]},void 0,!0,{fileName:ks,lineNumber:1580,columnNumber:15},void 0):Object(h.jsxDEV)("div",{children:[Object(h.jsxDEV)("input",{type:"file",className:"upload-input",onChange:e=>_(e)},void 0,!1,{fileName:ks,lineNumber:1615,columnNumber:17},void 0),Object(h.jsxDEV)(u.a,{className:"btn-upload",style:{background:"#1890ff",color:"#FFFFFF",border:"none"},children:"\u4e0a\u4f20\u6587\u4ef6"},void 0,!1,{fileName:ks,lineNumber:1616,columnNumber:17},void 0)," "]},void 0,!0,{fileName:ks,lineNumber:1614,columnNumber:15},void 0),Object(h.jsxDEV)("div",{className:"upload-panel1",children:[Object(h.jsxDEV)("div",{className:"upload-label",children:"\u4e0b\u8f7d\u6a21\u677f\u5e76\u586b\u5199\u540e\u4e0a\u4f20"},void 0,!1,{fileName:ks,lineNumber:1630,columnNumber:15},void 0),Object(h.jsxDEV)("div",{className:"upload-info",children:Object(h.jsxDEV)("div",{children:"\u8bf7\u5148\u4e0b\u8f7d\u300c\u6570\u5b57\u4e16\u754c\u8425\u9500\u7ba1\u7406\u7cfb\u7edf_\u767d\u540d\u5355_\u6a21\u677f\u300d\u5e76\u6309\u7167\u6a21\u677f\u586b\u5199\u540e\u518d\u4e0a\u4f20\u3002"},void 0,!1,{fileName:ks,lineNumber:1633,columnNumber:17},void 0)},void 0,!1,{fileName:ks,lineNumber:1632,columnNumber:15},void 0)]},void 0,!0,{fileName:ks,lineNumber:1629,columnNumber:13},void 0),Object(h.jsxDEV)(u.a,{type:"default",className:"btn-download",onClick:e=>{window.location.href="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/%E7%99%BD%E5%90%8D%E5%8D%95%E6%A8%A1%E6%9D%BF.xlsx"},children:"\u4e0b\u8f7d\u6a21\u677f"},void 0,!1,{fileName:ks,lineNumber:1636,columnNumber:13},void 0),Object(h.jsxDEV)("div",{className:"foot-bar",children:Object(h.jsxDEV)("div",{className:"btn-group",children:[Object(h.jsxDEV)(u.a,{type:"default",onClick:e=>{t({import_visible:!1})},children:"\u53d6\u6d88"},void 0,!1,{fileName:ks,lineNumber:1647,columnNumber:17},void 0),Object(h.jsxDEV)(u.a,{type:"primary",onClick:i=>{e.file_loading?c.a.error("\u6587\u4ef6\u6b63\u5728\u89e3\u6790\u4e2d\u8bf7\u7a0d\u7b49"):e.success_visible?t({excel_visible:!0,accessVerify:!1,import_visible:!1}):c.a.error("\u8bf7\u4e0a\u4f20\u6b63\u786e\u7684\u6587\u4ef6")},style:{background:"#1890ff",color:"#FFFFFF",border:"none"},children:"\u786e\u5b9a\u5bfc\u5165"},void 0,!1,{fileName:ks,lineNumber:1655,columnNumber:17},void 0)]},void 0,!0,{fileName:ks,lineNumber:1646,columnNumber:15},void 0)},void 0,!1,{fileName:ks,lineNumber:1645,columnNumber:13},void 0)]},void 0,!0,{fileName:ks,lineNumber:1542,columnNumber:11},void 0)]},void 0,!0,{fileName:ks,lineNumber:1540,columnNumber:9},void 0):null,e.excel_visible?Object(h.jsxDEV)("div",{children:[Object(h.jsxDEV)("div",{className:"modal"},void 0,!1,{fileName:ks,lineNumber:1676,columnNumber:11},void 0),Object(h.jsxDEV)("div",{className:"import-excel",children:[Object(h.jsxDEV)("div",{className:"import-header",children:[Object(h.jsxDEV)("div",{className:"import-title",children:"\u4eceExcel\u5bfc\u5165\u767d\u540d\u5355"},void 0,!1,{fileName:ks,lineNumber:1679,columnNumber:15},void 0),Object(h.jsxDEV)(g.a,{type:"close",className:"import-close",onClick:e=>{t({excel_visible:!1})}},void 0,!1,{fileName:ks,lineNumber:1680,columnNumber:15},void 0)]},void 0,!0,{fileName:ks,lineNumber:1678,columnNumber:13},void 0),Object(h.jsxDEV)("div",{className:"file-upload-tip",children:["\u6587\u4ef6\u4e0a\u4f20\u6210\u529f.\u5171",e.excel_count,"\u6761\u624b\u673a\u53f7,\u5176\u4e2d",e.success_count,"\u6761\u53ef\u6210\u529f\u5bfc\u5165"]},void 0,!0,{fileName:ks,lineNumber:1688,columnNumber:13},void 0),Object(h.jsxDEV)("div",{className:"file-errmsg",children:["\u53d1\u73b0\u4ee5\u4e0b",e.error_count,"\u6761\u4e0d\u7b26\u5408\u8981\u6c42,\u5c06\u4e0d\u4f1a\u88ab\u5bfc\u5165"]},void 0,!0,{fileName:ks,lineNumber:1692,columnNumber:13},void 0),Object(h.jsxDEV)("div",{},void 0,!1,{fileName:ks,lineNumber:1694,columnNumber:13},void 0),Object(h.jsxDEV)("div",{className:"gridpanel",children:Object(h.jsxDEV)(I,{headBackgroud:"#f9fafc",isShowPageBar:!1,spliteColor:"#fff",tableData:e.exceldata,value:e.exceldata,Column:ws,maxheight:200,isMultiple:!1,countbarVisible:!1,isBorder:!0,isSwitch:!1,pageChange:e=>{(void 0).pageChange(e)},ComponentHandler:(e,t,i)=>{if("is_import"==e){if("success"==t.type||"repeat"==t.type){let e="success"==t.type;return Object(h.jsxDEV)(v.a,{checked:e,onChange:e=>{((e,t)=>{t.type=e?"success":"success"==t.type?"repeat":"error"})(e,t)}},void 0,!1,{fileName:ks,lineNumber:1717,columnNumber:25},void 0)}return Object(h.jsxDEV)("div",{className:"isImport",children:"-"},void 0,!1,{fileName:ks,lineNumber:1725,columnNumber:30},void 0)}}},void 0,!1,{fileName:ks,lineNumber:1697,columnNumber:15},void 0)},void 0,!1,{fileName:ks,lineNumber:1696,columnNumber:13},void 0),Object(h.jsxDEV)("div",{className:"foot-bar",children:Object(h.jsxDEV)("div",{className:"btn-group",children:[Object(h.jsxDEV)(u.a,{type:"default",onClick:e=>{t({import_visible:!0,excel_visible:!1,accessVerify:!0})},children:"\u91cd\u65b0\u4e0a\u4f20"},void 0,!1,{fileName:ks,lineNumber:1733,columnNumber:17},void 0),Object(h.jsxDEV)(u.a,{type:"primary",onClick:i=>{(()=>{let i=e.exceldata.filter((e=>"success"==e.type)),a=Object(f.a)(i,(e=>e.mobile));N({quantity:e.excel_count-e.error_count+a.length}),t({mobile_repeat:a,accessVerify:!1,model:p,excel_visible:!1,import_visible:!1,import_success:!0})})()},style:{background:"#1890ff",color:"#FFFFFF",border:"none"},children:"\u786e\u5b9a\u5bfc\u5165"},void 0,!1,{fileName:ks,lineNumber:1741,columnNumber:17},void 0)]},void 0,!0,{fileName:ks,lineNumber:1732,columnNumber:15},void 0)},void 0,!1,{fileName:ks,lineNumber:1731,columnNumber:13},void 0)]},void 0,!0,{fileName:ks,lineNumber:1677,columnNumber:11},void 0)]},void 0,!0,{fileName:ks,lineNumber:1675,columnNumber:9},void 0):null]},void 0,!0,{fileName:ks,lineNumber:1071,columnNumber:5},void 0)},Ts=(i(252),"/Users/zhangds/web/blue-brother/frontend/src/pages/plan/key/detail/list.js");class Is extends m.a.Component{constructor(e){super(e),this.state={dataCount:0,page:1,limit:10,tabList:[{title:"\u5168\u90e8",index:0},{title:"\u53ef\u4f7f\u7528",index:1},{title:"\u5df2\u4f7f\u7528",index:2},{title:"\u5df2\u5b8c\u7ed3",index:3},{title:"\u5df2\u4f5c\u5e9f",index:4}],distdata:[{title:"\u58eb\u5927\u592b\u5927\u5e08\u5085"}],filterList:[{id:0,label:"\u72b6\u6001",prop:"status",menuList:[{id:999,name:"\u5168\u90e8"},{id:0,name:"\u521b\u5efa\u4e2d"},{id:2,name:"\u5ba1\u6838\u4e2d"},{id:3,name:"\u5f85\u751f\u6548"},{id:4,name:"\u8fdb\u884c\u4e2d"},{id:5,name:"\u6682\u505c\u4e2d"},{id:6,name:"\u5df2\u5b8c\u7ed3"}]}],tableHeight:500,menuList:[{id:0,name:"\u72b6\u6001",check:!1}],phone_list:[],email_list:[],phone:"",email:"",email_radio:-1,phone_radio:-1,search:"",audit_visible:!1,cur_item:null,selectiondata:[],plan_id:0,grantTotal:0,surplusTotal:0,usageTotal:0,silentTotal:0,receive_total:0,usage_total:0,outdateTotal:0,invalidTotal:0,multiple:!0}}onPageChange(e){this.setState({page:e}),setTimeout((()=>{this.getpageFn()}),0)}componentWillMount(){this.setState({tableHeight:window.innerHeight-430})}getKeyCodeList(e){let t=Object(Lt.a)(e,(e=>Object(Ht.a)(e)||Object(qt.a)(e))),i=sessionStorage.getItem("key_batch_id");Object(a.Pb)(i,t).then((e=>{Object(a.Tb)(e,((e,t)=>{this.setState({distdata:e.data}),this.setState({dataCount:e.total})}),(e=>{}))}))}onCountChange(e){this.setState({page:1,limit:e}),setTimeout((()=>{this.getpageFn()}),0)}getpageFn(){let e={page:this.state.page,limit:this.state.limit,key:this.state.key},t=this.state.status>0?this.state.status:null;t&&(e.status=t),this.getKeyCodeList(e)}clearFn(){this.refs.plan_list.allChecked(!1),this.setState({selectiondata:[],multiple:!0})}selection(e){e.length>0?this.setState({multiple:!1}):this.setState({multiple:!0}),this.setState({selectiondata:e});let t=0,i=0,a=0,s=0,l=0,n=0,o=0;e.forEach((e=>{t+=Number(e.total),i+=Number(e.residue),a+=Number(e.usage),o+=Number(e.overdue),n+=Number(e.invalid),s+=Number(e.usage_total),l+=Number(e.silent_total)})),this.setState({grantTotal:t,usageTotal:a,invalidTotal:n,outdateTotal:o,surplusTotal:i})}componentDidUpdate(e,t){t.search==this.state.search||this.state.search||this.iptsureFn()}iptsureFn(e){let t=this.state.status>0?this.state.status:null;this.setState({limit:10,page:1});let i={page:1,limit:10,key:this.state.search};t&&(i.status=t),this.getKeyCodeList(i)}onFilterClose(e){let t={};t[e]=null,this.setState(t);let i={page:1,limit:10,key:this.state.search};this.getKeyCodeList(i)}tabFn(e){let t=e>0?e:null;this.setState({limit:10,page:1,search:"",status:e});let i={page:1,limit:10,status:t};this.getKeyCodeList(i)}keyCancelFun(e){let t={key:e.key};Object(a.Yb)(t).then((e=>{Object(a.Tb)(e,((e,t)=>{this.setState({page:1,limit:10}),this.getKeyCodeList({page:1,limit:10}),c.a.success("\u4f5c\u5e9f\u6210\u529f")}),(e=>{c.a.error(e)}))}))}menuItemClick(e,t,i){let s=this;if(1==t){let e={key:i.key};Object(a.ac)(e).then((e=>{Object(a.Tb)(e,((e,t)=>{this.setState({page:1,limit:10}),this.getKeyCodeList({page:1,limit:10}),c.a.success("\u6807\u8bb0\u4e3a\u4f7f\u7528\u6210\u529f")}),(e=>{c.a.error(e)}))}))}if(2==t){let e={type:4,object_value:i.key};try{Ut(e).then((e=>{2===e?s.keyCancelFun(i):1===e&&G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:["\u662f\u5426\u4f5c\u5e9fkey\u6279\u6b21ID",Object(h.jsxDEV)("b",{children:["[",i.key,"]"]},void 0,!0,{fileName:Ts,lineNumber:289,columnNumber:30},this),"\uff1f"]},void 0,!0,{fileName:Ts,lineNumber:288,columnNumber:17},this),onConfirm:()=>{s.keyCancelFun(i)},onCancel:this.onCancel,className:"questModal",parentComponent:this})}))}catch(l){}}3==t&&(sessionStorage.setItem("keyCode",i.key),window.open("#/home/key-log"))}multipleCancel(){let e={keys:Object(f.a)(this.state.selectiondata,(e=>e.key))};Object(a.Vb)(e).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.success("\u6279\u91cf\u4f5c\u5e9f\u6210\u529f");this.setState({page:1,limit:10}),this.clearFn(),this.getKeyCodeList({page:1,limit:10})}),(e=>{c.a.error(e)}))}))}multipleUse(){let e={keys:Object(f.a)(this.state.selectiondata,(e=>e.key))};Object(a.Xb)(e).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.success("\u6279\u91cf\u6807\u8bb0\u4e3a\u4f7f\u7528\u6210\u529f");this.setState({page:1,limit:10}),this.clearFn(),this.getKeyCodeList({page:1,limit:10})}),(e=>{c.a.error(e)}))}))}render(){Jt.a,this.state.combinedValue,this.onChangeCombinedDate;return Object(h.jsxDEV)("div",{id:"dislist",children:Object(h.jsxDEV)(Ft,{tabs:this.state.tabList,tabChange:this.tabFn.bind(this),children:[Object(h.jsxDEV)("div",{className:"distable dflexj",children:[Object(h.jsxDEV)("div",{children:[Object(h.jsxDEV)(u.a,{onClick:()=>{this.multipleCancel()},disabled:this.state.multiple,children:"\u6279\u91cf\u4f5c\u5e9f"},void 0,!1,{fileName:Ts,lineNumber:478,columnNumber:15},this),Object(h.jsxDEV)(u.a,{onClick:()=>{this.multipleUse()},disabled:this.state.multiple,children:"\u6279\u91cf\u6807\u8bb0\u4e3a\u5df2\u4f7f\u7528"},void 0,!1,{fileName:Ts,lineNumber:486,columnNumber:15},this)]},void 0,!0,{fileName:Ts,lineNumber:477,columnNumber:13},this),Object(h.jsxDEV)(n.a,{onChange:e=>this.setState({search:e}),value:this.state.search,wordSearch:this.iptsureFn.bind(this),icon:"search",placeholder:"\u8bf7\u5b8c\u6574\u8f93\u5165key",countShow:!1,height:"36px",width:"260px",onClearItem:e=>{this.setState({search:""});this.getKeyCodeList({page:1,limit:10})},alignment:"left"},void 0,!1,{fileName:Ts,lineNumber:497,columnNumber:13},this)]},void 0,!0,{fileName:Ts,lineNumber:476,columnNumber:11},this),Object(h.jsxDEV)("div",{className:"code-table",children:[this.state.selectiondata.length>0?Object(h.jsxDEV)(ki.a,{type:"info",extraContent:Object(h.jsxDEV)(u.a,{type:"primary",onClick:this.clearFn.bind(this),children:"\u6e05\u7a7a"},void 0,!1,{fileName:Ts,lineNumber:522,columnNumber:19},this),children:["\u5df2\u9009\u62e9",Object(h.jsxDEV)("font",{color:"#296bef",style:{fontWeight:"bold"},children:this.state.selectiondata.length},void 0,!1,{fileName:Ts,lineNumber:528,columnNumber:17},this),"\u53d1\u653ekey\u603b\u6570:",this.state.grantTotal,",\u5269\u4f59key\u603b\u6570:",this.state.surplusTotal,",\u5df2\u4f7f\u7528\u603b\u6570:",this.state.usageTotal,",\u5df2\u8fc7\u671f\u603b\u6570:",this.state.outdateTotal,",\u5df2\u4f5c\u5e9f\u603b\u6570:",this.state.invalidTotal]},void 0,!0,{fileName:Ts,lineNumber:519,columnNumber:15},this):null,Object(h.jsxDEV)(I,{spliteColor:"#fff",tableData:this.state.distdata,Column:[{title:"key\u7801",name:"key_code",prop:"key_code",type:"normal",width:"auto"},{title:"\u5f52\u5c5e\u8425\u9500\u8ba1\u5212",width:"auto",type:"normal",prop:"plan_title",name:"plan_title"},{title:"\u72b6\u6001",prop:"status",name:"status",width:"auto",type:"slot"},{title:"\u64cd\u4f5c",name:"opearo",prop:"opearo",type:"slot",width:"auto"},{title:"\u53d1\u653e\u603b\u6570",prop:"total",name:"total",width:"auto",type:"normal"},{title:"\u5269\u4f59\u603b\u6570",prop:"residue",name:"residue",width:"auto",type:"normal"},{title:"\u4f7f\u7528\u603b\u6570",name:"usage",prop:"usage",type:"normal",width:"auto"},{title:"\u5931\u6548\u603b\u6570",name:"overdue",prop:"overdue",type:"normal",width:"auto"},{title:"\u4f5c\u5e9f\u603b\u6570",name:"invalid",prop:"invalid",type:"normal",width:"auto"},{title:"\u5df2\u5b8c\u7ed3\u603b\u6570",name:"end",prop:"end",type:"normal",width:"auto"},{title:"\u66f4\u65b0\u65f6\u95f4",name:"update_time",prop:"update_time",type:"normal",width:"auto"}],countbarVisible:!1,maxheight:this.state.tableHeight,isSwitch:!1,page:this.state.page,ref:"plan_list",dataCount:this.state.dataCount,pageChange:e=>{this.onPageChange(e)},countChange:e=>{this.onCountChange(e)},checkChange:this.selection.bind(this),ComponentHandler:(e,t)=>{if("dates"==e)return Object(h.jsxDEV)("span",{children:[t.begin_time," \u81f3 ",t.end_time]},void 0,!0,{fileName:Ts,lineNumber:557,columnNumber:21},this);if("title"==e)return Object(h.jsxDEV)("span",{className:"grid-link",onClick:e=>{this.linkTo(t)},children:t.title},void 0,!1,{fileName:Ts,lineNumber:565,columnNumber:21},this);if("switch"==e)return Object(h.jsxDEV)(v.a,{size:"small",checked:1==t.open,disabled:!t.is_open,onChange:e=>{this.onSwitchChange(e,t)}},void 0,!1,{fileName:Ts,lineNumber:577,columnNumber:21},this);if("status"==e)return Object(h.jsxDEV)("p",{className:"dflexa",children:Object(h.jsxDEV)("span",{children:[Object(h.jsxDEV)("font",{className:"icon",style:{background:At.keyStatusBg(parseInt(t.status))}},void 0,!1,{fileName:Ts,lineNumber:591,columnNumber:25},this),t.status_text]},void 0,!0,{fileName:Ts,lineNumber:590,columnNumber:23},this)},void 0,!1,{fileName:Ts,lineNumber:589,columnNumber:21},this);if("opearo"==e){let e=null;return e=1==t.status?Object(h.jsxDEV)("span",{children:[Object(h.jsxDEV)("a",{className:"grid-link",style:{paddingLeft:"2px",color:"#d8dbdd"},children:"\u8be6\u60c5"},void 0,!1,{fileName:Ts,lineNumber:608,columnNumber:25},this),Object(h.jsxDEV)(y.a,{position:y.d.RightTop,children:[Object(h.jsxDEV)(y.b,{children:Object(h.jsxDEV)("div",{className:"linkmore",onClick:e=>{},children:[" ","\u66f4\u591a ",Object(h.jsxDEV)(g.a,{type:"down"},void 0,!1,{fileName:Ts,lineNumber:615,columnNumber:34},this)," "]},void 0,!0,{fileName:Ts,lineNumber:613,columnNumber:29},this)},void 0,!1,{fileName:Ts,lineNumber:612,columnNumber:27},this),Object(h.jsxDEV)(y.c,{children:Object(h.jsxDEV)(O.a,{onClick:(e,i)=>this.menuItemClick(e,i,t),children:[Object(h.jsxDEV)(D.a,{children:"\u6807\u8bb0\u6210\u5df2\u4f7f\u7528"},"1",!1,{fileName:Ts,lineNumber:620,columnNumber:31},this),Object(h.jsxDEV)(D.a,{children:"\u4f5c\u5e9f"},"2",!1,{fileName:Ts,lineNumber:621,columnNumber:31},this),Object(h.jsxDEV)(D.a,{disabled:!0,children:"\u65e5\u5fd7"},"3",!1,{fileName:Ts,lineNumber:622,columnNumber:31},this)]},void 0,!0,{fileName:Ts,lineNumber:619,columnNumber:29},this)},void 0,!1,{fileName:Ts,lineNumber:618,columnNumber:27},this)]},void 0,!0,{fileName:Ts,lineNumber:611,columnNumber:25},this)]},void 0,!0,{fileName:Ts,lineNumber:607,columnNumber:23},this):Object(h.jsxDEV)("span",{children:[Object(h.jsxDEV)("a",{className:"grid-link",style:{paddingLeft:"2px",color:"#d8dbdd"},children:"\u8be6\u60c5"},void 0,!1,{fileName:Ts,lineNumber:633,columnNumber:25},this),Object(h.jsxDEV)(y.a,{position:y.d.RightTop,children:[Object(h.jsxDEV)(y.b,{children:Object(h.jsxDEV)("div",{className:"linkmore",onClick:e=>{},children:[" ","\u66f4\u591a ",Object(h.jsxDEV)(g.a,{type:"down"},void 0,!1,{fileName:Ts,lineNumber:640,columnNumber:34},this)," "]},void 0,!0,{fileName:Ts,lineNumber:638,columnNumber:29},this)},void 0,!1,{fileName:Ts,lineNumber:637,columnNumber:27},this),Object(h.jsxDEV)(y.c,{children:Object(h.jsxDEV)(O.a,{onClick:(e,i)=>this.menuItemClick(e,i,t),children:[Object(h.jsxDEV)(D.a,{disabled:!0,children:"\u6807\u8bb0\u6210\u5df2\u4f7f\u7528"},"1",!1,{fileName:Ts,lineNumber:645,columnNumber:31},this),Object(h.jsxDEV)(D.a,{disabled:2!=t.status,children:"\u4f5c\u5e9f"},"2",!1,{fileName:Ts,lineNumber:648,columnNumber:31},this),Object(h.jsxDEV)(D.a,{disabled:!0,children:"\u65e5\u5fd7"},"3",!1,{fileName:Ts,lineNumber:651,columnNumber:31},this)]},void 0,!0,{fileName:Ts,lineNumber:644,columnNumber:29},this)},void 0,!1,{fileName:Ts,lineNumber:643,columnNumber:27},this)]},void 0,!0,{fileName:Ts,lineNumber:636,columnNumber:25},this)]},void 0,!0,{fileName:Ts,lineNumber:632,columnNumber:23},this),e}}},void 0,!1,{fileName:Ts,lineNumber:537,columnNumber:13},this),this.state.audit_visible?Object(h.jsxDEV)("div",{children:[Object(h.jsxDEV)("div",{className:"modal",children:" "},void 0,!1,{fileName:Ts,lineNumber:667,columnNumber:17},this),Object(h.jsxDEV)("div",{className:"audit-box",children:[Object(h.jsxDEV)(g.a,{type:"close",className:"audit-close",onClick:e=>{this.cancel(e)}},void 0,!1,{fileName:Ts,lineNumber:669,columnNumber:19},this),Object(h.jsxDEV)("div",{className:"audit-box-title",children:"\u53d1\u9001"},void 0,!1,{fileName:Ts,lineNumber:676,columnNumber:19},this),Object(h.jsxDEV)("div",{className:"audit-box-question",children:"\u662f\u5426\u7acb\u5373\u53d1\u9001key\u4ee5\u53ca\u89e3\u538b\u5bc6\u7801?"},void 0,!1,{fileName:Ts,lineNumber:677,columnNumber:19},this),Object(h.jsxDEV)("div",{className:"phone-group",children:[Object(h.jsxDEV)("div",{children:"\u63a5\u6536\u624b\u673a\u53f7"},void 0,!1,{fileName:Ts,lineNumber:679,columnNumber:21},this),Object(h.jsxDEV)("div",{className:"phone-list",children:Object(h.jsxDEV)(Q.a,{value:this.state.phone_radio,isValueEqual:this.isValueEqual,onChange:e=>{this.onPhoneChange(e)},children:this.state.phone_list.map(((e,t)=>Object(h.jsxDEV)(Z.a,{value:t,onClick:()=>{e==this.state.phone_list[this.state.phone_radio]&&this.setState({phone_radio:-1})},children:e},void 0,!1,{fileName:Ts,lineNumber:690,columnNumber:29},this)))},void 0,!1,{fileName:Ts,lineNumber:681,columnNumber:23},this)},void 0,!1,{fileName:Ts,lineNumber:680,columnNumber:21},this)]},void 0,!0,{fileName:Ts,lineNumber:678,columnNumber:19},this),Object(h.jsxDEV)("div",{className:"email-group",children:[Object(h.jsxDEV)("div",{children:"\u63a5\u6536\u90ae\u7bb1"},void 0,!1,{fileName:Ts,lineNumber:706,columnNumber:21},this),Object(h.jsxDEV)("div",{className:"email-list",children:Object(h.jsxDEV)(Q.a,{value:this.state.email_radio,isValueEqual:this.isValueEqual,onChange:e=>{this.onEmailChange(e)},children:this.state.email_list.map(((e,t)=>Object(h.jsxDEV)(Z.a,{value:t,onClick:()=>{e==this.state.email_list[this.state.email_radio]&&this.setState({email_radio:-1})},children:e},void 0,!1,{fileName:Ts,lineNumber:717,columnNumber:29},this)))},void 0,!1,{fileName:Ts,lineNumber:708,columnNumber:23},this)},void 0,!1,{fileName:Ts,lineNumber:707,columnNumber:21},this)]},void 0,!0,{fileName:Ts,lineNumber:705,columnNumber:19},this),Object(h.jsxDEV)("div",{className:"input-group",children:Object(h.jsxDEV)(Di.a,{placeholder:"\u8bf7\u8f93\u5165\u63a5\u6536\u624b\u673a\u53f7",onChange:this.phoneChange,disabled:this.state.phone_radio>-1},void 0,!1,{fileName:Ts,lineNumber:733,columnNumber:21},this)},void 0,!1,{fileName:Ts,lineNumber:732,columnNumber:19},this),Object(h.jsxDEV)("div",{className:"input-group",children:Object(h.jsxDEV)(Di.a,{placeholder:"\u8bf7\u8f93\u5165\u63a5\u6536\u90ae\u7bb1",onChange:this.emailChange,disabled:this.state.email_radio>-1},void 0,!1,{fileName:Ts,lineNumber:740,columnNumber:21},this)},void 0,!1,{fileName:Ts,lineNumber:739,columnNumber:19},this),Object(h.jsxDEV)("div",{className:"audit-btn-group",children:[Object(h.jsxDEV)(u.a,{onClick:e=>{this.cancel(e)},children:"\u53d6\u6d88"},void 0,!1,{fileName:Ts,lineNumber:748,columnNumber:21},this),Object(h.jsxDEV)(u.a,{type:"primary",onClick:e=>{this.send(e)},children:"\u53d1\u9001"},void 0,!1,{fileName:Ts,lineNumber:755,columnNumber:21},this)]},void 0,!0,{fileName:Ts,lineNumber:747,columnNumber:19},this)]},void 0,!0,{fileName:Ts,lineNumber:668,columnNumber:17},this)]},void 0,!0,{fileName:Ts,lineNumber:666,columnNumber:15},this):null]},void 0,!0,{fileName:Ts,lineNumber:517,columnNumber:11},this)]},void 0,!0,{fileName:Ts,lineNumber:475,columnNumber:9},this)},void 0,!1,{fileName:Ts,lineNumber:474,columnNumber:7},this)}}i(253);var Fs="/Users/zhangds/web/blue-brother/frontend/src/pages/plan/key/detail/log.js";const Ls=[{title:"\u521b\u5efa\u65f6\u95f4",name:"time",prop:"time",type:"slot",width:"20%"},{title:"\u64cd\u4f5c\u63cf\u8ff0",name:"message",prop:"message",type:"normal",width:"20%"},{title:"\u8be6\u60c5",name:"opearo",type:"slot",prop:"opearo",width:"50%"}];class Hs extends m.a.Component{constructor(e){super(e),this.state={tabList:[{title:"\u65e5\u5fd7"}],tabactive:0,keyDetailLog_data:[],keyDetail_data:{},tableHeight:500,page:1,key:"",limit:10,total:0}}componentDidMount(e){this.getKeyLogFn({page:1,limit:10})}tabFn(){this.getKeyLogFn()}getKeyLogFn(){let{page:e,limit:t}=this.state,i={page:e,limit:t,key:sessionStorage.getItem("keyCode")};Object(a.hb)(i).then((e=>{Object(a.Tb)(e,((e,t)=>{this.setState({total:e.total,keyDetailLog_data:e.data})}),(e=>{c.a.error(e)}))})).catch((e=>{}))}pageChange(e){this.setState({page:e}),setTimeout((()=>{this.getKeyLogFn()}),0)}countChange(e){this.setState({page:1,limit:e}),setTimeout((()=>{this.getKeyLogFn()}),0)}render(){return Object(h.jsxDEV)("div",{id:"more",className:"maincenter",children:Object(h.jsxDEV)(Ft,{tabs:this.state.tabList,tabChange:this.tabFn,children:0==this.state.tabactive?Object(h.jsxDEV)("div",{className:"main-body",children:Object(h.jsxDEV)(I,{spliteColor:"#fff",tableData:this.state.keyDetailLog_data,Column:Ls,isMultiple:!1,maxheight:this.state.tableHeight,dataCount:this.state.total,countChange:e=>{this.countChange(e)},countbarVisible:!1,isSwitch:!1,pageChange:e=>{this.pageChange(e)},checkChange:this.selection,ComponentHandler:(e,t)=>"time"==e?Object(h.jsxDEV)("div",{children:Y.a.unix(t.time).format("YYYY-MM-DD HH:mm:ss")},void 0,!1,{fileName:Fs,lineNumber:126,columnNumber:28},this):"opearo"==e?Object(h.jsxDEV)("div",{children:t.data?Object(h.jsxDEV)(za.a,{collapsed:!0,name:!1,src:t.data,displayDataTypes:!1},void 0,!1,{fileName:Fs,lineNumber:132,columnNumber:27},this):Object(h.jsxDEV)("span",{children:"-"},void 0,!1,{fileName:Fs,lineNumber:139,columnNumber:27},this)},void 0,!1,{fileName:Fs,lineNumber:130,columnNumber:23},this):void 0},void 0,!1,{fileName:Fs,lineNumber:108,columnNumber:15},this)},void 0,!1,{fileName:Fs,lineNumber:107,columnNumber:13},this):null},void 0,!1,{fileName:Fs,lineNumber:105,columnNumber:9},this)},void 0,!1,{fileName:Fs,lineNumber:104,columnNumber:7},this)}}var qs=i(377),Ms=i.n(qs),Ps=(i(254),"/Users/zhangds/web/blue-brother/frontend/src/pages/plan/key/list.js");const Bs=[{title:"key-\u6279\u6b21ID",name:"id",prop:"id",className:"name",type:"normal",width:"100px"},{title:"\u6279\u6b21\u540d\u79f0",name:"link",prop:"link",type:"slot",width:"180px"},{title:"\u542f\u7528",prop:"switch",name:"switch",width:"80px",type:"solt"},{title:"\u5f52\u5c5e\u8425\u9500\u8ba1\u5212",name:"plan_title",prop:"plan_title",type:"normal",width:"200px"},{title:"\u64cd\u4f5c",name:"plan",type:"slot",prop:"edit",width:"260px"},{title:"\u72b6\u6001",name:"status",type:"slot",prop:"status",width:"60px"},{title:"\u521b\u5efa\u4eba",name:"creator_name",prop:"creator_name",type:"normal",width:"100px"},{title:"\u53d1\u653ekey\u7801\u603b\u6570",name:"grant",type:"normal",prop:"grant",width:"110px"},{title:"\u9886\u53d6key\u603b\u6570",name:"receive",type:"normal",prop:"receive",width:"120px"},{title:"\u5df2\u6d88\u8017key\u603b\u6570",name:"usage",type:"slot",prop:"usage",width:"120px"},{title:"\u4f5c\u5e9fkey\u7801\u603b\u6570",name:"invalid",type:"normal",prop:"invalid",width:"120px"},{title:"\u53ef\u7528key\u7801\u603b\u6570",name:"silent",type:"normal",prop:"silent",width:"140px"},{title:"\u5931\u6548key\u7801\u603b\u6570",name:"overdue",type:"normal",prop:"overdue",width:"140px"},{title:"\u5b8c\u7ed3key\u7801\u603b\u6570",name:"end",type:"normal",prop:"end",width:"140px"},{title:"\u66f4\u65b0\u65f6\u95f4",name:"update_time",type:"normal",prop:"update_time",width:"140px"}];class As extends m.a.Component{constructor(e){super(e),this.phoneChange=e=>{this.setState({phone:e.target.value})},this.emailChange=e=>{this.setState({email:e.target.value})},this.state={planStatus:"",dataCount:0,page:1,limit:10,tabList:[{title:"\u5168\u90e8"},{title:"\u521b\u5efa\u4e2d"},{title:"\u5ba1\u6838\u4e2d"},{title:"\u672a\u901a\u8fc7"},{title:"\u8fdb\u884c\u4e2d"},{title:"\u751f\u6210\u4e2d"},{title:"\u6682\u505c\u4e2d"},{title:"\u5df2\u5b8c\u7ed3"},{title:"\u5df2\u4f5c\u5e9f"}],gridSelection:[],distdata:[],bulkExportLoading:!1,combinedValue:[],distdata2:[{id:0xb32df55cf43,name:"\u7231\u5947\u827a\u6708\u5361\u5151\u6362\u5238",time:"2021-11-08 14:21:06\u81f32021-11-08 15:06:04",plan:"\u8425\u9500\u8ba1\u52122",belongid:3123213,send:100,record:58,used:41,dead:11,fail:12,status:"1"}],activepage:0,distdata4:[],distdata3:[],distdata11:[],tableHeight:600,disabled:!1,email:"",key_word:"",phone:"",phone_list:[],email_list:[],phone:"",email:"",email_radio:-1,phone_radio:-1,menuVisible:!1,isBulkSend:!1}}cancel(e){this.setState({audit_visible:!1})}send(e){let t=new RegExp("^[1][3,4,5,6,7,8,9][0-9]{9}$"),i=[JSON.parse(sessionStorage.getItem("key_batch_id"))],s={phone:this.state.phone_radio>-1?this.state.phone_list[this.state.phone_radio]:this.state.phone,email:this.state.email_radio>-1?this.state.email_list[this.state.email_radio]:this.state.email};t.test(s.phone)?(this.state.isBulkSend&&(i=this.state.gridSelection.map((e=>e.id))),Object(a.i)({ids:i,...s}).then((e=>{Object(a.Tb)(e,((e,t)=>{this.setState({audit_visible:!1}),c.a.success("\u53d1\u9001\u6210\u529f")}),(e=>{c.a.error(e)}))}))):c.a.error("\u624b\u673a\u53f7\u683c\u5f0f\u4e0d\u6b63\u786e")}getKeyList(e={}){let{page:t,limit:i,key_word:s,activepage:l}=this.state,n={page:t,limit:i};n.plan_id=sessionStorage.getItem("key_plan_id"),this.state.combinedValue&&this.state.combinedValue[0]&&(n.begin_time=this.state.combinedValue[0],n.end_time=this.state.combinedValue[1]),l&&(n.status=l),s&&(n.key_word=s),e&&e[0]&&(n.begin_time=e[0],n.end_time=e[1]),e&&null==e[0]&&e.length>1&&(delete n.begin_time,delete n.end_time),0==this.state.activepage&&delete n.status,Object(a.gb)(n).then((e=>{Object(a.Tb)(e,((e,t)=>{e.data.length>0&&sessionStorage.setItem("keyType",e.data[0].bind_object[0]),this.setState({dataCount:e.total,distdata:e.data,planStatus:e.plan.status}),sessionStorage.setItem("key_plan_status",e.plan.status)}),(e=>{}))}))}onPageChange(e){this.setState({page:e}),setTimeout((()=>{this.getKeyList()}),0)}clickFn(){sessionStorage.setItem("pathname2","/home/key-addEdit");sessionStorage.setItem("keybatch_id",""),sessionStorage.setItem("copyOpearo",0),this.state.distdata.length>0&&6==this.state.distdata[0].style?sessionStorage.setItem("keyStyle",1):sessionStorage.setItem("keyStyle",0),sessionStorage.setItem("breakchangenav",JSON.stringify([{pagetitle:"\u65b0\u5efa",items:[{path:"/home/key-list",name:"key\u5217\u8868\u7ba1\u7406"},{path:"/home/key-addEdit",name:"\u65b0\u5efakey"}]}])),sessionStorage.setItem("KeyPcType","3"),this.props.history.push("/home/key-addEdit")}onCopyRow(e,t){sessionStorage.setItem("pathname2","/home/key-addEdit");let i=[{pagetitle:"\u590d\u5236",items:[{path:"/home/key-list",name:"key\u5217\u8868\u7ba1\u7406"},{path:"/home/key-addEdit",name:"\u590d\u5236key:"+t.batch_name}]}];sessionStorage.setItem("keybatch_id",t.id),sessionStorage.setItem("copyOpearo",1),sessionStorage.setItem("key_reseller_id",t.reseller_id),sessionStorage.setItem("breakchangenav",JSON.stringify(i)),sessionStorage.setItem("KeyPcType","2"),this.props.history.push("/home/key-addEdit")}onEditRow(e,t){sessionStorage.setItem("pathname2","/home/key-addEdit");let i=[{pagetitle:"\u7f16\u8f91",items:[{path:"/home/key-list",name:t.plan_title+"key\u5217\u8868\u7ba1\u7406"},{path:"/home/key-list",name:"key-\u6279\u6b21ID:"+t.id},{path:"/home/key-addEdit",name:"\u7f16\u8f91key"}]}];sessionStorage.setItem("breakchangenav",JSON.stringify(i)),sessionStorage.setItem("keybatch_id",t.id),sessionStorage.setItem("key_reseller_id",t.reseller_id),sessionStorage.setItem("approval_id",t.approval_id),sessionStorage.setItem("KeyPcType","1"),this.props.history.push("/home/key-addEdit")}pageChange(e){this.setState({page:e}),setTimeout((()=>{this.getKeyList()}),200)}tabFn(e){switch(this.setState({activepage:e,key_word:""}),e){case 1:this.setState({activepage:1});break;case 2:this.setState({activepage:2});break;case 3:this.setState({activepage:8});break;case 4:this.setState({activepage:4});break;case 5:this.setState({activepage:3});break;case 6:this.setState({activepage:5});break;case 7:this.setState({activepage:6});break;case 8:this.setState({activepage:7})}this.setState({page:1,limit:10}),setTimeout((()=>{this.getKeyList()}),10)}delFn(){G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:"\u662f\u5426\u4f5c\u5e9f\u3010\u6e32\u67d3\u8ba2\u5355\u53f7\u3011\u8ba2\u5355\uff1f"},void 0,!1,{fileName:Ps,lineNumber:466,columnNumber:16},this),onConfirm(){alert("\u5f00\u59cb\u8c03\u7528\u4f5c\u5e9f\u63a5\u53e3")},onCancel(){},className:"questModal",parentComponent:this})}onChangeCombinedDate(e){this.setState({combinedValue:e})}onSwitchChange(e,t){G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:["\u662f\u5426\u5c06",Object(h.jsxDEV)("b",{children:["[key-\u6279\u6b21id",t.id,"]"]},void 0,!0,{fileName:Ps,lineNumber:489,columnNumber:14},this),4==t.status?"\u6682\u505c":"\u5f00\u542f","\uff1f"]},void 0,!0,{fileName:Ps,lineNumber:488,columnNumber:9},this),onConfirm:()=>{this.changeState(e,t)},onCancel:this.onCancel,className:"questModal",parentComponent:this})}changeState(e,t){let i=this,s={operation:e?4:5};Object(a.Zc)(t.id,s).then((s=>{Object(a.Tb)(s,((a,s)=>{let l=Object(oi.a)(this.state.distdata,(e=>e.id==t.id));this.state.distdata[l].status=e,this.setState({distdata:this.state.distdata}),c.a.success(s);let n={page:1,limit:10,plan_id:sessionStorage.getItem("key_plan_id")};i.getKeyList(n)}),(e=>{c.a.error(e)}))}))}iptsureFn(){this.setState({page:1}),setTimeout((()=>{this.getKeyList()}),200)}componentWillMount(){this.setState({tableHeight:window.innerHeight-390});["6","0","2","5","8"].indexOf(sessionStorage.getItem("key_plan_status"))>-1&&this.setState({disabled:!0})}getResellerInfoFunction(e){Object(a.vb)(e).then((e=>{Object(a.Tb)(e,((e,t)=>{this.setState({phone_list:e.contact_phone,email_list:e.contact_email,audit_visible:!0,phone_radio:-1,email_radio:-1})}),(e=>{c.a.error(e)}))}))}bulkSendFunction(){if(this.state.gridSelection.some((e=>![4,5].includes(e.status))))return c.a.warn("\u53ea\u6709\u72b6\u6001\u4e3a\u8fdb\u884c\u4e2d\u3001\u6682\u505c\u4e2d\u7684\u5141\u8bb8\u53d1\u9001");this.getResellerInfoFunction(this.state.gridSelection[0].reseller_id),this.setState({isBulkSend:!0})}bulkExport(){const e=this.state.gridSelection.map((e=>e.id)),t=e.length?"":~~sessionStorage.getItem("key_plan_id");this.setState({bulkExportLoading:!0}),Object(a.Wb)({key_batch_id:e,plan_id:t}).then((e=>{let t=new Blob([e]),i=Date.now()+".zip";var a=document.createElement("a");a.href=window.URL.createObjectURL(t),a.download=i,a.click(),window.URL.revokeObjectURL(a.href),this.setState({bulkExportLoading:!1})})).catch((e=>{}))}cancelKeyFn(e){let t=this;Object(a.m)(e.id).then((e=>{Object(a.Tb)(e,((e,i)=>{c.a.clear(),c.a.success(i);let a={page:1,limit:10,plan_id:sessionStorage.getItem("key_plan_id")};t.getKeyList(a)}),(e=>{c.a.error(e)}))})).catch((e=>{}))}menuItemClick(e,t){let i=this;if(1==e&&(this.setState({isBulkSend:!1}),this.getResellerInfoFunction(t.reseller_id),sessionStorage.setItem("key_batch_id",t.id)),5==e){t.id;if(2==t.status)return c.a.error("\u5ba1\u6838\u4e2d\u7684\u6570\u636e\u4e0d\u5141\u8bb8\u4f5c\u5e9f"),void this.setState({menuVisible:!1});let e={type:1,object_value:t.id};try{Ut(e).then((e=>{2===e?i.cancelKeyFn(t):1===e&&G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:["\u662f\u5426\u4f5c\u5e9fkey\u6279\u6b21ID",Object(h.jsxDEV)("b",{children:["[",t.id,"]"]},void 0,!0,{fileName:Ps,lineNumber:665,columnNumber:30},this),"\uff1f"]},void 0,!0,{fileName:Ps,lineNumber:664,columnNumber:17},this),onConfirm:()=>{i.cancelKeyFn(t)},onCancel:this.onCancel,className:"questModal",parentComponent:this})}))}catch(a){}}6==e&&this.callBack(t)}callBack(e){sessionStorage.setItem("callBackId",JSON.stringify(e.id)),sessionStorage.setItem("callBackType",JSON.stringify(3)),sessionStorage.setItem("pathname2","callback-message");let t=[{pagetitle:"\u56de\u8c03\u5730\u5740",items:[{path:"distributor-list",name:"key\u6279\u6b21\u4e00"+e.batch_name},{path:"callback-message",name:"\u8bbe\u7f6e\u56de\u8c03\u901a\u77e5\u5730\u5740"}]}];sessionStorage.setItem("breaknav",JSON.stringify(t)),sessionStorage.setItem("linkshowname","key\u6279\u6b21"),this.props.history.push("/home/callback-message")}countChange(e){this.setState({page:1,limit:e}),setTimeout((()=>{this.getKeyList()}),0)}onChangeCombinedDate(e){this.setState({combinedValue:e}),this.getKeyList(e)}linkTo(e){let t=[{pagetitle:"\u7f16\u8f91",items:[{path:"/home/key-list",name:"\u8425\u9500\u8ba1\u5212\u7ba1\u7406"},{path:"/home/key-list",name:e.plan_title+"key\u5217\u8868"},{path:"/home/key-detail",name:e.batch_name+"key\u7801\u5217\u8868"}]}];sessionStorage.setItem("breakchangenav",JSON.stringify(t)),sessionStorage.setItem("linkshowname","\u8425\u9500\u8ba1\u5212\u7ba1\u7406"),sessionStorage.setItem("key_batch_id",e.id),this.props.history.push("/home/key-detail")}componentDidUpdate(e,t){t.key_word==this.state.key_word||this.state.key_word||this.getKeyList()}onPhoneChange(e){this.setState({phone_radio:e.target.value})}onEmailChange(e){this.setState({email_radio:e.target.value})}deleteFun(e){G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:"\u4f60\u786e\u5b9a\u8981\u5220\u9664\u8be5\u6761\u6570\u636e?"},void 0,!1,{fileName:Ps,lineNumber:765,columnNumber:16},this),onConfirm:()=>{Object(a.F)(e.id).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.clear(),c.a.success(t),setTimeout((()=>{this.getKeyList()}),3e3)}),(e=>{c.a.error(e)}))}))},onCancel(){},className:"questModal",parentComponent:this})}onReCall(e,t){let i=t.approval_id;G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:"\u8be5\u6570\u636e\u6b63\u5728\u5ba1\u6279\u4e2d,\u662f\u5426\u786e\u8ba4\u64a4\u9500\u5ba1\u6279\uff1f"},void 0,!1,{fileName:Ps,lineNumber:796,columnNumber:16},this),onConfirm:()=>{Object(a.bd)(i).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.success("\u64a4\u9500\u5ba1\u6279\u6210\u529f"),setTimeout((()=>{this.getKeyList()}),3e3)}),(e=>{c.a.error(e)}))}))},onCancel:this.onCancel,className:"questModal",parentComponent:this})}opearoEl(e,t){switch(e){case 1:return[1,8,4,5].includes(t.status)?Object(h.jsxDEV)("span",{className:"grid-link",onClick:e=>{this.onEditRow(e,t)},children:"\u7f16\u8f91"},void 0,!1,{fileName:Ps,lineNumber:832,columnNumber:13},this):Object(h.jsxDEV)("span",{className:"grid-link disabled",children:"\u7f16\u8f91"},void 0,!1,{fileName:Ps,lineNumber:842,columnNumber:18},this);case 2:if([4,5,7].includes(t.status)){if(7===t.status){if(Ms()(t.end_time).valueOf()<=Ms()().valueOf())return Object(h.jsxDEV)("span",{className:"grid-link disabled",children:"\u590d\u5236"},void 0,!1,{fileName:Ps,lineNumber:851,columnNumber:22},this)}return Object(h.jsxDEV)("span",{className:"grid-link",onClick:e=>{this.onCopyRow(e,t)},children:"\u590d\u5236"},void 0,!1,{fileName:Ps,lineNumber:856,columnNumber:13},this)}return Object(h.jsxDEV)("span",{className:"grid-link disabled",children:"\u590d\u5236"},void 0,!1,{fileName:Ps,lineNumber:866,columnNumber:18},this);case 3:return[2].includes(t.status)?Object(h.jsxDEV)("span",{className:"grid-link",onClick:e=>this.onReCall(e,t),children:"\u64a4\u9500\u5ba1\u6279"},void 0,!1,{fileName:Ps,lineNumber:871,columnNumber:13},this):Object(h.jsxDEV)("span",{className:"grid-link disabled",children:"\u64a4\u9500\u5ba1\u6279"},void 0,!1,{fileName:Ps,lineNumber:876,columnNumber:18},this);case 4:return 8===t.status&&1===t.old_status?Object(h.jsxDEV)("span",{className:"grid-link",style:{color:"red"},onClick:()=>this.deleteFun(t),children:"\u5220\u9664"},void 0,!1,{fileName:Ps,lineNumber:881,columnNumber:13},this):[8,4,5].includes(t.status)&&1!==t.old_status?Object(h.jsxDEV)(y.a,{position:y.d.RightTop,visible:this.state.menuVisible,onVisibleChange:e=>this.setState({visible:e}),children:[Object(h.jsxDEV)(y.b,{children:Object(h.jsxDEV)("div",{className:"linkmore grid-link",children:["\u66f4\u591a ",Object(h.jsxDEV)(g.a,{type:"down"},void 0,!1,{fileName:Ps,lineNumber:901,columnNumber:22},this)]},void 0,!0,{fileName:Ps,lineNumber:900,columnNumber:17},this)},void 0,!1,{fileName:Ps,lineNumber:899,columnNumber:15},this),Object(h.jsxDEV)(y.c,{children:Object(h.jsxDEV)(O.a,{onClick:(e,i)=>this.menuItemClick(i,t),children:[Object(h.jsxDEV)(D.a,{children:"\u53d1\u9001\u5bc6\u7801\u53ca\u538b\u7f29\u5305"},"1",!1,{fileName:Ps,lineNumber:906,columnNumber:19},this),Object(h.jsxDEV)(D.a,{children:"\u8bbe\u7f6e\u56de\u8c03"},"6",!1,{fileName:Ps,lineNumber:907,columnNumber:19},this),Object(h.jsxDEV)(D.a,{disabled:!0,children:"\u65e5\u5fd7"},"2",!1,{fileName:Ps,lineNumber:908,columnNumber:19},this),Object(h.jsxDEV)(D.a,{children:"\u4f5c\u5e9f"},"5",!1,{fileName:Ps,lineNumber:911,columnNumber:19},this)]},void 0,!0,{fileName:Ps,lineNumber:905,columnNumber:17},this)},void 0,!1,{fileName:Ps,lineNumber:904,columnNumber:15},this)]},void 0,!0,{fileName:Ps,lineNumber:894,columnNumber:13},this):1===t.status?Object(h.jsxDEV)("span",{className:"grid-link",style:{color:"red"},onClick:()=>this.deleteFun(t),children:"\u5220\u9664"},void 0,!1,{fileName:Ps,lineNumber:919,columnNumber:15},this):Object(h.jsxDEV)("span",{className:"grid-link disabled",children:"\u66f4\u591a"},void 0,!1,{fileName:Ps,lineNumber:930,columnNumber:18},this);default:return}}dingTask(e){Object(a.G)(e).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.success(t),this.getKeyList()}),(e=>{c.a.error(e)}))}))}render(){var e;const t=e=>Object(h.jsxDEV)("div",{children:[Object(h.jsxDEV)("b",{children:"\u5151\u6362\u7801\u7edf\u8ba1"},void 0,!1,{fileName:Ps,lineNumber:957,columnNumber:11},this),Object(h.jsxDEV)("ul",{className:"dflexaj mt5 fz12",children:[Object(h.jsxDEV)("li",{className:"dflexajc mr15",children:[Object(h.jsxDEV)("span",{children:"\u5df2\u4f5c\u5e9f\u6570"},void 0,!1,{fileName:Ps,lineNumber:960,columnNumber:15},this),Object(h.jsxDEV)("span",{children:e.invalid_total},void 0,!1,{fileName:Ps,lineNumber:961,columnNumber:15},this)]},void 0,!0,{fileName:Ps,lineNumber:959,columnNumber:13},this),Object(h.jsxDEV)("li",{className:"dflexajc mr15",children:[Object(h.jsxDEV)("span",{children:"\u5df2\u4f7f\u7528\u6570"},void 0,!1,{fileName:Ps,lineNumber:964,columnNumber:15},this),Object(h.jsxDEV)("span",{children:e.usage_total},void 0,!1,{fileName:Ps,lineNumber:965,columnNumber:15},this)]},void 0,!0,{fileName:Ps,lineNumber:963,columnNumber:13},this),Object(h.jsxDEV)("li",{className:"dflexajc",children:[Object(h.jsxDEV)("span",{children:"\u5df2\u5931\u6548\u6570"},void 0,!1,{fileName:Ps,lineNumber:972,columnNumber:15},this),Object(h.jsxDEV)("span",{children:e.overdue_total},void 0,!1,{fileName:Ps,lineNumber:973,columnNumber:15},this)]},void 0,!0,{fileName:Ps,lineNumber:971,columnNumber:13},this)]},void 0,!0,{fileName:Ps,lineNumber:958,columnNumber:11},this)]},void 0,!0,{fileName:Ps,lineNumber:956,columnNumber:9},this),{current:i,pageSize:a}=this.state;return Object(h.jsxDEV)("div",{id:"exchangecodelist",children:Object(h.jsxDEV)(vt.a,{loading:this.state.bulkExportLoading,icon:"circle",iconSize:32,iconText:"\u4e0b\u8f7d\u4e2d...",children:Object(h.jsxDEV)(Ft,{tabs:this.state.tabList,tabChange:this.tabFn.bind(this),children:[Object(h.jsxDEV)("div",{className:"codetable dflexj",children:[Object(h.jsxDEV)("div",{children:[Object(h.jsxDEV)(u.a,{type:"primary",icon:"plus",onClick:this.clickFn.bind(this),disabled:this.state.disabled,children:"\u65b0\u5efakey"},void 0,!1,{fileName:Ps,lineNumber:991,columnNumber:17},this),Object(h.jsxDEV)(u.a,{type:"primary",onClick:()=>this.bulkExport(),children:"\u6279\u91cf\u5bfc\u51fa"},void 0,!1,{fileName:Ps,lineNumber:999,columnNumber:17},this),Object(h.jsxDEV)(u.a,{type:"primary",onClick:()=>this.bulkSendFunction(),disabled:!(null!==(e=this.state.gridSelection[0])&&void 0!==e&&e.reseller_id),children:"\u6279\u91cf\u53d1\u9001"},void 0,!1,{fileName:Ps,lineNumber:1002,columnNumber:17},this)]},void 0,!0,{fileName:Ps,lineNumber:990,columnNumber:15},this),Object(h.jsxDEV)(n.a,{icon:"search",placeholder:"\u8bf7\u8f93\u5165key\u6279\u6b21ID\u8fdb\u884c\u5339\u914d\u67e5\u8be2",onChange:e=>this.setState({key_word:e}),value:this.state.key_word,wordSearch:this.iptsureFn.bind(this),countShow:!1,height:"36px",width:"260px",onClearItem:e=>{this.setState({key_word:""})},alignment:"left"},void 0,!1,{fileName:Ps,lineNumber:1010,columnNumber:15},this)]},void 0,!0,{fileName:Ps,lineNumber:989,columnNumber:13},this),Object(h.jsxDEV)("div",{className:"code-table",children:Object(h.jsxDEV)(I,{countChange:e=>{this.countChange(e)},spliteColor:"#fff",tableData:this.state.distdata,Column:Bs,maxheight:this.state.tableHeight,countbarVisible:!1,isSwitch:!1,page:this.state.page,dataCount:this.state.dataCount,pageChange:e=>{this.pageChange(e)},checkChange:e=>{this.setState({gridSelection:e})},ComponentHandler:(e,i)=>{if("link"==e){let e=Object(h.jsxDEV)("span",{className:"grid-link",onClick:e=>{this.linkTo(i)},children:i.batch_name},void 0,!1,{fileName:Ps,lineNumber:1047,columnNumber:23},this);return 4==i.style&&(e=Object(h.jsxDEV)("span",{style:{color:"#d8dbdd"},children:i.batch_name},void 0,!1,{fileName:Ps,lineNumber:1057,columnNumber:29},this)),e}return"usage"==e?Object(h.jsxDEV)(Ei.a,{trigger:"hover",content:t(i),children:Object(h.jsxDEV)("span",{className:"grid-link",children:i.usage},void 0,!1,{fileName:Ps,lineNumber:1064,columnNumber:25},this)},void 0,!1,{fileName:Ps,lineNumber:1063,columnNumber:23},this):"switch"==e?Object(h.jsxDEV)(v.a,{size:"small",checked:4==i.status,disabled:i.status>=6,onChange:e=>{this.onSwitchChange(e,i)}},void 0,!1,{fileName:Ps,lineNumber:1070,columnNumber:23},this):"status"==e?Object(h.jsxDEV)("p",{className:"dflexa",children:Object(h.jsxDEV)("span",{children:[Object(h.jsxDEV)("font",{className:"icon",style:{background:At.keysStatusBg(i.status)}},void 0,!1,{fileName:Ps,lineNumber:1085,columnNumber:27},this),i.status_text]},void 0,!0,{fileName:Ps,lineNumber:1084,columnNumber:25},this)},void 0,!1,{fileName:Ps,lineNumber:1083,columnNumber:23},this):"edit"==e?Object(h.jsxDEV)("div",{children:[this.opearoEl(1,i),this.opearoEl(2,i),this.opearoEl(3,i),i.approval_id&&2===i.status?Object(h.jsxDEV)("span",{className:"grid-link",onClick:e=>{this.dingTask(i.approval_id)},children:"\u9489\u9489\u5ba1\u6279\u67e5\u8be2"},void 0,!1,{fileName:Ps,lineNumber:1103,columnNumber:27},this):Object(h.jsxDEV)("span",{className:"grid-link disabled",children:"\u9489\u9489\u5ba1\u6279\u67e5\u8be2"},void 0,!1,{fileName:Ps,lineNumber:1112,columnNumber:27},this),this.opearoEl(4,i)]},void 0,!0,{fileName:Ps,lineNumber:1098,columnNumber:23},this):void 0}},void 0,!1,{fileName:Ps,lineNumber:1026,columnNumber:15},this)},void 0,!1,{fileName:Ps,lineNumber:1025,columnNumber:13},this),this.state.audit_visible?Object(h.jsxDEV)("div",{children:[Object(h.jsxDEV)("div",{className:"modal",children:" "},void 0,!1,{fileName:Ps,lineNumber:1124,columnNumber:17},this),Object(h.jsxDEV)("div",{className:"audit-box",children:[Object(h.jsxDEV)(g.a,{type:"close",className:"audit-close",onClick:e=>{this.cancel(e)}},void 0,!1,{fileName:Ps,lineNumber:1126,columnNumber:19},this),Object(h.jsxDEV)("div",{className:"audit-box-title",children:"\u53d1\u9001"},void 0,!1,{fileName:Ps,lineNumber:1133,columnNumber:19},this),Object(h.jsxDEV)("div",{className:"audit-box-question",children:"\u662f\u5426\u7acb\u5373\u53d1\u9001key\u4ee5\u53ca\u89e3\u538b\u5bc6\u7801?"},void 0,!1,{fileName:Ps,lineNumber:1134,columnNumber:19},this),Object(h.jsxDEV)("div",{className:"phone-group",children:[Object(h.jsxDEV)("div",{children:"\u63a5\u6536\u624b\u673a\u53f7"},void 0,!1,{fileName:Ps,lineNumber:1136,columnNumber:21},this),Object(h.jsxDEV)("div",{className:"phone-list",children:Object(h.jsxDEV)(Q.a,{value:this.state.phone_radio,isValueEqual:this.isValueEqual,onChange:e=>{this.onPhoneChange(e)},children:this.state.phone_list.map(((e,t)=>Object(h.jsxDEV)(Z.a,{value:t,onClick:()=>{e==this.state.phone_list[this.state.phone_radio]&&this.setState({phone_radio:-1})},children:e},t,!1,{fileName:Ps,lineNumber:1147,columnNumber:29},this)))},void 0,!1,{fileName:Ps,lineNumber:1138,columnNumber:23},this)},void 0,!1,{fileName:Ps,lineNumber:1137,columnNumber:21},this)]},void 0,!0,{fileName:Ps,lineNumber:1135,columnNumber:19},this),Object(h.jsxDEV)("div",{className:"email-group",children:[Object(h.jsxDEV)("div",{children:"\u63a5\u6536\u90ae\u7bb1"},void 0,!1,{fileName:Ps,lineNumber:1164,columnNumber:21},this),Object(h.jsxDEV)("div",{className:"email-list",children:Object(h.jsxDEV)(Q.a,{value:this.state.email_radio,isValueEqual:this.isValueEqual,onChange:e=>{this.onEmailChange(e)},children:this.state.email_list.map(((e,t)=>Object(h.jsxDEV)(Z.a,{value:t,onClick:()=>{e==this.state.email_list[this.state.email_radio]&&this.setState({email_radio:-1})},children:e},t,!1,{fileName:Ps,lineNumber:1175,columnNumber:29},this)))},void 0,!1,{fileName:Ps,lineNumber:1166,columnNumber:23},this)},void 0,!1,{fileName:Ps,lineNumber:1165,columnNumber:21},this)]},void 0,!0,{fileName:Ps,lineNumber:1163,columnNumber:19},this),Object(h.jsxDEV)("div",{className:"input-group",children:Object(h.jsxDEV)(Di.a,{placeholder:"\u8bf7\u8f93\u5165\u63a5\u6536\u624b\u673a\u53f7",onChange:this.phoneChange,disabled:this.state.phone_radio>-1},void 0,!1,{fileName:Ps,lineNumber:1192,columnNumber:21},this)},void 0,!1,{fileName:Ps,lineNumber:1191,columnNumber:19},this),Object(h.jsxDEV)("div",{className:"input-group",children:Object(h.jsxDEV)(Di.a,{placeholder:"\u8bf7\u8f93\u5165\u63a5\u6536\u90ae\u7bb1",onChange:this.emailChange,disabled:this.state.email_radio>-1},void 0,!1,{fileName:Ps,lineNumber:1199,columnNumber:21},this)},void 0,!1,{fileName:Ps,lineNumber:1198,columnNumber:19},this),Object(h.jsxDEV)("div",{className:"audit-btn-group",children:[Object(h.jsxDEV)(u.a,{onClick:e=>{this.cancel(e)},children:"\u53d6\u6d88"},void 0,!1,{fileName:Ps,lineNumber:1207,columnNumber:21},this),Object(h.jsxDEV)(u.a,{type:"primary",onClick:e=>{this.send(e)},children:"\u53d1\u9001"},void 0,!1,{fileName:Ps,lineNumber:1214,columnNumber:21},this)]},void 0,!0,{fileName:Ps,lineNumber:1206,columnNumber:19},this)]},void 0,!0,{fileName:Ps,lineNumber:1125,columnNumber:17},this)]},void 0,!0,{fileName:Ps,lineNumber:1123,columnNumber:15},this):null]},void 0,!0,{fileName:Ps,lineNumber:988,columnNumber:11},this)},void 0,!1,{fileName:Ps,lineNumber:982,columnNumber:9},this)},void 0,!1,{fileName:Ps,lineNumber:981,columnNumber:7},this)}}var zs=i(483),Js=(i(255),"/Users/zhangds/web/blue-brother/frontend/src/components/UseUploadExcel/index.jsx");const Us=[{title:"\u884c\u53f7",name:"id"},{title:"key",name:"key"},{title:"\u9519\u8bef\u539f\u56e0",name:"msg"}];var Ws=e=>{const{title:t="\u63d0\u793a",onClose:i,onImport:s,visible:l=!1,url:n}=e,[o,m]=Object(r.useState)(null),[d,b]=Object(r.useState)(""),[p,N]=Object(r.useState)(2),[j,v]=Object(r.useState)(!1),[f,_]=Object(r.useState)(""),[x,y]=Object(r.useState)(!0),[O,D]=Object(r.useState)(!1),[E,V]=Object(r.useState)(!1),[k,S]=Object(r.useState)(0),[w,C]=Object(r.useState)(0),[T,I]=Object(r.useState)([]),F=Object(r.useRef)(null),[L,H]=Object(r.useState)(!1);Object(r.useEffect)((()=>{try{let e=F.current;e&&e.click()}catch(e){}}),[F,L]);const q=e=>{let t="";for(let i in e)t+=e[i]+" ";return t},M=async e=>{v(!0);let t=new FormData;t.append("file",e),Object(a.h)(n,t).then((e=>{if(v(!1),200===e.code||0===e.code||1===e.code)switch(e.code){case 200:return void(e=>{N(200),_(e.data.hash),y(!1)})(e);case 0:return void N(0);case 1:return void(e=>{D(!0);let t=e.data.rowError;S(t.total),C(t.error_count),_(t.hash);let i=[];for(let a in t.error)i.push(t.error[a]);i=i.map(((e,t)=>({key:e.key,id:t+1,msg:q(e.msg)}))),I(i)})(e);default:return}else c.a.error(e.message),N(0)}))},P=e=>{let t=e.target.files[0];m(t),b(t.name),V(!0),M(t)},B=()=>{""!==f&&(A(),s(f))},A=()=>{N(2),D(!1),V(!1),y(!0),i()},z=()=>Object(h.jsxDEV)("div",{className:"up-files-excel",children:[Object(h.jsxDEV)("div",{className:"user-file-box",children:[Object(h.jsxDEV)("p",{className:"user-file-name",children:[Object(h.jsxDEV)(g.a,{type:"text-guide-o"},void 0,!1,{fileName:Js,lineNumber:264,columnNumber:13},void 0),d]},void 0,!0,{fileName:Js,lineNumber:263,columnNumber:11},void 0),Object(h.jsxDEV)("div",{className:"file-update-box",children:[Object(h.jsxDEV)("input",{type:"file",accept:".xls,.xlsx,.csv",className:"upload-input1",onClick:e=>e.target.value="",onChange:e=>P(e)},void 0,!1,{fileName:Js,lineNumber:268,columnNumber:13},void 0),Object(h.jsxDEV)(g.a,{type:"up-circle-o"},void 0,!1,{fileName:Js,lineNumber:275,columnNumber:13},void 0),Object(h.jsxDEV)("span",{children:"\u66f4\u65b0\u6587\u4ef6"},void 0,!1,{fileName:Js,lineNumber:276,columnNumber:13},void 0)]},void 0,!0,{fileName:Js,lineNumber:267,columnNumber:11},void 0)]},void 0,!0,{fileName:Js,lineNumber:262,columnNumber:9},void 0),(()=>{switch(p){case 0:return Object(h.jsxDEV)("div",{className:"upload-error",children:[Object(h.jsxDEV)(g.a,{type:"error-circle",className:"error-icon"},void 0,!1,{fileName:Js,lineNumber:249,columnNumber:9},void 0),Object(h.jsxDEV)("span",{children:"\u6587\u4ef6\u89e3\u6790\u5931\u8d25, \u8bf7\u67e5\u770b\u5bfc\u5165\u89c4\u5219\u5e76\u66f4\u65b0\u6587\u4ef6"},void 0,!1,{fileName:Js,lineNumber:250,columnNumber:9},void 0)]},void 0,!0,{fileName:Js,lineNumber:248,columnNumber:7},void 0);case 200:return Object(h.jsxDEV)("div",{className:"upload-success",children:[Object(h.jsxDEV)(g.a,{type:"check-circle",className:"success-icon"},void 0,!1,{fileName:Js,lineNumber:241,columnNumber:9},void 0),Object(h.jsxDEV)("span",{children:'\u6587\u4ef6\u89e3\u6790\u6210\u529f\uff0c \u70b9\u51fb "\u786e\u5b9a\u5bfc\u5165" \u5373\u53ef\u5bfc\u5165'},void 0,!1,{fileName:Js,lineNumber:242,columnNumber:9},void 0)]},void 0,!0,{fileName:Js,lineNumber:240,columnNumber:7},void 0);default:return}})()]},void 0,!0,{fileName:Js,lineNumber:261,columnNumber:7},void 0),J=()=>Object(h.jsxDEV)("div",{className:"upload-panel1",children:[Object(h.jsxDEV)("div",{className:"upload-label",children:"\u4e0b\u8f7d\u6a21\u677f\u5e76\u586b\u5199\u540e\u4e0a\u4f20"},void 0,!1,{fileName:Js,lineNumber:301,columnNumber:9},void 0),Object(h.jsxDEV)("div",{className:"upload-info",children:Object(h.jsxDEV)("div",{children:["\u8bf7\u5148\u4e0b\u8f7d\u300c\u6570\u5b57\u4e16\u754c\u8425\u9500\u7ba1\u7406\u7cfb\u7edf_keys_\u6a21\u677f\u300d\u5e76\u6309\u7167\u6a21\u677f\u586b\u5199\u540e\u518d\u4e0a\u4f20\uff0c",Object(h.jsxDEV)("span",{style:{color:"red"},children:"\u6279\u91cf\u4e0a\u4f20\u67e5\u8be2 \u53ea\u80fd\u662f\u4e00\u4e2a\u8ba1\u5212\u4e0b\u9762key\u3002"},void 0,!1,{fileName:Js,lineNumber:305,columnNumber:13},void 0)]},void 0,!0,{fileName:Js,lineNumber:303,columnNumber:11},void 0)},void 0,!1,{fileName:Js,lineNumber:302,columnNumber:9},void 0),Object(h.jsxDEV)(u.a,{type:"default",className:"btn-upload1",onClick:()=>{window.location.href="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/key%E6%A8%A1%E7%89%88.xlsx"},children:"\u4e0b\u8f7d\u6a21\u677f"},void 0,!1,{fileName:Js,lineNumber:308,columnNumber:9},void 0),Object(h.jsxDEV)("div",{className:"btn-group",children:[Object(h.jsxDEV)(u.a,{type:"default",onClick:()=>A(),children:"\u53d6\u6d88"},void 0,!1,{fileName:Js,lineNumber:313,columnNumber:11},void 0),Object(h.jsxDEV)(u.a,{type:"primary",disabled:x,onClick:e=>{B()},style:{background:"#1890ff",color:"#FFFFFF",border:"none"},children:"\u786e\u5b9a\u5bfc\u5165"},void 0,!1,{fileName:Js,lineNumber:316,columnNumber:11},void 0)]},void 0,!0,{fileName:Js,lineNumber:312,columnNumber:9},void 0)]},void 0,!0,{fileName:Js,lineNumber:300,columnNumber:7},void 0);return Object(h.jsxDEV)("div",{children:l?Object(h.jsxDEV)("div",{children:[Object(h.jsxDEV)("div",{className:"modal"},void 0,!1,{fileName:Js,lineNumber:397,columnNumber:11},void 0),Object(h.jsxDEV)("div",{className:"import-excel",style:{height:"auto"},children:Object(h.jsxDEV)(vt.a,{loading:j,iconText:"\u89e3\u6790\u4e2d...",icon:"circle",children:[Object(h.jsxDEV)("div",{className:"import-header",children:[Object(h.jsxDEV)("div",{className:"import-title",children:t},void 0,!1,{fileName:Js,lineNumber:401,columnNumber:17},void 0),Object(h.jsxDEV)(g.a,{type:"close",className:"import-close",onClick:()=>A()},void 0,!1,{fileName:Js,lineNumber:402,columnNumber:17},void 0)]},void 0,!0,{fileName:Js,lineNumber:400,columnNumber:15},void 0),O?Object(h.jsxDEV)("div",{children:[Object(h.jsxDEV)("div",{className:"file-upload-tip",children:["\u6587\u4ef6\u4e0a\u4f20\u6210\u529f.\u5171 ",k," \u6761key\u7801,\u5176\u4e2d ",k-w,"\u6761\u53ef\u6210\u529f\u5bfc\u5165"]},void 0,!0,{fileName:Js,lineNumber:354,columnNumber:9},void 0),Object(h.jsxDEV)("div",{className:"file-errmsg1",children:["\u53d1\u73b0\u4ee5\u4e0b ",w," \u6761\u4e0d\u7b26\u5408\u8981\u6c42,\u5c06\u4e0d\u4f1a\u88ab\u5bfc\u5165"]},void 0,!0,{fileName:Js,lineNumber:358,columnNumber:9},void 0),Object(h.jsxDEV)("div",{className:"gridpanel1",children:Object(h.jsxDEV)(zs.a,{columns:Us,datasets:T,scroll:{y:250},size:"large"},void 0,!1,{fileName:Js,lineNumber:361,columnNumber:11},void 0)},void 0,!1,{fileName:Js,lineNumber:360,columnNumber:9},void 0),Object(h.jsxDEV)("div",{className:"foot-bar",children:Object(h.jsxDEV)("div",{className:"btn-group",children:[Object(h.jsxDEV)(u.a,{type:"default",onClick:e=>{m(null),N(2),D(!1),V(!1),y(!0),H(!L)},children:"\u91cd\u65b0\u4e0a\u4f20"},void 0,!1,{fileName:Js,lineNumber:366,columnNumber:13},void 0),Object(h.jsxDEV)(u.a,{type:"primary",onClick:e=>{B()},style:{background:"#1890ff",color:"#FFFFFF",border:"none"},children:"\u786e\u5b9a\u5bfc\u5165"},void 0,!1,{fileName:Js,lineNumber:374,columnNumber:13},void 0)]},void 0,!0,{fileName:Js,lineNumber:365,columnNumber:11},void 0)},void 0,!1,{fileName:Js,lineNumber:364,columnNumber:9},void 0)]},void 0,!0,{fileName:Js,lineNumber:353,columnNumber:7},void 0):Object(h.jsxDEV)("div",{children:[Object(h.jsxDEV)("div",{children:[Object(h.jsxDEV)("div",{className:"step-bar",children:[Object(h.jsxDEV)("div",{className:"step-group",children:[Object(h.jsxDEV)("div",{className:"step-code active",children:"1"},void 0,!1,{fileName:Js,lineNumber:181,columnNumber:13},void 0),Object(h.jsxDEV)("span",{className:"step-label active",children:"\u4e0a\u4f20\u6587\u4ef6"},void 0,!1,{fileName:Js,lineNumber:182,columnNumber:13},void 0)]},void 0,!0,{fileName:Js,lineNumber:180,columnNumber:11},void 0),Object(h.jsxDEV)("div",{className:"step-center",children:Object(h.jsxDEV)("div",{className:"step-line"},void 0,!1,{fileName:Js,lineNumber:185,columnNumber:13},void 0)},void 0,!1,{fileName:Js,lineNumber:184,columnNumber:11},void 0),Object(h.jsxDEV)("div",{className:"step-group",children:[Object(h.jsxDEV)("div",{className:"step-code",children:"2"},void 0,!1,{fileName:Js,lineNumber:188,columnNumber:13},void 0),Object(h.jsxDEV)("span",{className:"step-label",children:"\u5bfc\u5165\u5b8c\u6210"},void 0,!1,{fileName:Js,lineNumber:189,columnNumber:13},void 0)]},void 0,!0,{fileName:Js,lineNumber:187,columnNumber:11},void 0)]},void 0,!0,{fileName:Js,lineNumber:179,columnNumber:9},void 0),Object(h.jsxDEV)("div",{className:"upload-panel1",children:[Object(h.jsxDEV)("div",{className:"upload-label",children:"\u76f4\u63a5\u4e0a\u4f20"},void 0,!1,{fileName:Js,lineNumber:194,columnNumber:11},void 0),Object(h.jsxDEV)("div",{className:"upload-info",children:[Object(h.jsxDEV)("div",{children:" - \u652f\u6301\u6587\u4ef6\u7c7b\u578b\uff1axls\uff0cxlsx\uff0ccsv"},void 0,!1,{fileName:Js,lineNumber:196,columnNumber:13},void 0),Object(h.jsxDEV)("div",{children:"- \u652f\u6301\u6240\u6709\u57fa\u7840\u5b57\u6bb5\u7684\u5bfc\u5165\uff0c\u4e00\u6b21\u81f3\u591a\u5bfc\u5165 100 \u6761key\u7801\uff08\u4e0d\u7b26\u5408\u89c4\u5219\u6574\u6761\u4efb\u52a1\u4e0d\u4e88\u4ee5\u5bfc\u5165\uff09"},void 0,!1,{fileName:Js,lineNumber:197,columnNumber:13},void 0)]},void 0,!0,{fileName:Js,lineNumber:195,columnNumber:11},void 0)]},void 0,!0,{fileName:Js,lineNumber:193,columnNumber:9},void 0)]},void 0,!0,{fileName:Js,lineNumber:178,columnNumber:7},void 0),E?z():Object(h.jsxDEV)("div",{className:"upload-excel-01",children:[Object(h.jsxDEV)("input",{ref:F,type:"file",accept:".xls,.xlsx,.csv",className:"upload-input",onClick:e=>e.target.value="",onChange:e=>P(e)},void 0,!1,{fileName:Js,lineNumber:213,columnNumber:9},void 0),Object(h.jsxDEV)(u.a,{style:{background:"#1890ff",color:"#FFFFFF",border:"none"},children:"\u4e0a\u4f20\u6587\u4ef6"},void 0,!1,{fileName:Js,lineNumber:221,columnNumber:9},void 0)]},void 0,!0,{fileName:Js,lineNumber:212,columnNumber:7},void 0),J()]},void 0,!0,{fileName:Js,lineNumber:340,columnNumber:7},void 0)]},void 0,!0,{fileName:Js,lineNumber:399,columnNumber:13},void 0)},void 0,!1,{fileName:Js,lineNumber:398,columnNumber:11},void 0)]},void 0,!0,{fileName:Js,lineNumber:396,columnNumber:9},void 0):null},void 0,!1,{fileName:Js,lineNumber:394,columnNumber:5},void 0)},Rs=(i(257),"/Users/zhangds/web/blue-brother/frontend/src/components/keysFind/index.jsx");const Ks=[{key:0,text:"\u5168\u90e8"},{key:1,text:"\u53ef\u4f7f\u7528"},{key:2,text:"\u5df2\u4f7f\u7528"},{key:3,text:"\u5df2\u5b8c\u7ed3"},{key:4,text:"\u5df2\u4f5c\u5e9f"}];var Ys=Object(r.forwardRef)((({onQuery:e,query:t,resetChange:i},o)=>{const[m,d]=Object(r.useState)({date:[],reseller:"",plan:"",state:{key:0,text:"\u5168\u90e8"},key:"",key_batch_id:""}),[b,p]=Object(r.useState)([]),[N,j]=Object(r.useState)([]),[v,g]=Object(r.useState)([]);function f(){d({date:[],reseller:"",plan:"",state:{key:0,text:"\u5168\u90e8"},key:"",key_batch_id:""})}function _(e,t){return Object(h.jsxDEV)($.a,{height:256,itemCount:e.length,itemSize:32,width:200,children:({index:i,style:a})=>Object(h.jsxDEV)("div",{style:a,children:t(e[i],i)},void 0,!1,{fileName:Rs,lineNumber:86,columnNumber:32},this)},void 0,!1,{fileName:Rs,lineNumber:85,columnNumber:7},this)}function x(e){var t,i,a,s;return{begin_time:e.date[0]||null,end_time:e.date[1]||null,reseller_id:(null===(t=e.reseller)||void 0===t?void 0:t.key)||null,plan_id:(null===(i=e.plan)||void 0===i?void 0:i.key)||null,status:(null===(a=e.state)||void 0===a?void 0:a.key)||null,key:e.key||null,key_batch_id:(null===(s=e.key_batch_id)||void 0===s?void 0:s.id)||null}}return Object(r.useEffect)((()=>{let e=x(m);t(e)}),[m]),Object(r.useEffect)((()=>{Object(a.ub)().then((e=>Object(a.Tb)(e,((e,t)=>{const i=e.map((e=>({key:e.id,text:e.name})));p(i)}),(e=>{})))),Object(a.rb)().then((e=>Object(a.Tb)(e,((e,t)=>{const i=e.map((e=>({key:e.id,text:e.title})));j(i)}),(e=>{}))))}),[]),Object(r.useImperativeHandle)(o,(()=>({clearData:f}))),Object(h.jsxDEV)("div",{className:"keysFind",children:Object(h.jsxDEV)(l.a,{children:[Object(h.jsxDEV)(s.a,{labelname:"\u8bf7\u9009\u62e9\u65e5\u671f\uff1a",required:"",labelwidth:"95px",children:Object(h.jsxDEV)(ee.a,{dateFormat:"YYYY-MM-DD",value:m.date,className:"zent-datepicker-plan",width:204,onChange:e=>d({...m,date:e})},void 0,!1,{fileName:Rs,lineNumber:132,columnNumber:11},void 0)},void 0,!1,{fileName:Rs,lineNumber:131,columnNumber:9},void 0),Object(h.jsxDEV)(s.a,{labelname:"\u72b6\u6001\uff1a",required:"",labelwidth:"50px",children:Object(h.jsxDEV)(X.a,{name:"state",value:m.state,options:Ks,placeholder:"\u8bf7\u9009\u62e9",width:204,clearable:!0,onChange:e=>d({...m,state:e})},void 0,!1,{fileName:Rs,lineNumber:141,columnNumber:11},void 0)},void 0,!1,{fileName:Rs,lineNumber:140,columnNumber:9},void 0),Object(h.jsxDEV)(s.a,{labelname:"\u5206\u9500\u5546\uff1a",required:"",labelwidth:"70px",children:Object(h.jsxDEV)(X.a,{value:m.reseller,options:b,placeholder:"\u8bf7\u9009\u62e9",renderOptionList:_,width:204,clearable:!0,onChange:e=>d({...m,reseller:e})},void 0,!1,{fileName:Rs,lineNumber:152,columnNumber:11},void 0)},void 0,!1,{fileName:Rs,lineNumber:151,columnNumber:9},void 0),Object(h.jsxDEV)(s.a,{labelname:"\u8ba1\u5212\u540d\u79f0\uff1a",required:"",labelwidth:"90px",children:Object(h.jsxDEV)(X.a,{value:m.plan,options:N,placeholder:"\u8bf7\u9009\u62e9",renderOptionList:_,width:204,clearable:!0,onChange:e=>{var t;e?(t=e.key,Object(a.Nc)({plan_id:t}).then((e=>{Object(a.Tb)(e,((e,t)=>{const i=e.map((e=>({key:e.id,text:e.batch_name,...e})));g(i)}),(e=>{c.a.error(e)}))})),d({...m,plan:e})):(d({...m,key_batch_id:null,plan:null}),g([]))}},void 0,!1,{fileName:Rs,lineNumber:163,columnNumber:11},void 0)},void 0,!1,{fileName:Rs,lineNumber:162,columnNumber:9},void 0),Object(h.jsxDEV)(s.a,{labelname:"key\u6279\u6b21\uff1a",required:"",labelwidth:"80px",children:Object(h.jsxDEV)(X.a,{value:m.key_batch_id,options:v,placeholder:"\u8bf7\u9009\u62e9",renderOptionList:function(e,t){return Object(h.jsxDEV)($.a,{height:256,itemCount:e.length,itemSize:32,width:200,children:({index:i,style:a})=>Object(h.jsxDEV)("div",{style:a,children:t(e[i],i)},void 0,!1,{fileName:Rs,lineNumber:94,columnNumber:32},this)},void 0,!1,{fileName:Rs,lineNumber:93,columnNumber:7},this)},width:204,clearable:!0,onChange:e=>{d({...m,key_batch_id:e})}},void 0,!1,{fileName:Rs,lineNumber:182,columnNumber:11},void 0)},void 0,!1,{fileName:Rs,lineNumber:181,columnNumber:9},void 0),Object(h.jsxDEV)(s.a,{labelname:"KEY\uff1a",required:"",labelwidth:"50px",children:Object(h.jsxDEV)(n.a,{value:m.key,countShow:!1,labelWidth:"0px",placeholder:"\u8bf7\u8f93\u5165",width:204,onChange:e=>d({...m,key:e}),onClearItem:()=>d({...m,key:""})},void 0,!1,{fileName:Rs,lineNumber:195,columnNumber:11},void 0)},void 0,!1,{fileName:Rs,lineNumber:194,columnNumber:9},void 0),Object(h.jsxDEV)("div",{className:"button_box",children:[Object(h.jsxDEV)(u.a,{type:"primary",onClick:()=>{x(m).plan_id||x(m).reseller_id||x(m).key?e(x(m)):c.a.warn("\u8bf7\u8f93\u5165\u3010\u8ba1\u5212\u540d\u79f0\u3011\u6216\u3010key\u3011\u8fdb\u884c\u67e5\u8be2")},children:"\u67e5\u8be2"},void 0,!1,{fileName:Rs,lineNumber:207,columnNumber:11},void 0),Object(h.jsxDEV)(u.a,{onClick:()=>{d({date:[],reseller:"",plan:"",state:{key:0,text:"\u5168\u90e8"},key:"",key_batch_id:""}),i()},children:"\u91cd\u7f6e"},void 0,!1,{fileName:Rs,lineNumber:223,columnNumber:11},void 0)]},void 0,!0,{fileName:Rs,lineNumber:206,columnNumber:9},void 0)]},void 0,!0,{fileName:Rs,lineNumber:130,columnNumber:7},void 0)},void 0,!1,{fileName:Rs,lineNumber:129,columnNumber:5},void 0)})),$s=(i(258),"/Users/zhangds/web/blue-brother/frontend/src/pages/plan/keyList/index.jsx");const Gs=[{title:"key\u7801",name:"key_code",prop:"key_code",type:"normal",width:"auto"},{title:"\u5f52\u5c5e\u8425\u9500\u8ba1\u5212",width:"auto",type:"normal",prop:"title",name:"title"},{title:"\u5f52\u5c5eKEY\u6279\u6b21",prop:"batch_name",name:"batch_name",width:"auto",type:"normal"},{title:"\u72b6\u6001",prop:"status",name:"status",width:"auto",type:"slot"},{title:"\u64cd\u4f5c",name:"opearo",prop:"opearo",type:"slot",width:"auto"},{title:"\u603b\u53d1\u653e\u6761\u6570",prop:"total",name:"total",width:"auto",type:"normal"},{title:"\u5269\u4f59\u6761\u6570",prop:"residue",name:"residue",width:"auto",type:"normal"},{title:"\u5df2\u4f7f\u7528\u6761\u6570",name:"usage",prop:"usage",type:"normal",width:"auto"},{title:"\u5df2\u8fc7\u671f\u6761\u6570",name:"overdue",prop:"overdue",type:"normal",width:"auto"},{title:"\u5df2\u4f5c\u5e9f\u6761\u6570",name:"invalid",prop:"invalid",type:"normal",width:"auto"},{title:"\u5df2\u5b8c\u7ed3\u6761\u6570",name:"end",prop:"end",type:"normal",width:"auto"},{title:"\u66f4\u65b0\u65f6\u95f4",name:"update_time",prop:"update_time",type:"normal",width:"220px"}];var Qs=()=>{const e=Object(r.useRef)(null),t=Object(r.useRef)(null),[i,s]=Object(W.a)({tabList:[{title:"KEY\u5217\u8868"}],query:{begin_time:"",end_time:"",reseller_id:"",plan_id:"",status:"",key:"",key_batch_id:""},hash:"",loading:!1,page:1,limit:10,isQuery:!1,selectTable:[],multipleDisabledBtn:!0,exportKeyBtn:!1,lodgingTable:!1,tableHeight:500,tableData:[],grantTotal:0,surplusTotal:0,usageTotal:0,outdateTotal:0,invalidTotal:0,dialogTitle:"",bachVisible:!1,bachUrl:"",bachApiType:0}),l=()=>{let e={begin_time:i.query.begin_time||null,end_time:i.query.end_time||null,reseller_id:i.query.reseller_id||null,plan_id:i.query.plan_id||null,status:i.query.status||null,key:i.query.key||null,key_batch_id:i.query.key_batch_id||null,hash:""!==i.hash?i.hash:null,page:i.page,limit:i.limit};return e=Object(Lt.a)({...e},(e=>Object(Ht.a)(e)||Object(qt.a)(e))),e};Object(pt.a)((()=>{(()=>{const e=l();s({loading:!0}),Object(a.ib)(e).then((e=>{Object(a.Tb)(e,((e,t)=>{s({loading:!1}),e.total>0?s({lodgingTable:!1}):s({lodgingTable:!0}),s({dataCount:e.total,tableData:e.data})}),(e=>{c.a.error(e),s({loading:!1})}))}))})()}),[i.isQuery]);const n=()=>{t.current.allChecked(!1),s({selectTable:[]})},o=e=>{let t={keys:e};try{Object(a.Vb)(t).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.success("\u6279\u91cf\u4f5c\u5e9f\u6210\u529f"),n(),s({multipleDisabledBtn:!0,isQuery:!i.isQuery})}))}))}catch(l){}},m=e=>{let t={key:e.key};Object(a.Yb)(t).then((e=>{Object(a.Tb)(e,((e,t)=>{s({page:1,limit:10,isQuery:!i.isQuery}),c.a.success("\u4f5c\u5e9f\u6210\u529f")}),(e=>{c.a.error(e)}))}))},d=t=>{Object(a.k)({hash:t}).then((l=>{Object(a.Tb)(l,((a,l)=>{c.a.success("\u6279\u91cf\u4e0a\u4f20\u6807\u8bb0\u4e3a\u4f5c\u5e9f"),e.current.clearData(),s({page:1,limit:10,hash:t,isQuery:!i.isQuery})}),(e=>{c.a.error(e)}))}))};return Object(h.jsxDEV)("div",{className:"key-container",id:"dislist",children:[Object(h.jsxDEV)(Ft,{tabs:i.tabList,style:{paddingBottom:0},children:[Object(h.jsxDEV)("div",{className:"distable dflexj",style:{paddingBottom:0},children:Object(h.jsxDEV)(Ys,{ref:e,query:e=>(e=>{let t=Object(Lt.a)({...e},(e=>Object(Ht.a)(e)||Object(qt.a)(e)));s({query:t})})(e),onQuery:e=>{s({page:1,limit:10,hash:"",isQuery:!i.isQuery})},resetChange:()=>{s({page:1,limit:10,hash:"",tableData:[],lodgingTable:!1,dataCount:0})}},void 0,!1,{fileName:$s,lineNumber:637,columnNumber:11},void 0)},void 0,!1,{fileName:$s,lineNumber:636,columnNumber:9},void 0),Object(h.jsxDEV)("div",{className:"distable dflexj",style:{paddingTop:0},children:Object(h.jsxDEV)("div",{children:[Object(h.jsxDEV)(u.a,{onClick:()=>{s({bachUrl:"/key/import?type=1",dialogTitle:"\u6279\u91cf\u4e0a\u4f20\u67e5\u8be2",bachVisible:!0,bachApiType:1})},children:"\u6279\u91cf\u4e0a\u4f20\u67e5\u8be2"},void 0,!1,{fileName:$s,lineNumber:647,columnNumber:13},void 0),Object(h.jsxDEV)(u.a,{style:{border:"1px solid red",color:"red"},onClick:()=>{s({bachUrl:"/key/import?type=2",dialogTitle:"\u6279\u91cf\u4e0a\u4f20\u4f5c\u5e9f",bachVisible:!0,bachApiType:2})},children:"\u6279\u91cf\u4e0a\u4f20\u4f5c\u5e9f"},void 0,!1,{fileName:$s,lineNumber:648,columnNumber:13},void 0),Object(h.jsxDEV)(u.a,{style:{border:"1px solid red",color:"red"},onClick:()=>{s({bachUrl:"/key/import?type=3",dialogTitle:"\u6279\u91cf\u4e0a\u4f20\u4f7f\u7528",bachVisible:!0,bachApiType:3})},children:"\u6279\u91cf\u4e0a\u4f20\u6807\u8bb0\u6210\u5df2\u4f7f\u7528"},void 0,!1,{fileName:$s,lineNumber:654,columnNumber:13},void 0),Object(h.jsxDEV)(u.a,{onClick:()=>(()=>{let e=Object(f.a)(i.selectTable,(e=>e.key)),t={keys:e};try{Ut(t,2).then((t=>{2===t?o(e):1===t&&G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:"\u786e\u5b9a\u6279\u91cf\u4f5c\u5e9f\uff1f"},void 0,!1,{fileName:$s,lineNumber:302,columnNumber:22},void 0),onConfirm(){o(e)},onCancel(){},className:"questModal",parentComponent:void 0})}))}catch(a){}})(),disabled:i.multipleDisabledBtn,children:"\u6279\u91cf\u4f5c\u5e9f"},void 0,!1,{fileName:$s,lineNumber:661,columnNumber:13},void 0),Object(h.jsxDEV)(u.a,{onClick:()=>(()=>{let e={keys:Object(f.a)(i.selectTable,(e=>e.key))};Object(a.Xb)(e).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.success("\u6279\u91cf\u6807\u8bb0\u4e3a\u4f7f\u7528\u6210\u529f"),n(),s({multipleDisabledBtn:!0,isQuery:!i.isQuery})}),(e=>{c.a.error(e)}))}))})(),disabled:i.multipleDisabledBtn,children:"\u6279\u91cf\u6807\u8bb0\u4e3a\u5df2\u4f7f\u7528"},void 0,!1,{fileName:$s,lineNumber:664,columnNumber:13},void 0),Object(h.jsxDEV)(u.a,{onClick:()=>(()=>{let e=!1,t=l();delete t.page,delete t.limit,""!==i.hash&&(t.hash=i.hash);for(let i in t)!0!==t.hasOwnProperty("key")&&!0!==t.hasOwnProperty("plan_id")&&!0!==t.hasOwnProperty("reseller_id")&&!0!==t.hasOwnProperty("hash")||(e=!0);if(i.selectTable.length>0){let a=[];a=i.selectTable.map((e=>e.key)),t={keys:a.join(",")},e=!0}e&&Object(a.J)(t).then((e=>{if("application/json"==e.type){const t=new FileReader;t.readAsText(e,"utf-8"),t.onload=function(){const e=JSON.parse(t.result);c.a.clear(),c.a.error(e.message)}}else{let i=new Blob([e]),a="\u8425\u9500\u8ba1\u5212"+ae()+".xlsx";var t=document.createElement("a");t.href=window.URL.createObjectURL(i),t.download=a,t.click(),window.URL.revokeObjectURL(t.href)}}))})(),disabled:i.exportKeyBtn,children:"\u5bfc\u51fa"},void 0,!1,{fileName:$s,lineNumber:667,columnNumber:13},void 0)]},void 0,!0,{fileName:$s,lineNumber:645,columnNumber:11},void 0)},void 0,!1,{fileName:$s,lineNumber:644,columnNumber:9},void 0),Object(h.jsxDEV)("div",{children:[i.selectTable.length>0?Object(h.jsxDEV)(ki.a,{type:"info",extraContent:Object(h.jsxDEV)(u.a,{type:"primary",onClick:()=>n(),children:"\u6e05\u7a7a"},void 0,!1,{fileName:$s,lineNumber:677,columnNumber:17},void 0),children:["\u5df2\u9009\u62e9",Object(h.jsxDEV)("font",{color:"#296bef",style:{fontWeight:"bold"},children:i.selectTable.length},void 0,!1,{fileName:$s,lineNumber:683,columnNumber:15},void 0),"\u53d1\u653ekey\u603b\u6570:",i.grantTotal,",\u5269\u4f59key\u603b\u6570:",i.surplusTotal,",\u5df2\u4f7f\u7528\u603b\u6570:",i.usageTotal,",\u5df2\u8fc7\u671f\u603b\u6570:",i.outdateTotal,",\u5df2\u4f5c\u5e9f\u603b\u6570:",i.invalidTotal]},void 0,!0,{fileName:$s,lineNumber:674,columnNumber:13},void 0):null,Object(h.jsxDEV)(vt.a,{loading:i.loading,icon:"circle",children:Object(h.jsxDEV)(I,{spliteColor:"#fff",tableData:i.tableData,Column:Gs,countbarVisible:!1,maxheight:i.tableHeight,isSwitch:!1,page:i.page,ref:t,dataCount:i.dataCount,pageChange:e=>(e=>{s({page:e,isQuery:!i.isQuery})})(e),emptyText:i.lodgingTable?"\u62b1\u6b49\uff0c\u6682\u65e0\u76f8\u5173\u6570\u636e\u8bb0\u5f55":"\u67e5\u8be2 \u8bf7\u8f93\u5165\u3010\u5206\u9500\u5546\u3011\u6216\u3010\u8ba1\u5212\u540d\u79f0\u3011\u6216\u3010key\u3011\u8fdb\u884c\u67e5\u8be2",countChange:e=>(e=>{s({limit:e,isQuery:!i.isQuery})})(e),checkChange:e=>(e=>{e.length>0?s({multipleDisabledBtn:!1}):s({multipleDisabledBtn:!0}),s({selectTable:e});let t=0,i=0,a=0,l=0,n=0;e.forEach((e=>{t+=Number(e.total),i+=Number(e.residue),a+=Number(e.usage),n+=Number(e.overdue),l+=Number(e.invalid)})),s({grantTotal:t,usageTotal:a,invalidTotal:l,outdateTotal:n,surplusTotal:i})})(e),ComponentHandler:(e,t)=>"dates"==e?Object(h.jsxDEV)("span",{children:[t.begin_time," \u81f3 ",t.end_time]},void 0,!0,{fileName:$s,lineNumber:714,columnNumber:21},void 0):"status"==e?Object(h.jsxDEV)("p",{className:"dflexa",children:Object(h.jsxDEV)("span",{children:[Object(h.jsxDEV)("font",{className:"icon",style:{background:At.keyStatusBg(parseInt(t.status))}},void 0,!1,{fileName:$s,lineNumber:723,columnNumber:25},void 0),t.status_text]},void 0,!0,{fileName:$s,lineNumber:722,columnNumber:23},void 0)},void 0,!1,{fileName:$s,lineNumber:721,columnNumber:21},void 0):"opearo"==e?Object(h.jsxDEV)("span",{children:[Object(h.jsxDEV)("a",{className:"grid-link",style:{paddingLeft:"2px",color:"#d8dbdd"},children:"\u8be6\u60c5"},void 0,!1,{fileName:$s,lineNumber:737,columnNumber:23},void 0),Object(h.jsxDEV)(y.a,{position:y.d.RightTop,children:[Object(h.jsxDEV)(y.b,{children:Object(h.jsxDEV)("div",{className:"linkmore",children:["\u66f4\u591a ",Object(h.jsxDEV)(g.a,{type:"down"},void 0,!1,{fileName:$s,lineNumber:743,columnNumber:32},void 0)]},void 0,!0,{fileName:$s,lineNumber:742,columnNumber:27},void 0)},void 0,!1,{fileName:$s,lineNumber:741,columnNumber:25},void 0),Object(h.jsxDEV)(y.c,{children:Object(h.jsxDEV)(O.a,{onClick:(e,l)=>((e,t,l)=>{if(1===Number(t)){let e={key:l.key};Object(a.ac)(e).then((e=>{Object(a.Tb)(e,((e,t)=>{s({page:1,limit:10,isQuery:!i.isQuery}),c.a.success("\u6807\u8bb0\u4e3a\u4f7f\u7528\u6210\u529f")}),(e=>{c.a.error(e)}))}))}if(2===Number(t)){let e={type:4,object_value:l.key};try{Ut(e).then((e=>{2===e?m(l):1===e&&G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:["\u786e\u5b9a\u4f5c\u5e9f",l.title,"\uff1f"]},void 0,!0,{fileName:$s,lineNumber:496,columnNumber:24},void 0),onConfirm(){m(l)},onCancel(){},className:"questModal",parentComponent:void 0})}))}catch(n){}}3===Number(t)&&(sessionStorage.setItem("keyCode",l.key),window.open("#/home/key-log"))})(0,l,t),children:[Object(h.jsxDEV)(D.a,{disabled:1!==t.status,children:"\u6807\u8bb0\u6210\u5df2\u4f7f\u7528"},"1",!1,{fileName:$s,lineNumber:748,columnNumber:29},void 0),Object(h.jsxDEV)(D.a,{disabled:4===t.status||3===t.status,children:"\u4f5c\u5e9f"},"2",!1,{fileName:$s,lineNumber:751,columnNumber:29},void 0),Object(h.jsxDEV)(D.a,{children:"\u65e5\u5fd7"},"3",!1,{fileName:$s,lineNumber:757,columnNumber:29},void 0)]},void 0,!0,{fileName:$s,lineNumber:747,columnNumber:27},void 0)},void 0,!1,{fileName:$s,lineNumber:746,columnNumber:25},void 0)]},void 0,!0,{fileName:$s,lineNumber:740,columnNumber:23},void 0)]},void 0,!0,{fileName:$s,lineNumber:736,columnNumber:21},void 0):void 0},void 0,!1,{fileName:$s,lineNumber:693,columnNumber:13},void 0)},void 0,!1,{fileName:$s,lineNumber:692,columnNumber:11},void 0)]},void 0,!0,{fileName:$s,lineNumber:672,columnNumber:9},void 0)]},void 0,!0,{fileName:$s,lineNumber:635,columnNumber:7},void 0),Object(h.jsxDEV)(Ws,{title:i.dialogTitle,visible:i.bachVisible,url:i.bachUrl,onClose:()=>{s({bachVisible:!1})},onImport:t=>(t=>{1!==i.bachApiType?2!==i.bachApiType?3!==i.bachApiType||Object(a.j)({hash:t}).then((l=>{Object(a.Tb)(l,((a,l)=>{c.a.success("\u6279\u91cf\u4e0a\u4f20\u6807\u8bb0\u4e3a\u4f7f\u7528"),e.current.clearData(),s({page:1,limit:10,hash:t,isQuery:!i.isQuery})}),(e=>{c.a.error(e)}))})):Ut({hash:t},1).then((e=>{2===e?d(t):1===e&&G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:"\u786e\u5b9a\u8981\u6279\u91cf\u4f5c\u5e9f\uff1f"},void 0,!1,{fileName:$s,lineNumber:596,columnNumber:22},void 0),onConfirm(){d(t)},onCancel(){},className:"questModal",parentComponent:void 0})})):s({page:1,hash:t,isQuery:!i.isQuery})})(t)},void 0,!1,{fileName:$s,lineNumber:771,columnNumber:7},void 0)]},void 0,!0,{fileName:$s,lineNumber:634,columnNumber:5},void 0)},Zs=(i(259),"/Users/zhangds/web/blue-brother/frontend/src/pages/plan/list/list.js"),Xs=i(155);const el=[{title:"\u8ba1\u5212 ID",name:"id",prop:"id",type:"normal",width:"auto"},{title:"\u8ba1\u5212\u7f16\u53f7",name:"stock_id",prop:"stock_id",type:"normal",width:"auto"},{title:"\u8425\u9500\u8ba1\u5212\u540d\u79f0",name:"title",prop:"title",type:"slot",width:"auto"},{title:"\u542f\u7528",width:"auto",type:"slot",prop:"switch"},{title:"\u5206\u9500\u5546",prop:"reseller_name",name:"reseller_name",width:"auto",type:"normal"},{title:"\u72b6\u6001",name:"status",prop:"status",type:"slot",width:"auto"},{title:"\u521b\u5efa\u4eba",name:"creator_name",prop:"creator_name",type:"normal",width:"auto"},{title:"\u65f6\u95f4\u8303\u56f4",type:"slot",prop:"dates",width:"260px"},{title:"\u64cd\u4f5c",prop:"opearo",name:"opearo",type:"slot",width:"270px"},{title:"\u53d1\u653ekey\u7801\u603b\u6570",name:"grant",type:"normal",prop:"grant",width:"auto"},{title:"\u8c03\u7528key\u7801\u6570\u91cf",name:"api_send",type:"normal",prop:"api_send",width:"auto"},{title:"\u9886\u53d6key\u603b\u6570",name:"receive",type:"normal",prop:"receive",width:"auto"},{title:"\u4f7f\u7528key\u7801\u603b\u6570",name:"usage",type:"normal",prop:"usage",width:"auto"},{title:"\u5931\u6548key\u7801\u603b\u6570",name:"overdue",type:"normal",prop:"overdue",width:"auto"},{title:"\u4f5c\u5e9fkey\u7801\u603b\u6570",name:"invalid",type:"normal",prop:"invalid",width:"auto"},{title:"\u53ef\u7528key\u7801\u603b\u6570",name:"silent",type:"normal",prop:"silent",width:"auto"},{title:"\u5b8c\u7ed3key\u7801\u603b\u6570",name:"end",type:"normal",prop:"end",width:"auto"},{title:"\u66f4\u65b0\u65f6\u95f4",name:"update_time",type:"normal",prop:"update_time",width:"140px"}],tl=[{key:"id",text:"\u8ba1\u5212ID",placeholder:"\u8bf7\u8f93\u5165\u8ba1\u5212ID\u67e5\u8be2"},{key:"title",text:"\u8ba1\u5212\u540d\u79f0",placeholder:"\u8bf7\u8f93\u5165\u8ba1\u5212\u540d\u79f0\u67e5\u8be2"},{key:"reseller_name",text:"\u5206\u9500\u5546\u540d\u79f0",placeholder:"\u8bf7\u8f93\u5165\u5206\u9500\u5546\u540d\u79f0\u67e5\u8be2"}];class il extends m.a.Component{constructor(e){super(e),this.phoneChange=e=>{this.setState({phone:e.target.value})},this.emailChange=e=>{this.setState({email:e.target.value})},this.state={dataCount:0,page:1,limit:10,tabList:[{title:"\u8425\u9500\u8ba1\u5212\u5217\u8868"}],distdata:[],filterList:[{id:0,label:"\u72b6\u6001",prop:"status",menuList:[{id:999,name:"\u5168\u90e8"},{id:"0",name:"\u521b\u5efa\u4e2d"},{id:2,name:"\u5ba1\u6838\u4e2d"},{id:3,name:"\u5f85\u751f\u6548"},{id:4,name:"\u8fdb\u884c\u4e2d"},{id:5,name:"\u6682\u505c\u4e2d"},{id:6,name:"\u5df2\u5b8c\u7ed3"},{id:7,name:"\u672a\u901a\u8fc7"},{id:8,name:"\u5df2\u4f5c\u5e9f"}]}],tableHeight:500,menuList:[{id:0,name:"\u72b6\u6001",check:!1}],phone_list:[],email_list:[],phone:"",email:"",email_radio:-1,phone_radio:-1,key_word:"",searchOption:void 0,placeholder:"",audit_visible:!1,cur_item:null,selectiondata:[],plan_id:0,grantTotal:0,receiveTotal:0,usageTotal:0,silentTotal:0,receive_total:0,usage_total:0,silent_total:0,isSend:!0,isCancel:!1,mer_no:""}}clickFn(){let e=window.location.href.replace(window.location.hash,"#/home/plan-create");sessionStorage.setItem("KeyPcType","3"),window.open(e,"_blank")}onPageChange(e){this.setState({page:e}),setTimeout((()=>{this.getpageFn()}),0)}send(e){let t=new RegExp("^[1][3,4,5,6,7,8,9][0-9]{9}$"),i=this.state.plan_id,s={phone:this.state.phone_radio>-1?this.state.phone_list[this.state.phone_radio]:this.state.phone,email:this.state.email_radio>-1?this.state.email_list[this.state.email_radio]:this.state.email};t.test(s.phone)?Object(a.dc)(i,s).then((e=>{Object(a.Tb)(e,((e,t)=>{this.setState({audit_visible:!1}),c.a.success("\u53d1\u9001\u6210\u529f")}),(e=>{c.a.error(e)}))})):c.a.error("\u624b\u673a\u53f7\u683c\u5f0f\u4e0d\u6b63\u786e")}componentDidMount(e){this.getPlanList({page:1,limit:10})}componentWillMount(){this.setState({tableHeight:window.innerHeight-430})}getPlanList(e){Object(a.sb)(Object(Ka.a)(e)).then((e=>{Object(a.Tb)(e,((e,t)=>{this.setState({distdata:e.data,dataCount:e.total})}),(e=>{}))}))}onCountChange(e){this.setState({page:1,limit:e}),setTimeout((()=>{this.getpageFn()}),200)}getpageFn(){let e={page:this.state.page,limit:this.state.limit,status:this.state.status};this.state.searchOption&&(e[this.state.searchOption.key]=this.state.key_word),this.getPlanList(e)}onSwitchChange(e,t){G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:["\u662f\u5426\u6539\u53d8",1==t.open?"\u5173\u95ed":"\u5f00\u542f",Object(h.jsxDEV)("b",{children:["[",t.title,"]"]},void 0,!0,{fileName:Zs,lineNumber:347,columnNumber:11},this),"\u7684\u72b6\u6001\uff1f"]},void 0,!0,{fileName:Zs,lineNumber:345,columnNumber:9},this),onConfirm:()=>{this.changeState(e,t)},onCancel:this.onCancel,className:"questModal",parentComponent:this})}cancel(e){this.setState({audit_visible:!1})}changeState(e,t){let i=this,s={operation:e?1:2};if(3==t.status)return c.a.warn("\u5f85\u751f\u6548\u72b6\u6001\u8ba1\u5212\u65e0\u6cd5\u542f\u7528\uff01");Object(a.ad)(t.id,s).then((s=>{Object(a.Tb)(s,((a,s)=>{let l=Object(oi.a)(this.state.distdata,(e=>e.id==t.id));this.state.distdata[l].open=e?2:1,this.setState({distdata:this.state.distdata});let n={page:this.state.page,limit:this.state.limit,status:this.state.status};this.state.searchOption&&(n[this.state.searchOption.key]=this.state.key_word),i.getPlanList(n),c.a.success("\u66f4\u6539\u72b6\u6001\u6210\u529f")}),(e=>{c.a.error(e)}))}))}linkTo(e){sessionStorage.setItem("showflag",!0);let t=[{pagetitle:"\u7f16\u8f91",items:[{path:"/home/key-list",name:"\u8425\u9500\u8ba1\u5212\u7ba1\u7406"},{path:"/home/key-list",name:e.title+"key\u5217\u8868"}]}];sessionStorage.setItem("plan_item",JSON.stringify(e)),sessionStorage.setItem("knockGold_effectDate",JSON.stringify(e)),sessionStorage.setItem("redPackets_effectDate",JSON.stringify(e)),sessionStorage.setItem("breaknav",JSON.stringify(t)),sessionStorage.setItem("linkshowname","\u8425\u9500\u8ba1\u5212\u7ba1\u7406"),sessionStorage.setItem("key_plan_id",e.id),sessionStorage.setItem("key_plan_status",e.status),e.settlement_type>0?(sessionStorage.setItem("isSettlement",1),sessionStorage.setItem("plan_list_settlement",JSON.stringify({key:e.settlement_type}))):(sessionStorage.removeItem("isSettlement"),sessionStorage.removeItem("plan_list_settlement")),window.open("#/home/key-list")}async menuItemClick(e,t){if(this.setState({plan_id:t.id}),6==t.status)return c.a.clear(),void c.a.error("\u8be5\u72b6\u6001\u4e0b\u7684\u6570\u636e\u4e0d\u5141\u8bb8\u7f16\u8f91");if(1==e&&Object(a.vb)(t.reseller_id).then((e=>{Object(a.Tb)(e,((e,t)=>{this.setState({audit_visible:!0,phone_list:e.contact_phone,email_list:e.contact_email})}),(e=>{c.a.error(e)}))})),3==e){let e=this;G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:["\u662f\u5426\u786e\u5b9a\u4f5c\u5e9f[",t.title,"]\uff1f"]},void 0,!0,{fileName:Zs,lineNumber:517,columnNumber:18},this),onConfirm:()=>{e.setState({isCancel:!0}),Object(a.cc)(t.id).then((t=>{e.setState({isCancel:!1}),Object(a.Tb)(t,((t,i)=>{c.a.success("\u4f5c\u5e9f\u6210\u529f"),e.setState({page:1,limit:10});e.getPlanList({page:1,limit:10})}),(e=>{c.a.error(e)}))}))},onCancel:this.onCancel,className:"questModal",parentComponent:this})}if(4==e){let e=this;G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:["\u662f\u5426\u786e\u5b9a\u5220\u9664[",t.title,"]\uff1f"]},void 0,!0,{fileName:Zs,lineNumber:551,columnNumber:18},this),onConfirm:()=>{Object(a.A)(t.id).then((t=>{Object(a.Tb)(t,((t,i)=>{c.a.success(i),e.setState({limit:10,page:1});let a={page:1,limit:10,status:this.state.status};this.state.searchOption&&(a[this.state.searchOption.key]=this.state.key_word),e.getPlanList(a)}),(e=>{c.a.error(e)}))}))},onCancel:this.onCancel,className:"questModal",parentComponent:this})}if(6==e&&this.callBack(t),7==e){let e=await Object(a.Kb)({plan_id:t.id});if(200===e.code){let i=this;i.setState({mer_no:e.data.mer_no}),G.a.confirm({type:"info",closeBtn:!0,title:"\u90ae\u50a8\u5546\u6237\u7f16\u53f7",content:Object(h.jsxDEV)(Di.a,{placeholder:"\u8bf7\u8f93\u90ae\u50a8\u5546\u6237\u7f16\u53f7",maxLength:200,onChange:e=>i.setState({mer_no:e.target.value}),defaultValue:i.state.mer_no},void 0,!1,{fileName:Zs,lineNumber:594,columnNumber:13},this),onConfirm:e=>{if(""===i.state.mer_no)return c.a.error("\u8bf7\u8f93\u5165\u90ae\u50a8\u5546\u6237\u7f16\u53f7"),!1;Object(a.l)({plan_id:t.id,mer_no:i.state.mer_no}).then((t=>{if(200!==t.code)return c.a.error(t.message),!1;{c.a.success("\u7ed1\u5b9a\u6210\u529f"),i.setState({page:1,limit:10});let t={page:1,limit:10};i.getPlanList(t),e()}}))},onCancel:this.onCancel,className:"questModal",parentComponent:this})}}}clearFn(){this.refs.plan_list.allChecked(!1),this.setState({selectiondata:[]})}callBack(e){sessionStorage.setItem("callBackId",JSON.stringify(e.id)),sessionStorage.setItem("callBackType",JSON.stringify(2)),sessionStorage.setItem("pathname2","callback-message");let t=[{pagetitle:"\u56de\u8c03\u5730\u5740",items:[{path:"distributor-list",name:"\u8425\u9500\u8ba1\u5212\u4e00"+e.title},{path:"callback-message",name:"\u8bbe\u7f6e\u56de\u8c03\u901a\u77e5\u5730\u5740"}]}];sessionStorage.setItem("breaknav",JSON.stringify(t)),sessionStorage.setItem("linkshowname","\u8425\u9500\u8ba1\u5212"),this.props.history.push("/home/callback-message")}selection(e){this.setState({selectiondata:e});let t=0,i=0,a=0,s=0,l=0,n=0,o=0;e.forEach((e=>{t+=Number(e.grant),i+=Number(e.receive),a+=Number(e.usage),s+=Number(e.silent),l+=Number(e.receive_total),n+=Number(e.usage_total),o+=Number(e.silent_total)})),this.setState({grantTotal:t,receiveTotal:i,usageTotal:a,silentTotal:s,receive_total:l,usage_total:n,silent_total:o})}onFilter(e,t){this.setState({limit:10,page:1});let i={page:1,limit:10};if(this.state.searchOption&&(i[this.state.searchOption.key]=this.state.key_word),i[t]=e,999==e)delete i[t];else{let i={};i[t]=e,this.setState(i)}this.getPlanList(i)}componentDidUpdate(e,t){t.key_word==this.state.key_word||this.state.key_word||this.iptSureFn(),t.searchOption==this.state.searchOption||this.state.searchOption||(this.iptSureFn(),this.setState({key_word:""}))}iptSureFn(e){this.setState({page:1,limit:10});let t={page:1,limit:10,status:this.state.status};this.state.searchOption&&(t[this.state.searchOption.key]=this.state.key_word),this.getPlanList(t)}onPhoneChange(e){this.setState({phone_radio:e.target.value})}onEmailChange(e){this.setState({email_radio:e.target.value})}onEdit(e,t){sessionStorage.setItem("showflag",!0);let i=[{pagetitle:"\u7f16\u8f91",items:[{path:"/home/key-list",name:"\u8425\u9500\u8ba1\u5212\u7ba1\u7406"},{path:"/home/key-list",name:"\u7f16\u8f91:"+t.title}]}];if(sessionStorage.setItem("breakchangenav",JSON.stringify(i)),6==t.status)return c.a.clear(),void c.a.error("\u4e0d\u53ef\u7f16\u8f91");let a={settlement_type:t.settlement_type,settlement_type_text:t.settlement_type_text};sessionStorage.setItem("bm_obj",JSON.stringify(a)),sessionStorage.setItem("plan_id",t.id),sessionStorage.setItem("plan_status",t.status),sessionStorage.setItem("approval_id",t.approval_id);let s=window.location.href.replace(window.location.hash,"#/home/plan-edit");sessionStorage.setItem("KeyPcType","1"),window.open(s,"_blank")}onCopy(e,t){sessionStorage.setItem("showflag",!0);let i=[{pagetitle:"\u590d\u5236",items:[{path:"/home/key-list",name:"\u8425\u9500\u8ba1\u5212\u7ba1\u7406"},{path:"/home/key-list",name:"\u590d\u5236:"+t.title}]}],a={settlement_type:t.settlement_type,settlement_type_text:t.settlement_type_text};sessionStorage.setItem("bm_obj",JSON.stringify(a)),sessionStorage.setItem("breakchangenav",JSON.stringify(i)),sessionStorage.setItem("plan_id_copy",t.id),sessionStorage.setItem("plan_status",t.status),sessionStorage.setItem("approval_id",t.approval_id),sessionStorage.setItem("copy_count_golod",t.copy_count);let s=window.location.href.replace(window.location.hash,"#/home/plan-edit-copy");sessionStorage.setItem("KeyPcType","2"),window.open(s,"_blank")}onFilterClose(e){let t={};t[e]=null,this.setState(t),this.setState({page:1,limit:10});let i={page:1,limit:10};this.state.searchOption&&(i[this.state.searchOption.key]=this.state.key_word),this.getPlanList(i)}currPreview(e){return[0,1,2,6,7,8].includes(e.status)?Object(h.jsxDEV)("span",{style:{color:"#ccc"},children:"\u9884\u89c8"},void 0,!1,{fileName:Zs,lineNumber:828,columnNumber:14},this):Object(h.jsxDEV)(Ei.a,{trigger:"hover",content:Object(h.jsxDEV)(Xs,{value:e.href},void 0,!1,{fileName:Zs,lineNumber:831,columnNumber:39},this),children:[" ",Object(h.jsxDEV)("span",{style:{color:"#2B66F2"},onClick:t=>this.currPreviewBtn(e.href),children:"\u9884\u89c8"},void 0,!1,{fileName:Zs,lineNumber:833,columnNumber:11},this)," "]},void 0,!0,{fileName:Zs,lineNumber:831,columnNumber:9},this)}currPreviewBtn(e){window.open(e,"_blank")}opearoEl(e,t){switch(e){case 1:return[0,2,3,4,5,7].includes(t.status)?Object(h.jsxDEV)("span",{className:"grid-link",onClick:e=>{this.onEdit(e,t)},children:"\u7f16\u8f91"},void 0,!1,{fileName:Zs,lineNumber:858,columnNumber:13},this):Object(h.jsxDEV)("span",{className:"grid-link disabled",children:"\u7f16\u8f91"},void 0,!1,{fileName:Zs,lineNumber:868,columnNumber:18},this);case 2:return[3,4,5,6,8].includes(t.status)?Object(h.jsxDEV)("span",{className:"grid-link",onClick:e=>{this.onCopy(e,t)},children:"\u590d\u5236"},void 0,!1,{fileName:Zs,lineNumber:873,columnNumber:13},this):Object(h.jsxDEV)("span",{className:"grid-link disabled",children:"\u590d\u5236"},void 0,!1,{fileName:Zs,lineNumber:883,columnNumber:18},this);case 3:return[3,4,5].includes(t.status)&&1!==t.old_status?Object(h.jsxDEV)(y.a,{position:y.d.RightTop,visible:this.state.menuVisible,onVisibleChange:e=>this.setState({visible:e}),children:[Object(h.jsxDEV)(y.b,{children:Object(h.jsxDEV)("div",{className:"linkmore grid-link",children:["\u66f4\u591a ",Object(h.jsxDEV)(g.a,{type:"down"},void 0,!1,{fileName:Zs,lineNumber:895,columnNumber:22},this)]},void 0,!0,{fileName:Zs,lineNumber:894,columnNumber:17},this)},void 0,!1,{fileName:Zs,lineNumber:893,columnNumber:15},this),Object(h.jsxDEV)(y.c,{children:Object(h.jsxDEV)(O.a,{onClick:(e,i)=>this.menuItemClick(i,t),children:[Object(h.jsxDEV)(D.a,{children:"\u53d1\u9001\u5bc6\u7801\u53ca\u538b\u7f29\u5305"},"1",!1,{fileName:Zs,lineNumber:900,columnNumber:19},this),Object(h.jsxDEV)(D.a,{children:"\u8bbe\u7f6e\u56de\u8c03"},"6",!1,{fileName:Zs,lineNumber:901,columnNumber:19},this),Object(h.jsxDEV)(D.a,{disabled:!0,children:"\u65e5\u5fd7"},"2",!1,{fileName:Zs,lineNumber:902,columnNumber:19},this),Object(h.jsxDEV)(D.a,{children:"\u4f5c\u5e9f"},"3",!1,{fileName:Zs,lineNumber:905,columnNumber:19},this),Object(h.jsxDEV)(D.a,{children:"\u7ed1\u5b9a\u90ae\u50a8\u5546\u6237\u7f16\u53f7"},"7",!1,{fileName:Zs,lineNumber:906,columnNumber:19},this)]},void 0,!0,{fileName:Zs,lineNumber:899,columnNumber:17},this)},void 0,!1,{fileName:Zs,lineNumber:898,columnNumber:15},this)]},void 0,!0,{fileName:Zs,lineNumber:888,columnNumber:13},this):Object(h.jsxDEV)("span",{className:"grid-link disabled",children:"\u66f4\u591a"},void 0,!1,{fileName:Zs,lineNumber:912,columnNumber:18},this);case 4:return 0===t.order_num?Object(h.jsxDEV)("span",{className:"grid-link",style:{color:"red",paddingRight:0},onClick:()=>this.menuItemClick(4,t),children:"\u5220\u9664"},void 0,!1,{fileName:Zs,lineNumber:917,columnNumber:13},this):Object(h.jsxDEV)("span",{className:"grid-link disabled",style:{paddingRight:0},children:"\u5220\u9664"},void 0,!1,{fileName:Zs,lineNumber:930,columnNumber:13},this);default:return""}}dingTask(e){Object(a.G)(e).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.success(t),this.getpageFn()}),(e=>{c.a.error(e)}))}))}render(){return Object(h.jsxDEV)("div",{id:"dislist",children:Object(h.jsxDEV)(Ft,{tabs:this.state.tabList,children:[Object(h.jsxDEV)("div",{className:"distable dflexj",children:[Object(h.jsxDEV)(u.a,{type:"primary",icon:"plus",onClick:this.clickFn.bind(this),children:"\u65b0\u5efa\u8425\u9500\u8ba1\u5212"},void 0,!1,{fileName:Zs,lineNumber:966,columnNumber:13},this),Object(h.jsxDEV)("div",{className:"dfleac query-plan",children:[Object(h.jsxDEV)(X.a,{width:"180px",value:this.state.searchOption,onChange:e=>this.setState({searchOption:e,key_word:"",placeholder:e&&e.placeholder}),disableSearch:!0,options:tl,clearable:!0,placeholder:"\u8bf7\u9009\u62e9\u67e5\u8be2\u5206\u7c7b"},void 0,!1,{fileName:Zs,lineNumber:970,columnNumber:15},this),this.state.searchOption?Object(h.jsxDEV)(n.a,{labelWidth:0,onClearItem:e=>{this.setState({key_word:""})},wordSearch:this.iptSureFn.bind(this),onChange:e=>this.setState({key_word:e}),value:this.state.key_word,icon:"search",placeholder:this.state.placeholder,countShow:!1,height:"36px",width:"260px",alignment:"left"},void 0,!1,{fileName:Zs,lineNumber:986,columnNumber:17},this):null]},void 0,!0,{fileName:Zs,lineNumber:969,columnNumber:13},this)]},void 0,!0,{fileName:Zs,lineNumber:965,columnNumber:11},this),Object(h.jsxDEV)(hi,{filterList:this.state.filterList,menuList:this.state.menuList,selectFn:(e,t)=>{this.onFilter(e,t)},onClose:e=>{this.onFilterClose(e)}},void 0,!1,{fileName:Zs,lineNumber:1004,columnNumber:11},this),Object(h.jsxDEV)("div",{children:[this.state.selectiondata.length>0?Object(h.jsxDEV)(ki.a,{type:"info",extraContent:Object(h.jsxDEV)(u.a,{type:"primary",onClick:this.clearFn.bind(this),children:"\u6e05\u7a7a"},void 0,!1,{fileName:Zs,lineNumber:1019,columnNumber:19},this),children:["\u5df2\u9009\u62e9",Object(h.jsxDEV)("font",{color:"#296bef",style:{fontWeight:"bold"},children:this.state.selectiondata.length},void 0,!1,{fileName:Zs,lineNumber:1025,columnNumber:17},this),"\u53d1\u653ekey\u603b\u6570:",this.state.grantTotal,",\u9886\u53d6key\u603b\u6570:",this.state.receiveTotal,",\u5df2\u4f7f\u7528\u603b\u6570:",this.state.usageTotal,",\u6c89\u9ed8\u603b\u6570:",this.state.silentTotal,",\u9886\u53d6\u603b\u4ef7(\u9884\u4f30):",this.state.receive_total.toFixed(4),", \u5df2\u4f7f\u7528\u603b\u4ef7(\u9884\u4f30):",this.state.usage_total.toFixed(4),", \u6c89\u9ed8\u603b\u4ef7(\u9884\u4f30):",this.state.silent_total.toFixed(4)]},void 0,!0,{fileName:Zs,lineNumber:1016,columnNumber:15},this):null,Object(h.jsxDEV)(I,{spliteColor:"#fff",tableData:this.state.distdata,Column:el,countbarVisible:!1,maxheight:this.state.tableHeight,isSwitch:!1,page:this.state.page,ref:"plan_list",dataCount:this.state.dataCount,pageChange:e=>{this.onPageChange(e)},countChange:e=>{this.onCountChange(e)},checkChange:this.selection.bind(this),ComponentHandler:(e,t)=>"dates"==e?Object(h.jsxDEV)("span",{children:[t.begin_time," \u81f3 ",t.end_time]},void 0,!0,{fileName:Zs,lineNumber:1056,columnNumber:21},this):"title"==e?Object(h.jsxDEV)("span",{className:"grid-link",onClick:e=>{this.linkTo(t)},children:t.title},void 0,!1,{fileName:Zs,lineNumber:1064,columnNumber:21},this):"switch"==e?Object(h.jsxDEV)(v.a,{size:"small",checked:1==t.open,disabled:!t.is_open,onChange:e=>{this.onSwitchChange(e,t)}},void 0,!1,{fileName:Zs,lineNumber:1076,columnNumber:21},this):"status"==e?Object(h.jsxDEV)("p",{className:"dflexa",children:Object(h.jsxDEV)("span",{children:[Object(h.jsxDEV)("font",{className:"icon",style:{background:At.planStatusBg(parseInt(t.status))}},void 0,!1,{fileName:Zs,lineNumber:1090,columnNumber:25},this),t.status_text]},void 0,!0,{fileName:Zs,lineNumber:1089,columnNumber:23},this)},void 0,!1,{fileName:Zs,lineNumber:1088,columnNumber:21},this):"opearo"==e?Object(h.jsxDEV)("div",{children:[this.opearoEl(1,t),this.opearoEl(2,t),Object(h.jsxDEV)("span",{className:"grid-link",children:this.currPreview(t)},void 0,!1,{fileName:Zs,lineNumber:1106,columnNumber:23},this),t.approval_id&&2===t.status?Object(h.jsxDEV)("span",{className:"grid-link",onClick:e=>{this.dingTask(t.approval_id)},children:"\u9489\u9489\u5ba1\u6279\u67e5\u8be2"},void 0,!1,{fileName:Zs,lineNumber:1108,columnNumber:25},this):Object(h.jsxDEV)("span",{className:"grid-link disabled",children:"\u9489\u9489\u5ba1\u6279\u67e5\u8be2"},void 0,!1,{fileName:Zs,lineNumber:1117,columnNumber:25},this),this.opearoEl(3,t),this.opearoEl(4,t)]},void 0,!0,{fileName:Zs,lineNumber:1103,columnNumber:21},this):void 0},void 0,!1,{fileName:Zs,lineNumber:1036,columnNumber:13},this),this.state.audit_visible?Object(h.jsxDEV)("div",{children:[Object(h.jsxDEV)("div",{className:"modal",children:" "},void 0,!1,{fileName:Zs,lineNumber:1129,columnNumber:17},this),Object(h.jsxDEV)("div",{className:"audit-box",children:[Object(h.jsxDEV)(g.a,{type:"close",className:"audit-close",onClick:e=>{this.cancel(e)}},void 0,!1,{fileName:Zs,lineNumber:1131,columnNumber:19},this),Object(h.jsxDEV)("div",{className:"audit-box-title",children:"\u53d1\u9001"},void 0,!1,{fileName:Zs,lineNumber:1138,columnNumber:19},this),Object(h.jsxDEV)("div",{className:"audit-box-question",children:"\u662f\u5426\u7acb\u5373\u53d1\u9001key\u4ee5\u53ca\u89e3\u538b\u5bc6\u7801?"},void 0,!1,{fileName:Zs,lineNumber:1139,columnNumber:19},this),Object(h.jsxDEV)("div",{className:"phone-group",children:[Object(h.jsxDEV)("div",{children:"\u63a5\u6536\u624b\u673a\u53f7"},void 0,!1,{fileName:Zs,lineNumber:1141,columnNumber:21},this),Object(h.jsxDEV)("div",{className:"phone-list",children:Object(h.jsxDEV)(Q.a,{value:this.state.phone_radio,isValueEqual:this.isValueEqual,onChange:e=>{this.onPhoneChange(e)},children:this.state.phone_list.map(((e,t)=>Object(h.jsxDEV)(Z.a,{value:t,onClick:()=>{e==this.state.phone_list[this.state.phone_radio]&&this.setState({phone_radio:-1})},children:e},void 0,!1,{fileName:Zs,lineNumber:1152,columnNumber:29},this)))},void 0,!1,{fileName:Zs,lineNumber:1143,columnNumber:23},this)},void 0,!1,{fileName:Zs,lineNumber:1142,columnNumber:21},this)]},void 0,!0,{fileName:Zs,lineNumber:1140,columnNumber:19},this),Object(h.jsxDEV)("div",{className:"email-group",children:[Object(h.jsxDEV)("div",{children:"\u63a5\u6536\u90ae\u7bb1"},void 0,!1,{fileName:Zs,lineNumber:1168,columnNumber:21},this),Object(h.jsxDEV)("div",{className:"email-list",children:Object(h.jsxDEV)(Q.a,{value:this.state.email_radio,isValueEqual:this.isValueEqual,onChange:e=>{this.onEmailChange(e)},children:this.state.email_list.map(((e,t)=>Object(h.jsxDEV)(Z.a,{value:t,onClick:()=>{e==this.state.email_list[this.state.email_radio]&&this.setState({email_radio:-1})},children:e},void 0,!1,{fileName:Zs,lineNumber:1179,columnNumber:29},this)))},void 0,!1,{fileName:Zs,lineNumber:1170,columnNumber:23},this)},void 0,!1,{fileName:Zs,lineNumber:1169,columnNumber:21},this)]},void 0,!0,{fileName:Zs,lineNumber:1167,columnNumber:19},this),Object(h.jsxDEV)("div",{className:"input-group",children:Object(h.jsxDEV)(Di.a,{placeholder:"\u8bf7\u8f93\u5165\u63a5\u6536\u624b\u673a\u53f7",onChange:this.phoneChange,disabled:this.state.phone_radio>-1},void 0,!1,{fileName:Zs,lineNumber:1195,columnNumber:21},this)},void 0,!1,{fileName:Zs,lineNumber:1194,columnNumber:19},this),Object(h.jsxDEV)("div",{className:"input-group",children:Object(h.jsxDEV)(Di.a,{placeholder:"\u8bf7\u8f93\u5165\u63a5\u6536\u90ae\u7bb1",onChange:this.emailChange,disabled:this.state.email_radio>-1},void 0,!1,{fileName:Zs,lineNumber:1202,columnNumber:21},this)},void 0,!1,{fileName:Zs,lineNumber:1201,columnNumber:19},this),Object(h.jsxDEV)("div",{className:"audit-btn-group",children:[Object(h.jsxDEV)(u.a,{onClick:e=>{this.cancel(e)},children:"\u53d6\u6d88"},void 0,!1,{fileName:Zs,lineNumber:1210,columnNumber:21},this),Object(h.jsxDEV)(u.a,{type:"primary",onClick:e=>{this.send(e)},children:"\u53d1\u9001"},void 0,!1,{fileName:Zs,lineNumber:1217,columnNumber:21},this)]},void 0,!0,{fileName:Zs,lineNumber:1209,columnNumber:19},this)]},void 0,!0,{fileName:Zs,lineNumber:1130,columnNumber:17},this)]},void 0,!0,{fileName:Zs,lineNumber:1128,columnNumber:15},this):null]},void 0,!0,{fileName:Zs,lineNumber:1014,columnNumber:11},this)]},void 0,!0,{fileName:Zs,lineNumber:964,columnNumber:9},this)},void 0,!1,{fileName:Zs,lineNumber:963,columnNumber:7},this)}}class al extends m.a.Component{constructor(e){super(e),this.state={}}render(){return Object(h.jsxDEV)("div",{id:"plan",children:"\u8425\u9500\u8ba1\u5212\u9875\u9762"},void 0,!1,{fileName:"/Users/zhangds/web/blue-brother/frontend/src/pages/plan/main/main.js",lineNumber:9,columnNumber:12},this)}}i(260);var sl="/Users/zhangds/web/blue-brother/frontend/src/pages/plan/qrcode/qrcode.js";class ll extends m.a.Component{constructor(e){super(e),this.state={roleList:[],tabList:[{title:"\u4e8c\u7ef4\u7801\u5c0f\u5de5\u5177"}],tableHeight:600,page:1,limit:10,total:0}}render(){return Object(h.jsxDEV)("div",{id:"rolelist",className:"qrcode-tool",children:Object(h.jsxDEV)(Ft,{tabs:this.state.tabList,children:Object(h.jsxDEV)("div",{className:"table-container",children:Object(h.jsxDEV)("iframe",{frameBorder:"0",src:"https://ewm.83323.cn/qrcode/index/html",width:"100%",height:"1200px"},void 0,!1,{fileName:sl,lineNumber:21,columnNumber:13},this)},void 0,!1,{fileName:sl,lineNumber:20,columnNumber:11},this)},void 0,!1,{fileName:sl,lineNumber:19,columnNumber:9},this)},void 0,!1,{fileName:sl,lineNumber:18,columnNumber:7},this)}}i(261);var nl="/Users/zhangds/web/blue-brother/frontend/src/pages/system/account/add/adduserinfo/adduserinfo.js";class ol extends m.a.Component{constructor(e){super(e),this.onUploadError=(e,t)=>{"overMaxAmount"===e?(c.a.clear(),c.a.error(`\u6700\u591a\u53ef\u4e0a\u4f20 ${t.maxAmount} \u5f20\u56fe\u7247`)):"overMaxSize"===e&&(c.a.clear(),c.a.error(`\u56fe\u7247\u5927\u5c0f\u4e0d\u80fd\u8d85\u8fc7 ${t.formattedMaxSize}b`))},this.state={model:{user_name:"",mobile:"",password:"",real_name:"",company:"",deparment:"",post:"",station:""},companyList:[],departmentList:[],departmentJob:[],roleList:[],headImg:"",pwdtype:"text",defaultFileList:[{src:""}],disabled:!1,id:""}}componentDidMount(e){}componentWillMount(){let e=this;this.getCompanyFn();let t=JSON.parse(sessionStorage.getItem("company"));t||this.getCompanyFn(),this.getRoleFn();let i=this.props;if(i&&1==i.enumer){var s,l,n,o,r,m;this.setState({pwdtype:"password"});let d=Object(de.a)(i.rowData),u={user_name:d.user_name,mobile:d.mobile,password:"yxtx2021",real_name:d.real_name,company:t.find((e=>e.key==d.company_id)),deparment:{key:null===(s=d.department)||void 0===s?void 0:s.id,text:null===(l=d.department)||void 0===l?void 0:l.department_name},post:{key:null===(n=d.job)||void 0===n?void 0:n.id,text:null===(o=d.job)||void 0===o?void 0:o.job_name},station:{key:null===(r=d.role)||void 0===r?void 0:r.id,text:null===(m=d.role)||void 0===m?void 0:m.role_name}},h={};h.src=d.head,this.setState({model:u,disabled:!0,defaultFileList:[h],id:d.id,headImg:d.head}),u.company&&u.company.key&&Object(a.Y)({company_id:u.company.key}).then((t=>{Object(a.Tb)(t,((t,i)=>{let a=t.map((e=>({key:e.id,text:e.department_name})));e.setState({departmentList:a})}),(e=>{c.a.error(e)}))})).catch((e=>{})),u.deparment.key&&Object(a.Z)({department_id:u.deparment.key}).then((t=>{Object(a.Tb)(t,((t,i)=>{let a=t.map((e=>({key:e.id,text:e.job_name})));e.setState({departmentJob:a})}),(e=>{c.a.error(e)}))})).catch((e=>{}))}}submit(){let e=this.refs.form1.validator(),t=this.state.model,i=this;e?G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:0==i.props.enumer?Object(h.jsxDEV)("p",{children:["\u662f\u5426\u65b0\u589e",Object(h.jsxDEV)("b",{children:["[",t.user_name,"]"]},void 0,!0,{fileName:nl,lineNumber:139,columnNumber:19},this),"\u8d26\u53f7\uff1f"]},void 0,!0,{fileName:nl,lineNumber:138,columnNumber:13},this):Object(h.jsxDEV)("p",{children:["\u662f\u5426\u4fee\u6539",Object(h.jsxDEV)("b",{children:["[",i.props.rowData.user_name,"]"]},void 0,!0,{fileName:nl,lineNumber:143,columnNumber:19},this),"\u8d26\u53f7\u4fe1\u606f\uff1f"]},void 0,!0,{fileName:nl,lineNumber:142,columnNumber:13},this),onConfirm:()=>{let e={user_name:t.user_name,mobile:t.mobile,password:t.password,real_name:t.real_name,job_id:t.post.key,role_id:t.station.key};if(i.state.headImg&&(e.head=i.state.headImg),0==i.props.enumer)Object(a.ec)(e).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.clear(),c.a.success(t),setTimeout((()=>{window.location.replace("#/home/system/account-list"),sessionStorage.setItem("pathname2","/home/system/account-list")}),1e3)}),(e=>{c.a.error(e)}))})).catch((e=>{}));else{let t=i.state.id;delete e.password,e.head=i.state.headImg,Object(a.uc)(t,e).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.clear(),c.a.success(t),setTimeout((()=>{sessionStorage.setItem("pathname2","/home/system/account-list"),window.location.replace("#/home/system/account-list")}),1e3)}),(e=>{c.a.error(e)}))})).catch((e=>{}))}},onCancel:this.onCancel,className:"questModal",parentComponent:this}):(c.a.clear(),c.a.error("\u8bf7\u5b8c\u5584\u8868\u5355\u6570\u636e"))}onUploadChange(e){let t=this;if(e&&e.length>0){let i=new FormData;i.append("file",e[0].file),i.append("path","account_avatar"),Object(a.cd)(i).then((e=>{Object(a.Tb)(e,((e,i)=>{t.setState({headImg:e.path}),c.a.clear(),c.a.success(i)}),(e=>{c.a.error(e)}))})).catch((e=>{}))}else t.setState({headImg:""})}onCompanyChange(e){if(!e){let e=this.state.model;e.deparment="",e.post="",this.setState({model:e})}let t=this,i=this.state.model;if(i.company=e,this.setState({model:i}),e){let i=this.state.model;i.deparment="",i.post="",t.setState({departmentList:[]}),t.setState({departmentJob:[]}),t.setState({model:i}),Object(a.Y)({company_id:e.key}).then((e=>{Object(a.Tb)(e,((e,i)=>{let a=e.map((e=>({key:e.id,text:e.department_name})));t.setState({departmentList:a})}),(e=>{c.a.error(e)}))})).catch((e=>{}))}else t.setState({departmentList:[]}),t.setState({departmentJob:[]})}onDepartmentChange(e){if(!e){let e=this.state.model;e.post="",this.setState({model:e})}let t=this,i=this.state.model;i.deparment=e,this.setState({model:i}),t.setState({departmentJob:[]}),e?Object(a.Z)({department_id:e.key}).then((e=>{Object(a.Tb)(e,((e,i)=>{let a=e.map((e=>({key:e.id,text:e.job_name})));t.setState({departmentJob:a});let s=this.state.model;s.post="",t.setState({model:s})}),(e=>{c.a.error(e)}))})).catch((e=>{})):t.setState({departmentJob:[]})}onPostChange(e){let t=this.state.model;t.post=e,this.setState({model:t})}onStationChange(e){let t=this.state.model;t.station=e,this.setState({model:t})}getCompanyFn(){let e=this;Object(a.V)().then((t=>{Object(a.Tb)(t,((t,i)=>{let a=t.map((e=>({key:e.id,text:e.company_name})));sessionStorage.setItem("company",JSON.stringify(a)),e.setState({companyList:a})}),(e=>{c.a.error(e)}))})).catch((e=>{}))}changeType(e){this.setState({pwdtype:e})}getRoleFn(){let e=this;Object(a.xb)({page:1,limit:1e3}).then((t=>{Object(a.Tb)(t,((t,i)=>{let a=t.data.map((e=>({key:e.id,text:e.role_name})));e.setState({roleList:a})}),(e=>{c.a.error(e)}))})).catch((e=>{}))}changeKind(){this.setState({pwdtype:"password"})}cancel(){G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:"\u662f\u5426\u53d6\u6d88\u672c\u6b21\u64cd\u4f5c\uff1f"},void 0,!1,{fileName:nl,lineNumber:409,columnNumber:16},this),onConfirm:()=>{window.location.replace("#/home/system/account-list"),sessionStorage.setItem("pathname2","/home/system/account-list")},onCancel:this.onCancel,className:"questModal",parentComponent:this})}render(){return Object(h.jsxDEV)("div",{id:"addaccinfo",children:[Object(h.jsxDEV)(l.a,{model:this.state.model,rules:{account:[{type:"required",message:"\u8bf7\u8f93\u5165\u624b\u673a\u53f7"}],phone:[{type:"required",message:"\u8bf7\u8f93\u5165\u624b\u673a\u53f7"},{type:"regExp",message:"\u624b\u673a\u53f7\u683c\u5f0f\u4e0d\u6b63\u786e",reg:"^[1][3,4,5,6,7,8,9][0-9]{9}$"}],pwd:[{type:"required",message:"\u8bf7\u8f93\u5165\u5bc6\u7801"},{type:"regExp",message:"6-16\u4f4d\u5b57\u7b26,\u6570\u5b57+\u5b57\u6bcd\u7ec4\u6210(\u5b57\u6bcd\u533a\u5206\u5927\u5c0f\u5199)",reg:"^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,16}$"}],name:[{type:"required",message:"\u8bf7\u8f93\u5165\u771f\u5b9e\u59d3\u540d"},{type:"regExp",message:"2-16\u5b57\u6c49\u5b57/\u5b57\u6bcd\u7ec4\u6210",reg:"^([\u4e00-\u9fa5]|[a-zA-Z]){2,16}$"}],company:[{type:"required",message:"\u8bf7\u9009\u62e9\u516c\u53f8"}],deparment:[{type:"required",message:"\u8bf7\u9009\u62e9\u90e8\u95e8"}],post:[{type:"required",message:"\u8bf7\u9009\u62e9\u5c97\u4f4d"}],station:[{type:"required",message:"\u8bf7\u9009\u62e9\u89d2\u8272"}]},ref:"form1",className:"addform",children:[Object(h.jsxDEV)(s.a,{labelname:"\u8d26\u53f7",prop:"account",id:"account",children:Object(h.jsxDEV)(n.a,{onChange:e=>{let t=this.state.model;t.user_name=e,this.setState({model:t})},onClearItem:e=>{let t=this.state.model;t.user_name="",this.setState({model:t})},value:this.state.model.user_name,placeholder:"\u8bf7\u8f93\u5165\u624b\u673a\u53f7",labelWidth:"0px",maxLength:12,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:nl,lineNumber:465,columnNumber:13},this)},void 0,!1,{fileName:nl,lineNumber:464,columnNumber:11},this),Object(h.jsxDEV)(s.a,{labelname:" \u624b\u673a\u53f7",prop:"phone",id:"phone",children:Object(h.jsxDEV)(n.a,{kind:"tel",onChange:e=>{let t=this.state.model;t.mobile=e,this.setState({model:t})},onClearItem:e=>{let t=this.state.model;t.mobile="",this.setState({model:t})},value:this.state.model.mobile,placeholder:"\u8bf7\u8f93\u5165\u624b\u673a\u53f7",labelWidth:"0px",maxLength:11,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:nl,lineNumber:487,columnNumber:13},this)},void 0,!1,{fileName:nl,lineNumber:486,columnNumber:11},this),Object(h.jsxDEV)(s.a,{labelname:"\u5bc6\u7801",prop:"pwd",id:"pwd",children:Object(h.jsxDEV)(n.a,{onChange:e=>{let t=this.state.model;t.password=e,this.setState({model:t})},markedShow:e=>{this.changeType(e)},kind:this.state.pwdtype,disabled:this.state.disabled,onfocusFn:e=>this.changeKind(),onClearItem:e=>{let t=this.state.model;t.password="",this.setState({model:t})},value:this.state.model.password,placeholder:"\u8bf7\u8f93\u5165\u5bc6\u7801",labelWidth:"0px",maxLength:16,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:nl,lineNumber:509,columnNumber:13},this)},void 0,!1,{fileName:nl,lineNumber:508,columnNumber:11},this),Object(h.jsxDEV)(s.a,{labelname:"\u771f\u5b9e\u59d3\u540d",prop:"name",children:Object(h.jsxDEV)(n.a,{onChange:e=>{let t=this.state.model;t.real_name=e,this.setState({model:t})},onClearItem:e=>{let t=this.state.model;t.real_name="",this.setState({model:t})},value:this.state.model.real_name,placeholder:"\u8bf7\u8f93\u5165\u771f\u5b9e\u59d3\u540d",labelWidth:"0px",maxLength:16,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:nl,lineNumber:537,columnNumber:13},this)},void 0,!1,{fileName:nl,lineNumber:536,columnNumber:11},this),Object(h.jsxDEV)(s.a,{id:"company",labelname:"\u5c97\u4f4d",prop:"company",myClassName:"sel1",children:Object(h.jsxDEV)(X.a,{options:this.state.companyList,placeholder:"\u8bf7\u9009\u62e9\u516c\u53f8",value:this.state.model.company,onChange:e=>{this.onCompanyChange(e),$t.a.emit("change","company",e)}},void 0,!1,{fileName:nl,lineNumber:558,columnNumber:13},this)},void 0,!1,{fileName:nl,lineNumber:557,columnNumber:11},this),Object(h.jsxDEV)(s.a,{id:"deparment",prop:"deparment",myClassName:"sel2",labelwidth:"0px",children:Object(h.jsxDEV)(X.a,{options:this.state.departmentList,placeholder:"\u8bf7\u9009\u62e9\u90e8\u95e8",popupWidth:"360px",value:this.state.model.deparment,onChange:e=>{this.onDepartmentChange(e),$t.a.emit("change","deparment",e)}},void 0,!1,{fileName:nl,lineNumber:569,columnNumber:13},this)},void 0,!1,{fileName:nl,lineNumber:568,columnNumber:11},this),Object(h.jsxDEV)(s.a,{id:"post",prop:"post",myClassName:"sel2 sel3",labelwidth:"0px",children:Object(h.jsxDEV)(X.a,{options:this.state.departmentJob,placeholder:"\u8bf7\u9009\u62e9\u5c97\u4f4d",popupWidth:"360px",value:this.state.model.post,onChange:e=>{this.onPostChange(e),$t.a.emit("change","post",e)}},void 0,!1,{fileName:nl,lineNumber:581,columnNumber:13},this)},void 0,!1,{fileName:nl,lineNumber:580,columnNumber:11},this),Object(h.jsxDEV)(s.a,{prop:"station",labelname:"\u89d2\u8272",id:"station",children:Object(h.jsxDEV)(X.a,{options:this.state.roleList,clearable:!0,placeholder:"\u8bf7\u9009\u62e9\u89d2\u8272",value:this.state.model.station,onChange:e=>{this.onStationChange(e),$t.a.emit("change","station",e)},popupWidth:"360px",width:"520px"},void 0,!1,{fileName:nl,lineNumber:593,columnNumber:13},this)},void 0,!1,{fileName:nl,lineNumber:592,columnNumber:11},this),Object(h.jsxDEV)("div",{className:"zent-form-actions",children:[Object(h.jsxDEV)(u.a,{type:"primary",onClick:this.submit.bind(this),children:"\u63d0\u4ea4"},void 0,!1,{fileName:nl,lineNumber:607,columnNumber:13},this),Object(h.jsxDEV)(u.a,{type:"normal",htmlType:"reset",onClick:this.cancel.bind(this),children:"\u53d6\u6d88"},void 0,!1,{fileName:nl,lineNumber:610,columnNumber:13},this)]},void 0,!0,{fileName:nl,lineNumber:606,columnNumber:11},this)]},void 0,!0,{fileName:nl,lineNumber:463,columnNumber:9},this),Object(h.jsxDEV)("div",{className:"mypic",children:[Object(h.jsxDEV)("b",{children:"\u5934\u50cf"},void 0,!1,{fileName:nl,lineNumber:617,columnNumber:11},this),Object(h.jsxDEV)("div",{className:"changepic dflexac",children:""==this.state.defaultFileList[0].src?Object(h.jsxDEV)(gt.a,{className:"zent-image-upload-demo",maxSize:512e3,tips:"\u5efa\u8bae\u5c3a\u5bf8 80*80\uff0c\u56fe\u7247\u4e0d\u8d85\u8fc7 500kb",maxAmount:1,onChange:e=>{this.onUploadChange(e)},onUpload:this.onUpload,onError:this.onUploadError},void 0,!1,{fileName:nl,lineNumber:620,columnNumber:15},this):Object(h.jsxDEV)(gt.a,{className:"zent-image-upload-demo",maxSize:512e3,tips:"\u5efa\u8bae\u5c3a\u5bf8 80*80\uff0c\u56fe\u7247\u4e0d\u8d85\u8fc7 500kb",maxAmount:1,onChange:e=>{this.onUploadChange(e)},onUpload:this.onUpload,defaultFileList:this.state.defaultFileList,onError:this.onUploadError},void 0,!1,{fileName:nl,lineNumber:632,columnNumber:15},this)},void 0,!1,{fileName:nl,lineNumber:618,columnNumber:11},this)]},void 0,!0,{fileName:nl,lineNumber:616,columnNumber:9},this)]},void 0,!0,{fileName:nl,lineNumber:462,columnNumber:7},this)}}i(262);var rl="/Users/zhangds/web/blue-brother/frontend/src/pages/system/account/add/add.js";class ml extends m.a.Component{constructor(e){super(e),this.state={pagetitle:"\u65b0\u5efa\u8d26\u53f7",rowData:{},enumer:1}}componentWillMount(){let e=JSON.parse(sessionStorage.getItem("breaknav"))[0].pagetitle,t=e.includes("\u65b0\u5efa")?0:1,i=JSON.parse(sessionStorage.getItem("dataInfo"));this.setState({pagetitle:e+"\u8d26\u53f7",rowData:i,enumer:t})}render(){return Object(h.jsxDEV)("div",{id:"accadd",className:"maincenter",children:Object(h.jsxDEV)(d.a,{style:{width:"100%"},title:this.state.pagetitle,children:Object(h.jsxDEV)("div",{className:"addaccount",children:Object(h.jsxDEV)(ol,{enumer:this.state.enumer,rowData:this.state.rowData},void 0,!1,{fileName:rl,lineNumber:26,columnNumber:13},this)},void 0,!1,{fileName:rl,lineNumber:25,columnNumber:11},this)},void 0,!1,{fileName:rl,lineNumber:24,columnNumber:9},this)},void 0,!1,{fileName:rl,lineNumber:23,columnNumber:7},this)}}i(137);var cl="/Users/zhangds/web/blue-brother/frontend/src/pages/system/account/list/delAuth.js";const dl=Z.a.Group,ul=Z.a.Button;class hl extends m.a.Component{constructor(e){super(e),this.setVisible=e=>{this.setState({visible:e})},this.authChange=e=>{this.setState({authWay:e.target.value}),1==e.target.value?this.getequalMigration(this.props.deldata.id):this.getAutnMan(this.props.deldata.id)},this.state={classification:"",personnel:"",value:"1",authWay:1,levelAuth:!0,downLevel:!0,levelAuthdata:[],downLeveldata:[],authperson:[],loadshow:!1,model:{}}}getequalMigration(e){let t=this;Object(a.jb)(e).then((e=>{Object(a.Tb)(e,((e,i)=>{let a=e.map((e=>({text:e.real_name,key:e.id})));t.setState({levelAuth:a.length>0,authperson:a,levelAuthdata:a})}),(e=>{c.a.error(e)}))})).catch((e=>{}))}getAutnMan(e){let t=this;Object(a.Rb)(e,{page:1,limit:1e3}).then((e=>{Object(a.Tb)(e,((e,i)=>{let a=e.data.filter((e=>1==e.status)).map((e=>({text:e.real_name,key:e.id})));t.setState({downLevel:a.length>0,authperson:a,downLeveldata:a})}),(e=>{c.a.error(e)}))})).catch((e=>{}))}componentWillMount(){this.getequalMigration(this.props.deldata.id),this.getAutnMan(this.props.deldata.id),setTimeout((()=>{this.state.levelAuth?this.setState({authperson:this.state.levelAuthdata,loadshow:!0,authWay:1}):this.setState({authperson:this.state.downLeveldata,loadshow:!0,authWay:0})}),300)}render(){return this.state.loadshow?Object(h.jsxDEV)("div",{id:"delAuth",children:[Object(h.jsxDEV)("p",{className:"tips",children:"\u5220\u9664\u8d26\u53f7\uff0c\u9700\u586b\u5199\u4ea4\u63a5\u4eba\u3002\u5220\u9664\u8d26\u53f7\uff0c\u6570\u636e\u5c06\u5168\u90e8\u79fb\u4ea4\u7ed9\u4ea4\u63a5\u4eba\uff0c\u4e14\u5220\u9664\u8d26\u53f7\u4e0d\u53ef\u6062\u590d"},void 0,!1,{fileName:cl,lineNumber:126,columnNumber:9},this),Object(h.jsxDEV)(l.a,{ref:"form1",children:[Object(h.jsxDEV)(s.a,{labelname:"\u4ea4\u63a5\u89d2\u8272",children:Object(h.jsxDEV)(dl,{onChange:this.authChange,value:this.state.authWay,children:[Object(h.jsxDEV)(ul,{value:1,disabled:!this.state.levelAuth,children:"\u5e73\u7ea7"},void 0,!1,{fileName:cl,lineNumber:132,columnNumber:15},this),Object(h.jsxDEV)(ul,{value:0,disabled:!this.state.downLevel,children:"\u4e0b\u7ea7"},void 0,!1,{fileName:cl,lineNumber:135,columnNumber:15},this)]},void 0,!0,{fileName:cl,lineNumber:131,columnNumber:13},this)},void 0,!1,{fileName:cl,lineNumber:130,columnNumber:11},this),Object(h.jsxDEV)(s.a,{labelname:"\u4ea4\u63a5\u4eba",children:Object(h.jsxDEV)(X.a,{options:this.state.authperson,placeholder:"\u8bf7\u9009\u62e9",onChange:e=>this.setState({personnel:e}),value:this.state.personnel},void 0,!1,{fileName:cl,lineNumber:141,columnNumber:13},this)},void 0,!1,{fileName:cl,lineNumber:140,columnNumber:11},this)]},void 0,!0,{fileName:cl,lineNumber:129,columnNumber:9},this)]},void 0,!0,{fileName:cl,lineNumber:125,columnNumber:7},this):null}}var bl="/Users/zhangds/web/blue-brother/frontend/src/pages/system/account/list/modifypwd.js";function pl(e,t){return e!==t.getSectionValue("password").password?{name:"passwordEqual",message:"\u4e24\u6b21\u586b\u5199\u7684\u5bc6\u7801\u4e0d\u4e00\u81f4"}:null}var Nl=e=>{const t=bi.a.useForm(pi.b.View),[i,s]=m.a.useState("password"),[l,n]=m.a.useState("password"),o=m.a.useCallback((t=>{const i=t.getValue();if(i){let t=Object(de.a)(i);Object(a.Ac)(e.id,t).then((t=>{Object(a.Tb)(t,((t,i)=>{c.a.clear(),c.a.success(i),e.visibleShow(!1)}),(e=>{c.a.clear(),c.a.error(t.data.message)}))})).catch((e=>{}))}}),[]);return Object(h.jsxDEV)(bi.a,{form:t,layout:"horizontal",scrollToError:!0,onSubmit:o,children:[Object(h.jsxDEV)(Ni.a,{name:"password",label:"\u65b0\u5bc6\u7801",className:"selfpwd",required:!0,helpDesc:"",after:Object(h.jsxDEV)(g.a,{type:"password"==i?"eye-o":"closed-eye",onClick:()=>{s("password"==i?"text":"password")}},void 0,!1,{fileName:bl,lineNumber:69,columnNumber:11},void 0),validators:[ji.b.required("\u8bf7\u8f93\u5165\u65b0\u5bc6\u7801"),ji.b.pattern(/^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,16}$/,"6-16\u4f4d\u5b57\u7b26,\u6570\u5b57+\u5b57\u6bcd\u7ec4\u6210\uff0c(\u5b57\u6bcd\u533a\u5206\u5927\u5c0f\u5199)")],notice:"6-16\u4f4d\u5b57\u7b26,\u6570\u5b57+\u5b57\u6bcd\u7ec4\u6210\uff0c\u5b57\u6bcd(\u533a\u5206\u5927\u5c0f\u5199)",props:{type:"password"==i?"password":"text",maxLength:16,autoComplete:"new-password"}},void 0,!1,{fileName:bl,lineNumber:62,columnNumber:7},void 0),Object(h.jsxDEV)(Ni.a,{name:"old_password",label:"\u786e\u8ba4\u5bc6\u7801",className:"selfpwd",after:Object(h.jsxDEV)(g.a,{type:"password"==l?"eye-o":"closed-eye",onClick:()=>{n("password"==l?"text":"password")}},void 0,!1,{fileName:bl,lineNumber:90,columnNumber:11},void 0),required:!0,notice:"\u5fc5\u987b\u4e0e\u65b0\u5bc6\u7801\u8f93\u5165\u4e00\u81f4",validators:[ji.b.required("\u8bf7\u786e\u8ba4\u5bc6\u7801"),pl],props:{type:"password"==l?"password":"text",maxLength:16,autoComplete:"new-password"}},void 0,!1,{fileName:bl,lineNumber:85,columnNumber:7},void 0),Object(h.jsxDEV)("p",{className:"dflexajce",children:[Object(h.jsxDEV)(u.a,{type:"primary",htmlType:"submit",children:"\u786e\u5b9a"},void 0,!1,{fileName:bl,lineNumber:102,columnNumber:9},void 0),",",Object(h.jsxDEV)(u.a,{onClick:()=>{e.visibleShow(!1)},children:"\u53d6\u6d88"},void 0,!1,{fileName:bl,lineNumber:105,columnNumber:10},void 0)]},void 0,!0,{fileName:bl,lineNumber:101,columnNumber:7},void 0)]},void 0,!0,{fileName:bl,lineNumber:61,columnNumber:5},void 0)},jl="/Users/zhangds/web/blue-brother/frontend/src/pages/system/account/list/list.js";const vl=[{title:"\u8d26\u53f7",name:"user_name",prop:"user_name",type:"normal",width:"10%"},{title:"\u624b\u673a\u53f7",prop:"mobile",name:"mobile",width:"10%",type:"normal"},{title:"\u89d2\u8272",name:"role",prop:"role.role_name",type:"normal",defaultText:0,width:"10%"},{title:"\u5c97\u4f4d",name:"job.job_name",type:"normal",prop:"job.job_name",width:"10%"},{title:"\u59d3\u540d",name:"real_name",type:"normal",prop:"real_name",width:"10%"},{title:"\u72b6\u6001",width:"10%",type:"slot",name:"name",prop:"status"},{title:"\u521b\u5efa\u65f6\u95f4",name:"create_time",prop:"create_time",width:"20%",type:"normal"},{title:"\u64cd\u4f5c",prop:"opearo",name:"opearo",type:"slot",width:"20%"}];class gl extends m.a.Component{constructor(e){super(e),this.onChange=e=>{this.setState(e)},this.onConfirm=()=>{},this.onCancel=()=>{},this.setVisible=e=>{this.setState({visible:e})},this.setdelVisible=e=>{this.setState({delvisible:e})},this.getChildrenMsg=(e,t)=>{this.setState({visible:t})},this.state={checkedSmall:!0,tableHeight:600,visible:!1,delvisible:!1,tabList:[{title:"\u8d26\u53f7\u5217\u8868"}],accList:[],page:1,limit:10,total:0,deldata:{},search:"",id:""}}clickFn(){sessionStorage.setItem("pathname2","/home/system/account-add");sessionStorage.setItem("breaknav",JSON.stringify([{pagetitle:"\u65b0\u5efa",items:[{path:"/home/system/account-list",name:"\u8d26\u53f7\u7ba1\u7406"},{path:"/home/system/account-add",name:"\u65b0\u5efa\u8d26\u53f7"}]}])),window.open("#/home/system/account-add")}onSwitchChange(e,t){let i=this,s={status:0==t.status?1:0};G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:["\u662f\u5426",0==t.status?"\u542f\u7528":"\u505c\u7528",Object(h.jsxDEV)("b",{children:["[",t.user_name,"]"]},void 0,!0,{fileName:jl,lineNumber:139,columnNumber:11},this),"\u8d26\u53f7\uff1f"]},void 0,!0,{fileName:jl,lineNumber:137,columnNumber:9},this),onConfirm:()=>{Object(a.sc)(t.id,s).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.clear(),c.a.success(t),i.getAccountFn()}),(e=>{c.a.error(e)}))})).catch((e=>{}))},onCancel:this.onCancel,className:"questModal",parentComponent:this})}changeState(e,t){let i=this,a=Object(oi.a)(i.state.accoutdata,(e=>e.id==t.id));i.state.accoutdata[a].status=e,i.setState({accoutdata:i.state.accoutdata})}delFn(e,t){if(1==t.status)c.a.clear(),c.a.warn("\u8bf7\u5148\u5c06\u6b64\u8d26\u53f7\u7981\u7528\uff01");else{this.setState({delvisible:!0,deldata:t})}}editFn(e,t){Object(a.V)().then((e=>{Object(a.Tb)(e,((e,t)=>{let i=e.map((e=>({key:e.id,text:e.company_name})));sessionStorage.setItem("company",JSON.stringify(i)),window.open("#/home/system/account-add")}),(e=>{c.a.error(e)}))})).catch((e=>{})),sessionStorage.setItem("pathname2","/home/system/account-add");sessionStorage.setItem("breaknav",JSON.stringify([{pagetitle:"\u7f16\u8f91",items:[{path:"/home/system/account-list",name:"\u8d26\u53f7\u7ba1\u7406"},{path:"/home/system/account-add",name:"\u7f16\u8f91\u8d26\u53f7"}]}])),sessionStorage.setItem("dataInfo",JSON.stringify(t))}resetpwd(e,t){this.setState({visible:!0,id:t.id})}subaccount(e,t){this.props.history.push("/home/system/subaccount-list?aid="+t.id);let i=[{pagetitle:"\u7f16\u8f91",items:[{path:"/home/system/account-list",name:"\u8d26\u53f7\u7ba1\u7406"},{path:"/home/system/subaccount-add",name:t.real_name+"\u7684\u5b50\u8d26\u53f7\u5217\u8868"}]}];sessionStorage.setItem("subbreaknav",JSON.stringify(i)),sessionStorage.setItem("subaid",t.id)}getAccountFn(){let e=this,{page:t,limit:i,search:s}=e.state,l={page:t,limit:i};s&&(l.search=s),Object(a.M)(l).then((t=>{Object(a.Tb)(t,((t,i)=>{const a=t.data,{total:s}=t;e.setState({accList:a,total:s})}),(e=>{c.a.error(e)}))})).catch((e=>{}))}delSubmit(){let e=this,t=this.refs.delAuthDom.state;t.personnel.key?1==t.authWay?G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:["\u662f\u5426\u79fb\u4ea4\u5e76\u5220\u9664",Object(h.jsxDEV)("b",{children:["[",this.state.deldata.real_name,"]"]},void 0,!0,{fileName:jl,lineNumber:297,columnNumber:22},this),"\uff1f"]},void 0,!0,{fileName:jl,lineNumber:296,columnNumber:13},this),onConfirm:()=>{let i={admin_user_id:this.state.deldata.id,receive_uid:t.personnel.key};Object(a.Kc)(i).then((t=>{Object(a.Tb)(t,((t,i)=>{c.a.clear(),c.a.success(i),setTimeout((()=>{Object(a.o)(this.state.deldata.id).then((t=>{Object(a.Tb)(t,((t,i)=>{c.a.clear(),c.a.success(i),e.getAccountFn(),e.setState({delvisible:!1})}),(e=>{c.a.error(e)}))})).catch((e=>{}))}),1e3)}),(e=>{c.a.error(e)}))})).catch((e=>{}))},onCancel:this.onCancel,className:"questModal",parentComponent:this}):G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:["\u662f\u5426\u79fb\u4ea4\u5e76\u5220\u9664",Object(h.jsxDEV)("b",{children:["[",this.state.deldata.real_name,"]"]},void 0,!0,{fileName:jl,lineNumber:350,columnNumber:22},this),"\uff1f"]},void 0,!0,{fileName:jl,lineNumber:349,columnNumber:13},this),onConfirm:()=>{let i={admin_user_id:this.state.deldata.id,receive_uid:t.personnel.key};Object(a.tc)(i).then((t=>{Object(a.Tb)(t,((t,i)=>{c.a.clear(),c.a.success(i),setTimeout((()=>{Object(a.o)(this.state.deldata.id).then((t=>{Object(a.Tb)(t,((t,i)=>{c.a.clear(),c.a.success(i),e.getAccountFn(),e.setState({delvisible:!1})}),(e=>{c.a.error(e)}))})).catch((e=>{}))}),1e3)}),(e=>{c.a.error(e)}))})).catch((e=>{}))},onCancel:this.onCancel,className:"questModal",parentComponent:this}):(c.a.clear(),c.a.warn("\u8bf7\u9009\u62e9\u4ea4\u63a5\u4eba"))}pageChange(e){this.setState({page:e}),setTimeout((()=>{this.getAccountFn()}),10)}countChange(e){this.setState({page:1,limit:e}),setTimeout((()=>{this.getAccountFn()}),10)}iptsureFn(){this.setState({page:1}),setTimeout((()=>{this.getAccountFn()}),300)}componentWillMount(){this.getAccountFn(),this.setState({tableHeight:window.innerHeight-390})}componentDidMount(){}componentDidUpdate(e,t){t.search==this.state.search||this.state.search||this.getAccountFn()}sureFn(){this.setVisible(!1),this.refs.midify.onSubmit()}render(){return Object(h.jsxDEV)("div",{id:"accountlist",children:[Object(h.jsxDEV)(Ft,{tabs:this.state.tabList,children:Object(h.jsxDEV)("div",{className:"acctable",children:[Object(h.jsxDEV)("div",{className:"accountable dflexj",children:[Object(h.jsxDEV)(u.a,{type:"primary",icon:"plus",onClick:this.clickFn.bind(this),children:"\u65b0\u5efa\u8d26\u53f7"},void 0,!1,{fileName:jl,lineNumber:448,columnNumber:15},this),Object(h.jsxDEV)(n.a,{onChange:e=>this.setState({search:e}),value:this.state.search,wordSearch:this.iptsureFn.bind(this),icon:"search",placeholder:"\u8bf7\u8f93\u5165\u59d3\u540d\u3001\u624b\u673a\u53f7\u3001\u8d26\u53f7\u67e5\u8be2",countShow:!1,height:"36px",width:"260px",onClearItem:e=>{this.setState({search:""})},alignment:"left"},void 0,!1,{fileName:jl,lineNumber:452,columnNumber:15},this)]},void 0,!0,{fileName:jl,lineNumber:447,columnNumber:13},this),Object(h.jsxDEV)("div",{className:"table-container",children:Object(h.jsxDEV)(I,{spliteColor:"#fff",tableData:this.state.accList,Column:vl,page:this.state.page,maxheight:this.state.tableHeight,isMultiple:!1,dataCount:this.state.total,countbarVisible:!1,isSwitch:!1,pageChange:e=>{this.pageChange(e)},countChange:e=>{this.countChange(e)},checkChange:e=>{},ComponentHandler:(e,t)=>"status"==e?Object(h.jsxDEV)(v.a,{size:"small",checked:0!=t.status,onChange:e=>{this.onSwitchChange(e,t)}},void 0,!1,{fileName:jl,lineNumber:488,columnNumber:23},this):"opearo"==e?Object(h.jsxDEV)("p",{children:[Object(h.jsxDEV)("span",{className:"grid-link",onClick:e=>this.editFn(e,t),children:"\u7f16\u8f91"},void 0,!1,{fileName:jl,lineNumber:501,columnNumber:25},this),Object(h.jsxDEV)("span",{className:"grid-link",onClick:e=>this.delFn(e,t),children:"\u5220\u9664"},void 0,!1,{fileName:jl,lineNumber:504,columnNumber:25},this),Object(h.jsxDEV)("span",{className:"grid-link",onClick:e=>this.resetpwd(e,t),children:"\u91cd\u7f6e\u5bc6\u7801"},void 0,!1,{fileName:jl,lineNumber:507,columnNumber:25},this),Object(h.jsxDEV)("span",{className:"grid-link",onClick:e=>this.subaccount(e,t),children:"\u5b50\u8d26\u53f7\u7ba1\u7406"},void 0,!1,{fileName:jl,lineNumber:510,columnNumber:25},this)]},void 0,!0,{fileName:jl,lineNumber:500,columnNumber:23},this):void 0},void 0,!1,{fileName:jl,lineNumber:468,columnNumber:15},this)},void 0,!1,{fileName:jl,lineNumber:467,columnNumber:13},this)]},void 0,!0,{fileName:jl,lineNumber:446,columnNumber:11},this)},void 0,!1,{fileName:jl,lineNumber:444,columnNumber:9},this),Object(h.jsxDEV)(ce.a,{visible:this.state.visible,className:"questModal",onClose:()=>this.setVisible(!1),title:"\u91cd\u7f6e\u5bc6\u7801",children:Object(h.jsxDEV)("div",{children:Object(h.jsxDEV)(Nl,{visibleShow:e=>this.setVisible(e),id:this.state.id},void 0,!1,{fileName:jl,lineNumber:529,columnNumber:13},this)},void 0,!1,{fileName:jl,lineNumber:528,columnNumber:11},this)},void 0,!1,{fileName:jl,lineNumber:522,columnNumber:9},this),Object(h.jsxDEV)(ce.a,{visible:this.state.delvisible,className:"questModal",onClose:()=>this.setdelVisible(!1),title:"\u5220\u9664\u8d26\u53f7",footer:Object(h.jsxDEV)("div",{style:{textAlign:"right"},children:[Object(h.jsxDEV)(u.a,{type:"primary",onClick:e=>{this.delSubmit(e)},children:"\u63d0\u4ea4"},void 0,!1,{fileName:jl,lineNumber:540,columnNumber:15},this),Object(h.jsxDEV)(u.a,{onClick:e=>{this.setdelVisible(!1)},children:"\u53d6\u6d88"},void 0,!1,{fileName:jl,lineNumber:548,columnNumber:15},this)]},void 0,!0,{fileName:jl,lineNumber:539,columnNumber:13},this),children:Object(h.jsxDEV)("div",{children:Object(h.jsxDEV)(hl,{deldata:this.state.deldata,visibleShow:e=>this.setdelVisible(e),id:this.state.id,ref:"delAuthDom"},void 0,!1,{fileName:jl,lineNumber:559,columnNumber:13},this)},void 0,!1,{fileName:jl,lineNumber:558,columnNumber:11},this)},void 0,!1,{fileName:jl,lineNumber:533,columnNumber:9},this)]},void 0,!0,{fileName:jl,lineNumber:443,columnNumber:7},this)}}var fl=i(504),_l=(i(263),"/Users/zhangds/web/blue-brother/frontend/src/pages/system/customize/main.js");const xl=e=>{const{item:t,onDelete:i}=e;return Object(h.jsxDEV)("div",{className:"dflexj",children:[Object(h.jsxDEV)("span",{children:t.name},void 0,!1,{fileName:_l,lineNumber:14,columnNumber:7},void 0),Object(h.jsxDEV)("span",{className:"delfilebtn",onClick:()=>i(t),children:"\u5220\u9664"},void 0,!1,{fileName:_l,lineNumber:15,columnNumber:7},void 0)]},void 0,!0,{fileName:_l,lineNumber:13,columnNumber:5},void 0)};class yl extends m.a.Component{constructor(e){super(e),this.onUploadFileChange=e=>{e.length>0&&this.setState({file:e[0].file})},this.onUploadError=(e,t)=>{"overMaxSize"===e&&c.a.error(`\u6587\u4ef6\u5927\u5c0f\u4e0d\u80fd\u8d85\u8fc7 ${t.formattedMaxSize}`)},this.state={model:{title:"",scope:"",client:""},client:[],file:"",headImg:"",account:[]}}onUploadChange(e){let t=this;if(e&&e.length>0){let i=new FormData;i.append("file",e[0].file),i.append("path"," plan_theme"),Object(a.cd)(i).then((e=>{Object(a.Tb)(e,((e,i)=>{t.setState({headImg:e.path}),c.a.clear(),c.a.success(i)}),(e=>{c.a.error(e)}))})).catch((e=>{}))}else c.a.clear(),c.a.warn("\u8bf7\u5148\u9009\u62e9\u56fe\u7247\uff01")}onNextStep(){let e=this;this.refs.form1.validator()&&(this.state.headImg&&this.state.file?G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:["\u662f\u5426\u65b0\u589e",Object(h.jsxDEV)("b",{children:["[",e.state.model.title,"]"]},void 0,!0,{fileName:_l,lineNumber:85,columnNumber:19},this),"\u6a21\u677f\uff1f"]},void 0,!0,{fileName:_l,lineNumber:84,columnNumber:13},this),onConfirm:()=>{let t=new FormData,i=Object(de.a)(e.state.model);t.append("thumb",e.state.headImg),t.append("file",e.state.file),t.append("client",i.client.key),t.append("scope",i.scope.key),t.append("title",i.title),Object(a.rc)(t).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.clear(),c.a.success(t)}),(e=>{c.a.error(e)}))})).catch((e=>{}))},onCancel:this.onCancel,className:"questModal",parentComponent:this}):(c.a.clear(),c.a.warn("\u8bf7\u5148\u4e0a\u4f20\u6587\u4ef6\u56fe\u7247")))}onCancel(){window.history.back()}getAccount(){let e=this;Object(a.qb)().then((t=>{Object(a.Tb)(t,((t,i)=>{let a=t.map((e=>({key:e.id,text:e.user_name})));e.setState({account:a})}),(e=>{c.a.error(e)}))})).catch((e=>{}))}onscopeChange(e){let t=this.state.model;t.scope=e,this.setState({model:t})}onclientChange(e){let t=this.state.model;t.client=e,this.setState({model:t})}componentWillMount(){this.getAccount();let e=JSON.parse(sessionStorage.getItem("enmu")).theme_client_type.code,t=[];for(let i in e)t.push({key:i,text:e[i]});this.setState({client:t})}render(){return Object(h.jsxDEV)("div",{className:"customize",children:Object(h.jsxDEV)(d.a,{type:"nested",title:"\u5b9a\u5236\u5316\u6a21\u677f",className:"customize-card",children:[Object(h.jsxDEV)(l.a,{model:this.state.model,rules:{name:[{type:"required",message:"\u8bf7\u8f93\u5165\u6807\u9898"}],client:[{type:"required",message:"\u8bf7\u9009\u62e9\u9875\u9762\u7c7b\u578b"}],scope:[{type:"required",message:"\u8bf7\u9009\u62e9\u5f52\u5c5e\u8d26\u53f7"}]},ref:"form1",children:[Object(h.jsxDEV)(s.a,{labelname:"\u6807\u9898",prop:"name",children:Object(h.jsxDEV)(n.a,{onChange:e=>{let t=this.state.model;t.title=e,this.setState({model:t})},onClearItem:e=>{let t=this.state.model;t.title="",this.setState({model:t})},value:this.state.model.title,placeholder:"\u8bf7\u8f93\u5165",labelWidth:"0px",maxLength:32,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:_l,lineNumber:183,columnNumber:15},this)},void 0,!1,{fileName:_l,lineNumber:182,columnNumber:13},this),Object(h.jsxDEV)(s.a,{labelname:"\u6587\u4ef6\u4e0a\u4f20",prop:"zip",children:Object(h.jsxDEV)(fl.a,{multiple:!0,className:"zent-upload-demo-pic",maxSize:51200,tips:"\u5355\u4e2a\u6587\u4ef6\u4e0d\u8d85\u8fc7 50kb",onChange:e=>this.onUploadFileChange(e),onUpload:this.onUpload,customUploadItem:xl,onError:this.onUploadError,sortable:!0},void 0,!1,{fileName:_l,lineNumber:204,columnNumber:15},this)},void 0,!1,{fileName:_l,lineNumber:203,columnNumber:13},this),Object(h.jsxDEV)(s.a,{labelname:"\u622a\u56fe\u4e0a\u4f20",prop:"picurl",children:Object(h.jsxDEV)(gt.a,{className:"zent-image-upload-demo",maxSize:1048576,tips:"\u5efa\u8bae\u5c3a\u5bf8 375*667\uff0c\u56fe\u7247\u4e0d\u8d85\u8fc71Mb",maxAmount:1,onChange:e=>{this.onUploadChange(e)},onUpload:this.onUpload},void 0,!1,{fileName:_l,lineNumber:217,columnNumber:15},this)},void 0,!1,{fileName:_l,lineNumber:216,columnNumber:13},this),Object(h.jsxDEV)(s.a,{labelname:"\u5f52\u5c5e\u8d26\u53f7",prop:"scope",id:"scope",children:Object(h.jsxDEV)(X.a,{options:this.state.account,onChange:e=>{this.onscopeChange(e)},placeholder:"\u9009\u62e9\u4e00\u9879",width:515,value:this.state.model.scope},void 0,!1,{fileName:_l,lineNumber:230,columnNumber:15},this)},void 0,!1,{fileName:_l,lineNumber:229,columnNumber:13},this),Object(h.jsxDEV)(s.a,{labelname:"\u9875\u9762\u7c7b\u578b",prop:"client",id:"client",children:Object(h.jsxDEV)(X.a,{options:this.state.client,onChange:e=>{this.onclientChange(e)},placeholder:"\u9009\u62e9\u4e00\u9879",width:515,value:this.state.model.client},void 0,!1,{fileName:_l,lineNumber:241,columnNumber:15},this)},void 0,!1,{fileName:_l,lineNumber:240,columnNumber:13},this)]},void 0,!0,{fileName:_l,lineNumber:181,columnNumber:11},this),Object(h.jsxDEV)("div",{className:"btn-group",children:[Object(h.jsxDEV)(u.a,{type:"primary",onClick:()=>this.onNextStep(),children:"\u63d0\u4ea4"},void 0,!1,{fileName:_l,lineNumber:253,columnNumber:13},this),Object(h.jsxDEV)(u.a,{type:"normal",onClick:()=>this.onCancel(),children:"\u53d6\u6d88"},void 0,!1,{fileName:_l,lineNumber:256,columnNumber:13},this)]},void 0,!0,{fileName:_l,lineNumber:252,columnNumber:11},this)]},void 0,!0,{fileName:_l,lineNumber:180,columnNumber:9},this)},void 0,!1,{fileName:_l,lineNumber:179,columnNumber:7},this)}}var Ol=i(492),Dl=(i(264),"/Users/zhangds/web/blue-brother/frontend/src/pages/system/menu/leftnav/leftnav.js");class El extends m.a.Component{constructor(e){super(e),this.onselect=(e,t)=>{document.querySelectorAll(".leftTree .zent-tree-content").forEach((e=>{e.style.background="#fff"})),t.style.background="#A8C3F0",this.setState({selectdom:e}),this.props.menuInfo(e)},this.onCheck=(e,t)=>{this.setState({checkedKeys:e})},this.state={checkedKeys:[],disabledCheckedKeys:[],selectdom:{},menu_data:[]}}getMenuFn(){let e=this;Object(a.kb)().then((t=>{Object(a.Tb)(t,((t,i)=>{const a=Object(de.a)(t);e.setState({menu_data:a})}))}))}componentWillMount(){this.getMenuFn()}componentWillReceiveProps(e){}render(){const{checkedKeys:e,disabledCheckedKeys:t}=this.state;return Object(h.jsxDEV)("div",{id:"menuLeft",children:Object(h.jsxDEV)(Ol.a,{checkable:!0,size:"small",data:this.state.menu_data,onCheck:this.onCheck,onSelect:this.onselect,checkedKeys:e,disabledCheckedKeys:t},void 0,!1,{fileName:Dl,lineNumber:56,columnNumber:9},this)},void 0,!1,{fileName:Dl,lineNumber:55,columnNumber:7},this)}}var Vl=i(497),kl=(i(265),"/Users/zhangds/web/blue-brother/frontend/src/pages/system/menu/menubody/menubody.js");const Sl=Z.a.Group,wl=Z.a.Button;class Cl extends m.a.Component{constructor(e){super(e),this.typeonChange=e=>{let t=this.state.model;t.level=e.target.value,this.setState({model:t})},this.methodsonChange=e=>{let t=this.state.model;t.method=e.target.value,this.setState({model:t})},this.statusChange=e=>{let t=this.state.model;t.status=e.target.value,this.setState({model:t})},this.authChange=e=>{let t=this.state.model;t.auth=e.target.value,this.setState({model:t})},this.state={model:{title:"",fid:"",url:"",auth:"",sort:"",status:"",icon:"",method:"",level:"",router:""}}}sortChange(e){let t=this.state.model;t.sort=e,this.setState({model:t})}submit(){return this.refs.form1.validator()}cancel(){this.setState({model:{menuname:""}}),this.refs.form1.cancel()}render(){return Object(h.jsxDEV)("div",{id:"menuright",children:Object(h.jsxDEV)(l.a,{model:this.state.model,rules:{menuname:[{type:"required",message:"\u8bf7\u8f93\u5165\u83dc\u5355\u540d\u79f0"}]},ref:"form1",children:[Object(h.jsxDEV)(s.a,{labelname:"\u83dc\u5355\u540d\u79f0",prop:"menuname",id:"menuname",children:Object(h.jsxDEV)(n.a,{onChange:e=>{let t=this.state.model;t.title=e,this.setState({model:t})},onClearItem:e=>{let t=this.state.model;t.title="",this.setState({model:t})},value:this.state.model.title,placeholder:"\u8bf7\u8f93\u5165\u83dc\u5355\u540d\u79f0",labelWidth:"0px",countShow:!1,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:kl,lineNumber:76,columnNumber:13},this)},void 0,!1,{fileName:kl,lineNumber:75,columnNumber:11},this),Object(h.jsxDEV)(s.a,{required:!1,labelname:"\u83dc\u5355\u7c7b\u578b",children:Object(h.jsxDEV)(Sl,{onChange:this.typeonChange,value:this.state.model.level,children:[Object(h.jsxDEV)(wl,{value:"1",children:"\u4e00\u7ea7\u83dc\u5355"},void 0,!1,{fileName:kl,lineNumber:98,columnNumber:15},this),Object(h.jsxDEV)(wl,{value:"5",children:"\u4e8c\u7ea7\u83dc\u5355"},void 0,!1,{fileName:kl,lineNumber:99,columnNumber:15},this),Object(h.jsxDEV)(wl,{value:"10",children:"\u64cd\u4f5c\u6309\u94ae"},void 0,!1,{fileName:kl,lineNumber:100,columnNumber:15},this)]},void 0,!0,{fileName:kl,lineNumber:97,columnNumber:13},this)},void 0,!1,{fileName:kl,lineNumber:96,columnNumber:11},this),Object(h.jsxDEV)(s.a,{required:!1,labelname:"\u8bf7\u6c42\u65b9\u5f0f",children:Object(h.jsxDEV)(Sl,{onChange:this.methodsonChange,value:this.state.model.method,children:[Object(h.jsxDEV)(wl,{value:"1",children:"GET"},void 0,!1,{fileName:kl,lineNumber:106,columnNumber:15},this),Object(h.jsxDEV)(wl,{value:"5",children:"POST"},void 0,!1,{fileName:kl,lineNumber:107,columnNumber:15},this),Object(h.jsxDEV)(wl,{value:"10",children:"PUT"},void 0,!1,{fileName:kl,lineNumber:108,columnNumber:15},this),Object(h.jsxDEV)(wl,{value:"15",children:"DELETE"},void 0,!1,{fileName:kl,lineNumber:109,columnNumber:15},this)]},void 0,!0,{fileName:kl,lineNumber:105,columnNumber:13},this)},void 0,!1,{fileName:kl,lineNumber:104,columnNumber:11},this),Object(h.jsxDEV)(s.a,{required:!1,labelname:"\u662f\u5426\u663e\u793a",children:Object(h.jsxDEV)(Sl,{onChange:this.statusChange,value:this.state.model.status,children:[Object(h.jsxDEV)(wl,{value:"1",children:"\u662f"},void 0,!1,{fileName:kl,lineNumber:114,columnNumber:15},this),Object(h.jsxDEV)(wl,{value:"0",children:"\u5426"},void 0,!1,{fileName:kl,lineNumber:115,columnNumber:15},this)]},void 0,!0,{fileName:kl,lineNumber:113,columnNumber:13},this)},void 0,!1,{fileName:kl,lineNumber:112,columnNumber:11},this),Object(h.jsxDEV)(s.a,{required:!1,labelname:"\u662f\u5426\u9a8c\u8bc1\u767b\u9646",children:Object(h.jsxDEV)(Sl,{onChange:this.authChange,value:this.state.model.auth,children:[Object(h.jsxDEV)(wl,{value:"1",children:"\u662f"},void 0,!1,{fileName:kl,lineNumber:120,columnNumber:15},this),Object(h.jsxDEV)(wl,{value:"0",children:"\u5426"},void 0,!1,{fileName:kl,lineNumber:121,columnNumber:15},this)]},void 0,!0,{fileName:kl,lineNumber:119,columnNumber:13},this)},void 0,!1,{fileName:kl,lineNumber:118,columnNumber:11},this),Object(h.jsxDEV)(s.a,{required:!1,labelname:"\u83dc\u5355\u56fe\u6807",children:Object(h.jsxDEV)(n.a,{onChange:e=>{let t=this.state.model;t.icon=e,this.setState({model:t})},onClearItem:e=>{let t=this.state.model;t.icon="",this.setState({model:t})},value:this.state.model.icon,placeholder:"\u8bf7\u8f93\u5165\u83dc\u5355\u56fe\u6807",labelWidth:"0px",countShow:!1,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:kl,lineNumber:125,columnNumber:13},this)},void 0,!1,{fileName:kl,lineNumber:124,columnNumber:11},this),Object(h.jsxDEV)(s.a,{required:!1,labelname:"\u540e\u7aef\u7c7b\u5e93",children:Object(h.jsxDEV)(n.a,{onChange:e=>{let t=this.state.model;t.url=e,this.setState({model:t})},onClearItem:e=>{let t=this.state.model;t.url="",this.setState({model:t})},value:this.state.model.url,placeholder:"\u8bf7\u8f93\u5165\u540e\u7aef\u7c7b\u5e93",labelWidth:"0px",countShow:!1,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:kl,lineNumber:146,columnNumber:13},this)},void 0,!1,{fileName:kl,lineNumber:145,columnNumber:11},this),Object(h.jsxDEV)(s.a,{required:!1,labelname:"\u524d\u7aef\u8def\u7531",children:Object(h.jsxDEV)(n.a,{onChange:e=>{let t=this.state.model;t.router=e,this.setState({model:t})},onClearItem:e=>{let t=this.state.model;t.router="",this.setState({model:t})},value:this.state.model.router,placeholder:"\u8bf7\u8f93\u5165\u524d\u7aef\u8def\u7531",labelWidth:"0px",countShow:!1,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:kl,lineNumber:167,columnNumber:13},this)},void 0,!1,{fileName:kl,lineNumber:166,columnNumber:11},this),Object(h.jsxDEV)(s.a,{required:!1,labelname:"\u524d\u7aef\u7ec4\u4ef6",children:Object(h.jsxDEV)(n.a,{onChange:e=>{let t=this.state.model;t.component=e,this.setState({model:t})},onClearItem:e=>{let t=this.state.model;t.component="",this.setState({model:t})},value:this.state.model.component,placeholder:"\u8bf7\u8f93\u5165\u524d\u7aef\u7ec4\u4ef6",labelWidth:"0px",countShow:!1,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:kl,lineNumber:188,columnNumber:13},this)},void 0,!1,{fileName:kl,lineNumber:187,columnNumber:11},this),Object(h.jsxDEV)(s.a,{required:!1,labelname:"\u83dc\u5355\u6392\u5e8f",children:Object(h.jsxDEV)(Vl.a,{value:this.state.model.sort,showStepper:!0,onChange:e=>this.sortChange(e),placeholder:"\u8bf7\u8f93\u5165\u6570\u5b57"},void 0,!1,{fileName:kl,lineNumber:209,columnNumber:13},this)},void 0,!1,{fileName:kl,lineNumber:208,columnNumber:11},this)]},void 0,!0,{fileName:kl,lineNumber:74,columnNumber:9},this)},void 0,!1,{fileName:kl,lineNumber:73,columnNumber:7},this)}}i(266);var Tl="/Users/zhangds/web/blue-brother/frontend/src/pages/system/menu/menuright/menuright.js";const Il=Z.a.Group,Fl=Z.a.Button;class Ll extends m.a.Component{constructor(e){super(e),this.typeonChange=e=>{let t=this.state.model;t.level=e.target.value,this.setState({model:t})},this.methodsonChange=e=>{let t=this.state.model;t.method=e.target.value,this.setState({model:t})},this.statusChange=e=>{let t=this.state.model;t.status=e.target.value,this.setState({model:t})},this.authChange=e=>{let t=this.state.model;t.auth=e.target.value,this.setState({model:t})},this.state={model:{title:"",fid:"",url:"",auth:"",sort:"",status:"",icon:"",method:"",level:""},menutype:"",cancelInfo:{},menumethods:""}}sortChange(e){let t=this.state.model;t.sort=e,this.setState({model:t})}modifysubmit(){if(this.refs.form1.validator()){let e=Object(de.a)(this.state.model);delete e.id,G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:"\u662f\u5426\u4fee\u6539\u83dc\u5355\u4fe1\u606f\uff1f"},void 0,!1,{fileName:Tl,lineNumber:70,columnNumber:18},this),onConfirm:()=>{Object(a.Lc)(this.state.model.id,e).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.clear(),c.a.success(t),window.history.go(0)}),(e=>{}))})).catch((e=>{}))},onCancel:this.onCancel,className:"questModal",parentComponent:this})}}resetInfo(){this.setState({model:this.state.cancelInfo}),setTimeout((()=>{c.a.clear(),c.a.success("\u91cd\u7f6e\u6210\u529f")}),500)}cancel(){this.setState({model:{menuname:""}}),this.refs.form1.cancel()}componentWillReceiveProps(e){this.setState({cancelInfo:this.props.menuList})}componentDidUpdate(e,t){if(t.cancelInfo!=this.state.cancelInfo){let e=Object(de.a)(this.state.cancelInfo),t={title:e.title,fid:e.fid,url:e.url,auth:e.auth,sort:e.sort,status:e.status,icon:e.icon,method:e.method,level:e.level,router:e.router,id:e.id};this.setState({model:t})}}render(){return Object(h.jsxDEV)("div",{id:"menuright",children:[Object(h.jsxDEV)("p",{className:"btnlist",children:[Object(h.jsxDEV)(u.a,{type:"primary",onClick:this.modifysubmit.bind(this),children:"\u4fee\u6539\u5e76\u4fdd\u5b58"},void 0,!1,{fileName:Tl,lineNumber:142,columnNumber:11},this),Object(h.jsxDEV)(u.a,{type:"normal",onClick:this.resetInfo.bind(this),children:"\u91cd\u7f6e"},void 0,!1,{fileName:Tl,lineNumber:145,columnNumber:11},this)]},void 0,!0,{fileName:Tl,lineNumber:141,columnNumber:9},this),Object(h.jsxDEV)(l.a,{model:this.state.model,rules:{menuname:[{type:"required",message:"\u8bf7\u8f93\u5165\u83dc\u5355\u540d\u79f0"}]},ref:"form1",children:[Object(h.jsxDEV)(s.a,{labelname:"\u83dc\u5355\u540d\u79f0",prop:"menuname",id:"menuname",children:Object(h.jsxDEV)(n.a,{onChange:e=>{let t=this.state.model;t.title=e,this.setState({model:t})},onClearItem:e=>{let t=this.state.model;t.title="",this.setState({model:t})},value:this.state.model.title,placeholder:"\u8bf7\u8f93\u5165\u83dc\u5355\u540d\u79f0",labelWidth:"0px",countShow:!1,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:Tl,lineNumber:151,columnNumber:13},this)},void 0,!1,{fileName:Tl,lineNumber:150,columnNumber:11},this),Object(h.jsxDEV)(s.a,{required:!1,labelname:"\u83dc\u5355\u7c7b\u578b",children:Object(h.jsxDEV)(Il,{onChange:this.typeonChange,value:this.state.model.level,children:[Object(h.jsxDEV)(Fl,{value:1,children:"\u4e00\u7ea7\u83dc\u5355"},void 0,!1,{fileName:Tl,lineNumber:173,columnNumber:15},this),Object(h.jsxDEV)(Fl,{value:5,children:"\u4e8c\u7ea7\u83dc\u5355"},void 0,!1,{fileName:Tl,lineNumber:174,columnNumber:15},this),Object(h.jsxDEV)(Fl,{value:10,children:"\u64cd\u4f5c\u6309\u94ae"},void 0,!1,{fileName:Tl,lineNumber:175,columnNumber:15},this)]},void 0,!0,{fileName:Tl,lineNumber:172,columnNumber:13},this)},void 0,!1,{fileName:Tl,lineNumber:171,columnNumber:11},this),Object(h.jsxDEV)(s.a,{required:!1,labelname:"\u8bf7\u6c42\u65b9\u5f0f",children:Object(h.jsxDEV)(Il,{onChange:this.methodsonChange,value:this.state.model.method,children:[Object(h.jsxDEV)(Fl,{value:1,children:"GET"},void 0,!1,{fileName:Tl,lineNumber:181,columnNumber:15},this),Object(h.jsxDEV)(Fl,{value:5,children:"POST"},void 0,!1,{fileName:Tl,lineNumber:182,columnNumber:15},this),Object(h.jsxDEV)(Fl,{value:10,children:"PUT"},void 0,!1,{fileName:Tl,lineNumber:183,columnNumber:15},this),Object(h.jsxDEV)(Fl,{value:15,children:"DELETE"},void 0,!1,{fileName:Tl,lineNumber:184,columnNumber:15},this)]},void 0,!0,{fileName:Tl,lineNumber:180,columnNumber:13},this)},void 0,!1,{fileName:Tl,lineNumber:179,columnNumber:11},this),Object(h.jsxDEV)(s.a,{required:!1,labelname:"\u662f\u5426\u663e\u793a",children:Object(h.jsxDEV)(Il,{onChange:this.statusChange,value:this.state.model.status,children:[Object(h.jsxDEV)(Fl,{value:1,children:"\u662f"},void 0,!1,{fileName:Tl,lineNumber:189,columnNumber:15},this),Object(h.jsxDEV)(Fl,{value:0,children:"\u5426"},void 0,!1,{fileName:Tl,lineNumber:190,columnNumber:15},this)]},void 0,!0,{fileName:Tl,lineNumber:188,columnNumber:13},this)},void 0,!1,{fileName:Tl,lineNumber:187,columnNumber:11},this),Object(h.jsxDEV)(s.a,{required:!1,labelname:"\u662f\u5426\u9a8c\u8bc1\u767b\u9646",children:Object(h.jsxDEV)(Il,{onChange:this.authChange,value:this.state.model.auth,children:[Object(h.jsxDEV)(Fl,{value:1,children:"\u662f"},void 0,!1,{fileName:Tl,lineNumber:195,columnNumber:15},this),Object(h.jsxDEV)(Fl,{value:0,children:"\u5426"},void 0,!1,{fileName:Tl,lineNumber:196,columnNumber:15},this)]},void 0,!0,{fileName:Tl,lineNumber:194,columnNumber:13},this)},void 0,!1,{fileName:Tl,lineNumber:193,columnNumber:11},this),Object(h.jsxDEV)(s.a,{required:!1,labelname:"\u83dc\u5355\u56fe\u6807",children:Object(h.jsxDEV)(n.a,{onChange:e=>{let t=this.state.model;t.icon=e,this.setState({model:t})},onClearItem:e=>{let t=this.state.model;t.icon="",this.setState({model:t})},value:this.state.model.icon,placeholder:"\u8bf7\u8f93\u5165\u83dc\u5355\u56fe\u6807",labelWidth:"0px",countShow:!1,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:Tl,lineNumber:200,columnNumber:13},this)},void 0,!1,{fileName:Tl,lineNumber:199,columnNumber:11},this),Object(h.jsxDEV)(s.a,{required:!1,labelname:"\u540e\u7aef\u7c7b\u5e93",children:Object(h.jsxDEV)(n.a,{onChange:e=>{let t=this.state.model;t.url=e,this.setState({model:t})},onClearItem:e=>{let t=this.state.model;t.url="",this.setState({model:t})},value:this.state.model.url,placeholder:"\u8bf7\u8f93\u5165\u540e\u7aef\u7c7b\u5e93",labelWidth:"0px",countShow:!1,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:Tl,lineNumber:221,columnNumber:13},this)},void 0,!1,{fileName:Tl,lineNumber:220,columnNumber:11},this),Object(h.jsxDEV)(s.a,{required:!1,labelname:"\u524d\u7aef\u8def\u7531",children:Object(h.jsxDEV)(n.a,{onChange:e=>{let t=this.state.model;t.router=e,this.setState({model:t})},onClearItem:e=>{let t=this.state.model;t.router="",this.setState({model:t})},value:this.state.model.router,placeholder:"\u8bf7\u8f93\u5165\u524d\u7aef\u8def\u7531",labelWidth:"0px",countShow:!1,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:Tl,lineNumber:242,columnNumber:13},this)},void 0,!1,{fileName:Tl,lineNumber:241,columnNumber:11},this),Object(h.jsxDEV)(s.a,{required:!1,labelname:"\u524d\u7aef\u7ec4\u4ef6",children:Object(h.jsxDEV)(n.a,{onChange:e=>{let t=this.state.model;t.component=e,this.setState({model:t})},onClearItem:e=>{let t=this.state.model;t.component="",this.setState({model:t})},value:this.state.model.component,placeholder:"\u8bf7\u8f93\u5165\u524d\u7aef\u7ec4\u4ef6",labelWidth:"0px",countShow:!1,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:Tl,lineNumber:263,columnNumber:13},this)},void 0,!1,{fileName:Tl,lineNumber:262,columnNumber:11},this),Object(h.jsxDEV)(s.a,{required:!1,labelname:"\u83dc\u5355\u6392\u5e8f",children:Object(h.jsxDEV)(Vl.a,{value:this.state.model.sort,showStepper:!0,onChange:e=>this.sortChange(e),placeholder:"\u8bf7\u8f93\u5165\u6570\u5b57"},void 0,!1,{fileName:Tl,lineNumber:284,columnNumber:13},this)},void 0,!1,{fileName:Tl,lineNumber:283,columnNumber:11},this)]},void 0,!0,{fileName:Tl,lineNumber:149,columnNumber:9},this)]},void 0,!0,{fileName:Tl,lineNumber:140,columnNumber:7},this)}}i(267);var Hl="/Users/zhangds/web/blue-brother/frontend/src/pages/system/menu/main/main.js";class ql extends m.a.Component{constructor(e){super(e),this.setVisible=e=>{this.setState({visible:e})},this.state={visible:!1,dialogtitle:"",selectdom:{},fid:0}}addchildmenu(){let e=this.refs.navitem.state.selectdom;e.id?this.setState({dialogtitle:"\u65b0\u5efa\u5b50\u83dc\u5355",visible:!0,fid:e.id}):(c.a.clear(),c.a.warn("\u8bf7\u5148\u70b9\u51fb\u9009\u62e9\u4e00\u4e2a\u83dc\u5355"))}addmenu(){this.setState({dialogtitle:"\u6dfb\u52a0\u4e00\u7ea7\u83dc\u5355",visible:!0,fid:0})}delmenuBtn(){let e=this.refs.navitem.state.selectdom;e.id?G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:["\u662f\u5426\u5220\u9664",Object(h.jsxDEV)("b",{children:["[",e.title,"]"]},void 0,!0,{fileName:Hl,lineNumber:42,columnNumber:17},this),"\uff1f"]},void 0,!0,{fileName:Hl,lineNumber:41,columnNumber:11},this),onConfirm:()=>{Object(a.v)(e.id).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.clear(),c.a.success(t),window.history.go(0)}),(e=>{}))})).catch((e=>{}))},onCancel:this.onCancel,className:"questModal",parentComponent:this}):(c.a.clear(),c.a.warn("\u8bf7\u5148\u70b9\u51fb\u9009\u62e9\u4e00\u4e2a\u83dc\u5355"))}sureFn(){let e=this.refs.menubody.submit(),t=this;if(e){let e=this.refs.menubody.state.model;e.fid=this.state.fid,Object(a.ic)(e).then((e=>{Object(a.Tb)(e,((e,i)=>{c.a.clear(),c.a.success(i),t.refs.navitem.getMenuFn(),this.setState({visible:!1})}))}))}}getMenuInfo(e){this.setState({selectdom:e})}render(){return Object(h.jsxDEV)("div",{id:"systemMenu",className:"maincenter",children:[Object(h.jsxDEV)(d.a,{style:{width:"100%"},children:Object(h.jsxDEV)("p",{className:"menuBtn",children:[Object(h.jsxDEV)(u.a,{type:"primary",icon:"plus",onClick:this.addchildmenu.bind(this),children:"\u65b0\u5efa\u5b50\u83dc\u5355"},void 0,!1,{fileName:Hl,lineNumber:99,columnNumber:13},this),Object(h.jsxDEV)(u.a,{type:"warn",onClick:this.addmenu.bind(this),children:"\u6dfb\u52a0\u4e00\u7ea7\u83dc\u5355"},void 0,!1,{fileName:Hl,lineNumber:102,columnNumber:13},this),Object(h.jsxDEV)(u.a,{type:"danger",onClick:this.delmenuBtn.bind(this),children:"\u5220\u9664\u83dc\u5355"},void 0,!1,{fileName:Hl,lineNumber:105,columnNumber:13},this)]},void 0,!0,{fileName:Hl,lineNumber:98,columnNumber:11},this)},void 0,!1,{fileName:Hl,lineNumber:97,columnNumber:9},this),Object(h.jsxDEV)("div",{className:"menu-body",children:[Object(h.jsxDEV)(d.a,{className:"leftNav",title:"\u83dc\u5355\u5bfc\u822a",children:Object(h.jsxDEV)("div",{className:"leftTree",children:Object(h.jsxDEV)(El,{ref:"navitem",menuInfo:e=>{this.getMenuInfo(e)}},void 0,!1,{fileName:Hl,lineNumber:113,columnNumber:15},this)},void 0,!1,{fileName:Hl,lineNumber:112,columnNumber:13},this)},void 0,!1,{fileName:Hl,lineNumber:111,columnNumber:11},this),Object(h.jsxDEV)(d.a,{className:"rightmenu",title:"\u83dc\u5355\u8be6\u60c5",children:Object(h.jsxDEV)("div",{className:"leftfrom",children:Object(h.jsxDEV)(Ll,{menuList:this.state.selectdom},void 0,!1,{fileName:Hl,lineNumber:123,columnNumber:15},this)},void 0,!1,{fileName:Hl,lineNumber:122,columnNumber:13},this)},void 0,!1,{fileName:Hl,lineNumber:121,columnNumber:11},this)]},void 0,!0,{fileName:Hl,lineNumber:110,columnNumber:9},this),Object(h.jsxDEV)(ce.a,{style:{width:"50%"},visible:this.state.visible,className:"questModal",onClose:()=>this.setVisible(!1),footer:Object(h.jsxDEV)("p",{children:[Object(h.jsxDEV)(u.a,{onClick:this.sureFn.bind(this),type:"primary",children:"\u786e\u5b9a"},void 0,!1,{fileName:Hl,lineNumber:135,columnNumber:15},this),",",Object(h.jsxDEV)(u.a,{onClick:()=>this.setVisible(!1),children:"\u53d6\u6d88"},void 0,!1,{fileName:Hl,lineNumber:138,columnNumber:16},this)]},void 0,!0,{fileName:Hl,lineNumber:134,columnNumber:13},this),title:this.state.dialogtitle,children:Object(h.jsxDEV)(Cl,{ref:"menubody",fid:this.state.fid},void 0,!1,{fileName:Hl,lineNumber:143,columnNumber:11},this)},void 0,!1,{fileName:Hl,lineNumber:128,columnNumber:9},this)]},void 0,!0,{fileName:Hl,lineNumber:96,columnNumber:7},this)}}i(268);var Ml="/Users/zhangds/web/blue-brother/frontend/src/pages/system/role/tree/tree.js";class Pl extends m.a.Component{constructor(e){super(e),this.onCheck=(e,t)=>{this.setState({checkedKeys:e})},this.state={checkedKeys:[],disabledCheckedKeys:[],menu_data:[],menuList:{}}}getMenuFn(){let e=this;Object(a.kb)().then((t=>{Object(a.Tb)(t,((t,i)=>{const a=t;e.setState({menu_data:a})}))}))}componentWillMount(){this.getMenuFn(),this.setState({checkedKeys:this.props.rules})}render(){const{checkedKeys:e,disabledCheckedKeys:t}=this.state;return Object(h.jsxDEV)("div",{id:"treedom",children:Object(h.jsxDEV)(Ol.a,{checkable:!0,size:"medium",data:this.state.menu_data,onCheck:this.onCheck,checkedKeys:e,disabledCheckedKeys:t},void 0,!1,{fileName:Ml,lineNumber:38,columnNumber:9},this)},void 0,!1,{fileName:Ml,lineNumber:37,columnNumber:7},this)}}i(269);var Bl="/Users/zhangds/web/blue-brother/frontend/src/pages/system/role/add/add.js";class Al extends m.a.Component{constructor(e){super(e),this.authchange=e=>{let t=this.state.model;t.account_type=e.target.value,this.setState({model:t})},this.state={model:{role:"",account_type:5,setrole:[],pagetitle:"\u65b0\u5efa\u89d2\u8272"},enumer:0,menuList:{}}}cancel(){G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:"\u662f\u5426\u53d6\u6d88\u672c\u6b21\u64cd\u4f5c\uff1f"},void 0,!1,{fileName:Bl,lineNumber:29,columnNumber:16},this),onConfirm:()=>{window.location.replace("#/home/system/role-list"),sessionStorage.setItem("pathname2","/home/system/role-list")},onCancel:this.onCancel,className:"questModal",parentComponent:this})}submit(){let e=this.refs.roleform.validator(),t=this;this.refs.roletree.state.checkedKeys?e&&G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:0==t.state.enumer?Object(h.jsxDEV)("p",{children:["\u662f\u5426\u65b0\u589e",Object(h.jsxDEV)("b",{children:["[",t.state.model.role,"]"]},void 0,!0,{fileName:Bl,lineNumber:61,columnNumber:21},this),"\u89d2\u8272\uff1f"]},void 0,!0,{fileName:Bl,lineNumber:60,columnNumber:15},this):Object(h.jsxDEV)("p",{children:"\u662f\u5426\u4fee\u6539\u5f53\u524d\u89d2\u8272\u4fe1\u606f\uff1f"},void 0,!1,{fileName:Bl,lineNumber:64,columnNumber:15},this),onConfirm:()=>{let e={role_name:t.state.model.role,menu_id:this.refs.roletree.state.checkedKeys,account_type:t.state.model.account_type};0==t.state.enumer?Object(a.qc)(e).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.clear(),c.a.success(t),setTimeout((()=>{window.location.replace("#/home/system/role-list")}),1e3)}),(e=>{c.a.error(e)}))})).catch((e=>{})):Object(a.zc)(t.state.menuList.id,e).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.clear(),c.a.success(t),setTimeout((()=>{window.location.replace("#/home/system/role-list")}),1e3)}),(e=>{c.a.error(e)}))})).catch((e=>{}))},onCancel:this.onCancel,className:"questModal",parentComponent:this}):(c.a.clear(),c.a.error("\u8bf7\u81f3\u5c11\u9009\u4e2d\u4e00\u4e2a\u6a21\u5757\u6743\u9650"))}componentWillMount(){let e=JSON.parse(sessionStorage.getItem("breaknav"))[0].pagetitle,t=e.includes("\u65b0\u5efa")?0:1;if(this.setState({pagetitle:e+"\u89d2\u8272",enumer:t}),1==t){let e=JSON.parse(sessionStorage.getItem("dataInfo")),t={};t.role=e.role_name,t.account_type=e.account_type,this.setState({menuList:e,model:t})}}render(){return Object(h.jsxDEV)("div",{id:"addrole",className:"maincenter",children:[Object(h.jsxDEV)("p",{className:"title"},void 0,!1,{fileName:Bl,lineNumber:138,columnNumber:9},this),Object(h.jsxDEV)(d.a,{style:{width:"100%"},title:this.state.pagetitle,children:Object(h.jsxDEV)(l.a,{model:this.state.model,rules:{role:[{type:"required",message:"\u8bf7\u8f93\u5165\u89d2\u8272\u540d"}]},ref:"roleform",className:"addform",children:[Object(h.jsxDEV)(s.a,{labelname:"\u89d2\u8272\u540d",prop:"role",id:"role",children:Object(h.jsxDEV)(n.a,{onChange:e=>{let t=this.state.model;t.role=e,this.setState({model:t})},onClearItem:e=>{let t=this.state.model;t.role="",this.setState({model:t})},value:this.state.model.role,placeholder:"\u8bf7\u8f93\u5165\u89d2\u8272",labelWidth:"0px",maxLength:12,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:Bl,lineNumber:142,columnNumber:15},this)},void 0,!1,{fileName:Bl,lineNumber:141,columnNumber:13},this),Object(h.jsxDEV)(s.a,{labelname:"\u6570\u636e\u6743\u9650\u5206\u7ec4",children:Object(h.jsxDEV)(Q.a,{onChange:this.authchange,value:this.state.model.account_type,children:[Object(h.jsxDEV)(ne.a,{value:1,children:"\u6240\u6709\u6570\u636e"},void 0,!1,{fileName:Bl,lineNumber:164,columnNumber:17},this),Object(h.jsxDEV)(ne.a,{value:5,children:"\u8be5\u8d26\u53f7\u6570\u636e"},void 0,!1,{fileName:Bl,lineNumber:165,columnNumber:17},this)]},void 0,!0,{fileName:Bl,lineNumber:163,columnNumber:15},this)},void 0,!1,{fileName:Bl,lineNumber:162,columnNumber:13},this),Object(h.jsxDEV)(s.a,{labelname:"\u8bbe\u7f6e\u6743\u9650",prop:"setrole",id:"setrole",children:Object(h.jsxDEV)(Pl,{ref:"roletree",rules:this.state.menuList.rule_id},void 0,!1,{fileName:Bl,lineNumber:169,columnNumber:15},this)},void 0,!1,{fileName:Bl,lineNumber:168,columnNumber:13},this)]},void 0,!0,{fileName:Bl,lineNumber:140,columnNumber:11},this)},void 0,!1,{fileName:Bl,lineNumber:139,columnNumber:9},this),Object(h.jsxDEV)("p",{className:"btnlist",children:[Object(h.jsxDEV)(u.a,{type:"primary",onClick:this.submit.bind(this),children:"\u63d0\u4ea4"},void 0,!1,{fileName:Bl,lineNumber:174,columnNumber:11},this),Object(h.jsxDEV)(u.a,{type:"normal",onClick:this.cancel.bind(this),children:"\u53d6\u6d88"},void 0,!1,{fileName:Bl,lineNumber:177,columnNumber:11},this)]},void 0,!0,{fileName:Bl,lineNumber:173,columnNumber:9},this)]},void 0,!0,{fileName:Bl,lineNumber:137,columnNumber:7},this)}}i(270);var zl="/Users/zhangds/web/blue-brother/frontend/src/pages/system/role/list/list.js";const Jl=[{title:"\u89d2\u8272\u540d",name:"role_name",width:"40%",prop:"role_name",type:"normal"},{title:"\u521b\u5efa\u65f6\u95f4",width:"40%",prop:"create_time",name:"create_time",type:"normal"},{title:"\u64cd\u4f5c",name:"opearo",width:"20%",prop:"opearo",type:"slot"}];class Ul extends m.a.Component{constructor(e){super(e),this.onChange=e=>{this.setState(e)},this.state={roleList:[],tabList:[{title:"\u89d2\u8272\u7ba1\u7406"}],tableHeight:600,page:1,limit:10,total:0}}getRoleFn(){let e=this,{page:t,limit:i}=e.state,s={page:t,limit:i};Object(a.yb)(s).then((t=>{Object(a.Tb)(t,((t,i)=>{const a=t.data,{total:s}=t;e.setState({roleList:a,total:s})}))}))}pageChange(e){this.setState({page:e}),setTimeout((()=>{this.getRoleFn()}),10)}countChange(e){this.setState({page:1,limit:e}),setTimeout((()=>{this.getRoleFn()}),10)}componentWillMount(){this.setState({tableHeight:window.innerHeight-390}),this.getRoleFn()}clickFn(){sessionStorage.setItem("pathname2","/home/system/role-add");sessionStorage.setItem("breaknav",JSON.stringify([{pagetitle:"\u65b0\u5efa",items:[{path:"/home/system/role-list",name:"\u89d2\u8272\u7ba1\u7406"},{path:"/home/system/role-add",name:"\u65b0\u5efa\u89d2\u8272"}]}])),window.open("#/home/system/role-add")}editFn(e,t){sessionStorage.setItem("pathname2","/home/system/role-add");sessionStorage.setItem("breaknav",JSON.stringify([{pagetitle:"\u7f16\u8f91",items:[{path:"/home/system/role-list",name:"\u89d2\u8272\u7ba1\u7406"},{path:"/home/system/role-add",name:"\u7f16\u8f91\u89d2\u8272"}]}])),sessionStorage.setItem("dataInfo",JSON.stringify(t)),window.open("#/home/system/role-add")}delFn(e,t){let i=this;G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:["\u662f\u5426\u5220\u9664",Object(h.jsxDEV)("b",{children:["[",t.role_name,"]"]},void 0,!0,{fileName:zl,lineNumber:132,columnNumber:15},this),"\uff1f"]},void 0,!0,{fileName:zl,lineNumber:131,columnNumber:9},this),onConfirm:()=>{Object(a.x)(t.id).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.clear(),c.a.success(t),i.getRoleFn()}),(e=>{c.a.error(e)}))})).catch((e=>{}))},onCancel:this.onCancel,className:"questModal",parentComponent:this})}render(){return Object(h.jsxDEV)("div",{id:"rolelist",children:Object(h.jsxDEV)(Ft,{tabs:this.state.tabList,children:[Object(h.jsxDEV)("p",{className:"roletable",children:Object(h.jsxDEV)(u.a,{type:"primary",icon:"plus",onClick:this.clickFn.bind(this),children:"\u65b0\u5efa\u89d2\u8272"},void 0,!1,{fileName:zl,lineNumber:162,columnNumber:13},this)},void 0,!1,{fileName:zl,lineNumber:161,columnNumber:11},this),Object(h.jsxDEV)("div",{className:"table-container",children:Object(h.jsxDEV)(I,{spliteColor:"#fff",tableData:this.state.roleList,Column:Jl,dataCount:this.state.total,isMultiple:!1,countbarVisible:!1,isSwitch:!1,maxheight:this.state.tableHeight,pageChange:e=>{this.pageChange(e)},countChange:e=>{this.countChange(e)},checkChange:e=>{},ComponentHandler:(e,t)=>"name"==e?Object(h.jsxDEV)(v.a,{size:"small",checked:!0},void 0,!1,{fileName:zl,lineNumber:185,columnNumber:26},this):"opearo"==e?Object(h.jsxDEV)("span",{children:[Object(h.jsxDEV)("span",{className:"grid-link",onClick:e=>this.editFn(e,t),children:"\u7f16\u8f91"},void 0,!1,{fileName:zl,lineNumber:191,columnNumber:23},this),Object(h.jsxDEV)("span",{className:"grid-link",onClick:e=>this.delFn(e,t),children:"\u5220\u9664"},void 0,!1,{fileName:zl,lineNumber:194,columnNumber:23},this)]},void 0,!0,{fileName:zl,lineNumber:190,columnNumber:21},this):void 0},void 0,!1,{fileName:zl,lineNumber:167,columnNumber:13},this)},void 0,!1,{fileName:zl,lineNumber:166,columnNumber:11},this)]},void 0,!0,{fileName:zl,lineNumber:160,columnNumber:9},this)},void 0,!1,{fileName:zl,lineNumber:159,columnNumber:7},this)}}var Wl=i(479),Rl=(i(271),"/Users/zhangds/web/blue-brother/frontend/src/pages/system/station/main.js");class Kl extends m.a.Component{constructor(e){super(e),window.mystation=this,this.state={companyBtn:!0,departmentBtn:!0,postBtn:!0,editId:0,visible:!1,company:[],company_id:1,companyName:1,departmentData:[],departmentName:1,department_id:1,opertip:"\u7f16\u8f91",post:[],jobName:"",visibleId:"",vistype:""},this.addItem=this.addItem.bind(this),this.changeval=this.changeval.bind(this),this.delbtnFn=this.delbtnFn.bind(this),this.editbtnFn=this.editbtnFn.bind(this),this.savebtnFn=this.savebtnFn.bind(this),this.cancelbtnFn=this.cancelbtnFn.bind(this)}saveFn(e,t){"\u53d6\u6d88"==e.innerHTML?("\u516c\u53f8"==t?(this.setState({companyBtn:!0,companyName:1}),this.getCompanyFn(),this.getDepartmentFn(this.state.companyName)):"\u90e8\u95e8"==t?(this.setState({departmentBtn:!0}),this.getDepartmentFn(this.state.companyName),this.state.departmentName&&this.getDepartmentJobFn(this.state.departmentName)):"\u5c97\u4f4d"==t&&this.setState({postBtn:!0}),e.parentNode.parentNode.remove()):this.setState({visible:!0})}getCompanyFn(){let e=this;Object(a.V)().then((t=>{Object(a.Tb)(t,((t,i)=>{e.setState({company:t})}),(e=>{c.a.error(e)}))})).catch((e=>{}))}getDepartmentFn(e){let t=this;Object(a.Y)({company_id:e}).then((e=>{Object(a.Tb)(e,((e,i)=>{t.setState({departmentData:e}),t.setState({departmentName:e[0].id}),t.getDepartmentJobFn(e[0].id)}),(e=>{c.a.error(e)}))})).catch((e=>{}))}getDepartmentJobFn(e){let t=this;Object(a.Z)({department_id:e}).then((e=>{Object(a.Tb)(e,((e,i)=>{t.setState({post:e})}),(e=>{c.a.error(e)}))})).catch((e=>{}))}editFn(e,t){let i=this,s=null;if("\u516c\u53f8"==t?s="companyBtn":"\u90e8\u95e8"==t?s="departmentBtn":"\u5c97\u4f4d"==t&&(s="postBtn"),e.parentNode.parentNode.children[0].value){let l=e.parentNode.parentNode.children[0].value;if("\u4fdd\u5b58"==e.innerHTML){if(e.parentNode.parentNode.className=s+" newitem","\u516c\u53f8"==t){let t={company_name:l};Object(a.gc)(t).then((t=>{Object(a.Tb)(t,((t,a)=>{c.a.clear(),c.a.success(a),i.getCompanyFn(),e.parentNode.parentNode.remove(),i.setState({companyBtn:!0})}),(e=>{c.a.error(e)}))})).catch((e=>{}))}else if("\u90e8\u95e8"==t){if(!this.state.companyName)return c.a.clear(),c.a.error("\u8bf7\u9009\u62e9\u5f52\u5c5e\u516c\u53f8"),!1;let t={department_name:l,company_id:this.state.companyName};Object(a.kc)(t).then((t=>{Object(a.Tb)(t,((t,a)=>{c.a.clear(),c.a.success(a),i.getDepartmentFn(i.state.companyName),e.parentNode.parentNode.remove(),i.setState({departmentBtn:!0})}),(e=>{c.a.error(e)}))})).catch((e=>{}))}else if("\u5c97\u4f4d"==t){if(!this.state.departmentName)return c.a.clear(),c.a.error("\u8bf7\u9009\u62e9\u5f52\u5c5e\u90e8\u95e8"),!1;let t={job_name:l,department_id:this.state.departmentName};Object(a.mc)(t).then((t=>{Object(a.Tb)(t,((t,a)=>{c.a.clear(),c.a.success(a),i.getDepartmentJobFn(i.state.departmentName),e.parentNode.parentNode.remove(),i.setState({postBtn:!0})}),(e=>{c.a.error(e)}))})).catch((e=>{}))}}else e.parentNode.parentNode.children[0].disabled="",e.parentNode.parentNode.children[0].focus(),e.parentNode.parentNode.className="newitem focusactive",e.innerHTML="\u4fdd\u5b58","\u516c\u53f8"==t?this.setState({companyBtn:!1}):"\u90e8\u95e8"==t?this.setState({departmentBtn:!1}):"\u5c97\u4f4d"==t&&this.setState({postBtn:!1})}else c.a.clear(),c.a.error(`\u8bf7\u586b\u5165${t}\u540d\u79f0`),e.parentNode.parentNode.children[0].focus()}hasVal(e,t){return Object(oi.a)(e,(e=>e.id==t))}sureFn(e,t,i){let s=this;if(e.target.value&&13==e.keyCode){let l=null;if("\u516c\u53f8"==i?l="companyBtn":"\u90e8\u95e8"==i?l="departmentBtn":"\u5c97\u4f4d"==i&&(l="postBtn"),t.parentNode.className=l+" newitem","\u516c\u53f8"==i){let i={company_name:e.target.value};Object(a.gc)(i).then((e=>{Object(a.Tb)(e,((e,i)=>{c.a.clear(),c.a.success(i),s.getCompanyFn(),t.parentNode.remove(),s.setState({companyBtn:!0})}),(e=>{c.a.error(e)}))})).catch((e=>{}))}else if("\u90e8\u95e8"==i){let i={department_name:e.target.value,company_id:this.state.companyName};Object(a.kc)(i).then((e=>{Object(a.Tb)(e,((e,i)=>{c.a.clear(),c.a.success(i),s.getDepartmentFn(s.state.companyName),t.parentNode.remove(),s.setState({departmentBtn:!0})}),(e=>{c.a.error(e)}))})).catch((e=>{}))}else if("\u5c97\u4f4d"==i){let i={job_name:e.target.value,department_id:this.state.departmentName};Object(a.mc)(i).then((e=>{Object(a.Tb)(e,((e,i)=>{c.a.clear(),c.a.success(i),s.getDepartmentJobFn(s.state.departmentName),t.parentNode.remove(),s.setState({postBtn:!0})}),(e=>{c.a.error(e)}))})).catch((e=>{}))}}}itemClick(e,t,i){if(!(!this.state.companyBtn|!this.state.departmentBtn|!this.state.postBtn))if(this.setState({vistype:i}),"\u516c\u53f8"==i){if(!this.state.companyBtn)return!1;this.setState({companyName:t.id}),this.setState({departmentData:[]}),this.setState({post:[]}),this.getDepartmentFn(t.id)}else if("\u90e8\u95e8"==i){if(!this.state.departmentBtn)return!1;this.setState({departmentName:t.id}),this.getDepartmentJobFn(t.id)}else if("\u5c97\u4f4d"==i){if(!this.state.postBtn)return!1;this.setState({jobName:t.id})}}delbtnFn(e,t,i){let s=this,l=null,n=t.id;this.setState({vistype:i}),l="\u516c\u53f8"==i?t.company_name:"\u90e8\u95e8"==i?t.department_name:t.job_name,G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:["\u662f\u5426\u5220\u9664",Object(h.jsxDEV)("b",{children:["[",l,"]"]},void 0,!0,{fileName:Rl,lineNumber:376,columnNumber:15},this),"\uff1f"]},void 0,!0,{fileName:Rl,lineNumber:375,columnNumber:9},this),onConfirm:()=>{"\u516c\u53f8"==i?Object(a.r)(n).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.clear(),c.a.success(t),s.getCompanyFn()}),(e=>{c.a.error(e)}))})).catch((e=>{})):"\u90e8\u95e8"==i?Object(a.t)(n).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.clear(),c.a.success(t),s.getDepartmentFn(s.state.companyName)}),(e=>{c.a.error(e)}))})).catch((e=>{})):Object(a.u)(n).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.clear(),c.a.success(t),s.getDepartmentJobFn(s.state.departmentName)}),(e=>{c.a.error(e)}))})).catch((e=>{}))},onCancel:this.onCancel,className:"questModal",parentComponent:this})}savebtnFn(e,t,i){let s=this,l=t.id;this.setState({vistype:i}),G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:"\u662f\u5426\u66f4\u6539\u6b64\u6570\u636e\u540d\u79f0\uff1f"},void 0,!1,{fileName:Rl,lineNumber:445,columnNumber:16},this),onConfirm:()=>{"\u516c\u53f8"==i?Object(a.hc)(l,{company_name:t.company_name}).then((e=>{Object(a.Tb)(e,((e,t)=>{s.setState({visibleId:"",opertip:"\u53d6\u6d88"}),c.a.clear(),c.a.success(t),s.getCompanyFn(),s.setState({companyBtn:!0})}),(e=>{c.a.error(e)}))})).catch((e=>{})):"\u90e8\u95e8"==i?Object(a.lc)(l,{department_name:t.department_name}).then((e=>{Object(a.Tb)(e,((e,t)=>{s.setState({visibleId:"",opertip:"\u53d6\u6d88"}),c.a.clear(),c.a.success(t),s.getDepartmentFn(s.state.companyName),s.setState({departmentBtn:!0})}),(e=>{c.a.error(e)}))})).catch((e=>{})):Object(a.nc)(l,{job_name:t.job_name}).then((e=>{Object(a.Tb)(e,((e,t)=>{s.setState({visibleId:"",opertip:"\u53d6\u6d88"}),s.getDepartmentJobFn(s.state.departmentName)}),(e=>{c.a.error(e)}))})).catch((e=>{}))},onCancel:this.onCancel,className:"questModal",parentComponent:this})}cancelbtnFn(e,t,i){this.setState({visibleId:""}),this.setState({opertip:"\u53d6\u6d88"}),"\u516c\u53f8"==i?(this.getCompanyFn(),this.setState({companyBtn:!0})):"\u90e8\u95e8"==i?(this.getDepartmentFn(this.state.companyName),this.setState({departmentBtn:!0})):(this.getDepartmentJobFn(this.state.departmentName),this.setState({postBtn:!0}))}editbtnFn(e,t,i){let a=null,s=t.id;this.setState({opertip:"\u7f16\u8f91",vistype:i,visibleId:s}),"\u516c\u53f8"==i?(a=t.company_name,this.setState({visibletip:a,companyBtn:!1,companyName:t.id}),this.state.companyName==s&&e.target.parentNode.parentNode.children[0].focus()):"\u90e8\u95e8"==i?(a=t.department_name,this.setState({visibletip:a,departmentBtn:!1,departmentName:t.id}),this.state.departmentName==s&&e.target.parentNode.parentNode.children[0].focus()):(a=t.job_name,this.setState({visibletip:a,postBtn:!1,jobName:t.id}),this.state.jobName==s&&e.target.parentNode.parentNode.children[0].focus())}changeval(e,t,i){let a=null;if("\u516c\u53f8"==i){a=this.hasVal(this.state.company,t.id);let i=Object(Wl.a)(this.state.company,[]);-1!=a&&(i[a].company_name=e.target.value,this.setState({company:i}))}else if("\u90e8\u95e8"==i){a=this.hasVal(this.state.departmentData,t.id);let i=Object(Wl.a)(this.state.departmentData,[]);-1!=a&&(i[a].department_name=e.target.value,this.setState({departmentData:i}))}else{a=this.hasVal(this.state.post,t.id);let i=Object(Wl.a)(this.state.post,[]);-1!=a&&(i[a].job_name=e.target.value,this.setState({post:i}))}}addItem(e,t){let i=null,a=null;if("companyBtn"==t)i=this.state.companyBtn,a="\u516c\u53f8",this.setState({departmentData:[]}),this.setState({post:[]}),this.setState({companyName:null});else if("departmentBtn"==t){if(i=this.state.departmentBtn,a="\u90e8\u95e8",this.setState({post:[]}),this.setState({departmentName:null}),!this.state.companyName)return c.a.clear(),void c.a.warn("\u8bf7\u5148\u8865\u5168\u516c\u53f8\u4fe1\u606f\uff01")}else if("postBtn"==t&&(i=this.state.postBtn,a="\u5c97\u4f4d",!this.state.departmentName))return c.a.clear(),void c.a.warn("\u8bf7\u5148\u8865\u5168\u5f52\u5c5e\u90e8\u95e8\u4fe1\u606f\uff01");if(i){if("\u5c97\u4f4d"==a&&this.state.departmentData.length<1)return c.a.clear(),c.a.warn("\u8bf7\u5148\u521b\u5efa\u90e8\u95e8\uff01"),!1;let i=e.target.nextSibling,s=document.createElement("div");s.className=t+" newitem",s.innerHTML=`\n \n

\u53d6\u6d88\u4fdd\u5b58

\n `,i.appendChild(s),"companyBtn"==t?this.setState({companyBtn:!1}):"departmentBtn"==t?this.setState({departmentBtn:!1}):"postBtn"==t&&this.setState({postBtn:!1}),i.children[0].className="newitem focusactive"}else c.a.clear(),c.a.warn(`\u8bf7\u5148\u64cd\u4f5c\u65b0\u589e\u7684${a}\u540d`)}componentWillMount(){this.getCompanyFn(),this.getDepartmentFn(this.state.companyName)}render(){const{current:e,pageSize:t}=this.state;return Object(h.jsxDEV)("div",{id:"station",className:"maincenter",children:Object(h.jsxDEV)(d.a,{style:{width:"100%"},title:"\u5c97\u4f4d\u5217\u8868",children:Object(h.jsxDEV)("div",{className:"cardtable",children:[Object(h.jsxDEV)(d.a,{type:"nested",title:"\u516c\u53f8",className:"carditem",children:Object(h.jsxDEV)("div",{children:[Object(h.jsxDEV)("p",{className:"newadd",onClick:e=>this.addItem(e,"companyBtn"),children:"+\u65b0\u5efa\u516c\u53f8"},void 0,!1,{fileName:Rl,lineNumber:649,columnNumber:17},this),Object(h.jsxDEV)("div",{className:"addList"},void 0,!1,{fileName:Rl,lineNumber:652,columnNumber:17},this),Object(h.jsxDEV)("div",{className:"addList",children:this.state.company.length>0?this.state.company.map(((e,t)=>Object(h.jsxDEV)("div",{className:e.id==this.state.companyName?"selected newitem companyBtn":"newitem companyBtn",onClick:t=>this.itemClick(t,e,"\u516c\u53f8"),children:[Object(h.jsxDEV)("input",{value:e.company_name,maxLength:"20",disabled:!(e.id==this.state.visibleId&&"\u7f16\u8f91"==this.state.opertip&&"\u516c\u53f8"==this.state.vistype),onChange:t=>this.changeval(t,e,"\u516c\u53f8")},void 0,!1,{fileName:Rl,lineNumber:666,columnNumber:27},this),e.id==this.state.visibleId&&"\u7f16\u8f91"==this.state.opertip&&"\u516c\u53f8"==this.state.vistype?Object(h.jsxDEV)("p",{children:[Object(h.jsxDEV)("span",{className:"del ",onClick:t=>this.cancelbtnFn(t,e,"\u516c\u53f8"),children:"\u53d6\u6d88"},void 0,!1,{fileName:Rl,lineNumber:682,columnNumber:31},this),Object(h.jsxDEV)("span",{className:"operation ",onClick:t=>this.savebtnFn(t,e,"\u516c\u53f8"),children:"\u4fdd\u5b58"},void 0,!1,{fileName:Rl,lineNumber:689,columnNumber:31},this)]},void 0,!0,{fileName:Rl,lineNumber:681,columnNumber:29},this):Object(h.jsxDEV)("p",{children:[1!=e.id?Object(h.jsxDEV)("span",{className:"del ",onClick:t=>this.delbtnFn(t,e,"\u516c\u53f8"),children:"\u5220\u9664"},void 0,!1,{fileName:Rl,lineNumber:700,columnNumber:33},this):null,Object(h.jsxDEV)("span",{className:"operation ",onClick:t=>this.editbtnFn(t,e,"\u516c\u53f8"),children:"\u7f16\u8f91"},void 0,!1,{fileName:Rl,lineNumber:708,columnNumber:31},this)]},void 0,!0,{fileName:Rl,lineNumber:698,columnNumber:29},this)]},t,!0,{fileName:Rl,lineNumber:657,columnNumber:25},this))):Object(h.jsxDEV)("div",{className:"nullempty",children:"\u6682\u65e0\u6570\u636e\uff0c\u8bf7\u6dfb\u52a0\u5427\uff01"},void 0,!1,{fileName:Rl,lineNumber:721,columnNumber:21},this)},void 0,!1,{fileName:Rl,lineNumber:653,columnNumber:17},this)]},void 0,!0,{fileName:Rl,lineNumber:648,columnNumber:15},this)},void 0,!1,{fileName:Rl,lineNumber:647,columnNumber:13},this),Object(h.jsxDEV)(d.a,{type:"nested",title:"\u90e8\u95e8",className:"carditem",children:Object(h.jsxDEV)("div",{children:[Object(h.jsxDEV)("p",{className:"newadd",onClick:e=>this.addItem(e,"departmentBtn"),children:"+\u65b0\u5efa\u90e8\u95e8"},void 0,!1,{fileName:Rl,lineNumber:728,columnNumber:17},this),Object(h.jsxDEV)("div",{className:"addList"},void 0,!1,{fileName:Rl,lineNumber:731,columnNumber:17},this),Object(h.jsxDEV)("div",{className:"addList",children:this.state.departmentData.length>0?this.state.departmentData.map(((e,t)=>Object(h.jsxDEV)("div",{className:e.id==this.state.departmentName?"selected newitem departmentBtn":"newitem departmentBtn",onClick:t=>this.itemClick(t,e,"\u90e8\u95e8"),children:[Object(h.jsxDEV)("input",{value:e.department_name,maxLength:"20",disabled:!(e.id==this.state.visibleId&&"\u7f16\u8f91"==this.state.opertip&&"\u90e8\u95e8"==this.state.vistype),onChange:t=>this.changeval(t,e,"\u90e8\u95e8")},void 0,!1,{fileName:Rl,lineNumber:745,columnNumber:27},this),e.id==this.state.visibleId&&"\u7f16\u8f91"==this.state.opertip&&"\u90e8\u95e8"==this.state.vistype?Object(h.jsxDEV)("p",{children:[Object(h.jsxDEV)("span",{className:"del ",onClick:t=>this.cancelbtnFn(t,e,"\u90e8\u95e8"),children:"\u53d6\u6d88"},void 0,!1,{fileName:Rl,lineNumber:761,columnNumber:31},this),Object(h.jsxDEV)("span",{className:"operation ",onClick:t=>this.savebtnFn(t,e,"\u90e8\u95e8"),children:"\u4fdd\u5b58"},void 0,!1,{fileName:Rl,lineNumber:768,columnNumber:31},this)]},void 0,!0,{fileName:Rl,lineNumber:760,columnNumber:29},this):Object(h.jsxDEV)("p",{children:[Object(h.jsxDEV)("span",{className:"del ",onClick:t=>this.delbtnFn(t,e,"\u90e8\u95e8"),children:"\u5220\u9664"},void 0,!1,{fileName:Rl,lineNumber:778,columnNumber:31},this),Object(h.jsxDEV)("span",{className:"operation ",onClick:t=>this.editbtnFn(t,e,"\u90e8\u95e8"),children:"\u7f16\u8f91"},void 0,!1,{fileName:Rl,lineNumber:785,columnNumber:31},this)]},void 0,!0,{fileName:Rl,lineNumber:777,columnNumber:29},this)]},t,!0,{fileName:Rl,lineNumber:736,columnNumber:25},this))):this.state.departmentName?Object(h.jsxDEV)("div",{className:"nullempty",children:"\u6682\u65e0\u6570\u636e\uff0c\u8bf7\u6dfb\u52a0\u5427\uff01"},void 0,!1,{fileName:Rl,lineNumber:798,columnNumber:21},this):null},void 0,!1,{fileName:Rl,lineNumber:732,columnNumber:17},this)]},void 0,!0,{fileName:Rl,lineNumber:727,columnNumber:15},this)},void 0,!1,{fileName:Rl,lineNumber:726,columnNumber:13},this),Object(h.jsxDEV)(d.a,{type:"nested",title:"\u5c97\u4f4d",className:"carditem",children:Object(h.jsxDEV)("div",{children:[Object(h.jsxDEV)("p",{className:"newadd",onClick:e=>this.addItem(e,"postBtn"),children:"+\u65b0\u5efa\u5c97\u4f4d"},void 0,!1,{fileName:Rl,lineNumber:805,columnNumber:17},this),Object(h.jsxDEV)("div",{className:"addList"},void 0,!1,{fileName:Rl,lineNumber:808,columnNumber:17},this),Object(h.jsxDEV)("div",{className:"addList",children:this.state.post.length>0?this.state.post.map(((e,t)=>Object(h.jsxDEV)("div",{className:e.id==this.state.jobName?"selected newitem postBtn":"newitem postBtn",onClick:t=>this.itemClick(t,e,"\u5c97\u4f4d"),children:[Object(h.jsxDEV)("input",{value:e.job_name,maxLength:"20",disabled:!(e.id==this.state.visibleId&&"\u7f16\u8f91"==this.state.opertip&&"\u5c97\u4f4d"==this.state.vistype),onChange:t=>this.changeval(t,e,"\u5c97\u4f4d")},void 0,!1,{fileName:Rl,lineNumber:821,columnNumber:27},this),e.id==this.state.visibleId&&"\u7f16\u8f91"==this.state.opertip&&"\u5c97\u4f4d"==this.state.vistype?Object(h.jsxDEV)("p",{children:[Object(h.jsxDEV)("span",{className:"del ",onClick:t=>this.cancelbtnFn(t,e,"\u5c97\u4f4d"),children:"\u53d6\u6d88"},void 0,!1,{fileName:Rl,lineNumber:837,columnNumber:31},this),Object(h.jsxDEV)("span",{className:"operation ",onClick:t=>this.savebtnFn(t,e,"\u5c97\u4f4d"),children:"\u4fdd\u5b58"},void 0,!1,{fileName:Rl,lineNumber:844,columnNumber:31},this)]},void 0,!0,{fileName:Rl,lineNumber:836,columnNumber:29},this):Object(h.jsxDEV)("p",{children:[Object(h.jsxDEV)("span",{className:"del ",onClick:t=>this.delbtnFn(t,e,"\u5c97\u4f4d"),children:"\u5220\u9664"},void 0,!1,{fileName:Rl,lineNumber:854,columnNumber:31},this),Object(h.jsxDEV)("span",{className:"operation ",onClick:t=>this.editbtnFn(t,e,"\u5c97\u4f4d"),children:"\u7f16\u8f91"},void 0,!1,{fileName:Rl,lineNumber:861,columnNumber:31},this)]},void 0,!0,{fileName:Rl,lineNumber:853,columnNumber:29},this)]},void 0,!0,{fileName:Rl,lineNumber:813,columnNumber:25},this))):Object(h.jsxDEV)("div",{className:"nullempty",children:"\u6682\u65e0\u6570\u636e\uff0c\u8bf7\u6dfb\u52a0\u5427\uff01"},void 0,!1,{fileName:Rl,lineNumber:874,columnNumber:21},this)},void 0,!1,{fileName:Rl,lineNumber:809,columnNumber:17},this)]},void 0,!0,{fileName:Rl,lineNumber:804,columnNumber:15},this)},void 0,!1,{fileName:Rl,lineNumber:803,columnNumber:13},this)]},void 0,!0,{fileName:Rl,lineNumber:646,columnNumber:11},this)},void 0,!1,{fileName:Rl,lineNumber:645,columnNumber:9},this)},void 0,!1,{fileName:Rl,lineNumber:644,columnNumber:7},this)}}i(272);var Yl="/Users/zhangds/web/blue-brother/frontend/src/pages/system/subAccount/add/adduserinfo/tree.js";class $l extends m.a.Component{constructor(e){super(e),this.onCheck=(e,t)=>{this.setState({checkedKeys:e}),t.top.length==this.state.menu_data.length&&0!=t.top.length?this.setState({checked:!0}):this.setState({checked:!1})},this.handleChange=e=>{let t=[];e.target.checked&&this.state.menu_data.forEach((e=>{t.push(e.id),e.children&&e.children.forEach((e=>{t.push(e.id),e.children&&e.children.forEach((e=>{t.push(e.id)}))}))})),this.setState({checked:e.target.checked,checkedKeys:t})},this.state={checkedKeys:[],disabledCheckedKeys:[],menu_data:[],menuList:{},checkLength:"",checked:!1}}getMenuFn(){let e=this,t=sessionStorage.getItem("subaid");Object(a.Qb)(t).then((t=>{Object(a.Tb)(t,((t,i)=>{const a=t.filter((e=>e.children.length>0));if(0==e.props.enum){e.setState({checked:!0});let t=[];a.forEach((e=>{t.push(e.id),e.children&&e.children.forEach((e=>{t.push(e.id),e.children&&e.children.forEach((e=>{t.push(e.id)}))}))})),e.setState({checkedKeys:t})}else e.setState({checked:!0}),a.forEach((t=>{if(-1==e.props.rules.indexOf(t.id))return e.setState({checked:!1}),!1})),e.setState({checkedKeys:e.props.rules});e.setState({menu_data:a})}))}))}componentWillMount(){this.getMenuFn()}render(){const{checkedKeys:e,disabledCheckedKeys:t}=this.state;return Object(h.jsxDEV)("div",{id:"treedom",children:[Object(h.jsxDEV)("div",{className:"role-tips",children:[Object(h.jsxDEV)("span",{children:"\u89d2\u8272\u6743\u9650\uff08\u5c06\u4f1a\u5728\u76ee\u524d\u767b\u5f55\u8d26\u53f7\u7ba1\u7406\u8303\u56f4\u5185\u914d\u7f6e\u6743\u9650\uff09"},void 0,!1,{fileName:Yl,lineNumber:101,columnNumber:11},this),Object(h.jsxDEV)("div",{className:"role-check",children:Object(h.jsxDEV)(j.a,{checked:this.state.checked,onChange:this.handleChange,children:"\u6240\u6709\u6743\u9650"},void 0,!1,{fileName:Yl,lineNumber:103,columnNumber:13},this)},void 0,!1,{fileName:Yl,lineNumber:102,columnNumber:11},this)]},void 0,!0,{fileName:Yl,lineNumber:100,columnNumber:9},this),Object(h.jsxDEV)(Ol.a,{checkable:!0,size:"medium",data:this.state.menu_data,onCheck:this.onCheck,checkedKeys:e,disabledCheckedKeys:t},void 0,!1,{fileName:Yl,lineNumber:108,columnNumber:9},this)]},void 0,!0,{fileName:Yl,lineNumber:99,columnNumber:7},this)}}var Gl="/Users/zhangds/web/blue-brother/frontend/src/pages/system/subAccount/add/adduserinfo/adduserinfo.js";class Ql extends m.a.Component{constructor(e){super(e),this.onUploadError=(e,t)=>{"overMaxAmount"===e?(c.a.clear(),c.a.error(`\u6700\u591a\u53ef\u4e0a\u4f20 ${t.maxAmount} \u5f20\u56fe\u7247`)):"overMaxSize"===e&&(c.a.clear(),c.a.error(`\u56fe\u7247\u5927\u5c0f\u4e0d\u80fd\u8d85\u8fc7 ${t.formattedMaxSize}b`))},this.state={model:{user_name:"",mobile:"",password:"",real_name:"",company:"",deparment:"",post:""},companyList:[],departmentList:[],departmentJob:[],roleList:[],headImg:"",pwdtype:"text",defaultFileList:[{src:""}],disabled:!1,id:"",ruleId:[]}}componentWillMount(){let e=this;this.getCompanyFn();let t=JSON.parse(sessionStorage.getItem("company"));t||this.getCompanyFn(),this.getRoleFn();let i=this.props;if(i&&1==i.enumer){var s,l,n,o;this.setState({pwdtype:"password"});let r=Object(de.a)(i.rowData),m={user_name:r.user_name,mobile:r.mobile,password:"yxtx2021",real_name:r.real_name,company:t.find((e=>e.key==r.company_id)),deparment:{key:null===(s=r.department)||void 0===s?void 0:s.id,text:null===(l=r.department)||void 0===l?void 0:l.department_name},post:{key:null===(n=r.job)||void 0===n?void 0:n.id,text:null===(o=r.job)||void 0===o?void 0:o.job_name}},d=i.rowData.rule.map((e=>e.id));this.setState({ruleId:d});let u={};u.src=r.head,this.setState({model:m,disabled:!0,defaultFileList:[u],id:r.id,headImg:r.head}),m.company&&m.company.key&&Object(a.Y)({company_id:m.company.key}).then((t=>{Object(a.Tb)(t,((t,i)=>{let a=t.map((e=>({key:e.id,text:e.department_name})));e.setState({departmentList:a})}),(e=>{c.a.error(e)}))})).catch((e=>{})),m.deparment.key&&Object(a.Z)({department_id:m.deparment.key}).then((t=>{Object(a.Tb)(t,((t,i)=>{let a=t.map((e=>({key:e.id,text:e.job_name})));e.setState({departmentJob:a})}),(e=>{c.a.error(e)}))})).catch((e=>{}))}}changeKind(){this.setState({pwdtype:"password"})}submit(){let e=this.refs.form1.validator(),t=this.refs.roletree.state.checkedKeys,i=this.state.model,s=this;e?G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:0==s.props.enumer?Object(h.jsxDEV)("p",{children:["\u662f\u5426\u65b0\u589e",Object(h.jsxDEV)("b",{children:["[",i.user_name,"]"]},void 0,!0,{fileName:Gl,lineNumber:142,columnNumber:19},this),"\u8d26\u53f7\uff1f"]},void 0,!0,{fileName:Gl,lineNumber:141,columnNumber:13},this):Object(h.jsxDEV)("p",{children:["\u662f\u5426\u4fee\u6539",Object(h.jsxDEV)("b",{children:["[",i.user_name,"]"]},void 0,!0,{fileName:Gl,lineNumber:146,columnNumber:19},this),"\u8d26\u53f7\u4fe1\u606f\uff1f"]},void 0,!0,{fileName:Gl,lineNumber:145,columnNumber:13},this),onConfirm:()=>{let e={user_name:i.user_name,password:i.password,job_id:i.post.key,real_name:i.real_name,mobile:i.mobile,assist_user_id:sessionStorage.getItem("subaid"),rule:t};if(s.state.headImg&&(e.head=s.state.headImg),0==s.props.enumer)Object(a.fc)(e).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.clear(),c.a.success(t),setTimeout((()=>{window.location.replace("#/home/system/subaccount-list"),sessionStorage.setItem("pathname2","/home/system/subaccount-list")}),1e3)}),(e=>{c.a.error(e)}))})).catch((e=>{}));else{let t=s.state.id;delete e.password,e.head=s.state.headImg,Object(a.vc)(t,e).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.clear(),c.a.success(t),setTimeout((()=>{window.location.replace("#/home/system/subaccount-list"),sessionStorage.setItem("pathname2","/home/system/subaccount-list")}),1e3)}),(e=>{c.a.error(e)}))})).catch((e=>{}))}},onCancel:this.onCancel,className:"questModal",parentComponent:this}):(c.a.clear(),c.a.error("\u8bf7\u5b8c\u5584\u8868\u5355\u6570\u636e"))}onUploadChange(e){let t=this;if(e&&e.length>0){let i=new FormData;i.append("file",e[0].file),i.append("path","account_avatar"),Object(a.cd)(i).then((e=>{Object(a.Tb)(e,((e,i)=>{t.setState({headImg:e.path}),c.a.clear(),c.a.success(i)}),(e=>{c.a.error(e)}))})).catch((e=>{}))}else t.setState({headImg:""})}onCompanyChange(e){if(!e){let e=this.state.model;e.deparment="",e.post="",this.setState({model:e})}let t=this,i=this.state.model;if(i.company=e,this.setState({model:i}),e){let i=this.state.model;i.deparment="",i.post="",t.setState({departmentList:[]}),t.setState({departmentJob:[]}),t.setState({model:i}),Object(a.Y)({company_id:e.key}).then((e=>{Object(a.Tb)(e,((e,i)=>{let a=e.map((e=>({key:e.id,text:e.department_name})));t.setState({departmentList:a})}),(e=>{c.a.error(e)}))})).catch((e=>{}))}else t.setState({departmentList:[]}),t.setState({departmentJob:[]})}onDepartmentChange(e){if(!e){let e=this.state.model;e.post="",this.setState({model:e})}let t=this,i=this.state.model;i.deparment=e,this.setState({model:i}),t.setState({departmentJob:[]}),e?Object(a.Z)({department_id:e.key}).then((e=>{Object(a.Tb)(e,((e,i)=>{let a=e.map((e=>({key:e.id,text:e.job_name})));t.setState({departmentJob:a});let s=this.state.model;s.post="",t.setState({model:s})}),(e=>{c.a.error(e)}))})).catch((e=>{})):t.setState({departmentJob:[]})}onPostChange(e){let t=this.state.model;t.post=e,this.setState({model:t})}getCompanyFn(){let e=this;Object(a.V)().then((t=>{Object(a.Tb)(t,((t,i)=>{let a=t.map((e=>({key:e.id,text:e.company_name})));sessionStorage.setItem("company",JSON.stringify(a)),e.setState({companyList:a})}),(e=>{c.a.error(e)}))})).catch((e=>{}))}changeType(e){this.setState({pwdtype:e})}getRoleFn(){let e=this;Object(a.xb)().then((t=>{Object(a.Tb)(t,((t,i)=>{let a=t.data.map((e=>({key:e.id,text:e.role_name})));e.setState({roleList:a})}),(e=>{c.a.error(e)}))})).catch((e=>{}))}cancel(){G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:"\u662f\u5426\u53d6\u6d88\u672c\u6b21\u64cd\u4f5c\uff1f"},void 0,!1,{fileName:Gl,lineNumber:401,columnNumber:16},this),onConfirm:()=>{window.location.replace("#/home/system/subaccount-list"),sessionStorage.setItem("pathname2","/home/system/subaccount-list")},onCancel:this.onCancel,className:"questModal",parentComponent:this})}render(){return Object(h.jsxDEV)("div",{children:[Object(h.jsxDEV)(d.a,{style:{width:"100%"},title:this.props.title,children:Object(h.jsxDEV)("div",{id:"addaccinfo",children:[Object(h.jsxDEV)(l.a,{model:this.state.model,rules:{account:[{type:"required",message:"\u8bf7\u8f93\u5165\u624b\u673a\u53f7"}],phone:[{type:"required",message:"\u8bf7\u8f93\u5165\u624b\u673a\u53f7"},{type:"regExp",message:"\u624b\u673a\u53f7\u683c\u5f0f\u4e0d\u6b63\u786e",reg:"^[1][3,4,5,6,7,8,9][0-9]{9}$"}]},ref:"form1",className:"addform",children:[Object(h.jsxDEV)(s.a,{labelname:"\u8d26\u53f7",prop:"account",id:"account",children:Object(h.jsxDEV)(n.a,{onChange:e=>{let t=this.state.model;t.user_name=e,this.setState({model:t})},onClearItem:e=>{let t=this.state.model;t.user_name="",this.setState({model:t})},value:this.state.model.user_name,placeholder:"\u8bf7\u8f93\u5165\u624b\u673a\u53f7",labelWidth:"0px",maxLength:12,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:Gl,lineNumber:438,columnNumber:17},this)},void 0,!1,{fileName:Gl,lineNumber:437,columnNumber:15},this),Object(h.jsxDEV)(s.a,{labelname:" \u624b\u673a\u53f7",prop:"phone",id:"phone",children:Object(h.jsxDEV)(n.a,{kind:"tel",onChange:e=>{let t=this.state.model;t.mobile=e,this.setState({model:t})},onClearItem:e=>{let t=this.state.model;t.mobile="",this.setState({model:t})},value:this.state.model.mobile,placeholder:"\u8bf7\u8f93\u5165\u624b\u673a\u53f7",labelWidth:"0px",maxLength:11,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:Gl,lineNumber:460,columnNumber:17},this)},void 0,!1,{fileName:Gl,lineNumber:459,columnNumber:15},this),Object(h.jsxDEV)(s.a,{labelname:"\u5bc6\u7801",id:"pwd",required:"",children:Object(h.jsxDEV)(n.a,{onChange:e=>{let t=this.state.model;t.password=e,this.setState({model:t})},onfocusFn:e=>this.changeKind(),markedShow:e=>{this.changeType(e)},kind:this.state.pwdtype,disabled:this.state.disabled,onClearItem:e=>{let t=this.state.model;t.password="",this.setState({model:t})},value:this.state.model.password,placeholder:"\u8bf7\u8f93\u5165\u5bc6\u7801",labelWidth:"0px",maxLength:16,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:Gl,lineNumber:482,columnNumber:17},this)},void 0,!1,{fileName:Gl,lineNumber:481,columnNumber:15},this),Object(h.jsxDEV)(s.a,{labelname:"\u771f\u5b9e\u59d3\u540d",required:"",children:Object(h.jsxDEV)(n.a,{onChange:e=>{let t=this.state.model;t.real_name=e,this.setState({model:t})},onClearItem:e=>{let t=this.state.model;t.real_name="",this.setState({model:t})},value:this.state.model.real_name,placeholder:"\u8bf7\u8f93\u5165\u771f\u5b9e\u59d3\u540d",labelWidth:"0px",maxLength:16,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:Gl,lineNumber:510,columnNumber:17},this)},void 0,!1,{fileName:Gl,lineNumber:509,columnNumber:15},this),Object(h.jsxDEV)(s.a,{id:"company",labelname:"\u5c97\u4f4d",myClassName:"sel1",required:"",children:Object(h.jsxDEV)(X.a,{options:this.state.companyList,placeholder:"\u8bf7\u9009\u62e9\u516c\u53f8",value:this.state.model.company,onChange:e=>{this.onCompanyChange(e),$t.a.emit("change","company",e)}},void 0,!1,{fileName:Gl,lineNumber:531,columnNumber:17},this)},void 0,!1,{fileName:Gl,lineNumber:530,columnNumber:15},this),Object(h.jsxDEV)(s.a,{id:"deparment",myClassName:"sel2",labelwidth:"0px",required:"",children:Object(h.jsxDEV)(X.a,{options:this.state.departmentList,placeholder:"\u8bf7\u9009\u62e9\u90e8\u95e8",popupWidth:"360px",value:this.state.model.deparment,onChange:e=>{this.onDepartmentChange(e),$t.a.emit("change","deparment",e)}},void 0,!1,{fileName:Gl,lineNumber:542,columnNumber:17},this)},void 0,!1,{fileName:Gl,lineNumber:541,columnNumber:15},this),Object(h.jsxDEV)(s.a,{id:"post",myClassName:"sel2 sel3",labelwidth:"0px",children:Object(h.jsxDEV)(X.a,{options:this.state.departmentJob,placeholder:"\u8bf7\u9009\u62e9\u5c97\u4f4d",popupWidth:"360px",value:this.state.model.post,onChange:e=>{this.onPostChange(e),$t.a.emit("change","post",e)}},void 0,!1,{fileName:Gl,lineNumber:554,columnNumber:17},this)},void 0,!1,{fileName:Gl,lineNumber:553,columnNumber:15},this),Object(h.jsxDEV)(s.a,{required:"",labelname:"\u8bbe\u7f6e\u6743\u9650",myClassName:"rolechoose",id:"station",children:Object(h.jsxDEV)($l,{ref:"roletree",rules:this.state.ruleId,enum:this.props.enumer},void 0,!1,{fileName:Gl,lineNumber:566,columnNumber:17},this)},void 0,!1,{fileName:Gl,lineNumber:565,columnNumber:15},this)]},void 0,!0,{fileName:Gl,lineNumber:436,columnNumber:13},this),Object(h.jsxDEV)("div",{className:"mypic",children:[Object(h.jsxDEV)("b",{children:"\u5934\u50cf"},void 0,!1,{fileName:Gl,lineNumber:570,columnNumber:15},this),Object(h.jsxDEV)("div",{className:"changepic dflexac",children:""==this.state.defaultFileList[0].src?Object(h.jsxDEV)(gt.a,{className:"zent-image-upload-demo",maxSize:512e3,tips:"\u5efa\u8bae\u5c3a\u5bf8 80*80\uff0c\u56fe\u7247\u4e0d\u8d85\u8fc7 500kb",maxAmount:1,onChange:e=>{this.onUploadChange(e)},onUpload:this.onUpload,onError:this.onUploadError},void 0,!1,{fileName:Gl,lineNumber:573,columnNumber:19},this):Object(h.jsxDEV)(gt.a,{className:"zent-image-upload-demo",maxSize:512e3,tips:"\u5efa\u8bae\u5c3a\u5bf8 80*80\uff0c\u56fe\u7247\u4e0d\u8d85\u8fc7 500kb",maxAmount:1,onChange:e=>{this.onUploadChange(e)},onUpload:this.onUpload,defaultFileList:this.state.defaultFileList,onError:this.onUploadError},void 0,!1,{fileName:Gl,lineNumber:585,columnNumber:19},this)},void 0,!1,{fileName:Gl,lineNumber:571,columnNumber:15},this)]},void 0,!0,{fileName:Gl,lineNumber:569,columnNumber:13},this)]},void 0,!0,{fileName:Gl,lineNumber:435,columnNumber:11},this)},void 0,!1,{fileName:Gl,lineNumber:434,columnNumber:9},this),Object(h.jsxDEV)("div",{className:"mt24",children:[Object(h.jsxDEV)(u.a,{type:"primary",onClick:this.submit.bind(this),children:"\u63d0\u4ea4"},void 0,!1,{fileName:Gl,lineNumber:603,columnNumber:11},this),Object(h.jsxDEV)(u.a,{type:"normal",htmlType:"reset",onClick:this.cancel.bind(this),children:"\u53d6\u6d88"},void 0,!1,{fileName:Gl,lineNumber:606,columnNumber:11},this)]},void 0,!0,{fileName:Gl,lineNumber:602,columnNumber:9},this)]},void 0,!0,{fileName:Gl,lineNumber:433,columnNumber:7},this)}}i(273);var Zl="/Users/zhangds/web/blue-brother/frontend/src/pages/system/subAccount/add/add.js";class Xl extends m.a.Component{constructor(e){super(e),this.state={pagetitle:"\u65b0\u5efa\u5b50\u8d26\u53f7",rowData:{},enumer:1}}componentWillMount(){let e=JSON.parse(sessionStorage.getItem("breaknav"))[0].pagetitle,t=e.includes("\u65b0\u5efa")?0:1,i=JSON.parse(sessionStorage.getItem("dataInfo"));this.setState({pagetitle:e+"\u5b50\u8d26\u53f7",rowData:i,enumer:t})}render(){return Object(h.jsxDEV)("div",{id:"accadd",className:"maincenter",children:Object(h.jsxDEV)("div",{className:"addaccount",children:Object(h.jsxDEV)(Ql,{enumer:this.state.enumer,rowData:this.state.rowData,title:this.state.pagetitle},void 0,!1,{fileName:Zl,lineNumber:24,columnNumber:11},this)},void 0,!1,{fileName:Zl,lineNumber:23,columnNumber:9},this)},void 0,!1,{fileName:Zl,lineNumber:22,columnNumber:7},this)}}i(274);var en="/Users/zhangds/web/blue-brother/frontend/src/pages/system/subAccount/list/modifypwd.js";function tn(e,t){return e!==t.getSectionValue("password").password?{name:"passwordEqual",message:"\u4e24\u6b21\u586b\u5199\u7684\u5bc6\u7801\u4e0d\u4e00\u81f4"}:null}var an=e=>{const t=bi.a.useForm(pi.b.View),[i,s]=m.a.useState("password"),[l,n]=m.a.useState("password"),o=m.a.useCallback((t=>{const i=t.getValue();if(i){let t=Object(de.a)(i);Object(a.Ac)(e.id,t).then((t=>{Object(a.Tb)(t,((t,i)=>{c.a.clear(),c.a.success(i),e.visibleShow(!1)}),(e=>{c.a.clear(),c.a.error(t.data.message)}))})).catch((e=>{}))}}),[]);return Object(h.jsxDEV)(bi.a,{form:t,layout:"horizontal",scrollToError:!0,onSubmit:o,children:[Object(h.jsxDEV)(Ni.a,{name:"password",label:"\u65b0\u5bc6\u7801",className:"selfpwd",required:!0,after:Object(h.jsxDEV)(g.a,{type:"password"==i?"eye-o":"closed-eye",onClick:()=>{s("password"==i?"text":"password")}},void 0,!1,{fileName:en,lineNumber:67,columnNumber:11},void 0),helpDesc:"",validators:[ji.b.required("\u8bf7\u8f93\u5165\u65b0\u5bc6\u7801"),ji.b.pattern(/^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,16}$/,"6-16\u4f4d\u5b57\u7b26,\u6570\u5b57+\u5b57\u6bcd\u7ec4\u6210\uff0c(\u5b57\u6bcd\u533a\u5206\u5927\u5c0f\u5199)")],notice:"6-16\u4f4d\u5b57\u7b26,\u6570\u5b57+\u5b57\u6bcd\u7ec4\u6210\uff0c\u5b57\u6bcd(\u533a\u5206\u5927\u5c0f\u5199)",props:{type:"password"==i?"password":"text",maxLength:16,autoComplete:"new-password"}},void 0,!1,{fileName:en,lineNumber:61,columnNumber:7},void 0),Object(h.jsxDEV)(Ni.a,{name:"old_password",label:"\u786e\u8ba4\u5bc6\u7801",className:"selfpwd",required:!0,after:Object(h.jsxDEV)(g.a,{type:"password"==l?"eye-o":"closed-eye",onClick:()=>{n("password"==l?"text":"password")}},void 0,!1,{fileName:en,lineNumber:90,columnNumber:11},void 0),notice:"\u5fc5\u987b\u4e0e\u65b0\u5bc6\u7801\u8f93\u5165\u4e00\u81f4",validators:[ji.b.required("\u8bf7\u786e\u8ba4\u5bc6\u7801"),tn],props:{type:"password"==l?"password":"text",maxLength:16,autoComplete:"new-password"}},void 0,!1,{fileName:en,lineNumber:84,columnNumber:7},void 0),Object(h.jsxDEV)("p",{className:"dflexajce",children:[Object(h.jsxDEV)(u.a,{type:"primary",htmlType:"submit",children:"\u786e\u5b9a"},void 0,!1,{fileName:en,lineNumber:101,columnNumber:9},void 0),",",Object(h.jsxDEV)(u.a,{onClick:()=>{e.visibleShow(!1)},children:"\u53d6\u6d88"},void 0,!1,{fileName:en,lineNumber:104,columnNumber:10},void 0)]},void 0,!0,{fileName:en,lineNumber:100,columnNumber:7},void 0)]},void 0,!0,{fileName:en,lineNumber:60,columnNumber:5},void 0)},sn="/Users/zhangds/web/blue-brother/frontend/src/pages/system/subAccount/list/list.js";const ln=[{title:"\u8d26\u53f7",name:"user_name",prop:"user_name",type:"normal",width:"10%"},{title:"\u624b\u673a\u53f7",prop:"mobile",name:"mobile",width:"10%",type:"normal"},{title:"\u5c97\u4f4d",name:"job.job_name",type:"normal",prop:"job.job_name",width:"10%"},{title:"\u59d3\u540d",name:"real_name",type:"normal",prop:"real_name",width:"10%"},{title:"\u72b6\u6001",width:"10%",type:"slot",name:"name",prop:"status"},{title:"\u521b\u5efa\u65f6\u95f4",name:"create_time",prop:"create_time",width:"20%",type:"normal"},{title:"\u64cd\u4f5c",prop:"opearo",name:"opearo",type:"slot",width:"20%"}];class nn extends m.a.Component{constructor(e){super(e),this.onChange=e=>{this.setState(e)},this.onConfirm=()=>{},this.onCancel=()=>{},this.setVisible=e=>{this.setState({visible:e})},this.getChildrenMsg=(e,t)=>{this.setState({visible:t})},this.state={checkedSmall:!0,tableHeight:600,visible:!1,tabList:[{title:"\u5b50\u8d26\u53f7\u5217\u8868"}],accList:[],page:1,limit:10,total:0,search:"",id:""}}clickFn(){sessionStorage.setItem("pathname2","/home/system/subaccount-add");sessionStorage.setItem("breaknav",JSON.stringify([{pagetitle:"\u65b0\u5efa",items:[{path:"/home/system/subaccount-list",name:"\u5b50\u8d26\u53f7\u7ba1\u7406"},{path:"/home/system/subaccount-add",name:"\u65b0\u5efa\u5b50\u8d26\u53f7"}]}])),window.open("#/home/system/subaccount-add")}onSwitchChange(e,t){let i=this,s={status:0==t.status?1:0};G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:["\u662f\u5426",0==t.status?"\u542f\u7528":"\u505c\u7528",Object(h.jsxDEV)("b",{children:["[",t.user_name,"]"]},void 0,!0,{fileName:sn,lineNumber:127,columnNumber:11},this),"\u8d26\u53f7\uff1f"]},void 0,!0,{fileName:sn,lineNumber:125,columnNumber:9},this),onConfirm:()=>{Object(a.sc)(t.id,s).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.clear(),c.a.success(t),window.location.href.includes("aid")?i.getsubAppointFn():i.getAccountFn()}),(e=>{c.a.error(e)}))})).catch((e=>{}))},onCancel:this.onCancel,className:"questModal",parentComponent:this})}changeState(e,t){let i=this,a=Object(oi.a)(i.state.accoutdata,(e=>e.id==t.id));i.state.accoutdata[a].status=e,i.setState({accoutdata:i.state.accoutdata})}delFn(e,t){G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:["\u662f\u5426\u5220\u9664",Object(h.jsxDEV)("b",{children:["[",t.user_name,"]"]},void 0,!0,{fileName:sn,lineNumber:176,columnNumber:15},this),"\uff1f"]},void 0,!0,{fileName:sn,lineNumber:175,columnNumber:9},this),onConfirm:()=>{Object(a.o)(t.id).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.clear(),c.a.success(t),window.location.href.includes("aid")?this.getsubAppointFn():this.getAccountFn()}),(e=>{c.a.error(e)}))})).catch((e=>{}))},onCancel:this.onCancel,className:"questModal",parentComponent:this})}editFn(e,t){Object(a.V)().then((e=>{Object(a.Tb)(e,((e,t)=>{let i=e.map((e=>({key:e.id,text:e.company_name})));sessionStorage.setItem("company",JSON.stringify(i)),this.props.history.push("/home/system/subaccount-add"),window.open("#/home/system/subaccount-add")}),(e=>{c.a.error(e)}))})).catch((e=>{})),sessionStorage.setItem("pathname2","/home/system/subaccount-add");sessionStorage.setItem("breaknav",JSON.stringify([{pagetitle:"\u7f16\u8f91",items:[{path:"/home/system/subaccount-list",name:"\u5b50\u8d26\u53f7\u7ba1\u7406"},{path:"/home/system/subaccount-add",name:"\u7f16\u8f91\u5b50\u8d26\u53f7"}]}])),sessionStorage.setItem("dataInfo",JSON.stringify(t))}resetpwd(e,t){this.setState({visible:!0,id:t.id})}getsubAppointFn(){let e=this,{page:t,limit:i,search:s}=e.state,l={page:t,limit:i};s&&(l.search=s),Object(a.Rb)(sessionStorage.getItem("subaid"),l).then((t=>{Object(a.Tb)(t,((t,i)=>{const a=t.data,{total:s}=t;e.setState({accList:a,total:s})}),(e=>{c.a.error(e)}))})).catch((e=>{}))}getAccountFn(){let e=this,{page:t,limit:i,search:s}=e.state,l={page:t,limit:i};s&&(l.search=s),Object(a.Cb)(l).then((t=>{Object(a.Tb)(t,((t,i)=>{const a=t.data,{total:s}=t;e.setState({accList:a,total:s})}),(e=>{c.a.error(e)}))})).catch((e=>{}))}pageChange(e){this.setState({page:e}),window.location.href.includes("aid")?setTimeout((()=>{this.getsubAppointFn()}),10):setTimeout((()=>{this.getAccountFn()}),10)}countChange(e){this.setState({page:1,limit:e}),window.location.href.includes("aid")?setTimeout((()=>{this.getsubAppointFn()}),10):setTimeout((()=>{this.getAccountFn()}),10)}iptsureFn(){window.location.href.includes("aid")?(this.setState({page:1}),setTimeout((()=>{this.getsubAppointFn()}),300)):(this.setState({page:1}),setTimeout((()=>{this.getAccountFn()}),300))}componentWillMount(){var e;(this.setState({tableHeight:window.innerHeight-390}),window.location.href.includes("aid"))?this.getsubAppointFn():(sessionStorage.setItem("subaid",null===(e=JSON.parse(sessionStorage.getItem("userInfo")))||void 0===e?void 0:e.id),this.getAccountFn())}componentDidMount(){}componentDidUpdate(e,t){t.search==this.state.search||this.state.search||(window.location.href.includes("aid")?this.getsubAppointFn():this.getAccountFn())}sureFn(){}render(){return Object(h.jsxDEV)("div",{id:"accountlist",children:[Object(h.jsxDEV)(Ft,{tabs:this.state.tabList,children:Object(h.jsxDEV)("div",{className:"acctable",children:[Object(h.jsxDEV)("div",{className:"accountable dflexj",children:[Object(h.jsxDEV)(u.a,{type:"primary",icon:"plus",onClick:this.clickFn.bind(this),children:"\u65b0\u5efa\u5b50\u8d26\u53f7"},void 0,!1,{fileName:sn,lineNumber:378,columnNumber:15},this),Object(h.jsxDEV)(n.a,{onChange:e=>this.setState({search:e}),value:this.state.search,wordSearch:this.iptsureFn.bind(this),icon:"search",placeholder:"\u8bf7\u8f93\u5165\u59d3\u540d\u3001\u624b\u673a\u53f7\u67e5\u8be2",countShow:!1,height:"36px",width:"260px",onClearItem:e=>{this.setState({search:""})},alignment:"left"},void 0,!1,{fileName:sn,lineNumber:382,columnNumber:15},this)]},void 0,!0,{fileName:sn,lineNumber:377,columnNumber:13},this),Object(h.jsxDEV)("div",{className:"table-container",children:Object(h.jsxDEV)(I,{spliteColor:"#fff",tableData:this.state.accList,Column:ln,maxheight:this.state.tableHeight,isMultiple:!1,dataCount:this.state.total,countbarVisible:!1,isSwitch:!1,page:this.state.page,pageChange:e=>{this.pageChange(e)},countChange:e=>{this.countChange(e)},checkChange:e=>{},ComponentHandler:(e,t)=>"status"==e?Object(h.jsxDEV)(v.a,{size:"small",checked:0!=t.status,onChange:e=>{this.onSwitchChange(e,t)}},void 0,!1,{fileName:sn,lineNumber:418,columnNumber:23},this):"opearo"==e?Object(h.jsxDEV)("span",{children:[Object(h.jsxDEV)("span",{className:"grid-link",onClick:e=>this.editFn(e,t),children:"\u7f16\u8f91"},void 0,!1,{fileName:sn,lineNumber:431,columnNumber:25},this),Object(h.jsxDEV)("span",{className:"grid-link",onClick:e=>this.delFn(e,t),children:"\u5220\u9664"},void 0,!1,{fileName:sn,lineNumber:434,columnNumber:25},this),Object(h.jsxDEV)("span",{className:"grid-link",onClick:e=>this.resetpwd(e,t),children:"\u91cd\u7f6e\u5bc6\u7801"},void 0,!1,{fileName:sn,lineNumber:437,columnNumber:25},this)]},void 0,!0,{fileName:sn,lineNumber:430,columnNumber:23},this):void 0},void 0,!1,{fileName:sn,lineNumber:398,columnNumber:15},this)},void 0,!1,{fileName:sn,lineNumber:397,columnNumber:13},this)]},void 0,!0,{fileName:sn,lineNumber:376,columnNumber:11},this)},void 0,!1,{fileName:sn,lineNumber:374,columnNumber:9},this),Object(h.jsxDEV)(ce.a,{visible:this.state.visible,className:"questModal",onClose:()=>this.setVisible(!1),title:"\u91cd\u7f6e\u5bc6\u7801",children:Object(h.jsxDEV)("div",{children:Object(h.jsxDEV)(an,{visibleShow:e=>this.setVisible(e),id:this.state.id},void 0,!1,{fileName:sn,lineNumber:456,columnNumber:13},this)},void 0,!1,{fileName:sn,lineNumber:455,columnNumber:11},this)},void 0,!1,{fileName:sn,lineNumber:449,columnNumber:9},this)]},void 0,!0,{fileName:sn,lineNumber:373,columnNumber:7},this)}}i(275);var on="/Users/zhangds/web/blue-brother/frontend/src/pages/system/systemMould/main.js";const rn=[{title:"\u7f29\u7565\u56fe",name:"thumb",prop:"thumb",type:"slot",width:"10%"},{title:"\u6807\u9898",prop:"title",name:"title",width:"auto",type:"normal"},{title:"\u6743\u91cd",prop:"sort",name:"sort",type:"normal",width:"auto"},{title:"\u66f4\u65b0\u65f6\u95f4",prop:"update_time",name:"update_time",type:"normal",width:"auto"},{title:"\u521b\u5efa\u4eba",prop:"user_name",name:"user_name",type:"normal",width:"auto"},{title:"\u64cd\u4f5c",prop:"edit",name:"edit",type:"slot",width:"auto"}];class mn extends m.a.Component{constructor(e){super(e),this.state={distdata:[],total:0,combinedValue:[],page:1,limit:10,tabList:[{title:"\u7cfb\u7edf\u6a21\u677f\u5217\u8868"}],DateTime:"",key_word:"",tableHeight:600,dataCount:0}}componentDidUpdate(e,t){t.key_word==this.state.key_word||this.state.key_word||this.sureFn()}sureFn(){this.setState({page:1}),this.setState({limit:10});let e={page:1,limit:10,title:this.state.key_word};this.getTableList(e)}editFn(e,t){sessionStorage.setItem("mouldType",0),sessionStorage.setItem("pageInfo",JSON.stringify(t)),sessionStorage.setItem("isSort",1),window.location.href="/#/edittemplate"}getTableList(e){Object(a.Db)(e).then((e=>{Object(a.Tb)(e,((e,t)=>{this.setState({dataCount:e.total}),this.setState({distdata:e.data})}),(e=>{}))})).catch((e=>{}))}componentWillMount(){this.setState({tableHeight:window.innerHeight-390});let e={page:this.state.page,limit:this.state.limit};this.state.combinedValue&&this.state.combinedValue[0]&&(e.begin_time=this.state.combinedValue[0],e.end_time=this.state.combinedValue[1]),this.getTableList(e)}countChange(e){this.setState({page:1,limit:e});let t={page:1,limit:e};this.getTableList(t)}pageChange(e){this.setState({page:e});let t={page:e,limit:this.state.limit};this.state.key_word&&(t.title=this.state.key_word),this.getTableList(t)}newTemplate(e){sessionStorage.setItem("mouldType",0),sessionStorage.removeItem("pageInfo"),sessionStorage.removeItem("editorConfig"),window.location.href="/#/edittemplate"}delFn(e,t){let i=this;G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:["\u662f\u5426\u5220\u9664",Object(h.jsxDEV)("b",{children:["[",t.title,"]"]},void 0,!0,{fileName:on,lineNumber:182,columnNumber:15},this),"\uff1f"]},void 0,!0,{fileName:on,lineNumber:181,columnNumber:9},this),onConfirm:()=>{Object(a.y)(t.id).then((e=>{Object(a.Tb)(e,((e,t)=>{c.a.clear(),c.a.success(t);let a={page:this.state.page,limit:this.state.limit,title:this.state.key_word};i.getTableList(a)}),(e=>{}))})).catch((e=>{}))},onCancel:this.onCancel,className:"questModal",parentComponent:this})}render(){const{current:e,pageSize:t}=this.state;return Object(h.jsxDEV)("div",{id:"exchangecodelist",children:Object(h.jsxDEV)(Ft,{tabs:this.state.tabList,children:[Object(h.jsxDEV)("div",{className:"codetable dflexj",children:[Object(h.jsxDEV)(u.a,{type:"primary",icon:"plus",onClick:e=>{this.newTemplate(e)},children:[" ","\u65b0\u589e\u6a21\u677f"," "]},void 0,!0,{fileName:on,lineNumber:217,columnNumber:13},this),Object(h.jsxDEV)(n.a,{onClearItem:e=>{this.setState({key_word:""})},wordSearch:this.sureFn.bind(this),onChange:e=>this.setState({key_word:e}),value:this.state.key_word,icon:"search",placeholder:"\u8bf7\u8f93\u5165\u5173\u952e\u5b57\u8fdb\u884c\u5339\u914d\u67e5\u8be2",countShow:!1,height:"36px",width:"260px",alignment:"left"},void 0,!1,{fileName:on,lineNumber:227,columnNumber:13},this)]},void 0,!0,{fileName:on,lineNumber:216,columnNumber:11},this),Object(h.jsxDEV)("div",{className:"code-table",children:Object(h.jsxDEV)(I,{spliteColor:"#fff",tableData:this.state.distdata,Column:rn,maxheight:this.state.tableHeight,countbarVisible:!1,isSwitch:!1,page:this.state.page,dataCount:this.state.dataCount,isMultiple:!1,pageChange:e=>{this.pageChange(e)},countChange:e=>{this.countChange(e)},checkChange:e=>{},ComponentHandler:(e,t)=>"thumb"==e?Object(h.jsxDEV)(Ei.a,{trigger:"hover",position:"right-center",content:Object(h.jsxDEV)("img",{src:t.thumb,alt:"",style:{width:"375px",transform:"scale(.8)"}},void 0,!1,{fileName:on,lineNumber:267,columnNumber:25},this),children:Object(h.jsxDEV)("img",{src:t.thumb,alt:"",style:{width:"30px",height:"30px"}},void 0,!1,{fileName:on,lineNumber:273,columnNumber:23},this)},void 0,!1,{fileName:on,lineNumber:263,columnNumber:21},this):"edit"==e?Object(h.jsxDEV)("span",{children:[Object(h.jsxDEV)("a",{className:"grid-link",onClick:e=>{this.editFn(e,t)},children:[" ","\u7f16\u8f91"," "]},void 0,!0,{fileName:on,lineNumber:293,columnNumber:23},this)," ",Object(h.jsxDEV)("a",{onClick:e=>{this.delFn(e,t)},className:"grid-link",children:[" ","\u5220\u9664"," "]},void 0,!0,{fileName:on,lineNumber:301,columnNumber:23},this)]},void 0,!0,{fileName:on,lineNumber:292,columnNumber:21},this):void 0},void 0,!1,{fileName:on,lineNumber:243,columnNumber:13},this)},void 0,!1,{fileName:on,lineNumber:242,columnNumber:11},this)]},void 0,!0,{fileName:on,lineNumber:215,columnNumber:9},this)},void 0,!1,{fileName:on,lineNumber:214,columnNumber:7},this)}}const cn=[{path:"/home/exchangepage",component:Na},{path:"/home/settlementList",component:Za},{path:"/home/packageDetail",component:ts},{path:"/home/mytempMould",component:ya},{path:"/home/myexchangetemplate",component:ga},{path:"/home/order-list",component:Ba},{path:"/home/download-orderlist",component:ka},{path:"/home/order-addetails",component:Wa},{path:"/home/plan",component:al},{path:"/home/plan-list",component:il},{path:"/home/plan-qrcode",component:ll},{path:"/home/plan-create",component:ys},{path:"/home/plan-edit",component:Ds},{path:"/home/plan-edit-copy",component:Vs},{path:"/home/key-list",component:As},{path:"/home/plan-keyList",component:Qs},{path:"/home/key-addEdit",component:Cs},{path:"/home/key-detail",component:Is},{path:"/home/key-log",component:Hs},{path:"/home/system/account-add",component:ml},{path:"/home/system/subaccount-list",component:nn},{path:"/home/system/subaccount-add",component:Xl},{path:"/home/system/role-list",component:Ul},{path:"/home/system/role-add",component:Al},{path:"/home/system/station",component:Kl},{path:"/home/system/customize",component:yl},{path:"/home/system/menu",component:ql},{path:"/home/system/my-mould",component:mn},{path:"/home/distributor-list",component:Oi},{path:"/home/distributor-add",component:li},{path:"/home/distributor-edit",component:li},{path:"/home/distributor-merchant",component:function(){var e,t,i,m,b;const[p,N]=Object(W.a)({loading:!1,apiMode:[],reseller_id:0,merchant_id:"",pos_id:"",app_id:"",store_id:"",public_key:"",private_key:"",merchant_public_key:"",secret_key:"",notify_url:"",subscribe_event:[],status:1,api_mode:2}),v=Object(r.useRef)();return Object(r.useEffect)((()=>{const{merchant:e,id:t}=JSON.parse(sessionStorage.getItem("merchant"));Object(a.O)().then((({data:i})=>{N({apiMode:i,reseller_id:t,...e})}))}),[]),Object(h.jsxDEV)("div",{className:"maincenter",children:[Object(h.jsxDEV)(d.a,{style:{width:"100%"},title:"\u66f4\u65b0\u4fe1\u606f",children:Object(h.jsxDEV)("div",{className:"adddistributor merchantForm",children:Object(h.jsxDEV)(l.a,{model:p,rules:{merchant_id:[{type:"required",message:"\u8bf7\u8f93\u5165\u5546\u6237\u7f16\u53f7"}],public_key:[{type:"required",message:"\u8bf7\u8f93\u5165\u516c\u94a5"}],private_key:[{type:"required",message:"\u8bf7\u8f93\u5165\u79c1\u94a5"}],app_id:[{type:"required",message:"\u8bf7\u8f93\u5165\u5e94\u7528ID"}],pos_id:[{type:"required",message:"\u8bf7\u8f93\u5165\u5e73\u53f0ID"}],store_id:[{type:"required",message:"\u8bf7\u8f93\u5165\u5e97\u94faID"}],secret_key:[{type:"required",message:"\u8bf7\u8f93\u5165SM4\u79d8\u94a5"}],merchant_public_key:[{type:"required",message:"\u8bf7\u8f93\u5165\u5546\u6237\u516c\u94a5"}],notify_url:[{type:"required",message:"\u8bf7\u8f93\u5165\u5546\u6237\u56de\u8c03\u901a\u77e5\u7f51\u5173\u5730\u5740"},{type:"regExp",message:"\u8bf7\u8f93\u5165\u5408\u6cd5\u7684\u56de\u8c03\u901a\u77e5\u7f51\u5173\u5730\u5740",reg:/(https?|ftp|file):\/\/[-A-Za-z0-9+&@#\/%?=~_|!:,.;]+[-A-Za-z0-9+&@#\/%=~_|]/}]},ref:v,children:[Object(h.jsxDEV)(s.a,{labelname:"\u5546\u6237\u7f16\u53f7",prop:"merchant_id",children:Object(h.jsxDEV)(n.a,{onChange:e=>N({merchant_id:e}),onClearItem:()=>N({merchant_id:""}),countShow:!1,value:p.merchant_id,placeholder:"\u8bf7\u8f93\u5165\u5546\u6237\u7f16\u53f7",labelWidth:"0px",maxLength:100,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:Vi,lineNumber:96,columnNumber:15},this)},void 0,!1,{fileName:Vi,lineNumber:95,columnNumber:13},this),Object(h.jsxDEV)(s.a,{labelname:"\u5e73\u53f0ID",prop:"pos_id",children:Object(h.jsxDEV)(n.a,{onChange:e=>N({pos_id:e}),onClearItem:()=>N({pos_id:""}),countShow:!1,value:p.pos_id,placeholder:"\u8bf7\u8f93\u5165\u5e73\u53f0ID",labelWidth:"0px",maxLength:100,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:Vi,lineNumber:110,columnNumber:15},this)},void 0,!1,{fileName:Vi,lineNumber:109,columnNumber:13},this),Object(h.jsxDEV)(s.a,{labelname:"APP-ID",prop:"app_id",children:Object(h.jsxDEV)(n.a,{onChange:e=>N({app_id:e}),onClearItem:()=>N({app_id:""}),countShow:!1,value:p.app_id,placeholder:"\u8bf7\u8f93\u5165APPID",labelWidth:"0px",maxLength:100,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:Vi,lineNumber:124,columnNumber:15},this)},void 0,!1,{fileName:Vi,lineNumber:123,columnNumber:13},this),null!==(e=p.apiMode)&&void 0!==e&&null!==(t=e.filter((e=>e.key===p.api_mode))[0])&&void 0!==t&&t.store_id?Object(h.jsxDEV)(s.a,{labelname:"\u5e97\u94faID",prop:"store_id",children:Object(h.jsxDEV)(n.a,{onChange:e=>N({store_id:e}),onClearItem:()=>N({store_id:""}),countShow:!1,value:p.store_id,placeholder:"\u8bf7\u8f93\u5165\u5e97\u94faID",labelWidth:"0px",maxLength:100,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:Vi,lineNumber:140,columnNumber:17},this)},void 0,!1,{fileName:Vi,lineNumber:139,columnNumber:15},this):null,null!==(i=p.apiMode)&&void 0!==i&&null!==(m=i.filter((e=>e.key===p.api_mode))[0])&&void 0!==m&&m.secret_key?Object(h.jsxDEV)(s.a,{labelname:"SM4\u79d8\u94a5",prop:"secret_key",children:Object(h.jsxDEV)(n.a,{onChange:e=>N({secret_key:e}),onClearItem:()=>N({secret_key:""}),countShow:!1,value:p.secret_key,placeholder:"\u8bf7\u8f93\u5165SM4\u79d8\u94a5",labelWidth:"0px",height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:Vi,lineNumber:156,columnNumber:17},this)},void 0,!1,{fileName:Vi,lineNumber:155,columnNumber:15},this):null,Object(h.jsxDEV)(s.a,{labelname:"\u79c1\u94a5",prop:"private_key",children:[Object(h.jsxDEV)(Di.a,{type:"textarea",onChange:({target:e})=>N({private_key:e.value}),value:p.private_key,placeholder:"\u8bf7\u8f93\u5165\u79c1\u94a5",readOnly:!0,labelWidth:"0px",width:"520px",alignment:"left"},void 0,!1,{fileName:Vi,lineNumber:171,columnNumber:15},this),Object(h.jsxDEV)("p",{className:"tips",children:"* \u6b64\u5bc6\u94a5\u4e3a\u5185\u90e8\u4fe1\u606f\uff0c\u8bf7\u52ff\u5bf9\u5916\u63d0\u4f9b\u3002"},void 0,!1,{fileName:Vi,lineNumber:181,columnNumber:15},this)]},void 0,!0,{fileName:Vi,lineNumber:170,columnNumber:13},this),Object(h.jsxDEV)(s.a,{labelname:"\u516c\u94a5",prop:"public_key",children:Object(h.jsxDEV)("div",{className:"flex",children:[Object(h.jsxDEV)(Di.a,{type:"textarea",onChange:({target:e})=>N({public_key:e.value}),value:p.public_key,readOnly:!0,placeholder:"\u8bf7\u8f93\u5165\u516c\u94a5",labelWidth:"0px",width:"520px",alignment:"left"},void 0,!1,{fileName:Vi,lineNumber:185,columnNumber:17},this),Object(h.jsxDEV)(Yt.a,{text:p.public_key},void 0,!1,{fileName:Vi,lineNumber:195,columnNumber:17},this)]},void 0,!0,{fileName:Vi,lineNumber:184,columnNumber:15},this)},void 0,!1,{fileName:Vi,lineNumber:183,columnNumber:13},this),Object(h.jsxDEV)(s.a,{labelname:"",required:"",children:Object(h.jsxDEV)(Ei.a,{trigger:"hover",content:"\u5bc6\u94a5\u53d7 \u201c\u5bf9\u63a5\u7c7b\u578b\u201d \u5f71\u54cd",children:Object(h.jsxDEV)(u.a,{type:"primary",onClick:function(){Object(a.K)({api_mode:p.api_mode}).then((({data:e})=>{N({...e})}))},children:"\u91cd\u65b0\u83b7\u53d6\u5bc6\u94a5"},void 0,!1,{fileName:Vi,lineNumber:200,columnNumber:17},this)},void 0,!1,{fileName:Vi,lineNumber:199,columnNumber:15},this)},void 0,!1,{fileName:Vi,lineNumber:198,columnNumber:13},this),Object(h.jsxDEV)(s.a,{labelname:"\u5546\u6237\u516c\u94a5",prop:"merchant_public_key",children:Object(h.jsxDEV)(Di.a,{type:"textarea",onChange:({target:e})=>N({merchant_public_key:e.value}),value:p.merchant_public_key,placeholder:"\u8bf7\u8f93\u5165\u5546\u6237\u516c\u94a5",labelWidth:"0px",width:"520px",alignment:"left"},void 0,!1,{fileName:Vi,lineNumber:206,columnNumber:15},this)},void 0,!1,{fileName:Vi,lineNumber:205,columnNumber:13},this),Object(h.jsxDEV)(s.a,{labelname:"\u5546\u6237\u56de\u8c03\u901a\u77e5\u7f51\u5173\u5730\u5740",prop:"notify_url",children:Object(h.jsxDEV)(n.a,{onChange:e=>N({notify_url:e}),onClearItem:()=>N({notify_url:""}),countShow:!1,value:p.notify_url,placeholder:"\u8bf7\u8f93\u5165\u7f51\u5173\u5730\u5740",labelWidth:"0px",height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:Vi,lineNumber:217,columnNumber:15},this)},void 0,!1,{fileName:Vi,lineNumber:216,columnNumber:13},this),Object(h.jsxDEV)(s.a,{labelname:"\u5546\u6237\u72b6\u6001",children:Object(h.jsxDEV)(Q.a,{onChange:({target:e})=>N({status:e.value}),value:p.status,children:[Object(h.jsxDEV)(Z.a,{value:1,children:"\u6b63\u5e38"},void 0,!1,{fileName:Vi,lineNumber:234,columnNumber:17},this),Object(h.jsxDEV)(Z.a,{value:2,children:"\u7981\u7528"},void 0,!1,{fileName:Vi,lineNumber:235,columnNumber:17},this)]},void 0,!0,{fileName:Vi,lineNumber:230,columnNumber:15},this)},void 0,!1,{fileName:Vi,lineNumber:229,columnNumber:13},this),Object(h.jsxDEV)(s.a,{labelname:"\u5bf9\u63a5\u7c7b\u578b",prop:"api_mode",children:Object(h.jsxDEV)(Q.a,{onChange:({target:e})=>{N({api_mode:e.value})},value:p.api_mode,children:null===(b=p.apiMode)||void 0===b?void 0:b.map((e=>Object(h.jsxDEV)(Z.a,{value:e.key,children:e.label},e.key,!1,{fileName:Vi,lineNumber:246,columnNumber:19},this)))},void 0,!1,{fileName:Vi,lineNumber:239,columnNumber:15},this)},void 0,!1,{fileName:Vi,lineNumber:238,columnNumber:13},this),Object(h.jsxDEV)(s.a,{labelname:"\u8ba2\u9605\u4e8b\u4ef6",prop:"subscribe_event",required:"",children:Object(h.jsxDEV)(j.a.Group,{value:p.subscribe_event,onChange:e=>N({subscribe_event:e}),children:[Object(h.jsxDEV)(j.a,{value:"KEY.USED",children:"key\u7801\u6838\u9500\u901a\u77e5"},void 0,!1,{fileName:Vi,lineNumber:261,columnNumber:17},this),Object(h.jsxDEV)(j.a,{value:"VOUCHER.USED",children:"\u7acb\u51cf\u91d1\u6838\u9500\u901a\u77e5"},void 0,!1,{fileName:Vi,lineNumber:262,columnNumber:17},this)]},void 0,!0,{fileName:Vi,lineNumber:253,columnNumber:15},this)},void 0,!1,{fileName:Vi,lineNumber:252,columnNumber:13},this)]},void 0,!0,{fileName:Vi,lineNumber:94,columnNumber:11},this)},void 0,!1,{fileName:Vi,lineNumber:93,columnNumber:9},this)},void 0,!1,{fileName:Vi,lineNumber:92,columnNumber:7},this),Object(h.jsxDEV)("div",{className:"distributorbtn",children:[Object(h.jsxDEV)(u.a,{type:"primary",onClick:function(){if(v.current.validator()){N({loading:!0});const e=Object(o.a)(p,["reseller_id","loading"]);Object(a.Xc)(p.reseller_id,e).then((({code:e,message:t})=>{if(200===e){c.a.success("\u4fdd\u5b58\u6210\u529f");let e=setTimeout((()=>{window.history.go(-1),N({loading:!1}),clearTimeout(e)}),1e3)}else N({loading:!1}),c.a.success(t)})).catch((({message:e})=>{N({loading:!1}),c.a.success(e)}))}},loading:p.loading,children:"\u63d0\u4ea4"},void 0,!1,{fileName:Vi,lineNumber:269,columnNumber:9},this),Object(h.jsxDEV)(u.a,{type:"normal",onClick:()=>window.history.back(),children:"\u53d6\u6d88"},void 0,!1,{fileName:Vi,lineNumber:272,columnNumber:9},this)]},void 0,!0,{fileName:Vi,lineNumber:268,columnNumber:7},this)]},void 0,!0,{fileName:Vi,lineNumber:91,columnNumber:5},this)}},{path:"/home/exchangecode-list",component:na},{path:"/home/combining-list",component:ca},{path:"/home/exchange-addcommodity",component:Ci},{path:"/home/system/account-list",component:gl},{path:"/home/exchangecode-exchangecodeAdd",component:Ji},{path:"/home/combiningAdd",component:ia},{path:"/home/coupon-list",component:Kt},{path:"/home/coupon-add-edit",component:Tt},{path:"/home/coupon-commodity",component:Bt},{path:"/home/callback-message",component:function(){const e=Object(r.useRef)(),[t,i]=Object(r.useState)({voucher_status_notify:"",voucher_receive_notify:"",loading:!1}),m=sessionStorage.getItem("callBackId"),p=Number(sessionStorage.getItem("callBackType"));return Object(r.useEffect)((()=>{!function(){const e={reseller_id:"",plan_id:"",key_batch_id:""};switch(p){case 1:e.reseller_id=m;break;case 2:e.plan_id=m;break;case 3:e.key_batch_id=m}Object(a.Mc)(e).then((e=>{const{voucher_notify_url:a,voucher_receive_url:s}=e.data;i({...t,voucher_status_notify:a,voucher_receive_notify:s})}))}()}),[]),Object(h.jsxDEV)("div",{className:"maincenter",children:[Object(h.jsxDEV)(d.a,{style:{width:"100%"},title:"\u8bbe\u7f6e\u56de\u8c03\u57df\u540d",children:Object(h.jsxDEV)("div",{className:"adddistributor merchantForm",children:Object(h.jsxDEV)(l.a,{model:t,ref:e,children:[Object(h.jsxDEV)(s.a,{labelname:"\u5238\u72b6\u6001\u901a\u77e5\u5730\u5740",prop:"voucher_status_notify",required:"",children:Object(h.jsxDEV)(n.a,{onChange:e=>i({...t,voucher_status_notify:e}),onClearItem:()=>i({...t,voucher_status_notify:""}),countShow:!1,value:t.voucher_status_notify,placeholder:"\u8bf7\u8f93\u5165\u5238\u72b6\u6001\u901a\u77e5\u5730\u5740",labelWidth:"0px",height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:b,lineNumber:129,columnNumber:15},this)},void 0,!1,{fileName:b,lineNumber:128,columnNumber:13},this),Object(h.jsxDEV)(s.a,{labelname:"\u5238\u9886\u53d6\u901a\u77e5\u5730\u5740",prop:"voucher_receive_notify",required:"",children:Object(h.jsxDEV)(n.a,{onChange:e=>i({...t,voucher_receive_notify:e}),onClearItem:()=>i({...t,voucher_receive_notify:""}),countShow:!1,value:t.voucher_receive_notify,placeholder:"\u8bf7\u8f93\u5165\u5238\u9886\u53d6\u901a\u77e5\u5730\u5740",labelWidth:"0px",height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:b,lineNumber:142,columnNumber:15},this)},void 0,!1,{fileName:b,lineNumber:141,columnNumber:13},this)]},void 0,!0,{fileName:b,lineNumber:127,columnNumber:11},this)},void 0,!1,{fileName:b,lineNumber:126,columnNumber:9},this)},void 0,!1,{fileName:b,lineNumber:125,columnNumber:7},this),Object(h.jsxDEV)("div",{className:"distributorbtn",children:[Object(h.jsxDEV)(u.a,{type:"primary",onClick:function(){const e=/(https?|ftp|file):\/\/[-A-Za-z0-9+&@#\/%?=~_|!:,.;]+[-A-Za-z0-9+&@#\/%=~_|]/,{voucher_status_notify:s,voucher_receive_notify:l}=t;if(s&&!e.test(s))return c.a.warn("\u8bf7\u5165\u5408\u6cd5\u7684\u5238\u72b6\u6001\u901a\u77e5\u5730\u5740\uff01");if(l&&!e.test(l))return c.a.warn("\u8bf7\u5165\u5408\u6cd5\u7684\u5238\u9886\u53d6\u901a\u77e5\u5730\u5740\uff01");i({loading:!0});const n=Object(o.a)(t,["loading"]);switch(p){case 1:n.reseller_id=m,Object(a.Yc)(n).then((({code:e,message:t})=>{if(200===e){c.a.success(t);let e=null;e=setTimeout((()=>{window.history.go(-1),clearTimeout(e)}),1e3)}else c.a.error(t);i({loading:!1})}));break;case 2:n.plan_id=m,Object(a.Wc)(n).then((({code:e,message:t})=>{if(200===e){c.a.success(t);let e=null;e=setTimeout((()=>{window.history.go(-1),clearTimeout(e)}),1e3)}else c.a.error(t);i({loading:!1})}));break;case 3:n.key_batch_id=m,Object(a.Vc)(n).then((({code:e,message:t})=>{if(200===e){c.a.success(t);let e=null;e=setTimeout((()=>{window.history.go(-1),clearTimeout(e)}),1e3)}else c.a.error(t);i({loading:!1})}))}},loading:t.loading,children:"\u63d0\u4ea4"},void 0,!1,{fileName:b,lineNumber:158,columnNumber:9},this),Object(h.jsxDEV)(u.a,{type:"normal",onClick:()=>window.history.back(),children:"\u53d6\u6d88"},void 0,!1,{fileName:b,lineNumber:161,columnNumber:9},this)]},void 0,!0,{fileName:b,lineNumber:157,columnNumber:7},this)]},void 0,!0,{fileName:b,lineNumber:124,columnNumber:5},this)}}],dn=["/home/extension","/home/plan-create","/home/mytempMould","/home/edittemplate"],un=[{id:14,icon:"",title:"\u7cfb\u7edf\u7ba1\u7406",level:1,router:"/system",children:[{id:20,title:"\u8d26\u53f7\u7ba1\u7406",level:5,router:"/home/system/account-list",code:["get-auth-admin"]},{id:23,title:"\u83dc\u5355\u7ba1\u7406",level:5,router:"/home/system/menu",code:["get-auth-menu-tree"]},{id:22,title:"\u5c97\u4f4d\u7ba1\u7406",level:5,router:"/home/system/station",code:["get-auth-departmentjob"]},{id:21,title:"\u89d2\u8272\u7ba1\u7406",level:5,router:"/home/system/role-list",code:["get-auth-adminrole"]},{id:24,title:"\u5b9a\u5236\u5316\u6a21\u677f",level:5,router:"/home/system/customize",code:["post-plan-theme-custom"]},{id:133,title:"\u7cfb\u7edf\u8425\u9500\u6a21\u677f",level:5,router:"/home/system/my-mould",code:["get-plan-theme-system"]},{id:138,title:"\u5b50\u8d26\u53f7\u7ba1\u7406",level:5,router:"/home/system/subaccount-list",children:[{id:140,title:"\u8d26\u53f7\u5217\u8868",level:5,router:"/home/system/subaccount-list",code:["get-auth-admin-sonindex"]}]}]},{id:15,icon:"",title:"\u5206\u9500\u5546\u7ba1\u7406",level:1,router:"/home/distributor-list",children:[{id:65,title:"\u5206\u9500\u5546\u5217\u8868",level:5,router:"/home/distributor-list",code:["get-reseller"]}]},{id:16,icon:"",title:"\u8425\u9500\u8ba1\u5212\u7ba1\u7406",level:1,router:"/home/plan-list",children:[{id:75,title:"\u8425\u9500\u8ba1\u5212\u5217\u8868",level:5,router:"/home/plan-list",code:["get-plan"]},{id:184,title:"Keys\u67e5\u8be2",level:5,router:"/home/plan-keyList",code:["get-keys"]},{id:214,title:"\u4e8c\u7ef4\u7801\u5c0f\u5de5\u5177",level:5,router:"/home/plan-qrcode",code:["qrcodetool"]}]},{id:17,icon:"",title:"\u5151\u6362\u7801\u7ba1\u7406",level:1,router:"/home/exchangecode-list",children:[{id:82,title:"\u5151\u6362\u7801\u5217\u8868",level:5,router:"/home/exchangecode-list",code:["get-codes"]},{id:188,title:"\u7ec4\u5408\u5546\u54c1\u5217\u8868",level:5,router:"/home/combining-list",code:["get-codes"]}]},{id:195,icon:"",title:"\u4f18\u60e0\u5238\u7ba1\u7406",level:1,router:"/home/coupon-list",children:[{id:196,title:"\u4f18\u60e0\u5238\u5217\u8868",level:5,router:"/home/coupon-list",code:["get-coupon"]}]},{id:18,icon:"",title:"\u843d\u5730\u9875\u7ba1\u7406",level:1,router:"/home/exchangepage",children:[{id:118,title:"\u843d\u5730\u9875\u5217\u8868",level:5,router:"/home/exchangepage",code:["get-plan-theme"]},{id:119,title:"\u6211\u7684\u6a21\u677f",level:5,router:"/home/myexchangetemplate",code:["get-plan-theme"]},{id:175,title:"\u6a21\u677f\u4e2d\u5fc3",level:5,router:"/home/mytempMould",code:["get-plan-theme-getthemetype"]}]},{id:19,icon:"",title:"\u8ba2\u5355\u7ba1\u7406",level:1,router:"/home/order-list",children:[{id:98,title:"\u8ba2\u5355\u5217\u8868",level:5,router:"/home/order-list",code:["get-order"]},{id:202,title:"\u5305\u7801\u7ed3\u7b97\u8ba2\u5355\u5217\u8868",level:5,router:"/home/settlementList",code:["get-settlement_order-list"]},{id:215,title:"\u8ba2\u5355\u4e0b\u8f7d\u5217\u8868",level:5,router:"/home/download-orderlist",code:["order_download_list"]}]}]},437:function(e,t,i){},509:function(e,t,i){"use strict";i.r(t),i.d(t,"default",(function(){return N}));var a=i(59),s=i(276),l=i(507),n=i(455);let o=[];function r(e=[]){e.map((e=>{e.children&&e.children.length?r(e.children):e.code&&(Object(l.a)(o,e.code).length?e.auth=!0:e.auth=!1)}))}function m(e,t=[]){return e.map((e=>{if(e.auth){const{id:i,title:a,icon:s,router:l,level:n,children:o}=e;t.push({id:i,title:a,icon:s,router:l,level:n,children:o?m(o):void 0})}})),t}function c(e){o=e;const t=Object(n.a)(s.c);return r(t),function(e){e.map((e=>{e.children.map((e=>{var t;e.children&&(e.auth=!(null===(t=e.children)||void 0===t||!t.filter((e=>e.auth)).length))}))})),e.map((e=>{var t;e.auth=!(null===(t=e.children)||void 0===t||!t.filter((e=>e.auth)).length)}))}(t),m(t)}var d=i(1),u=i(390),h=i(211),b=(i(437),i(10)),p="/Users/zhangds/web/blue-brother/frontend/src/pages/login/login.js";class N extends d.Component{constructor(e){super(e),this.getQuery=e=>(e.match(/([^?=&]+)(=([^&]*))/g)||[]).reduce(((e,t)=>(e[t.slice(0,t.indexOf("="))]=t.slice(t.indexOf("=")+1),e)),{}),window.react=this}componentWillMount(){const{token:e,head:t}=this.getQuery(this.props.location.search);if(e)return sessionStorage.setItem("authorization",e),void this.onSubmit(e,t);this.toUnifiedLogin()}toUnifiedLogin(){setTimeout((()=>{window.location.href=`http://test.user.1688sup.com/#/login?url=${encodeURIComponent(window.location.href)}`}),1500)}getAccountList(){Object(a.Jb)().then((e=>{e?sessionStorage.setItem("isEarlyWarningMan",!0):sessionStorage.setItem("isEarlyWarningMan",!1)}))}onSubmit(e,t){Object(a.pc)({authorization:e,head:t}).then((e=>{Object(a.Tb)(e,((e,t)=>{Object(a.N)().then((e=>{Object(a.Tb)(e,((e,t)=>{sessionStorage.setItem("enmu",JSON.stringify(e))}))})),Object(a.S)().then((({codes:e})=>{let i=c(e);if(u.a.clear(),u.a.success(t),this.getProductList(),this.getAccountList(),sessionStorage.setItem("showflag",!0),i&&i.length>0){var a;sessionStorage.setItem("activeMenu",JSON.stringify(i));let e=i.filter((e=>16==e.id));if(e&&(null===(a=e[0])||void 0===a?void 0:a.children.length)>0)sessionStorage.setItem("linkshowname","\u8425\u9500\u8ba1\u5212\u7ba1\u7406"),sessionStorage.setItem("pathname2","/home/plan-list"),sessionStorage.setItem("menulinklist",JSON.stringify(e[0].children)),setTimeout((()=>{this.props.history.replace("/home/plan-list")}),1e3);else try{i.forEach((e=>{e.children&&e.children.length>0?e.children.forEach((t=>{if(5==t.level)throw sessionStorage.setItem("pathname2",t.router),sessionStorage.setItem("linkshowname",e.title),sessionStorage.setItem("menulinklist",JSON.stringify(e.children)),setTimeout((()=>{this.props.history.replace(t.router)}),1e3),"\u7ec8\u6b62\u5faa\u73af"})):(u.a.clear(),u.a.warn("\u8bf7\u5148\u8054\u7cfb\u7ba1\u7406\u5458\u914d\u7f6e\u6743\u9650\u83dc\u5355"))}))}catch(s){}}else u.a.clear(),u.a.warn("\u8bf7\u5148\u8054\u7cfb\u7ba1\u7406\u5458\u914d\u7f6e\u6743\u9650\u83dc\u5355")}))}),(t=>{-2==e.code||u.a.clear(),u.a.error(e.message)}))})).catch((e=>{}))}getProductList(){Object(a.tb)().then((e=>{Object(a.Tb)(e,((e,t)=>{sessionStorage.setItem("updatetime",Date.now()),sessionStorage.setItem("productsList",JSON.stringify(e.data))}),(e=>{}))}))}render(){return Object(b.jsxDEV)("div",{className:"loginPage",children:Object(b.jsxDEV)(h.a,{className:"loading",icon:"circle",iconText:"\u62fc\u547d\u8df3\u8f6c\u4e2d \xb7\xb7\xb7\xb7",loading:!0,iconSize:30},void 0,!1,{fileName:p,lineNumber:151,columnNumber:9},this)},void 0,!1,{fileName:p,lineNumber:150,columnNumber:7},this)}}},82:function(e,t,i){},87:function(e,t,i){}}]); \ No newline at end of file diff --git a/build/static/js/7.e0d64947.chunk.js.LICENSE.txt b/build/static/js/7.0c8f10fc.chunk.js.LICENSE.txt similarity index 100% rename from build/static/js/7.e0d64947.chunk.js.LICENSE.txt rename to build/static/js/7.0c8f10fc.chunk.js.LICENSE.txt diff --git a/build/static/js/runtime-main.054f9725.js b/build/static/js/runtime-main.6ffd0551.js similarity index 70% rename from build/static/js/runtime-main.054f9725.js rename to build/static/js/runtime-main.6ffd0551.js index 44819208..81b3f7dd 100644 --- a/build/static/js/runtime-main.054f9725.js +++ b/build/static/js/runtime-main.6ffd0551.js @@ -1 +1 @@ -!function(e){function t(t){for(var n,o,c=t[0],i=t[1],s=t[2],f=0,d=[];f