From 7dfcf21e816bca2ced6ebad8b3ee4dac6b500ad6 Mon Sep 17 00:00:00 2001 From: wangsongsole Date: Tue, 2 Apr 2024 10:47:56 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=A6=80=EF=B8=8F=20fix:=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8Dbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build/asset-manifest.json | 12 ++++++------ build/index.html | 2 +- build/static/js/6.86f337b4.chunk.js | 2 -- build/static/js/6.86f337b4.chunk.js.LICENSE.txt | 13 ------------- build/static/js/7.ea574933.chunk.js | 2 -- build/static/js/7.ea574933.chunk.js.LICENSE.txt | 13 ------------- build/static/js/runtime-main.31034e9a.js | 1 - src/components/redPackets/rules.js | 2 +- 8 files changed, 8 insertions(+), 39 deletions(-) delete mode 100644 build/static/js/6.86f337b4.chunk.js delete mode 100644 build/static/js/6.86f337b4.chunk.js.LICENSE.txt delete mode 100644 build/static/js/7.ea574933.chunk.js delete mode 100644 build/static/js/7.ea574933.chunk.js.LICENSE.txt delete mode 100644 build/static/js/runtime-main.31034e9a.js diff --git a/build/asset-manifest.json b/build/asset-manifest.json index 710a2329..c841eb5c 100644 --- a/build/asset-manifest.json +++ b/build/asset-manifest.json @@ -8,11 +8,11 @@ "static/js/3.f87eb271.chunk.js": "/static/js/3.f87eb271.chunk.js", "main.css": "/static/css/main.b0e33980.chunk.css", "main.js": "/static/js/main.d61514ff.chunk.js", - "runtime-main.js": "/static/js/runtime-main.31034e9a.js", + "runtime-main.js": "/static/js/runtime-main.985650b9.js", "static/css/6.2eaec211.chunk.css": "/static/css/6.2eaec211.chunk.css", - "static/js/6.86f337b4.chunk.js": "/static/js/6.86f337b4.chunk.js", + "static/js/6.43f7b3d0.chunk.js": "/static/js/6.43f7b3d0.chunk.js", "static/css/7.8717a2c0.chunk.css": "/static/css/7.8717a2c0.chunk.css", - "static/js/7.ea574933.chunk.js": "/static/js/7.ea574933.chunk.js", + "static/js/7.a7aa0ed0.chunk.js": "/static/js/7.a7aa0ed0.chunk.js", "static/css/8.9a9b6f5c.chunk.css": "/static/css/8.9a9b6f5c.chunk.css", "static/js/8.751f6ff7.chunk.js": "/static/js/8.751f6ff7.chunk.js", "static/css/9.4e156c5f.chunk.css": "/static/css/9.4e156c5f.chunk.css", @@ -26,13 +26,13 @@ "static/js/1.35052058.chunk.js.LICENSE.txt": "/static/js/1.35052058.chunk.js.LICENSE.txt", "static/js/10.184e6eae.chunk.js.LICENSE.txt": "/static/js/10.184e6eae.chunk.js.LICENSE.txt", "static/js/3.f87eb271.chunk.js.LICENSE.txt": "/static/js/3.f87eb271.chunk.js.LICENSE.txt", - "static/js/6.86f337b4.chunk.js.LICENSE.txt": "/static/js/6.86f337b4.chunk.js.LICENSE.txt", - "static/js/7.ea574933.chunk.js.LICENSE.txt": "/static/js/7.ea574933.chunk.js.LICENSE.txt", + "static/js/6.43f7b3d0.chunk.js.LICENSE.txt": "/static/js/6.43f7b3d0.chunk.js.LICENSE.txt", + "static/js/7.a7aa0ed0.chunk.js.LICENSE.txt": "/static/js/7.a7aa0ed0.chunk.js.LICENSE.txt", "static/js/8.751f6ff7.chunk.js.LICENSE.txt": "/static/js/8.751f6ff7.chunk.js.LICENSE.txt", "static/js/9.e20667cb.chunk.js.LICENSE.txt": "/static/js/9.e20667cb.chunk.js.LICENSE.txt" }, "entrypoints": [ - "static/js/runtime-main.31034e9a.js", + "static/js/runtime-main.985650b9.js", "static/css/8.9a9b6f5c.chunk.css", "static/js/8.751f6ff7.chunk.js", "static/css/main.b0e33980.chunk.css", diff --git a/build/index.html b/build/index.html index bf253af7..c652296b 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/6.86f337b4.chunk.js b/build/static/js/6.86f337b4.chunk.js deleted file mode 100644 index bc407c3b..00000000 --- a/build/static/js/6.86f337b4.chunk.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! For license information please see 6.86f337b4.chunk.js.LICENSE.txt */ -(this.webpackJsonpmarketingsystem=this.webpackJsonpmarketingsystem||[]).push([[6],{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){},277:function(e,t,i){"use strict";i.d(t,"a",(function(){return hn})),i.d(t,"b",(function(){return un})),i.d(t,"c",(function(){return bn}));var a=i(59),s=i(62),l=i(63),n=i(61),o=i(491),r=i(1),m=i.n(r),c=i(391),d=i(454),u=i(177),h=i(10),b="D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\pages\\callbackMessage\\index.jsx";var p=i(24),N=i.n(p),j=(i(190),i(196)),v=i(455),f=i(167),g=i(513),x=i(511),_=i(420),y=(i(191),i(512)),O=i(502),D=i(424),E="D:\\project\\\u8425\u9500\u7cfb\u7edf\\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)(f.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)(f.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)(f.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="D:\\project\\\u8425\u9500\u7cfb\u7edf\\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="D:\\project\\\u8425\u9500\u7cfb\u7edf\\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 I="D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\components\\gird\\main.js";class T 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(g.a)(this.state.tableData,(t=>t.checked=e.target.checked&&!t.disabled));this.setState({tableData:this.state.tableData});let t=Object(x.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(x.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(_.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(g.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:I,lineNumber:359,columnNumber:17},this)," "]},void 0,!0,{fileName:I,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:I,lineNumber:378,columnNumber:17},this)," "]},void 0,!0,{fileName:I,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)(f.a,{type:"arrow-down"},void 0,!1,{fileName:I,lineNumber:403,columnNumber:32},this):null," "]},t,!0,{fileName:I,lineNumber:392,columnNumber:17},this))))," "]},void 0,!0,{fileName:I,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:I,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:I,lineNumber:411,columnNumber:13},this)]},void 0,!0,{fileName:I,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:I,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:I,lineNumber:442,columnNumber:25},this)," "]},void 0,!0,{fileName:I,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:I,lineNumber:461,columnNumber:25},this)," "]},void 0,!0,{fileName:I,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:I,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:I,lineNumber:496,columnNumber:25},this))))," "]},s,!0,{fileName:I,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:I,lineNumber:514,columnNumber:15},this):null,Object(h.jsxDEV)("div",{className:"sortbar"},void 0,!1,{fileName:I,lineNumber:528,columnNumber:13},this)]},void 0,!0,{fileName:I,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:I,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:I,lineNumber:552,columnNumber:17},this))))," "]},void 0,!0,{fileName:I,lineNumber:531,columnNumber:11},this)]},void 0,!0,{fileName:I,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:I,lineNumber:570,columnNumber:13},this)},void 0,!1,{fileName:I,lineNumber:569,columnNumber:11},this):null]},void 0,!0,{fileName:I,lineNumber:342,columnNumber:7},this)}}T.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))},M=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},H=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=M(e),t.stock=M(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},q=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(4),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 W(){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 B="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",A="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 z(e){return/^[0-9][0-9]*([.][0-9]{1,2})?$/.test(e)}var R=i(522),K=i(457),Y=i(67),$=i.n(Y),U=i(164),G=i(500),Q=i(199),Z=i(210),X=i(281),ee=i(507);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.Wb)(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(444),Ne="D:\\project\\\u8425\u9500\u7cfb\u7edf\\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="D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\components\\knockGold\\mobileComponent.jsx";const fe=[24,100,100,100,80,24,100,100,100,80,100,100,100,80];var ge=({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:fe,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)},xe=i(99),_e=i.n(xe),ye="D:\\project\\\u8425\u9500\u7cfb\u7edf\\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 _e.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="D:\\project\\\u8425\u9500\u7cfb\u7edf\\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="D:\\project\\\u8425\u9500\u7cfb\u7edf\\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="D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\components\\knockGold\\index.jsx";const Ie=[{key:"1",text:"\u501f\u8bb0\u5361"},{key:"2",text:"\u4fe1\u7528\u5361"}],Te=[{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"],Me=e=>Array.from({length:e},((e,t)=>t));class He extends r.Component{constructor(e){super(e),this.onDisabledRange=(e,t)=>{let i=!1;return"end"==t&&(i=$()(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=$()(e).format("YYYY-MM-DD HH:mm:ss");const l=$()(i.end_time).format("HH:mm:ss");return"start"==t&&(a=l<"23:59:59"?$()(s).isBefore(i.begin_time)||$()(s).subtract(1,"days").isAfter(i.end_time):$()(s).isBefore(i.begin_time)||$()(s).isAfter(i.end_time)),"end"==t&&(a=$()(s).add(1,"days").isBefore(i.begin_time)||$()(s).isAfter(i.end_time)),a},this.onDisabledRange2=(e,t)=>{let i=!1,a=$()(e).format("YYYY-MM-DD HH:mm:ss");const s=$()(this.state.model.entry_time[1]).format("HH:mm:ss");return"start"==t&&(i=s<"23:59:59"?$()(a).isBefore(this.state.model.entry_time[0])||$()(a).subtract(1,"days").isAfter(this.state.model.entry_time[1]):$()(a).isBefore(this.state.model.entry_time[0])||$()(a).isAfter(this.state.model.entry_time[1])),"end"==t&&(i=$()(a).add(1,"days").isBefore(this.state.model.entry_time[0])||$()(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(K.a)(e,a)?{disabledHours:()=>Me(s),disabledMinutes:e=>e===s?Me(l):[],disabledSeconds:(e,t)=>e===s&&t===l?Me(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(K.a)(e,i)?{disabledHours:()=>Me(a),disabledMinutes:e=>e===a?Me(s):[],disabledSeconds:(e,t)=>e===a&&t===s?Me(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:A,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.Mb)().then((e=>Object(a.Wb)(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)(ge,{data:this.state.model},void 0,!1,{fileName:Ce,lineNumber:764,columnNumber:12},this)}onHandleChangeChannel(e){this.onHandleChange(e,"channel"),1==e?this.onHandleChange(A,"instruction"):2==e?this.onHandleChange(B,"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,f,g,x,_,y,O,D,E,V,k,S,w,C,I,T,F,L,M,H,q;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===(f=this.props.data)||void 0===f||!f.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===(g=this.props.data)||void 0===g||!g.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===(x=this.props.data)||void 0===x||!x.id),onChange:({target:e})=>{this.onHandleChange(e.value,"receive_type")},value:this.state.model.receive_type,children:Te.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===(_=this.props.data)||void 0===_||!_.id),value:this.state.model.card_type,onChange:e=>{this.onHandleChange(e,"card_type")},children:Ie.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),this.props.ysf?null: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:1202,columnNumber:21},this),Object(h.jsxDEV)(ne.a,{value:2,children:"\u9690\u85cf"},void 0,!1,{fileName:Ce,lineNumber:1203,columnNumber:21},this)]},void 0,!0,{fileName:Ce,lineNumber:1195,columnNumber:19},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:[$()().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:1212,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:1236,columnNumber:23},this),Object(h.jsxDEV)(ne.a,{value:"2",children:"\u6bcf\u65e5"},void 0,!1,{fileName:Ce,lineNumber:1237,columnNumber:23},this)]},void 0,!0,{fileName:Ce,lineNumber:1226,columnNumber:21},this)]},void 0,!0,{fileName:Ce,lineNumber:1211,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:1249,columnNumber:23},this),Object(h.jsxDEV)(ne.a,{value:"2",children:"\u6bcf\u65e5"},void 0,!1,{fileName:Ce,lineNumber:1250,columnNumber:23},this)]},void 0,!0,{fileName:Ce,lineNumber:1242,columnNumber:21},this)},void 0,!1,{fileName:Ce,lineNumber:1241,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:1271,columnNumber:19},this)},void 0,!1,{fileName:Ce,lineNumber:1259,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:1276,columnNumber:23},this)},void 0,!1,{fileName:Ce,lineNumber:1275,columnNumber:21},this),Object(h.jsxDEV)("span",{className:"effect_dates",children:"\u6709\u6548\u671f"},void 0,!1,{fileName:Ce,lineNumber:1291,columnNumber:21},this),Object(h.jsxDEV)(n.a,{onChange:e=>{this.onHandleChange(e,"effect_date")},onClearItem:()=>{this.onHandleChange("","effect_date")},disabled:!(null===(I=this.props.data)||void 0===I||!I.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:1292,columnNumber:21},this)]},void 0,!0):null]},void 0,!0,{fileName:Ce,lineNumber:1258,columnNumber:15},this),Object(h.jsxDEV)("div",{className:"boxTime",style:{marginTop:"15px"},children:[Object(h.jsxDEV)(Q.a,{disabled:!(null===(T=this.props.data)||void 0===T||!T.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:1327,columnNumber:19},this)},void 0,!1,{fileName:Ce,lineNumber:1314,columnNumber:17},this),"fiexd"===this.state.model.usable_time?Object(h.jsxDEV)(ee.a,{className:"zent-datepicker-plan",showTime:{format:"HH:mm:ss",defaultTime:[$()().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:1330,columnNumber:19},this):null]},void 0,!0,{fileName:Ce,lineNumber:1313,columnNumber:15},this),Object(h.jsxDEV)("div",{className:"boxTime column",children:[Object(h.jsxDEV)(Q.a,{className:"column_label",disabled:!(null===(M=this.props.data)||void 0===M||!M.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:1362,columnNumber:19},this)},void 0,!1,{fileName:Ce,lineNumber:1349,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:1372,columnNumber:25},this)}))},void 0,!1,{fileName:Ce,lineNumber:1366,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:[$()().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:1384,columnNumber:25},this),this.addOrMoveFunction(t,"ruleDate",this.state.model.ruleDate,!1,"\u6700\u591a\u8bbe\u7f6e3\u4e2a\u65f6\u6bb5")]},t,!0,{fileName:Ce,lineNumber:1383,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:1409,columnNumber:21},this)]},void 0,!0):null]},void 0,!0,{fileName:Ce,lineNumber:1348,columnNumber:15},this),Object(h.jsxDEV)("div",{className:"boxTime column",style:{marginTop:"15px"},children:[Object(h.jsxDEV)(Q.a,{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([],"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:1426,columnNumber:19},this)},void 0,!1,{fileName:Ce,lineNumber:1414,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:1430,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:1437,columnNumber:25},this),this.addOrMoveFunction(t,"irregularDate",this.state.model.irregularDate,!0)]},t,!0,{fileName:Ce,lineNumber:1436,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:[$()().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:1461,columnNumber:25},this),this.addOrMoveFunction(t,"irregularTime",this.state.model.irregularTime,!1,"\u6700\u591a\u8bbe\u7f6e3\u4e2a\u65f6\u6bb5")]},t,!0,{fileName:Ce,lineNumber:1460,columnNumber:23},this)}))]},void 0,!0):null]},void 0,!0,{fileName:Ce,lineNumber:1413,columnNumber:15},this)]},void 0,!0,{fileName:Ce,lineNumber:1257,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:1503,columnNumber:19},this))),Object(h.jsxDEV)(j.a,{value:this.state.input_early_per},void 0,!1,{fileName:Ce,lineNumber:1507,columnNumber:17},this)]},void 0,!0,{fileName:Ce,lineNumber:1496,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:1509,columnNumber:15},this)]},void 0,!0,{fileName:Ce,lineNumber:1495,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:1532,columnNumber:17},this)},void 0,!1,{fileName:Ce,lineNumber:1531,columnNumber:15},this),Object(h.jsxDEV)("div",{className:"userSelect",children:Object(h.jsxDEV)("ol",{children:Object(le.a)(this.state.model.early_notifier)&&(null===(q=this.state.model.early_notifier)||void 0===q?void 0:q.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:1553,columnNumber:23},this))))},void 0,!1,{fileName:Ce,lineNumber:1550,columnNumber:17},this)},void 0,!1,{fileName:Ce,lineNumber:1549,columnNumber:15},this)]},void 0,!0,{fileName:Ce,lineNumber:1530,columnNumber:13},this)]},void 0,!0,{fileName:Ce,lineNumber:1494,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:1571,columnNumber:13},this)},void 0,!1,{fileName:Ce,lineNumber:1565,columnNumber:11},this)]},void 0,!0,{fileName:Ce,lineNumber:1493,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:1585,columnNumber:15},this)},void 0,!1,{fileName:Ce,lineNumber:1584,columnNumber:13},this)},void 0,!1,{fileName:Ce,lineNumber:1583,columnNumber:11},this)},void 0,!1,{fileName:Ce,lineNumber:1582,columnNumber:9},this),this.switchComponents()]},void 0,!0,{fileName:Ce,lineNumber:790,columnNumber:7},this)}}var qe=i(470),Pe=i(446),We=(i(87),"D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\components\\redPackets\\timeComponent.jsx"),Be=({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:We,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:We,lineNumber:22,columnNumber:25},this)}))]},t,!0,{fileName:We,lineNumber:17,columnNumber:17},this)))},void 0,!1,{fileName:We,lineNumber:15,columnNumber:13},this)]},void 0,!0,{fileName:We,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:We,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:We,lineNumber:43,columnNumber:25},this)}))]},e.data,!0,{fileName:We,lineNumber:38,columnNumber:17},this)))},void 0,!1,{fileName:We,lineNumber:36,columnNumber:13},this)]},void 0,!0,{fileName:We,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:We,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:We,lineNumber:59,columnNumber:17},this)))},void 0,!1,{fileName:We,lineNumber:57,columnNumber:13},this)]},void 0,!0,{fileName:We,lineNumber:55,columnNumber:11},this);default:return Object(h.jsxDEV)(h.Fragment,{},void 0,!1)}}()},Ae="D:\\project\\\u8425\u9500\u7cfb\u7edf\\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 ze=({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:Ae,lineNumber:32,columnNumber:58},void 0)},void 0,!1,{fileName:Ae,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:Ae,lineNumber:34,columnNumber:13},void 0)},void 0,!1,{fileName:Ae,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:Ae,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:Ae,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:Ae,lineNumber:50,columnNumber:13},void 0)},void 0,!1,{fileName:Ae,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:Ae,lineNumber:52,columnNumber:11},void 0)]},void 0,!0,{fileName:Ae,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:Ae,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:Ae,lineNumber:63,columnNumber:17},void 0)},void 0,!1,{fileName:Ae,lineNumber:62,columnNumber:15},void 0),e.instruction||[1,2,3].includes(e.receive_type)?Object(h.jsxDEV)(h.Fragment,{children:[Object(h.jsxDEV)(Be,{data:e},void 0,!1,{fileName:Ae,lineNumber:72,columnNumber:19},void 0),Object(h.jsxDEV)("h3",{className:"instruction-text",children:"\u4f7f\u7528\u89c4\u5219"},void 0,!1,{fileName:Ae,lineNumber:73,columnNumber:19},void 0),Object(h.jsxDEV)("p",{className:"scroll",dangerouslySetInnerHTML:{__html:e.instruction}},void 0,!1,{fileName:Ae,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:Ae,lineNumber:82,columnNumber:17},void 0)]},void 0,!0,{fileName:Ae,lineNumber:61,columnNumber:13},void 0)},void 0,!1,{fileName:Ae,lineNumber:60,columnNumber:11},void 0)]},void 0,!0,{fileName:Ae,lineNumber:58,columnNumber:9},void 0)]},void 0,!0,{fileName:Ae,lineNumber:30,columnNumber:7},void 0)},void 0,!1,{fileName:Ae,lineNumber:29,columnNumber:5},void 0)},Re=i(503);const Ke=/^\d+(\.\d{1,2})?$/,Ye={type:"regExp",message:"\u6700\u591a\u4fdd\u75592\u4f4d\u5c0f\u6570",reg:Ke};var $e={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\u9762\u989d"},{...Ye}],total_contract_price:[{type:"required",message:"\u8bf7\u8f93\u5165\u5408\u540c\u603b\u4ef7"},{type:"regExp",message:"\u6700\u591a\u4fdd\u75594\u4f4d\u5c0f\u6570",reg:/^\d+(\.\d{1,4})?$/}],all_budget:[{type:"required",message:"\u8bf7\u8f93\u5165\u603b\u9884\u7b97"},{...Ye}],day_budget:[{type:"required",message:"\u8bf7\u8f93\u5165\u5355\u5929\u9884\u7b97"},{...Ye}],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 Ue(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(Re.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,500))return!1;if([1,3].includes(a.channel)&&Ge(a,.01,500))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,500))return!1;if([1,3].includes(a.channel)&&Qe(a,.01,200))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,i){if(e.min_denominationi||!Ke.test(e.max_denomination)||!Ke.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} ~ ${i}\u7684\u9762\u989d\u4e14\u4fdd\u75592\u4f4d\u5c0f\u6570`),!0)}function Qe(e,t,i){if(e.denominationi||!Ke.test(e.denomination))return c.a.error(`\u8bf7\u8f93\u5165${t} ~ ${i}\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="D:\\project\\\u8425\u9500\u7cfb\u7edf\\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 _e.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="D:\\project\\\u8425\u9500\u7cfb\u7edf\\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)(Be,{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="D:\\project\\\u8425\u9500\u7cfb\u7edf\\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)(Be,{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="D:\\project\\\u8425\u9500\u7cfb\u7edf\\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=$()(e).format("YYYY-MM-DD HH:mm:ss");const l=$()(i.end_time).format("HH:mm:ss");return"start"==t&&(a=l<"23:59:59"?$()(s).isBefore(i.begin_time)||$()(s).subtract(1,"days").isAfter(i.end_time):$()(s).isBefore(i.begin_time)||$()(s).isAfter(i.end_time)),"end"==t&&(a=$()(s).add(1,"days").isBefore(i.begin_time)||$()(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(K.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)(qe.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:[$()().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.Mb)().then((e=>Object(a.Wb)(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!==Ue(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===Ue(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"}dynamicPlaceholders(){return 2==this.state.model.channel?"\u8bf7\u8f93\u5165\u9762\u989d0.1 ~ 500\u5143":1==this.state.model.channel?"\u8bf7\u8f93\u5165\u9762\u989d0.01 ~ 200\u5143":3==this.state.model.channel?"\u8bf7\u8f93\u5165\u9762\u989d0.1 ~ 200\u5143":void 0}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:524,columnNumber:14},this):3==this.state.model.channel?Object(h.jsxDEV)(ot,{data:this.state.model},void 0,!1,{fileName:dt,lineNumber:527,columnNumber:14},this):Object(h.jsxDEV)(ze,{data:this.state.model},void 0,!1,{fileName:dt,lineNumber:529,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:$e.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:554,columnNumber:17},this),Object(h.jsxDEV)(ne.a,{value:2,children:"\u5fae\u4fe1"},void 0,!1,{fileName:dt,lineNumber:555,columnNumber:17},this),Object(h.jsxDEV)(ne.a,{value:3,children:"\u4e91\u95ea\u4ed8"},void 0,!1,{fileName:dt,lineNumber:556,columnNumber:17},this)]},void 0,!0,{fileName:dt,lineNumber:539,columnNumber:15},this)},void 0,!1,{fileName:dt,lineNumber:538,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:572,columnNumber:17},this),Object(h.jsxDEV)(ne.a,{value:"2",children:"\u968f\u673a"},void 0,!1,{fileName:dt,lineNumber:573,columnNumber:17},this)]},void 0,!0,{fileName:dt,lineNumber:560,columnNumber:15},this)},void 0,!1,{fileName:dt,lineNumber:559,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:589,columnNumber:19},this),Object(h.jsxDEV)(ne.a,{value:2,children:"\u8d26\u53f7\u9886\u53d6"},void 0,!1,{fileName:dt,lineNumber:590,columnNumber:19},this)]},void 0,!0,{fileName:dt,lineNumber:583,columnNumber:17},this)},"receive_mode",!1,{fileName:dt,lineNumber:577,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:595,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:611,columnNumber:15},this)]},void 0,!0,{fileName:dt,lineNumber:594,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:14,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:dt,lineNumber:619,columnNumber:15},this)},void 0,!1,{fileName:dt,lineNumber:618,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:640,columnNumber:15},this)},void 0,!1,{fileName:dt,lineNumber:635,columnNumber:13},this)]},void 0,!0,{fileName:dt,lineNumber:537,columnNumber:11},this)},void 0,!1,{fileName:dt,lineNumber:536,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:$e.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:661,columnNumber:15},this)},void 0,!1,{fileName:dt,lineNumber:660,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:691,columnNumber:15},this)},void 0,!1,{fileName:dt,lineNumber:690,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:this.dynamicPlaceholders(),disabled:this.state.isEdit,labelWidth:"0px",maxLength:6,height:"36px",unit:"\u5143",countShow:!1,width:"520px",alignment:"left"},void 0,!1,{fileName:dt,lineNumber:722,columnNumber:17},this)},"denomination",!1,{fileName:dt,lineNumber:721,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:745,columnNumber:17},this),Object(h.jsxDEV)("span",{className:"JIan",children:"~"},void 0,!1,{fileName:dt,lineNumber:765,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:766,columnNumber:17},this)]},"random-denomination",!0,{fileName:dt,lineNumber:744,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:799,columnNumber:15},this)},"amount",!1,{fileName:dt,lineNumber:793,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:819,columnNumber:15},this)},void 0,!1,{fileName:dt,lineNumber:818,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:839,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:864,columnNumber:19},this)))},void 0,!1,{fileName:dt,lineNumber:856,columnNumber:15},this)]},void 0,!0,{fileName:dt,lineNumber:838,columnNumber:13},this)]},void 0,!0,{fileName:dt,lineNumber:659,columnNumber:11},this)},void 0,!1,{fileName:dt,lineNumber:658,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:$e.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:876,columnNumber:15},this)},void 0,!1,{fileName:dt,lineNumber:875,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:918,columnNumber:19},this)},void 0,!1,{fileName:dt,lineNumber:895,columnNumber:17},this)},void 0,!1,{fileName:dt,lineNumber:894,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:944,columnNumber:19},this)},void 0,!1,{fileName:dt,lineNumber:922,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:[$()().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:950,columnNumber:25},this),this.ruleDayComponents(t)]},t,!0,{fileName:dt,lineNumber:949,columnNumber:23},this)))},void 0,!1):null]},void 0,!0,{fileName:dt,lineNumber:921,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:989,columnNumber:19},this)},void 0,!1,{fileName:dt,lineNumber:972,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:999,columnNumber:25},this)))},void 0,!1,{fileName:dt,lineNumber:993,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:[$()().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:1006,columnNumber:25},this),this.ruleComponents(t)]},t,!0,{fileName:dt,lineNumber:1005,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:1024,columnNumber:21},this)]},void 0,!0):null]},void 0,!0,{fileName:dt,lineNumber:971,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:1037,columnNumber:19},this)},void 0,!1,{fileName:dt,lineNumber:1029,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:1041,columnNumber:21},this),this.irregularComponents()]},void 0,!0):null]},void 0,!0,{fileName:dt,lineNumber:1028,columnNumber:15},this)]},void 0,!0,{fileName:dt,lineNumber:893,columnNumber:13},this)]},void 0,!0,{fileName:dt,lineNumber:874,columnNumber:11},this)},void 0,!1,{fileName:dt,lineNumber:873,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:$e.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:1064,columnNumber:19},this))),Object(h.jsxDEV)(j.a,{value:this.state.input_early_per},void 0,!1,{fileName:dt,lineNumber:1068,columnNumber:17},this)]},void 0,!0,{fileName:dt,lineNumber:1057,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:1070,columnNumber:15},this)]},void 0,!0,{fileName:dt,lineNumber:1056,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:1093,columnNumber:17},this)},void 0,!1,{fileName:dt,lineNumber:1092,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:1114,columnNumber:25},this))):null},void 0,!1,{fileName:dt,lineNumber:1111,columnNumber:17},this)},void 0,!1,{fileName:dt,lineNumber:1110,columnNumber:15},this)]},void 0,!0,{fileName:dt,lineNumber:1091,columnNumber:13},this)]},void 0,!0,{fileName:dt,lineNumber:1055,columnNumber:11},this)},void 0,!1,{fileName:dt,lineNumber:1054,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:1132,columnNumber:15},this)},void 0,!1,{fileName:dt,lineNumber:1131,columnNumber:13},this)},void 0,!1,{fileName:dt,lineNumber:1130,columnNumber:11},this)},void 0,!1,{fileName:dt,lineNumber:1129,columnNumber:9},this),this.switchComponents()]},void 0,!0,{fileName:dt,lineNumber:534,columnNumber:7},this)}}var bt=i(492),pt=i(523),Nt=(i(347),i(348)),jt=i.n(Nt),vt=i(211),ft=i(489),gt=(i(215),"D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\components\\UseProductPop\\index.jsx");const xt={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 _t=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(R.a)({productOption:[],productDataAll:[],productPic:[],isUpdatePic:!1,loading:!0}),[j,v]=Object(R.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)((()=>{x().then((e=>{if(i){let t=e.find((e=>e.key===Number(i.product_id)));t&&v({cur_product:t})}_()}))}),[]),Object(pt.a)((()=>{x()}),[j.product_type]),Object(r.useEffect)((()=>{N({productPic:j.describe_url})}),[p.isUpdatePic]);let[f,g]=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});g(e)}),[]);const x=()=>(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.vb)(s).then((i=>{Object(a.Wb)(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)}))),_=()=>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.fd)(s).then((e=>{Object(a.Wb)(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:xt,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:gt,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:gt,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:gt,lineNumber:551,columnNumber:15},void 0)]},void 0,!0,{fileName:gt,lineNumber:526,columnNumber:13},void 0)},void 0,!1,{fileName:gt,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:gt,lineNumber:572,columnNumber:17},void 0),Object(h.jsxDEV)(ne.a,{value:1,children:"\u77ed\u4fe1\u4e0b\u53d1"},void 0,!1,{fileName:gt,lineNumber:573,columnNumber:17},void 0)]},void 0,!0,{fileName:gt,lineNumber:565,columnNumber:15},void 0)},void 0,!1,{fileName:gt,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:gt,lineNumber:579,columnNumber:13},void 0)},void 0,!1,{fileName:gt,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:gt,lineNumber:593,columnNumber:15},void 0)},void 0,!1,{fileName:gt,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:gt,lineNumber:610,columnNumber:13},void 0)},void 0,!1,{fileName:gt,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:gt,lineNumber:625,columnNumber:13},void 0)},void 0,!1,{fileName:gt,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:gt,lineNumber:643,columnNumber:13},void 0)},void 0,!1,{fileName:gt,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:gt,lineNumber:661,columnNumber:13},void 0)},void 0,!1,{fileName:gt,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:gt,lineNumber:678,columnNumber:13},void 0)},void 0,!1,{fileName:gt,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:gt,lineNumber:696,columnNumber:13},void 0)},void 0,!1,{fileName:gt,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)(ft.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:gt,lineNumber:713,columnNumber:15},void 0)},void 0,!1,{fileName:gt,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)(ft.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:gt,lineNumber:728,columnNumber:13},void 0)},void 0,!1,{fileName:gt,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)(ft.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:gt,lineNumber:743,columnNumber:13},void 0)},void 0,!1,{fileName:gt,lineNumber:742,columnNumber:11},void 0)]},void 0,!0,{fileName:gt,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:gt,lineNumber:765,columnNumber:25},void 0)},t,!1,{fileName:gt,lineNumber:764,columnNumber:23},void 0)))},void 0,!1,{fileName:gt,lineNumber:761,columnNumber:17},void 0),Object(h.jsxDEV)("div",{className:"swiper-pagination"},void 0,!1,{fileName:gt,lineNumber:770,columnNumber:17},void 0)]},void 0,!0,{fileName:gt,lineNumber:760,columnNumber:15},void 0):null},void 0,!1,{fileName:gt,lineNumber:758,columnNumber:11},void 0),Object(h.jsxDEV)("div",{children:[Object(h.jsxDEV)("div",{className:"mobile_center"},void 0,!1,{fileName:gt,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:gt,lineNumber:510,columnNumber:42},void 0):null},void 0,!1,{fileName:gt,lineNumber:509,columnNumber:9},void 0)]},void 0,!0,{fileName:gt,lineNumber:507,columnNumber:7},void 0)]},void 0,!0,{fileName:gt,lineNumber:757,columnNumber:9},void 0)]},void 0,!0,{fileName:gt,lineNumber:517,columnNumber:7},void 0)},void 0,!1,{fileName:gt,lineNumber:516,columnNumber:5},void 0)})),yt="D:\\project\\\u8425\u9500\u7cfb\u7edf\\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),f=Object(r.useRef)(null),g=Object(r.useRef)(null),x=async()=>{try{let e=!1;if(e="addProduct"===l?await v.current.submit():"addKnockGold"===l?await f.current.submit():await g.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=f.current.state.form_data,a=H(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=g.current.state.form_data,a=q(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=>{x()},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)(He,{className:"addKnockGold",data:n,ref:f,ysf:j&&!0},void 0,!1,{fileName:yt,lineNumber:128,columnNumber:11},this);case"addProduct":return Object(h.jsxDEV)(_t,{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:g,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),"D:\\project\\\u8425\u9500\u7cfb\u7edf\\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(R.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(R.a)({plan_id:"",key_batch_id:"",title:"",date_time:""}),v=Object(r.useRef)(null),[x,_]=Object(R.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]})),I(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]}),_({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),H(e)))),i=e.concat(t);i=Object(g.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(g.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.Rc)({bind_object:"2"}).then((t=>{Object(a.Wb)(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)((()=>{B()}),[x.reduce,x.full]),Object(r.useEffect)((()=>{A()}),[x.reduce,x.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:x.quantity,budget:x.budget,full:x.full,reduce:x.reduce,restrict:x.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:""}),_({full:"",reduce:"",quantity:"",budget:"",restrict:""}),j({plan_id:"",key_batch_id:"",title:""}),p({rank:[],rankOptions:[],tableData:[]})},I=e=>{Object(a.xb)(e).then((e=>{Object(a.Wb)(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}),I(e.key.reseller_id),await(t=e.key.key,new Promise(((e,i)=>{try{Object(a.Qc)({status:"4,5",plan_id:t,bind_object:2}).then((t=>{Object(a.Wb)(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)}})))},M=()=>{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))},q=()=>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");M(),"addProduct"===e?p({product_title:"\u65b0\u5efa\u5546\u54c1",scopePopType:"addProduct",checkedProduct:q(),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){}},W=(e,t)=>Object(h.jsxDEV)(U.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),B=()=>{z(x.reduce)&&z(x.full)?p({isQuantity:!1}):p({isQuantity:!0})},A=()=>{if(z(x.reduce)&&z(x.quantity)){let e=F(Number(x.reduce),Number(x.quantity));_({budget:e})}else _({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:W,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:W,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(K.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=$()(e).format("YYYY-MM-DD HH:mm:ss");const l=$()(i.end_time).format("HH:mm:ss");return"start"==t&&(a=l<"23:59:59"?$()(s).isBefore(i.begin_time)||$()(s).subtract(1,"days").isAfter(i.end_time):$()(s).isBefore(i.begin_time)||$()(s).isAfter(i.end_time)),"end"==t&&(a=$()(s).add(1,"days").isBefore(i.begin_time)||$()(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:x,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=>{_({full:e})},onClearItem:()=>{_({full:""})},value:x.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=>{_({reduce:e})},onClearItem:()=>{_({reduce:""})},value:x.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=>{_({quantity:e})},onClearItem:()=>{_({quantity:""})},disabled:b.isQuantity||b.statusDisabled,value:x.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:x.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=>{_({restrict:e})},onClearItem:()=>{_({restrict:""})},value:x.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)(T,{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(g.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(M(),1===e.type){p({product_title:"\u7f16\u8f91\u5546\u54c1",scopePopType:"addProduct",table_index:t,checkedProduct:q(),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)(f.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.Wb)(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:x.full,reduce:x.reduce,quantity:x.quantity,budget:x.budget,restrict:x.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.Wb)(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="D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\pages\\coupon\\addEdit\\index.jsx";var It=()=>{const e=Object(r.useRef)(null),[t,i]=Object(R.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.Y)(e).then((e=>{Object(a.Wb)(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)},Tt=(i(218),"D:\\project\\\u8425\u9500\u7cfb\u7edf\\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:Tt,lineNumber:69,columnNumber:17},this)},t,!1,{fileName:Tt,lineNumber:62,columnNumber:15},this))),Object(h.jsxDEV)("div",{className:"tabbar-slot",children:this.props.slot},void 0,!1,{fileName:Tt,lineNumber:74,columnNumber:11},this)]},void 0,!0,{fileName:Tt,lineNumber:59,columnNumber:9},this),Object(h.jsxDEV)("div",{className:"tab-body",children:this.props.children},void 0,!1,{fileName:Tt,lineNumber:76,columnNumber:9},this)]},void 0,!0,{fileName:Tt,lineNumber:58,columnNumber:7},this)}}var Lt=i(516),Mt=i(517),Ht=i(471),qt="D:\\project\\\u8425\u9500\u7cfb\u7edf\\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 Wt=()=>{const[e,t]=Object(R.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(Mt.a)(e)||Object(Ht.a)(e))),t})();Object(a.T)(i).then((e=>{Object(a.Wb)(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:qt,lineNumber:219,columnNumber:7},void 0),Object(h.jsxDEV)("div",{className:"query-box",children:[Object(h.jsxDEV)("div",{},void 0,!1,{fileName:qt,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:qt,lineNumber:222,columnNumber:9},void 0)]},void 0,!0,{fileName:qt,lineNumber:220,columnNumber:7},void 0),Object(h.jsxDEV)(T,{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:qt,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:qt,lineNumber:193,columnNumber:16},void 0),onConfirm(){Object(a.E)(i.id).then((i=>{Object(a.Wb)(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:qt,lineNumber:265,columnNumber:17},void 0)},void 0,!1,{fileName:qt,lineNumber:264,columnNumber:15},void 0):void 0},void 0,!1,{fileName:qt,lineNumber:235,columnNumber:7},void 0)]},void 0,!0,{fileName:qt,lineNumber:218,columnNumber:5},void 0)};var Bt={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"}}},At=i(5),Jt=i(496);i(219);const zt=(e,t=3)=>new Promise((async(i,s)=>{let l=null;l=1===t?await Object(a.Vc)(e):2===t?await Object(a.Wc)(e):await Object(a.Xc)(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:"D:\\project\\\u8425\u9500\u7cfb\u7edf\\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 Rt="D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\pages\\coupon\\list\\index.jsx";const Kt=[{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 Yt=()=>{const[e,t]=Object(R.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(At.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(Mt.a)(e)||Object(Ht.a)(e))),a})();Object(a.Z)(i).then((e=>{Object(a.Wb)(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.tb)().then((e=>Object(a.Wb)(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.Wb)(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:Rt,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:Rt,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:Rt,lineNumber:494,columnNumber:13},void 0):Object(h.jsxDEV)("span",{style:{paddingRight:"10px",color:"#d8dbdd"},children:"\u590d\u5236"},void 0,!1,{fileName:Rt,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:Rt,lineNumber:396,columnNumber:16},void 0),onConfirm:()=>{Object(a.C)(i.id).then((i=>{Object(a.Wb)(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:Rt,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:Rt,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{zt(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:Rt,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:Rt,lineNumber:540,columnNumber:13},void 0):Object(h.jsxDEV)("span",{style:{paddingRight:"10px",color:"#d8dbdd"},children:"\u4f5c\u5e9f"},void 0,!1,{fileName:Rt,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:Rt,lineNumber:560,columnNumber:13},void 0):Object(h.jsxDEV)("span",{style:{color:"#d8dbdd"},children:"\u64a4\u9500\u5ba1\u6279"},void 0,!1,{fileName:Rt,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:Rt,lineNumber:579,columnNumber:16},void 0),onConfirm:()=>{Object(a.ed)(l).then((i=>{Object(a.Wb)(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})},f=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($()(i[1]).diff($()(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:Rt,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:f},void 0,!1,{fileName:Rt,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:Rt,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:Rt,lineNumber:649,columnNumber:15},void 0)},void 0,!1,{fileName:Rt,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:Rt,lineNumber:662,columnNumber:15},void 0)},void 0,!1,{fileName:Rt,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:Rt,lineNumber:677,columnNumber:15},void 0)},void 0,!1,{fileName:Rt,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:Rt,lineNumber:692,columnNumber:15},void 0)},void 0,!1,{fileName:Rt,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:Rt,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:Rt,lineNumber:710,columnNumber:15},void 0)]},void 0,!0,{fileName:Rt,lineNumber:706,columnNumber:13},void 0)]},void 0,!0,{fileName:Rt,lineNumber:647,columnNumber:11},void 0)},void 0,!1,{fileName:Rt,lineNumber:646,columnNumber:9},void 0)]},void 0,!0,{fileName:Rt,lineNumber:642,columnNumber:7},void 0),Object(h.jsxDEV)(T,{spliteColor:"#fff",tableData:e.tableData,Column:Kt,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:Rt,lineNumber:742,columnNumber:15},void 0):"dates"===i?Object(h.jsxDEV)("span",{children:[s.begin_time," \u81f3 ",s.end_time]},void 0,!0,{fileName:Rt,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:Rt,lineNumber:425,columnNumber:16},void 0),onConfirm:()=>{Object(a.Bc)(l.id,{operation:1==l.old_status?"2":"1"}).then((i=>{Object(a.Wb)(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:Rt,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:Bt.exchangeStatusBg(parseInt(s.status))}},void 0,!1,{fileName:Rt,lineNumber:770,columnNumber:19},void 0),s.status_text]},void 0,!0,{fileName:Rt,lineNumber:769,columnNumber:17},void 0)},void 0,!1,{fileName:Rt,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.Wb)(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:Rt,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:Rt,lineNumber:793,columnNumber:19},void 0),N(4,s)]},void 0,!0,{fileName:Rt,lineNumber:784,columnNumber:15},void 0):void 0},void 0,!1,{fileName:Rt,lineNumber:721,columnNumber:7},void 0)]},void 0,!0,{fileName:Rt,lineNumber:634,columnNumber:5},void 0)},$t=(i(36),i(220),i(501)),Ut=i(69),Gt=i(472),Qt=i(344),Zt=(i(221),"D:\\project\\\u8425\u9500\u7cfb\u7edf\\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="D:\\project\\\u8425\u9500\u7cfb\u7edf\\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.cb)(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.fd)(i).then((e=>{Object(a.Wb)(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.fb)(e).then((e=>{Object(a.Wb)(e,((e,t)=>{}),(e=>{c.a.error(e)}))})).catch((e=>{}));else{let t={id:JSON.parse(sessionStorage.getItem("dataInfo")).id};Object(a.Rb)(e,t).then((e=>{Object(a.Wb)(e,((e,t)=>{}),(e=>{c.a.error(e)}))})).catch((e=>{}))}}AccountblurFn(e){if(0==this.props.enumer)Object(a.eb)(e).then((e=>{Object(a.Wb)(e,((e,t)=>{}),(e=>{c.a.error(e)}))})).catch((e=>{}));else{let t={id:JSON.parse(sessionStorage.getItem("dataInfo")).id};Object(a.Qb)(e,t).then((e=>{Object(a.Wb)(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.sb)().then((t=>{Object(a.Wb)(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.X)().then((t=>{Object(a.Wb)(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.cb)(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)($t.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),Ut.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),Ut.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),Ut.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),Ut.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),Ut.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),Ut.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),Ut.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),Ut.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),Ut.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),Ut.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),Ut.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),Ut.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)(ft.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)(ft.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="D:\\project\\\u8425\u9500\u7cfb\u7edf\\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.mc)(e).then((e=>{Object(a.Wb)(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.Ic)(t,e).then((e=>{Object(a.Wb)(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(518),oi=(i(225),i(445)),ri="D:\\project\\\u8425\u9500\u7cfb\u7edf\\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)(f.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="D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\components\\filterSelect\\main.js";class di extends m.a.Component{constructor(e){super(e);let t=Object(g.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(x.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(g.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)(f.a,{type:"down",className:"icon-down-arrow"},void 0,!1,{fileName:ci,lineNumber:101,columnNumber:13},this),Object(h.jsxDEV)(f.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="D:\\project\\\u8425\u9500\u7cfb\u7edf\\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(g.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)(f.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)(f.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(487),pi=i(475),Ni=i(494),ji=i(162),vi="D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\pages\\distributor\\list\\modifydispwd.js";function fi(e,t){return e!==t.getSectionValue("password").password?{name:"passwordEqual",message:"\u4e24\u6b21\u586b\u5199\u7684\u5bc6\u7801\u4e0d\u4e00\u81f4"}:null}var gi=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.Jc)(s,t).then((t=>{Object(a.Wb)(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"),fi],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)},xi="D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\pages\\distributor\\list\\list.js";const _i=[{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:"\u7528\u6237\u4f59\u989d\uff08\u5143\uff09",name:"balance",type:"normal",prop:"balance",width:"auto"},{title:"\u6388\u4fe1\uff08\u5143\uff09",name:"extension",type:"normal",prop:"extension",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:xi,lineNumber:181,columnNumber:15},this),"\u5206\u9500\u5546\uff1f"]},void 0,!0,{fileName:xi,lineNumber:180,columnNumber:9},this),onConfirm:()=>{Object(a.w)(t.id).then((e=>{Object(a.Wb)(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.xb)(t.id).then((e=>{Object(a.Wb)(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:xi,lineNumber:301,columnNumber:11},this),"\u5206\u9500\u5546\u72b6\u6001\uff1f"]},void 0,!0,{fileName:xi,lineNumber:299,columnNumber:9},this),onConfirm:()=>{Object(a.Kc)(t.id,{operation:1==t.status?2:1}).then((e=>{Object(a.Wb)(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.yb)(n).then((t=>{Object(a.Wb)(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 dflexajce",children: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:xi,lineNumber:446,columnNumber:13},this)},void 0,!1,{fileName:xi,lineNumber:441,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:xi,lineNumber:461,columnNumber:11},this),Object(h.jsxDEV)("div",{children:[Object(h.jsxDEV)(T,{spliteColor:"#fff",tableData:this.state.resellerList,Column:_i,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:xi,lineNumber:490,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:xi,lineNumber:502,columnNumber:23},this),Object(h.jsxDEV)("a",{className:"grid-link",onClick:e=>{this.callBack(t)},children:"\u8bbe\u7f6e\u56de\u8c03"},void 0,!1,{fileName:xi,lineNumber:510,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)(f.a,{type:"down"},void 0,!1,{fileName:xi,lineNumber:522,columnNumber:32},this)," "]},void 0,!0,{fileName:xi,lineNumber:520,columnNumber:27},this)},void 0,!1,{fileName:xi,lineNumber:519,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:xi,lineNumber:531,columnNumber:29},this),Object(h.jsxDEV)(D.a,{children:"\u66f4\u65b0\u5546\u6237"},"3",!1,{fileName:xi,lineNumber:532,columnNumber:29},this)]},void 0,!0,{fileName:xi,lineNumber:526,columnNumber:27},this)},void 0,!1,{fileName:xi,lineNumber:525,columnNumber:25},this)]},void 0,!0,{fileName:xi,lineNumber:518,columnNumber:23},this)]},void 0,!0,{fileName:xi,lineNumber:501,columnNumber:21},this):void 0},void 0,!1,{fileName:xi,lineNumber:472,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)(gi,{visibleShow:e=>this.setVisible(e),id:this.state.resellid},void 0,!1,{fileName:xi,lineNumber:549,columnNumber:17},this)},void 0,!1,{fileName:xi,lineNumber:548,columnNumber:15},this)},void 0,!1,{fileName:xi,lineNumber:542,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:xi,lineNumber:560,columnNumber:17},this),title:"\u65e5\u5fd7",style:{width:"60%"},children:Object(h.jsxDEV)(T,{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:xi,lineNumber:567,columnNumber:15},this)},void 0,!1,{fileName:xi,lineNumber:556,columnNumber:13},this)]},void 0,!0,{fileName:xi,lineNumber:471,columnNumber:11},this)]},void 0,!0,{fileName:xi,lineNumber:440,columnNumber:9},this)},void 0,!1,{fileName:xi,lineNumber:439,columnNumber:7},this)}}var Di=i(504),Ei=i(289),Vi=(i(232),"D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\pages\\distributor\\merchant\\index.jsx");var ki=i(519),Si=(i(233),"D:\\project\\\u8425\u9500\u7cfb\u7edf\\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.T)(e).then((e=>{Object(a.Wb)(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(4),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.Wb)(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)(T,{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 Ii=i(520),Ti=i(521),Fi=i(479);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]*$"}]},Mi={date_time:[{type:"required",message:"\u8bf7\u9009\u62e9\u751f\u6548\u65f6\u95f4\u6bb5"}]},Hi=[{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 qi(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(4),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 Wi="D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\pages\\exchangecode\\exchangecodeAdd\\index.jsx";const Bi=e=>Array.from({length:e},((e,t)=>t));let Ai="";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(K.a)(e,i)?{disabledHours:()=>Bi(a),disabledMinutes:e=>e===a?Bi(s):[],disabledSeconds:(e,t)=>e===a&&t===s?Bi(l):[]}:{}},this.onDisabledRange=(e,t)=>{let i=!1,a=$()(e).format("YYYY-MM-DD HH:mm:ss");const s=$()(this.state.plan_time[1]).format("HH:mm:ss");return"start"===t&&(i=s<"23:59:59"?$()(a).isBefore(this.state.plan_time[0])||$()(a).subtract(1,"days").isAfter(this.state.plan_time[1]):$()(a).isBefore(this.state.plan_time[0])||$()(a).isAfter(this.state.plan_time[1])),"end"===t&&(i=$()(a).add(1,"days").isBefore(this.state.plan_time[0])||$()(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");Ai=~~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.Rc)({bind_object:"1"}).then((e=>{Object(a.Wb)(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.Qc)({status:"4,5",plan_id:e,bind_object:1}).then((e=>{Object(a.Wb)(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.xb)(e).then((e=>{Object(a.Wb)(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.V)(Ai).then((e=>{Object(a.Wb)(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(g.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=qi(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(Ii.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:Wi,lineNumber:361,columnNumber:16},this),onConfirm:()=>{window.location.replace("#/home/exchangecode-list")},onCancel:this.onCancel,className:"questModal",parentComponent:this})}buildData(){let e=[];Object(g.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(g.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(Ti.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(g.a)(s,(e=>e.only)),l=Object(x.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(g.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=Ai),{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.Ac)(Ai,e).then((e=>{Object(a.Wb)(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.cc)(t,e).then((e=>{Object(a.Wb)(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.gb)(Ai,e).then((e=>{Object(a.Wb)(e,((e,t)=>{e.is_require_approval?this.setState({audit_visible:!0}):this.submitCodeData()}),(e=>{c.a.error(e)}))})):Object(a.R)(s).then((t=>{Object(a.Wb)(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.gb)(Ai,e).then((e=>{Object(a.Wb)(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)(_t,{ref:"product",checkedProduct:a,productData:t,directResellerId:i,productType:s,isSettlement:this.state.isSettlement,settlementData:this.state.settlementData},void 0,!1,{fileName:Wi,lineNumber:744,columnNumber:11},this);case 2:return Object(h.jsxDEV)(He,{ref:"knockGold",data:this.state.productData},void 0,!1,{fileName:Wi,lineNumber:755,columnNumber:16},this);case 3:return Object(h.jsxDEV)(ht,{ref:"redPackets",data:this.state.productData},void 0,!1,{fileName:Wi,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(g.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(g.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,qi(e)})));let a=te(t.concat(i),"only"),s=[],l=[];Object(g.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.ed)(e).then((e=>{Object(a.Wb)(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:Wi,lineNumber:953,columnNumber:19},this)},void 0,!1,{fileName:Wi,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:Wi,lineNumber:971,columnNumber:19},this)},void 0,!1,{fileName:Wi,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:Wi,lineNumber:990,columnNumber:19},this)},void 0,!1,{fileName:Wi,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:Wi,lineNumber:1005,columnNumber:21},this)},void 0,!1,{fileName:Wi,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:Wi,lineNumber:1024,columnNumber:23},this)},void 0,!1,{fileName:Wi,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:Wi,lineNumber:1027,columnNumber:23},this)},void 0,!1,{fileName:Wi,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:Wi,lineNumber:1032,columnNumber:21},this)},void 0,!1,{fileName:Wi,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:Wi,lineNumber:1049,columnNumber:19},this)},void 0,!1,{fileName:Wi,lineNumber:1048,columnNumber:17},this)]},void 0,!0,{fileName:Wi,lineNumber:946,columnNumber:15},this)},void 0,!1,{fileName:Wi,lineNumber:945,columnNumber:13},this)},void 0,!1,{fileName:Wi,lineNumber:944,columnNumber:11},this)},void 0,!1,{fileName:Wi,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:Mi,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=>{Ut.a.emit("change","date_time",e),this.onChangeCombinedDate(e)},width:245,disabledTime:this.onDisabledTime,disabledDate:this.onDisabledRange},void 0,!1,{fileName:Wi,lineNumber:1074,columnNumber:19},this)},void 0,!1,{fileName:Wi,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:Wi,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:Wi,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:Wi,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:Wi,lineNumber:1136,columnNumber:21},this)]},void 0,!0,{fileName:Wi,lineNumber:1096,columnNumber:19},this)},void 0,!1,{fileName:Wi,lineNumber:1095,columnNumber:17},this),Object(h.jsxDEV)(s.a,{labelname:"",prop:"range",id:"range",children:Object(h.jsxDEV)(T,{ref:"tempdata",headBackgroud:"#f9fafc",isShowPageBar:!1,spliteColor:"#fff",tableData:this.state.tempdata,value:this.state.tempdata,Column:Hi,maxheight:200,countbarVisible:!1,isBorder:!0,isSwitch:!1,pageChange:e=>{this.pageChange(e)},checkChange:e=>{let t=[];Object(g.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:Wi,lineNumber:1202,columnNumber:27},this):void 0},void 0,!1,{fileName:Wi,lineNumber:1155,columnNumber:19},this)},void 0,!1,{fileName:Wi,lineNumber:1154,columnNumber:17},this)]},void 0,!0,{fileName:Wi,lineNumber:1067,columnNumber:15},this)},void 0,!1,{fileName:Wi,lineNumber:1066,columnNumber:13},this)},void 0,!1,{fileName:Wi,lineNumber:1065,columnNumber:11},this)},void 0,!1,{fileName:Wi,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:Wi,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:Wi,lineNumber:1233,columnNumber:15},this)]},void 0,!0,{fileName:Wi,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:Wi,lineNumber:1250,columnNumber:13},this)},void 0,!1,{fileName:Wi,lineNumber:1249,columnNumber:11},this)},void 0,!1,{fileName:Wi,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:Wi,lineNumber:1258,columnNumber:13},this),Object(h.jsxDEV)("div",{className:"audit-box",children:[Object(h.jsxDEV)(f.a,{type:"close",className:"audit-close",onClick:e=>{this.setState({audit_visible:!1})}},void 0,!1,{fileName:Wi,lineNumber:1260,columnNumber:15},this),Object(h.jsxDEV)("div",{className:"audit-box-title",children:"\u63d0\u4ea4\u5ba1\u6838"},void 0,!1,{fileName:Wi,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:Wi,lineNumber:1274,columnNumber:19},this),Object(h.jsxDEV)(Z.a,{value:1,children:"\u5bf9\u79c1\u8d26\u6237"},void 0,!1,{fileName:Wi,lineNumber:1275,columnNumber:19},this),Object(h.jsxDEV)(Z.a,{value:2,children:"\u5bf9\u516c\u8d26\u6237"},void 0,!1,{fileName:Wi,lineNumber:1276,columnNumber:19},this)]},void 0,!0,{fileName:Wi,lineNumber:1269,columnNumber:17},this)},void 0,!1,{fileName:Wi,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:Wi,lineNumber:1280,columnNumber:17},this),Object(h.jsxDEV)(u.a,{type:"primary",onClick:e=>{this.onConfirm(e)},children:"\u786e\u5b9a"},void 0,!1,{fileName:Wi,lineNumber:1287,columnNumber:17},this)]},void 0,!0,{fileName:Wi,lineNumber:1279,columnNumber:15},this)]},void 0,!0,{fileName:Wi,lineNumber:1259,columnNumber:13},this)]},void 0,!0,{fileName:Wi,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:Wi,lineNumber:1301,columnNumber:13},this),Object(h.jsxDEV)("div",{className:"audit-box",children:[Object(h.jsxDEV)(f.a,{type:"close",className:"audit-close",onClick:e=>{this.setState({recall_visible:!1})}},void 0,!1,{fileName:Wi,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:Wi,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:Wi,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:Wi,lineNumber:1313,columnNumber:17},this),Object(h.jsxDEV)(u.a,{type:"primary",onClick:e=>{this.onReCall(e)},children:"\u786e\u5b9a"},void 0,!1,{fileName:Wi,lineNumber:1320,columnNumber:17},this)]},void 0,!0,{fileName:Wi,lineNumber:1312,columnNumber:15},this)]},void 0,!0,{fileName:Wi,lineNumber:1302,columnNumber:13},this)]},void 0,!0,{fileName:Wi,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:Wi,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:Wi,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:Wi,lineNumber:1338,columnNumber:31},this)," \u79d2"]},void 0,!0,{fileName:Wi,lineNumber:1337,columnNumber:15},this)]},void 0,!0,{fileName:Wi,lineNumber:1335,columnNumber:13},this)]},void 0,!0,{fileName:Wi,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:Wi,lineNumber:1345,columnNumber:11},this),Object(h.jsxDEV)(u.a,{type:"normal",onClick:()=>this.cancel(),children:"\u53d6\u6d88"},void 0,!1,{fileName:Wi,lineNumber:1348,columnNumber:11},this)]},void 0,!0,{fileName:Wi,lineNumber:1344,columnNumber:9},this)]},void 0,!0,{fileName:Wi,lineNumber:942,columnNumber:7},this)}}i(136);var zi="D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\components\\combining\\wangEditor.jsx";class Ri extends m.a.Component{constructor(e){super(e),this.state={editorHtml:"",count:0}}componentDidMount(){let e=this;const t=new _e.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:zi,lineNumber:54,columnNumber:9},this),Object(h.jsxDEV)("p",{className:"countBox",children:this.state.count+"/"+this.props.limitLength},void 0,!1,{fileName:zi,lineNumber:55,columnNumber:9},this)]},void 0,!0,{fileName:zi,lineNumber:53,columnNumber:7},this)}}i(236);var Ki="D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\components\\combiningMobile\\index.jsx";const Yi=[80,100,100,100,80,24,100,100,100];var $i=({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:Ki,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:Ki,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:Ki,lineNumber:135,columnNumber:21},void 0),Object(h.jsxDEV)("p",{className:"money",children:[Object(h.jsxDEV)("span",{children:"\uffe5"},void 0,!1,{fileName:Ki,lineNumber:137,columnNumber:23},void 0),e.origin.reduce_amount]},void 0,!0,{fileName:Ki,lineNumber:136,columnNumber:21},void 0),Object(h.jsxDEV)("p",{className:"reduce",children:["\u6ee1",e.origin.denomination,"\u53ef\u7528"]},void 0,!0,{fileName:Ki,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:Ki,lineNumber:141,columnNumber:21},void 0)]},e.channel_activity_id,!0,{fileName:Ki,lineNumber:128,columnNumber:19},void 0)))},void 0,!1,{fileName:Ki,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:Ki,lineNumber:147,columnNumber:15},void 0)]},void 0,!0,{fileName:Ki,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:Ki,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:Ki,lineNumber:165,columnNumber:17},void 0)]},void 0,!0,{fileName:Ki,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:Ki,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:Ki,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:Ki,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:Ki,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:Ki,lineNumber:210,columnNumber:15},void 0):null]},void 0,!0,{fileName:Ki,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:Ki,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:Ki,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:Ki,lineNumber:11,columnNumber:9},this):Object(h.jsxDEV)(pe.a.TextBlock,{className:"TextBlock",animate:!0,widths:Yi,rows:8,dashed:!1},void 0,!1,{fileName:Ki,lineNumber:22,columnNumber:9},this)}()},void 0,!1,{fileName:Ki,lineNumber:219,columnNumber:13},void 0),Object(h.jsxDEV)("img",{className:"b-f-img",src:i().footer_bottom,alt:""},void 0,!1,{fileName:Ki,lineNumber:225,columnNumber:13},void 0)]},void 0,!0,{fileName:Ki,lineNumber:217,columnNumber:11},void 0)]},void 0,!0,{fileName:Ki,lineNumber:108,columnNumber:9},void 0)]},void 0,!0,{fileName:Ki,lineNumber:106,columnNumber:7},void 0)},void 0,!1,{fileName:Ki,lineNumber:105,columnNumber:5},void 0)};i(237);const Ui={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="D:\\project\\\u8425\u9500\u7cfb\u7edf\\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(K.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=$()(e).format("YYYY-MM-DD HH:mm:ss");const s=$()(this.state.plan_time[1]).format("HH:mm:ss");return"start"===t&&(i=s<"23:59:59"?$()(a).isBefore(this.state.plan_time[0])||$()(a).subtract(1,"days").isAfter(this.state.plan_time[1]):$()(a).isBefore(this.state.plan_time[0])||$()(a).isAfter(this.state.plan_time[1])),"end"===t&&(i=$()(a).add(1,"days").isBefore(this.state.plan_time[0])||$()(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:A,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.Rc)({bind_object:"1"}).then((e=>{Object(a.Wb)(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.Qc)({status:"4,5",plan_id:e,bind_object:1}).then((e=>{Object(a.Wb)(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.xb)(e).then((e=>{Object(a.Wb)(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.V)(ta).then((e=>{Object(a.Wb)(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}=t.group_info;this.handleChange(l,"instruction"),t.goods=i;let m={code_name:t.title,is_webview:Number(r)||0,timer_show:Number(o.timer_show)||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 c=[];if(i.length>0){let e=[],t=[];m.range=i.map((i=>{null!==i&&void 0!==i&&i.id?(c.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&&(m.code_name=`${t.title}_${t.copy_count+1}`.substring(0,12)),this.getResellerFunction(t.plan.reseller_id);let d=[];Object(g.a)(t.goods,(e=>{let t={};return t.key=e.only,t.text=e.product_name,t.id=e.id,d.push(t),t})),this.setState({codeInfo:m,isload:!0,tempdata:t.goods||[],plan_time:[t.plan.begin_time,t.plan.end_time],rank:c,rankoptions:d})}),(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(Ii.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:312,columnNumber:16},this),onConfirm:()=>{window.location.replace("#/home/exchangecode-list")},onCancel:this.onCancel,className:"questModal",parentComponent:this})}buildData(){let e=[];Object(g.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(g.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(Ti.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(g.a)(s,(e=>e.only)),l=Object(x.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(g.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.Ac)(ta,e).then((e=>{Object(a.Wb)(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.cc)(t,e).then((e=>{Object(a.Wb)(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.Wb)(e,((e,t)=>{e.is_require_approval?this.setState({audit_visible:!0}):this.submitCodeData()}),(e=>{c.a.error(e)}))})):Object(a.R)(s).then((t=>{Object(a.Wb)(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.gb)(ta,e).then((e=>{Object(a.Wb)(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(g.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(g.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.ed)(e).then((e=>{Object(a.Wb)(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.fd)(s).then((e=>{Object(a.Wb)(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=$()(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:Ui,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:947,columnNumber:19},this)},void 0,!1,{fileName:Xi,lineNumber:946,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:965,columnNumber:19},this)},void 0,!1,{fileName:Xi,lineNumber:964,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:984,columnNumber:19},this)},void 0,!1,{fileName:Xi,lineNumber:983,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:998,columnNumber:19},this)},void 0,!1,{fileName:Xi,lineNumber:997,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:1004,columnNumber:23},this)},void 0,!1,{fileName:Xi,lineNumber:1003,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:1007,columnNumber:23},this)},void 0,!1,{fileName:Xi,lineNumber:1006,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:1012,columnNumber:21},this)},void 0,!1,{fileName:Xi,lineNumber:1011,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(A,"instruction"):"2"===e.value?this.handleChange(B,"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:1055,columnNumber:23},this),Object(h.jsxDEV)(ne.a,{value:"2",children:"\u5fae\u4fe1"},void 0,!1,{fileName:Xi,lineNumber:1056,columnNumber:23},this),Object(h.jsxDEV)(ne.a,{value:"3",children:"\u4e91\u95ea\u4ed8"},void 0,!1,{fileName:Xi,lineNumber:1057,columnNumber:23},this)]},void 0,!0,{fileName:Xi,lineNumber:1054,columnNumber:21},this)},void 0,!1,{fileName:Xi,lineNumber:1029,columnNumber:19},this)},void 0,!1,{fileName:Xi,lineNumber:1028,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:1070,columnNumber:23},this),Object(h.jsxDEV)(ne.a,{value:1,children:"\u516c\u4f17\u53f7"},void 0,!1,{fileName:Xi,lineNumber:1071,columnNumber:23},this)]},void 0,!0,{fileName:Xi,lineNumber:1063,columnNumber:21},this)},"is_webview",!1,{fileName:Xi,lineNumber:1062,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:1089,columnNumber:25},this),Object(h.jsxDEV)(ne.a,{value:2,children:"\u8d26\u53f7\u9886\u53d6"},void 0,!1,{fileName:Xi,lineNumber:1090,columnNumber:25},this)]},void 0,!0,{fileName:Xi,lineNumber:1088,columnNumber:23},this)},void 0,!1,{fileName:Xi,lineNumber:1077,columnNumber:21},this)},void 0,!1,{fileName:Xi,lineNumber:1076,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:1102,columnNumber:21},this),Object(h.jsxDEV)(ne.a,{value:2,children:"\u56fe\u7247\u63cf\u8ff0"},void 0,!1,{fileName:Xi,lineNumber:1103,columnNumber:21},this)]},void 0,!0,{fileName:Xi,lineNumber:1096,columnNumber:19},this)},void 0,!1,{fileName:Xi,lineNumber:1095,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)(ft.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:1108,columnNumber:21},this)},void 0,!1,{fileName:Xi,lineNumber:1107,columnNumber:19},this):Object(h.jsxDEV)(s.a,{labelname:"\u4f7f\u7528\u8bf4\u660e",prop:"instruction",id:"instruction",required:!1,children:Object(h.jsxDEV)(Ri,{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:1129,columnNumber:21},this)},void 0,!1,{fileName:Xi,lineNumber:1123,columnNumber:19},this)]},void 0,!0,{fileName:Xi,lineNumber:940,columnNumber:15},this)},void 0,!1,{fileName:Xi,lineNumber:939,columnNumber:13},this),Object(h.jsxDEV)($i,{data:this.state.codeInfo,products:this.state.tempdata},void 0,!1,{fileName:Xi,lineNumber:1143,columnNumber:13},this)]},void 0,!0,{fileName:Xi,lineNumber:938,columnNumber:11},this)},void 0,!1,{fileName:Xi,lineNumber:937,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=>{Ut.a.emit("change","date_time",e),this.onChangeCombinedDate(e)},width:245,disabledTime:this.onDisabledTime,disabledDate:this.onDisabledRange},void 0,!1,{fileName:Xi,lineNumber:1156,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:1183,columnNumber:21},this),Object(h.jsxDEV)(ne.a,{value:2,children:"\u9690\u85cf"},void 0,!1,{fileName:Xi,lineNumber:1184,columnNumber:21},this)]},void 0,!0,{fileName:Xi,lineNumber:1176,columnNumber:19},this)]},void 0,!0,{fileName:Xi,lineNumber:1155,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:[$()().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:1189,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:1212,columnNumber:23},this),Object(h.jsxDEV)(ne.a,{value:2,children:"\u6bcf\u65e5"},void 0,!1,{fileName:Xi,lineNumber:1213,columnNumber:23},this)]},void 0,!0,{fileName:Xi,lineNumber:1202,columnNumber:21},this)]},void 0,!0,{fileName:Xi,lineNumber:1188,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:1224,columnNumber:23},this),Object(h.jsxDEV)(ne.a,{value:2,children:"\u6bcf\u65e5"},void 0,!1,{fileName:Xi,lineNumber:1225,columnNumber:23},this)]},void 0,!0,{fileName:Xi,lineNumber:1218,columnNumber:21},this)},void 0,!1,{fileName:Xi,lineNumber:1217,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:1231,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:1243,columnNumber:23},this):null]},void 0,!0,{fileName:Xi,lineNumber:1230,columnNumber:19},this)},void 0,!1,{fileName:Xi,lineNumber:1229,columnNumber:17},this),Object(h.jsxDEV)(s.a,{labelname:"",prop:"range",id:"range",children:Object(h.jsxDEV)(T,{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(g.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:1301,columnNumber:27},this):void 0},void 0,!1,{fileName:Xi,lineNumber:1257,columnNumber:19},this)},void 0,!1,{fileName:Xi,lineNumber:1256,columnNumber:17},this)]},void 0,!0,{fileName:Xi,lineNumber:1149,columnNumber:15},this)},void 0,!1,{fileName:Xi,lineNumber:1148,columnNumber:13},this)},void 0,!1,{fileName:Xi,lineNumber:1147,columnNumber:11},this)},void 0,!1,{fileName:Xi,lineNumber:1146,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:1324,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:1332,columnNumber:15},this)]},void 0,!0,{fileName:Xi,lineNumber:1323,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)(He,{ref:"knockGold",data:this.state.productData,combining:this.state.codeInfo},void 0,!1,{fileName:Xi,lineNumber:1350,columnNumber:15},this)},void 0,!1,{fileName:Xi,lineNumber:1349,columnNumber:13},this)},void 0,!1,{fileName:Xi,lineNumber:1348,columnNumber:11},this)},void 0,!1,{fileName:Xi,lineNumber:1318,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:1361,columnNumber:13},this),Object(h.jsxDEV)("div",{className:"audit-box",children:[Object(h.jsxDEV)(f.a,{type:"close",className:"audit-close",onClick:e=>{this.setState({audit_visible:!1})}},void 0,!1,{fileName:Xi,lineNumber:1363,columnNumber:15},this),Object(h.jsxDEV)("div",{className:"audit-box-title",children:"\u63d0\u4ea4\u5ba1\u6838"},void 0,!1,{fileName:Xi,lineNumber:1370,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:1377,columnNumber:19},this),Object(h.jsxDEV)(Z.a,{value:1,children:"\u5bf9\u79c1\u8d26\u6237"},void 0,!1,{fileName:Xi,lineNumber:1378,columnNumber:19},this),Object(h.jsxDEV)(Z.a,{value:2,children:"\u5bf9\u516c\u8d26\u6237"},void 0,!1,{fileName:Xi,lineNumber:1379,columnNumber:19},this)]},void 0,!0,{fileName:Xi,lineNumber:1372,columnNumber:17},this)},void 0,!1,{fileName:Xi,lineNumber:1371,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:1383,columnNumber:17},this),Object(h.jsxDEV)(u.a,{type:"primary",onClick:e=>{this.onConfirm(e)},children:"\u786e\u5b9a"},void 0,!1,{fileName:Xi,lineNumber:1390,columnNumber:17},this)]},void 0,!0,{fileName:Xi,lineNumber:1382,columnNumber:15},this)]},void 0,!0,{fileName:Xi,lineNumber:1362,columnNumber:13},this)]},void 0,!0,{fileName:Xi,lineNumber:1360,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:1404,columnNumber:13},this),Object(h.jsxDEV)("div",{className:"audit-box",children:[Object(h.jsxDEV)(f.a,{type:"close",className:"audit-close",onClick:e=>{this.setState({recall_visible:!1})}},void 0,!1,{fileName:Xi,lineNumber:1406,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:1413,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:1414,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:1416,columnNumber:17},this),Object(h.jsxDEV)(u.a,{type:"primary",onClick:e=>{this.onReCall(e)},children:"\u786e\u5b9a"},void 0,!1,{fileName:Xi,lineNumber:1423,columnNumber:17},this)]},void 0,!0,{fileName:Xi,lineNumber:1415,columnNumber:15},this)]},void 0,!0,{fileName:Xi,lineNumber:1405,columnNumber:13},this)]},void 0,!0,{fileName:Xi,lineNumber:1403,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:1437,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:1439,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:1441,columnNumber:31},this)," \u79d2"]},void 0,!0,{fileName:Xi,lineNumber:1440,columnNumber:15},this)]},void 0,!0,{fileName:Xi,lineNumber:1438,columnNumber:13},this)]},void 0,!0,{fileName:Xi,lineNumber:1436,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:1448,columnNumber:11},this),Object(h.jsxDEV)(u.a,{type:"normal",onClick:()=>this.cancel(),children:"\u53d6\u6d88"},void 0,!1,{fileName:Xi,lineNumber:1451,columnNumber:11},this)]},void 0,!0,{fileName:Xi,lineNumber:1447,columnNumber:9},this)]},void 0,!0,{fileName:Xi,lineNumber:936,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="D:\\project\\\u8425\u9500\u7cfb\u7edf\\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.tb)().then((e=>Object(a.Wb)(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.Wb)(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.Wb)(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{zt(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.zc)(t.id,{operation:1==t.old_status?"2":"1"}).then((e=>{Object(a.Wb)(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.W)(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.ed)(i).then((e=>{Object(a.Wb)(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.Wb)(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)(T,{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:Bt.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="D:\\project\\\u8425\u9500\u7cfb\u7edf\\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.tb)().then((e=>Object(a.Wb)(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.Wb)(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.Wb)(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{zt(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.zc)(t.id,{operation:1==t.old_status?"2":"1"}).then((e=>{Object(a.Wb)(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.W)(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.ed)(i).then((e=>{Object(a.Wb)(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.Wb)(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)(T,{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:Bt.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),"D:\\project\\\u8425\u9500\u7cfb\u7edf\\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(Mt.a)(e)||Object(Ht.a)(e)));Object(a.Jb)(t).then((e=>{Object(a.Wb)(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.Wb)(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)(T,{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:Bt.pageStatusBg(parseInt(t.client))}},void 0,!1,{fileName:ua,lineNumber:358,columnNumber:23},this),Bt.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:Bt.pageTypeStatusBg(parseInt(t.page))}},void 0,!1,{fileName:ua,lineNumber:371,columnNumber:23},this),Bt.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="D:\\project\\\u8425\u9500\u7cfb\u7edf\\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 fa 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.Hb)(e).then((e=>{Object(a.Wb)(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.Wb)(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)(T,{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:Bt.pageTypeStatusBg(parseInt(t.page))},children:" "},void 0,!1,{fileName:ja,lineNumber:314,columnNumber:23},this),Bt.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 ga=i(243),xa="D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\pages\\exchangepage\\template\\main.js";let _a={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)[_a[e.target.value]];t||(t={land:{describe:{}},product_list:{list:"",describe:{}},product_detail:{describe:{}}}),this.setState({previewData:t})}componentDidMount(){let e=this;Object(a.Kb)().then((t=>{Object(a.Wb)(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.Gb)({page:1,limit:10}).then((e=>{Object(a.Wb)(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.Gb)(i).then((i=>{Object(a.Wb)(i,(i=>{if(0{}))})).catch((()=>{}))):Object(a.Hb)(i).then((i=>{Object(a.Wb)(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.Gb)(t).then((e=>{Object(a.Wb)(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.Gb)(t).then((e=>{Object(a.Wb)(e,(e=>{this.setState({system_template:e.data})}),(()=>{}))})).catch((()=>{})):Object(a.Hb)(t).then((e=>{Object(a.Wb)(e,(e=>{this.setState({system_template:e.data})}),(()=>{}))})).catch((()=>{}))}onPreview(e){let t;t=1==this.state.sourceIndex?e[_a[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.Wb)(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:xa,lineNumber:341,columnNumber:21},this)},void 0,!1,{fileName:xa,lineNumber:340,columnNumber:19},this)},void 0,!1,{fileName:xa,lineNumber:339,columnNumber:17},this)]},void 0,!0,{fileName:xa,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:xa,lineNumber:345,columnNumber:15},this)]},void 0,!0,{fileName:xa,lineNumber:336,columnNumber:13},this),Object(h.jsxDEV)("div",{className:"scroller-page-banner-mask"},void 0,!1,{fileName:xa,lineNumber:347,columnNumber:13},this)]},void 0,!0,{fileName:xa,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:xa,lineNumber:355,columnNumber:23},this)))},void 0,!1,{fileName:xa,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:xa,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:xa,lineNumber:374,columnNumber:27},this)))},void 0,!1,{fileName:xa,lineNumber:371,columnNumber:21},this)]},void 0,!0,{fileName:xa,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:xa,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:xa,lineNumber:397,columnNumber:29},this)))},void 0,!1,{fileName:xa,lineNumber:394,columnNumber:23},this)]},void 0,!0,{fileName:xa,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:xa,lineNumber:424,columnNumber:31},this)},void 0,!1,{fileName:xa,lineNumber:423,columnNumber:29},this),Object(h.jsxDEV)("div",{className:"xj-template-blank-card-text"},void 0,!1,{fileName:xa,lineNumber:426,columnNumber:29},this)]},void 0,!0,{fileName:xa,lineNumber:419,columnNumber:27},this)},void 0,!1,{fileName:xa,lineNumber:418,columnNumber:25},this)},void 0,!1,{fileName:xa,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:xa,lineNumber:434,columnNumber:31},this)},void 0,!1,{fileName:xa,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:xa,lineNumber:444,columnNumber:33},this)},void 0,!1,{fileName:xa,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:xa,lineNumber:460,columnNumber:37},this)},void 0,!1,{fileName:xa,lineNumber:452,columnNumber:35},this)," ","\u9884\u89c8"]},void 0,!0,{fileName:xa,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:xa,lineNumber:477,columnNumber:37},this)},void 0,!1,{fileName:xa,lineNumber:469,columnNumber:35},this)," ","\u4f7f\u7528"]},void 0,!0,{fileName:xa,lineNumber:464,columnNumber:33},this)]},void 0,!0,{fileName:xa,lineNumber:446,columnNumber:31},this)]},void 0,!0,{fileName:xa,lineNumber:436,columnNumber:29},this)]},t,!0,{fileName:xa,lineNumber:432,columnNumber:27},this)))]},void 0,!0,{fileName:xa,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:xa,lineNumber:494,columnNumber:25},this)},void 0,!1,{fileName:xa,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:xa,lineNumber:506,columnNumber:21},this)]},void 0,!0,{fileName:xa,lineNumber:415,columnNumber:19},this)]},void 0,!0,{fileName:xa,lineNumber:368,columnNumber:17},this)]},void 0,!0,{fileName:xa,lineNumber:351,columnNumber:15},this)},void 0,!1,{fileName:xa,lineNumber:350,columnNumber:13},this)},void 0,!1,{fileName:xa,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:xa,lineNumber:522,columnNumber:15},this),Object(h.jsxDEV)("div",{className:"preview-box",children:[Object(h.jsxDEV)(f.a,{type:"close",className:"preview-top-close",onClick:e=>{this.onClose(e)}},void 0,!1,{fileName:xa,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)(ga.a,{data:this.state.previewData,pageType:this.state.showType,fontSize:this.state.fontSize,ref:"preview",step:this.state.pageStep},void 0,!1,{fileName:xa,lineNumber:535,columnNumber:25},this)},void 0,!1,{fileName:xa,lineNumber:534,columnNumber:23},this)},void 0,!1,{fileName:xa,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:xa,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:xa,lineNumber:552,columnNumber:33},this)]},void 0,!0,{fileName:xa,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:xa,lineNumber:558,columnNumber:32},this)]},void 0,!0,{fileName:xa,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:xa,lineNumber:564,columnNumber:32},this)]},void 0,!0,{fileName:xa,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:xa,lineNumber:570,columnNumber:33},this)]},void 0,!0,{fileName:xa,lineNumber:566,columnNumber:27},this)]},void 0,!0,{fileName:xa,lineNumber:547,columnNumber:25},this),Object(h.jsxDEV)("p",{children:"\u843d\u5730\u9875\u7c7b\u578b:"},void 0,!1,{fileName:xa,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:xa,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:xa,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:xa,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:xa,lineNumber:589,columnNumber:27},this)]},void 0,!0,{fileName:xa,lineNumber:574,columnNumber:25},this)]},void 0,!0,{fileName:xa,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:xa,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:xa,lineNumber:602,columnNumber:27},this),Object(h.jsxDEV)(ne.a,{value:2,children:"\u5217\u8868\u9875"},void 0,!1,{fileName:xa,lineNumber:603,columnNumber:27},this),Object(h.jsxDEV)(ne.a,{value:3,children:"\u8be6\u60c5\u9875"},void 0,!1,{fileName:xa,lineNumber:604,columnNumber:27},this)]},void 0,!0,{fileName:xa,lineNumber:596,columnNumber:25},this)]},void 0,!0,{fileName:xa,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:xa,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:xa,lineNumber:616,columnNumber:29},this),Object(h.jsxDEV)(ne.a,{value:4,children:"\u7acb\u51cf\u91d1"},void 0,!1,{fileName:xa,lineNumber:617,columnNumber:29},this),Object(h.jsxDEV)(ne.a,{value:5,children:"\u7ea2\u5305"},void 0,!1,{fileName:xa,lineNumber:618,columnNumber:29},this)]},void 0,!0,{fileName:xa,lineNumber:610,columnNumber:27},this)]},void 0,!0,{fileName:xa,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:xa,lineNumber:623,columnNumber:25},this)},void 0,!1,{fileName:xa,lineNumber:622,columnNumber:23},this)]},void 0,!0,{fileName:xa,lineNumber:544,columnNumber:21},this)]},void 0,!0,{fileName:xa,lineNumber:532,columnNumber:19},this)},void 0,!1,{fileName:xa,lineNumber:531,columnNumber:17},this)]},void 0,!0,{fileName:xa,lineNumber:523,columnNumber:15},this)]},void 0,!0,{fileName:xa,lineNumber:521,columnNumber:13},this):null]},void 0,!0,{fileName:xa,lineNumber:334,columnNumber:9},this)},void 0,!1,{fileName:xa,lineNumber:333,columnNumber:7},this)}}var Oa=i(495),Da="D:\\project\\\u8425\u9500\u7cfb\u7edf\\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.Wb)(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.J)(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.Pb)(s).then((e=>{Object(a.Wb)(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)(T,{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(508);i(245);const Ia=[{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"}],Ta=[{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 Ma="D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\pages\\order\\list\\list.js",Ha=i(67);let qa=Ha(wa()).format("YYYY-MM-DD"),Pa=Ha(Sa()).format("YYYY-MM-DD");class Wa 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.tb)().then((e=>Object(a.Wb)(e,((e,t)=>{const i=e.map((e=>({key:e.id,text:e.title})));this.setState({planOptions:i})}),(e=>{})))),Object(a.wb)().then((e=>{Object(a.Wb)(e,((e,t)=>{const i=e.map((e=>({key:e.id,text:e.name})));this.setState({resellerOptions:i})}))}))}getProducts(e){Object(a.Vb)(e).then((e=>Object(a.Wb)(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.Xb)(this.state.orderNumber,{refund_account:this.state.model.account}).then((e=>{Object(a.Wb)(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.Tc)(e).then((e=>{Object(a.Wb)(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:Ma,lineNumber:246,columnNumber:16},this),onConfirm(){Object(a.ob)(u).then((e=>{Object(a.Wb)(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:Ma,lineNumber:282,columnNumber:15},this),"\uff1f"]},void 0,!0,{fileName:Ma,lineNumber:281,columnNumber:9},this),onConfirm(){Object(a.Fc)(t.order_number).then((e=>{Object(a.Wb)(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:Ma,lineNumber:317,columnNumber:14},this),"\u8ba2\u5355\u6539\u4e3a\u6210\u529f\u72b6\u6001\uff1f"]},void 0,!0,{fileName:Ma,lineNumber:316,columnNumber:9},this),onConfirm(){Object(a.Gc)(t.order_number).then((e=>{Object(a.Wb)(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.pb)(N).then((e=>{Object(a.Wb)(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",qa+" 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.Uc)({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.Sc)({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.gd)({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.ec)({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:Ma,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:Ma,lineNumber:668,columnNumber:17},this)},void 0,!1,{fileName:Ma,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:Ma,lineNumber:687,columnNumber:17},this)},void 0,!1,{fileName:Ma,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:Ma,lineNumber:700,columnNumber:17},this)},void 0,!1,{fileName:Ma,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:Ta,clearable:!0,placeholder:"\u8bf7\u9009\u62e9\u67e5\u8be2\u5206\u7c7b"},void 0,!1,{fileName:Ma,lineNumber:713,columnNumber:17},this)},void 0,!1,{fileName:Ma,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:Ma,lineNumber:729,columnNumber:19},this)},void 0,!1,{fileName:Ma,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:Ma,lineNumber:747,columnNumber:19},this),Object(h.jsxDEV)(u.a,{onClick:()=>this.reset(),children:"\u91cd\u7f6e"},void 0,!1,{fileName:Ma,lineNumber:757,columnNumber:19},this)]},void 0,!0,{fileName:Ma,lineNumber:746,columnNumber:17},this)},void 0,!1,{fileName:Ma,lineNumber:745,columnNumber:15},this)]},void 0,!0,{fileName:Ma,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:Ma,lineNumber:761,columnNumber:13},this)]},void 0,!0,{fileName:Ma,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:Ma,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:Ma,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:Ma,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:Ma,lineNumber:784,columnNumber:15},this):null,Object(h.jsxDEV)(T,{spliteColor:"#fff",tableData:this.state.orderList,Column:Ia,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:Ma,lineNumber:825,columnNumber:21},this):"account"==e?Object(h.jsxDEV)("span",{children:t.account||"-"},void 0,!1,{fileName:Ma,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:Bt.orderStatusBg(t)}},void 0,!1,{fileName:Ma,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:Ma,lineNumber:837,columnNumber:23},this)},void 0,!1,{fileName:Ma,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:Bt.orderPayStatusBg(1===t.pay_status?"":parseInt(t.pay_status))}},void 0,!1,{fileName:Ma,lineNumber:856,columnNumber:25},this),t.pay_status_text]},void 0,!0,{fileName:Ma,lineNumber:855,columnNumber:23},this)},void 0,!1,{fileName:Ma,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:Ma,lineNumber:871,columnNumber:21},this):"order_type"==e?Object(h.jsxDEV)("span",{children:"\u865a\u62df"},void 0,!1,{fileName:Ma,lineNumber:875,columnNumber:26},this):"receive_error"==e?Object(h.jsxDEV)("span",{children:t.orderVoucher?t.orderVoucher.receive_error:"-"},void 0,!1,{fileName:Ma,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:Bt.orderVoucherStatusBg(parseInt(t.orderVoucher?t.orderVoucher.status:0))}},void 0,!1,{fileName:Ma,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:Ma,lineNumber:885,columnNumber:23},this)},void 0,!1,{fileName:Ma,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:Ma,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:Ma,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:Ma,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:Ma,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:Ma,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:Ma,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:Ma,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:Ma,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:Ma,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)(f.a,{type:"down"},void 0,!1,{fileName:Ma,lineNumber:1001,columnNumber:32},this)]},void 0,!0,{fileName:Ma,lineNumber:1e3,columnNumber:27},this)},void 0,!1,{fileName:Ma,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:Ma,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:Ma,lineNumber:1015,columnNumber:33},this)]},void 0,!0,{fileName:Ma,lineNumber:1005,columnNumber:27},this)},void 0,!1,{fileName:Ma,lineNumber:1004,columnNumber:25},this)]},void 0,!0,{fileName:Ma,lineNumber:994,columnNumber:23},this)]},void 0,!0,{fileName:Ma,lineNumber:933,columnNumber:21},this):void 0;var i,a,s}},void 0,!1,{fileName:Ma,lineNumber:802,columnNumber:13},this)]},void 0,!0,{fileName:Ma,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:Ma,lineNumber:1035,columnNumber:17},this)},void 0,!1,{fileName:Ma,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:Ma,lineNumber:1058,columnNumber:17},this)},void 0,!1,{fileName:Ma,lineNumber:1057,columnNumber:15},this)]},void 0,!0,{fileName:Ma,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:Ma,lineNumber:1074,columnNumber:15},this),Object(h.jsxDEV)(u.a,{type:"primary",onClick:()=>this.handlerRefundFunction(),htmlType:"submit",children:"\u63d0\u4ea4"},void 0,!1,{fileName:Ma,lineNumber:1075,columnNumber:15},this)]},void 0,!0,{fileName:Ma,lineNumber:1073,columnNumber:13},this)]},void 0,!0,{fileName:Ma,lineNumber:1027,columnNumber:11},this)]},void 0,!0,{fileName:Ma,lineNumber:664,columnNumber:9},this)},void 0,!1,{fileName:Ma,lineNumber:663,columnNumber:7},this)}}var Ba=i(156),Aa=i.n(Ba),Ja=(i(246),"D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\pages\\order\\more\\more.js");const za=[{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 Ra 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.qb)(s,l).then((t=>{Object(a.Wb)(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.nb)(e).then((e=>{Object(a.Wb)(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.getDetails(i),this.setState({tableHeight:window.innerHeight-430,orderNo:i})}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:165,columnNumber:17},this),Object(h.jsxDEV)("font",{children:s.order_number},void 0,!1,{fileName:Ja,lineNumber:166,columnNumber:17},this)]},void 0,!0,{fileName:Ja,lineNumber:164,columnNumber:15},this),Object(h.jsxDEV)("li",{children:[Object(h.jsxDEV)("span",{children:"\u521b\u5efa\u65f6\u95f4"},void 0,!1,{fileName:Ja,lineNumber:169,columnNumber:17},this),Object(h.jsxDEV)("font",{children:s.create_time},void 0,!1,{fileName:Ja,lineNumber:170,columnNumber:17},this)]},void 0,!0,{fileName:Ja,lineNumber:168,columnNumber:15},this),Object(h.jsxDEV)("li",{children:[Object(h.jsxDEV)("span",{children:"\u5546\u54c1\u540d\u79f0"},void 0,!1,{fileName:Ja,lineNumber:173,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:174,columnNumber:17},this)]},void 0,!0,{fileName:Ja,lineNumber:172,columnNumber:15},this),Object(h.jsxDEV)("li",{children:[Object(h.jsxDEV)("span",{children:"\u6620\u5c04\u5546\u54c1"},void 0,!1,{fileName:Ja,lineNumber:177,columnNumber:17},this),Object(h.jsxDEV)("font",{children:s.map_product_name||"-"},void 0,!1,{fileName:Ja,lineNumber:178,columnNumber:17},this)]},void 0,!0,{fileName:Ja,lineNumber:176,columnNumber:15},this),Object(h.jsxDEV)("li",{children:[Object(h.jsxDEV)("span",{children:"\u5b98\u65b9\u4ef7"},void 0,!1,{fileName:Ja,lineNumber:181,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:182,columnNumber:17},this)]},void 0,!0,{fileName:Ja,lineNumber:180,columnNumber:15},this),Object(h.jsxDEV)("li",{children:[Object(h.jsxDEV)("span",{children:"\u6210\u672c\u4ef7"},void 0,!1,{fileName:Ja,lineNumber:185,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:186,columnNumber:17},this)]},void 0,!0,{fileName:Ja,lineNumber:184,columnNumber:15},this),Object(h.jsxDEV)("li",{children:[Object(h.jsxDEV)("span",{children:"\u5408\u540c\u4ef7"},void 0,!1,{fileName:Ja,lineNumber:189,columnNumber:17},this),Object(h.jsxDEV)("font",{children:s.contract_price},void 0,!1,{fileName:Ja,lineNumber:190,columnNumber:17},this)]},void 0,!0,{fileName:Ja,lineNumber:188,columnNumber:15},this),Object(h.jsxDEV)("li",{children:[Object(h.jsxDEV)("span",{children:"\u8d2d\u4e70\u6570\u91cf"},void 0,!1,{fileName:Ja,lineNumber:193,columnNumber:17},this),Object(h.jsxDEV)("font",{children:s.num},void 0,!1,{fileName:Ja,lineNumber:194,columnNumber:17},this)]},void 0,!0,{fileName:Ja,lineNumber:192,columnNumber:15},this),Object(h.jsxDEV)("li",{children:[Object(h.jsxDEV)("span",{children:"\u603b\u8ba1"},void 0,!1,{fileName:Ja,lineNumber:197,columnNumber:17},this),Object(h.jsxDEV)("font",{children:(s.num*s.contract_price).toFixed(4)},void 0,!1,{fileName:Ja,lineNumber:198,columnNumber:17},this)]},void 0,!0,{fileName:Ja,lineNumber:196,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:202,columnNumber:19},this),Object(h.jsxDEV)("font",{children:s.account},void 0,!1,{fileName:Ja,lineNumber:203,columnNumber:19},this)]},void 0,!0,{fileName:Ja,lineNumber:201,columnNumber:17},this):null,Object(h.jsxDEV)("li",{children:[Object(h.jsxDEV)("span",{children:"\u72b6\u6001"},void 0,!1,{fileName:Ja,lineNumber:208,columnNumber:17},this),Object(h.jsxDEV)("font",{children:s.status_text},void 0,!1,{fileName:Ja,lineNumber:209,columnNumber:17},this)]},void 0,!0,{fileName:Ja,lineNumber:207,columnNumber:15},this)]},void 0,!0,{fileName:Ja,lineNumber:163,columnNumber:13},this):Object(h.jsxDEV)("div",{className:"main-body",children:Object(h.jsxDEV)(T,{spliteColor:"#fff",tableData:this.state.orderDetailLog_data,Column:za,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:$.a.unix(t.time).format("YYYY-MM-DD HH:mm:ss")},void 0,!1,{fileName:Ja,lineNumber:232,columnNumber:28},this):"index"==e?Object(h.jsxDEV)("span",{children:i+1},void 0,!1,{fileName:Ja,lineNumber:235,columnNumber:28},this):"opearo"==e?Object(h.jsxDEV)("div",{children:t.data?Object(h.jsxDEV)(Aa.a,{collapsed:!0,name:!1,src:t.data,displayDataTypes:!1},void 0,!1,{fileName:Ja,lineNumber:241,columnNumber:27},this):Object(h.jsxDEV)("span",{children:"-"},void 0,!1,{fileName:Ja,lineNumber:248,columnNumber:27},this)},void 0,!1,{fileName:Ja,lineNumber:239,columnNumber:23},this):void 0},void 0,!1,{fileName:Ja,lineNumber:214,columnNumber:15},this)},void 0,!1,{fileName:Ja,lineNumber:213,columnNumber:13},this)},void 0,!1,{fileName:Ja,lineNumber:161,columnNumber:9},this)},void 0,!1,{fileName:Ja,lineNumber:160,columnNumber:7},this)}}i(247);const Ka=[{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 Ya=i(447),$a="D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\pages\\order\\settlementList\\list.jsx",Ua=i(67);let Ga=Ua(wa()).format("YYYY-MM-DD"),Qa=Ua(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.tb)().then((e=>Object(a.Wb)(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.wb)().then((e=>{Object(a.Wb)(e,((e,t)=>{const i=e.map((e=>({key:e.id,text:e.name})));this.setState({resellerOptions:i})}))})),Object(a.Eb)().then((e=>Object(a.Wb)(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.Qc)({status:"4,5",plan_id:e,bind_object:1}).then((e=>{Object(a.Wb)(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.Cb)(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.Db)(Object(Ya.a)(u)).then((e=>{Object(a.Wb)(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:$a,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:$a,lineNumber:311,columnNumber:17},this)},void 0,!1,{fileName:$a,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:$a,lineNumber:331,columnNumber:17},this)},void 0,!1,{fileName:$a,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:$a,lineNumber:344,columnNumber:17},this)},void 0,!1,{fileName:$a,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:$a,lineNumber:357,columnNumber:17},this)},void 0,!1,{fileName:$a,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:$a,lineNumber:370,columnNumber:17},this)},void 0,!1,{fileName:$a,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:$a,lineNumber:390,columnNumber:17},this)},void 0,!1,{fileName:$a,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:$a,lineNumber:407,columnNumber:19},this),Object(h.jsxDEV)(u.a,{onClick:()=>this.reset(),children:"\u91cd\u7f6e"},void 0,!1,{fileName:$a,lineNumber:417,columnNumber:19},this)]},void 0,!0,{fileName:$a,lineNumber:406,columnNumber:17},this)},void 0,!1,{fileName:$a,lineNumber:405,columnNumber:15},this)]},void 0,!0,{fileName:$a,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:$a,lineNumber:421,columnNumber:13},this)]},void 0,!0,{fileName:$a,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:$a,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:$a,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:$a,lineNumber:432,columnNumber:15},this):null,Object(h.jsxDEV)(T,{spliteColor:"#fff",tableData:this.state.orderList,Column:Ka,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:$a,lineNumber:471,columnNumber:21},this)}},void 0,!1,{fileName:$a,lineNumber:448,columnNumber:13},this)]},void 0,!0,{fileName:$a,lineNumber:430,columnNumber:11},this)]},void 0,!0,{fileName:$a,lineNumber:307,columnNumber:9},this)},void 0,!1,{fileName:$a,lineNumber:306,columnNumber:7},this)}}i(248);var Xa="D:\\project\\\u8425\u9500\u7cfb\u7edf\\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.rb)(e).then((e=>{Object(a.Wb)(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)(T,{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:$.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="D:\\project\\\u8425\u9500\u7cfb\u7edf\\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=$()(e.getTime()).add(1,"days")<=(new Date).getTime()),"start"==t&&(i=e.getTime()<=(new Date).getTime()),i},this.phoneChange=e=>{this.setState({phone:e.target.value})},this.emailChange=e=>{this.setState({email:e.target.value})},this.state={model:{title:"",type:2,reseller:null,return_id:"1",date_time:["",""],stock_id:null,settlement_type:null},settlementOptions:[],lodshow:!1,loading:!1,isSettlement:2,directList:[],limit:15,page:1,keyword:"",showEmailPop:!1,email:"",phone:"",reseller_id:0,direct_reseller_name:""}}componentDidMount(e){let t={limit:this.state.limit,page:this.state.page};this.getDirect(t),Object(a.Eb)().then((e=>{Object(a.Wb)(e,((e,t)=>{let i=Object(g.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)}))}))}componentDidUpdate(e){this.props.direct_reseller_name!==e.direct_reseller_name&&this.setState({model:{...this.state.model,reseller:{text:this.props.direct_reseller_name!==this.state.model.reseller.text?this.props.direct_reseller_name+`\uff08${this.state.model.reseller.text}\uff09`:this.state.model.reseller.text}}})}setZentOpt(e){return e.map((e=>({key:e.id,text:e.reseller_name&&e.reseller_name!==e.name?e.name+`\uff08${e.reseller_name}\uff09`:e.name,direct_reseller_id:e.id,reseller_id:e.reseller_id,disabled:1!==e.status})))}getDirect(e){Object(a.cb)(e).then((e=>{Object(a.Wb)(e,((e,t)=>{let i=this.state.directList;i=i.concat(this.setZentOpt(e.data)),this.setState({directList:i})}),(e=>{c.a.error(e)}))}))}onResellerChange(e){Object(a.zb)(e.key).then((t=>{Object(a.Wb)(t,((i,a)=>{const{id:s,name:l,contact_email:n,contact_phone:o}=t.data;e.key=s,e._text=l,this.props.onGetDirectResellerId(e);let r=this.state.model;r.reseller=e,this.setState({model:r,phone:o,email:n}),o&&n||this.setState({showEmailPop:!0,reseller_id:s})}),(e=>{c.a.error(e)}))}))}onChangePageSelect(e){let t=this.state.page;this.setState({page:t+1});let i={limit:this.state.limit,page:t+1,key_word:this.state.keyword};i.key_word||delete i.key_word,this.getDirect(i),e&&e()}onKeywordChange(e){this.setState({keyword:e,page:1});let t={limit:this.state.limit,page:1,key_word:e};t.key_word||delete t.key_word,Object(a.cb)(t).then((e=>{Object(a.Wb)(e,((e,t)=>{let i=[];i=i.concat(this.setZentOpt(e.data)),this.setState({directList: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,reseller_id:e.reseller_id})}async submit(e){let t=!1;if(this.refs.form1.validator()){var i,s;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 l={};l.title=this.state.model.title,l.stock_id=this.state.model.stock_id,l.type=parseInt(this.state.model.type),l.return_type=1,l.reseller_id=null!==(i=this.state.model.reseller.key)&&void 0!==i?i:this.state.reseller_id;let n=null!==(s=this.state.model.reseller._text)&&void 0!==s?s:this.state.model.reseller.text,o=n.match(/\uff08([^\uff09]+)\uff09/);if(l.reseller_name=o?o[1]:n,l.begin_time=this.state.model.date_time[0],l.end_time=this.state.model.date_time[1],1===this.state.isSettlement&&this.state.model.settlement_type&&(l.settlement_type=this.state.model.settlement_type.key),this.state.loading)return;if(this.setState({loading:!0}),e){let i={title:l.title,begin_time:l.begin_time,end_time:l.end_time,settlement_type:l.settlement_type};1===this.state.isSettlement&&this.state.model.settlement_type&&(i.settlement_type=l.settlement_type),await Object(a.Hc)(e,i).then((e=>{this.setState({loading:!1}),Object(a.Wb)(e,((e,i)=>{c.a.success("\u4fdd\u5b58\u6210\u529f"),t=!0}),(e=>{c.a.error(e)}))}))}else{let e={};e.info=l;let i=sessionStorage.getItem("plan_id");if(e.info.copy_plan_id=sessionStorage.getItem("plan_id_copy"),""!=i)return this.setState({loading:!1}),delete l.copy_plan_id,sessionStorage.setItem("step1",JSON.stringify(l)),sessionStorage.setItem("knockGold_effectDate",JSON.stringify(l)),sessionStorage.setItem("redPackets_effectDate",JSON.stringify(l)),sessionStorage.setItem("plan_item",JSON.stringify(l)),!0;await Object(a.d)("",e).then((e=>{this.setState({loading:!1}),Object(a.Wb)(e,((e,i)=>{sessionStorage.setItem("plan_id",e.id),delete l.copy_plan_id,sessionStorage.setItem("step1",JSON.stringify(l)),sessionStorage.setItem("knockGold_effectDate",JSON.stringify(l)),sessionStorage.setItem("redPackets_effectDate",JSON.stringify(l)),sessionStorage.setItem("plan_item",JSON.stringify(l)),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})}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))}addEmail(e){const t=new RegExp("^[1][3,4,5,6,7,8,9][0-9]{9}$"),i=new RegExp("^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$");let s={contact_phone:this.state.phone,contact_email:this.state.email};s.contact_phone&&t.test(s.contact_phone)?s.contact_email&&i.test(s.contact_email)?Object(a.I)(s,this.state.reseller_id).then((e=>{Object(a.Wb)(e,((e,t)=>{this.setState({showEmailPop:!1}),c.a.success("\u6dfb\u52a0\u6210\u529f")}),(e=>{c.a.error(e)}))})):c.a.error("\u90ae\u7bb1\u683c\u5f0f\u4e0d\u6b63\u786e"):c.a.error("\u624b\u673a\u53f7\u683c\u5f0f\u4e0d\u6b63\u786e")}cancel(e){this.setState({showEmailPop:!1,model:{...this.state.model,reseller:{key:"",_text:""}}})}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:503,columnNumber:13},this)},void 0,!1,{fileName:is,lineNumber:502,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:526,columnNumber:13},this)},void 0,!1,{fileName:is,lineNumber:525,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:556,columnNumber:15},this),Object(h.jsxDEV)(ne.a,{value:2,children:"\u4ec5\u5151\u6362"},void 0,!1,{fileName:is,lineNumber:559,columnNumber:15},this)]},void 0,!0,{fileName:is,lineNumber:550,columnNumber:13},this)},void 0,!1,{fileName:is,lineNumber:549,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:571,columnNumber:15},this),Object(h.jsxDEV)(ne.a,{value:2,children:"\u5426"},void 0,!1,{fileName:is,lineNumber:572,columnNumber:15},this)]},void 0,!0,{fileName:is,lineNumber:563,columnNumber:13},this)},void 0,!1,{fileName:is,lineNumber:562,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:577,columnNumber:15},this)},void 0,!1,{fileName:is,lineNumber:576,columnNumber:13},this):null,Object(h.jsxDEV)(s.a,{labelname:"\u5206\u9500\u5546",prop:"reseller",id:"reseller",children:Object(h.jsxDEV)(Xt,{options:this.state.directList,clearable:!0,page:this.state.page,placeholder:"\u9009\u62e9\u4e00\u9879",disabled:this.props.disabled,value:this.state.model.reseller,onChangePage:this.onChangePageSelect.bind(this),keyword:this.state.keyword,onKeywordChange:this.onKeywordChange.bind(this),onChange:e=>{this.onResellerChange(e),Ut.a.emit("change","reseller",e)},width:515},void 0,!1,{fileName:is,lineNumber:605,columnNumber:13},this)},void 0,!1,{fileName:is,lineNumber:592,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:[$()().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=>{Ut.a.emit("change","date_time",e),this.onChangeCombinedDate(e)},disabledDate:this.onDisabledRange},void 0,!1,{fileName:is,lineNumber:624,columnNumber:13},this)},void 0,!1,{fileName:is,lineNumber:623,columnNumber:11},this)]},void 0,!0,{fileName:is,lineNumber:501,columnNumber:9},this),this.state.showEmailPop?Object(h.jsxDEV)("div",{children:[Object(h.jsxDEV)("div",{className:"modal",children:" "},void 0,!1,{fileName:is,lineNumber:644,columnNumber:13},this),Object(h.jsxDEV)("div",{className:"audit-box",children:[Object(h.jsxDEV)(f.a,{type:"close",className:"audit-close",onClick:e=>{this.cancel(e)}},void 0,!1,{fileName:is,lineNumber:646,columnNumber:15},this),Object(h.jsxDEV)("div",{className:"audit-box-title",children:"\u5b8c\u5584\u5206\u9500\u5546\u4fe1\u606f"},void 0,!1,{fileName:is,lineNumber:653,columnNumber:15},this),Object(h.jsxDEV)("div",{className:"input-group input-flex",children:[Object(h.jsxDEV)("div",{className:"input-label",children:[Object(h.jsxDEV)("text",{children:"* "},void 0,!1,{fileName:is,lineNumber:656,columnNumber:46},this),"\u63a5\u6536\u624b\u673a\u53f7\uff1a"]},void 0,!0,{fileName:is,lineNumber:656,columnNumber:17},this),Object(h.jsxDEV)(Di.a,{placeholder:"\u8bf7\u8f93\u5165\u63a5\u6536\u624b\u673a\u53f7",onChange:this.phoneChange,value:this.state.phone},void 0,!1,{fileName:is,lineNumber:657,columnNumber:17},this)]},void 0,!0,{fileName:is,lineNumber:655,columnNumber:15},this),Object(h.jsxDEV)("div",{className:"input-group input-flex",children:[Object(h.jsxDEV)("div",{className:"input-label",children:[Object(h.jsxDEV)("text",{children:"* "},void 0,!1,{fileName:is,lineNumber:665,columnNumber:46},this),"\u63a5\u6536\u90ae\u7bb1\uff1a"]},void 0,!0,{fileName:is,lineNumber:665,columnNumber:17},this),Object(h.jsxDEV)(Di.a,{placeholder:"\u8bf7\u8f93\u5165\u63a5\u6536\u90ae\u7bb1",onChange:this.emailChange,value:this.state.email},void 0,!1,{fileName:is,lineNumber:666,columnNumber:17},this)]},void 0,!0,{fileName:is,lineNumber:664,columnNumber:15},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:is,lineNumber:674,columnNumber:17},this),Object(h.jsxDEV)(u.a,{type:"primary",onClick:e=>{this.addEmail(e)},children:"\u786e\u5b9a"},void 0,!1,{fileName:is,lineNumber:681,columnNumber:17},this)]},void 0,!0,{fileName:is,lineNumber:673,columnNumber:15},this)]},void 0,!0,{fileName:is,lineNumber:645,columnNumber:13},this)]},void 0,!0,{fileName:is,lineNumber:643,columnNumber:11},this):null]},void 0,!0,{fileName:is,lineNumber:500,columnNumber:7},this)}}i(249);var ss="D:\\project\\\u8425\u9500\u7cfb\u7edf\\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(R.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,f]=Object(R.a)({code_name:"",issued:"",describe:"",date_time:"",range:"",restrict:""});Object(r.useImperativeHandle)(t,(()=>({submit:x,getModel:_,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);f({date_time:[t.begin_time,t.end_time]})}}}),[]);const x=()=>{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:[]}),f({code_name:"",issued:"",describe:"",range:"",restrict:""})},O=()=>{var e;f({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=>H(e))),s=null===(e=a.product.cash)||void 0===e?void 0:e.map((e=>{let t=q(e);return t.only.copy=!0,t})),l=t.concat(i,s);l=Object(g.a)(l,(e=>(e.checked=!0,e)));let n=Object(g.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=>{f({code_name:e})},onClearItem:e=>{f({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=>{f({issued:e})},onClearItem:e=>{f({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=>{f({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=>{f({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(K.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=$()(e).format("YYYY-MM-DD HH:mm:ss");const l=$()(i.end_time).format("HH:mm:ss");return"start"==t&&(a=l<"23:59:59"?$()(s).isBefore(i.begin_time)||$()(s).subtract(1,"days").isAfter(i.end_time):$()(s).isBefore(i.begin_time)||$()(s).isAfter(i.end_time)),"end"==t&&(a=$()(s).add(1,"days").isBefore(i.begin_time)||$()(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)(T,{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(g.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="D:\\project\\\u8425\u9500\u7cfb\u7edf\\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(R.a)(_()),[v,f]=Object(R.a)(y()),x=()=>{j(_()),f(y())};function _(){return{rankOptions:[],rank:[],tableData:[],productData:null,visible:!1,keyPcType:Number(sessionStorage.getItem("KeyPcType"))||0}}function y(){return{instruction:A,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=H(e);return t.origin=t.only,t.send_num=e.send_num,t.checked=!0,2==N.keyPcType&&delete e.id,t})),t=Object(g.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}=s;f({quantity:a,is_webview:Number(h)||0,timer_show:Number(u.timer_show)||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:x})));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.fd)(s).then((e=>{Object(a.Wb)(e,((e,i)=>{t(e.path)}),(e=>{c.a.error(e),i(e)}))}))}catch(s){i(s)}})))(e[0].file).then((t=>{f({group_image:[{src:t,id:`${(new Date).getTime()}-0`,name:e[0].file.name}]})})):f({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})=>{f({channel:e.value,is_webview:0}),"3"===e.value?f({receive_mode:2}):f({receive_mode:1}),"1"===e.value?f({instruction:A}):"2"===e.value?f({instruction:B}):f({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:444,columnNumber:19},void 0),Object(h.jsxDEV)(ne.a,{value:"2",children:"\u5fae\u4fe1"},void 0,!1,{fileName:hs,lineNumber:445,columnNumber:19},void 0),Object(h.jsxDEV)(ne.a,{value:"3",children:"\u4e91\u95ea\u4ed8"},void 0,!1,{fileName:hs,lineNumber:446,columnNumber:19},void 0)]},void 0,!0,{fileName:hs,lineNumber:443,columnNumber:17},void 0)},void 0,!1,{fileName:hs,lineNumber:420,columnNumber:15},void 0)},void 0,!1,{fileName:hs,lineNumber:419,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})=>{f({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:458,columnNumber:19},void 0),Object(h.jsxDEV)(ne.a,{value:1,children:"\u516c\u4f17\u53f7"},void 0,!1,{fileName:hs,lineNumber:459,columnNumber:19},void 0)]},void 0,!0,{fileName:hs,lineNumber:452,columnNumber:17},void 0)},"is_webview",!1,{fileName:hs,lineNumber:451,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})=>{f({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:477,columnNumber:21},void 0),Object(h.jsxDEV)(ne.a,{value:2,children:"\u8d26\u53f7\u9886\u53d6"},void 0,!1,{fileName:hs,lineNumber:478,columnNumber:21},void 0)]},void 0,!0,{fileName:hs,lineNumber:476,columnNumber:19},void 0)},void 0,!1,{fileName:hs,lineNumber:465,columnNumber:17},void 0)},void 0,!1,{fileName:hs,lineNumber:464,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=>{f({code_name:e})},onClearItem:e=>{f({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:484,columnNumber:15},void 0)},void 0,!1,{fileName:hs,lineNumber:483,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=>{f({quantity:e})},onClearItem:e=>{f({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:501,columnNumber:15},void 0)},void 0,!1,{fileName:hs,lineNumber:500,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})=>{f({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:526,columnNumber:17},void 0),Object(h.jsxDEV)(ne.a,{value:2,children:"\u56fe\u7247\u63cf\u8ff0"},void 0,!1,{fileName:hs,lineNumber:527,columnNumber:17},void 0)]},void 0,!0,{fileName:hs,lineNumber:520,columnNumber:15},void 0)},void 0,!1,{fileName:hs,lineNumber:519,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)(ft.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:532,columnNumber:17},void 0)},void 0,!1,{fileName:hs,lineNumber:531,columnNumber:15},void 0):Object(h.jsxDEV)(s.a,{labelname:"\u4f7f\u7528\u8bf4\u660e",prop:"instruction",id:"instruction",required:!1,children:Object(h.jsxDEV)(Ri,{pageType:"detaileditor",setEdittext:e=>{f({instruction:e})},width:"520px",text:v.instruction,limitLength:5e3},v.channel,!1,{fileName:hs,lineNumber:548,columnNumber:17},void 0)},void 0,!1,{fileName:hs,lineNumber:547,columnNumber:15},void 0)]},void 0,!0,{fileName:hs,lineNumber:418,columnNumber:11},void 0)},void 0,!1,{fileName:hs,lineNumber:417,columnNumber:9},void 0),Object(h.jsxDEV)($i,{data:v,products:N.tableData},void 0,!1,{fileName:hs,lineNumber:562,columnNumber:9},void 0)]},void 0,!0,{fileName:hs,lineNumber:416,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=>{f({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(K.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=$()(e).format("YYYY-MM-DD HH:mm:ss");const l=$()(i.end_time).format("HH:mm:ss");return"start"==t&&(a=l<"23:59:59"?$()(s).isBefore(i.begin_time)||$()(s).subtract(1,"days").isAfter(i.end_time):$()(s).isBefore(i.begin_time)||$()(s).isAfter(i.end_time)),"end"==t&&(a=$()(s).add(1,"days").isBefore(i.begin_time)||$()(s).isAfter(i.end_time)),a}},void 0,!1,{fileName:hs,lineNumber:569,columnNumber:15},void 0),Object(h.jsxDEV)(Q.a,{style:{marginLeft:"20px"},onChange:({target:e})=>{f({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:596,columnNumber:17},void 0),Object(h.jsxDEV)(ne.a,{value:2,children:"\u9690\u85cf"},void 0,!1,{fileName:hs,lineNumber:597,columnNumber:17},void 0)]},void 0,!0,{fileName:hs,lineNumber:589,columnNumber:15},void 0)]},void 0,!0,{fileName:hs,lineNumber:568,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:[$()().format("HH:mm:ss"),"23:59:59"]},value:v.timer,onChange:e=>{f({timer:e})},width:"240px",disabledTime:function(e,t){let i=!1;return"end"==t&&(i=$()(e.getTime()).add(1,"days")<=(new Date).getTime()),"start"==t&&(i=e.getTime()<=(new Date).getTime()),i}},void 0,!1,{fileName:hs,lineNumber:602,columnNumber:17},void 0),Object(h.jsxDEV)(Q.a,{style:{marginLeft:"15px"},onChange:({target:e})=>{f({timer_type:e.value}),1===e.value&&f({timer:[]})},value:v.timer_type,children:[Object(h.jsxDEV)(ne.a,{value:1,children:"\u4e0d\u8bbe\u7f6e"},void 0,!1,{fileName:hs,lineNumber:625,columnNumber:19},void 0),Object(h.jsxDEV)(ne.a,{value:2,children:"\u6bcf\u65e5"},void 0,!1,{fileName:hs,lineNumber:626,columnNumber:19},void 0)]},void 0,!0,{fileName:hs,lineNumber:615,columnNumber:17},void 0)]},void 0,!0,{fileName:hs,lineNumber:601,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})=>{f({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:637,columnNumber:19},void 0),Object(h.jsxDEV)(ne.a,{value:2,children:"\u6bcf\u65e5"},void 0,!1,{fileName:hs,lineNumber:638,columnNumber:19},void 0)]},void 0,!0,{fileName:hs,lineNumber:631,columnNumber:17},void 0)},void 0,!1,{fileName:hs,lineNumber:630,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:644,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:654,columnNumber:17},void 0)]},void 0,!0,{fileName:hs,lineNumber:643,columnNumber:15},void 0)},void 0,!1,{fileName:hs,lineNumber:642,columnNumber:13},void 0)]},void 0,!0,{fileName:hs,lineNumber:567,columnNumber:11},void 0)},void 0,!1,{fileName:hs,lineNumber:566,columnNumber:9},void 0),Object(h.jsxDEV)(s.a,{labelname:"",prop:"range",id:"range",children:Object(h.jsxDEV)(T,{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(g.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:687,columnNumber:21},void 0)},void 0,!1,{fileName:hs,lineNumber:686,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:668,columnNumber:11},void 0)},void 0,!1,{fileName:hs,lineNumber:667,columnNumber:9},void 0)]},void 0,!0,{fileName:hs,lineNumber:565,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=H(e);return t.origin=t.only,t.send_num=e.send_num,t.checked=!0,t}));let t=Object(g.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:716,columnNumber:13},void 0),Object(h.jsxDEV)(u.a,{onClick:e=>{j({visible:!1})},children:"\u53d6\u6d88"},void 0,!1,{fileName:hs,lineNumber:719,columnNumber:13},void 0)]},void 0,!0,{fileName:hs,lineNumber:715,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)(He,{ref:p,data:N.productData,combining:v},void 0,!1,{fileName:hs,lineNumber:736,columnNumber:13},void 0)},void 0,!1,{fileName:hs,lineNumber:735,columnNumber:11},void 0)},void 0,!1,{fileName:hs,lineNumber:734,columnNumber:9},void 0)},void 0,!1,{fileName:hs,lineNumber:710,columnNumber:7},void 0)]},void 0,!0,{fileName:hs,lineNumber:415,columnNumber:5},void 0)})),Ns=(i(250),"D:\\project\\\u8425\u9500\u7cfb\u7edf\\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 fs 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=$()(e).format("YYYY-MM-DD HH:mm:ss");return!$()(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(K.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=$()(e).format("YYYY-MM-DD HH:mm:ss"),l=$()(i.end_time).format("HH:mm:ss");return"start"==t&&(a=l<"23:59:59"?$()(s).isBefore(i.begin_time)||$()(s).subtract(1,"days").isAfter(i.end_time):$()(s).isBefore(i.begin_time)||$()(s).isAfter(i.end_time)),"end"==t&&(a=$()(s).add(1,"days").isBefore(i.begin_time)||$()(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.fd)(n).then((e=>{Object(a.Wb)(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.vb)(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(g.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(g.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(g.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(Ii.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(g.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(g.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(g.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(g.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.fd)(e).then((e=>{Object(a.Wb)(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.M)(i).then((e=>{this.setState({file_loading:!1}),Object(a.Wb)(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:1140,columnNumber:11},this):Object(h.jsxDEV)(ps,{propsData:this.state.rowExchangeData,ref:"addEditExchangeEl"},void 0,!1,{fileName:Ns,lineNumber:1149,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:1153,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:1198,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:1211,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:1215,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:1227,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:1239,columnNumber:15},this)]},void 0,!0,{fileName:Ns,lineNumber:1205,columnNumber:13},this)},void 0,!1,{fileName:Ns,lineNumber:1204,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:1247,columnNumber:15},this)},void 0,!1,{fileName:Ns,lineNumber:1246,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:1271,columnNumber:15},this)},void 0,!1,{fileName:Ns,lineNumber:1270,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:1295,columnNumber:15},this)},void 0,!1,{fileName:Ns,lineNumber:1294,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:1320,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:1342,columnNumber:19},this):null]},void 0,!0,{fileName:Ns,lineNumber:1319,columnNumber:15},this)},void 0,!1,{fileName:Ns,lineNumber:1318,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:1366,columnNumber:15},this),Object(h.jsxDEV)(Z.a,{value:"2",children:"\u56fa\u5b9a\u65f6\u95f4\u6bb5"},void 0,!1,{fileName:Ns,lineNumber:1367,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:1368,columnNumber:15},this)]},void 0,!0,{fileName:Ns,lineNumber:1357,columnNumber:13},this)},void 0,!1,{fileName:Ns,lineNumber:1356,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:[$()().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:1374,columnNumber:15},this)},void 0,!1,{fileName:Ns,lineNumber:1373,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:1394,columnNumber:15},this)},void 0,!1,{fileName:Ns,lineNumber:1393,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:1436,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:1439,columnNumber:15},this)]},void 0,!0,{fileName:Ns,lineNumber:1430,columnNumber:13},this)},void 0,!1,{fileName:Ns,lineNumber:1429,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:1448,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:1464,columnNumber:19},this)},void 0,!1,{fileName:Ns,lineNumber:1463,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:1488,columnNumber:15},this)},void 0,!1,{fileName:Ns,lineNumber:1445,columnNumber:11},this),Object(h.jsxDEV)(s.a,{labelname:"\u7ed1\u5b9a\u5bf9\u8c61",prop:"grid",children:Object(h.jsxDEV)(T,{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:1516,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:1534,columnNumber:21},this):void 0},void 0,!1,{fileName:Ns,lineNumber:1499,columnNumber:13},this)},void 0,!1,{fileName:Ns,lineNumber:1498,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:1552,columnNumber:15},this),Object(h.jsxDEV)(ne.a,{value:0,children:"\u5426"},void 0,!1,{fileName:Ns,lineNumber:1553,columnNumber:15},this)]},void 0,!0,{fileName:Ns,lineNumber:1548,columnNumber:13},this)},void 0,!1,{fileName:Ns,lineNumber:1547,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:1559,columnNumber:15},this),Object(h.jsxDEV)(ne.a,{value:0,children:"\u5426"},void 0,!1,{fileName:Ns,lineNumber:1560,columnNumber:15},this)]},void 0,!0,{fileName:Ns,lineNumber:1558,columnNumber:13},this)},void 0,!1,{fileName:Ns,lineNumber:1557,columnNumber:11},this)]},void 0,!0,{fileName:Ns,lineNumber:1203,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:1564,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:1578,columnNumber:15},this),Object(h.jsxDEV)(u.a,{onClick:e=>{this.closeDraw()},children:"\u53d6\u6d88"},void 0,!1,{fileName:Ns,lineNumber:1586,columnNumber:15},this)]},void 0,!0,{fileName:Ns,lineNumber:1577,columnNumber:13},this),visible:this.state.drawerVisible,onClose:e=>{this.closeDraw()},maskClosable:!1,children:this.dynamicComponents()},void 0,!1,{fileName:Ns,lineNumber:1573,columnNumber:9},this),this.state.import_visible?Object(h.jsxDEV)("div",{children:[Object(h.jsxDEV)("div",{className:"modal"},void 0,!1,{fileName:Ns,lineNumber:1606,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:1609,columnNumber:17},this),Object(h.jsxDEV)(f.a,{type:"close",className:"import-close",onClick:e=>{this.setState({import_visible:!1})}},void 0,!1,{fileName:Ns,lineNumber:1611,columnNumber:17},this)]},void 0,!0,{fileName:Ns,lineNumber:1608,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:1621,columnNumber:19},this),Object(h.jsxDEV)("span",{className:"step-label active",children:"\u4e0a\u4f20\u6587\u4ef6"},void 0,!1,{fileName:Ns,lineNumber:1622,columnNumber:19},this)]},void 0,!0,{fileName:Ns,lineNumber:1620,columnNumber:17},this),Object(h.jsxDEV)("div",{className:"step-center",children:Object(h.jsxDEV)("div",{className:"step-line"},void 0,!1,{fileName:Ns,lineNumber:1625,columnNumber:19},this)},void 0,!1,{fileName:Ns,lineNumber:1624,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:1628,columnNumber:19},this),Object(h.jsxDEV)("span",{className:"step-label",children:"\u5bfc\u5165\u5b8c\u6210"},void 0,!1,{fileName:Ns,lineNumber:1629,columnNumber:19},this)]},void 0,!0,{fileName:Ns,lineNumber:1627,columnNumber:17},this)]},void 0,!0,{fileName:Ns,lineNumber:1619,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:1634,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:1637,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:1638,columnNumber:19},this)]},void 0,!0,{fileName:Ns,lineNumber:1636,columnNumber:17},this)]},void 0,!0,{fileName:Ns,lineNumber:1633,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)(f.a,{type:"text-guide-o",className:"doc-flag"},void 0,!1,{fileName:Ns,lineNumber:1648,columnNumber:23},this),Object(h.jsxDEV)("span",{className:"excel-txt",children:this.state.myfile.name},void 0,!1,{fileName:Ns,lineNumber:1649,columnNumber:23},this)]},void 0,!0,{fileName:Ns,lineNumber:1647,columnNumber:21},this),this.state.file_loading?Object(h.jsxDEV)("div",{className:"file-tag",children:[Object(h.jsxDEV)(f.a,{type:"loading",spin:!0,className:"file-loading"},void 0,!1,{fileName:Ns,lineNumber:1654,columnNumber:25},this),Object(h.jsxDEV)("span",{className:"excel-txt",children:"\u89e3\u6790\u4e2d "},void 0,!1,{fileName:Ns,lineNumber:1655,columnNumber:25},this)]},void 0,!0,{fileName:Ns,lineNumber:1653,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:1659,columnNumber:25},this),Object(h.jsxDEV)(f.a,{type:"up-circle-o",className:"upload-flag"},void 0,!1,{fileName:Ns,lineNumber:1664,columnNumber:25},this),Object(h.jsxDEV)("span",{className:"excel-txt",children:"\u66f4\u65b0\u6587\u4ef6 "},void 0,!1,{fileName:Ns,lineNumber:1665,columnNumber:25},this)]},void 0,!0,{fileName:Ns,lineNumber:1658,columnNumber:23},this)]},void 0,!0,{fileName:Ns,lineNumber:1646,columnNumber:19},this),this.state.success_visible?Object(h.jsxDEV)("div",{className:"file-tip success",children:[Object(h.jsxDEV)(f.a,{type:"check-circle",className:"success-icon"},void 0,!1,{fileName:Ns,lineNumber:1671,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:1670,columnNumber:21},this):null,this.state.fail_visible?Object(h.jsxDEV)("div",{className:"file-tip error",children:[Object(h.jsxDEV)(f.a,{type:"error-circle",className:"error-icon"},void 0,!1,{fileName:Ns,lineNumber:1677,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:1676,columnNumber:21},this):null]},void 0,!0,{fileName:Ns,lineNumber:1645,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:1684,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:1689,columnNumber:19},this)," "]},void 0,!0,{fileName:Ns,lineNumber:1683,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:1703,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:1706,columnNumber:19},this)},void 0,!1,{fileName:Ns,lineNumber:1705,columnNumber:17},this)]},void 0,!0,{fileName:Ns,lineNumber:1702,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:1709,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:1720,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:1728,columnNumber:19},this)]},void 0,!0,{fileName:Ns,lineNumber:1719,columnNumber:17},this)},void 0,!1,{fileName:Ns,lineNumber:1718,columnNumber:15},this)]},void 0,!0,{fileName:Ns,lineNumber:1607,columnNumber:13},this)]},void 0,!0,{fileName:Ns,lineNumber:1605,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:1749,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:1752,columnNumber:17},this),Object(h.jsxDEV)(f.a,{type:"close",className:"import-close",onClick:e=>{this.setState({excel_visible:!1})}},void 0,!1,{fileName:Ns,lineNumber:1753,columnNumber:17},this)]},void 0,!0,{fileName:Ns,lineNumber:1751,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:1761,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:1765,columnNumber:15},this),Object(h.jsxDEV)("div",{},void 0,!1,{fileName:Ns,lineNumber:1769,columnNumber:15},this),Object(h.jsxDEV)("div",{className:"gridpanel",children:Object(h.jsxDEV)(T,{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:1792,columnNumber:27},this)}return Object(h.jsxDEV)("div",{className:"isImport",children:"-"},void 0,!1,{fileName:Ns,lineNumber:1800,columnNumber:32},this)}}},void 0,!1,{fileName:Ns,lineNumber:1772,columnNumber:17},this)},void 0,!1,{fileName:Ns,lineNumber:1771,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:1808,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:1816,columnNumber:19},this)]},void 0,!0,{fileName:Ns,lineNumber:1807,columnNumber:17},this)},void 0,!1,{fileName:Ns,lineNumber:1806,columnNumber:15},this)]},void 0,!0,{fileName:Ns,lineNumber:1750,columnNumber:13},this)]},void 0,!0,{fileName:Ns,lineNumber:1748,columnNumber:11},this):null]},void 0,!0,{fileName:Ns,lineNumber:1202,columnNumber:7},this)}}var gs="D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\pages\\plan\\add\\step3.js";class xs 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.Ib)(e).then((e=>{Object(a.Wb)(e,((e,t)=>{let i=Object(g.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),Ut.a.emit("change","theme_id",e)}},void 0,!1,{fileName:gs,lineNumber:147,columnNumber:13},this),Object(h.jsxDEV)("a",{type:"refresh",onClick:()=>{this.refresh()},className:"refresh-btn",children:"\u5237\u65b0"},void 0,!1,{fileName:gs,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:gs,lineNumber:166,columnNumber:13},this)]},void 0,!0,{fileName:gs,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:gs,lineNumber:184,columnNumber:17},this)},void 0,!1,{fileName:gs,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:gs,lineNumber:187,columnNumber:17},this)},void 0,!1,{fileName:gs,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:gs,lineNumber:192,columnNumber:17},this)},void 0,!1,{fileName:gs,lineNumber:191,columnNumber:15},this)]},void 0,!0,{fileName:gs,lineNumber:177,columnNumber:13},this)},void 0,!1,{fileName:gs,lineNumber:176,columnNumber:11},this)]},void 0,!0,{fileName:gs,lineNumber:145,columnNumber:9},this)},void 0,!1,{fileName:gs,lineNumber:144,columnNumber:7},this)}}var _s="D:\\project\\\u8425\u9500\u7cfb\u7edf\\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:_s,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.Wb)(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.Wb)(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.Wb)(e,((e,i)=>{let s=t.info.reseller_id;Object(a.xb)(s).then((e=>{Object(a.Wb)(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.gc)(t,i).then((e=>{Object(a.Wb)(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:_s,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:_s,lineNumber:329,columnNumber:23},this),this.state.curstep>=e.id?Object(h.jsxDEV)(f.a,{type:"check",className:"checkIcon"},void 0,!1,{fileName:_s,lineNumber:338,columnNumber:25},this):null]},i,!0,{fileName:_s,lineNumber:328,columnNumber:21},this))),Object(h.jsxDEV)("div",{className:"under-line"},void 0,!1,{fileName:_s,lineNumber:343,columnNumber:17},this)]},e.title,!0,{fileName:_s,lineNumber:324,columnNumber:15},this)))},void 0,!1,{fileName:_s,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:_s,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:_s,lineNumber:353,columnNumber:17},this)},void 0,!1,{fileName:_s,lineNumber:352,columnNumber:15},this)]},void 0,!0,{fileName:_s,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:_s,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:_s,lineNumber:377,columnNumber:27},this):null,children:Object(h.jsxDEV)(fs,{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:_s,lineNumber:389,columnNumber:23},this)},t,!1,{fileName:_s,lineNumber:367,columnNumber:21},this):null))]},void 0,!0,{fileName:_s,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)(xs,{ref:"step3"},void 0,!1,{fileName:_s,lineNumber:419,columnNumber:19},this)},void 0,!1,{fileName:_s,lineNumber:418,columnNumber:17},this)},void 0,!1,{fileName:_s,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:_s,lineNumber:426,columnNumber:17},this),Object(h.jsxDEV)(u.a,{type:"normal",onClick:()=>this.onReturn(),children:"\u53d6\u6d88"},void 0,!1,{fileName:_s,lineNumber:429,columnNumber:17},this)]},void 0,!0,{fileName:_s,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:_s,lineNumber:435,columnNumber:17},this),Object(h.jsxDEV)(u.a,{type:"normal",onClick:()=>this.onReturn(),children:"\u53d6\u6d88"},void 0,!1,{fileName:_s,lineNumber:438,columnNumber:17},this)]},void 0,!0,{fileName:_s,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:_s,lineNumber:446,columnNumber:17},this),Object(h.jsxDEV)("div",{className:"audit-box",children:[Object(h.jsxDEV)(f.a,{type:"close",className:"audit-close",onClick:e=>{this.setState({audit_visible:!1})}},void 0,!1,{fileName:_s,lineNumber:448,columnNumber:19},this),Object(h.jsxDEV)("div",{className:"audit-box-title",children:"\u63d0\u4ea4\u5ba1\u6838"},void 0,!1,{fileName:_s,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:_s,lineNumber:464,columnNumber:23},this),Object(h.jsxDEV)(Z.a,{value:1,children:"\u5bf9\u79c1\u8d26\u6237"},void 0,!1,{fileName:_s,lineNumber:465,columnNumber:23},this),Object(h.jsxDEV)(Z.a,{value:2,children:"\u5bf9\u516c\u8d26\u6237"},void 0,!1,{fileName:_s,lineNumber:466,columnNumber:23},this)]},void 0,!0,{fileName:_s,lineNumber:457,columnNumber:21},this)},void 0,!1,{fileName:_s,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:_s,lineNumber:470,columnNumber:21},this),Object(h.jsxDEV)(u.a,{type:"primary",onClick:e=>{this.onConfirm(e)},children:"\u786e\u5b9a"},void 0,!1,{fileName:_s,lineNumber:477,columnNumber:21},this)]},void 0,!0,{fileName:_s,lineNumber:469,columnNumber:19},this)]},void 0,!0,{fileName:_s,lineNumber:447,columnNumber:17},this)]},void 0,!0,{fileName:_s,lineNumber:445,columnNumber:15},this):null]},void 0,!0,{fileName:_s,lineNumber:349,columnNumber:11},this)},void 0,!1,{fileName:_s,lineNumber:348,columnNumber:9},this)]},void 0,!0,{fileName:_s,lineNumber:320,columnNumber:7},this)}}i(251);var Os="D:\\project\\\u8425\u9500\u7cfb\u7edf\\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,direct_reseller_name:"",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:83,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.Q)(l).then((e=>{Object(a.Wb)(e,((e,t)=>{try{Object(a.xb)(e.info.reseller_id).then((e=>{Object(a.Wb)(e,((e,t)=>{this.setState({direct_reseller_id:e.direct_reseller_id,direct_reseller_name:e.direct_reseller_name})}))}))}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.db)(s).then((e=>{Object(a.Wb)(e,((e,t)=>{if(Object(a.xb)(e.info.reseller_id).then((e=>{Object(a.Wb)(e,((e,t)=>{this.setState({direct_reseller_id:e.direct_reseller_id,direct_reseller_name:e.direct_reseller_name})}))})),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.Wb)(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.Wb)(e,((e,i)=>{let s=t.info.reseller_id;Object(a.xb)(s).then((e=>{Object(a.Wb)(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.gc)(t,i).then((e=>{Object(a.Wb)(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.R)(i).then((e=>{setTimeout((()=>{this.setState({btn_loading:!1})}),500),Object(a.Wb)(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.Wb)(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.Wb)(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.ed)(e).then((e=>{Object(a.Wb)(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:583,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,direct_reseller_name:this.state.direct_reseller_name},void 0,!1,{fileName:Os,lineNumber:585,columnNumber:19},this)},void 0,!1,{fileName:Os,lineNumber:584,columnNumber:17},this)]},void 0,!0,{fileName:Os,lineNumber:582,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:589,columnNumber:17},this),Object(h.jsxDEV)(u.a,{type:"normal",onClick:()=>this.onReturn(),children:"\u53d6\u6d88"},void 0,!1,{fileName:Os,lineNumber:592,columnNumber:17},this)]},void 0,!0,{fileName:Os,lineNumber:588,columnNumber:15},this)]},void 0,!0,{fileName:Os,lineNumber:581,columnNumber:13},this)},void 0,!1,{fileName:Os,lineNumber:580,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:604,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:608,columnNumber:27},this),this.state.curstep>=e.id?Object(h.jsxDEV)(f.a,{type:"check",className:"checkIcon"},void 0,!1,{fileName:Os,lineNumber:617,columnNumber:29},this):null]},i,!0,{fileName:Os,lineNumber:607,columnNumber:25},this))),Object(h.jsxDEV)("div",{className:"under-line"},void 0,!1,{fileName:Os,lineNumber:622,columnNumber:21},this)]},e.title,!0,{fileName:Os,lineNumber:603,columnNumber:19},this)))},void 0,!1,{fileName:Os,lineNumber:600,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:631,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),direct_reseller_name:this.state.direct_reseller_name},void 0,!1,{fileName:Os,lineNumber:633,columnNumber:21},this)},void 0,!1,{fileName:Os,lineNumber:632,columnNumber:19},this)]},void 0,!0,{fileName:Os,lineNumber:630,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:647,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:659,columnNumber:31},this):null,children:Object(h.jsxDEV)(fs,{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:671,columnNumber:27},this)},void 0,!1,{fileName:Os,lineNumber:650,columnNumber:25},this):null))]},void 0,!0,{fileName:Os,lineNumber:646,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)(xs,{ref:"step3",data:this.state.step3_data,options:this.state.theme_options,disabled:this.state.disabled},void 0,!1,{fileName:Os,lineNumber:707,columnNumber:23},this)},void 0,!1,{fileName:Os,lineNumber:703,columnNumber:21},this)},void 0,!1,{fileName:Os,lineNumber:702,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:719,columnNumber:21},this),Object(h.jsxDEV)(u.a,{type:"normal",onClick:()=>this.onReturn(),children:"\u53d6\u6d88"},void 0,!1,{fileName:Os,lineNumber:726,columnNumber:21},this)]},void 0,!0,{fileName:Os,lineNumber:718,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:732,columnNumber:21},this),Object(h.jsxDEV)(u.a,{type:"normal",onClick:()=>this.onReturn(),children:"\u53d6\u6d88"},void 0,!1,{fileName:Os,lineNumber:739,columnNumber:21},this)]},void 0,!0,{fileName:Os,lineNumber:731,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:747,columnNumber:21},this),Object(h.jsxDEV)("div",{className:"audit-box",children:[Object(h.jsxDEV)(f.a,{type:"close",className:"audit-close",onClick:e=>{this.setState({audit_visible:!1})}},void 0,!1,{fileName:Os,lineNumber:749,columnNumber:23},this),Object(h.jsxDEV)("div",{className:"audit-box-title",children:"\u63d0\u4ea4\u5ba1\u6838"},void 0,!1,{fileName:Os,lineNumber:756,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:765,columnNumber:27},this),Object(h.jsxDEV)(Z.a,{value:1,children:"\u5bf9\u79c1\u8d26\u6237"},void 0,!1,{fileName:Os,lineNumber:766,columnNumber:27},this),Object(h.jsxDEV)(Z.a,{value:2,children:"\u5bf9\u516c\u8d26\u6237"},void 0,!1,{fileName:Os,lineNumber:767,columnNumber:27},this)]},void 0,!0,{fileName:Os,lineNumber:758,columnNumber:25},this)},void 0,!1,{fileName:Os,lineNumber:757,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:771,columnNumber:25},this),Object(h.jsxDEV)(u.a,{type:"primary",onClick:e=>{this.onConfirm(e)},children:"\u786e\u5b9a"},void 0,!1,{fileName:Os,lineNumber:778,columnNumber:25},this)]},void 0,!0,{fileName:Os,lineNumber:770,columnNumber:23},this)]},void 0,!0,{fileName:Os,lineNumber:748,columnNumber:21},this)]},void 0,!0,{fileName:Os,lineNumber:746,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:793,columnNumber:21},this),Object(h.jsxDEV)("div",{className:"audit-box",children:[Object(h.jsxDEV)(f.a,{type:"close",className:"audit-close",onClick:e=>{this.onReturn(e)}},void 0,!1,{fileName:Os,lineNumber:795,columnNumber:23},this),Object(h.jsxDEV)("div",{className:"audit-box-title",children:"\u5ba1\u6838\u4e2d"},void 0,!1,{fileName:Os,lineNumber:802,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:803,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:807,columnNumber:25},this),Object(h.jsxDEV)(u.a,{type:"primary",onClick:e=>{this.onReCall(e)},children:"\u786e\u5b9a"},void 0,!1,{fileName:Os,lineNumber:814,columnNumber:25},this)]},void 0,!0,{fileName:Os,lineNumber:806,columnNumber:23},this)]},void 0,!0,{fileName:Os,lineNumber:794,columnNumber:21},this)]},void 0,!0,{fileName:Os,lineNumber:792,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:829,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:831,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:834,columnNumber:25},this),"\u79d2"]},void 0,!0,{fileName:Os,lineNumber:832,columnNumber:23},this)]},void 0,!0,{fileName:Os,lineNumber:830,columnNumber:21},this)]},void 0,!0,{fileName:Os,lineNumber:828,columnNumber:19},this):null]},void 0,!0,{fileName:Os,lineNumber:629,columnNumber:15},this)},void 0,!1,{fileName:Os,lineNumber:628,columnNumber:13},this)]},void 0,!0,{fileName:Os,lineNumber:599,columnNumber:11},this)},void 0,!1,{fileName:Os,lineNumber:578,columnNumber:7},this)}}var Es="D:\\project\\\u8425\u9500\u7cfb\u7edf\\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.Ob)(e).then((e=>{Object(a.Wb)(e,((e,i)=>{if(Object(a.xb)(e.info.reseller_id).then((e=>{Object(a.Wb)(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.Wb)(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.Wb)(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.Wb)(e,((e,i)=>{let s=t.info.reseller_id;Object(a.xb)(s).then((e=>{Object(a.Wb)(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.gc)(t,i).then((e=>{Object(a.Wb)(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)(f.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)(fs,{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)(xs,{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)(f.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="D:\\project\\\u8425\u9500\u7cfb\u7edf\\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(R.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(R.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.xb)(s).then((e=>{Object(a.Wb)(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?(_(),t({pageTitle:"\u7f16\u8f91key"})):(_(),t({pageTitle:"\u590d\u5236key"}))},x=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.fd)(i).then((i=>{Object(a.Wb)(i,((i,s)=>{let l={excel:i.path,plan_id:e.plan_id};N({mobile_excel:i.path}),Object(a.M)(l).then((e=>{t({file_loading:!1}),Object(a.Wb)(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})},_=()=>{let e=sessionStorage.getItem("keybatch_id");Object(a.hb)(e).then((e=>{Object(a.Wb)(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(g.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.Wb)(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.Wb)(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.cc)(s,t).then((e=>{Object(a.Wb)(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:[$()().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=$()(e).format("YYYY-MM-DD HH:mm:ss"),l=$()(i.end_time).format("HH:mm:ss");return"start"==t&&(a=l<"23:59:59"?$()(s).isBefore(i.begin_time)||$()(s).subtract(1,"days").isAfter(i.end_time):$()(s).isBefore(i.begin_time)||$()(s).isAfter(i.end_time)),"end"==t&&(a=$()(s).add(1,"days").isBefore(i.begin_time)||$()(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)(T,{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)(f.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)(f.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)(f.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)(f.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=>x(e)},void 0,!1,{fileName:ks,lineNumber:1594,columnNumber:23},void 0),Object(h.jsxDEV)(f.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)(f.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)(f.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=>x(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)(f.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)(T,{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(g.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)},Is=(i(252),"D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\pages\\plan\\key\\detail\\list.js");class Ts 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(Mt.a)(e)||Object(Ht.a)(e))),i=sessionStorage.getItem("key_batch_id");Object(a.Sb)(i,t).then((e=>{Object(a.Wb)(e,((e,t)=>{this.setState({dataCount:e.total,distdata:e.data})}),(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.bc)(t).then((e=>{Object(a.Wb)(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.dc)(e).then((e=>{Object(a.Wb)(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{zt(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:Is,lineNumber:289,columnNumber:30},this),"\uff1f"]},void 0,!0,{fileName:Is,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(g.a)(this.state.selectiondata,(e=>e.key))};Object(a.Yb)(e).then((e=>{Object(a.Wb)(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(g.a)(this.state.selectiondata,(e=>e.key))};Object(a.ac)(e).then((e=>{Object(a.Wb)(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:Is,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:Is,lineNumber:486,columnNumber:15},this)]},void 0,!0,{fileName:Is,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:Is,lineNumber:497,columnNumber:13},this)]},void 0,!0,{fileName:Is,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:Is,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:Is,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:Is,lineNumber:519,columnNumber:15},this):null,Object(h.jsxDEV)(T,{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:Is,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:Is,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:Is,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:Bt.keyStatusBg(parseInt(t.status))}},void 0,!1,{fileName:Is,lineNumber:591,columnNumber:25},this),t.status_text]},void 0,!0,{fileName:Is,lineNumber:590,columnNumber:23},this)},void 0,!1,{fileName:Is,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:Is,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)(f.a,{type:"down"},void 0,!1,{fileName:Is,lineNumber:615,columnNumber:34},this)," "]},void 0,!0,{fileName:Is,lineNumber:613,columnNumber:29},this)},void 0,!1,{fileName:Is,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:Is,lineNumber:620,columnNumber:31},this),Object(h.jsxDEV)(D.a,{children:"\u4f5c\u5e9f"},"2",!1,{fileName:Is,lineNumber:621,columnNumber:31},this),Object(h.jsxDEV)(D.a,{disabled:!0,children:"\u65e5\u5fd7"},"3",!1,{fileName:Is,lineNumber:622,columnNumber:31},this)]},void 0,!0,{fileName:Is,lineNumber:619,columnNumber:29},this)},void 0,!1,{fileName:Is,lineNumber:618,columnNumber:27},this)]},void 0,!0,{fileName:Is,lineNumber:611,columnNumber:25},this)]},void 0,!0,{fileName:Is,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:Is,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)(f.a,{type:"down"},void 0,!1,{fileName:Is,lineNumber:640,columnNumber:34},this)," "]},void 0,!0,{fileName:Is,lineNumber:638,columnNumber:29},this)},void 0,!1,{fileName:Is,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:Is,lineNumber:645,columnNumber:31},this),Object(h.jsxDEV)(D.a,{disabled:2!=t.status,children:"\u4f5c\u5e9f"},"2",!1,{fileName:Is,lineNumber:648,columnNumber:31},this),Object(h.jsxDEV)(D.a,{disabled:!0,children:"\u65e5\u5fd7"},"3",!1,{fileName:Is,lineNumber:651,columnNumber:31},this)]},void 0,!0,{fileName:Is,lineNumber:644,columnNumber:29},this)},void 0,!1,{fileName:Is,lineNumber:643,columnNumber:27},this)]},void 0,!0,{fileName:Is,lineNumber:636,columnNumber:25},this)]},void 0,!0,{fileName:Is,lineNumber:632,columnNumber:23},this),e}}},void 0,!1,{fileName:Is,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:Is,lineNumber:667,columnNumber:17},this),Object(h.jsxDEV)("div",{className:"audit-box",children:[Object(h.jsxDEV)(f.a,{type:"close",className:"audit-close",onClick:e=>{this.cancel(e)}},void 0,!1,{fileName:Is,lineNumber:669,columnNumber:19},this),Object(h.jsxDEV)("div",{className:"audit-box-title",children:"\u53d1\u9001"},void 0,!1,{fileName:Is,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:Is,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:Is,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:Is,lineNumber:690,columnNumber:29},this)))},void 0,!1,{fileName:Is,lineNumber:681,columnNumber:23},this)},void 0,!1,{fileName:Is,lineNumber:680,columnNumber:21},this)]},void 0,!0,{fileName:Is,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:Is,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:Is,lineNumber:717,columnNumber:29},this)))},void 0,!1,{fileName:Is,lineNumber:708,columnNumber:23},this)},void 0,!1,{fileName:Is,lineNumber:707,columnNumber:21},this)]},void 0,!0,{fileName:Is,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:Is,lineNumber:733,columnNumber:21},this)},void 0,!1,{fileName:Is,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:Is,lineNumber:740,columnNumber:21},this)},void 0,!1,{fileName:Is,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:Is,lineNumber:748,columnNumber:21},this),Object(h.jsxDEV)(u.a,{type:"primary",onClick:e=>{this.send(e)},children:"\u53d1\u9001"},void 0,!1,{fileName:Is,lineNumber:755,columnNumber:21},this)]},void 0,!0,{fileName:Is,lineNumber:747,columnNumber:19},this)]},void 0,!0,{fileName:Is,lineNumber:668,columnNumber:17},this)]},void 0,!0,{fileName:Is,lineNumber:666,columnNumber:15},this):null]},void 0,!0,{fileName:Is,lineNumber:517,columnNumber:11},this)]},void 0,!0,{fileName:Is,lineNumber:475,columnNumber:9},this)},void 0,!1,{fileName:Is,lineNumber:474,columnNumber:7},this)}}i(253);var Fs="D:\\project\\\u8425\u9500\u7cfb\u7edf\\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 Ms 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.jb)(i).then((e=>{Object(a.Wb)(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)(T,{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:$.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)(Aa.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 Hs=i(378),qs=i.n(Hs),Ps=(i(254),"D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\pages\\plan\\key\\list.js");const Ws=[{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 Bs 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.Wb)(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.ib)(n).then((e=>{Object(a.Wb)(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.cd)(t.id,s).then((s=>{Object(a.Wb)(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.xb)(e).then((e=>{Object(a.Wb)(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.Zb)({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.Wb)(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{zt(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.Wb)(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.ed)(i).then((e=>{Object(a.Wb)(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(qs()(t.end_time).valueOf()<=qs()().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)(f.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.Wb)(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)(T,{countChange:e=>{this.countChange(e)},spliteColor:"#fff",tableData:this.state.distdata,Column:Ws,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:Bt.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)(f.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 As=i(484),Js=(i(255),"D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\components\\UseUploadExcel\\index.jsx");const zs=[{title:"\u884c\u53f7",name:"id"},{title:"key",name:"key"},{title:"\u9519\u8bef\u539f\u56e0",name:"msg"}];var Rs=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),[g,x]=Object(r.useState)(""),[_,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),[I,T]=Object(r.useState)([]),F=Object(r.useRef)(null),[L,M]=Object(r.useState)(!1);Object(r.useEffect)((()=>{try{let e=F.current;e&&e.click()}catch(e){}}),[F,L]);const H=e=>{let t="";for(let i in e)t+=e[i]+" ";return t},q=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),x(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),x(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:H(e.msg)}))),T(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),q(t)},W=()=>{""!==g&&(B(),s(g))},B=()=>{N(2),D(!1),V(!1),y(!0),i()},A=()=>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)(f.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)(f.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)(f.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)(f.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:()=>B(),children:"\u53d6\u6d88"},void 0,!1,{fileName:Js,lineNumber:313,columnNumber:11},void 0),Object(h.jsxDEV)(u.a,{type:"primary",disabled:_,onClick:e=>{W()},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)(f.a,{type:"close",className:"import-close",onClick:()=>B()},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)(As.a,{columns:zs,datasets:I,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),M(!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=>{W()},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?A():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)},Ks=(i(257),"D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\components\\keysFind\\index.jsx");const Ys=[{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 $s=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,f]=Object(r.useState)([]);function g(){d({date:[],reseller:"",plan:"",state:{key:0,text:"\u5168\u90e8"},key:"",key_batch_id:""})}function x(e,t){return Object(h.jsxDEV)(U.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:Ks,lineNumber:86,columnNumber:32},this)},void 0,!1,{fileName:Ks,lineNumber:85,columnNumber:7},this)}function _(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=_(m);t(e)}),[m]),Object(r.useEffect)((()=>{Object(a.wb)().then((e=>Object(a.Wb)(e,((e,t)=>{const i=e.map((e=>({key:e.id,text:e.name})));p(i)}),(e=>{})))),Object(a.tb)().then((e=>Object(a.Wb)(e,((e,t)=>{const i=e.map((e=>({key:e.id,text:e.title})));j(i)}),(e=>{}))))}),[]),Object(r.useImperativeHandle)(o,(()=>({clearData:g}))),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:Ks,lineNumber:132,columnNumber:11},void 0)},void 0,!1,{fileName:Ks,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:Ys,placeholder:"\u8bf7\u9009\u62e9",width:204,clearable:!0,onChange:e=>d({...m,state:e})},void 0,!1,{fileName:Ks,lineNumber:141,columnNumber:11},void 0)},void 0,!1,{fileName:Ks,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:x,width:204,clearable:!0,onChange:e=>d({...m,reseller:e})},void 0,!1,{fileName:Ks,lineNumber:152,columnNumber:11},void 0)},void 0,!1,{fileName:Ks,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:x,width:204,clearable:!0,onChange:e=>{var t;e?(t=e.key,Object(a.Qc)({plan_id:t}).then((e=>{Object(a.Wb)(e,((e,t)=>{const i=e.map((e=>({key:e.id,text:e.batch_name,...e})));f(i)}),(e=>{c.a.error(e)}))})),d({...m,plan:e})):(d({...m,key_batch_id:null,plan:null}),f([]))}},void 0,!1,{fileName:Ks,lineNumber:163,columnNumber:11},void 0)},void 0,!1,{fileName:Ks,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)(U.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:Ks,lineNumber:94,columnNumber:32},this)},void 0,!1,{fileName:Ks,lineNumber:93,columnNumber:7},this)},width:204,clearable:!0,onChange:e=>{d({...m,key_batch_id:e})}},void 0,!1,{fileName:Ks,lineNumber:182,columnNumber:11},void 0)},void 0,!1,{fileName:Ks,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:Ks,lineNumber:195,columnNumber:11},void 0)},void 0,!1,{fileName:Ks,lineNumber:194,columnNumber:9},void 0),Object(h.jsxDEV)("div",{className:"button_box",children:[Object(h.jsxDEV)(u.a,{type:"primary",onClick:()=>{_(m).plan_id||_(m).reseller_id||_(m).key?e(_(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:Ks,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:Ks,lineNumber:223,columnNumber:11},void 0)]},void 0,!0,{fileName:Ks,lineNumber:206,columnNumber:9},void 0)]},void 0,!0,{fileName:Ks,lineNumber:130,columnNumber:7},void 0)},void 0,!1,{fileName:Ks,lineNumber:129,columnNumber:5},void 0)})),Us=(i(258),"D:\\project\\\u8425\u9500\u7cfb\u7edf\\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(R.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(Mt.a)(e)||Object(Ht.a)(e))),e};Object(pt.a)((()=>{(()=>{const e=l();s({loading:!0}),Object(a.kb)(e).then((e=>{Object(a.Wb)(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.Yb)(t).then((e=>{Object(a.Wb)(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.bc)(t).then((e=>{Object(a.Wb)(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.Wb)(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)($s,{ref:e,query:e=>(e=>{let t=Object(Lt.a)({...e},(e=>Object(Mt.a)(e)||Object(Ht.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:Us,lineNumber:637,columnNumber:11},void 0)},void 0,!1,{fileName:Us,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:Us,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:Us,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:Us,lineNumber:654,columnNumber:13},void 0),Object(h.jsxDEV)(u.a,{onClick:()=>(()=>{let e=Object(g.a)(i.selectTable,(e=>e.key)),t={keys:e};try{zt(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:Us,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:Us,lineNumber:661,columnNumber:13},void 0),Object(h.jsxDEV)(u.a,{onClick:()=>(()=>{let e={keys:Object(g.a)(i.selectTable,(e=>e.key))};Object(a.ac)(e).then((e=>{Object(a.Wb)(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:Us,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.K)(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:Us,lineNumber:667,columnNumber:13},void 0)]},void 0,!0,{fileName:Us,lineNumber:645,columnNumber:11},void 0)},void 0,!1,{fileName:Us,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:Us,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:Us,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:Us,lineNumber:674,columnNumber:13},void 0):null,Object(h.jsxDEV)(vt.a,{loading:i.loading,icon:"circle",children:Object(h.jsxDEV)(T,{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:Us,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:Bt.keyStatusBg(parseInt(t.status))}},void 0,!1,{fileName:Us,lineNumber:723,columnNumber:25},void 0),t.status_text]},void 0,!0,{fileName:Us,lineNumber:722,columnNumber:23},void 0)},void 0,!1,{fileName:Us,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:Us,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)(f.a,{type:"down"},void 0,!1,{fileName:Us,lineNumber:743,columnNumber:32},void 0)]},void 0,!0,{fileName:Us,lineNumber:742,columnNumber:27},void 0)},void 0,!1,{fileName:Us,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.dc)(e).then((e=>{Object(a.Wb)(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{zt(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:Us,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:Us,lineNumber:748,columnNumber:29},void 0),Object(h.jsxDEV)(D.a,{disabled:4===t.status||3===t.status,children:"\u4f5c\u5e9f"},"2",!1,{fileName:Us,lineNumber:751,columnNumber:29},void 0),Object(h.jsxDEV)(D.a,{children:"\u65e5\u5fd7"},"3",!1,{fileName:Us,lineNumber:757,columnNumber:29},void 0)]},void 0,!0,{fileName:Us,lineNumber:747,columnNumber:27},void 0)},void 0,!1,{fileName:Us,lineNumber:746,columnNumber:25},void 0)]},void 0,!0,{fileName:Us,lineNumber:740,columnNumber:23},void 0)]},void 0,!0,{fileName:Us,lineNumber:736,columnNumber:21},void 0):void 0},void 0,!1,{fileName:Us,lineNumber:693,columnNumber:13},void 0)},void 0,!1,{fileName:Us,lineNumber:692,columnNumber:11},void 0)]},void 0,!0,{fileName:Us,lineNumber:672,columnNumber:9},void 0)]},void 0,!0,{fileName:Us,lineNumber:635,columnNumber:7},void 0),Object(h.jsxDEV)(Rs,{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.Wb)(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)}))})):zt({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:Us,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:Us,lineNumber:771,columnNumber:7},void 0)]},void 0,!0,{fileName:Us,lineNumber:634,columnNumber:5},void 0)},Zs=(i(259),"D:\\project\\\u8425\u9500\u7cfb\u7edf\\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.gc)(i,s).then((e=>{Object(a.Wb)(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.ub)(Object(Ya.a)(e)).then((e=>{Object(a.Wb)(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.dd)(t.id,s).then((s=>{Object(a.Wb)(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){let i=this;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");switch(Number(e)){case 1:return void Object(a.xb)(t.reseller_id).then((e=>{Object(a.Wb)(e,((e,t)=>{this.setState({audit_visible:!0,phone_list:e.contact_phone,email_list:e.contact_email})}),(e=>{c.a.error(e)}))}));case 2:default:break;case 3:return void 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:519,columnNumber:20},this),onConfirm:()=>{i.setState({isCancel:!0}),Object(a.fc)(t.id).then((e=>{i.setState({isCancel:!1}),Object(a.Wb)(e,((e,t)=>{c.a.success("\u4f5c\u5e9f\u6210\u529f"),i.setState({page:1,limit:10});i.getPlanList({page:1,limit:10})}),(e=>{c.a.error(e)}))}))},onCancel:this.onCancel,className:"questModal",parentComponent:this});case 4:return void 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:20},this),onConfirm:()=>{Object(a.A)(t.id).then((e=>{Object(a.Wb)(e,((e,t)=>{c.a.success(t),i.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),i.getPlanList(a)}),(e=>{c.a.error(e)}))}))},onCancel:this.onCancel,className:"questModal",parentComponent:this});case 5:sessionStorage.setItem("pathname2","/home/plan-message"),sessionStorage.setItem("showflag",!0);let e=[{pagetitle:"\u7f16\u8f91",items:[{path:"/home/key-list",name:"\u8425\u9500\u8ba1\u5212\u7ba1\u7406"},{path:"/home/key-list",name:t.title},{path:"/home/key-list",name:"\u5b9a\u5236\u63d0\u793a"}]}];return sessionStorage.setItem("breakchangenav",JSON.stringify(e)),sessionStorage.setItem("linkshowname","\u8425\u9500\u8ba1\u5212\u7ba1\u7406"),sessionStorage.setItem("plan_id",t.id),void this.props.history.push("/home/plan-message")}if(6==e&&this.callBack(t),7==e){let e=await Object(a.Nb)({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:615,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:849,columnNumber:14},this):Object(h.jsxDEV)(Ei.a,{trigger:"hover",content:Object(h.jsxDEV)(Xs,{value:e.href},void 0,!1,{fileName:Zs,lineNumber:852,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:853,columnNumber:11},this)},void 0,!1,{fileName:Zs,lineNumber:852,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:878,columnNumber:13},this):Object(h.jsxDEV)("span",{className:"grid-link disabled",children:"\u7f16\u8f91"},void 0,!1,{fileName:Zs,lineNumber:888,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:893,columnNumber:13},this):Object(h.jsxDEV)("span",{className:"grid-link disabled",children:"\u590d\u5236"},void 0,!1,{fileName:Zs,lineNumber:903,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)(f.a,{type:"down"},void 0,!1,{fileName:Zs,lineNumber:915,columnNumber:22},this)]},void 0,!0,{fileName:Zs,lineNumber:914,columnNumber:17},this)},void 0,!1,{fileName:Zs,lineNumber:913,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:920,columnNumber:19},this),Object(h.jsxDEV)(D.a,{children:"\u8bbe\u7f6e\u56de\u8c03"},"6",!1,{fileName:Zs,lineNumber:922,columnNumber:19},this),Object(h.jsxDEV)(D.a,{disabled:!0,children:"\u65e5\u5fd7"},"2",!1,{fileName:Zs,lineNumber:923,columnNumber:19},this),Object(h.jsxDEV)(D.a,{children:"\u4f5c\u5e9f"},"3",!1,{fileName:Zs,lineNumber:926,columnNumber:19},this),Object(h.jsxDEV)(D.a,{children:"\u7ed1\u5b9a\u90ae\u50a8\u5546\u6237\u7f16\u53f7"},"7",!1,{fileName:Zs,lineNumber:927,columnNumber:19},this)]},void 0,!0,{fileName:Zs,lineNumber:919,columnNumber:17},this)},void 0,!1,{fileName:Zs,lineNumber:918,columnNumber:15},this)]},void 0,!0,{fileName:Zs,lineNumber:908,columnNumber:13},this):Object(h.jsxDEV)("span",{className:"grid-link disabled",children:["\u66f4\u591a ",Object(h.jsxDEV)(f.a,{type:"down"},void 0,!1,{fileName:Zs,lineNumber:935,columnNumber:18},this)]},void 0,!0,{fileName:Zs,lineNumber:934,columnNumber:13},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:942,columnNumber:13},this):Object(h.jsxDEV)("span",{className:"grid-link disabled",style:{paddingRight:0},children:"\u5220\u9664"},void 0,!1,{fileName:Zs,lineNumber:955,columnNumber:13},this);default:return""}}dingTask(e){Object(a.G)(e).then((e=>{Object(a.Wb)(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:991,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:995,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:1011,columnNumber:17},this):null]},void 0,!0,{fileName:Zs,lineNumber:994,columnNumber:13},this)]},void 0,!0,{fileName:Zs,lineNumber:990,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:1029,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:1044,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:1050,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:1041,columnNumber:15},this):null,Object(h.jsxDEV)(T,{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:1081,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:1089,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:1101,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:Bt.planStatusBg(parseInt(t.status))}},void 0,!1,{fileName:Zs,lineNumber:1115,columnNumber:25},this),t.status_text]},void 0,!0,{fileName:Zs,lineNumber:1114,columnNumber:23},this)},void 0,!1,{fileName:Zs,lineNumber:1113,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:1131,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:1133,columnNumber:25},this):Object(h.jsxDEV)("span",{className:"grid-link disabled",children:"\u9489\u9489\u5ba1\u6279\u67e5\u8be2"},void 0,!1,{fileName:Zs,lineNumber:1142,columnNumber:25},this),this.opearoEl(3,t),this.opearoEl(4,t)]},void 0,!0,{fileName:Zs,lineNumber:1128,columnNumber:21},this):void 0},void 0,!1,{fileName:Zs,lineNumber:1061,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:1154,columnNumber:17},this),Object(h.jsxDEV)("div",{className:"audit-box",children:[Object(h.jsxDEV)(f.a,{type:"close",className:"audit-close",onClick:e=>{this.cancel(e)}},void 0,!1,{fileName:Zs,lineNumber:1156,columnNumber:19},this),Object(h.jsxDEV)("div",{className:"audit-box-title",children:"\u53d1\u9001"},void 0,!1,{fileName:Zs,lineNumber:1163,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:1164,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:1166,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:1178,columnNumber:29},this)))},void 0,!1,{fileName:Zs,lineNumber:1169,columnNumber:23},this)},void 0,!1,{fileName:Zs,lineNumber:1168,columnNumber:21},this)]},void 0,!0,{fileName:Zs,lineNumber:1165,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:1194,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:1205,columnNumber:29},this)))},void 0,!1,{fileName:Zs,lineNumber:1196,columnNumber:23},this)},void 0,!1,{fileName:Zs,lineNumber:1195,columnNumber:21},this)]},void 0,!0,{fileName:Zs,lineNumber:1193,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:1221,columnNumber:21},this)},void 0,!1,{fileName:Zs,lineNumber:1220,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:1228,columnNumber:21},this)},void 0,!1,{fileName:Zs,lineNumber:1227,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:1236,columnNumber:21},this),Object(h.jsxDEV)(u.a,{type:"primary",onClick:e=>{this.send(e)},children:"\u53d1\u9001"},void 0,!1,{fileName:Zs,lineNumber:1243,columnNumber:21},this)]},void 0,!0,{fileName:Zs,lineNumber:1235,columnNumber:19},this)]},void 0,!0,{fileName:Zs,lineNumber:1155,columnNumber:17},this)]},void 0,!0,{fileName:Zs,lineNumber:1153,columnNumber:15},this):null]},void 0,!0,{fileName:Zs,lineNumber:1039,columnNumber:11},this)]},void 0,!0,{fileName:Zs,lineNumber:989,columnNumber:9},this)},void 0,!1,{fileName:Zs,lineNumber:988,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:"D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\pages\\plan\\main\\main.js",lineNumber:9,columnNumber:12},this)}}i(260);var sl="D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\pages\\plan\\message\\index.jsx";const ll=[{id:1,statusText:"\u672a\u5f00\u59cb",defaultPrompt:"\u8fd8\u6ca1\u5f00\u59cb\u54df\uff0c\u5151\u6362\u65f6\u95f4\u4e3a${\u5f00\u59cb\u65f6\u95f4}\u81f3${\u7ed3\u675f\u65f6\u95f4}",customizePrompt:"",typeText:"\u901a\u7528",variables:"\u5f00\u59cb\u65f6\u95f4:${start_time}\uff0c\u7ed3\u675f\u65f6\u95f4:${end_time}",readOnly:!0},{id:2,statusText:"\u4f5c\u5e9fkey\u6279\u6b21",defaultPrompt:"\u5f53\u524d\u5546\u54c1\u5151\u6362\u5df2\u7ed3\u675f",customizePrompt:"",typeText:"\u901a\u7528"},{id:3,statusText:"\u4ec5\u5151\u6362\u4e00\u6b21",defaultPrompt:"\u4eb2\uff0c\u4ec5\u53ef\u5151\u6362\u4e00\u6b21\u54e6\uff01",customizePrompt:"",typeText:"\u901a\u7528"},{id:4,statusText:"\u7d2f\u8ba1\u6b21\u6570\u8fbe\u5230\u4e0a\u9650",defaultPrompt:"\u5f53\u524d\u5546\u54c1\u5151\u6362\u6b21\u6570\u8fbe\u5230\u4e0a\u9650",customizePrompt:"",typeText:"\u901a\u7528"},{id:5,statusText:"\u65e0\u5e93\u5b58",defaultPrompt:"\u6682\u65e0\u5e93\u5b58\uff0c\u770b\u770b\u5176\u4ed6\u5546\u54c1\u5427~",customizePrompt:"",typeText:"\u901a\u7528"},{id:6,statusText:"\u5176\u4ed6\u5546\u54c1\u5904\u4e8e\u5151\u6362\u4e2d",defaultPrompt:"\u5f53\u524d\u5546\u54c1\u4e0d\u53ef\u5151\u6362",customizePrompt:"",typeText:"\u901a\u7528"},{id:7,statusText:"\u5168\u90e8\u5151\u6362",defaultPrompt:"\u5f53\u524d\u5546\u54c1\u5151\u6362\u6b21\u6570\u8fbe\u5230\u4e0a\u9650",customizePrompt:"",typeText:"\u901a\u7528"},{id:8,statusText:"\u5546\u54c1\u6682\u505c",defaultPrompt:"\u8be5\u5546\u54c1\u6682\u65e0\u6cd5\u5151\u6362",customizePrompt:"",typeText:"\u901a\u7528"},{id:9,statusText:"\u6b63\u5e38\u8fc7\u671f",defaultPrompt:"\u5151\u6362\u5df2\u8fc7\u671f\uff0c\u5151\u6362\u65f6\u95f4\u4e3a${\u5f00\u59cb\u65f6\u95f4}\u81f3${\u7ed3\u675f\u65f6\u95f4}",customizePrompt:"",typeText:"\u901a\u7528"},{id:10,statusText:"\u4e0d\u5728\u9886\u53d6\u65f6\u95f4\u8303\u56f4\u5185",defaultPrompt:"\u8be5\u7ea2\u5305\u5546\u54c1\u4e0d\u5728\u9886\u53d6\u65f6\u95f4\u6bb5\u5185",customizePrompt:"",typeText:"\u7ea2\u5305"}];i(261);var nl="D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\pages\\plan\\qrcode\\qrcode.js";class ol 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:nl,lineNumber:21,columnNumber:13},this)},void 0,!1,{fileName:nl,lineNumber:20,columnNumber:11},this)},void 0,!1,{fileName:nl,lineNumber:19,columnNumber:9},this)},void 0,!1,{fileName:nl,lineNumber:18,columnNumber:7},this)}}i(262);var rl="D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\pages\\system\\account\\add\\adduserinfo\\adduserinfo.js";class ml 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.ab)({company_id:u.company.key}).then((t=>{Object(a.Wb)(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.bb)({department_id:u.deparment.key}).then((t=>{Object(a.Wb)(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:rl,lineNumber:139,columnNumber:19},this),"\u8d26\u53f7\uff1f"]},void 0,!0,{fileName:rl,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:rl,lineNumber:143,columnNumber:19},this),"\u8d26\u53f7\u4fe1\u606f\uff1f"]},void 0,!0,{fileName:rl,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.hc)(e).then((e=>{Object(a.Wb)(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.xc)(t,e).then((e=>{Object(a.Wb)(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.fd)(i).then((e=>{Object(a.Wb)(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.ab)({company_id:e.key}).then((e=>{Object(a.Wb)(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.bb)({department_id:e.key}).then((e=>{Object(a.Wb)(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.X)().then((t=>{Object(a.Wb)(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.Ab)({page:1,limit:1e3}).then((t=>{Object(a.Wb)(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:rl,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:rl,lineNumber:465,columnNumber:13},this)},void 0,!1,{fileName:rl,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:rl,lineNumber:487,columnNumber:13},this)},void 0,!1,{fileName:rl,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:rl,lineNumber:509,columnNumber:13},this)},void 0,!1,{fileName:rl,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:rl,lineNumber:537,columnNumber:13},this)},void 0,!1,{fileName:rl,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),Ut.a.emit("change","company",e)}},void 0,!1,{fileName:rl,lineNumber:558,columnNumber:13},this)},void 0,!1,{fileName:rl,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),Ut.a.emit("change","deparment",e)}},void 0,!1,{fileName:rl,lineNumber:569,columnNumber:13},this)},void 0,!1,{fileName:rl,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),Ut.a.emit("change","post",e)}},void 0,!1,{fileName:rl,lineNumber:581,columnNumber:13},this)},void 0,!1,{fileName:rl,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),Ut.a.emit("change","station",e)},popupWidth:"360px",width:"520px"},void 0,!1,{fileName:rl,lineNumber:593,columnNumber:13},this)},void 0,!1,{fileName:rl,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:rl,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:rl,lineNumber:610,columnNumber:13},this)]},void 0,!0,{fileName:rl,lineNumber:606,columnNumber:11},this)]},void 0,!0,{fileName:rl,lineNumber:463,columnNumber:9},this),Object(h.jsxDEV)("div",{className:"mypic",children:[Object(h.jsxDEV)("b",{children:"\u5934\u50cf"},void 0,!1,{fileName:rl,lineNumber:617,columnNumber:11},this),Object(h.jsxDEV)("div",{className:"changepic dflexac",children:""==this.state.defaultFileList[0].src?Object(h.jsxDEV)(ft.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:rl,lineNumber:620,columnNumber:15},this):Object(h.jsxDEV)(ft.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:rl,lineNumber:632,columnNumber:15},this)},void 0,!1,{fileName:rl,lineNumber:618,columnNumber:11},this)]},void 0,!0,{fileName:rl,lineNumber:616,columnNumber:9},this)]},void 0,!0,{fileName:rl,lineNumber:462,columnNumber:7},this)}}i(263);var cl="D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\pages\\system\\account\\add\\add.js";class dl 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)(ml,{enumer:this.state.enumer,rowData:this.state.rowData},void 0,!1,{fileName:cl,lineNumber:26,columnNumber:13},this)},void 0,!1,{fileName:cl,lineNumber:25,columnNumber:11},this)},void 0,!1,{fileName:cl,lineNumber:24,columnNumber:9},this)},void 0,!1,{fileName:cl,lineNumber:23,columnNumber:7},this)}}i(137);var ul="D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\pages\\system\\account\\list\\delAuth.js";const hl=Z.a.Group,bl=Z.a.Button;class pl 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.lb)(e).then((e=>{Object(a.Wb)(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.Ub)(e,{page:1,limit:1e3}).then((e=>{Object(a.Wb)(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:ul,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)(hl,{onChange:this.authChange,value:this.state.authWay,children:[Object(h.jsxDEV)(bl,{value:1,disabled:!this.state.levelAuth,children:"\u5e73\u7ea7"},void 0,!1,{fileName:ul,lineNumber:132,columnNumber:15},this),Object(h.jsxDEV)(bl,{value:0,disabled:!this.state.downLevel,children:"\u4e0b\u7ea7"},void 0,!1,{fileName:ul,lineNumber:135,columnNumber:15},this)]},void 0,!0,{fileName:ul,lineNumber:131,columnNumber:13},this)},void 0,!1,{fileName:ul,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:ul,lineNumber:141,columnNumber:13},this)},void 0,!1,{fileName:ul,lineNumber:140,columnNumber:11},this)]},void 0,!0,{fileName:ul,lineNumber:129,columnNumber:9},this)]},void 0,!0,{fileName:ul,lineNumber:125,columnNumber:7},this):null}}var Nl="D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\pages\\system\\account\\list\\modifypwd.js";function jl(e,t){return e!==t.getSectionValue("password").password?{name:"passwordEqual",message:"\u4e24\u6b21\u586b\u5199\u7684\u5bc6\u7801\u4e0d\u4e00\u81f4"}:null}var vl=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.Dc)(e.id,t).then((t=>{Object(a.Wb)(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)(f.a,{type:"password"==i?"eye-o":"closed-eye",onClick:()=>{s("password"==i?"text":"password")}},void 0,!1,{fileName:Nl,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:Nl,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)(f.a,{type:"password"==l?"eye-o":"closed-eye",onClick:()=>{n("password"==l?"text":"password")}},void 0,!1,{fileName:Nl,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"),jl],props:{type:"password"==l?"password":"text",maxLength:16,autoComplete:"new-password"}},void 0,!1,{fileName:Nl,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:Nl,lineNumber:102,columnNumber:9},void 0),",",Object(h.jsxDEV)(u.a,{onClick:()=>{e.visibleShow(!1)},children:"\u53d6\u6d88"},void 0,!1,{fileName:Nl,lineNumber:105,columnNumber:10},void 0)]},void 0,!0,{fileName:Nl,lineNumber:101,columnNumber:7},void 0)]},void 0,!0,{fileName:Nl,lineNumber:61,columnNumber:5},void 0)},fl="D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\pages\\system\\account\\list\\list.js";const gl=[{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 xl 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:fl,lineNumber:139,columnNumber:11},this),"\u8d26\u53f7\uff1f"]},void 0,!0,{fileName:fl,lineNumber:137,columnNumber:9},this),onConfirm:()=>{Object(a.vc)(t.id,s).then((e=>{Object(a.Wb)(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.X)().then((e=>{Object(a.Wb)(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.N)(l).then((t=>{Object(a.Wb)(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:fl,lineNumber:297,columnNumber:22},this),"\uff1f"]},void 0,!0,{fileName:fl,lineNumber:296,columnNumber:13},this),onConfirm:()=>{let i={admin_user_id:this.state.deldata.id,receive_uid:t.personnel.key};Object(a.Nc)(i).then((t=>{Object(a.Wb)(t,((t,i)=>{c.a.clear(),c.a.success(i),setTimeout((()=>{Object(a.o)(this.state.deldata.id).then((t=>{Object(a.Wb)(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:fl,lineNumber:350,columnNumber:22},this),"\uff1f"]},void 0,!0,{fileName:fl,lineNumber:349,columnNumber:13},this),onConfirm:()=>{let i={admin_user_id:this.state.deldata.id,receive_uid:t.personnel.key};Object(a.wc)(i).then((t=>{Object(a.Wb)(t,((t,i)=>{c.a.clear(),c.a.success(i),setTimeout((()=>{Object(a.o)(this.state.deldata.id).then((t=>{Object(a.Wb)(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:fl,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:fl,lineNumber:452,columnNumber:15},this)]},void 0,!0,{fileName:fl,lineNumber:447,columnNumber:13},this),Object(h.jsxDEV)("div",{className:"table-container",children:Object(h.jsxDEV)(T,{spliteColor:"#fff",tableData:this.state.accList,Column:gl,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:fl,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:fl,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:fl,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:fl,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:fl,lineNumber:510,columnNumber:25},this)]},void 0,!0,{fileName:fl,lineNumber:500,columnNumber:23},this):void 0},void 0,!1,{fileName:fl,lineNumber:468,columnNumber:15},this)},void 0,!1,{fileName:fl,lineNumber:467,columnNumber:13},this)]},void 0,!0,{fileName:fl,lineNumber:446,columnNumber:11},this)},void 0,!1,{fileName:fl,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)(vl,{visibleShow:e=>this.setVisible(e),id:this.state.id},void 0,!1,{fileName:fl,lineNumber:529,columnNumber:13},this)},void 0,!1,{fileName:fl,lineNumber:528,columnNumber:11},this)},void 0,!1,{fileName:fl,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:fl,lineNumber:540,columnNumber:15},this),Object(h.jsxDEV)(u.a,{onClick:e=>{this.setdelVisible(!1)},children:"\u53d6\u6d88"},void 0,!1,{fileName:fl,lineNumber:548,columnNumber:15},this)]},void 0,!0,{fileName:fl,lineNumber:539,columnNumber:13},this),children:Object(h.jsxDEV)("div",{children:Object(h.jsxDEV)(pl,{deldata:this.state.deldata,visibleShow:e=>this.setdelVisible(e),id:this.state.id,ref:"delAuthDom"},void 0,!1,{fileName:fl,lineNumber:559,columnNumber:13},this)},void 0,!1,{fileName:fl,lineNumber:558,columnNumber:11},this)},void 0,!1,{fileName:fl,lineNumber:533,columnNumber:9},this)]},void 0,!0,{fileName:fl,lineNumber:443,columnNumber:7},this)}}var _l=i(505),yl=(i(264),"D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\pages\\system\\customize\\main.js");const Ol=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:yl,lineNumber:14,columnNumber:7},void 0),Object(h.jsxDEV)("span",{className:"delfilebtn",onClick:()=>i(t),children:"\u5220\u9664"},void 0,!1,{fileName:yl,lineNumber:15,columnNumber:7},void 0)]},void 0,!0,{fileName:yl,lineNumber:13,columnNumber:5},void 0)};class Dl 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.fd)(i).then((e=>{Object(a.Wb)(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:yl,lineNumber:85,columnNumber:19},this),"\u6a21\u677f\uff1f"]},void 0,!0,{fileName:yl,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.uc)(t).then((e=>{Object(a.Wb)(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.sb)().then((t=>{Object(a.Wb)(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:yl,lineNumber:183,columnNumber:15},this)},void 0,!1,{fileName:yl,lineNumber:182,columnNumber:13},this),Object(h.jsxDEV)(s.a,{labelname:"\u6587\u4ef6\u4e0a\u4f20",prop:"zip",children:Object(h.jsxDEV)(_l.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:Ol,onError:this.onUploadError,sortable:!0},void 0,!1,{fileName:yl,lineNumber:204,columnNumber:15},this)},void 0,!1,{fileName:yl,lineNumber:203,columnNumber:13},this),Object(h.jsxDEV)(s.a,{labelname:"\u622a\u56fe\u4e0a\u4f20",prop:"picurl",children:Object(h.jsxDEV)(ft.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:yl,lineNumber:217,columnNumber:15},this)},void 0,!1,{fileName:yl,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:yl,lineNumber:230,columnNumber:15},this)},void 0,!1,{fileName:yl,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:yl,lineNumber:241,columnNumber:15},this)},void 0,!1,{fileName:yl,lineNumber:240,columnNumber:13},this)]},void 0,!0,{fileName:yl,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:yl,lineNumber:253,columnNumber:13},this),Object(h.jsxDEV)(u.a,{type:"normal",onClick:()=>this.onCancel(),children:"\u53d6\u6d88"},void 0,!1,{fileName:yl,lineNumber:256,columnNumber:13},this)]},void 0,!0,{fileName:yl,lineNumber:252,columnNumber:11},this)]},void 0,!0,{fileName:yl,lineNumber:180,columnNumber:9},this)},void 0,!1,{fileName:yl,lineNumber:179,columnNumber:7},this)}}var El=i(493),Vl=(i(265),"D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\pages\\system\\menu\\leftnav\\leftnav.js");class kl 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.mb)().then((t=>{Object(a.Wb)(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)(El.a,{checkable:!0,size:"small",data:this.state.menu_data,onCheck:this.onCheck,onSelect:this.onselect,checkedKeys:e,disabledCheckedKeys:t},void 0,!1,{fileName:Vl,lineNumber:56,columnNumber:9},this)},void 0,!1,{fileName:Vl,lineNumber:55,columnNumber:7},this)}}var Sl=i(498),wl=(i(266),"D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\pages\\system\\menu\\menubody\\menubody.js");const Cl=Z.a.Group,Il=Z.a.Button;class Tl 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:wl,lineNumber:76,columnNumber:13},this)},void 0,!1,{fileName:wl,lineNumber:75,columnNumber:11},this),Object(h.jsxDEV)(s.a,{required:!1,labelname:"\u83dc\u5355\u7c7b\u578b",children:Object(h.jsxDEV)(Cl,{onChange:this.typeonChange,value:this.state.model.level,children:[Object(h.jsxDEV)(Il,{value:"1",children:"\u4e00\u7ea7\u83dc\u5355"},void 0,!1,{fileName:wl,lineNumber:98,columnNumber:15},this),Object(h.jsxDEV)(Il,{value:"5",children:"\u4e8c\u7ea7\u83dc\u5355"},void 0,!1,{fileName:wl,lineNumber:99,columnNumber:15},this),Object(h.jsxDEV)(Il,{value:"10",children:"\u64cd\u4f5c\u6309\u94ae"},void 0,!1,{fileName:wl,lineNumber:100,columnNumber:15},this)]},void 0,!0,{fileName:wl,lineNumber:97,columnNumber:13},this)},void 0,!1,{fileName:wl,lineNumber:96,columnNumber:11},this),Object(h.jsxDEV)(s.a,{required:!1,labelname:"\u8bf7\u6c42\u65b9\u5f0f",children:Object(h.jsxDEV)(Cl,{onChange:this.methodsonChange,value:this.state.model.method,children:[Object(h.jsxDEV)(Il,{value:"1",children:"GET"},void 0,!1,{fileName:wl,lineNumber:106,columnNumber:15},this),Object(h.jsxDEV)(Il,{value:"5",children:"POST"},void 0,!1,{fileName:wl,lineNumber:107,columnNumber:15},this),Object(h.jsxDEV)(Il,{value:"10",children:"PUT"},void 0,!1,{fileName:wl,lineNumber:108,columnNumber:15},this),Object(h.jsxDEV)(Il,{value:"15",children:"DELETE"},void 0,!1,{fileName:wl,lineNumber:109,columnNumber:15},this)]},void 0,!0,{fileName:wl,lineNumber:105,columnNumber:13},this)},void 0,!1,{fileName:wl,lineNumber:104,columnNumber:11},this),Object(h.jsxDEV)(s.a,{required:!1,labelname:"\u662f\u5426\u663e\u793a",children:Object(h.jsxDEV)(Cl,{onChange:this.statusChange,value:this.state.model.status,children:[Object(h.jsxDEV)(Il,{value:"1",children:"\u662f"},void 0,!1,{fileName:wl,lineNumber:114,columnNumber:15},this),Object(h.jsxDEV)(Il,{value:"0",children:"\u5426"},void 0,!1,{fileName:wl,lineNumber:115,columnNumber:15},this)]},void 0,!0,{fileName:wl,lineNumber:113,columnNumber:13},this)},void 0,!1,{fileName:wl,lineNumber:112,columnNumber:11},this),Object(h.jsxDEV)(s.a,{required:!1,labelname:"\u662f\u5426\u9a8c\u8bc1\u767b\u9646",children:Object(h.jsxDEV)(Cl,{onChange:this.authChange,value:this.state.model.auth,children:[Object(h.jsxDEV)(Il,{value:"1",children:"\u662f"},void 0,!1,{fileName:wl,lineNumber:120,columnNumber:15},this),Object(h.jsxDEV)(Il,{value:"0",children:"\u5426"},void 0,!1,{fileName:wl,lineNumber:121,columnNumber:15},this)]},void 0,!0,{fileName:wl,lineNumber:119,columnNumber:13},this)},void 0,!1,{fileName:wl,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:wl,lineNumber:125,columnNumber:13},this)},void 0,!1,{fileName:wl,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:wl,lineNumber:146,columnNumber:13},this)},void 0,!1,{fileName:wl,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:wl,lineNumber:167,columnNumber:13},this)},void 0,!1,{fileName:wl,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:wl,lineNumber:188,columnNumber:13},this)},void 0,!1,{fileName:wl,lineNumber:187,columnNumber:11},this),Object(h.jsxDEV)(s.a,{required:!1,labelname:"\u83dc\u5355\u6392\u5e8f",children:Object(h.jsxDEV)(Sl.a,{value:this.state.model.sort,showStepper:!0,onChange:e=>this.sortChange(e),placeholder:"\u8bf7\u8f93\u5165\u6570\u5b57"},void 0,!1,{fileName:wl,lineNumber:209,columnNumber:13},this)},void 0,!1,{fileName:wl,lineNumber:208,columnNumber:11},this)]},void 0,!0,{fileName:wl,lineNumber:74,columnNumber:9},this)},void 0,!1,{fileName:wl,lineNumber:73,columnNumber:7},this)}}i(267);var Fl="D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\pages\\system\\menu\\menuright\\menuright.js";const Ll=Z.a.Group,Ml=Z.a.Button;class Hl 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:Fl,lineNumber:70,columnNumber:18},this),onConfirm:()=>{Object(a.Oc)(this.state.model.id,e).then((e=>{Object(a.Wb)(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:Fl,lineNumber:142,columnNumber:11},this),Object(h.jsxDEV)(u.a,{type:"normal",onClick:this.resetInfo.bind(this),children:"\u91cd\u7f6e"},void 0,!1,{fileName:Fl,lineNumber:145,columnNumber:11},this)]},void 0,!0,{fileName:Fl,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:Fl,lineNumber:151,columnNumber:13},this)},void 0,!1,{fileName:Fl,lineNumber:150,columnNumber:11},this),Object(h.jsxDEV)(s.a,{required:!1,labelname:"\u83dc\u5355\u7c7b\u578b",children:Object(h.jsxDEV)(Ll,{onChange:this.typeonChange,value:this.state.model.level,children:[Object(h.jsxDEV)(Ml,{value:1,children:"\u4e00\u7ea7\u83dc\u5355"},void 0,!1,{fileName:Fl,lineNumber:173,columnNumber:15},this),Object(h.jsxDEV)(Ml,{value:5,children:"\u4e8c\u7ea7\u83dc\u5355"},void 0,!1,{fileName:Fl,lineNumber:174,columnNumber:15},this),Object(h.jsxDEV)(Ml,{value:10,children:"\u64cd\u4f5c\u6309\u94ae"},void 0,!1,{fileName:Fl,lineNumber:175,columnNumber:15},this)]},void 0,!0,{fileName:Fl,lineNumber:172,columnNumber:13},this)},void 0,!1,{fileName:Fl,lineNumber:171,columnNumber:11},this),Object(h.jsxDEV)(s.a,{required:!1,labelname:"\u8bf7\u6c42\u65b9\u5f0f",children:Object(h.jsxDEV)(Ll,{onChange:this.methodsonChange,value:this.state.model.method,children:[Object(h.jsxDEV)(Ml,{value:1,children:"GET"},void 0,!1,{fileName:Fl,lineNumber:181,columnNumber:15},this),Object(h.jsxDEV)(Ml,{value:5,children:"POST"},void 0,!1,{fileName:Fl,lineNumber:182,columnNumber:15},this),Object(h.jsxDEV)(Ml,{value:10,children:"PUT"},void 0,!1,{fileName:Fl,lineNumber:183,columnNumber:15},this),Object(h.jsxDEV)(Ml,{value:15,children:"DELETE"},void 0,!1,{fileName:Fl,lineNumber:184,columnNumber:15},this)]},void 0,!0,{fileName:Fl,lineNumber:180,columnNumber:13},this)},void 0,!1,{fileName:Fl,lineNumber:179,columnNumber:11},this),Object(h.jsxDEV)(s.a,{required:!1,labelname:"\u662f\u5426\u663e\u793a",children:Object(h.jsxDEV)(Ll,{onChange:this.statusChange,value:this.state.model.status,children:[Object(h.jsxDEV)(Ml,{value:1,children:"\u662f"},void 0,!1,{fileName:Fl,lineNumber:189,columnNumber:15},this),Object(h.jsxDEV)(Ml,{value:0,children:"\u5426"},void 0,!1,{fileName:Fl,lineNumber:190,columnNumber:15},this)]},void 0,!0,{fileName:Fl,lineNumber:188,columnNumber:13},this)},void 0,!1,{fileName:Fl,lineNumber:187,columnNumber:11},this),Object(h.jsxDEV)(s.a,{required:!1,labelname:"\u662f\u5426\u9a8c\u8bc1\u767b\u9646",children:Object(h.jsxDEV)(Ll,{onChange:this.authChange,value:this.state.model.auth,children:[Object(h.jsxDEV)(Ml,{value:1,children:"\u662f"},void 0,!1,{fileName:Fl,lineNumber:195,columnNumber:15},this),Object(h.jsxDEV)(Ml,{value:0,children:"\u5426"},void 0,!1,{fileName:Fl,lineNumber:196,columnNumber:15},this)]},void 0,!0,{fileName:Fl,lineNumber:194,columnNumber:13},this)},void 0,!1,{fileName:Fl,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:Fl,lineNumber:200,columnNumber:13},this)},void 0,!1,{fileName:Fl,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:Fl,lineNumber:221,columnNumber:13},this)},void 0,!1,{fileName:Fl,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:Fl,lineNumber:242,columnNumber:13},this)},void 0,!1,{fileName:Fl,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:Fl,lineNumber:263,columnNumber:13},this)},void 0,!1,{fileName:Fl,lineNumber:262,columnNumber:11},this),Object(h.jsxDEV)(s.a,{required:!1,labelname:"\u83dc\u5355\u6392\u5e8f",children:Object(h.jsxDEV)(Sl.a,{value:this.state.model.sort,showStepper:!0,onChange:e=>this.sortChange(e),placeholder:"\u8bf7\u8f93\u5165\u6570\u5b57"},void 0,!1,{fileName:Fl,lineNumber:284,columnNumber:13},this)},void 0,!1,{fileName:Fl,lineNumber:283,columnNumber:11},this)]},void 0,!0,{fileName:Fl,lineNumber:149,columnNumber:9},this)]},void 0,!0,{fileName:Fl,lineNumber:140,columnNumber:7},this)}}i(268);var ql="D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\pages\\system\\menu\\main\\main.js";class Pl 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:ql,lineNumber:42,columnNumber:17},this),"\uff1f"]},void 0,!0,{fileName:ql,lineNumber:41,columnNumber:11},this),onConfirm:()=>{Object(a.v)(e.id).then((e=>{Object(a.Wb)(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.lc)(e).then((e=>{Object(a.Wb)(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:ql,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:ql,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:ql,lineNumber:105,columnNumber:13},this)]},void 0,!0,{fileName:ql,lineNumber:98,columnNumber:11},this)},void 0,!1,{fileName:ql,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)(kl,{ref:"navitem",menuInfo:e=>{this.getMenuInfo(e)}},void 0,!1,{fileName:ql,lineNumber:113,columnNumber:15},this)},void 0,!1,{fileName:ql,lineNumber:112,columnNumber:13},this)},void 0,!1,{fileName:ql,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)(Hl,{menuList:this.state.selectdom},void 0,!1,{fileName:ql,lineNumber:123,columnNumber:15},this)},void 0,!1,{fileName:ql,lineNumber:122,columnNumber:13},this)},void 0,!1,{fileName:ql,lineNumber:121,columnNumber:11},this)]},void 0,!0,{fileName:ql,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:ql,lineNumber:135,columnNumber:15},this),",",Object(h.jsxDEV)(u.a,{onClick:()=>this.setVisible(!1),children:"\u53d6\u6d88"},void 0,!1,{fileName:ql,lineNumber:138,columnNumber:16},this)]},void 0,!0,{fileName:ql,lineNumber:134,columnNumber:13},this),title:this.state.dialogtitle,children:Object(h.jsxDEV)(Tl,{ref:"menubody",fid:this.state.fid},void 0,!1,{fileName:ql,lineNumber:143,columnNumber:11},this)},void 0,!1,{fileName:ql,lineNumber:128,columnNumber:9},this)]},void 0,!0,{fileName:ql,lineNumber:96,columnNumber:7},this)}}i(269);var Wl="D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\pages\\system\\role\\tree\\tree.js";class Bl 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.mb)().then((t=>{Object(a.Wb)(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)(El.a,{checkable:!0,size:"medium",data:this.state.menu_data,onCheck:this.onCheck,checkedKeys:e,disabledCheckedKeys:t},void 0,!1,{fileName:Wl,lineNumber:38,columnNumber:9},this)},void 0,!1,{fileName:Wl,lineNumber:37,columnNumber:7},this)}}i(270);var Al="D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\pages\\system\\role\\add\\add.js";class Jl 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:Al,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:Al,lineNumber:61,columnNumber:21},this),"\u89d2\u8272\uff1f"]},void 0,!0,{fileName:Al,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:Al,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.tc)(e).then((e=>{Object(a.Wb)(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.Cc)(t.state.menuList.id,e).then((e=>{Object(a.Wb)(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:Al,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:Al,lineNumber:142,columnNumber:15},this)},void 0,!1,{fileName:Al,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:Al,lineNumber:164,columnNumber:17},this),Object(h.jsxDEV)(ne.a,{value:5,children:"\u8be5\u8d26\u53f7\u6570\u636e"},void 0,!1,{fileName:Al,lineNumber:165,columnNumber:17},this)]},void 0,!0,{fileName:Al,lineNumber:163,columnNumber:15},this)},void 0,!1,{fileName:Al,lineNumber:162,columnNumber:13},this),Object(h.jsxDEV)(s.a,{labelname:"\u8bbe\u7f6e\u6743\u9650",prop:"setrole",id:"setrole",children:Object(h.jsxDEV)(Bl,{ref:"roletree",rules:this.state.menuList.rule_id},void 0,!1,{fileName:Al,lineNumber:169,columnNumber:15},this)},void 0,!1,{fileName:Al,lineNumber:168,columnNumber:13},this)]},void 0,!0,{fileName:Al,lineNumber:140,columnNumber:11},this)},void 0,!1,{fileName:Al,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:Al,lineNumber:174,columnNumber:11},this),Object(h.jsxDEV)(u.a,{type:"normal",onClick:this.cancel.bind(this),children:"\u53d6\u6d88"},void 0,!1,{fileName:Al,lineNumber:177,columnNumber:11},this)]},void 0,!0,{fileName:Al,lineNumber:173,columnNumber:9},this)]},void 0,!0,{fileName:Al,lineNumber:137,columnNumber:7},this)}}i(271);var zl="D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\pages\\system\\role\\list\\list.js";const Rl=[{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 Kl 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.Bb)(s).then((t=>{Object(a.Wb)(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.Wb)(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)(T,{spliteColor:"#fff",tableData:this.state.roleList,Column:Rl,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 Yl=i(480),$l=(i(272),"D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\pages\\system\\station\\main.js");class Ul 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.X)().then((t=>{Object(a.Wb)(t,((t,i)=>{e.setState({company:t})}),(e=>{c.a.error(e)}))})).catch((e=>{}))}getDepartmentFn(e){let t=this;Object(a.ab)({company_id:e}).then((e=>{Object(a.Wb)(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.bb)({department_id:e}).then((e=>{Object(a.Wb)(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.jc)(t).then((t=>{Object(a.Wb)(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.nc)(t).then((t=>{Object(a.Wb)(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.pc)(t).then((t=>{Object(a.Wb)(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.jc)(i).then((e=>{Object(a.Wb)(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.nc)(i).then((e=>{Object(a.Wb)(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.pc)(i).then((e=>{Object(a.Wb)(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:$l,lineNumber:376,columnNumber:15},this),"\uff1f"]},void 0,!0,{fileName:$l,lineNumber:375,columnNumber:9},this),onConfirm:()=>{"\u516c\u53f8"==i?Object(a.r)(n).then((e=>{Object(a.Wb)(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.Wb)(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.Wb)(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:$l,lineNumber:445,columnNumber:16},this),onConfirm:()=>{"\u516c\u53f8"==i?Object(a.kc)(l,{company_name:t.company_name}).then((e=>{Object(a.Wb)(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.oc)(l,{department_name:t.department_name}).then((e=>{Object(a.Wb)(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.qc)(l,{job_name:t.job_name}).then((e=>{Object(a.Wb)(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(Yl.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(Yl.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(Yl.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:$l,lineNumber:649,columnNumber:17},this),Object(h.jsxDEV)("div",{className:"addList"},void 0,!1,{fileName:$l,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:$l,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\r ",onClick:t=>this.cancelbtnFn(t,e,"\u516c\u53f8"),children:"\u53d6\u6d88"},void 0,!1,{fileName:$l,lineNumber:682,columnNumber:31},this),Object(h.jsxDEV)("span",{className:"operation\r ",onClick:t=>this.savebtnFn(t,e,"\u516c\u53f8"),children:"\u4fdd\u5b58"},void 0,!1,{fileName:$l,lineNumber:689,columnNumber:31},this)]},void 0,!0,{fileName:$l,lineNumber:681,columnNumber:29},this):Object(h.jsxDEV)("p",{children:[1!=e.id?Object(h.jsxDEV)("span",{className:"del\r ",onClick:t=>this.delbtnFn(t,e,"\u516c\u53f8"),children:"\u5220\u9664"},void 0,!1,{fileName:$l,lineNumber:700,columnNumber:33},this):null,Object(h.jsxDEV)("span",{className:"operation\r ",onClick:t=>this.editbtnFn(t,e,"\u516c\u53f8"),children:"\u7f16\u8f91"},void 0,!1,{fileName:$l,lineNumber:708,columnNumber:31},this)]},void 0,!0,{fileName:$l,lineNumber:698,columnNumber:29},this)]},t,!0,{fileName:$l,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:$l,lineNumber:721,columnNumber:21},this)},void 0,!1,{fileName:$l,lineNumber:653,columnNumber:17},this)]},void 0,!0,{fileName:$l,lineNumber:648,columnNumber:15},this)},void 0,!1,{fileName:$l,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:$l,lineNumber:728,columnNumber:17},this),Object(h.jsxDEV)("div",{className:"addList"},void 0,!1,{fileName:$l,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:$l,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\r ",onClick:t=>this.cancelbtnFn(t,e,"\u90e8\u95e8"),children:"\u53d6\u6d88"},void 0,!1,{fileName:$l,lineNumber:761,columnNumber:31},this),Object(h.jsxDEV)("span",{className:"operation\r ",onClick:t=>this.savebtnFn(t,e,"\u90e8\u95e8"),children:"\u4fdd\u5b58"},void 0,!1,{fileName:$l,lineNumber:768,columnNumber:31},this)]},void 0,!0,{fileName:$l,lineNumber:760,columnNumber:29},this):Object(h.jsxDEV)("p",{children:[Object(h.jsxDEV)("span",{className:"del\r ",onClick:t=>this.delbtnFn(t,e,"\u90e8\u95e8"),children:"\u5220\u9664"},void 0,!1,{fileName:$l,lineNumber:778,columnNumber:31},this),Object(h.jsxDEV)("span",{className:"operation\r ",onClick:t=>this.editbtnFn(t,e,"\u90e8\u95e8"),children:"\u7f16\u8f91"},void 0,!1,{fileName:$l,lineNumber:785,columnNumber:31},this)]},void 0,!0,{fileName:$l,lineNumber:777,columnNumber:29},this)]},t,!0,{fileName:$l,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:$l,lineNumber:798,columnNumber:21},this):null},void 0,!1,{fileName:$l,lineNumber:732,columnNumber:17},this)]},void 0,!0,{fileName:$l,lineNumber:727,columnNumber:15},this)},void 0,!1,{fileName:$l,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:$l,lineNumber:805,columnNumber:17},this),Object(h.jsxDEV)("div",{className:"addList"},void 0,!1,{fileName:$l,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:$l,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\r ",onClick:t=>this.cancelbtnFn(t,e,"\u5c97\u4f4d"),children:"\u53d6\u6d88"},void 0,!1,{fileName:$l,lineNumber:837,columnNumber:31},this),Object(h.jsxDEV)("span",{className:"operation\r ",onClick:t=>this.savebtnFn(t,e,"\u5c97\u4f4d"),children:"\u4fdd\u5b58"},void 0,!1,{fileName:$l,lineNumber:844,columnNumber:31},this)]},void 0,!0,{fileName:$l,lineNumber:836,columnNumber:29},this):Object(h.jsxDEV)("p",{children:[Object(h.jsxDEV)("span",{className:"del\r ",onClick:t=>this.delbtnFn(t,e,"\u5c97\u4f4d"),children:"\u5220\u9664"},void 0,!1,{fileName:$l,lineNumber:854,columnNumber:31},this),Object(h.jsxDEV)("span",{className:"operation\r ",onClick:t=>this.editbtnFn(t,e,"\u5c97\u4f4d"),children:"\u7f16\u8f91"},void 0,!1,{fileName:$l,lineNumber:861,columnNumber:31},this)]},void 0,!0,{fileName:$l,lineNumber:853,columnNumber:29},this)]},void 0,!0,{fileName:$l,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:$l,lineNumber:874,columnNumber:21},this)},void 0,!1,{fileName:$l,lineNumber:809,columnNumber:17},this)]},void 0,!0,{fileName:$l,lineNumber:804,columnNumber:15},this)},void 0,!1,{fileName:$l,lineNumber:803,columnNumber:13},this)]},void 0,!0,{fileName:$l,lineNumber:646,columnNumber:11},this)},void 0,!1,{fileName:$l,lineNumber:645,columnNumber:9},this)},void 0,!1,{fileName:$l,lineNumber:644,columnNumber:7},this)}}i(273);var Gl="D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\pages\\system\\subAccount\\add\\adduserinfo\\tree.js";class Ql 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.Tb)(t).then((t=>{Object(a.Wb)(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:Gl,lineNumber:98,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:Gl,lineNumber:100,columnNumber:13},this)},void 0,!1,{fileName:Gl,lineNumber:99,columnNumber:11},this)]},void 0,!0,{fileName:Gl,lineNumber:97,columnNumber:9},this),Object(h.jsxDEV)(El.a,{checkable:!0,size:"medium",data:this.state.menu_data,onCheck:this.onCheck,checkedKeys:e,disabledCheckedKeys:t},void 0,!1,{fileName:Gl,lineNumber:105,columnNumber:9},this)]},void 0,!0,{fileName:Gl,lineNumber:96,columnNumber:7},this)}}var Zl="D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\pages\\system\\subAccount\\add\\adduserinfo\\adduserinfo.js";class Xl 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.ab)({company_id:m.company.key}).then((t=>{Object(a.Wb)(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.bb)({department_id:m.deparment.key}).then((t=>{Object(a.Wb)(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:Zl,lineNumber:142,columnNumber:19},this),"\u8d26\u53f7\uff1f"]},void 0,!0,{fileName:Zl,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:Zl,lineNumber:146,columnNumber:19},this),"\u8d26\u53f7\u4fe1\u606f\uff1f"]},void 0,!0,{fileName:Zl,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.ic)(e).then((e=>{Object(a.Wb)(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.yc)(t,e).then((e=>{Object(a.Wb)(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.fd)(i).then((e=>{Object(a.Wb)(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({departmentJob:[],departmentList:[],model:i}),Object(a.ab)({company_id:e.key}).then((e=>{Object(a.Wb)(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({departmentJob:[],departmentList:[]})}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,departmentJob:[]}),e?Object(a.bb)({department_id:e.key}).then((e=>{Object(a.Wb)(e,((e,i)=>{let a=e.map((e=>({key:e.id,text:e.job_name}))),s=this.state.model;s.post="",t.setState({model:s,departmentJob:a})}),(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.X)().then((t=>{Object(a.Wb)(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.Ab)().then((t=>{Object(a.Wb)(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:Zl,lineNumber:394,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:Zl,lineNumber:431,columnNumber:17},this)},void 0,!1,{fileName:Zl,lineNumber:430,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:Zl,lineNumber:453,columnNumber:17},this)},void 0,!1,{fileName:Zl,lineNumber:452,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:Zl,lineNumber:475,columnNumber:17},this)},void 0,!1,{fileName:Zl,lineNumber:474,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:Zl,lineNumber:503,columnNumber:17},this)},void 0,!1,{fileName:Zl,lineNumber:502,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),Ut.a.emit("change","company",e)}},void 0,!1,{fileName:Zl,lineNumber:524,columnNumber:17},this)},void 0,!1,{fileName:Zl,lineNumber:523,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),Ut.a.emit("change","deparment",e)}},void 0,!1,{fileName:Zl,lineNumber:535,columnNumber:17},this)},void 0,!1,{fileName:Zl,lineNumber:534,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),Ut.a.emit("change","post",e)}},void 0,!1,{fileName:Zl,lineNumber:547,columnNumber:17},this)},void 0,!1,{fileName:Zl,lineNumber:546,columnNumber:15},this),Object(h.jsxDEV)(s.a,{required:"",labelname:"\u8bbe\u7f6e\u6743\u9650",myClassName:"rolechoose",id:"station",children:Object(h.jsxDEV)(Ql,{ref:"roletree",rules:this.state.ruleId,enum:this.props.enumer},void 0,!1,{fileName:Zl,lineNumber:559,columnNumber:17},this)},void 0,!1,{fileName:Zl,lineNumber:558,columnNumber:15},this)]},void 0,!0,{fileName:Zl,lineNumber:429,columnNumber:13},this),Object(h.jsxDEV)("div",{className:"mypic",children:[Object(h.jsxDEV)("b",{children:"\u5934\u50cf"},void 0,!1,{fileName:Zl,lineNumber:563,columnNumber:15},this),Object(h.jsxDEV)("div",{className:"changepic dflexac",children:""==this.state.defaultFileList[0].src?Object(h.jsxDEV)(ft.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:Zl,lineNumber:566,columnNumber:19},this):Object(h.jsxDEV)(ft.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:Zl,lineNumber:578,columnNumber:19},this)},void 0,!1,{fileName:Zl,lineNumber:564,columnNumber:15},this)]},void 0,!0,{fileName:Zl,lineNumber:562,columnNumber:13},this)]},void 0,!0,{fileName:Zl,lineNumber:428,columnNumber:11},this)},void 0,!1,{fileName:Zl,lineNumber:427,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:Zl,lineNumber:596,columnNumber:11},this),Object(h.jsxDEV)(u.a,{type:"normal",htmlType:"reset",onClick:this.cancel.bind(this),children:"\u53d6\u6d88"},void 0,!1,{fileName:Zl,lineNumber:599,columnNumber:11},this)]},void 0,!0,{fileName:Zl,lineNumber:595,columnNumber:9},this)]},void 0,!0,{fileName:Zl,lineNumber:426,columnNumber:7},this)}}i(274);var en="D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\pages\\system\\subAccount\\add\\add.js";class tn 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)(Xl,{enumer:this.state.enumer,rowData:this.state.rowData,title:this.state.pagetitle},void 0,!1,{fileName:en,lineNumber:24,columnNumber:11},this)},void 0,!1,{fileName:en,lineNumber:23,columnNumber:9},this)},void 0,!1,{fileName:en,lineNumber:22,columnNumber:7},this)}}i(275);var an="D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\pages\\system\\subAccount\\list\\modifypwd.js";function sn(e,t){return e!==t.getSectionValue("password").password?{name:"passwordEqual",message:"\u4e24\u6b21\u586b\u5199\u7684\u5bc6\u7801\u4e0d\u4e00\u81f4"}:null}var ln=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.Dc)(e.id,t).then((t=>{Object(a.Wb)(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)(f.a,{type:"password"==i?"eye-o":"closed-eye",onClick:()=>{s("password"==i?"text":"password")}},void 0,!1,{fileName:an,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:an,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)(f.a,{type:"password"==l?"eye-o":"closed-eye",onClick:()=>{n("password"==l?"text":"password")}},void 0,!1,{fileName:an,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"),sn],props:{type:"password"==l?"password":"text",maxLength:16,autoComplete:"new-password"}},void 0,!1,{fileName:an,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:an,lineNumber:101,columnNumber:9},void 0),",",Object(h.jsxDEV)(u.a,{onClick:()=>{e.visibleShow(!1)},children:"\u53d6\u6d88"},void 0,!1,{fileName:an,lineNumber:104,columnNumber:10},void 0)]},void 0,!0,{fileName:an,lineNumber:100,columnNumber:7},void 0)]},void 0,!0,{fileName:an,lineNumber:60,columnNumber:5},void 0)},nn="D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\pages\\system\\subAccount\\list\\list.js";const on=[{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 rn 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:nn,lineNumber:127,columnNumber:11},this),"\u8d26\u53f7\uff1f"]},void 0,!0,{fileName:nn,lineNumber:125,columnNumber:9},this),onConfirm:()=>{Object(a.vc)(t.id,s).then((e=>{Object(a.Wb)(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:nn,lineNumber:176,columnNumber:15},this),"\uff1f"]},void 0,!0,{fileName:nn,lineNumber:175,columnNumber:9},this),onConfirm:()=>{Object(a.o)(t.id).then((e=>{Object(a.Wb)(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.X)().then((e=>{Object(a.Wb)(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.Ub)(sessionStorage.getItem("subaid"),l).then((t=>{Object(a.Wb)(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.Fb)(l).then((t=>{Object(a.Wb)(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:nn,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:nn,lineNumber:382,columnNumber:15},this)]},void 0,!0,{fileName:nn,lineNumber:377,columnNumber:13},this),Object(h.jsxDEV)("div",{className:"table-container",children:Object(h.jsxDEV)(T,{spliteColor:"#fff",tableData:this.state.accList,Column:on,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:nn,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:nn,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:nn,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:nn,lineNumber:437,columnNumber:25},this)]},void 0,!0,{fileName:nn,lineNumber:430,columnNumber:23},this):void 0},void 0,!1,{fileName:nn,lineNumber:398,columnNumber:15},this)},void 0,!1,{fileName:nn,lineNumber:397,columnNumber:13},this)]},void 0,!0,{fileName:nn,lineNumber:376,columnNumber:11},this)},void 0,!1,{fileName:nn,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)(ln,{visibleShow:e=>this.setVisible(e),id:this.state.id},void 0,!1,{fileName:nn,lineNumber:456,columnNumber:13},this)},void 0,!1,{fileName:nn,lineNumber:455,columnNumber:11},this)},void 0,!1,{fileName:nn,lineNumber:449,columnNumber:9},this)]},void 0,!0,{fileName:nn,lineNumber:373,columnNumber:7},this)}}i(276);var mn="D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\pages\\system\\systemMould\\main.js";const cn=[{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 dn 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,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.Gb)(e).then((e=>{Object(a.Wb)(e,((e,t)=>{this.setState({dataCount:e.total,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:mn,lineNumber:175,columnNumber:15},this),"\uff1f"]},void 0,!0,{fileName:mn,lineNumber:174,columnNumber:9},this),onConfirm:()=>{Object(a.y)(t.id).then((e=>{Object(a.Wb)(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:mn,lineNumber:210,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:mn,lineNumber:221,columnNumber:13},this)]},void 0,!0,{fileName:mn,lineNumber:209,columnNumber:11},this),Object(h.jsxDEV)("div",{className:"code-table",children:Object(h.jsxDEV)(T,{spliteColor:"#fff",tableData:this.state.distdata,Column:cn,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:mn,lineNumber:261,columnNumber:25},this),children:Object(h.jsxDEV)("img",{src:t.thumb,alt:"",style:{width:"30px",height:"30px"}},void 0,!1,{fileName:mn,lineNumber:268,columnNumber:23},this)},void 0,!1,{fileName:mn,lineNumber:257,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:mn,lineNumber:284,columnNumber:23},this)," ",Object(h.jsxDEV)("a",{onClick:e=>{this.delFn(e,t)},className:"grid-link",children:[" ","\u5220\u9664"," "]},void 0,!0,{fileName:mn,lineNumber:293,columnNumber:23},this)]},void 0,!0,{fileName:mn,lineNumber:283,columnNumber:21},this):void 0},void 0,!1,{fileName:mn,lineNumber:237,columnNumber:13},this)},void 0,!1,{fileName:mn,lineNumber:236,columnNumber:11},this)]},void 0,!0,{fileName:mn,lineNumber:208,columnNumber:9},this)},void 0,!1,{fileName:mn,lineNumber:207,columnNumber:7},this)}}const un=[{path:"/home/exchangepage",component:Na},{path:"/home/plan-message",component:function(){const[e,t]=Object(R.a)({tableData:[],backupTableData:[],tabs:[{title:"\u63d0\u793a\u5217\u8868"}],planId:sessionStorage.getItem("plan_id")});return Object(r.useEffect)((()=>{t({tableData:Object(de.a)(ll),backupTableData:Object(de.a)(ll)}),Object(a.S)(e.planId)}),[]),Object(h.jsxDEV)("div",{className:"planMessages",children:[Object(h.jsxDEV)(Ft,{tabs:e.tabs,children:Object(h.jsxDEV)(T,{spliteColor:"#fff",isShowPageBar:!1,isSwitch:!1,isMultiple:!1,countbarVisible:!1,tableData:e.tableData,Column:[{title:"\u8303\u56f4",prop:"typeText",name:"typeText",type:"normal",width:"200px"},{title:"\u89e6\u53d1\u539f\u56e0",name:"statusText",prop:"statusText",type:"normal",width:"300px"},{title:"\u53ef\u7528\u53d8\u91cf",name:"variables",prop:"variables",type:"slot",width:"200px"},{title:"\u9ed8\u8ba4\u63d0\u793a",name:"defaultPrompt",prop:"defaultPrompt",type:"normal",width:"450px"},{title:"\u5b9a\u5236\u63d0\u793a",prop:"customizePrompt",name:"customizePrompt",type:"slot",width:"520px"}],maxheight:670,ComponentHandler:(i,a)=>"customizePrompt"===i?Object(h.jsxDEV)(n.a,{onChange:i=>{a.customizePrompt=i,t({...e})},onClearItem:()=>{a.customizePrompt="",t({...e})},value:a.customizePrompt,placeholder:"\u8bf7\u8f93\u5165\uff08\u8bf7\u52ff\u8f93\u5165\u8fc7\u957f\u6587\u6848\uff0c\u4ee5\u9632C\u7aef\u5f39\u7a97\u5c55\u793a\u5f02\u5e38\uff0c\u53d8\u91cf\u4f7f\u7528 ${xx} \u683c\u5f0f\u3002\uff09",labelWidth:"0px",countShow:!1,disabled:a.readOnly,height:"36px",width:"400px",alignment:"left"},void 0,!1,{fileName:sl,lineNumber:168,columnNumber:17},this):"variables"===i?Object(h.jsxDEV)("div",{children:[Object(h.jsxDEV)("p",{className:"variable",children:["\u5f00\u59cb\u65f6\u95f4: ",Object(h.jsxDEV)("span",{children:"${start_time}"},void 0,!1,{fileName:sl,lineNumber:193,columnNumber:27},this)]},void 0,!0,{fileName:sl,lineNumber:192,columnNumber:19},this),Object(h.jsxDEV)("p",{className:"variable",children:["\u7ed3\u675f\u65f6\u95f4: ",Object(h.jsxDEV)("span",{children:"${end_time}"},void 0,!1,{fileName:sl,lineNumber:196,columnNumber:27},this)]},void 0,!0,{fileName:sl,lineNumber:195,columnNumber:19},this)]},void 0,!0,{fileName:sl,lineNumber:191,columnNumber:17},this):void 0},void 0,!1,{fileName:sl,lineNumber:156,columnNumber:9},this)},void 0,!1,{fileName:sl,lineNumber:155,columnNumber:7},this),Object(h.jsxDEV)("div",{className:"button_box",children:[Object(h.jsxDEV)(u.a,{type:"primary",onClick:function(){const t=[];e.tableData.map((i=>{e.backupTableData.map((e=>{i.id===e.id&&i.customizePrompt!==e.customizePrompt&&t.push(i)}))}))},children:"\u63d0\u4ea4"},void 0,!1,{fileName:sl,lineNumber:205,columnNumber:9},this),Object(h.jsxDEV)(u.a,{type:"normal",onClick:()=>window.history.go(-1),children:"\u53d6\u6d88"},void 0,!1,{fileName:sl,lineNumber:208,columnNumber:9},this)]},void 0,!0,{fileName:sl,lineNumber:204,columnNumber:7},this)]},void 0,!0,{fileName:sl,lineNumber:154,columnNumber:5},this)}},{path:"/home/settlementList",component:Za},{path:"/home/packageDetail",component:ts},{path:"/home/mytempMould",component:ya},{path:"/home/myexchangetemplate",component:fa},{path:"/home/order-list",component:Wa},{path:"/home/download-orderlist",component:ka},{path:"/home/order-addetails",component:Ra},{path:"/home/plan",component:al},{path:"/home/plan-list",component:il},{path:"/home/plan-qrcode",component:ol},{path:"/home/plan-create",component:ys},{path:"/home/plan-edit",component:Ds},{path:"/home/plan-edit-copy",component:Vs},{path:"/home/key-list",component:Bs},{path:"/home/plan-keyList",component:Qs},{path:"/home/key-addEdit",component:Cs},{path:"/home/key-detail",component:Ts},{path:"/home/key-log",component:Ms},{path:"/home/system/account-add",component:dl},{path:"/home/system/subaccount-list",component:rn},{path:"/home/system/subaccount-add",component:tn},{path:"/home/system/role-list",component:Kl},{path:"/home/system/role-add",component:Jl},{path:"/home/system/station",component:Ul},{path:"/home/system/customize",component:Dl},{path:"/home/system/menu",component:Pl},{path:"/home/system/my-mould",component:dn},{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(R.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.P)().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)($t.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.L)({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.ad)(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:xl},{path:"/home/exchangecode-exchangecodeAdd",component:Ji},{path:"/home/combiningAdd",component:ia},{path:"/home/coupon-list",component:Yt},{path:"/home/coupon-add-edit",component:It},{path:"/home/coupon-commodity",component:Wt},{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.Pc)(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.bd)(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.Zc)(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.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})}))}},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)}}],hn=["/home/extension","/home/plan-create","/home/mytempMould","/home/edittemplate"],bn=[{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"]}]}]},415:function(e,t,i){},416:function(e,t,i){},437:function(e,t,i){},499:function(e,t,i){"use strict";i.r(t),i.d(t,"default",(function(){return k}));var a=i(59),s=(i(36),i(69)),l=i(1),n=i.n(l),o=i(25),r=i(289),m=(i(415),i(10)),c="D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\components\\mouseMenu\\main.js";class d extends n.a.Component{constructor(e){super(e),this.state={activeMenuList:[]}}componentDidMount(){let e=JSON.parse(sessionStorage.getItem("activeMenu"));this.setState({activeMenuList:e})}closeMenuMask(){this.props.mouseLeaveFn()}clickMenuItem(e,t){if("/home/distributor-add"==t.router){sessionStorage.setItem("pathname2","/home/system/distributor-add");let e=[{pagetitle:"\u65b0\u5efa",items:[{path:"distributor-list",name:"\u5206\u9500\u5546\u7ba1\u7406"},{path:"distributor-add",name:"\u65b0\u5efa\u5206\u9500\u5546"}]}];sessionStorage.setItem("breaknav",JSON.stringify(e))}this.props.mouseLeaveFn()}render(){let e=this.state.activeMenuList,t=window.location.href.replace(/^\/|\/$/g,"");const i=t.lastIndexOf("/"),a=t.substr(i);return Object(m.jsxDEV)("div",{className:"mouseMenu",onMouseLeave:this.closeMenuMask.bind(this),onMouseEnter:this.props.mouseEnter,children:Object(m.jsxDEV)("div",{className:"menuBody",children:Object(m.jsxDEV)("div",{className:"first_menu",children:null===e||void 0===e?void 0:e.map(((e,t)=>Object(m.jsxDEV)("div",{children:e.children.map(((t,i)=>5==t.level?Object(m.jsxDEV)(o.b,{to:t.router,className:t.router.includes(a)&&e.children.length>=1?"mouse_menuactive menu_items":"menu_items",onClick:e=>this.clickMenuItem(e,t),children:t.title},i,!1,{fileName:c,lineNumber:59,columnNumber:23},this):null))},t,!1,{fileName:c,lineNumber:56,columnNumber:17},this)))},void 0,!1,{fileName:c,lineNumber:53,columnNumber:11},this)},void 0,!1,{fileName:c,lineNumber:52,columnNumber:9},this)},void 0,!1,{fileName:c,lineNumber:48,columnNumber:7},this)}}i(416);var u="D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\components\\subnav\\main.js";class h extends n.a.Component{constructor(e){super(e),this.state={pathname:"",pathname2:sessionStorage.getItem("pathname2"),navlists:this.props.listnav,menulinklist:"undefined"!==sessionStorage.getItem("menulinklist")?JSON.parse(sessionStorage.getItem("menulinklist")):[],linkshowname:sessionStorage.getItem("linkshowname"),showflag:JSON.parse(sessionStorage.getItem("showflag")),mouseMenuFlag:!1},this.backFn=this.backFn.bind(this)}showlinkmenu(e,t){try{t.children.forEach((e=>{if(5===e.level)throw sessionStorage.setItem("pathname2",e.router),"\u7ec8\u6b62\u5faa\u73af"}))}catch(e){}this.setState({linkshowname:t.title}),this.setState({menulinklist:t.children}),sessionStorage.setItem("menulinklist",JSON.stringify(t.children)),sessionStorage.setItem("showflag",!0),sessionStorage.setItem("linkshowname",t.title),s.a.emit("closeMask",!1),this.setState({mouseMenuFlag:!1})}mouseMenuFn(){this.setState({mouseMenuFlag:!0}),this.props.openMouseMask()}mouseLeaveFn(){this.setState({mouseMenuFlag:!1}),s.a.emit("closeMask",!1)}btnfn(e){this.setState({pathname2:e.router}),this.setState({showflag:!0}),sessionStorage.setItem("showflag",!0),sessionStorage.setItem("pathname2",e.router)}backFn(e){this.setState({pathname2:e.router}),sessionStorage.setItem("showflag",!0),sessionStorage.setItem("pathname2",e.router),window.history.go(-1),e.length>1&&sessionStorage.setItem("pathname2",e[0].path)}componentDidUpdate(e,t){this.props.setrender!==e.setrender&&this.setState({linkshowname:sessionStorage.getItem("linkshowname"),menulinklist:"undefined"!==sessionStorage.getItem("menulinklist")?JSON.parse(sessionStorage.getItem("menulinklist")):[]})}render(){var e,t;let i=window.history.length<=1,a=sessionStorage.getItem("showflag"),s=JSON.parse(sessionStorage.getItem("breaknav")),l=window.location.href.replace(/^\/|\/$/g,"");const n=l.lastIndexOf("/"),c=l.substr(n);let h=["add","aid","exchangecode-exchangecodeAdd","combiningAdd","distributor-edit","key-list","key-detail","key-edit","key-addEdit","plan-edit","plan-message","product-edit","distributor-merchant","callback-message","coupon-commodity","packageDetail"].some((e=>c.includes(e))),b=["account-add","role-add","distributor-add","subaccount-add","plan-edit","key-list","exchange-addcommodity"].some((e=>c.includes(e))),p=["exchangecode-add","key-edit","key-addEdit","key-detail","product-edit","plan-message","plan-edit"].some((e=>c.includes(e))),N=c.includes("plan-create"),j=c.includes("mytempMould"),v=c.includes("edittemplate");p&&(s=JSON.parse(sessionStorage.getItem("breakchangenav"))),c.includes("aid")&&(s=JSON.parse(sessionStorage.getItem("subbreaknav")));let f=null;return Object(m.jsxDEV)("div",{className:"topheader",children:[Object(m.jsxDEV)("div",{className:"nava",children:[null===(e=this.state.navlists)||void 0===e?void 0:e.map(((e,t)=>{try{e.children.forEach((e=>{if(5===e.level)throw f=e.router,"\u7ec8\u6b62\u5faa\u73af"}))}catch(i){}return e.children&&e.children.length>0?Object(m.jsxDEV)(o.b,{to:"/system"==e.router?f:e.router,style:this.state.linkshowname==e.title?{width:"#100%",background:"#f2f4f7",color:"#296bef"}:null,className:this.state.linkshowname==e.title?"active":"",onClick:t=>this.showlinkmenu(t,e),onMouseEnter:this.mouseMenuFn.bind(this),onMouseLeave:this.mouseLeaveFn.bind(this),children:e.title},t,!1,{fileName:u,lineNumber:152,columnNumber:15},this):null})),this.state.mouseMenuFlag?Object(m.jsxDEV)("div",{className:"moveMenu",children:Object(m.jsxDEV)(d,{mouseEnter:this.mouseMenuFn.bind(this),mouseLeaveFn:this.mouseLeaveFn.bind(this)},void 0,!1,{fileName:u,lineNumber:175,columnNumber:15},this)},void 0,!1,{fileName:u,lineNumber:174,columnNumber:13},this):null]},void 0,!0,{fileName:u,lineNumber:141,columnNumber:9},this),0==v&&0==j&&0==N&&""!=this.state.menulinklist&&0==h&&"true"==a?Object(m.jsxDEV)("div",{className:"linkmenu",children:Object(m.jsxDEV)("div",{className:"dflexaj navshow",children:[Object(m.jsxDEV)("div",{className:"linkmenu-row",children:null===(t=this.state.menulinklist)||void 0===t?void 0:t.map(((e,t)=>5==e.level?Object(m.jsxDEV)(o.b,{to:e.router,onClick:()=>this.btnfn(e),className:e.router.includes(c)&&this.state.menulinklist.filter((e=>5==e.level)).length>1?"menuactive":"",children:e.title},t,!1,{fileName:u,lineNumber:194,columnNumber:21},this):null))},void 0,!1,{fileName:u,lineNumber:191,columnNumber:15},this),Object(m.jsxDEV)("span",{children:["\u6570\u636e\u6700\u540e\u66f4\u65b0\u65f6\u95f4:",window.timeshow]},void 0,!0,{fileName:u,lineNumber:210,columnNumber:15},this)]},void 0,!0,{fileName:u,lineNumber:190,columnNumber:13},this)},void 0,!1,{fileName:u,lineNumber:189,columnNumber:11},this):null,0==v&&0==N&&1==h&&null!=s&&"true"==a?Object(m.jsxDEV)("div",{className:"linkmenu",children:s.map(((e,t)=>Object(m.jsxDEV)("div",{className:"nolinkmenu-row",children:[i||b?null:Object(m.jsxDEV)(r.a,{trigger:"hover",position:"bottom-center",content:"\u8fd4\u56de",children:Object(m.jsxDEV)("img",{onClick:()=>this.backFn(e.items),src:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/Marketing/back.svg",alt:""},void 0,!1,{fileName:u,lineNumber:225,columnNumber:23},this)},void 0,!1,{fileName:u,lineNumber:224,columnNumber:21},this),Object(m.jsxDEV)("div",{className:"nonav",style:{borderLeft:i||b?"none":"1px solid #d1cfcf"},children:e.items.map(((e,t)=>Object(m.jsxDEV)("div",{className:"dflexa",children:[0!=t?Object(m.jsxDEV)("span",{children:[">"," "]},void 0,!0,{fileName:u,lineNumber:242,columnNumber:40},this):null,Object(m.jsxDEV)("font",{className:t+1==s[0].items.length?"nomenuactive":"",children:[" ",e.name]},void 0,!0,{fileName:u,lineNumber:243,columnNumber:27},this)]},t,!0,{fileName:u,lineNumber:241,columnNumber:25},this)))},void 0,!1,{fileName:u,lineNumber:233,columnNumber:19},this)]},t,!0,{fileName:u,lineNumber:222,columnNumber:17},this)))},void 0,!1,{fileName:u,lineNumber:219,columnNumber:11},this):null]},void 0,!0,{fileName:u,lineNumber:140,columnNumber:7},this)}}var b=i(277),p=i(5),N=i(500),j=i(391),v=i(4),f=i(3),g=i(11),x=i.n(g),_=i(70),y={},O={opacity:0},D=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.textNodeRef=Object(l.createRef)(),t.avatarNodeRef=Object(l.createRef)(),t.state={textScale:1,textReady:!1},t}return Object(v.f)(t,e),t.prototype.render=function(){var e=this.props,t=e.size,i=e.shape,a=e.src,s=e.icon,l=e.children,n=e.bordered,o=e.style,r=e.className,m=!!a,c=!!l,d=x()("zent-avatar",r,{"zent-avatar--size-large":"large"===t,"zent-avatar--size-default":"default"===t,"zent-avatar--size-small":"small"===t,"zent-avatar--shape-circle":"circle"===i,"zent-avatar--shape-square":"square"===i,"zent-avatar--type-icon":!!s,"zent-avatar--type-image":m,"zent-avatar--type-string":c,"zent-avatar--bordered":n});if(m)return Object(f.jsx)("span",Object(v.a)({style:o,className:d,"data-zv":"9.12.7"},{children:Object(f.jsx)("img",{className:"zent-avatar-image",src:a,alt:"avatar","data-zv":"9.12.7"},void 0)}),void 0);if(s)return Object(f.jsx)("span",Object(v.a)({style:o,className:d,"data-zv":"9.12.7"},{children:Object(f.jsx)(_.a,{type:s},void 0)}),void 0);var u=this.state,h=u.textScale,b=u.textReady,p=this.textNodeRef.current,N=y;if(b&&p)if(1===h)N=y;else{var j="scale("+h+")";N={msTransform:j,WebkitTransform:j,MozTransform:j,transform:j,position:"absolute",display:"inline-block",left:"calc(50% - "+Math.floor(p.offsetWidth/2)+"px)"}}else N=O;var g="number"===typeof t?Object(v.a)({width:t+"px",height:t+"px",lineHeight:t+"px"},o):o;return Object(f.jsx)("span",Object(v.a)({style:g,className:d,ref:this.avatarNodeRef,"data-zv":"9.12.7"},{children:Object(f.jsx)("span",Object(v.a)({className:"zent-avatar-string",style:N,ref:this.textNodeRef,"data-zv":"9.12.7"},{children:l}),void 0)}),void 0)},t.prototype.componentDidMount=function(){this.updateTextScale()},t.getDerivedStateFromProps=function(e,t){var i=e.children;return i!==t.prevChildren?{textReady:!1,prevChildren:i}:null},t.prototype.componentDidUpdate=function(e){e.children!==this.props.children&&this.updateTextScale()},t.prototype.updateTextScale=function(){if(this.props.children){var e=function(e,t){if(!e||!t)return 1;var i=e.getBoundingClientRect().width,a=t.offsetWidth,s=i-6;if(s>a)return 1;return s/a}(this.avatarNodeRef.current,this.textNodeRef.current);this.setState({textScale:e,textReady:!0})}},t.defaultProps={shape:"circle",size:"default",bordered:!1},t}(l.Component);var E=i(167),V=(i(437),"D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\pages\\home\\home.js");class k extends l.Component{constructor(e){super(e),this.state={mouseMenuMask:!1,setrender:1,linkshow:"\u7cfb\u7edf\u7ba1\u7406",isShowSub:!0,pathname:"",userInfo:{},navlist:[]}}openMouseMask(){this.setState({mouseMenuMask:!0})}componentDidMount(e){s.a.addListener("closeMask",(e=>{this.setState({mouseMenuMask:e})})),b.a.indexOf(this.props.location.pathname)>-1?this.setState({isShowSub:!1}):this.setState({isShowSub:!0})}getUserInfuFn(){let e=this;Object(a.Lb)().then((t=>{Object(a.Wb)(t,((t,i)=>{e.setState({userInfo:t}),sessionStorage.setItem("userInfo",JSON.stringify(t))}),(e=>{}))})).catch((e=>{}))}exitFn(){let e=this;N.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(m.jsxDEV)("p",{children:"\u662f\u5426\u9000\u51fa\u767b\u5f55\uff1f"},void 0,!1,{fileName:V,lineNumber:63,columnNumber:16},this),onConfirm:()=>{Object(a.rc)().then((t=>{200==t.code&&setTimeout((()=>{e.props.history.replace("/login"),j.a.clear(),j.a.success("\u9000\u51fa\u6210\u529f\uff01"),sessionStorage.clear()}),1e3)})).catch((e=>{}))},onCancel:this.onCancel,className:"questModal",parentComponent:this})}componentWillMount(e){let t=JSON.parse(sessionStorage.getItem("activeMenu"));const i=window.location.href.lastIndexOf("/"),a=window.location.href.substr(i);this.getUserInfuFn(),this.setState({pathname:`${a}`,navlist:t}),sessionStorage.setItem("showflag",!0)}componentWillReceiveProps(e){let t=sessionStorage.getItem("updatetime");t&&Date.now()-t>3e5&&Object(a.vb)().then((e=>{Object(a.Wb)(e,((e,t)=>{sessionStorage.setItem("updatetime",Date.now()),sessionStorage.setItem("productsList",JSON.stringify(e.data))}),(e=>{}))})),b.a.indexOf(e.location.pathname)>-1?this.setState({isShowSub:!1}):this.setState({isShowSub:!0})}UNSAFE_componentWillReceiveProps(e){let t=JSON.parse(sessionStorage.getItem("activeMenu"));if(e.location.pathname!==this.props.location.pathname){let o=e.location.pathname,r=null;if(o.includes("system")&&(r=null===t||void 0===t?void 0:t.filter((e=>14==e.id)),this.setState({setrender:1})),o.includes("distributor")&&(r=null===t||void 0===t?void 0:t.filter((e=>15==e.id)),this.setState({setrender:2})),(o.includes("plan")||o.includes("key"))&&(r=null===t||void 0===t?void 0:t.filter((e=>16==e.id)),this.setState({setrender:3})),o.includes("exchangecode")&&!o.includes("exchangecode-add")&&(r=null===t||void 0===t?void 0:t.filter((e=>17==e.id)),this.setState({setrender:4})),(o.includes("exchangepage")||o.includes("mytempMould")||o.includes("edittemplate")||o.includes("myexchangetemplate"))&&(r=null===t||void 0===t?void 0:t.filter((e=>18==e.id)),this.setState({setrender:5})),(o.includes("order-list")||o.includes("download-orderlist")||o.includes("settlementList"))&&(r=null===t||void 0===t?void 0:t.filter((e=>19==e.id)),this.setState({setrender:6})),o.includes("coupon")&&(r=null===t||void 0===t?void 0:t.filter((e=>e.router.includes("coupon"))),this.setState({setrender:7})),r){var i,a;try{var s,l;null===(s=r[0])||void 0===s||null===(l=s.children)||void 0===l||l.forEach((e=>{if(5===e.level)throw sessionStorage.setItem("pathname2",e.router),"\u7ec8\u6b62\u5faa\u73af"}))}catch(n){}sessionStorage.setItem("menulinklist",JSON.stringify(null===(i=r[0])||void 0===i?void 0:i.children)),sessionStorage.setItem("showflag",!0),sessionStorage.setItem("linkshowname",null===(a=r[0])||void 0===a?void 0:a.title)}}}render(){return Object(m.jsxDEV)(o.a,{children:Object(m.jsxDEV)("div",{className:"start dflexajc",children:[this.state.mouseMenuMask?Object(m.jsxDEV)("div",{className:"maskMenu"},void 0,!1,{fileName:V,lineNumber:183,columnNumber:39},this):null,Object(m.jsxDEV)("div",{className:"header boxs",children:[Object(m.jsxDEV)("div",{className:"log",children:[Object(m.jsxDEV)("img",{src:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/Marketing/logo.svg",alt:""},void 0,!1,{fileName:V,lineNumber:187,columnNumber:15},this),Object(m.jsxDEV)("span",{children:"\u8425\u9500\u7cfb\u7edf\u7ba1\u7406\u5e73\u53f0"},void 0,!1,{fileName:V,lineNumber:188,columnNumber:15},this)]},void 0,!0,{fileName:V,lineNumber:186,columnNumber:13},this),Object(m.jsxDEV)("div",{className:"nav",children:Object(m.jsxDEV)(h,{setrender:this.state.setrender,listnav:this.state.navlist,time:window.time,linkshow:this.state.linkshow,openMouseMask:this.openMouseMask.bind(this)},void 0,!1,{fileName:V,lineNumber:192,columnNumber:15},this)},void 0,!1,{fileName:V,lineNumber:191,columnNumber:13},this),Object(m.jsxDEV)("div",{className:"nav-person",children:[Object(m.jsxDEV)("div",{className:"navicon",children:[Object(m.jsxDEV)("img",{src:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/logs.svg",alt:""},void 0,!1,{fileName:V,lineNumber:202,columnNumber:17},this),Object(m.jsxDEV)("a",{href:"https://tvd8jq9lqkp.feishu.cn/wiki/Dri8w2EBaiRnlEkWm99c8n3RnFf?from=from_copylink",target:"_blank",className:"help",rel:"noreferrer",children:"\u66f4\u65b0\u65e5\u5fd7"},void 0,!1,{fileName:V,lineNumber:206,columnNumber:17},this)]},void 0,!0,{fileName:V,lineNumber:201,columnNumber:15},this),Object(m.jsxDEV)("div",{className:"navicon",children:[Object(m.jsxDEV)("img",{src:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/help.svg",alt:""},void 0,!1,{fileName:V,lineNumber:216,columnNumber:17},this),Object(m.jsxDEV)("a",{href:"https://tvd8jq9lqkp.feishu.cn/wiki/ElIrwfZEyitcx0kY9TxcRa9Xneg?from=from_copylink",target:"_blank",className:"help",rel:"noreferrer",children:"\u5e2e\u52a9\u4e2d\u5fc3"},void 0,!1,{fileName:V,lineNumber:220,columnNumber:17},this)]},void 0,!0,{fileName:V,lineNumber:215,columnNumber:15},this),Object(m.jsxDEV)(r.a,{className:"exitPop",trigger:"hover",position:"bottom-right",content:Object(m.jsxDEV)("div",{children:Object(m.jsxDEV)("div",{className:"exit-box",children:[Object(m.jsxDEV)("div",{className:"exit-header dflexacsa",children:[this.state.userInfo.head?Object(m.jsxDEV)(D,{size:"large",src:this.state.userInfo.head},void 0,!1,{fileName:V,lineNumber:238,columnNumber:27},this):Object(m.jsxDEV)(D,{size:"large",src:"https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/default.svg"},void 0,!1,{fileName:V,lineNumber:240,columnNumber:27},this),Object(m.jsxDEV)("p",{className:"exit-userInfo dflexacs",children:[Object(m.jsxDEV)("span",{children:[" \u59d3\u540d:",this.state.userInfo.real_name]},void 0,!0,{fileName:V,lineNumber:246,columnNumber:27},this),Object(m.jsxDEV)("span",{children:[" \u8d26\u53f7:",this.state.userInfo.user_name]},void 0,!0,{fileName:V,lineNumber:247,columnNumber:27},this)]},void 0,!0,{fileName:V,lineNumber:245,columnNumber:25},this)]},void 0,!0,{fileName:V,lineNumber:236,columnNumber:23},this),Object(m.jsxDEV)("div",{className:"dflexaj",children:Object(m.jsxDEV)("span",{onClick:()=>{this.exitFn()},className:"exit-btn",children:"\u9000\u51fa"},void 0,!1,{fileName:V,lineNumber:251,columnNumber:25},this)},void 0,!1,{fileName:V,lineNumber:250,columnNumber:23},this)]},void 0,!0,{fileName:V,lineNumber:235,columnNumber:21},this)},void 0,!1,{fileName:V,lineNumber:234,columnNumber:19},this),children:Object(m.jsxDEV)("div",{className:"nameItem",children:[this.state.userInfo.real_name,"\xa0",Object(m.jsxDEV)(E.a,{type:"down",className:"exitIcon"},void 0,!1,{fileName:V,lineNumber:267,columnNumber:19},this)]},void 0,!0,{fileName:V,lineNumber:265,columnNumber:17},this)},void 0,!1,{fileName:V,lineNumber:229,columnNumber:15},this)]},void 0,!0,{fileName:V,lineNumber:200,columnNumber:13},this)]},void 0,!0,{fileName:V,lineNumber:184,columnNumber:11},this),Object(m.jsxDEV)("aside",{className:"mainbody",children:[this.state.isShowSub?Object(m.jsxDEV)("div",{className:"subtitle",children:" "},void 0,!1,{fileName:V,lineNumber:273,columnNumber:37},this):null,Object(m.jsxDEV)("div",{className:"route-box",children:b.b.map((({component:e,path:t,meta:i})=>Object(m.jsxDEV)(p.b,{component:e,path:t,exact:!0},t,!1,{fileName:V,lineNumber:276,columnNumber:17},this)))},void 0,!1,{fileName:V,lineNumber:274,columnNumber:13},this)]},void 0,!0,{fileName:V,lineNumber:272,columnNumber:11},this)]},void 0,!0,{fileName:V,lineNumber:182,columnNumber:9},this)},void 0,!1,{fileName:V,lineNumber:181,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/6.86f337b4.chunk.js.LICENSE.txt b/build/static/js/6.86f337b4.chunk.js.LICENSE.txt deleted file mode 100644 index ce12c4d1..00000000 --- a/build/static/js/6.86f337b4.chunk.js.LICENSE.txt +++ /dev/null @@ -1,13 +0,0 @@ -//! 1:直冲 2:立减金 3:红包 - -//!type 1:权益商品 2:立减金 3:红包 - -//!以下注释相关路由、组件(未使用/引用)待系统稳定上线运行一个版本后,请进行相关代码、文件删除 - -//!以下注释相关路由(未使用/引用)待系统稳定上线运行一个版本后,请进行相关代码、文件删除 - -//!提取动态删除核销状态条件 - -//!状态筛选 - -//!获取订单列表 diff --git a/build/static/js/7.ea574933.chunk.js b/build/static/js/7.ea574933.chunk.js deleted file mode 100644 index 6651e204..00000000 --- a/build/static/js/7.ea574933.chunk.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! For license information please see 7.ea574933.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){},277:function(e,t,i){"use strict";i.d(t,"a",(function(){return hn})),i.d(t,"b",(function(){return un})),i.d(t,"c",(function(){return bn}));var a=i(59),l=i(62),s=i(63),n=i(61),o=i(491),r=i(1),m=i.n(r),c=i(391),d=i(454),u=i(177),h=i(10),b="D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\pages\\callbackMessage\\index.jsx";var p=i(24),N=i.n(p),j=(i(190),i(196)),v=i(455),g=i(167),f=i(513),_=i(511),x=i(420),y=(i(191),i(512)),O=i(502),D=i(424),E="D:\\project\\\u8425\u9500\u7cfb\u7edf\\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,l=[].concat(e),s=l.length,n="\u2026";if(t=Math.max(1,Math.min(t,s)),s<=i)return l[t-1]=""+l[t-1],l;for(l=[""+t],a=(i=Math.max(5,i||7))-1;;){var o=+l[0],r=+l[l.length-1];if(o>1&&(l.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 l=1;lthis.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="D:\\project\\\u8425\u9500\u7cfb\u7edf\\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="D:\\project\\\u8425\u9500\u7cfb\u7edf\\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 I="D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\components\\gird\\main.js";class T 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:I,lineNumber:359,columnNumber:17},this)," "]},void 0,!0,{fileName:I,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:I,lineNumber:378,columnNumber:17},this)," "]},void 0,!0,{fileName:I,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:I,lineNumber:403,columnNumber:32},this):null," "]},t,!0,{fileName:I,lineNumber:392,columnNumber:17},this))))," "]},void 0,!0,{fileName:I,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:I,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:I,lineNumber:411,columnNumber:13},this)]},void 0,!0,{fileName:I,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:I,lineNumber:419,columnNumber:15},this):this.state.tableData.map(((e,l)=>Object(h.jsxDEV)("div",{className:this.state.curIndex==l?"tr active":"tr",onClick:e=>{this.rowItemClick(l)},style:{background:l%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(l,e)},children:" "},void 0,!1,{fileName:I,lineNumber:442,columnNumber:25},this)," "]},void 0,!0,{fileName:I,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(l,e)},loading:this.state.switchLoading,children:" "},void 0,!1,{fileName:I,lineNumber:461,columnNumber:25},this)," "]},void 0,!0,{fileName:I,lineNumber:454,columnNumber:23},this):null,this.state.Column.map(((s,n)=>(i="auto"==s.width?a:s.width,"normal"==s.type?Object(h.jsxDEV)("div",{className:"td",style:{width:i,justifyContent:s.textAlign},children:[" ",this.getCellValue(s.prop,e)]},n,!0,{fileName:I,lineNumber:476,columnNumber:25},this):Object(h.jsxDEV)("div",{className:"td",style:{width:i,justifyContent:s.textAlign},children:[" ",t(s.prop,e,l)," "]},n,!0,{fileName:I,lineNumber:496,columnNumber:25},this))))," "]},l,!0,{fileName:I,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:I,lineNumber:514,columnNumber:15},this):null,Object(h.jsxDEV)("div",{className:"sortbar"},void 0,!1,{fileName:I,lineNumber:528,columnNumber:13},this)]},void 0,!0,{fileName:I,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:I,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:I,lineNumber:552,columnNumber:17},this))))," "]},void 0,!0,{fileName:I,lineNumber:531,columnNumber:11},this)]},void 0,!0,{fileName:I,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:I,lineNumber:570,columnNumber:13},this)},void 0,!1,{fileName:I,lineNumber:569,columnNumber:11},this):null]},void 0,!0,{fileName:I,lineNumber:342,columnNumber:7},this)}}T.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 L=(e,t)=>{var i=0,a=e.toString(),l=t.toString();try{i+=a.split(".")[1].length}catch(s){}try{i+=l.split(".")[1].length}catch(s){}return Number(a.replace(".",""))*Number(l.replace(".",""))/Math.pow(10,i)},F=(e,t)=>{var i,a,l=0,s=0;try{l=e.toString().split(".")[1].length}catch(n){}try{s=t.toString().split(".")[1].length}catch(n){}return i=Number(e.toString().replace(".","")),a=Number(t.toString().replace(".","")),L(i/a,Math.pow(10,s-l))},H=e=>{let t=sessionStorage.getItem("KeyPcType");const i=parseInt(F(e.all_budget,L(e.reduce_amount,e.send_num)));return"2"===t||"3"===t?i:e.stock?e.stock:i},M=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},q=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(4),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 W(){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 B="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",A="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 z(e){return/^[0-9][0-9]*([.][0-9]{1,2})?$/.test(e)}var R=i(522),K=i(457),Y=i(67),$=i.n(Y),U=i(164),G=i(500),Q=i(199),Z=i(210),X=i(281),ee=i(507);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,l="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),s=[];if(t=t||l.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 l in t){if(t[l]!=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 l=0;l{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)(s.a,{ref:b,model:i,rules:ue.addNew,children:[Object(h.jsxDEV)(l.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)(l.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.Wb)(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(444),Ne="D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\components\\knockGold\\timeComponent.jsx",je=({data:e})=>{const[t,i]=Object(r.useState)([]);return Object(r.useEffect)((()=>{i(le(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="D:\\project\\\u8425\u9500\u7cfb\u7edf\\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="D:\\project\\\u8425\u9500\u7cfb\u7edf\\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="D:\\project\\\u8425\u9500\u7cfb\u7edf\\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"},l=String(parseFloat(t)).length+String(parseFloat(i)).length+1;return l>12?{a:30-1.8*(l-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="D:\\project\\\u8425\u9500\u7cfb\u7edf\\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"},l=String(parseFloat(t)).length+String(parseFloat(i)).length+1;return l>12?{a:30-1.8*(l-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="D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\components\\knockGold\\index.jsx";const Ie=[{key:"1",text:"\u501f\u8bb0\u5361"},{key:"2",text:"\u4fe1\u7528\u5361"}],Te=[{key:"all",text:"\u603b\u5171"},{key:"month",text:"\u6bcf\u6708"},{key:"week",text:"\u6bcf\u5468"},{key:"day",text:"\u6bcf\u65e5"}],Le=[{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"}],Fe=["70","50","30","20"],He=e=>Array.from({length:e},((e,t)=>t));class Me extends r.Component{constructor(e){super(e),this.onDisabledRange=(e,t)=>{let i=!1;return"end"==t&&(i=$()(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,l=$()(e).format("YYYY-MM-DD HH:mm:ss");const s=$()(i.end_time).format("HH:mm:ss");return"start"==t&&(a=s<"23:59:59"?$()(l).isBefore(i.begin_time)||$()(l).subtract(1,"days").isAfter(i.end_time):$()(l).isBefore(i.begin_time)||$()(l).isAfter(i.end_time)),"end"==t&&(a=$()(l).add(1,"days").isBefore(i.begin_time)||$()(l).isAfter(i.end_time)),a},this.onDisabledRange2=(e,t)=>{let i=!1,a=$()(e).format("YYYY-MM-DD HH:mm:ss");const l=$()(this.state.model.entry_time[1]).format("HH:mm:ss");return"start"==t&&(i=l<"23:59:59"?$()(a).isBefore(this.state.model.entry_time[0])||$()(a).subtract(1,"days").isAfter(this.state.model.entry_time[1]):$()(a).isBefore(this.state.model.entry_time[0])||$()(a).isAfter(this.state.model.entry_time[1])),"end"==t&&(i=$()(a).add(1,"days").isBefore(this.state.model.entry_time[0])||$()(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),l=a.getHours(),s=a.getMinutes(),n=a.getSeconds();return Object(K.a)(e,a)?{disabledHours:()=>He(l),disabledMinutes:e=>e===l?He(s):[],disabledSeconds:(e,t)=>e===l&&t===s?He(n):[]}:{}},this.onDisabledTime1=(e,t)=>{const i=new Date(this.state.model.entry_time[0]),a=i.getHours(),l=i.getMinutes(),s=i.getSeconds();return Object(K.a)(e,i)?{disabledHours:()=>He(a),disabledMinutes:e=>e===a?He(l):[],disabledSeconds:(e,t)=>e===a&&t===l?He(s):[]}:{}},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:A,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,l,s;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===(l=this.props.data.time_limit.use_time)||void 0===l?void 0:l.day,n.irregularTime=null===(s=this.props.data.time_limit.use_time)||void 0===s?void 0:s.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,l){var s;if(null===(s=this.props.data)||void 0===s||!s.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 l&&c.a.warn(l)},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 l=this.state.model;for(let e in this.props.data)l[e]=this.props.data[e];l.weight=String(this.props.data.weight),l.is_webview=Number(this.props.data.is_webview)||0,l.early_per=this.props.data.early_per.map((e=>String(e))),l.channel=String(this.props.data.channel),l.natural_limit=String(this.props.data.natural_limit),l.brush_limit=String(this.props.data.brush_limit),l.card_type=this.props.data.card_type.map((e=>String(e))),l.receive_number=this.props.data.receive_conf.num,l.receive_type=this.props.data.receive_conf.type,l.receive_mode=this.props.data.receive_mode,l.timer[0]=this.props.data.time_limit.receive_time.start_time,l.timer[1]=this.props.data.time_limit.receive_time.end_time,l.timer_type=null!==(t=this.props.data.time_limit.receive_time)&&void 0!==t&&t.start_time?"2":"1",l.effect_date_type=this.state.getTimeList[Number(this.props.data.time_limit.use_time.effect_date_type)],l.effect_date=this.props.data.time_limit.use_time.effect_day,l.usable_time=this.props.data.time_limit.use_time.type,l.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)),l.origin=this.props.data;((null===(a=this.props.data)||void 0===a?void 0:a.early_per)||[]).map((e=>-1===Fe.indexOf(e)?this.setState({input_early_per:e,model:l}):this.setState({model:l})))}}getUserSelectList(e){Object(a.Mb)().then((e=>Object(a.Wb)(e,((e,t)=>{const i=e.default.map((e=>e.real_name)),a=e.default.map((e=>e.mobile)),l=[],s=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 l.push(t),t}return{key:e.mobile,text:e.real_name,closable:!0}}));this.onHandleChange(l,"early_notifier"),this.setState({userSelectList:s}),this.echoFun(s)}),(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=s&&is}}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(se.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 l="",s="";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(A,"instruction"):2==e?this.onHandleChange(B,"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,I,T,L,F,H,M,q;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)(s.a,{model:this.state.model,rules:ue.basic,ref:"form",children:[Object(h.jsxDEV)(l.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)(l.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)(l.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)(l.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)(l.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)(l.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)(l.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)(l.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)(l.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)(l.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)(s.a,{model:this.state.model,rules:ue.grant,ref:"form1",children:[Object(h.jsxDEV)(l.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)(l.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)(l.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)(l.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)(l.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:Te.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)(l.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:Ie.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)(l.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)(l.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)(s.a,{model:this.state.model,rules:ue.time,ref:"form2",children:[this.props.combining?null:Object(h.jsxDEV)(l.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),this.props.ysf?null: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:1202,columnNumber:21},this),Object(h.jsxDEV)(ne.a,{value:2,children:"\u9690\u85cf"},void 0,!1,{fileName:Ce,lineNumber:1203,columnNumber:21},this)]},void 0,!0,{fileName:Ce,lineNumber:1195,columnNumber:19},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)(l.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:[$()().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:1212,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:1236,columnNumber:23},this),Object(h.jsxDEV)(ne.a,{value:"2",children:"\u6bcf\u65e5"},void 0,!1,{fileName:Ce,lineNumber:1237,columnNumber:23},this)]},void 0,!0,{fileName:Ce,lineNumber:1226,columnNumber:21},this)]},void 0,!0,{fileName:Ce,lineNumber:1211,columnNumber:19},this):Object(h.jsxDEV)(l.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:1249,columnNumber:23},this),Object(h.jsxDEV)(ne.a,{value:"2",children:"\u6bcf\u65e5"},void 0,!1,{fileName:Ce,lineNumber:1250,columnNumber:23},this)]},void 0,!0,{fileName:Ce,lineNumber:1242,columnNumber:21},this)},void 0,!1,{fileName:Ce,lineNumber:1241,columnNumber:19},this)},void 0,!1),Object(h.jsxDEV)(l.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:1271,columnNumber:19},this)},void 0,!1,{fileName:Ce,lineNumber:1259,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:1276,columnNumber:23},this)},void 0,!1,{fileName:Ce,lineNumber:1275,columnNumber:21},this),Object(h.jsxDEV)("span",{className:"effect_dates",children:"\u6709\u6548\u671f"},void 0,!1,{fileName:Ce,lineNumber:1291,columnNumber:21},this),Object(h.jsxDEV)(n.a,{onChange:e=>{this.onHandleChange(e,"effect_date")},onClearItem:()=>{this.onHandleChange("","effect_date")},disabled:!(null===(I=this.props.data)||void 0===I||!I.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:1292,columnNumber:21},this)]},void 0,!0):null]},void 0,!0,{fileName:Ce,lineNumber:1258,columnNumber:15},this),Object(h.jsxDEV)("div",{className:"boxTime",style:{marginTop:"15px"},children:[Object(h.jsxDEV)(Q.a,{disabled:!(null===(T=this.props.data)||void 0===T||!T.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:1327,columnNumber:19},this)},void 0,!1,{fileName:Ce,lineNumber:1314,columnNumber:17},this),"fiexd"===this.state.model.usable_time?Object(h.jsxDEV)(ee.a,{className:"zent-datepicker-plan",showTime:{format:"HH:mm:ss",defaultTime:[$()().format("HH:mm:ss"),"23:59:59"]},format:"YYYY-MM-DD HH:mm:ss",disabled:[!(null===(L=this.props.data)||void 0===L||!L.id),!(null===(F=this.props.data)||void 0===F||!F.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:1330,columnNumber:19},this):null]},void 0,!0,{fileName:Ce,lineNumber:1313,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:1362,columnNumber:19},this)},void 0,!1,{fileName:Ce,lineNumber:1349,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:Le.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:1372,columnNumber:25},this)}))},void 0,!1,{fileName:Ce,lineNumber:1366,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:[$()().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:1384,columnNumber:25},this),this.addOrMoveFunction(t,"ruleDate",this.state.model.ruleDate,!1,"\u6700\u591a\u8bbe\u7f6e3\u4e2a\u65f6\u6bb5")]},t,!0,{fileName:Ce,lineNumber:1383,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:1409,columnNumber:21},this)]},void 0,!0):null]},void 0,!0,{fileName:Ce,lineNumber:1348,columnNumber:15},this),Object(h.jsxDEV)("div",{className:"boxTime column",style:{marginTop:"15px"},children:[Object(h.jsxDEV)(Q.a,{disabled:!(null===(M=this.props.data)||void 0===M||!M.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:1426,columnNumber:19},this)},void 0,!1,{fileName:Ce,lineNumber:1414,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:1430,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:1437,columnNumber:25},this),this.addOrMoveFunction(t,"irregularDate",this.state.model.irregularDate,!0)]},t,!0,{fileName:Ce,lineNumber:1436,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:[$()().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:1461,columnNumber:25},this),this.addOrMoveFunction(t,"irregularTime",this.state.model.irregularTime,!1,"\u6700\u591a\u8bbe\u7f6e3\u4e2a\u65f6\u6bb5")]},t,!0,{fileName:Ce,lineNumber:1460,columnNumber:23},this)}))]},void 0,!0):null]},void 0,!0,{fileName:Ce,lineNumber:1413,columnNumber:15},this)]},void 0,!0,{fileName:Ce,lineNumber:1257,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)(s.a,{model:this.state.model,rules:ue.warning,ref:"form4",children:[Object(h.jsxDEV)(l.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:[Fe.map((e=>Object(h.jsxDEV)(j.a,{value:e,children:[e,"%"]},e,!0,{fileName:Ce,lineNumber:1503,columnNumber:19},this))),Object(h.jsxDEV)(j.a,{value:this.state.input_early_per},void 0,!1,{fileName:Ce,lineNumber:1507,columnNumber:17},this)]},void 0,!0,{fileName:Ce,lineNumber:1496,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:1509,columnNumber:15},this)]},void 0,!0,{fileName:Ce,lineNumber:1495,columnNumber:13},this),Object(h.jsxDEV)(l.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:1532,columnNumber:17},this)},void 0,!1,{fileName:Ce,lineNumber:1531,columnNumber:15},this),Object(h.jsxDEV)("div",{className:"userSelect",children:Object(h.jsxDEV)("ol",{children:Object(se.a)(this.state.model.early_notifier)&&(null===(q=this.state.model.early_notifier)||void 0===q?void 0:q.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:1553,columnNumber:23},this))))},void 0,!1,{fileName:Ce,lineNumber:1550,columnNumber:17},this)},void 0,!1,{fileName:Ce,lineNumber:1549,columnNumber:15},this)]},void 0,!0,{fileName:Ce,lineNumber:1530,columnNumber:13},this)]},void 0,!0,{fileName:Ce,lineNumber:1494,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:1571,columnNumber:13},this)},void 0,!1,{fileName:Ce,lineNumber:1565,columnNumber:11},this)]},void 0,!0,{fileName:Ce,lineNumber:1493,columnNumber:9},this),Object(h.jsxDEV)(d.a,{style:{width:"70%",margin:"10px 0"},title:"\u6837\u5f0f\u8bbe\u7f6e",children:Object(h.jsxDEV)(s.a,{ref:"form3",children:Object(h.jsxDEV)(l.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:1585,columnNumber:15},this)},void 0,!1,{fileName:Ce,lineNumber:1584,columnNumber:13},this)},void 0,!1,{fileName:Ce,lineNumber:1583,columnNumber:11},this)},void 0,!1,{fileName:Ce,lineNumber:1582,columnNumber:9},this),this.switchComponents()]},void 0,!0,{fileName:Ce,lineNumber:790,columnNumber:7},this)}}var qe=i(470),Pe=i(446),We=(i(87),"D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\components\\redPackets\\timeComponent.jsx"),Be=({data:e})=>{const[t,i]=Object(r.useState)([]);return Object(r.useEffect)((()=>{i(le(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:We,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:We,lineNumber:22,columnNumber:25},this)}))]},t,!0,{fileName:We,lineNumber:17,columnNumber:17},this)))},void 0,!1,{fileName:We,lineNumber:15,columnNumber:13},this)]},void 0,!0,{fileName:We,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:We,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:We,lineNumber:43,columnNumber:25},this)}))]},e.data,!0,{fileName:We,lineNumber:38,columnNumber:17},this)))},void 0,!1,{fileName:We,lineNumber:36,columnNumber:13},this)]},void 0,!0,{fileName:We,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:We,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:We,lineNumber:59,columnNumber:17},this)))},void 0,!1,{fileName:We,lineNumber:57,columnNumber:13},this)]},void 0,!0,{fileName:We,lineNumber:55,columnNumber:11},this);default:return Object(h.jsxDEV)(h.Fragment,{},void 0,!1)}}()},Ae="D:\\project\\\u8425\u9500\u7cfb\u7edf\\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 ze=({data:e})=>{function t(){const{cash_amount_type:t,min_denomination:i,max_denomination:a}=e,l={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"}:l}return l}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:Ae,lineNumber:32,columnNumber:58},void 0)},void 0,!1,{fileName:Ae,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:Ae,lineNumber:34,columnNumber:13},void 0)},void 0,!1,{fileName:Ae,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:Ae,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:Ae,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:Ae,lineNumber:50,columnNumber:13},void 0)},void 0,!1,{fileName:Ae,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:Ae,lineNumber:52,columnNumber:11},void 0)]},void 0,!0,{fileName:Ae,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:Ae,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:Ae,lineNumber:63,columnNumber:17},void 0)},void 0,!1,{fileName:Ae,lineNumber:62,columnNumber:15},void 0),e.instruction||[1,2,3].includes(e.receive_type)?Object(h.jsxDEV)(h.Fragment,{children:[Object(h.jsxDEV)(Be,{data:e},void 0,!1,{fileName:Ae,lineNumber:72,columnNumber:19},void 0),Object(h.jsxDEV)("h3",{className:"instruction-text",children:"\u4f7f\u7528\u89c4\u5219"},void 0,!1,{fileName:Ae,lineNumber:73,columnNumber:19},void 0),Object(h.jsxDEV)("p",{className:"scroll",dangerouslySetInnerHTML:{__html:e.instruction}},void 0,!1,{fileName:Ae,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:Ae,lineNumber:82,columnNumber:17},void 0)]},void 0,!0,{fileName:Ae,lineNumber:61,columnNumber:13},void 0)},void 0,!1,{fileName:Ae,lineNumber:60,columnNumber:11},void 0)]},void 0,!0,{fileName:Ae,lineNumber:58,columnNumber:9},void 0)]},void 0,!0,{fileName:Ae,lineNumber:30,columnNumber:7},void 0)},void 0,!1,{fileName:Ae,lineNumber:29,columnNumber:5},void 0)},Re=i(503);const Ke=/^\d+(\.\d{1,2})?$/,Ye={type:"regExp",message:"\u6700\u591a\u4fdd\u75592\u4f4d\u5c0f\u6570",reg:Ke};var $e={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\u9762\u989d"},{...Ye}],total_contract_price:[{type:"required",message:"\u8bf7\u8f93\u5165\u5408\u540c\u603b\u4ef7"},{type:"regExp",message:"\u6700\u591a\u4fdd\u75594\u4f4d\u5c0f\u6570",reg:/^\d+(\.\d{1,4})?$/}],all_budget:[{type:"required",message:"\u8bf7\u8f93\u5165\u603b\u9884\u7b97"},{...Ye}],day_budget:[{type:"required",message:"\u8bf7\u8f93\u5165\u5355\u5929\u9884\u7b97"},{...Ye}],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 Ue(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(Re.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,500))return!1;if([1,3].includes(a.channel)&&Ge(a,.01,500))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,500))return!1;if([1,3].includes(a.channel)&&Qe(a,.01,200))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,i){if(e.min_denominationi||!Ke.test(e.max_denomination)||!Ke.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} ~ ${i}\u7684\u9762\u989d\u4e14\u4fdd\u75592\u4f4d\u5c0f\u6570`),!0)}function Qe(e,t,i){if(e.denominationi||!Ke.test(e.denomination))return c.a.error(`\u8bf7\u8f93\u5165${t} ~ ${i}\u7684\u9762\u989d\u4e14\u4fdd\u75592\u4f4d\u5c0f\u6570`),!0}function Ze(e){for(var t=0;t=s&&is}}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="D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\components\\redPackets\\wangEditor.jsx";class lt 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 st="D:\\project\\\u8425\u9500\u7cfb\u7edf\\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:st,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:st,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:st,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:st,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:st,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:st,lineNumber:32,columnNumber:13},void 0)},void 0,!1,{fileName:st,lineNumber:31,columnNumber:11},void 0)]},void 0,!0,{fileName:st,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:st,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:st,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:st,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:st,lineNumber:39,columnNumber:11},void 0),Object(h.jsxDEV)("button",{className:"form-button",children:"\u7acb\u5373\u9886\u53d6"},void 0,!1,{fileName:st,lineNumber:40,columnNumber:11},void 0)]},void 0,!0,{fileName:st,lineNumber:35,columnNumber:9},void 0),Object(h.jsxDEV)("div",{className:"segmentation",children:[Object(h.jsxDEV)("i",{className:"left"},void 0,!1,{fileName:st,lineNumber:43,columnNumber:11},void 0),Object(h.jsxDEV)("i",{className:"middle"},void 0,!1,{fileName:st,lineNumber:44,columnNumber:11},void 0),Object(h.jsxDEV)("i",{className:"right"},void 0,!1,{fileName:st,lineNumber:45,columnNumber:11},void 0)]},void 0,!0,{fileName:st,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)(Be,{data:e},void 0,!1,{fileName:st,lineNumber:50,columnNumber:15},void 0),Object(h.jsxDEV)("p",{className:"illustrate-title",children:"\u6d3b\u52a8\u8bf4\u660e"},void 0,!1,{fileName:st,lineNumber:51,columnNumber:15},void 0),Object(h.jsxDEV)("p",{className:"illustrate-text",dangerouslySetInnerHTML:{__html:e.instruction}},void 0,!1,{fileName:st,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:st,lineNumber:60,columnNumber:13},void 0)},void 0,!1,{fileName:st,lineNumber:47,columnNumber:9},void 0)]},void 0,!0,{fileName:st,lineNumber:13,columnNumber:7},void 0)]},void 0,!0,{fileName:st,lineNumber:7,columnNumber:5},void 0),rt="D:\\project\\\u8425\u9500\u7cfb\u7edf\\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,l={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"}:l}return l}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)(Be,{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="D:\\project\\\u8425\u9500\u7cfb\u7edf\\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,l=$()(e).format("YYYY-MM-DD HH:mm:ss");const s=$()(i.end_time).format("HH:mm:ss");return"start"==t&&(a=s<"23:59:59"?$()(l).isBefore(i.begin_time)||$()(l).subtract(1,"days").isAfter(i.end_time):$()(l).isBefore(i.begin_time)||$()(l).isAfter(i.end_time)),"end"==t&&(a=$()(l).add(1,"days").isBefore(i.begin_time)||$()(l).isAfter(i.end_time)),a},this.onDisabledTime=(e,t)=>{let i=JSON.parse(sessionStorage.getItem("redPackets_effectDate"));const a=new Date(i.begin_time),l=a.getHours(),s=a.getMinutes(),n=a.getSeconds();return Object(K.a)(e,a)?{disabledHours:()=>ut(l),disabledMinutes:e=>e===l?ut(s):[],disabledSeconds:(e,t)=>e===l&&t===s?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)(qe.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:[$()().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:l,end_time:s,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]=l,t.receive_mode=n||1,t.effect_date[1]=s,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.Mb)().then((e=>Object(a.Wb)(e,((e,t)=>{const i=e.default.map((e=>e.real_name)),a=e.default.map((e=>e.mobile)),l=[],s=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 l.push(t),t}return{key:e.mobile,text:e.real_name,closable:!0}}));this.onHandleChange(l,"early_notifier"),this.setState({userSelectList:s}),this.echoFun(s)}),(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!==Ue(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===Ue(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:l}=e;return t.receive_num=Number(i),t.num=Number(a),t.early_notifier=l.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,l=1===this.state.model.channel?.01:.1,s=a-(i-1)*t;let n=0;return n=s>200?200:s200?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"}dynamicPlaceholders(){return 2==this.state.model.channel?"\u8bf7\u8f93\u5165\u9762\u989d0.1 ~ 500\u5143":1==this.state.model.channel?"\u8bf7\u8f93\u5165\u9762\u989d0.01 ~ 200\u5143":3==this.state.model.channel?"\u8bf7\u8f93\u5165\u9762\u989d0.1 ~ 200\u5143":void 0}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:524,columnNumber:14},this):3==this.state.model.channel?Object(h.jsxDEV)(ot,{data:this.state.model},void 0,!1,{fileName:dt,lineNumber:527,columnNumber:14},this):Object(h.jsxDEV)(ze,{data:this.state.model},void 0,!1,{fileName:dt,lineNumber:529,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)(s.a,{model:this.state.model,rules:$e.basic,ref:"form",children:[Object(h.jsxDEV)(l.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:554,columnNumber:17},this),Object(h.jsxDEV)(ne.a,{value:2,children:"\u5fae\u4fe1"},void 0,!1,{fileName:dt,lineNumber:555,columnNumber:17},this),Object(h.jsxDEV)(ne.a,{value:3,children:"\u4e91\u95ea\u4ed8"},void 0,!1,{fileName:dt,lineNumber:556,columnNumber:17},this)]},void 0,!0,{fileName:dt,lineNumber:539,columnNumber:15},this)},void 0,!1,{fileName:dt,lineNumber:538,columnNumber:13},this),Object(h.jsxDEV)(l.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:572,columnNumber:17},this),Object(h.jsxDEV)(ne.a,{value:"2",children:"\u968f\u673a"},void 0,!1,{fileName:dt,lineNumber:573,columnNumber:17},this)]},void 0,!0,{fileName:dt,lineNumber:560,columnNumber:15},this)},void 0,!1,{fileName:dt,lineNumber:559,columnNumber:13},this),1===this.state.model.channel?Object(h.jsxDEV)(l.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:589,columnNumber:19},this),Object(h.jsxDEV)(ne.a,{value:2,children:"\u8d26\u53f7\u9886\u53d6"},void 0,!1,{fileName:dt,lineNumber:590,columnNumber:19},this)]},void 0,!0,{fileName:dt,lineNumber:583,columnNumber:17},this)},"receive_mode",!1,{fileName:dt,lineNumber:577,columnNumber:15},this):null,Object(h.jsxDEV)(l.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:595,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:611,columnNumber:15},this)]},void 0,!0,{fileName:dt,lineNumber:594,columnNumber:13},this),Object(h.jsxDEV)(l.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:14,height:"36px",width:"520px",alignment:"left"},void 0,!1,{fileName:dt,lineNumber:619,columnNumber:15},this)},void 0,!1,{fileName:dt,lineNumber:618,columnNumber:13},this),Object(h.jsxDEV)(l.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:640,columnNumber:15},this)},void 0,!1,{fileName:dt,lineNumber:635,columnNumber:13},this)]},void 0,!0,{fileName:dt,lineNumber:537,columnNumber:11},this)},void 0,!1,{fileName:dt,lineNumber:536,columnNumber:9},this),Object(h.jsxDEV)(d.a,{style:{width:"70%",margin:"10px 0"},title:"\u53d1\u653e\u89c4\u5219",children:Object(h.jsxDEV)(s.a,{model:this.state.model,rules:$e.grant,ref:"form1",children:[Object(h.jsxDEV)(l.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:661,columnNumber:15},this)},void 0,!1,{fileName:dt,lineNumber:660,columnNumber:13},this),Object(h.jsxDEV)(l.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:691,columnNumber:15},this)},void 0,!1,{fileName:dt,lineNumber:690,columnNumber:13},this),"1"===this.state.model.cash_amount_type?Object(h.jsxDEV)(l.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:this.dynamicPlaceholders(),disabled:this.state.isEdit,labelWidth:"0px",maxLength:6,height:"36px",unit:"\u5143",countShow:!1,width:"520px",alignment:"left"},void 0,!1,{fileName:dt,lineNumber:722,columnNumber:17},this)},"denomination",!1,{fileName:dt,lineNumber:721,columnNumber:15},this):Object(h.jsxDEV)(l.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:745,columnNumber:17},this),Object(h.jsxDEV)("span",{className:"JIan",children:"~"},void 0,!1,{fileName:dt,lineNumber:765,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:766,columnNumber:17},this)]},"random-denomination",!0,{fileName:dt,lineNumber:744,columnNumber:15},this),Object(h.jsxDEV)(l.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:799,columnNumber:15},this)},"amount",!1,{fileName:dt,lineNumber:793,columnNumber:13},this),Object(h.jsxDEV)(l.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:819,columnNumber:15},this)},void 0,!1,{fileName:dt,lineNumber:818,columnNumber:13},this),Object(h.jsxDEV)(l.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:839,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:864,columnNumber:19},this)))},void 0,!1,{fileName:dt,lineNumber:856,columnNumber:15},this)]},void 0,!0,{fileName:dt,lineNumber:838,columnNumber:13},this)]},void 0,!0,{fileName:dt,lineNumber:659,columnNumber:11},this)},void 0,!1,{fileName:dt,lineNumber:658,columnNumber:9},this),Object(h.jsxDEV)(d.a,{style:{width:"70%",margin:"10px 0"},title:"\u65f6\u95f4\u9650\u5236",children:Object(h.jsxDEV)(s.a,{model:this.state.model,rules:$e.time,ref:"form2",children:[Object(h.jsxDEV)(l.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:876,columnNumber:15},this)},void 0,!1,{fileName:dt,lineNumber:875,columnNumber:13},this),Object(h.jsxDEV)(l.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:918,columnNumber:19},this)},void 0,!1,{fileName:dt,lineNumber:895,columnNumber:17},this)},void 0,!1,{fileName:dt,lineNumber:894,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:944,columnNumber:19},this)},void 0,!1,{fileName:dt,lineNumber:922,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:[$()().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:950,columnNumber:25},this),this.ruleDayComponents(t)]},t,!0,{fileName:dt,lineNumber:949,columnNumber:23},this)))},void 0,!1):null]},void 0,!0,{fileName:dt,lineNumber:921,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:989,columnNumber:19},this)},void 0,!1,{fileName:dt,lineNumber:972,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:999,columnNumber:25},this)))},void 0,!1,{fileName:dt,lineNumber:993,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:[$()().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:1006,columnNumber:25},this),this.ruleComponents(t)]},t,!0,{fileName:dt,lineNumber:1005,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:1024,columnNumber:21},this)]},void 0,!0):null]},void 0,!0,{fileName:dt,lineNumber:971,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:1037,columnNumber:19},this)},void 0,!1,{fileName:dt,lineNumber:1029,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:1041,columnNumber:21},this),this.irregularComponents()]},void 0,!0):null]},void 0,!0,{fileName:dt,lineNumber:1028,columnNumber:15},this)]},void 0,!0,{fileName:dt,lineNumber:893,columnNumber:13},this)]},void 0,!0,{fileName:dt,lineNumber:874,columnNumber:11},this)},void 0,!1,{fileName:dt,lineNumber:873,columnNumber:9},this),Object(h.jsxDEV)(d.a,{style:{width:"70%",margin:"10px 0"},title:"\u9884\u8b66\u89c4\u5219",children:Object(h.jsxDEV)(s.a,{model:this.state.model,rules:$e.warning,ref:"form4",children:[Object(h.jsxDEV)(l.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:1064,columnNumber:19},this))),Object(h.jsxDEV)(j.a,{value:this.state.input_early_per},void 0,!1,{fileName:dt,lineNumber:1068,columnNumber:17},this)]},void 0,!0,{fileName:dt,lineNumber:1057,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:1070,columnNumber:15},this)]},void 0,!0,{fileName:dt,lineNumber:1056,columnNumber:13},this),Object(h.jsxDEV)(l.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:1093,columnNumber:17},this)},void 0,!1,{fileName:dt,lineNumber:1092,columnNumber:15},this),Object(h.jsxDEV)("div",{className:"userSelect",children:Object(h.jsxDEV)("ol",{children:Object(se.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:1114,columnNumber:25},this))):null},void 0,!1,{fileName:dt,lineNumber:1111,columnNumber:17},this)},void 0,!1,{fileName:dt,lineNumber:1110,columnNumber:15},this)]},void 0,!0,{fileName:dt,lineNumber:1091,columnNumber:13},this)]},void 0,!0,{fileName:dt,lineNumber:1055,columnNumber:11},this)},void 0,!1,{fileName:dt,lineNumber:1054,columnNumber:9},this),Object(h.jsxDEV)(d.a,{style:{width:"70%",margin:"10px 0"},title:"\u6837\u5f0f\u8bbe\u7f6e",children:Object(h.jsxDEV)(s.a,{ref:"form3",children:Object(h.jsxDEV)(l.a,{id:"instruction",labelname:"\u4f7f\u7528\u8bf4\u660e",required:"",children:Object(h.jsxDEV)(lt,{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:1132,columnNumber:15},this)},void 0,!1,{fileName:dt,lineNumber:1131,columnNumber:13},this)},void 0,!1,{fileName:dt,lineNumber:1130,columnNumber:11},this)},void 0,!1,{fileName:dt,lineNumber:1129,columnNumber:9},this),this.switchComponents()]},void 0,!0,{fileName:dt,lineNumber:534,columnNumber:7},this)}}var bt=i(492),pt=i(523),Nt=(i(347),i(348)),jt=i.n(Nt),vt=i(211),gt=i(489),ft=(i(215),"D:\\project\\\u8425\u9500\u7cfb\u7edf\\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(R.a)({productOption:[],productDataAll:[],productPic:[],isUpdatePic:!1,loading:!0}),[j,v]=Object(R.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 l={reseller_id:m,type:i?1:j.product_type};Object(a.vb)(l).then((i=>{Object(a.Wb)(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 l=new FormData;l.append("file",e),l.append("path","common_image"),Object(a.fd)(l).then((e=>{Object(a.Wb)(e,((e,i)=>{t(e.path)}),(e=>{c.a.error(e),i(e)}))}))}catch(l){i(l)}})),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)(s.a,{model:j,rules:_t,ref:u,children:[Object(h.jsxDEV)(l.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)(l.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)(l.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 l=i.products.find((e=>Number(e.id)===Number(t.id)));null===l||void 0===l||l.pic.map(((t,i)=>{e.push({id:(new Date).getTime(),src:t,name:l.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)(l.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)(l.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)(l.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)(l.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)(l.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)(l.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)(l.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)(l.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)(l.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)(l.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="D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\components\\UseGoodsScopePop\\index.jsx";var Ot=Object(r.forwardRef)(((e,t)=>{const{product_title:i,drawerVisible:a,onClose:l,type:s,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"===s?await v.current.submit():"addKnockGold"===s?await g.current.submit():await f.current.submit(),e){let e={};e="addProduct"===s?(()=>{let e=m,t=v.current.getFormModel();if(t.upstream="\u76f4\u8fde\u5929\u4e0b",t.type=1,t.stock=t.quantity,t.all_budget=L(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"===s?(()=>{let e=m,t=g.current.state.form_data,a=M(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=q(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),l()}}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=>l(),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=>l(),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(s){case"addKnockGold":return Object(h.jsxDEV)(Me,{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),"D:\\project\\\u8425\u9500\u7cfb\u7edf\\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(R.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(R.a)({plan_id:"",key_batch_id:"",title:"",date_time:""}),v=Object(r.useRef)(null),[_,x]=Object(R.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]})),I(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:L(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:L(Number(e.contract_price),Number(e.quantity)),effectDate:"-"}))),t=m.product.reduce.map((e=>("2"===b.KeyPcType&&(delete e.id,delete e.goods_id),M(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.Rc)({bind_object:"2"}).then((t=>{Object(a.Wb)(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)((()=>{B()}),[_.reduce,_.full]),Object(r.useEffect)((()=>{A()}),[_.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:[]})},I=e=>{Object(a.xb)(e).then((e=>{Object(a.Wb)(e,((e,t)=>{p({direct_reseller_id:e.direct_reseller_id})}),(e=>{c.a.error(e)}))}))},F=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}),I(e.key.reseller_id),await(t=e.key.key,new Promise(((e,i)=>{try{Object(a.Qc)({status:"4,5",plan_id:t,bind_object:2}).then((t=>{Object(a.Wb)(t,((t,i)=>{let a=t.map((e=>({key:e.id,text:e.batch_name})));p({key_OPTIONS:a}),e(a)}))}))}catch(l){i(l)}})))},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))},q=()=>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:q(),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){}},W=(e,t)=>Object(h.jsxDEV)(U.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),B=()=>{z(_.reduce)&&z(_.full)?p({isQuantity:!1}):p({isQuantity:!0})},A=()=>{if(z(_.reduce)&&z(_.quantity)){let e=L(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)(s.a,{model:N,rules:kt,ref:v,children:[0===i?Object(h.jsxDEV)(l.a,{labelname:"\u5f52\u5c5e\u8ba1\u5212",prop:"plan_id",children:Object(h.jsxDEV)(X.a,{clearable:!0,placeholder:"\u9009\u62e9\u4e00\u9879",renderOptionList:W,options:b.plan_OPTIONS,value:N.plan_id,disabled:"2"===b.KeyPcType||"1"===b.KeyPcType,onChange:e=>{F(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)(l.a,{labelname:"\u5f52\u5c5ekey",prop:"key_batch_id",children:Object(h.jsxDEV)(X.a,{clearable:!0,placeholder:"\u9009\u62e9\u4e00\u9879",renderOptionList:W,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)(l.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)(l.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(),l=i.getMinutes(),s=i.getSeconds();return Object(K.a)(e,i)?{disabledHours:()=>Et(a),disabledMinutes:e=>e===a?Et(l):[],disabledSeconds:(e,t)=>e===a&&t===l?Et(s):[]}:{}},disabledDate:(e,t)=>{let i=JSON.parse(sessionStorage.getItem("knockGold_effectDate")),a=!1,l=$()(e).format("YYYY-MM-DD HH:mm:ss");const s=$()(i.end_time).format("HH:mm:ss");return"start"==t&&(a=s<"23:59:59"?$()(l).isBefore(i.begin_time)||$()(l).subtract(1,"days").isAfter(i.end_time):$()(l).isBefore(i.begin_time)||$()(l).isAfter(i.end_time)),"end"==t&&(a=$()(l).add(1,"days").isBefore(i.begin_time)||$()(l).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)(s.a,{model:_,rules:St,ref:y,children:[Object(h.jsxDEV)(l.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)(l.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)(l.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)(l.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)(l.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)(l.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)(l.a,{labelname:"",prop:"range",id:"range",children:Object(h.jsxDEV)(T,{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:q(),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.Wb)(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.Wb)(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="D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\pages\\coupon\\addEdit\\index.jsx";var It=()=>{const e=Object(r.useRef)(null),[t,i]=Object(R.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.Y)(e).then((e=>{Object(a.Wb)(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)},Tt=(i(218),"D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\components\\tabPage\\main.js");class Lt 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:Tt,lineNumber:69,columnNumber:17},this)},t,!1,{fileName:Tt,lineNumber:62,columnNumber:15},this))),Object(h.jsxDEV)("div",{className:"tabbar-slot",children:this.props.slot},void 0,!1,{fileName:Tt,lineNumber:74,columnNumber:11},this)]},void 0,!0,{fileName:Tt,lineNumber:59,columnNumber:9},this),Object(h.jsxDEV)("div",{className:"tab-body",children:this.props.children},void 0,!1,{fileName:Tt,lineNumber:76,columnNumber:9},this)]},void 0,!0,{fileName:Tt,lineNumber:58,columnNumber:7},this)}}var Ft=i(516),Ht=i(517),Mt=i(471),qt="D:\\project\\\u8425\u9500\u7cfb\u7edf\\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 Wt=()=>{const[e,t]=Object(R.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),l=()=>{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(Ft.a)({...t},(e=>Object(Ht.a)(e)||Object(Mt.a)(e))),t})();Object(a.T)(i).then((e=>{Object(a.Wb)(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)((()=>{l()}),[e.isQuery]);return Object(h.jsxDEV)("div",{className:"table-box-app",children:[Object(h.jsxDEV)(Lt,{tabs:e.tabList,tabChange:i=>(i=>{t({page:1,limit:10,status:i,isQuery:!e.isQuery})})(i)},void 0,!1,{fileName:qt,lineNumber:219,columnNumber:7},void 0),Object(h.jsxDEV)("div",{className:"query-box",children:[Object(h.jsxDEV)("div",{},void 0,!1,{fileName:qt,lineNumber:221,columnNumber:9},void 0),Object(h.jsxDEV)(n.a,{onChange:e=>t({key_word:e}),value:e.key_word,wordSearch:()=>l(),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:qt,lineNumber:222,columnNumber:9},void 0)]},void 0,!0,{fileName:qt,lineNumber:220,columnNumber:7},void 0),Object(h.jsxDEV)(T,{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,l)=>"dates"===i?Object(h.jsxDEV)("span",{children:[l.begin_time," \u81f3 ",l.end_time]},void 0,!0,{fileName:qt,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=l,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:qt,lineNumber:193,columnNumber:16},void 0),onConfirm(){Object(a.E)(i.id).then((i=>{Object(a.Wb)(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:qt,lineNumber:265,columnNumber:17},void 0)},void 0,!1,{fileName:qt,lineNumber:264,columnNumber:15},void 0):void 0},void 0,!1,{fileName:qt,lineNumber:235,columnNumber:7},void 0)]},void 0,!0,{fileName:qt,lineNumber:218,columnNumber:5},void 0)};var Bt={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"}}},At=i(5),Jt=i(496);i(219);const zt=(e,t=3)=>new Promise((async(i,l)=>{let s=null;s=1===t?await Object(a.Vc)(e):2===t?await Object(a.Wc)(e):await Object(a.Xc)(e),200===s.code?!0===s.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",s.data.order.status_text,"\u8ba2\u5355\uff0c\u662f\u5426\u7ee7\u7eed\u4f5c\u5e9f \uff1f"]},void 0,!0,{fileName:"D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\tools\\apiTools.js",lineNumber:34,columnNumber:13},void 0),onConfirm(){i(2)},onCancel(){i(0)},className:"questModal",parentComponent:void 0}):i(1):l(s)}));var Rt="D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\pages\\coupon\\list\\index.jsx";const Kt=[{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 Yt=()=>{const[e,t]=Object(R.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(At.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(Ft.a)({...a},(e=>Object(Ht.a)(e)||Object(Mt.a)(e))),a})();Object(a.Z)(i).then((e=>{Object(a.Wb)(e,((e,i)=>{t({page:e.page,total:e.total,tableData:e.data})}))}))};function d(i,a){const l=e.search;l[i]=a,t({search:l})}Object(r.useEffect)((()=>{Object(a.tb)().then((e=>Object(a.Wb)(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.Wb)(i,((i,a)=>{c.a.clear(),c.a.success(a),t({isQuery:!e.isQuery})}),(e=>{c.a.error(e)}))})).catch((e=>{}))},N=(i,l)=>{switch(i){case 1:return[4,5,6,8].includes(l.status)?Object(h.jsxDEV)("span",{style:{color:"#d8dbdd"},className:"grid-link",children:"\u7f16\u8f91"},void 0,!1,{fileName:Rt,lineNumber:469,columnNumber:13},void 0):Object(h.jsxDEV)("span",{className:"grid-link",onClick:e=>b(2,l),children:"\u7f16\u8f91"},void 0,!1,{fileName:Rt,lineNumber:475,columnNumber:13},void 0);case 2:let i="";return i=[1,2,3].includes(l.status)||[4,5].includes(l.status)&&[4,5,8].includes(l.keyBatch.status)&&[3,5,4].includes(l.keyBatch.plan.status)?Object(h.jsxDEV)("span",{className:"grid-link",style:{},onClick:e=>b(1,l),children:"\u590d\u5236"},void 0,!1,{fileName:Rt,lineNumber:494,columnNumber:13},void 0):Object(h.jsxDEV)("span",{style:{paddingRight:"10px",color:"#d8dbdd"},children:"\u590d\u5236"},void 0,!1,{fileName:Rt,lineNumber:500,columnNumber:13},void 0),i;case 3:return-1===l.status||7===l.status&&-1===l.old_status?Object(h.jsxDEV)("span",{className:"grid-link",style:{color:"red"},onClick:()=>{return i=l,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:Rt,lineNumber:396,columnNumber:16},void 0),onConfirm:()=>{Object(a.C)(i.id).then((i=>{Object(a.Wb)(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:Rt,lineNumber:515,columnNumber:13},void 0):[1,2,3].includes(l.old_status)?1===l.approval_status?Object(h.jsxDEV)("span",{style:{paddingRight:"10px",color:"#d8dbdd"},children:"\u4f5c\u5e9f"},void 0,!1,{fileName:Rt,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{zt(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:Rt,lineNumber:375,columnNumber:22},void 0),onConfirm(){p(t.id)},onCancel(){},className:"questModal",parentComponent:void 0})}))}catch(a){}})(0,l),children:"\u4f5c\u5e9f"},void 0,!1,{fileName:Rt,lineNumber:540,columnNumber:13},void 0):Object(h.jsxDEV)("span",{style:{paddingRight:"10px",color:"#d8dbdd"},children:"\u4f5c\u5e9f"},void 0,!1,{fileName:Rt,lineNumber:546,columnNumber:13},void 0);case 4:return 6===l.status&&Number(l.approval_id)>0?Object(h.jsxDEV)("span",{className:"grid-link",onClick:e=>j(e,l),children:"\u64a4\u9500\u5ba1\u6279"},void 0,!1,{fileName:Rt,lineNumber:560,columnNumber:13},void 0):Object(h.jsxDEV)("span",{style:{color:"#d8dbdd"},children:"\u64a4\u9500\u5ba1\u6279"},void 0,!1,{fileName:Rt,lineNumber:565,columnNumber:18},void 0);default:return}},j=(i,l)=>{let s=l.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:Rt,lineNumber:579,columnNumber:16},void 0),onConfirm:()=>{Object(a.ed)(s).then((i=>{Object(a.Wb)(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($()(i[1]).diff($()(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:Rt,lineNumber:622,columnNumber:5},void 0);return Object(h.jsxDEV)("div",{className:"table-box-app",children:[Object(h.jsxDEV)(Lt,{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:Rt,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:Rt,lineNumber:643,columnNumber:9},void 0),Object(h.jsxDEV)("div",{className:"codesFind",children:Object(h.jsxDEV)(s.a,{children:[Object(h.jsxDEV)(l.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:Rt,lineNumber:649,columnNumber:15},void 0)},void 0,!1,{fileName:Rt,lineNumber:648,columnNumber:13},void 0),Object(h.jsxDEV)(l.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:Rt,lineNumber:662,columnNumber:15},void 0)},void 0,!1,{fileName:Rt,lineNumber:661,columnNumber:13},void 0),Object(h.jsxDEV)(l.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:Rt,lineNumber:677,columnNumber:15},void 0)},void 0,!1,{fileName:Rt,lineNumber:676,columnNumber:13},void 0),Object(h.jsxDEV)(l.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:Rt,lineNumber:692,columnNumber:15},void 0)},void 0,!1,{fileName:Rt,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:Rt,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:Rt,lineNumber:710,columnNumber:15},void 0)]},void 0,!0,{fileName:Rt,lineNumber:706,columnNumber:13},void 0)]},void 0,!0,{fileName:Rt,lineNumber:647,columnNumber:11},void 0)},void 0,!1,{fileName:Rt,lineNumber:646,columnNumber:9},void 0)]},void 0,!0,{fileName:Rt,lineNumber:642,columnNumber:7},void 0),Object(h.jsxDEV)(T,{spliteColor:"#fff",tableData:e.tableData,Column:Kt,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,l)=>"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,l),children:l.title},void 0,!1,{fileName:Rt,lineNumber:742,columnNumber:15},void 0):"dates"===i?Object(h.jsxDEV)("span",{children:[l.begin_time," \u81f3 ",l.end_time]},void 0,!0,{fileName:Rt,lineNumber:749,columnNumber:15},void 0):"switch"==i?Object(h.jsxDEV)(v.a,{size:"small",checked:2!=l.old_status,onChange:i=>{return s=l,void G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:["\u662f\u5426",2==s.old_status?"\u542f\u7528":"\u505c\u7528","\u8be5\u4f18\u60e0\u5238\u6279\u6b21\uff1f"]},void 0,!0,{fileName:Rt,lineNumber:425,columnNumber:16},void 0),onConfirm:()=>{Object(a.Bc)(s.id,{operation:1==s.old_status?"2":"1"}).then((i=>{Object(a.Wb)(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 s},disabled:4==l.status||5==l.status},void 0,!1,{fileName:Rt,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:Bt.exchangeStatusBg(parseInt(l.status))}},void 0,!1,{fileName:Rt,lineNumber:770,columnNumber:19},void 0),l.status_text]},void 0,!0,{fileName:Rt,lineNumber:769,columnNumber:17},void 0)},void 0,!1,{fileName:Rt,lineNumber:768,columnNumber:15},void 0):"opearo"==i?Object(h.jsxDEV)("div",{children:[N(1,l),N(2,l),N(3,l),l.approval_id&&6===l.status?Object(h.jsxDEV)("span",{className:"grid-link",onClick:i=>{return s=l.approval_id,void Object(a.G)(s).then((i=>{Object(a.Wb)(i,((i,a)=>{c.a.success(a),t({isQuery:!e.isQuery})}),(e=>{c.a.error(e)}))}));var s},children:"\u9489\u9489\u5ba1\u6279\u67e5\u8be2"},void 0,!1,{fileName:Rt,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:Rt,lineNumber:793,columnNumber:19},void 0),N(4,l)]},void 0,!0,{fileName:Rt,lineNumber:784,columnNumber:15},void 0):void 0},void 0,!1,{fileName:Rt,lineNumber:721,columnNumber:7},void 0)]},void 0,!0,{fileName:Rt,lineNumber:634,columnNumber:5},void 0)},$t=(i(36),i(220),i(501)),Ut=i(69),Gt=i(472),Qt=i(344),Zt=(i(221),"D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\components\\UseLazyLoadingSelect\\index.js");var Xt=({options:e,clearable:t=!1,placeholder:i="\u8bf7\u8f93\u5165",value:a,onChange:l,width:s,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:l,width:s,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="D:\\project\\\u8425\u9500\u7cfb\u7edf\\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.cb)(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.fd)(i).then((e=>{Object(a.Wb)(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.fb)(e).then((e=>{Object(a.Wb)(e,((e,t)=>{}),(e=>{c.a.error(e)}))})).catch((e=>{}));else{let t={id:JSON.parse(sessionStorage.getItem("dataInfo")).id};Object(a.Rb)(e,t).then((e=>{Object(a.Wb)(e,((e,t)=>{}),(e=>{c.a.error(e)}))})).catch((e=>{}))}}AccountblurFn(e){if(0==this.props.enumer)Object(a.eb)(e).then((e=>{Object(a.Wb)(e,((e,t)=>{}),(e=>{c.a.error(e)}))})).catch((e=>{}));else{let t={id:JSON.parse(sessionStorage.getItem("dataInfo")).id};Object(a.Qb)(e,t).then((e=>{Object(a.Wb)(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),l={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},s=a.contact_phone,n=this.state.phoneSwitch;for(let c=0;c0){n[c-1]=!0,l["phone"+c]=s[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,l["email"+c]=r[c]}this.setState({emailSwitch:o});let m={};m.src=a.head_img,this.setState({id:a.id,phone_nums:s.length,email_nums:r.length,model:l,disabled:!0,isSelectDirect:i,defaultFileList:[m],id:a.id,headImg:a.head_img})}}getPersonnelFn(){let e=this;Object(a.sb)().then((t=>{Object(a.Wb)(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.X)().then((t=>{Object(a.Wb)(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.cb)(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)(s.a,{model:this.state.model,rules:this.state.rules,ref:"form1",className:"addform",children:[Object(h.jsxDEV)(l.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)(l.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)(l.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)($t.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)(l.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)(l.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)(l.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)(l.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),Ut.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)(l.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),Ut.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)(l.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),Ut.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)(l.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),Ut.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)(l.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)(l.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),Ut.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)(l.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),Ut.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)(l.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),Ut.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)(l.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),Ut.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)(l.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),Ut.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)(l.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),Ut.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)(l.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),Ut.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)(l.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),Ut.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 li="D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\pages\\distributor\\add\\add.js";class si 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:li,lineNumber:30,columnNumber:19},this),"\u5206\u9500\u5546\uff1f"]},void 0,!0,{fileName:li,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:li,lineNumber:34,columnNumber:19},this),"\u5206\u9500\u5546\u4fe1\u606f\uff1f"]},void 0,!0,{fileName:li,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 l=[t.contact_phone];l.push(e.phone1),l.push(e.phone2),l.push(e.phone3),l.push(e.phone4);let s=l.filter((e=>e));e.contact_phone=s.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.mc)(e).then((e=>{Object(a.Wb)(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.Ic)(t,e).then((e=>{Object(a.Wb)(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:li,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:li,lineNumber:153,columnNumber:13},this)},void 0,!1,{fileName:li,lineNumber:152,columnNumber:11},this)},void 0,!1,{fileName:li,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:li,lineNumber:157,columnNumber:11},this),Object(h.jsxDEV)(u.a,{type:"normal",onClick:this.cancel.bind(this),children:"\u53d6\u6d88"},void 0,!1,{fileName:li,lineNumber:160,columnNumber:11},this)]},void 0,!0,{fileName:li,lineNumber:156,columnNumber:9},this)]},void 0,!0,{fileName:li,lineNumber:150,columnNumber:7},this)}}i(223),i(224);var ni=i(518),oi=(i(225),i(445)),ri="D:\\project\\\u8425\u9500\u7cfb\u7edf\\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="D:\\project\\\u8425\u9500\u7cfb\u7edf\\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)),l=i.map((e=>e.name));this.props.selectFn(a,this.state.propName),this.setState({text:l.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="D:\\project\\\u8425\u9500\u7cfb\u7edf\\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,l)=>{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(487),pi=i(475),Ni=i(494),ji=i(162),vi="D:\\project\\\u8425\u9500\u7cfb\u7edf\\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),l=e.id;Object(a.Jc)(l,t).then((t=>{Object(a.Wb)(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="D:\\project\\\u8425\u9500\u7cfb\u7edf\\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:"\u7528\u6237\u4f59\u989d\uff08\u5143\uff09",name:"balance",type:"normal",prop:"balance",width:"auto"},{title:"\u6388\u4fe1\uff08\u5143\uff09",name:"extension",type:"normal",prop:"extension",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:181,columnNumber:15},this),"\u5206\u9500\u5546\uff1f"]},void 0,!0,{fileName:_i,lineNumber:180,columnNumber:9},this),onConfirm:()=>{Object(a.w)(t.id).then((e=>{Object(a.Wb)(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.xb)(t.id).then((e=>{Object(a.Wb)(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:301,columnNumber:11},this),"\u5206\u9500\u5546\u72b6\u6001\uff1f"]},void 0,!0,{fileName:_i,lineNumber:299,columnNumber:9},this),onConfirm:()=>{Object(a.Kc)(t.id,{operation:1==t.status?2:1}).then((e=>{Object(a.Wb)(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:l,status:s}=e.state,n={page:t,limit:i};l&&(n.key_word=l),s&&(n.status=s),Object(a.yb)(n).then((t=>{Object(a.Wb)(t,((t,i)=>{const a=t.data,{total:l}=t;e.setState({resellerList:a,total:l})}),(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)(Lt,{tabs:this.state.tabList,children:[Object(h.jsxDEV)("div",{className:"distable dflexajce",children: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:446,columnNumber:13},this)},void 0,!1,{fileName:_i,lineNumber:441,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:461,columnNumber:11},this),Object(h.jsxDEV)("div",{children:[Object(h.jsxDEV)(T,{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:490,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:502,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:510,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:522,columnNumber:32},this)," "]},void 0,!0,{fileName:_i,lineNumber:520,columnNumber:27},this)},void 0,!1,{fileName:_i,lineNumber:519,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:531,columnNumber:29},this),Object(h.jsxDEV)(D.a,{children:"\u66f4\u65b0\u5546\u6237"},"3",!1,{fileName:_i,lineNumber:532,columnNumber:29},this)]},void 0,!0,{fileName:_i,lineNumber:526,columnNumber:27},this)},void 0,!1,{fileName:_i,lineNumber:525,columnNumber:25},this)]},void 0,!0,{fileName:_i,lineNumber:518,columnNumber:23},this)]},void 0,!0,{fileName:_i,lineNumber:501,columnNumber:21},this):void 0},void 0,!1,{fileName:_i,lineNumber:472,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:549,columnNumber:17},this)},void 0,!1,{fileName:_i,lineNumber:548,columnNumber:15},this)},void 0,!1,{fileName:_i,lineNumber:542,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:560,columnNumber:17},this),title:"\u65e5\u5fd7",style:{width:"60%"},children:Object(h.jsxDEV)(T,{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:567,columnNumber:15},this)},void 0,!1,{fileName:_i,lineNumber:556,columnNumber:13},this)]},void 0,!0,{fileName:_i,lineNumber:471,columnNumber:11},this)]},void 0,!0,{fileName:_i,lineNumber:440,columnNumber:9},this)},void 0,!1,{fileName:_i,lineNumber:439,columnNumber:7},this)}}var Di=i(504),Ei=i(289),Vi=(i(232),"D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\pages\\distributor\\merchant\\index.jsx");var ki=i(519),Si=(i(233),"D:\\project\\\u8425\u9500\u7cfb\u7edf\\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.T)(e).then((e=>{Object(a.Wb)(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(4),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.Wb)(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)(Lt,{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)(T,{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 Ii=i(520),Ti=i(521),Li=i(479);i(234);const Fi={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"}]},Mi=[{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 qi(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(4),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(F(e.all_budget,L(e.reduce_amount,e.send_num))),l={};return l.product_name=e.batch_goods_name||e.product_name,l.channel_activity_id=e.channel_activity_id,l.only=e.channel_activity_id,l.type=2,l.checked=null===e||void 0===e?void 0:e.checked,l.upstream=P(e.channel),l.edit="edit",l.all_budget=e.all_budget,l.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),l.contract_price=e.contract_price||e.price,l.official_price=e.official_price||e.reduce_amount,l.quantity=e.quantity||a,l.stock=e.stock||a,l.usage=e.usage||0,l.origin=e,l.id=e.goods_id||e.id,l.product_id=e.goods_id||"-",l}var Wi="D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\pages\\exchangecode\\exchangecodeAdd\\index.jsx";const Bi=e=>Array.from({length:e},((e,t)=>t));let Ai="";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(),l=i.getMinutes(),s=i.getSeconds();return Object(K.a)(e,i)?{disabledHours:()=>Bi(a),disabledMinutes:e=>e===a?Bi(l):[],disabledSeconds:(e,t)=>e===a&&t===l?Bi(s):[]}:{}},this.onDisabledRange=(e,t)=>{let i=!1,a=$()(e).format("YYYY-MM-DD HH:mm:ss");const l=$()(this.state.plan_time[1]).format("HH:mm:ss");return"start"===t&&(i=l<"23:59:59"?$()(a).isBefore(this.state.plan_time[0])||$()(a).subtract(1,"days").isAfter(this.state.plan_time[1]):$()(a).isBefore(this.state.plan_time[0])||$()(a).isAfter(this.state.plan_time[1])),"end"===t&&(i=$()(a).add(1,"days").isBefore(this.state.plan_time[0])||$()(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");Ai=~~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.Rc)({bind_object:"1"}).then((e=>{Object(a.Wb)(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.Qc)({status:"4,5",plan_id:e,bind_object:1}).then((e=>{Object(a.Wb)(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.xb)(e).then((e=>{Object(a.Wb)(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.V)(Ai).then((e=>{Object(a.Wb)(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 l=[];if(i.length>0){let e=[],t=[];a.range=i.map((i=>{null!==i&&void 0!==i&&i.id?(l.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 s=[];Object(f.a)(t.goods,(e=>{let t={};return t.key=e.only,t.text=e.product_name,t.id=e.id,s.push(t),t})),this.setState({codeInfo:a,isload:!0,tempdata:t.goods||[],plan_time:[t.plan.begin_time,t.plan.end_time],rank:l,rankoptions:s,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=[],l=[];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(F(e.all_budget,L(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=qi(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),l.push(i.origin)})),sessionStorage.setItem("productData",JSON.stringify(i)),sessionStorage.setItem("knockGoldData",JSON.stringify(a)),sessionStorage.setItem("redPacketsData",JSON.stringify(l)),t}onRankChange(e){Object(Ii.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:Wi,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=[],l=[];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},l.push(t)}}));let s=Object(Ti.a)(this.state.oldProduct,a,Li.a);s=s.filter((e=>this.state.new_product.indexOf(e)<0)),this.state.deleteProduct.length>0&&(s=s.concat(this.state.deleteProduct).map(Number)),a=Object(f.a)(l,(e=>e.only)),s=Object(_.a)(s,(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 l.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:s},addProduct:i,updateProduct:l}}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=Ai),{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.Ac)(Ai,e).then((e=>{Object(a.Wb)(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.cc)(t,e).then((e=>{Object(a.Wb)(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 l=sessionStorage.getItem("approval_id");Number(l)<=0?Object(a.gb)(Ai,e).then((e=>{Object(a.Wb)(e,((e,t)=>{e.is_require_approval?this.setState({audit_visible:!0}):this.submitCodeData()}),(e=>{c.a.error(e)}))})):Object(a.R)(l).then((t=>{Object(a.Wb)(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.gb)(Ai,e).then((e=>{Object(a.Wb)(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)),l=t?t.product_type:1;return Object(h.jsxDEV)(xt,{ref:"product",checkedProduct:a,productData:t,directResellerId:i,productType:l,isSettlement:this.state.isSettlement,settlementData:this.state.settlementData},void 0,!1,{fileName:Wi,lineNumber:744,columnNumber:11},this);case 2:return Object(h.jsxDEV)(Me,{ref:"knockGold",data:this.state.productData},void 0,!1,{fileName:Wi,lineNumber:755,columnNumber:16},this);case 3:return Object(h.jsxDEV)(ht,{ref:"redPackets",data:this.state.productData},void 0,!1,{fileName:Wi,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,qi(e)})));let a=te(t.concat(i),"only"),l=[],s=[];Object(f.a)(a,(e=>{l.push({key:e.only,text:e.product_name}),e.checked&&s.push({key:e.only,text:e.product_name})})),l=te(l,"key"),this.setState({tempdata:a,rankoptions:l,rank:s}),this.getTableList()}}onReCall(){let e=sessionStorage.getItem("approval_id");this.setState({recall_visible:!1}),Object(a.ed)(e).then((e=>{Object(a.Wb)(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)(s.a,{model:this.state.codeInfo,rules:Fi,ref:"code_info",className:"addform",children:[Object(h.jsxDEV)(l.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:Wi,lineNumber:953,columnNumber:19},this)},void 0,!1,{fileName:Wi,lineNumber:952,columnNumber:17},this),Object(h.jsxDEV)(l.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:Wi,lineNumber:971,columnNumber:19},this)},void 0,!1,{fileName:Wi,lineNumber:970,columnNumber:17},this),Object(h.jsxDEV)(l.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:Wi,lineNumber:990,columnNumber:19},this)},void 0,!1,{fileName:Wi,lineNumber:989,columnNumber:17},this),2!==this.state.isState?Object(h.jsxDEV)(l.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:Wi,lineNumber:1005,columnNumber:21},this)},void 0,!1,{fileName:Wi,lineNumber:1004,columnNumber:19},this):null,2===this.state.isState?Object(h.jsxDEV)(h.Fragment,{children:[Object(h.jsxDEV)(l.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:Wi,lineNumber:1024,columnNumber:23},this)},void 0,!1,{fileName:Wi,lineNumber:1023,columnNumber:21},this),Object(h.jsxDEV)(l.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:Wi,lineNumber:1027,columnNumber:23},this)},void 0,!1,{fileName:Wi,lineNumber:1026,columnNumber:21},this)]},void 0,!0):Object(h.jsxDEV)(l.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:Wi,lineNumber:1032,columnNumber:21},this)},void 0,!1,{fileName:Wi,lineNumber:1031,columnNumber:19},this),Object(h.jsxDEV)(l.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:Wi,lineNumber:1049,columnNumber:19},this)},void 0,!1,{fileName:Wi,lineNumber:1048,columnNumber:17},this)]},void 0,!0,{fileName:Wi,lineNumber:946,columnNumber:15},this)},void 0,!1,{fileName:Wi,lineNumber:945,columnNumber:13},this)},void 0,!1,{fileName:Wi,lineNumber:944,columnNumber:11},this)},void 0,!1,{fileName:Wi,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)(s.a,{model:this.state.codeInfo,rules:Hi,ref:"code_rule",className:"addform",children:[Object(h.jsxDEV)(l.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=>{Ut.a.emit("change","date_time",e),this.onChangeCombinedDate(e)},width:245,disabledTime:this.onDisabledTime,disabledDate:this.onDisabledRange},void 0,!1,{fileName:Wi,lineNumber:1074,columnNumber:19},this)},void 0,!1,{fileName:Wi,lineNumber:1073,columnNumber:17},this),Object(h.jsxDEV)(l.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:Wi,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:Wi,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:Wi,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:Wi,lineNumber:1136,columnNumber:21},this)]},void 0,!0,{fileName:Wi,lineNumber:1096,columnNumber:19},this)},void 0,!1,{fileName:Wi,lineNumber:1095,columnNumber:17},this),Object(h.jsxDEV)(l.a,{labelname:"",prop:"range",id:"range",children:Object(h.jsxDEV)(T,{ref:"tempdata",headBackgroud:"#f9fafc",isShowPageBar:!1,spliteColor:"#fff",tableData:this.state.tempdata,value:this.state.tempdata,Column:Mi,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:Wi,lineNumber:1202,columnNumber:27},this):void 0},void 0,!1,{fileName:Wi,lineNumber:1155,columnNumber:19},this)},void 0,!1,{fileName:Wi,lineNumber:1154,columnNumber:17},this)]},void 0,!0,{fileName:Wi,lineNumber:1067,columnNumber:15},this)},void 0,!1,{fileName:Wi,lineNumber:1066,columnNumber:13},this)},void 0,!1,{fileName:Wi,lineNumber:1065,columnNumber:11},this)},void 0,!1,{fileName:Wi,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:Wi,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:Wi,lineNumber:1233,columnNumber:15},this)]},void 0,!0,{fileName:Wi,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:Wi,lineNumber:1250,columnNumber:13},this)},void 0,!1,{fileName:Wi,lineNumber:1249,columnNumber:11},this)},void 0,!1,{fileName:Wi,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:Wi,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:Wi,lineNumber:1260,columnNumber:15},this),Object(h.jsxDEV)("div",{className:"audit-box-title",children:"\u63d0\u4ea4\u5ba1\u6838"},void 0,!1,{fileName:Wi,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:Wi,lineNumber:1274,columnNumber:19},this),Object(h.jsxDEV)(Z.a,{value:1,children:"\u5bf9\u79c1\u8d26\u6237"},void 0,!1,{fileName:Wi,lineNumber:1275,columnNumber:19},this),Object(h.jsxDEV)(Z.a,{value:2,children:"\u5bf9\u516c\u8d26\u6237"},void 0,!1,{fileName:Wi,lineNumber:1276,columnNumber:19},this)]},void 0,!0,{fileName:Wi,lineNumber:1269,columnNumber:17},this)},void 0,!1,{fileName:Wi,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:Wi,lineNumber:1280,columnNumber:17},this),Object(h.jsxDEV)(u.a,{type:"primary",onClick:e=>{this.onConfirm(e)},children:"\u786e\u5b9a"},void 0,!1,{fileName:Wi,lineNumber:1287,columnNumber:17},this)]},void 0,!0,{fileName:Wi,lineNumber:1279,columnNumber:15},this)]},void 0,!0,{fileName:Wi,lineNumber:1259,columnNumber:13},this)]},void 0,!0,{fileName:Wi,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:Wi,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:Wi,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:Wi,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:Wi,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:Wi,lineNumber:1313,columnNumber:17},this),Object(h.jsxDEV)(u.a,{type:"primary",onClick:e=>{this.onReCall(e)},children:"\u786e\u5b9a"},void 0,!1,{fileName:Wi,lineNumber:1320,columnNumber:17},this)]},void 0,!0,{fileName:Wi,lineNumber:1312,columnNumber:15},this)]},void 0,!0,{fileName:Wi,lineNumber:1302,columnNumber:13},this)]},void 0,!0,{fileName:Wi,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:Wi,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:Wi,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:Wi,lineNumber:1338,columnNumber:31},this)," \u79d2"]},void 0,!0,{fileName:Wi,lineNumber:1337,columnNumber:15},this)]},void 0,!0,{fileName:Wi,lineNumber:1335,columnNumber:13},this)]},void 0,!0,{fileName:Wi,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:Wi,lineNumber:1345,columnNumber:11},this),Object(h.jsxDEV)(u.a,{type:"normal",onClick:()=>this.cancel(),children:"\u53d6\u6d88"},void 0,!1,{fileName:Wi,lineNumber:1348,columnNumber:11},this)]},void 0,!0,{fileName:Wi,lineNumber:1344,columnNumber:9},this)]},void 0,!0,{fileName:Wi,lineNumber:942,columnNumber:7},this)}}i(136);var zi="D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\components\\combining\\wangEditor.jsx";class Ri 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:zi,lineNumber:54,columnNumber:9},this),Object(h.jsxDEV)("p",{className:"countBox",children:this.state.count+"/"+this.props.limitLength},void 0,!1,{fileName:zi,lineNumber:55,columnNumber:9},this)]},void 0,!0,{fileName:zi,lineNumber:53,columnNumber:7},this)}}i(236);var Ki="D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\components\\combiningMobile\\index.jsx";const Yi=[80,100,100,100,80,24,100,100,100];var $i=({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:Ki,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:Ki,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:Ki,lineNumber:135,columnNumber:21},void 0),Object(h.jsxDEV)("p",{className:"money",children:[Object(h.jsxDEV)("span",{children:"\uffe5"},void 0,!1,{fileName:Ki,lineNumber:137,columnNumber:23},void 0),e.origin.reduce_amount]},void 0,!0,{fileName:Ki,lineNumber:136,columnNumber:21},void 0),Object(h.jsxDEV)("p",{className:"reduce",children:["\u6ee1",e.origin.denomination,"\u53ef\u7528"]},void 0,!0,{fileName:Ki,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:Ki,lineNumber:141,columnNumber:21},void 0)]},e.channel_activity_id,!0,{fileName:Ki,lineNumber:128,columnNumber:19},void 0)))},void 0,!1,{fileName:Ki,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:Ki,lineNumber:147,columnNumber:15},void 0)]},void 0,!0,{fileName:Ki,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:Ki,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:Ki,lineNumber:165,columnNumber:17},void 0)]},void 0,!0,{fileName:Ki,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:Ki,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:Ki,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:Ki,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:Ki,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:Ki,lineNumber:210,columnNumber:15},void 0):null]},void 0,!0,{fileName:Ki,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:Ki,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:Ki,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:Ki,lineNumber:11,columnNumber:9},this):Object(h.jsxDEV)(pe.a.TextBlock,{className:"TextBlock",animate:!0,widths:Yi,rows:8,dashed:!1},void 0,!1,{fileName:Ki,lineNumber:22,columnNumber:9},this)}()},void 0,!1,{fileName:Ki,lineNumber:219,columnNumber:13},void 0),Object(h.jsxDEV)("img",{className:"b-f-img",src:i().footer_bottom,alt:""},void 0,!1,{fileName:Ki,lineNumber:225,columnNumber:13},void 0)]},void 0,!0,{fileName:Ki,lineNumber:217,columnNumber:11},void 0)]},void 0,!0,{fileName:Ki,lineNumber:108,columnNumber:9},void 0)]},void 0,!0,{fileName:Ki,lineNumber:106,columnNumber:7},void 0)},void 0,!1,{fileName:Ki,lineNumber:105,columnNumber:5},void 0)};i(237);const Ui={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(F(e.all_budget,L(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="D:\\project\\\u8425\u9500\u7cfb\u7edf\\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(),l=i.getMinutes(),s=i.getSeconds();return Object(K.a)(e,i)?{disabledHours:()=>ea(a),disabledMinutes:e=>e===a?ea(l):[],disabledSeconds:(e,t)=>e===a&&t===l?ea(s):[]}:{}},this.onDisabledRange=(e,t)=>{let i=!1,a=$()(e).format("YYYY-MM-DD HH:mm:ss");const l=$()(this.state.plan_time[1]).format("HH:mm:ss");return"start"===t&&(i=l<"23:59:59"?$()(a).isBefore(this.state.plan_time[0])||$()(a).subtract(1,"days").isAfter(this.state.plan_time[1]):$()(a).isBefore(this.state.plan_time[0])||$()(a).isAfter(this.state.plan_time[1])),"end"===t&&(i=$()(a).add(1,"days").isBefore(this.state.plan_time[0])||$()(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:A,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.Rc)({bind_object:"1"}).then((e=>{Object(a.Wb)(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.Qc)({status:"4,5",plan_id:e,bind_object:1}).then((e=>{Object(a.Wb)(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.xb)(e).then((e=>{Object(a.Wb)(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.V)(ta).then((e=>{Object(a.Wb)(e,(e=>{let t=Object(de.a)(e);this.codeStatus=e.status;const i=this.transFormData(t.goods),{channel:a,receive_mode:l,instruction:s,group_image:n,time_limit:o,is_webview:r}=t.group_info;this.handleChange(s,"instruction"),t.goods=i;let m={code_name:t.title,is_webview:Number(r)||0,timer_show:Number(o.timer_show)||1,issued:t.quantity,instructionType:Number(t.group_info.instructionType)||1,stock:t.stock,restrict:t.restrict,instruction:s,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(l),range:[],planSelect:{key:e.plan.id,text:e.plan.title},keyBatchSelect:{key:e.key_batch_id,text:e.key_batch.batch_name}};const c=[];if(i.length>0){let e=[],t=[];m.range=i.map((i=>{null!==i&&void 0!==i&&i.id?(c.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&&(m.code_name=`${t.title}_${t.copy_count+1}`.substring(0,12)),this.getResellerFunction(t.plan.reseller_id);let d=[];Object(f.a)(t.goods,(e=>{let t={};return t.key=e.only,t.text=e.product_name,t.id=e.id,d.push(t),t})),this.setState({codeInfo:m,isload:!0,tempdata:t.goods||[],plan_time:[t.plan.begin_time,t.plan.end_time],rank:c,rankoptions:d})}),(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(F(e.all_budget,L(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(Ii.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:312,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=[],l=[];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},l.push(t)}}));let s=Object(Ti.a)(this.state.oldProduct,a,Li.a);s=s.filter((e=>this.state.new_product.indexOf(e)<0)),this.state.deleteProduct.length>0&&(s=s.concat(this.state.deleteProduct).map(Number)),a=Object(f.a)(l,(e=>e.only)),s=Object(_.a)(s,(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:[]};l.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:s},addProduct:i,updateProduct:l}}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.Ac)(ta,e).then((e=>{Object(a.Wb)(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.cc)(t,e).then((e=>{Object(a.Wb)(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.Wb)(e,((e,t)=>{e.is_require_approval?this.setState({audit_visible:!0}):this.submitCodeData()}),(e=>{c.a.error(e)}))})):Object(a.R)(l).then((t=>{Object(a.Wb)(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.gb)(ta,e).then((e=>{Object(a.Wb)(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"),l=[],s=[];Object(f.a)(a,(e=>{l.push({key:e.only,text:e.product_name}),e.checked&&s.push({key:e.only,text:e.product_name})})),l=te(l,"key"),this.setState({tempdata:a,rankoptions:l,rank:s}),this.getTableList()}}onReCall(){let e=sessionStorage.getItem("approval_id");this.setState({recall_visible:!1}),Object(a.ed)(e).then((e=>{Object(a.Wb)(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 l=new FormData;l.append("file",e),l.append("path","common_image"),Object(a.fd)(l).then((e=>{Object(a.Wb)(e,((e,i)=>{t(e.path)}),(e=>{c.a.error(e),i(e)}))}))}catch(l){i(l)}}))}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=$()(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)(s.a,{model:this.state.codeInfo,rules:Ui,ref:"code_info",className:"addform",children:[Object(h.jsxDEV)(l.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:947,columnNumber:19},this)},void 0,!1,{fileName:Xi,lineNumber:946,columnNumber:17},this),Object(h.jsxDEV)(l.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:965,columnNumber:19},this)},void 0,!1,{fileName:Xi,lineNumber:964,columnNumber:17},this),Object(h.jsxDEV)(l.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:984,columnNumber:19},this)},void 0,!1,{fileName:Xi,lineNumber:983,columnNumber:17},this),Object(h.jsxDEV)(l.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:998,columnNumber:19},this)},void 0,!1,{fileName:Xi,lineNumber:997,columnNumber:17},this),2===this.state.isState&&-1!==this.codeStatus?Object(h.jsxDEV)(h.Fragment,{children:[Object(h.jsxDEV)(l.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:1004,columnNumber:23},this)},void 0,!1,{fileName:Xi,lineNumber:1003,columnNumber:21},this),Object(h.jsxDEV)(l.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:1007,columnNumber:23},this)},void 0,!1,{fileName:Xi,lineNumber:1006,columnNumber:21},this)]},void 0,!0):Object(h.jsxDEV)(l.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:1012,columnNumber:21},this)},void 0,!1,{fileName:Xi,lineNumber:1011,columnNumber:19},this),Object(h.jsxDEV)(l.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(A,"instruction"):"2"===e.value?this.handleChange(B,"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:1055,columnNumber:23},this),Object(h.jsxDEV)(ne.a,{value:"2",children:"\u5fae\u4fe1"},void 0,!1,{fileName:Xi,lineNumber:1056,columnNumber:23},this),Object(h.jsxDEV)(ne.a,{value:"3",children:"\u4e91\u95ea\u4ed8"},void 0,!1,{fileName:Xi,lineNumber:1057,columnNumber:23},this)]},void 0,!0,{fileName:Xi,lineNumber:1054,columnNumber:21},this)},void 0,!1,{fileName:Xi,lineNumber:1029,columnNumber:19},this)},void 0,!1,{fileName:Xi,lineNumber:1028,columnNumber:17},this),2==this.state.codeInfo.channel?Object(h.jsxDEV)(l.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:1070,columnNumber:23},this),Object(h.jsxDEV)(ne.a,{value:1,children:"\u516c\u4f17\u53f7"},void 0,!1,{fileName:Xi,lineNumber:1071,columnNumber:23},this)]},void 0,!0,{fileName:Xi,lineNumber:1063,columnNumber:21},this)},"is_webview",!1,{fileName:Xi,lineNumber:1062,columnNumber:19},this):null,1==this.state.codeInfo.channel?Object(h.jsxDEV)(l.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:1089,columnNumber:25},this),Object(h.jsxDEV)(ne.a,{value:2,children:"\u8d26\u53f7\u9886\u53d6"},void 0,!1,{fileName:Xi,lineNumber:1090,columnNumber:25},this)]},void 0,!0,{fileName:Xi,lineNumber:1088,columnNumber:23},this)},void 0,!1,{fileName:Xi,lineNumber:1077,columnNumber:21},this)},void 0,!1,{fileName:Xi,lineNumber:1076,columnNumber:19},this):null,Object(h.jsxDEV)(l.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:1102,columnNumber:21},this),Object(h.jsxDEV)(ne.a,{value:2,children:"\u56fe\u7247\u63cf\u8ff0"},void 0,!1,{fileName:Xi,lineNumber:1103,columnNumber:21},this)]},void 0,!0,{fileName:Xi,lineNumber:1096,columnNumber:19},this)},void 0,!1,{fileName:Xi,lineNumber:1095,columnNumber:17},this),2===this.state.codeInfo.instructionType?Object(h.jsxDEV)(l.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:1108,columnNumber:21},this)},void 0,!1,{fileName:Xi,lineNumber:1107,columnNumber:19},this):Object(h.jsxDEV)(l.a,{labelname:"\u4f7f\u7528\u8bf4\u660e",prop:"instruction",id:"instruction",required:!1,children:Object(h.jsxDEV)(Ri,{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:1129,columnNumber:21},this)},void 0,!1,{fileName:Xi,lineNumber:1123,columnNumber:19},this)]},void 0,!0,{fileName:Xi,lineNumber:940,columnNumber:15},this)},void 0,!1,{fileName:Xi,lineNumber:939,columnNumber:13},this),Object(h.jsxDEV)($i,{data:this.state.codeInfo,products:this.state.tempdata},void 0,!1,{fileName:Xi,lineNumber:1143,columnNumber:13},this)]},void 0,!0,{fileName:Xi,lineNumber:938,columnNumber:11},this)},void 0,!1,{fileName:Xi,lineNumber:937,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)(s.a,{model:this.state.codeInfo,rules:Gi,ref:"code_rule",className:"addform",children:[Object(h.jsxDEV)(l.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=>{Ut.a.emit("change","date_time",e),this.onChangeCombinedDate(e)},width:245,disabledTime:this.onDisabledTime,disabledDate:this.onDisabledRange},void 0,!1,{fileName:Xi,lineNumber:1156,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:1183,columnNumber:21},this),Object(h.jsxDEV)(ne.a,{value:2,children:"\u9690\u85cf"},void 0,!1,{fileName:Xi,lineNumber:1184,columnNumber:21},this)]},void 0,!0,{fileName:Xi,lineNumber:1176,columnNumber:19},this)]},void 0,!0,{fileName:Xi,lineNumber:1155,columnNumber:17},this),2===this.state.codeInfo.timer_type?Object(h.jsxDEV)(l.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:[$()().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:1189,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:1212,columnNumber:23},this),Object(h.jsxDEV)(ne.a,{value:2,children:"\u6bcf\u65e5"},void 0,!1,{fileName:Xi,lineNumber:1213,columnNumber:23},this)]},void 0,!0,{fileName:Xi,lineNumber:1202,columnNumber:21},this)]},void 0,!0,{fileName:Xi,lineNumber:1188,columnNumber:19},this):Object(h.jsxDEV)(l.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:1224,columnNumber:23},this),Object(h.jsxDEV)(ne.a,{value:2,children:"\u6bcf\u65e5"},void 0,!1,{fileName:Xi,lineNumber:1225,columnNumber:23},this)]},void 0,!0,{fileName:Xi,lineNumber:1218,columnNumber:21},this)},void 0,!1,{fileName:Xi,lineNumber:1217,columnNumber:19},this),Object(h.jsxDEV)(l.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:1231,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:1243,columnNumber:23},this):null]},void 0,!0,{fileName:Xi,lineNumber:1230,columnNumber:19},this)},void 0,!1,{fileName:Xi,lineNumber:1229,columnNumber:17},this),Object(h.jsxDEV)(l.a,{labelname:"",prop:"range",id:"range",children:Object(h.jsxDEV)(T,{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:1301,columnNumber:27},this):void 0},void 0,!1,{fileName:Xi,lineNumber:1257,columnNumber:19},this)},void 0,!1,{fileName:Xi,lineNumber:1256,columnNumber:17},this)]},void 0,!0,{fileName:Xi,lineNumber:1149,columnNumber:15},this)},void 0,!1,{fileName:Xi,lineNumber:1148,columnNumber:13},this)},void 0,!1,{fileName:Xi,lineNumber:1147,columnNumber:11},this)},void 0,!1,{fileName:Xi,lineNumber:1146,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:1324,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:1332,columnNumber:15},this)]},void 0,!0,{fileName:Xi,lineNumber:1323,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)(Me,{ref:"knockGold",data:this.state.productData,combining:this.state.codeInfo},void 0,!1,{fileName:Xi,lineNumber:1350,columnNumber:15},this)},void 0,!1,{fileName:Xi,lineNumber:1349,columnNumber:13},this)},void 0,!1,{fileName:Xi,lineNumber:1348,columnNumber:11},this)},void 0,!1,{fileName:Xi,lineNumber:1318,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:1361,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:1363,columnNumber:15},this),Object(h.jsxDEV)("div",{className:"audit-box-title",children:"\u63d0\u4ea4\u5ba1\u6838"},void 0,!1,{fileName:Xi,lineNumber:1370,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:1377,columnNumber:19},this),Object(h.jsxDEV)(Z.a,{value:1,children:"\u5bf9\u79c1\u8d26\u6237"},void 0,!1,{fileName:Xi,lineNumber:1378,columnNumber:19},this),Object(h.jsxDEV)(Z.a,{value:2,children:"\u5bf9\u516c\u8d26\u6237"},void 0,!1,{fileName:Xi,lineNumber:1379,columnNumber:19},this)]},void 0,!0,{fileName:Xi,lineNumber:1372,columnNumber:17},this)},void 0,!1,{fileName:Xi,lineNumber:1371,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:1383,columnNumber:17},this),Object(h.jsxDEV)(u.a,{type:"primary",onClick:e=>{this.onConfirm(e)},children:"\u786e\u5b9a"},void 0,!1,{fileName:Xi,lineNumber:1390,columnNumber:17},this)]},void 0,!0,{fileName:Xi,lineNumber:1382,columnNumber:15},this)]},void 0,!0,{fileName:Xi,lineNumber:1362,columnNumber:13},this)]},void 0,!0,{fileName:Xi,lineNumber:1360,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:1404,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:1406,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:1413,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:1414,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:1416,columnNumber:17},this),Object(h.jsxDEV)(u.a,{type:"primary",onClick:e=>{this.onReCall(e)},children:"\u786e\u5b9a"},void 0,!1,{fileName:Xi,lineNumber:1423,columnNumber:17},this)]},void 0,!0,{fileName:Xi,lineNumber:1415,columnNumber:15},this)]},void 0,!0,{fileName:Xi,lineNumber:1405,columnNumber:13},this)]},void 0,!0,{fileName:Xi,lineNumber:1403,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:1437,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:1439,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:1441,columnNumber:31},this)," \u79d2"]},void 0,!0,{fileName:Xi,lineNumber:1440,columnNumber:15},this)]},void 0,!0,{fileName:Xi,lineNumber:1438,columnNumber:13},this)]},void 0,!0,{fileName:Xi,lineNumber:1436,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:1448,columnNumber:11},this),Object(h.jsxDEV)(u.a,{type:"normal",onClick:()=>this.cancel(),children:"\u53d6\u6d88"},void 0,!1,{fileName:Xi,lineNumber:1451,columnNumber:11},this)]},void 0,!0,{fileName:Xi,lineNumber:1447,columnNumber:9},this)]},void 0,!0,{fileName:Xi,lineNumber:936,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"}],la=[{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 sa="D:\\project\\\u8425\u9500\u7cfb\u7edf\\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:[...la],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.tb)().then((e=>Object(a.Wb)(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:sa,lineNumber:161,columnNumber:9},this):Object(h.jsxDEV)("span",{style:{paddingRight:"10px",color:"#d8dbdd"},children:"\u590d\u5236"},void 0,!1,{fileName:sa,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:sa,lineNumber:187,columnNumber:16},this),onConfirm(){Object(a.B)(e.id).then((e=>{Object(a.Wb)(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.Wb)(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{zt(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:sa,lineNumber:281,columnNumber:22},this),onConfirm(){i.delCodeFun(t.id)},onCancel(){},className:"questModal",parentComponent:this})}))}catch(l){}}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:sa,lineNumber:301,columnNumber:16},this),onConfirm:()=>{Object(a.zc)(t.id,{operation:1==t.old_status?"2":"1"}).then((e=>{Object(a.Wb)(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 l=this,{page:s,limit:n,search:o}=Object(de.a)(l.state);o.plan_title=(null===(i=o.plan_title)||void 0===i?void 0:i.text)||"";let r={page:s,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.W)(r).then((e=>{let t=JSON.parse(e);if(200==t.code){const e=t.data.data,{total:i}=t.data;l.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:sa,lineNumber:384,columnNumber:16},this),onConfirm:()=>{Object(a.ed)(i).then((e=>{Object(a.Wb)(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.Wb)(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:sa,lineNumber:425,columnNumber:7},this);return Object(h.jsxDEV)("div",{id:"exchangecodelist",children:Object(h.jsxDEV)(Lt,{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:sa,lineNumber:447,columnNumber:13},this),Object(h.jsxDEV)("div",{className:"codesFind",children:Object(h.jsxDEV)(s.a,{children:[Object(h.jsxDEV)(l.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:sa,lineNumber:453,columnNumber:19},this)},void 0,!1,{fileName:sa,lineNumber:452,columnNumber:17},this),Object(h.jsxDEV)(l.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:sa,lineNumber:466,columnNumber:19},this)},void 0,!1,{fileName:sa,lineNumber:465,columnNumber:17},this),Object(h.jsxDEV)(l.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:sa,lineNumber:481,columnNumber:19},this)},void 0,!1,{fileName:sa,lineNumber:480,columnNumber:17},this),Object(h.jsxDEV)(l.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:sa,lineNumber:496,columnNumber:19},this)},void 0,!1,{fileName:sa,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:sa,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:sa,lineNumber:514,columnNumber:19},this)]},void 0,!0,{fileName:sa,lineNumber:510,columnNumber:17},this)]},void 0,!0,{fileName:sa,lineNumber:451,columnNumber:15},this)},void 0,!1,{fileName:sa,lineNumber:450,columnNumber:13},this)]},void 0,!0,{fileName:sa,lineNumber:446,columnNumber:11},this),Object(h.jsxDEV)("div",{className:"code-table",children:Object(h.jsxDEV)(T,{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:sa,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:sa,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:sa,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:Bt.exchangeStatusBg(parseInt(t.status))}},void 0,!1,{fileName:sa,lineNumber:572,columnNumber:25},this),t.status_text]},void 0,!0,{fileName:sa,lineNumber:571,columnNumber:23},this)},void 0,!1,{fileName:sa,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:sa,lineNumber:590,columnNumber:25},this):Object(h.jsxDEV)("span",{style:{color:"#d8dbdd"},className:"grid-link",children:"\u7f16\u8f91"},void 0,!1,{fileName:sa,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:sa,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:sa,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:sa,lineNumber:618,columnNumber:25},this):Object(h.jsxDEV)("span",{style:{color:"#d8dbdd",marginRight:"12px"},children:"\u64a4\u9500\u5ba1\u6279"},void 0,!1,{fileName:sa,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:sa,lineNumber:625,columnNumber:25},this):Object(h.jsxDEV)("span",{className:"grid-link disabled",children:"\u9489\u9489\u5ba1\u6279\u67e5\u8be2"},void 0,!1,{fileName:sa,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:sa,lineNumber:638,columnNumber:25},this):Object(h.jsxDEV)("span",{style:{color:"#d8dbdd"},className:"grid-link",children:"\u5220\u9664"},void 0,!1,{fileName:sa,lineNumber:646,columnNumber:25},this)]},void 0,!0,{fileName:sa,lineNumber:585,columnNumber:21},this):void 0},void 0,!1,{fileName:sa,lineNumber:526,columnNumber:13},this)},void 0,!1,{fileName:sa,lineNumber:525,columnNumber:11},this)]},void 0,!0,{fileName:sa,lineNumber:440,columnNumber:9},this)},void 0,!1,{fileName:sa,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="D:\\project\\\u8425\u9500\u7cfb\u7edf\\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.tb)().then((e=>Object(a.Wb)(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.Wb)(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.Wb)(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{zt(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(l){}}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.zc)(t.id,{operation:1==t.old_status?"2":"1"}).then((e=>{Object(a.Wb)(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 l=this,{page:s,limit:n,search:o}=Object(de.a)(l.state);o.plan_title=(null===(i=o.plan_title)||void 0===i?void 0:i.text)||"";let r={page:s,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.W)(r).then((e=>{let t=JSON.parse(e);if(200==t.code){const e=t.data.data,{total:i}=t.data;l.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.ed)(i).then((e=>{Object(a.Wb)(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.Wb)(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)(Lt,{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)(s.a,{children:[Object(h.jsxDEV)(l.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)(l.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)(l.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)(l.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)(T,{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:Bt.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),"D:\\project\\\u8425\u9500\u7cfb\u7edf\\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(Ft.a)(e,(e=>Object(Ht.a)(e)||Object(Mt.a)(e)));Object(a.Jb)(t).then((e=>{Object(a.Wb)(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.Wb)(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)(Lt,{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)(T,{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:Bt.pageStatusBg(parseInt(t.client))}},void 0,!1,{fileName:ua,lineNumber:358,columnNumber:23},this),Bt.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:Bt.pageTypeStatusBg(parseInt(t.page))}},void 0,!1,{fileName:ua,lineNumber:371,columnNumber:23},this),Bt.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="D:\\project\\\u8425\u9500\u7cfb\u7edf\\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.Hb)(e).then((e=>{Object(a.Wb)(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.Wb)(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)(Lt,{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)(T,{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:Bt.pageTypeStatusBg(parseInt(t.page))},children:" "},void 0,!1,{fileName:ja,lineNumber:314,columnNumber:23},this),Bt.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="D:\\project\\\u8425\u9500\u7cfb\u7edf\\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.Kb)().then((t=>{Object(a.Wb)(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.Gb)({page:1,limit:10}).then((e=>{Object(a.Wb)(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.Gb)(i).then((i=>{Object(a.Wb)(i,(i=>{if(0{}))})).catch((()=>{}))):Object(a.Hb)(i).then((i=>{Object(a.Wb)(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.Gb)(t).then((e=>{Object(a.Wb)(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.Gb)(t).then((e=>{Object(a.Wb)(e,(e=>{this.setState({system_template:e.data})}),(()=>{}))})).catch((()=>{})):Object(a.Hb)(t).then((e=>{Object(a.Wb)(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.Wb)(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(495),Da="D:\\project\\\u8425\u9500\u7cfb\u7edf\\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.Wb)(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.J)(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]),l=t.file_name+".zip";var i=document.createElement("a");i.href=window.URL.createObjectURL(a),i.download=l,i.click(),window.URL.revokeObjectURL(i.href)}})).catch((e=>{}))}getDownloadList(){let{page:e,limit:t,file_name:i}=this.state,l={page:e,limit:t,file_name:i};Object(a.Pb)(l).then((e=>{Object(a.Wb)(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)(Lt,{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)(T,{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(508);i(245);const Ia=[{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"}],Ta=[{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"}],La=[{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"}]}],Fa={account:[{type:"required",message:"\u8bf7\u8f93\u5165\u8d26\u53f7"}]};var Ha="D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\pages\\order\\list\\list.js",Ma=i(67);let qa=Ma(wa()).format("YYYY-MM-DD"),Pa=Ma(Sa()).format("YYYY-MM-DD");class Wa extends m.a.Component{constructor(e){super(e),this.state={orderType:"",tabList:[{title:"\u8ba2\u5355\u5217\u8868"}],orderList:[],filterList:La,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,l=0;e.forEach((e=>{t+=Number(e.official_price),i+=Number(e.contract_price),a+=Number(e.cost_price),l+=Number(e.total)})),this.setState({officialprice:t,contractprice:i,costprice:a,totalprice:l})}getPlan(){Object(a.tb)().then((e=>Object(a.Wb)(e,((e,t)=>{const i=e.map((e=>({key:e.id,text:e.title})));this.setState({planOptions:i})}),(e=>{})))),Object(a.wb)().then((e=>{Object(a.Wb)(e,((e,t)=>{const i=e.map((e=>({key:e.id,text:e.name})));this.setState({resellerOptions:i})}))}))}getProducts(e){Object(a.Vb)(e).then((e=>Object(a.Wb)(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.Xb)(this.state.orderNumber,{refund_account:this.state.model.account}).then((e=>{Object(a.Wb)(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.Tc)(e).then((e=>{Object(a.Wb)(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:l,pay_status:s,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!==s&&void 0!==s&&s.length&&(u.pay_status=null===s||void 0===s?void 0:s.join(",")),null!==n&&void 0!==n&&n.length&&(u.voucher_status=null===n||void 0===n?void 0:n.join(",")),i&&(u[i.key]=l),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.ob)(u).then((e=>{Object(a.Wb)(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.Fc)(t.order_number).then((e=>{Object(a.Wb)(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.Gc)(t.order_number).then((e=>{Object(a.Wb)(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:l,status:s,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:l,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!==s&&void 0!==s&&s.length&&(N.status=null===s||void 0===s?void 0:s.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.pb)(N).then((e=>{Object(a.Wb)(e,((e,i)=>{const a=e.data,{total:l}=e;t.setState({orderList:a,total:l})}),(e=>{c.a.error(e)}))})).catch((e=>{}))}componentWillMount(){let e=[Pa+" 00:00:00",qa+" 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.Uc)({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.Sc)({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.gd)({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.ec)({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)(Lt,{tabs:this.state.tabList,slot:e,children:[Object(h.jsxDEV)("div",{className:"order-query",children:[Object(h.jsxDEV)(s.a,{children:[Object(h.jsxDEV)(l.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)(l.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)(l.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)(l.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:Ta,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)(l.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)(l.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)(T,{spliteColor:"#fff",tableData:this.state.orderList,Column:Ia,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:Bt.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:Bt.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:Bt.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===(l=t.orderVoucher)||void 0===l?void 0:l.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,l}},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)(s.a,{model:this.state.model,rules:Fa,ref:"form",children:[Object(h.jsxDEV)(l.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)(l.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 Ba=i(156),Aa=i.n(Ba),Ja=(i(246),"D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\pages\\order\\more\\more.js");const za=[{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 Ra 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:l}=this.state,s={page:t,limit:i};Object(a.qb)(l,s).then((t=>{Object(a.Wb)(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.nb)(e).then((e=>{Object(a.Wb)(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.getDetails(i),this.setState({tableHeight:window.innerHeight-430,orderNo:i})}render(){var e,t,i,a;let l=this.state.orderDetail_data;return Object(h.jsxDEV)("div",{id:"more",className:"maincenter",children:Object(h.jsxDEV)(Lt,{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:165,columnNumber:17},this),Object(h.jsxDEV)("font",{children:l.order_number},void 0,!1,{fileName:Ja,lineNumber:166,columnNumber:17},this)]},void 0,!0,{fileName:Ja,lineNumber:164,columnNumber:15},this),Object(h.jsxDEV)("li",{children:[Object(h.jsxDEV)("span",{children:"\u521b\u5efa\u65f6\u95f4"},void 0,!1,{fileName:Ja,lineNumber:169,columnNumber:17},this),Object(h.jsxDEV)("font",{children:l.create_time},void 0,!1,{fileName:Ja,lineNumber:170,columnNumber:17},this)]},void 0,!0,{fileName:Ja,lineNumber:168,columnNumber:15},this),Object(h.jsxDEV)("li",{children:[Object(h.jsxDEV)("span",{children:"\u5546\u54c1\u540d\u79f0"},void 0,!1,{fileName:Ja,lineNumber:173,columnNumber:17},this),Object(h.jsxDEV)("font",{children:null===(e=l.orderDetail)||void 0===e?void 0:e.product_name},void 0,!1,{fileName:Ja,lineNumber:174,columnNumber:17},this)]},void 0,!0,{fileName:Ja,lineNumber:172,columnNumber:15},this),Object(h.jsxDEV)("li",{children:[Object(h.jsxDEV)("span",{children:"\u6620\u5c04\u5546\u54c1"},void 0,!1,{fileName:Ja,lineNumber:177,columnNumber:17},this),Object(h.jsxDEV)("font",{children:l.map_product_name||"-"},void 0,!1,{fileName:Ja,lineNumber:178,columnNumber:17},this)]},void 0,!0,{fileName:Ja,lineNumber:176,columnNumber:15},this),Object(h.jsxDEV)("li",{children:[Object(h.jsxDEV)("span",{children:"\u5b98\u65b9\u4ef7"},void 0,!1,{fileName:Ja,lineNumber:181,columnNumber:17},this),Object(h.jsxDEV)("font",{children:null===(t=l.orderDetail)||void 0===t?void 0:t.official_price},void 0,!1,{fileName:Ja,lineNumber:182,columnNumber:17},this)]},void 0,!0,{fileName:Ja,lineNumber:180,columnNumber:15},this),Object(h.jsxDEV)("li",{children:[Object(h.jsxDEV)("span",{children:"\u6210\u672c\u4ef7"},void 0,!1,{fileName:Ja,lineNumber:185,columnNumber:17},this),Object(h.jsxDEV)("font",{children:null===(i=l.orderDetail)||void 0===i?void 0:i.cost_price},void 0,!1,{fileName:Ja,lineNumber:186,columnNumber:17},this)]},void 0,!0,{fileName:Ja,lineNumber:184,columnNumber:15},this),Object(h.jsxDEV)("li",{children:[Object(h.jsxDEV)("span",{children:"\u5408\u540c\u4ef7"},void 0,!1,{fileName:Ja,lineNumber:189,columnNumber:17},this),Object(h.jsxDEV)("font",{children:l.contract_price},void 0,!1,{fileName:Ja,lineNumber:190,columnNumber:17},this)]},void 0,!0,{fileName:Ja,lineNumber:188,columnNumber:15},this),Object(h.jsxDEV)("li",{children:[Object(h.jsxDEV)("span",{children:"\u8d2d\u4e70\u6570\u91cf"},void 0,!1,{fileName:Ja,lineNumber:193,columnNumber:17},this),Object(h.jsxDEV)("font",{children:l.num},void 0,!1,{fileName:Ja,lineNumber:194,columnNumber:17},this)]},void 0,!0,{fileName:Ja,lineNumber:192,columnNumber:15},this),Object(h.jsxDEV)("li",{children:[Object(h.jsxDEV)("span",{children:"\u603b\u8ba1"},void 0,!1,{fileName:Ja,lineNumber:197,columnNumber:17},this),Object(h.jsxDEV)("font",{children:(l.num*l.contract_price).toFixed(4)},void 0,!1,{fileName:Ja,lineNumber:198,columnNumber:17},this)]},void 0,!0,{fileName:Ja,lineNumber:196,columnNumber:15},this),1===(null===(a=l.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:202,columnNumber:19},this),Object(h.jsxDEV)("font",{children:l.account},void 0,!1,{fileName:Ja,lineNumber:203,columnNumber:19},this)]},void 0,!0,{fileName:Ja,lineNumber:201,columnNumber:17},this):null,Object(h.jsxDEV)("li",{children:[Object(h.jsxDEV)("span",{children:"\u72b6\u6001"},void 0,!1,{fileName:Ja,lineNumber:208,columnNumber:17},this),Object(h.jsxDEV)("font",{children:l.status_text},void 0,!1,{fileName:Ja,lineNumber:209,columnNumber:17},this)]},void 0,!0,{fileName:Ja,lineNumber:207,columnNumber:15},this)]},void 0,!0,{fileName:Ja,lineNumber:163,columnNumber:13},this):Object(h.jsxDEV)("div",{className:"main-body",children:Object(h.jsxDEV)(T,{spliteColor:"#fff",tableData:this.state.orderDetailLog_data,Column:za,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:$.a.unix(t.time).format("YYYY-MM-DD HH:mm:ss")},void 0,!1,{fileName:Ja,lineNumber:232,columnNumber:28},this):"index"==e?Object(h.jsxDEV)("span",{children:i+1},void 0,!1,{fileName:Ja,lineNumber:235,columnNumber:28},this):"opearo"==e?Object(h.jsxDEV)("div",{children:t.data?Object(h.jsxDEV)(Aa.a,{collapsed:!0,name:!1,src:t.data,displayDataTypes:!1},void 0,!1,{fileName:Ja,lineNumber:241,columnNumber:27},this):Object(h.jsxDEV)("span",{children:"-"},void 0,!1,{fileName:Ja,lineNumber:248,columnNumber:27},this)},void 0,!1,{fileName:Ja,lineNumber:239,columnNumber:23},this):void 0},void 0,!1,{fileName:Ja,lineNumber:214,columnNumber:15},this)},void 0,!1,{fileName:Ja,lineNumber:213,columnNumber:13},this)},void 0,!1,{fileName:Ja,lineNumber:161,columnNumber:9},this)},void 0,!1,{fileName:Ja,lineNumber:160,columnNumber:7},this)}}i(247);const Ka=[{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 Ya=i(447),$a="D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\pages\\order\\settlementList\\list.jsx",Ua=i(67);let Ga=Ua(wa()).format("YYYY-MM-DD"),Qa=Ua(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.tb)().then((e=>Object(a.Wb)(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.wb)().then((e=>{Object(a.Wb)(e,((e,t)=>{const i=e.map((e=>({key:e.id,text:e.name})));this.setState({resellerOptions:i})}))})),Object(a.Eb)().then((e=>Object(a.Wb)(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.Qc)({status:"4,5",plan_id:e,bind_object:1}).then((e=>{Object(a.Wb)(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:l}=this.state,{key:s,key_batch_id:n,plan_id:o,reseller_id:r,type:m,settlement_no:d}=a;if(!o||!l)return void c.a.error("\u8ba2\u5355\u5bfc\u51fa\u5fc5\u987b\u6709\u8ba1\u5212id\u548c\u65f6\u95f4");e={page:t,limit:i,begin_time:l[0],end_time:l[1],key:s||"",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.Cb)(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:l}=this.state,{key:s,key_batch_id:n,plan_id:o,reseller_id:r,type:m,settlement_no:d}=i,u={page:e,limit:t,begin_time:l[0],end_time:l[1],key:s||"",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.Db)(Object(Ya.a)(u)).then((e=>{Object(a.Wb)(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:$a,lineNumber:293,columnNumber:7},this);return Object(h.jsxDEV)("div",{id:"dislist",className:"settlementList",children:Object(h.jsxDEV)(Lt,{tabs:this.state.tabList,slot:e,children:[Object(h.jsxDEV)("div",{className:"order-query",children:[Object(h.jsxDEV)(s.a,{children:[Object(h.jsxDEV)(l.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:$a,lineNumber:311,columnNumber:17},this)},void 0,!1,{fileName:$a,lineNumber:310,columnNumber:15},this),Object(h.jsxDEV)(l.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:$a,lineNumber:331,columnNumber:17},this)},void 0,!1,{fileName:$a,lineNumber:330,columnNumber:15},this),Object(h.jsxDEV)(l.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:$a,lineNumber:344,columnNumber:17},this)},void 0,!1,{fileName:$a,lineNumber:343,columnNumber:15},this),Object(h.jsxDEV)(l.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:$a,lineNumber:357,columnNumber:17},this)},void 0,!1,{fileName:$a,lineNumber:356,columnNumber:15},this),Object(h.jsxDEV)(l.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:$a,lineNumber:370,columnNumber:17},this)},void 0,!1,{fileName:$a,lineNumber:369,columnNumber:15},this),Object(h.jsxDEV)(l.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:$a,lineNumber:390,columnNumber:17},this)},void 0,!1,{fileName:$a,lineNumber:384,columnNumber:15},this),Object(h.jsxDEV)(l.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:$a,lineNumber:407,columnNumber:19},this),Object(h.jsxDEV)(u.a,{onClick:()=>this.reset(),children:"\u91cd\u7f6e"},void 0,!1,{fileName:$a,lineNumber:417,columnNumber:19},this)]},void 0,!0,{fileName:$a,lineNumber:406,columnNumber:17},this)},void 0,!1,{fileName:$a,lineNumber:405,columnNumber:15},this)]},void 0,!0,{fileName:$a,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:$a,lineNumber:421,columnNumber:13},this)]},void 0,!0,{fileName:$a,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:$a,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:$a,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:$a,lineNumber:432,columnNumber:15},this):null,Object(h.jsxDEV)(T,{spliteColor:"#fff",tableData:this.state.orderList,Column:Ka,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:$a,lineNumber:471,columnNumber:21},this)}},void 0,!1,{fileName:$a,lineNumber:448,columnNumber:13},this)]},void 0,!0,{fileName:$a,lineNumber:430,columnNumber:11},this)]},void 0,!0,{fileName:$a,lineNumber:307,columnNumber:9},this)},void 0,!1,{fileName:$a,lineNumber:306,columnNumber:7},this)}}i(248);var Xa="D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\pages\\order\\packageDetail\\index.js";const el=[{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 tl 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.rb)(e).then((e=>{Object(a.Wb)(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)(Lt,{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)(T,{spliteColor:"#fff",tableData:this.state.orderDetailLog_data,Column:el,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:$.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 il="D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\pages\\plan\\add\\step1.js";class al extends m.a.Component{constructor(e){super(e),this.onDisabledRange=(e,t)=>{let i=!1;return"end"==t&&(i=$()(e.getTime()).add(1,"days")<=(new Date).getTime()),"start"==t&&(i=e.getTime()<=(new Date).getTime()),i},this.phoneChange=e=>{this.setState({phone:e.target.value})},this.emailChange=e=>{this.setState({email:e.target.value})},this.state={model:{title:"",type:2,reseller:null,return_id:"1",date_time:["",""],stock_id:null,settlement_type:null},settlementOptions:[],lodshow:!1,loading:!1,isSettlement:2,directList:[],limit:15,page:1,keyword:"",showEmailPop:!1,email:"",phone:"",reseller_id:0,direct_reseller_name:""}}componentDidMount(e){let t={limit:this.state.limit,page:this.state.page};this.getDirect(t),Object(a.Eb)().then((e=>{Object(a.Wb)(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)}))}))}componentDidUpdate(e){this.props.direct_reseller_name!==e.direct_reseller_name&&this.setState({model:{...this.state.model,reseller:{text:this.props.direct_reseller_name!==this.state.model.reseller.text?this.props.direct_reseller_name+`\uff08${this.state.model.reseller.text}\uff09`:this.state.model.reseller.text}}})}setZentOpt(e){return e.map((e=>({key:e.id,text:e.reseller_name&&e.reseller_name!==e.name?e.name+`\uff08${e.reseller_name}\uff09`:e.name,direct_reseller_id:e.id,reseller_id:e.reseller_id,disabled:1!==e.status})))}getDirect(e){Object(a.cb)(e).then((e=>{Object(a.Wb)(e,((e,t)=>{let i=this.state.directList;i=i.concat(this.setZentOpt(e.data)),this.setState({directList:i})}),(e=>{c.a.error(e)}))}))}onResellerChange(e){Object(a.zb)(e.key).then((t=>{Object(a.Wb)(t,((i,a)=>{const{id:l,name:s,contact_email:n,contact_phone:o}=t.data;e.key=l,e._text=s,this.props.onGetDirectResellerId(e);let r=this.state.model;r.reseller=e,this.setState({model:r,phone:o,email:n}),o&&n||this.setState({showEmailPop:!0,reseller_id:l})}),(e=>{c.a.error(e)}))}))}onChangePageSelect(e){let t=this.state.page;this.setState({page:t+1});let i={limit:this.state.limit,page:t+1,key_word:this.state.keyword};i.key_word||delete i.key_word,this.getDirect(i),e&&e()}onKeywordChange(e){this.setState({keyword:e,page:1});let t={limit:this.state.limit,page:1,key_word:e};t.key_word||delete t.key_word,Object(a.cb)(t).then((e=>{Object(a.Wb)(e,((e,t)=>{let i=[];i=i.concat(this.setZentOpt(e.data)),this.setState({directList: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,reseller_id:e.reseller_id})}async submit(e){let t=!1;if(this.refs.form1.validator()){var i,l;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 s={};s.title=this.state.model.title,s.stock_id=this.state.model.stock_id,s.type=parseInt(this.state.model.type),s.return_type=1,s.reseller_id=null!==(i=this.state.model.reseller.key)&&void 0!==i?i:this.state.reseller_id;let n=null!==(l=this.state.model.reseller._text)&&void 0!==l?l:this.state.model.reseller.text,o=n.match(/\uff08([^\uff09]+)\uff09/);if(s.reseller_name=o?o[1]:n,s.begin_time=this.state.model.date_time[0],s.end_time=this.state.model.date_time[1],1===this.state.isSettlement&&this.state.model.settlement_type&&(s.settlement_type=this.state.model.settlement_type.key),this.state.loading)return;if(this.setState({loading:!0}),e){let i={title:s.title,begin_time:s.begin_time,end_time:s.end_time,settlement_type:s.settlement_type};1===this.state.isSettlement&&this.state.model.settlement_type&&(i.settlement_type=s.settlement_type),await Object(a.Hc)(e,i).then((e=>{this.setState({loading:!1}),Object(a.Wb)(e,((e,i)=>{c.a.success("\u4fdd\u5b58\u6210\u529f"),t=!0}),(e=>{c.a.error(e)}))}))}else{let e={};e.info=s;let i=sessionStorage.getItem("plan_id");if(e.info.copy_plan_id=sessionStorage.getItem("plan_id_copy"),""!=i)return this.setState({loading:!1}),delete s.copy_plan_id,sessionStorage.setItem("step1",JSON.stringify(s)),sessionStorage.setItem("knockGold_effectDate",JSON.stringify(s)),sessionStorage.setItem("redPackets_effectDate",JSON.stringify(s)),sessionStorage.setItem("plan_item",JSON.stringify(s)),!0;await Object(a.d)("",e).then((e=>{this.setState({loading:!1}),Object(a.Wb)(e,((e,i)=>{sessionStorage.setItem("plan_id",e.id),delete s.copy_plan_id,sessionStorage.setItem("step1",JSON.stringify(s)),sessionStorage.setItem("knockGold_effectDate",JSON.stringify(s)),sessionStorage.setItem("redPackets_effectDate",JSON.stringify(s)),sessionStorage.setItem("plan_item",JSON.stringify(s)),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})}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))}addEmail(e){const t=new RegExp("^[1][3,4,5,6,7,8,9][0-9]{9}$"),i=new RegExp("^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$");let l={contact_phone:this.state.phone,contact_email:this.state.email};l.contact_phone&&t.test(l.contact_phone)?l.contact_email&&i.test(l.contact_email)?Object(a.I)(l,this.state.reseller_id).then((e=>{Object(a.Wb)(e,((e,t)=>{this.setState({showEmailPop:!1}),c.a.success("\u6dfb\u52a0\u6210\u529f")}),(e=>{c.a.error(e)}))})):c.a.error("\u90ae\u7bb1\u683c\u5f0f\u4e0d\u6b63\u786e"):c.a.error("\u624b\u673a\u53f7\u683c\u5f0f\u4e0d\u6b63\u786e")}cancel(e){this.setState({showEmailPop:!1,model:{...this.state.model,reseller:{key:"",_text:""}}})}render(){return Object(h.jsxDEV)("div",{id:"step1",children:[Object(h.jsxDEV)(s.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)(l.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:il,lineNumber:503,columnNumber:13},this)},void 0,!1,{fileName:il,lineNumber:502,columnNumber:11},this),Object(h.jsxDEV)(l.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:il,lineNumber:526,columnNumber:13},this)},void 0,!1,{fileName:il,lineNumber:525,columnNumber:11},this),Object(h.jsxDEV)(l.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:il,lineNumber:556,columnNumber:15},this),Object(h.jsxDEV)(ne.a,{value:2,children:"\u4ec5\u5151\u6362"},void 0,!1,{fileName:il,lineNumber:559,columnNumber:15},this)]},void 0,!0,{fileName:il,lineNumber:550,columnNumber:13},this)},void 0,!1,{fileName:il,lineNumber:549,columnNumber:11},this),Object(h.jsxDEV)(l.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:il,lineNumber:571,columnNumber:15},this),Object(h.jsxDEV)(ne.a,{value:2,children:"\u5426"},void 0,!1,{fileName:il,lineNumber:572,columnNumber:15},this)]},void 0,!0,{fileName:il,lineNumber:563,columnNumber:13},this)},void 0,!1,{fileName:il,lineNumber:562,columnNumber:11},this),1===this.state.isSettlement?Object(h.jsxDEV)(l.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:il,lineNumber:577,columnNumber:15},this)},void 0,!1,{fileName:il,lineNumber:576,columnNumber:13},this):null,Object(h.jsxDEV)(l.a,{labelname:"\u5206\u9500\u5546",prop:"reseller",id:"reseller",children:Object(h.jsxDEV)(Xt,{options:this.state.directList,clearable:!0,page:this.state.page,placeholder:"\u9009\u62e9\u4e00\u9879",disabled:this.props.disabled,value:this.state.model.reseller,onChangePage:this.onChangePageSelect.bind(this),keyword:this.state.keyword,onKeywordChange:this.onKeywordChange.bind(this),onChange:e=>{this.onResellerChange(e),Ut.a.emit("change","reseller",e)},width:515},void 0,!1,{fileName:il,lineNumber:605,columnNumber:13},this)},void 0,!1,{fileName:il,lineNumber:592,columnNumber:11},this),Object(h.jsxDEV)(l.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:[$()().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=>{Ut.a.emit("change","date_time",e),this.onChangeCombinedDate(e)},disabledDate:this.onDisabledRange},void 0,!1,{fileName:il,lineNumber:624,columnNumber:13},this)},void 0,!1,{fileName:il,lineNumber:623,columnNumber:11},this)]},void 0,!0,{fileName:il,lineNumber:501,columnNumber:9},this),this.state.showEmailPop?Object(h.jsxDEV)("div",{children:[Object(h.jsxDEV)("div",{className:"modal",children:" "},void 0,!1,{fileName:il,lineNumber:644,columnNumber:13},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:il,lineNumber:646,columnNumber:15},this),Object(h.jsxDEV)("div",{className:"audit-box-title",children:"\u5b8c\u5584\u5206\u9500\u5546\u4fe1\u606f"},void 0,!1,{fileName:il,lineNumber:653,columnNumber:15},this),Object(h.jsxDEV)("div",{className:"input-group input-flex",children:[Object(h.jsxDEV)("div",{className:"input-label",children:[Object(h.jsxDEV)("text",{children:"* "},void 0,!1,{fileName:il,lineNumber:656,columnNumber:46},this),"\u63a5\u6536\u624b\u673a\u53f7\uff1a"]},void 0,!0,{fileName:il,lineNumber:656,columnNumber:17},this),Object(h.jsxDEV)(Di.a,{placeholder:"\u8bf7\u8f93\u5165\u63a5\u6536\u624b\u673a\u53f7",onChange:this.phoneChange,value:this.state.phone},void 0,!1,{fileName:il,lineNumber:657,columnNumber:17},this)]},void 0,!0,{fileName:il,lineNumber:655,columnNumber:15},this),Object(h.jsxDEV)("div",{className:"input-group input-flex",children:[Object(h.jsxDEV)("div",{className:"input-label",children:[Object(h.jsxDEV)("text",{children:"* "},void 0,!1,{fileName:il,lineNumber:665,columnNumber:46},this),"\u63a5\u6536\u90ae\u7bb1\uff1a"]},void 0,!0,{fileName:il,lineNumber:665,columnNumber:17},this),Object(h.jsxDEV)(Di.a,{placeholder:"\u8bf7\u8f93\u5165\u63a5\u6536\u90ae\u7bb1",onChange:this.emailChange,value:this.state.email},void 0,!1,{fileName:il,lineNumber:666,columnNumber:17},this)]},void 0,!0,{fileName:il,lineNumber:664,columnNumber:15},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:il,lineNumber:674,columnNumber:17},this),Object(h.jsxDEV)(u.a,{type:"primary",onClick:e=>{this.addEmail(e)},children:"\u786e\u5b9a"},void 0,!1,{fileName:il,lineNumber:681,columnNumber:17},this)]},void 0,!0,{fileName:il,lineNumber:673,columnNumber:15},this)]},void 0,!0,{fileName:il,lineNumber:645,columnNumber:13},this)]},void 0,!0,{fileName:il,lineNumber:643,columnNumber:11},this):null]},void 0,!0,{fileName:il,lineNumber:500,columnNumber:7},this)}}i(249);var ll="D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\components\\UseExchangeAddEdit\\index.jsx";const sl=e=>Array.from({length:e},((e,t)=>t)),nl=[{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"}],ol={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}$"}]},rl={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 ml=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(R.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(R.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=>M(e))),l=null===(e=a.product.cash)||void 0===e?void 0:e.map((e=>{let t=q(e);return t.only.copy=!0,t})),s=t.concat(i,l);s=Object(f.a)(s,(e=>(e.checked=!0,e)));let n=Object(f.a)(s,(e=>{let t={};return t.key=e.product_id,t.text=e.product_name,t}));j({rankOptions:n,rank:n,tableData:s})},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)(s.a,{model:v,rules:ol,ref:o,className:"addform",children:[Object(h.jsxDEV)(l.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:ll,lineNumber:588,columnNumber:15},void 0)},void 0,!1,{fileName:ll,lineNumber:587,columnNumber:13},void 0),Object(h.jsxDEV)(l.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:ll,lineNumber:605,columnNumber:15},void 0)},void 0,!1,{fileName:ll,lineNumber:604,columnNumber:13},void 0),Object(h.jsxDEV)(l.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:ll,lineNumber:624,columnNumber:15},void 0)},void 0,!1,{fileName:ll,lineNumber:623,columnNumber:13},void 0)]},void 0,!0,{fileName:ll,lineNumber:586,columnNumber:11},void 0)},void 0,!1,{fileName:ll,lineNumber:585,columnNumber:9},void 0)},void 0,!1,{fileName:ll,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)(s.a,{model:v,rules:rl,ref:m,className:"addform",children:[Object(h.jsxDEV)(l.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),l=a.getHours(),s=a.getMinutes(),n=a.getSeconds();return Object(K.a)(e,a)?{disabledHours:()=>sl(l),disabledMinutes:e=>e===l?sl(s):[],disabledSeconds:(e,t)=>e===l&&t===s?sl(n):[]}:{}},disabledDate:(e,t)=>{let i=JSON.parse(sessionStorage.getItem("knockGold_effectDate")),a=!1,l=$()(e).format("YYYY-MM-DD HH:mm:ss");const s=$()(i.end_time).format("HH:mm:ss");return"start"==t&&(a=s<"23:59:59"?$()(l).isBefore(i.begin_time)||$()(l).subtract(1,"days").isAfter(i.end_time):$()(l).isBefore(i.begin_time)||$()(l).isAfter(i.end_time)),"end"==t&&(a=$()(l).add(1,"days").isBefore(i.begin_time)||$()(l).isAfter(i.end_time)),a}},void 0,!1,{fileName:ll,lineNumber:645,columnNumber:15},void 0)},void 0,!1,{fileName:ll,lineNumber:644,columnNumber:13},void 0),Object(h.jsxDEV)(l.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:ll,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:ll,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:ll,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:ll,lineNumber:702,columnNumber:17},void 0)]},void 0,!0,{fileName:ll,lineNumber:661,columnNumber:15},void 0)},void 0,!1,{fileName:ll,lineNumber:660,columnNumber:13},void 0)]},void 0,!0,{fileName:ll,lineNumber:643,columnNumber:11},void 0)},void 0,!1,{fileName:ll,lineNumber:642,columnNumber:9},void 0),Object(h.jsxDEV)(l.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)(T,{headBackgroud:"#f9fafc",isBorder:!0,spliteColor:"#fff",tableData:N.tableData,Column:nl,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:ll,lineNumber:748,columnNumber:23},void 0)},void 0,!1,{fileName:ll,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:ll,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:ll,lineNumber:729,columnNumber:13},void 0)},void 0,!1,{fileName:ll,lineNumber:722,columnNumber:11},void 0)},void 0,!1,{fileName:ll,lineNumber:721,columnNumber:9},void 0)]},void 0,!0,{fileName:ll,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:ll,lineNumber:779,columnNumber:7},void 0)]},void 0,!0,{fileName:ll,lineNumber:580,columnNumber:5},void 0)}));const cl=[{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"}],dl={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}$"}]},ul={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 hl="D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\components\\combining\\index.jsx";function bl(e){return Array.from({length:e},((e,t)=>t))}var pl=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(R.a)(x()),[v,g]=Object(R.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:A,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=M(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:l,title:s,begin_time:n,end_time:o}=i,{channel:r,receive_mode:m,instruction:c,group_image:d,time_limit:u,is_webview:h}=l;g({quantity:a,is_webview:Number(h)||0,timer_show:Number(u.timer_show)||1,instructionType:Number(l.instructionType)||1,code_name:s,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 l=new FormData;l.append("file",e),l.append("path","common_image"),Object(a.fd)(l).then((e=>{Object(a.Wb)(e,((e,i)=>{t(e.path)}),(e=>{c.a.error(e),i(e)}))}))}catch(l){i(l)}})))(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)(s.a,{model:v,rules:dl,ref:o,className:"addform",children:[Object(h.jsxDEV)(l.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:A}):"2"===e.value?g({instruction:B}):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:hl,lineNumber:444,columnNumber:19},void 0),Object(h.jsxDEV)(ne.a,{value:"2",children:"\u5fae\u4fe1"},void 0,!1,{fileName:hl,lineNumber:445,columnNumber:19},void 0),Object(h.jsxDEV)(ne.a,{value:"3",children:"\u4e91\u95ea\u4ed8"},void 0,!1,{fileName:hl,lineNumber:446,columnNumber:19},void 0)]},void 0,!0,{fileName:hl,lineNumber:443,columnNumber:17},void 0)},void 0,!1,{fileName:hl,lineNumber:420,columnNumber:15},void 0)},void 0,!1,{fileName:hl,lineNumber:419,columnNumber:13},void 0),2==v.channel?Object(h.jsxDEV)(l.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:hl,lineNumber:458,columnNumber:19},void 0),Object(h.jsxDEV)(ne.a,{value:1,children:"\u516c\u4f17\u53f7"},void 0,!1,{fileName:hl,lineNumber:459,columnNumber:19},void 0)]},void 0,!0,{fileName:hl,lineNumber:452,columnNumber:17},void 0)},"is_webview",!1,{fileName:hl,lineNumber:451,columnNumber:15},void 0):null,1==v.channel?Object(h.jsxDEV)(l.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:hl,lineNumber:477,columnNumber:21},void 0),Object(h.jsxDEV)(ne.a,{value:2,children:"\u8d26\u53f7\u9886\u53d6"},void 0,!1,{fileName:hl,lineNumber:478,columnNumber:21},void 0)]},void 0,!0,{fileName:hl,lineNumber:476,columnNumber:19},void 0)},void 0,!1,{fileName:hl,lineNumber:465,columnNumber:17},void 0)},void 0,!1,{fileName:hl,lineNumber:464,columnNumber:15},void 0):null,Object(h.jsxDEV)(l.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:hl,lineNumber:484,columnNumber:15},void 0)},void 0,!1,{fileName:hl,lineNumber:483,columnNumber:13},void 0),Object(h.jsxDEV)(l.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:hl,lineNumber:501,columnNumber:15},void 0)},void 0,!1,{fileName:hl,lineNumber:500,columnNumber:13},void 0),Object(h.jsxDEV)(l.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:hl,lineNumber:526,columnNumber:17},void 0),Object(h.jsxDEV)(ne.a,{value:2,children:"\u56fe\u7247\u63cf\u8ff0"},void 0,!1,{fileName:hl,lineNumber:527,columnNumber:17},void 0)]},void 0,!0,{fileName:hl,lineNumber:520,columnNumber:15},void 0)},void 0,!1,{fileName:hl,lineNumber:519,columnNumber:13},void 0),2===v.instructionType?Object(h.jsxDEV)(l.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:hl,lineNumber:532,columnNumber:17},void 0)},void 0,!1,{fileName:hl,lineNumber:531,columnNumber:15},void 0):Object(h.jsxDEV)(l.a,{labelname:"\u4f7f\u7528\u8bf4\u660e",prop:"instruction",id:"instruction",required:!1,children:Object(h.jsxDEV)(Ri,{pageType:"detaileditor",setEdittext:e=>{g({instruction:e})},width:"520px",text:v.instruction,limitLength:5e3},v.channel,!1,{fileName:hl,lineNumber:548,columnNumber:17},void 0)},void 0,!1,{fileName:hl,lineNumber:547,columnNumber:15},void 0)]},void 0,!0,{fileName:hl,lineNumber:418,columnNumber:11},void 0)},void 0,!1,{fileName:hl,lineNumber:417,columnNumber:9},void 0),Object(h.jsxDEV)($i,{data:v,products:N.tableData},void 0,!1,{fileName:hl,lineNumber:562,columnNumber:9},void 0)]},void 0,!0,{fileName:hl,lineNumber:416,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)(s.a,{model:v,rules:ul,ref:m,className:"addform",children:[Object(h.jsxDEV)(l.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),l=a.getHours(),s=a.getMinutes(),n=a.getSeconds();return Object(K.a)(e,a)?{disabledHours:()=>bl(l),disabledMinutes:e=>e===l?bl(s):[],disabledSeconds:(e,t)=>e===l&&t===s?bl(n):[]}:{}},disabledDate:function(e,t){let i=JSON.parse(sessionStorage.getItem("plan_item")),a=!1,l=$()(e).format("YYYY-MM-DD HH:mm:ss");const s=$()(i.end_time).format("HH:mm:ss");return"start"==t&&(a=s<"23:59:59"?$()(l).isBefore(i.begin_time)||$()(l).subtract(1,"days").isAfter(i.end_time):$()(l).isBefore(i.begin_time)||$()(l).isAfter(i.end_time)),"end"==t&&(a=$()(l).add(1,"days").isBefore(i.begin_time)||$()(l).isAfter(i.end_time)),a}},void 0,!1,{fileName:hl,lineNumber:569,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:hl,lineNumber:596,columnNumber:17},void 0),Object(h.jsxDEV)(ne.a,{value:2,children:"\u9690\u85cf"},void 0,!1,{fileName:hl,lineNumber:597,columnNumber:17},void 0)]},void 0,!0,{fileName:hl,lineNumber:589,columnNumber:15},void 0)]},void 0,!0,{fileName:hl,lineNumber:568,columnNumber:13},void 0),2===v.timer_type?Object(h.jsxDEV)(l.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:[$()().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=$()(e.getTime()).add(1,"days")<=(new Date).getTime()),"start"==t&&(i=e.getTime()<=(new Date).getTime()),i}},void 0,!1,{fileName:hl,lineNumber:602,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:hl,lineNumber:625,columnNumber:19},void 0),Object(h.jsxDEV)(ne.a,{value:2,children:"\u6bcf\u65e5"},void 0,!1,{fileName:hl,lineNumber:626,columnNumber:19},void 0)]},void 0,!0,{fileName:hl,lineNumber:615,columnNumber:17},void 0)]},void 0,!0,{fileName:hl,lineNumber:601,columnNumber:15},void 0):Object(h.jsxDEV)(l.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:hl,lineNumber:637,columnNumber:19},void 0),Object(h.jsxDEV)(ne.a,{value:2,children:"\u6bcf\u65e5"},void 0,!1,{fileName:hl,lineNumber:638,columnNumber:19},void 0)]},void 0,!0,{fileName:hl,lineNumber:631,columnNumber:17},void 0)},void 0,!1,{fileName:hl,lineNumber:630,columnNumber:15},void 0),Object(h.jsxDEV)(l.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:hl,lineNumber:644,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:hl,lineNumber:654,columnNumber:17},void 0)]},void 0,!0,{fileName:hl,lineNumber:643,columnNumber:15},void 0)},void 0,!1,{fileName:hl,lineNumber:642,columnNumber:13},void 0)]},void 0,!0,{fileName:hl,lineNumber:567,columnNumber:11},void 0)},void 0,!1,{fileName:hl,lineNumber:566,columnNumber:9},void 0),Object(h.jsxDEV)(l.a,{labelname:"",prop:"range",id:"range",children:Object(h.jsxDEV)(T,{headBackgroud:"#f9fafc",isBorder:!0,spliteColor:"#fff",tableData:N.tableData,Column:cl,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:hl,lineNumber:687,columnNumber:21},void 0)},void 0,!1,{fileName:hl,lineNumber:686,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:hl,lineNumber:668,columnNumber:11},void 0)},void 0,!1,{fileName:hl,lineNumber:667,columnNumber:9},void 0)]},void 0,!0,{fileName:hl,lineNumber:565,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=M(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:hl,lineNumber:716,columnNumber:13},void 0),Object(h.jsxDEV)(u.a,{onClick:e=>{j({visible:!1})},children:"\u53d6\u6d88"},void 0,!1,{fileName:hl,lineNumber:719,columnNumber:13},void 0)]},void 0,!0,{fileName:hl,lineNumber:715,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)(Me,{ref:p,data:N.productData,combining:v},void 0,!1,{fileName:hl,lineNumber:736,columnNumber:13},void 0)},void 0,!1,{fileName:hl,lineNumber:735,columnNumber:11},void 0)},void 0,!1,{fileName:hl,lineNumber:734,columnNumber:9},void 0)},void 0,!1,{fileName:hl,lineNumber:710,columnNumber:7},void 0)]},void 0,!0,{fileName:hl,lineNumber:415,columnNumber:5},void 0)})),Nl=(i(250),"D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\pages\\plan\\add\\step2.js");const jl=e=>Array.from({length:e},((e,t)=>t)),vl=[{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 gl 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=$()(e).format("YYYY-MM-DD HH:mm:ss");return!$()(i).isBetween(t.begin_time,t.end_time,null,"(]")},this.onDisabledTime=(e,t)=>{const i=new Date,a=i.getHours(),l=i.getMinutes(),s=i.getSeconds();return Object(K.a)(e,i)?{disabledHours:()=>jl(a),disabledMinutes:e=>e===a?jl(l):[],disabledSeconds:(e,t)=>e===a&&t===l?jl(s):[]}:{}},this.onDisabledRange=(e,t)=>{let i=JSON.parse(sessionStorage.getItem("knockGold_effectDate")),a=!1,l=$()(e).format("YYYY-MM-DD HH:mm:ss"),s=$()(i.end_time).format("HH:mm:ss");return"start"==t&&(a=s<"23:59:59"?$()(l).isBefore(i.begin_time)||$()(l).subtract(1,"days").isAfter(i.end_time):$()(l).isBefore(i.begin_time)||$()(l).isAfter(i.end_time)),"end"==t&&(a=$()(l).add(1,"days").isBefore(i.begin_time)||$()(l).isAfter(i.end_time)),a},this.onUpload=(e,t)=>new Promise(((i,l)=>{let s="",n=new FormData;n.append("file",e),n.append("path","common_image"),Object(a.fd)(n).then((e=>{Object(a.Wb)(e,((e,t)=>{s=e.path}),(e=>{l()}))}));let o=0;const r=()=>{s?i(s):o<100?(o+=2,t(o),setTimeout(r,500)):l()};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 l={reseller_id:e};Object(a.vb)(l).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 l={};return l.product_name=e.batch_goods_name?e.batch_goods_name:e.product_name,l.map_product_name=e.product_name,l.channel_activity_id=e.channel_activity_id,l.only=e.channel_activity_id,l.type=2,l.checked=null===e||void 0===e?void 0:e.checked,l.upstream=P(e.channel),l.edit="edit",l.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),l.contract_price=e.contract_price?e.contract_price:e.price,l.official_price=e.official_price?e.official_price:e.reduce_amount,l.quantity=e.quantity?e.quantity:parseInt(F(e.all_budget,e.reduce_amount)),l.origin=null!==e&&void 0!==e&&e.origin?null===e||void 0===e?void 0:e.origin:e,l})));let a=te(t.concat(i),"only"),l=[],s=[];Object(f.a)(a,(e=>{l.push({key:e.only,text:e.product_name}),e.checked&&s.push({key:e.only,text:e.product_name})})),l=te(l,"key"),this.setState({tempdata:a,rankoptions:l,rank:s})}),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(Ii.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.fd)(e).then((e=>{Object(a.Wb)(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.M)(i).then((e=>{this.setState({file_loading:!1}),Object(a.Wb)(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")):[],l=a.find((e=>e.key===this.props.step_id));l?l.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)(ml,{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:Nl,lineNumber:1140,columnNumber:11},this):Object(h.jsxDEV)(pl,{propsData:this.state.rowExchangeData,ref:"addEditExchangeEl"},void 0,!1,{fileName:Nl,lineNumber:1149,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:Nl,lineNumber:1153,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)),l=null===(t=e.cash)||void 0===t?void 0:t.map((e=>e.batch_goods_name)),s=i.concat(a,l);return s=s.join(","),Object(h.jsxDEV)("span",{children:s},void 0,!1,{fileName:Nl,lineNumber:1198,columnNumber:14},this)};return Object(h.jsxDEV)("div",{id:"step2",children:[Object(h.jsxDEV)(s.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)(l.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:Nl,lineNumber:1211,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:Nl,lineNumber:1215,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:Nl,lineNumber:1227,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:Nl,lineNumber:1239,columnNumber:15},this)]},void 0,!0,{fileName:Nl,lineNumber:1205,columnNumber:13},this)},void 0,!1,{fileName:Nl,lineNumber:1204,columnNumber:11},this),this.state.isload&&1===this.props.isSettlement?Object(h.jsxDEV)(l.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:Nl,lineNumber:1247,columnNumber:15},this)},void 0,!1,{fileName:Nl,lineNumber:1246,columnNumber:13},this):null,this.state.isload&&1===this.props.isSettlement?Object(h.jsxDEV)(l.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:Nl,lineNumber:1271,columnNumber:15},this)},void 0,!1,{fileName:Nl,lineNumber:1270,columnNumber:13},this):null,this.state.isload?Object(h.jsxDEV)(l.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:Nl,lineNumber:1295,columnNumber:15},this)},void 0,!1,{fileName:Nl,lineNumber:1294,columnNumber:13},this):null,this.state.isload?Object(h.jsxDEV)(l.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:Nl,lineNumber:1320,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:Nl,lineNumber:1342,columnNumber:19},this):null]},void 0,!0,{fileName:Nl,lineNumber:1319,columnNumber:15},this)},void 0,!1,{fileName:Nl,lineNumber:1318,columnNumber:13},this):null,Object(h.jsxDEV)(l.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:Nl,lineNumber:1366,columnNumber:15},this),Object(h.jsxDEV)(Z.a,{value:"2",children:"\u56fa\u5b9a\u65f6\u95f4\u6bb5"},void 0,!1,{fileName:Nl,lineNumber:1367,columnNumber:15},this),Object(h.jsxDEV)(Z.a,{value:"3",children:"\u63a5\u53e3\u8c03\u53d6\u540e\u6709\u6548\u671f"},void 0,!1,{fileName:Nl,lineNumber:1368,columnNumber:15},this)]},void 0,!0,{fileName:Nl,lineNumber:1357,columnNumber:13},this)},void 0,!1,{fileName:Nl,lineNumber:1356,columnNumber:11},this),"2"===this.state.model.expiration_type?Object(h.jsxDEV)(l.a,{labelname:"\u56fa\u5b9a\u65f6\u95f4\u6bb5",children:Object(h.jsxDEV)(ee.a,{className:"zent-datepicker-plan",showTime:{format:"HH:mm:ss",defaultTime:[$()().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:Nl,lineNumber:1374,columnNumber:15},this)},void 0,!1,{fileName:Nl,lineNumber:1373,columnNumber:13},this):null,"3"===this.state.model.expiration_type?Object(h.jsxDEV)(l.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(),l=Math.ceil(a/864e5);if(!(l>=Number(e.target.value)))return void c.a.error(`key\u7801\u6709\u6548\u671f\u4e0d\u80fd\u8d85\u8fc7\u8ba1\u5212\u6709\u6548\u671f(${l}\u5929)`);{let t=this.state.model;t.expiration_value=e.target.value,this.setState({model:t})}}}},void 0,!1,{fileName:Nl,lineNumber:1394,columnNumber:15},this)},void 0,!1,{fileName:Nl,lineNumber:1393,columnNumber:13},this):null,Object(h.jsxDEV)(l.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:Nl,lineNumber:1436,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:Nl,lineNumber:1439,columnNumber:15},this)]},void 0,!0,{fileName:Nl,lineNumber:1430,columnNumber:13},this)},void 0,!1,{fileName:Nl,lineNumber:1429,columnNumber:11},this),Object(h.jsxDEV)(l.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:Nl,lineNumber:1448,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:Nl,lineNumber:1464,columnNumber:19},this)},void 0,!1,{fileName:Nl,lineNumber:1463,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:Nl,lineNumber:1488,columnNumber:15},this)},void 0,!1,{fileName:Nl,lineNumber:1445,columnNumber:11},this),Object(h.jsxDEV)(l.a,{labelname:"\u7ed1\u5b9a\u5bf9\u8c61",prop:"grid",children:Object(h.jsxDEV)(T,{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:Nl,lineNumber:1516,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:Nl,lineNumber:1534,columnNumber:21},this):void 0},void 0,!1,{fileName:Nl,lineNumber:1499,columnNumber:13},this)},void 0,!1,{fileName:Nl,lineNumber:1498,columnNumber:11},this),Object(h.jsxDEV)(l.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:Nl,lineNumber:1552,columnNumber:15},this),Object(h.jsxDEV)(ne.a,{value:0,children:"\u5426"},void 0,!1,{fileName:Nl,lineNumber:1553,columnNumber:15},this)]},void 0,!0,{fileName:Nl,lineNumber:1548,columnNumber:13},this)},void 0,!1,{fileName:Nl,lineNumber:1547,columnNumber:11},this),Object(h.jsxDEV)(l.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:Nl,lineNumber:1559,columnNumber:15},this),Object(h.jsxDEV)(ne.a,{value:0,children:"\u5426"},void 0,!1,{fileName:Nl,lineNumber:1560,columnNumber:15},this)]},void 0,!0,{fileName:Nl,lineNumber:1558,columnNumber:13},this)},void 0,!1,{fileName:Nl,lineNumber:1557,columnNumber:11},this)]},void 0,!0,{fileName:Nl,lineNumber:1203,columnNumber:9},this),Object(h.jsxDEV)("div",{className:"btnadd-key",onClick:()=>{this.addNewKey()},children:"\u6dfb\u52a0\u65b0\u7684\u6279\u6b21key"},void 0,!1,{fileName:Nl,lineNumber:1564,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:Nl,lineNumber:1578,columnNumber:15},this),Object(h.jsxDEV)(u.a,{onClick:e=>{this.closeDraw()},children:"\u53d6\u6d88"},void 0,!1,{fileName:Nl,lineNumber:1586,columnNumber:15},this)]},void 0,!0,{fileName:Nl,lineNumber:1577,columnNumber:13},this),visible:this.state.drawerVisible,onClose:e=>{this.closeDraw()},maskClosable:!1,children:this.dynamicComponents()},void 0,!1,{fileName:Nl,lineNumber:1573,columnNumber:9},this),this.state.import_visible?Object(h.jsxDEV)("div",{children:[Object(h.jsxDEV)("div",{className:"modal"},void 0,!1,{fileName:Nl,lineNumber:1606,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:Nl,lineNumber:1609,columnNumber:17},this),Object(h.jsxDEV)(g.a,{type:"close",className:"import-close",onClick:e=>{this.setState({import_visible:!1})}},void 0,!1,{fileName:Nl,lineNumber:1611,columnNumber:17},this)]},void 0,!0,{fileName:Nl,lineNumber:1608,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:Nl,lineNumber:1621,columnNumber:19},this),Object(h.jsxDEV)("span",{className:"step-label active",children:"\u4e0a\u4f20\u6587\u4ef6"},void 0,!1,{fileName:Nl,lineNumber:1622,columnNumber:19},this)]},void 0,!0,{fileName:Nl,lineNumber:1620,columnNumber:17},this),Object(h.jsxDEV)("div",{className:"step-center",children:Object(h.jsxDEV)("div",{className:"step-line"},void 0,!1,{fileName:Nl,lineNumber:1625,columnNumber:19},this)},void 0,!1,{fileName:Nl,lineNumber:1624,columnNumber:17},this),Object(h.jsxDEV)("div",{className:"step-group",children:[Object(h.jsxDEV)("div",{className:"step-code",children:"2"},void 0,!1,{fileName:Nl,lineNumber:1628,columnNumber:19},this),Object(h.jsxDEV)("span",{className:"step-label",children:"\u5bfc\u5165\u5b8c\u6210"},void 0,!1,{fileName:Nl,lineNumber:1629,columnNumber:19},this)]},void 0,!0,{fileName:Nl,lineNumber:1627,columnNumber:17},this)]},void 0,!0,{fileName:Nl,lineNumber:1619,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:Nl,lineNumber:1634,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:Nl,lineNumber:1637,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:Nl,lineNumber:1638,columnNumber:19},this)]},void 0,!0,{fileName:Nl,lineNumber:1636,columnNumber:17},this)]},void 0,!0,{fileName:Nl,lineNumber:1633,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:Nl,lineNumber:1648,columnNumber:23},this),Object(h.jsxDEV)("span",{className:"excel-txt",children:this.state.myfile.name},void 0,!1,{fileName:Nl,lineNumber:1649,columnNumber:23},this)]},void 0,!0,{fileName:Nl,lineNumber:1647,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:Nl,lineNumber:1654,columnNumber:25},this),Object(h.jsxDEV)("span",{className:"excel-txt",children:"\u89e3\u6790\u4e2d "},void 0,!1,{fileName:Nl,lineNumber:1655,columnNumber:25},this)]},void 0,!0,{fileName:Nl,lineNumber:1653,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:Nl,lineNumber:1659,columnNumber:25},this),Object(h.jsxDEV)(g.a,{type:"up-circle-o",className:"upload-flag"},void 0,!1,{fileName:Nl,lineNumber:1664,columnNumber:25},this),Object(h.jsxDEV)("span",{className:"excel-txt",children:"\u66f4\u65b0\u6587\u4ef6 "},void 0,!1,{fileName:Nl,lineNumber:1665,columnNumber:25},this)]},void 0,!0,{fileName:Nl,lineNumber:1658,columnNumber:23},this)]},void 0,!0,{fileName:Nl,lineNumber:1646,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:Nl,lineNumber:1671,columnNumber:23},this),"\u6587\u4ef6\u89e3\u6790\u6210\u529f,\u70b9\u51fb\u786e\u5b9a\u5bfc\u5165 \u5373\u53ef\u5bfc\u5165"]},void 0,!0,{fileName:Nl,lineNumber:1670,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:Nl,lineNumber:1677,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:Nl,lineNumber:1676,columnNumber:21},this):null]},void 0,!0,{fileName:Nl,lineNumber:1645,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:Nl,lineNumber:1684,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:Nl,lineNumber:1689,columnNumber:19},this)," "]},void 0,!0,{fileName:Nl,lineNumber:1683,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:Nl,lineNumber:1703,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:Nl,lineNumber:1706,columnNumber:19},this)},void 0,!1,{fileName:Nl,lineNumber:1705,columnNumber:17},this)]},void 0,!0,{fileName:Nl,lineNumber:1702,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:Nl,lineNumber:1709,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:Nl,lineNumber:1720,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:Nl,lineNumber:1728,columnNumber:19},this)]},void 0,!0,{fileName:Nl,lineNumber:1719,columnNumber:17},this)},void 0,!1,{fileName:Nl,lineNumber:1718,columnNumber:15},this)]},void 0,!0,{fileName:Nl,lineNumber:1607,columnNumber:13},this)]},void 0,!0,{fileName:Nl,lineNumber:1605,columnNumber:11},this):null,this.state.excel_visible?Object(h.jsxDEV)("div",{children:[Object(h.jsxDEV)("div",{className:"modal"},void 0,!1,{fileName:Nl,lineNumber:1749,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:Nl,lineNumber:1752,columnNumber:17},this),Object(h.jsxDEV)(g.a,{type:"close",className:"import-close",onClick:e=>{this.setState({excel_visible:!1})}},void 0,!1,{fileName:Nl,lineNumber:1753,columnNumber:17},this)]},void 0,!0,{fileName:Nl,lineNumber:1751,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:Nl,lineNumber:1761,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:Nl,lineNumber:1765,columnNumber:15},this),Object(h.jsxDEV)("div",{},void 0,!1,{fileName:Nl,lineNumber:1769,columnNumber:15},this),Object(h.jsxDEV)("div",{className:"gridpanel",children:Object(h.jsxDEV)(T,{headBackgroud:"#f9fafc",isShowPageBar:!1,spliteColor:"#fff",tableData:this.state.exceldata,value:this.state.exceldata,Column:vl,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:Nl,lineNumber:1792,columnNumber:27},this)}return Object(h.jsxDEV)("div",{className:"isImport",children:"-"},void 0,!1,{fileName:Nl,lineNumber:1800,columnNumber:32},this)}}},void 0,!1,{fileName:Nl,lineNumber:1772,columnNumber:17},this)},void 0,!1,{fileName:Nl,lineNumber:1771,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:Nl,lineNumber:1808,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:Nl,lineNumber:1816,columnNumber:19},this)]},void 0,!0,{fileName:Nl,lineNumber:1807,columnNumber:17},this)},void 0,!1,{fileName:Nl,lineNumber:1806,columnNumber:15},this)]},void 0,!0,{fileName:Nl,lineNumber:1750,columnNumber:13},this)]},void 0,!0,{fileName:Nl,lineNumber:1748,columnNumber:11},this):null]},void 0,!0,{fileName:Nl,lineNumber:1202,columnNumber:7},this)}}var fl="D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\pages\\plan\\add\\step3.js";class _l 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.Ib)(e).then((e=>{Object(a.Wb)(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)(s.a,{model:this.state.model,rules:{theme_id:[{type:"required",message:"\u8bf7\u9009\u62e9\u843d\u5730\u9875"}]},ref:"form1",children:[Object(h.jsxDEV)(l.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),Ut.a.emit("change","theme_id",e)}},void 0,!1,{fileName:fl,lineNumber:147,columnNumber:13},this),Object(h.jsxDEV)("a",{type:"refresh",onClick:()=>{this.refresh()},className:"refresh-btn",children:"\u5237\u65b0"},void 0,!1,{fileName:fl,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:fl,lineNumber:166,columnNumber:13},this)]},void 0,!0,{fileName:fl,lineNumber:146,columnNumber:11},this),Object(h.jsxDEV)(l.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:fl,lineNumber:184,columnNumber:17},this)},void 0,!1,{fileName:fl,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:fl,lineNumber:187,columnNumber:17},this)},void 0,!1,{fileName:fl,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:fl,lineNumber:192,columnNumber:17},this)},void 0,!1,{fileName:fl,lineNumber:191,columnNumber:15},this)]},void 0,!0,{fileName:fl,lineNumber:177,columnNumber:13},this)},void 0,!1,{fileName:fl,lineNumber:176,columnNumber:11},this)]},void 0,!0,{fileName:fl,lineNumber:145,columnNumber:9},this)},void 0,!1,{fileName:fl,lineNumber:144,columnNumber:7},this)}}var xl="D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\pages\\plan\\add\\add.js";class yl 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:xl,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.Wb)(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.Wb)(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.Wb)(e,((e,i)=>{let l=t.info.reseller_id;Object(a.xb)(l).then((e=>{Object(a.Wb)(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.gc)(t,i).then((e=>{Object(a.Wb)(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:xl,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:xl,lineNumber:329,columnNumber:23},this),this.state.curstep>=e.id?Object(h.jsxDEV)(g.a,{type:"check",className:"checkIcon"},void 0,!1,{fileName:xl,lineNumber:338,columnNumber:25},this):null]},i,!0,{fileName:xl,lineNumber:328,columnNumber:21},this))),Object(h.jsxDEV)("div",{className:"under-line"},void 0,!1,{fileName:xl,lineNumber:343,columnNumber:17},this)]},e.title,!0,{fileName:xl,lineNumber:324,columnNumber:15},this)))},void 0,!1,{fileName:xl,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:xl,lineNumber:351,columnNumber:15},this),Object(h.jsxDEV)(d.a,{style:{width:"100%"},title:this.state.step1_pagetitle,children:Object(h.jsxDEV)(al,{ref:"step1",setTlementType:e=>this.setTlementType(e),setTlementData:e=>this.setTlementData(e),onGetDirectResellerId:e=>this.getDirectResellerId(e)},void 0,!1,{fileName:xl,lineNumber:353,columnNumber:17},this)},void 0,!1,{fileName:xl,lineNumber:352,columnNumber:15},this)]},void 0,!0,{fileName:xl,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:xl,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:xl,lineNumber:377,columnNumber:27},this):null,children:Object(h.jsxDEV)(gl,{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:xl,lineNumber:389,columnNumber:23},this)},t,!1,{fileName:xl,lineNumber:367,columnNumber:21},this):null))]},void 0,!0,{fileName:xl,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)(_l,{ref:"step3"},void 0,!1,{fileName:xl,lineNumber:419,columnNumber:19},this)},void 0,!1,{fileName:xl,lineNumber:418,columnNumber:17},this)},void 0,!1,{fileName:xl,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:xl,lineNumber:426,columnNumber:17},this),Object(h.jsxDEV)(u.a,{type:"normal",onClick:()=>this.onReturn(),children:"\u53d6\u6d88"},void 0,!1,{fileName:xl,lineNumber:429,columnNumber:17},this)]},void 0,!0,{fileName:xl,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:xl,lineNumber:435,columnNumber:17},this),Object(h.jsxDEV)(u.a,{type:"normal",onClick:()=>this.onReturn(),children:"\u53d6\u6d88"},void 0,!1,{fileName:xl,lineNumber:438,columnNumber:17},this)]},void 0,!0,{fileName:xl,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:xl,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:xl,lineNumber:448,columnNumber:19},this),Object(h.jsxDEV)("div",{className:"audit-box-title",children:"\u63d0\u4ea4\u5ba1\u6838"},void 0,!1,{fileName:xl,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:xl,lineNumber:464,columnNumber:23},this),Object(h.jsxDEV)(Z.a,{value:1,children:"\u5bf9\u79c1\u8d26\u6237"},void 0,!1,{fileName:xl,lineNumber:465,columnNumber:23},this),Object(h.jsxDEV)(Z.a,{value:2,children:"\u5bf9\u516c\u8d26\u6237"},void 0,!1,{fileName:xl,lineNumber:466,columnNumber:23},this)]},void 0,!0,{fileName:xl,lineNumber:457,columnNumber:21},this)},void 0,!1,{fileName:xl,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:xl,lineNumber:470,columnNumber:21},this),Object(h.jsxDEV)(u.a,{type:"primary",onClick:e=>{this.onConfirm(e)},children:"\u786e\u5b9a"},void 0,!1,{fileName:xl,lineNumber:477,columnNumber:21},this)]},void 0,!0,{fileName:xl,lineNumber:469,columnNumber:19},this)]},void 0,!0,{fileName:xl,lineNumber:447,columnNumber:17},this)]},void 0,!0,{fileName:xl,lineNumber:445,columnNumber:15},this):null]},void 0,!0,{fileName:xl,lineNumber:349,columnNumber:11},this)},void 0,!1,{fileName:xl,lineNumber:348,columnNumber:9},this)]},void 0,!0,{fileName:xl,lineNumber:320,columnNumber:7},this)}}i(251);var Ol="D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\pages\\plan\\add\\edit.js";class Dl 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,direct_reseller_name:"",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:Ol,lineNumber:83,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 l=sessionStorage.getItem("plan_id"),s=sessionStorage.getItem("approval_id");Number(s)>0?Object(a.Q)(s).then((e=>{Object(a.Wb)(e,((e,t)=>{try{Object(a.xb)(e.info.reseller_id).then((e=>{Object(a.Wb)(e,((e,t)=>{this.setState({direct_reseller_id:e.direct_reseller_id,direct_reseller_name:e.direct_reseller_name})}))}))}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.db)(l).then((e=>{Object(a.Wb)(e,((e,t)=>{if(Object(a.xb)(e.info.reseller_id).then((e=>{Object(a.Wb)(e,((e,t)=>{this.setState({direct_reseller_id:e.direct_reseller_id,direct_reseller_name:e.direct_reseller_name})}))})),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.Wb)(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.Wb)(e,((e,i)=>{let l=t.info.reseller_id;Object(a.xb)(l).then((e=>{Object(a.Wb)(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.gc)(t,i).then((e=>{Object(a.Wb)(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.R)(i).then((e=>{setTimeout((()=>{this.setState({btn_loading:!1})}),500),Object(a.Wb)(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.Wb)(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.Wb)(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.ed)(e).then((e=>{Object(a.Wb)(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:Ol,lineNumber:583,columnNumber:17},this),Object(h.jsxDEV)(d.a,{style:{width:"100%"},title:this.state.step1_pagetitle,children:Object(h.jsxDEV)(al,{ref:"step1",data:this.state.step1_data,disabled:this.state.disabled,direct_reseller_name:this.state.direct_reseller_name},void 0,!1,{fileName:Ol,lineNumber:585,columnNumber:19},this)},void 0,!1,{fileName:Ol,lineNumber:584,columnNumber:17},this)]},void 0,!0,{fileName:Ol,lineNumber:582,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:Ol,lineNumber:589,columnNumber:17},this),Object(h.jsxDEV)(u.a,{type:"normal",onClick:()=>this.onReturn(),children:"\u53d6\u6d88"},void 0,!1,{fileName:Ol,lineNumber:592,columnNumber:17},this)]},void 0,!0,{fileName:Ol,lineNumber:588,columnNumber:15},this)]},void 0,!0,{fileName:Ol,lineNumber:581,columnNumber:13},this)},void 0,!1,{fileName:Ol,lineNumber:580,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:Ol,lineNumber:604,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:Ol,lineNumber:608,columnNumber:27},this),this.state.curstep>=e.id?Object(h.jsxDEV)(g.a,{type:"check",className:"checkIcon"},void 0,!1,{fileName:Ol,lineNumber:617,columnNumber:29},this):null]},i,!0,{fileName:Ol,lineNumber:607,columnNumber:25},this))),Object(h.jsxDEV)("div",{className:"under-line"},void 0,!1,{fileName:Ol,lineNumber:622,columnNumber:21},this)]},e.title,!0,{fileName:Ol,lineNumber:603,columnNumber:19},this)))},void 0,!1,{fileName:Ol,lineNumber:600,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:Ol,lineNumber:631,columnNumber:19},this),Object(h.jsxDEV)(d.a,{style:{width:"100%"},title:this.state.step1_pagetitle,children:Object(h.jsxDEV)(al,{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),direct_reseller_name:this.state.direct_reseller_name},void 0,!1,{fileName:Ol,lineNumber:633,columnNumber:21},this)},void 0,!1,{fileName:Ol,lineNumber:632,columnNumber:19},this)]},void 0,!0,{fileName:Ol,lineNumber:630,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:Ol,lineNumber:647,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:Ol,lineNumber:659,columnNumber:31},this):null,children:Object(h.jsxDEV)(gl,{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:Ol,lineNumber:671,columnNumber:27},this)},void 0,!1,{fileName:Ol,lineNumber:650,columnNumber:25},this):null))]},void 0,!0,{fileName:Ol,lineNumber:646,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)(_l,{ref:"step3",data:this.state.step3_data,options:this.state.theme_options,disabled:this.state.disabled},void 0,!1,{fileName:Ol,lineNumber:707,columnNumber:23},this)},void 0,!1,{fileName:Ol,lineNumber:703,columnNumber:21},this)},void 0,!1,{fileName:Ol,lineNumber:702,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:Ol,lineNumber:719,columnNumber:21},this),Object(h.jsxDEV)(u.a,{type:"normal",onClick:()=>this.onReturn(),children:"\u53d6\u6d88"},void 0,!1,{fileName:Ol,lineNumber:726,columnNumber:21},this)]},void 0,!0,{fileName:Ol,lineNumber:718,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:Ol,lineNumber:732,columnNumber:21},this),Object(h.jsxDEV)(u.a,{type:"normal",onClick:()=>this.onReturn(),children:"\u53d6\u6d88"},void 0,!1,{fileName:Ol,lineNumber:739,columnNumber:21},this)]},void 0,!0,{fileName:Ol,lineNumber:731,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:Ol,lineNumber:747,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:Ol,lineNumber:749,columnNumber:23},this),Object(h.jsxDEV)("div",{className:"audit-box-title",children:"\u63d0\u4ea4\u5ba1\u6838"},void 0,!1,{fileName:Ol,lineNumber:756,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:Ol,lineNumber:765,columnNumber:27},this),Object(h.jsxDEV)(Z.a,{value:1,children:"\u5bf9\u79c1\u8d26\u6237"},void 0,!1,{fileName:Ol,lineNumber:766,columnNumber:27},this),Object(h.jsxDEV)(Z.a,{value:2,children:"\u5bf9\u516c\u8d26\u6237"},void 0,!1,{fileName:Ol,lineNumber:767,columnNumber:27},this)]},void 0,!0,{fileName:Ol,lineNumber:758,columnNumber:25},this)},void 0,!1,{fileName:Ol,lineNumber:757,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:Ol,lineNumber:771,columnNumber:25},this),Object(h.jsxDEV)(u.a,{type:"primary",onClick:e=>{this.onConfirm(e)},children:"\u786e\u5b9a"},void 0,!1,{fileName:Ol,lineNumber:778,columnNumber:25},this)]},void 0,!0,{fileName:Ol,lineNumber:770,columnNumber:23},this)]},void 0,!0,{fileName:Ol,lineNumber:748,columnNumber:21},this)]},void 0,!0,{fileName:Ol,lineNumber:746,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:Ol,lineNumber:793,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:Ol,lineNumber:795,columnNumber:23},this),Object(h.jsxDEV)("div",{className:"audit-box-title",children:"\u5ba1\u6838\u4e2d"},void 0,!1,{fileName:Ol,lineNumber:802,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:Ol,lineNumber:803,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:Ol,lineNumber:807,columnNumber:25},this),Object(h.jsxDEV)(u.a,{type:"primary",onClick:e=>{this.onReCall(e)},children:"\u786e\u5b9a"},void 0,!1,{fileName:Ol,lineNumber:814,columnNumber:25},this)]},void 0,!0,{fileName:Ol,lineNumber:806,columnNumber:23},this)]},void 0,!0,{fileName:Ol,lineNumber:794,columnNumber:21},this)]},void 0,!0,{fileName:Ol,lineNumber:792,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:Ol,lineNumber:829,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:Ol,lineNumber:831,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:Ol,lineNumber:834,columnNumber:25},this),"\u79d2"]},void 0,!0,{fileName:Ol,lineNumber:832,columnNumber:23},this)]},void 0,!0,{fileName:Ol,lineNumber:830,columnNumber:21},this)]},void 0,!0,{fileName:Ol,lineNumber:828,columnNumber:19},this):null]},void 0,!0,{fileName:Ol,lineNumber:629,columnNumber:15},this)},void 0,!1,{fileName:Ol,lineNumber:628,columnNumber:13},this)]},void 0,!0,{fileName:Ol,lineNumber:599,columnNumber:11},this)},void 0,!1,{fileName:Ol,lineNumber:578,columnNumber:7},this)}}var El="D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\pages\\plan\\add\\plan-copy.js";class Vl 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:El,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.Ob)(e).then((e=>{Object(a.Wb)(e,((e,i)=>{if(Object(a.xb)(e.info.reseller_id).then((e=>{Object(a.Wb)(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.Wb)(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.Wb)(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.Wb)(e,((e,i)=>{let l=t.info.reseller_id;Object(a.xb)(l).then((e=>{Object(a.Wb)(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.gc)(t,i).then((e=>{Object(a.Wb)(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:El,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:El,lineNumber:416,columnNumber:23},this),this.state.curstep>=e.id?Object(h.jsxDEV)(g.a,{type:"check",className:"checkIcon"},void 0,!1,{fileName:El,lineNumber:425,columnNumber:25},this):null]},i,!0,{fileName:El,lineNumber:415,columnNumber:21},this))),Object(h.jsxDEV)("div",{className:"under-line"},void 0,!1,{fileName:El,lineNumber:430,columnNumber:17},this)]},e.title,!0,{fileName:El,lineNumber:411,columnNumber:15},this)))},void 0,!1,{fileName:El,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:El,lineNumber:438,columnNumber:15},this),Object(h.jsxDEV)(d.a,{style:{width:"100%"},title:this.state.step1_pagetitle,children:Object(h.jsxDEV)(al,{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:El,lineNumber:440,columnNumber:17},this)},void 0,!1,{fileName:El,lineNumber:439,columnNumber:15},this)]},void 0,!0,{fileName:El,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:El,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:El,lineNumber:465,columnNumber:27},this):null,children:Object(h.jsxDEV)(gl,{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:El,lineNumber:477,columnNumber:23},this)},t,!1,{fileName:El,lineNumber:455,columnNumber:21},this):null))]},void 0,!0,{fileName:El,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)(_l,{ref:"step3"},void 0,!1,{fileName:El,lineNumber:508,columnNumber:19},this)},void 0,!1,{fileName:El,lineNumber:507,columnNumber:17},this)},void 0,!1,{fileName:El,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:El,lineNumber:515,columnNumber:17},this),Object(h.jsxDEV)(u.a,{type:"normal",onClick:()=>this.onReturn(),children:"\u53d6\u6d88"},void 0,!1,{fileName:El,lineNumber:518,columnNumber:17},this)]},void 0,!0,{fileName:El,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:El,lineNumber:524,columnNumber:17},this),Object(h.jsxDEV)(u.a,{type:"normal",onClick:()=>this.onReturn(),children:"\u53d6\u6d88"},void 0,!1,{fileName:El,lineNumber:527,columnNumber:17},this)]},void 0,!0,{fileName:El,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:El,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:El,lineNumber:537,columnNumber:19},this),Object(h.jsxDEV)("div",{className:"audit-box-title",children:"\u63d0\u4ea4\u5ba1\u6838"},void 0,!1,{fileName:El,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:El,lineNumber:553,columnNumber:23},this),Object(h.jsxDEV)(Z.a,{value:1,children:"\u5bf9\u79c1\u8d26\u6237"},void 0,!1,{fileName:El,lineNumber:554,columnNumber:23},this),Object(h.jsxDEV)(Z.a,{value:2,children:"\u5bf9\u516c\u8d26\u6237"},void 0,!1,{fileName:El,lineNumber:555,columnNumber:23},this)]},void 0,!0,{fileName:El,lineNumber:546,columnNumber:21},this)},void 0,!1,{fileName:El,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:El,lineNumber:559,columnNumber:21},this),Object(h.jsxDEV)(u.a,{type:"primary",onClick:e=>{this.onConfirm(e)},children:"\u786e\u5b9a"},void 0,!1,{fileName:El,lineNumber:566,columnNumber:21},this)]},void 0,!0,{fileName:El,lineNumber:558,columnNumber:19},this)]},void 0,!0,{fileName:El,lineNumber:536,columnNumber:17},this)]},void 0,!0,{fileName:El,lineNumber:534,columnNumber:15},this):null]},void 0,!0,{fileName:El,lineNumber:436,columnNumber:11},this)},void 0,!1,{fileName:El,lineNumber:435,columnNumber:9},this)]},void 0,!0,{fileName:El,lineNumber:407,columnNumber:7},this)}}var kl="D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\pages\\plan\\key\\UseKeyAddEdit.jsx";const Sl={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})?$"}]},wl=[{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 Cl=()=>{const[e,t]=Object(R.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(R.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}),l=e.reseller_id,Object(a.xb)(l).then((e=>{Object(a.Wb)(e,((e,i)=>{t({direct_reseller_id:e.direct_reseller_id}),t({reseller:e})}),(e=>{c.a.error(e)}))}))}var l;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 l=i.target.files[0];if(t({myfile:l}),t({upload_visible:!0}),l.name.indexOf(".xls")||l.name.indexOf(".xlsx")||l.name.indexOf(".csv")){if(l.size>1024e3)return void c.a.error("\u6587\u4ef6\u5927\u5c0f\u4e0d\u80fd\u5927\u4e8e2M");let i=new FormData;i.append("file",l),i.append("path","white_list_excel"),t({file_loading:!0}),Object(a.fd)(i).then((i=>{Object(a.Wb)(i,((i,l)=>{let s={excel:i.path,plan_id:e.plan_id};N({mobile_excel:i.path}),Object(a.M)(s).then((e=>{t({file_loading:!1}),Object(a.Wb)(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.hb)(e).then((e=>{Object(a.Wb)(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,l=sessionStorage.getItem("keybatch_id"),s=[];1===e.keyType?(s=e.distdata.filter((e=>!0===e.checked&&(-1===e.status||7===e.status||""===e.id||!e.id))),O()&&s.length<=0&&(i=!0)):(s=e.couponData.filter((e=>!0===e.checked&&(-1===e.status||7===e.status||""===e.id||!e.id))),O()&&s.length<=0&&(i=!0));for(let e=0;e{Object(a.Wb)(e,((e,t)=>{setTimeout((()=>{window.history.back()}),500)}),(e=>{c.a.error(e)}))})):t({audit_visible:!0})})()}},k=(t,i)=>{let l=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.Wb)(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.cc)(l,t).then((e=>{Object(a.Wb)(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)(s.a,{model:p,rules:Sl,ref:i,children:[Object(h.jsxDEV)(l.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:kl,lineNumber:1075,columnNumber:13},void 0)},void 0,!1,{fileName:kl,lineNumber:1074,columnNumber:11},void 0),Object(h.jsxDEV)(l.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:kl,lineNumber:1079,columnNumber:13},void 0)},void 0,!1,{fileName:kl,lineNumber:1078,columnNumber:11},void 0),Object(h.jsxDEV)(l.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:kl,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:kl,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:kl,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:kl,lineNumber:1116,columnNumber:15},void 0)]},void 0,!0,{fileName:kl,lineNumber:1100,columnNumber:13},void 0)},void 0,!1,{fileName:kl,lineNumber:1099,columnNumber:11},void 0),1===e.isSettlement?Object(h.jsxDEV)(l.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:kl,lineNumber:1124,columnNumber:15},void 0)},void 0,!1,{fileName:kl,lineNumber:1123,columnNumber:13},void 0):null,1===e.isSettlement?Object(h.jsxDEV)(l.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:kl,lineNumber:1149,columnNumber:15},void 0)},void 0,!1,{fileName:kl,lineNumber:1148,columnNumber:13},void 0):null,"1"===e.KeyPcType?null:Object(h.jsxDEV)(l.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:kl,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:kl,lineNumber:1192,columnNumber:19},void 0):null]},void 0,!0,{fileName:kl,lineNumber:1174,columnNumber:15},void 0)},void 0,!1,{fileName:kl,lineNumber:1173,columnNumber:13},void 0),Object(h.jsxDEV)(l.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:kl,lineNumber:1217,columnNumber:15},void 0),Object(h.jsxDEV)(Z.a,{value:"2",children:"\u56fa\u5b9a\u65f6\u95f4\u6bb5"},void 0,!1,{fileName:kl,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:kl,lineNumber:1219,columnNumber:15},void 0)]},void 0,!0,{fileName:kl,lineNumber:1207,columnNumber:13},void 0)},void 0,!1,{fileName:kl,lineNumber:1206,columnNumber:11},void 0),"2"===p.expiration_type?Object(h.jsxDEV)(l.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:[$()().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,l=$()(e).format("YYYY-MM-DD HH:mm:ss"),s=$()(i.end_time).format("HH:mm:ss");return"start"==t&&(a=s<"23:59:59"?$()(l).isBefore(i.begin_time)||$()(l).subtract(1,"days").isAfter(i.end_time):$()(l).isBefore(i.begin_time)||$()(l).isAfter(i.end_time)),"end"==t&&(a=$()(l).add(1,"days").isBefore(i.begin_time)||$()(l).isAfter(i.end_time)),a}},void 0,!1,{fileName:kl,lineNumber:1225,columnNumber:15},void 0)},void 0,!1,{fileName:kl,lineNumber:1224,columnNumber:13},void 0):null,"3"===p.expiration_type?Object(h.jsxDEV)(l.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(),l=Math.ceil(a/864e5);if(!(l>=Number(e.target.value)))return void c.a.error(`key\u7801\u6709\u6548\u671f\u4e0d\u80fd\u8d85\u8fc7\u8ba1\u5212\u6709\u6548\u671f(${l}\u5929)`);N({expiration_value:e.target.value})}}},void 0,!1,{fileName:kl,lineNumber:1246,columnNumber:15},void 0)},void 0,!1,{fileName:kl,lineNumber:1245,columnNumber:13},void 0):null,"3"===e.KeyPcType||"2"===e.KeyPcType?null:Object(h.jsxDEV)(l.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:kl,lineNumber:1284,columnNumber:15},void 0)},void 0,!1,{fileName:kl,lineNumber:1283,columnNumber:13},void 0),1===e.key_status||"3"===e.KeyPcType||"2"===e.KeyPcType?null:Object(h.jsxDEV)(l.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:kl,lineNumber:1304,columnNumber:15},void 0)},void 0,!1,{fileName:kl,lineNumber:1303,columnNumber:13},void 0),Object(h.jsxDEV)(l.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:kl,lineNumber:1320,columnNumber:15},void 0),Object(h.jsxDEV)(Z.a,{value:2,children:"\u4f18\u60e0\u5238"},void 0,!1,{fileName:kl,lineNumber:1321,columnNumber:15},void 0)]},void 0,!0,{fileName:kl,lineNumber:1319,columnNumber:13},void 0)},void 0,!1,{fileName:kl,lineNumber:1318,columnNumber:11},void 0),Object(h.jsxDEV)(l.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:kl,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:kl,lineNumber:1343,columnNumber:19},void 0)},void 0,!1,{fileName:kl,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:kl,lineNumber:1365,columnNumber:15},void 0)},void 0,!1,{fileName:kl,lineNumber:1325,columnNumber:11},void 0),Object(h.jsxDEV)(l.a,{labelname:"\u7ed1\u5b9a\u5bf9\u8c61",prop:"grid",children:Object(h.jsxDEV)(T,{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,l)=>{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,l)=>{1===e.keyType?(e.distdata[l].restrict=i.target.value,t({distdata:e.distdata})):(e.couponData[l].restrict=i.target.value,t({couponData:e.couponData}))})(i,0,l)}},void 0,!1,{fileName:kl,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)),l=null===(t=e.cash)||void 0===t?void 0:t.map((e=>e.batch_goods_name)),s=i.concat(a,l);return s=s.join(","),Object(h.jsxDEV)("span",{children:s},void 0,!1,{fileName:kl,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,l)},style:{color:"#2B66F2"},children:"\u7f16\u8f91"},void 0,!1,{fileName:kl,lineNumber:1410,columnNumber:21},void 0),s=Object(h.jsxDEV)("span",{style:{color:"#d6d6d6"},children:"\u7f16\u8f91"},void 0,!1,{fileName:kl,lineNumber:1419,columnNumber:30},void 0);return a.disabled?s:i}}},void 0,!1,{fileName:kl,lineNumber:1376,columnNumber:13},void 0)},void 0,!1,{fileName:kl,lineNumber:1375,columnNumber:11},void 0),Object(h.jsxDEV)(l.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:kl,lineNumber:1431,columnNumber:15},void 0),Object(h.jsxDEV)(ne.a,{value:0,children:"\u5426"},void 0,!1,{fileName:kl,lineNumber:1432,columnNumber:15},void 0)]},void 0,!0,{fileName:kl,lineNumber:1426,columnNumber:13},void 0)},void 0,!1,{fileName:kl,lineNumber:1425,columnNumber:11},void 0),Object(h.jsxDEV)(l.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:kl,lineNumber:1442,columnNumber:15},void 0),Object(h.jsxDEV)(ne.a,{value:0,children:"\u5426"},void 0,!1,{fileName:kl,lineNumber:1443,columnNumber:15},void 0)]},void 0,!0,{fileName:kl,lineNumber:1437,columnNumber:13},void 0)},void 0,!1,{fileName:kl,lineNumber:1436,columnNumber:11},void 0)]},void 0,!0,{fileName:kl,lineNumber:1073,columnNumber:9},void 0)},void 0,!1,{fileName:kl,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:kl,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:kl,lineNumber:831,columnNumber:16},void 0),onConfirm:()=>{window.history.back()},onCancel:()=>{},className:"questModal",parentComponent:void 0})},children:"\u53d6\u6d88"},void 0,!1,{fileName:kl,lineNumber:1452,columnNumber:9},void 0)]},void 0,!0,{fileName:kl,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:kl,lineNumber:1462,columnNumber:13},void 0),Object(h.jsxDEV)(u.a,{onClick:e=>{E()},children:"\u53d6\u6d88"},void 0,!1,{fileName:kl,lineNumber:1470,columnNumber:13},void 0)]},void 0,!0,{fileName:kl,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)(ml,{direct_reseller_id:e.direct_reseller_id,editData:e.rowExChangeData,ref:m,isSettlement:e.isSettlement,settlementData:e.settlementData},void 0,!1,{fileName:kl,lineNumber:1044,columnNumber:11},this):Object(h.jsxDEV)(pl,{propsData:e.rowExChangeData,ref:m},void 0,!1,{fileName:kl,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:kl,lineNumber:1057,columnNumber:9},this)}()},void 0,!1,{fileName:kl,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:kl,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:kl,lineNumber:1492,columnNumber:13},void 0),Object(h.jsxDEV)("div",{className:"audit-box-title",children:"\u63d0\u4ea4\u5ba1\u6838"},void 0,!1,{fileName:kl,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:kl,lineNumber:1510,columnNumber:17},void 0),Object(h.jsxDEV)(Z.a,{value:1,children:"\u5bf9\u79c1\u8d26\u6237"},void 0,!1,{fileName:kl,lineNumber:1511,columnNumber:17},void 0),Object(h.jsxDEV)(Z.a,{value:2,children:"\u5bf9\u516c\u8d26\u6237"},void 0,!1,{fileName:kl,lineNumber:1512,columnNumber:17},void 0)]},void 0,!0,{fileName:kl,lineNumber:1503,columnNumber:15},void 0)},void 0,!1,{fileName:kl,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:kl,lineNumber:1516,columnNumber:15},void 0),Object(h.jsxDEV)(u.a,{type:"primary",onClick:e=>{S()},children:"\u786e\u5b9a"},void 0,!1,{fileName:kl,lineNumber:1525,columnNumber:15},void 0)]},void 0,!0,{fileName:kl,lineNumber:1515,columnNumber:13},void 0)]},void 0,!0,{fileName:kl,lineNumber:1491,columnNumber:11},void 0)]},void 0,!0,{fileName:kl,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:kl,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:kl,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:kl,lineNumber:1546,columnNumber:15},void 0)]},void 0,!0,{fileName:kl,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:kl,lineNumber:1556,columnNumber:17},void 0),Object(h.jsxDEV)("span",{className:"step-label active",children:"\u4e0a\u4f20\u6587\u4ef6"},void 0,!1,{fileName:kl,lineNumber:1557,columnNumber:17},void 0)]},void 0,!0,{fileName:kl,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:kl,lineNumber:1560,columnNumber:17},void 0)},void 0,!1,{fileName:kl,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:kl,lineNumber:1563,columnNumber:17},void 0),Object(h.jsxDEV)("span",{className:"step-label",children:"\u5bfc\u5165\u5b8c\u6210"},void 0,!1,{fileName:kl,lineNumber:1564,columnNumber:17},void 0)]},void 0,!0,{fileName:kl,lineNumber:1562,columnNumber:15},void 0)]},void 0,!0,{fileName:kl,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:kl,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:kl,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:kl,lineNumber:1573,columnNumber:17},void 0)]},void 0,!0,{fileName:kl,lineNumber:1571,columnNumber:15},void 0)]},void 0,!0,{fileName:kl,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:kl,lineNumber:1583,columnNumber:21},void 0),Object(h.jsxDEV)("span",{className:"excel-txt",children:e.myfile.name},void 0,!1,{fileName:kl,lineNumber:1584,columnNumber:21},void 0)]},void 0,!0,{fileName:kl,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:kl,lineNumber:1589,columnNumber:23},void 0),Object(h.jsxDEV)("span",{className:"excel-txt",children:"\u89e3\u6790\u4e2d "},void 0,!1,{fileName:kl,lineNumber:1590,columnNumber:23},void 0)]},void 0,!0,{fileName:kl,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:kl,lineNumber:1594,columnNumber:23},void 0),Object(h.jsxDEV)(g.a,{type:"up-circle-o",className:"upload-flag"},void 0,!1,{fileName:kl,lineNumber:1595,columnNumber:23},void 0),Object(h.jsxDEV)("span",{className:"excel-txt",children:"\u66f4\u65b0\u6587\u4ef6 "},void 0,!1,{fileName:kl,lineNumber:1596,columnNumber:23},void 0)]},void 0,!0,{fileName:kl,lineNumber:1593,columnNumber:21},void 0)]},void 0,!0,{fileName:kl,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:kl,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:kl,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:kl,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:kl,lineNumber:1607,columnNumber:19},void 0):null]},void 0,!0,{fileName:kl,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:kl,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:kl,lineNumber:1616,columnNumber:17},void 0)," "]},void 0,!0,{fileName:kl,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:kl,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:kl,lineNumber:1633,columnNumber:17},void 0)},void 0,!1,{fileName:kl,lineNumber:1632,columnNumber:15},void 0)]},void 0,!0,{fileName:kl,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:kl,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:kl,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:kl,lineNumber:1655,columnNumber:17},void 0)]},void 0,!0,{fileName:kl,lineNumber:1646,columnNumber:15},void 0)},void 0,!1,{fileName:kl,lineNumber:1645,columnNumber:13},void 0)]},void 0,!0,{fileName:kl,lineNumber:1542,columnNumber:11},void 0)]},void 0,!0,{fileName:kl,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:kl,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:kl,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:kl,lineNumber:1680,columnNumber:15},void 0)]},void 0,!0,{fileName:kl,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:kl,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:kl,lineNumber:1692,columnNumber:13},void 0),Object(h.jsxDEV)("div",{},void 0,!1,{fileName:kl,lineNumber:1694,columnNumber:13},void 0),Object(h.jsxDEV)("div",{className:"gridpanel",children:Object(h.jsxDEV)(T,{headBackgroud:"#f9fafc",isShowPageBar:!1,spliteColor:"#fff",tableData:e.exceldata,value:e.exceldata,Column:wl,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:kl,lineNumber:1717,columnNumber:25},void 0)}return Object(h.jsxDEV)("div",{className:"isImport",children:"-"},void 0,!1,{fileName:kl,lineNumber:1725,columnNumber:30},void 0)}}},void 0,!1,{fileName:kl,lineNumber:1697,columnNumber:15},void 0)},void 0,!1,{fileName:kl,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:kl,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:kl,lineNumber:1741,columnNumber:17},void 0)]},void 0,!0,{fileName:kl,lineNumber:1732,columnNumber:15},void 0)},void 0,!1,{fileName:kl,lineNumber:1731,columnNumber:13},void 0)]},void 0,!0,{fileName:kl,lineNumber:1677,columnNumber:11},void 0)]},void 0,!0,{fileName:kl,lineNumber:1675,columnNumber:9},void 0):null]},void 0,!0,{fileName:kl,lineNumber:1071,columnNumber:5},void 0)},Il=(i(252),"D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\pages\\plan\\key\\detail\\list.js");class Tl 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(Ft.a)(e,(e=>Object(Ht.a)(e)||Object(Mt.a)(e))),i=sessionStorage.getItem("key_batch_id");Object(a.Sb)(i,t).then((e=>{Object(a.Wb)(e,((e,t)=>{this.setState({dataCount:e.total,distdata:e.data})}),(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,l=0,s=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),l+=Number(e.usage_total),s+=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.bc)(t).then((e=>{Object(a.Wb)(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 l=this;if(1==t){let e={key:i.key};Object(a.dc)(e).then((e=>{Object(a.Wb)(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{zt(e).then((e=>{2===e?l.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:Il,lineNumber:289,columnNumber:30},this),"\uff1f"]},void 0,!0,{fileName:Il,lineNumber:288,columnNumber:17},this),onConfirm:()=>{l.keyCancelFun(i)},onCancel:this.onCancel,className:"questModal",parentComponent:this})}))}catch(s){}}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.Yb)(e).then((e=>{Object(a.Wb)(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.ac)(e).then((e=>{Object(a.Wb)(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)(Lt,{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:Il,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:Il,lineNumber:486,columnNumber:15},this)]},void 0,!0,{fileName:Il,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:Il,lineNumber:497,columnNumber:13},this)]},void 0,!0,{fileName:Il,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:Il,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:Il,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:Il,lineNumber:519,columnNumber:15},this):null,Object(h.jsxDEV)(T,{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:Il,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:Il,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:Il,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:Bt.keyStatusBg(parseInt(t.status))}},void 0,!1,{fileName:Il,lineNumber:591,columnNumber:25},this),t.status_text]},void 0,!0,{fileName:Il,lineNumber:590,columnNumber:23},this)},void 0,!1,{fileName:Il,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:Il,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:Il,lineNumber:615,columnNumber:34},this)," "]},void 0,!0,{fileName:Il,lineNumber:613,columnNumber:29},this)},void 0,!1,{fileName:Il,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:Il,lineNumber:620,columnNumber:31},this),Object(h.jsxDEV)(D.a,{children:"\u4f5c\u5e9f"},"2",!1,{fileName:Il,lineNumber:621,columnNumber:31},this),Object(h.jsxDEV)(D.a,{disabled:!0,children:"\u65e5\u5fd7"},"3",!1,{fileName:Il,lineNumber:622,columnNumber:31},this)]},void 0,!0,{fileName:Il,lineNumber:619,columnNumber:29},this)},void 0,!1,{fileName:Il,lineNumber:618,columnNumber:27},this)]},void 0,!0,{fileName:Il,lineNumber:611,columnNumber:25},this)]},void 0,!0,{fileName:Il,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:Il,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:Il,lineNumber:640,columnNumber:34},this)," "]},void 0,!0,{fileName:Il,lineNumber:638,columnNumber:29},this)},void 0,!1,{fileName:Il,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:Il,lineNumber:645,columnNumber:31},this),Object(h.jsxDEV)(D.a,{disabled:2!=t.status,children:"\u4f5c\u5e9f"},"2",!1,{fileName:Il,lineNumber:648,columnNumber:31},this),Object(h.jsxDEV)(D.a,{disabled:!0,children:"\u65e5\u5fd7"},"3",!1,{fileName:Il,lineNumber:651,columnNumber:31},this)]},void 0,!0,{fileName:Il,lineNumber:644,columnNumber:29},this)},void 0,!1,{fileName:Il,lineNumber:643,columnNumber:27},this)]},void 0,!0,{fileName:Il,lineNumber:636,columnNumber:25},this)]},void 0,!0,{fileName:Il,lineNumber:632,columnNumber:23},this),e}}},void 0,!1,{fileName:Il,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:Il,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:Il,lineNumber:669,columnNumber:19},this),Object(h.jsxDEV)("div",{className:"audit-box-title",children:"\u53d1\u9001"},void 0,!1,{fileName:Il,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:Il,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:Il,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:Il,lineNumber:690,columnNumber:29},this)))},void 0,!1,{fileName:Il,lineNumber:681,columnNumber:23},this)},void 0,!1,{fileName:Il,lineNumber:680,columnNumber:21},this)]},void 0,!0,{fileName:Il,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:Il,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:Il,lineNumber:717,columnNumber:29},this)))},void 0,!1,{fileName:Il,lineNumber:708,columnNumber:23},this)},void 0,!1,{fileName:Il,lineNumber:707,columnNumber:21},this)]},void 0,!0,{fileName:Il,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:Il,lineNumber:733,columnNumber:21},this)},void 0,!1,{fileName:Il,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:Il,lineNumber:740,columnNumber:21},this)},void 0,!1,{fileName:Il,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:Il,lineNumber:748,columnNumber:21},this),Object(h.jsxDEV)(u.a,{type:"primary",onClick:e=>{this.send(e)},children:"\u53d1\u9001"},void 0,!1,{fileName:Il,lineNumber:755,columnNumber:21},this)]},void 0,!0,{fileName:Il,lineNumber:747,columnNumber:19},this)]},void 0,!0,{fileName:Il,lineNumber:668,columnNumber:17},this)]},void 0,!0,{fileName:Il,lineNumber:666,columnNumber:15},this):null]},void 0,!0,{fileName:Il,lineNumber:517,columnNumber:11},this)]},void 0,!0,{fileName:Il,lineNumber:475,columnNumber:9},this)},void 0,!1,{fileName:Il,lineNumber:474,columnNumber:7},this)}}i(253);var Ll="D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\pages\\plan\\key\\detail\\log.js";const Fl=[{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 Hl 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.jb)(i).then((e=>{Object(a.Wb)(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)(Lt,{tabs:this.state.tabList,tabChange:this.tabFn,children:0==this.state.tabactive?Object(h.jsxDEV)("div",{className:"main-body",children:Object(h.jsxDEV)(T,{spliteColor:"#fff",tableData:this.state.keyDetailLog_data,Column:Fl,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:$.a.unix(t.time).format("YYYY-MM-DD HH:mm:ss")},void 0,!1,{fileName:Ll,lineNumber:126,columnNumber:28},this):"opearo"==e?Object(h.jsxDEV)("div",{children:t.data?Object(h.jsxDEV)(Aa.a,{collapsed:!0,name:!1,src:t.data,displayDataTypes:!1},void 0,!1,{fileName:Ll,lineNumber:132,columnNumber:27},this):Object(h.jsxDEV)("span",{children:"-"},void 0,!1,{fileName:Ll,lineNumber:139,columnNumber:27},this)},void 0,!1,{fileName:Ll,lineNumber:130,columnNumber:23},this):void 0},void 0,!1,{fileName:Ll,lineNumber:108,columnNumber:15},this)},void 0,!1,{fileName:Ll,lineNumber:107,columnNumber:13},this):null},void 0,!1,{fileName:Ll,lineNumber:105,columnNumber:9},this)},void 0,!1,{fileName:Ll,lineNumber:104,columnNumber:7},this)}}var Ml=i(378),ql=i.n(Ml),Pl=(i(254),"D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\pages\\plan\\key\\list.js");const Wl=[{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 Bl 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"))],l={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(l.phone)?(this.state.isBulkSend&&(i=this.state.gridSelection.map((e=>e.id))),Object(a.i)({ids:i,...l}).then((e=>{Object(a.Wb)(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:l,activepage:s}=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]),s&&(n.status=s),l&&(n.key_word=l),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.ib)(n).then((e=>{Object(a.Wb)(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:Pl,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:Pl,lineNumber:489,columnNumber:14},this),4==t.status?"\u6682\u505c":"\u5f00\u542f","\uff1f"]},void 0,!0,{fileName:Pl,lineNumber:488,columnNumber:9},this),onConfirm:()=>{this.changeState(e,t)},onCancel:this.onCancel,className:"questModal",parentComponent:this})}changeState(e,t){let i=this,l={operation:e?4:5};Object(a.cd)(t.id,l).then((l=>{Object(a.Wb)(l,((a,l)=>{let s=Object(oi.a)(this.state.distdata,(e=>e.id==t.id));this.state.distdata[s].status=e,this.setState({distdata:this.state.distdata}),c.a.success(l);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.xb)(e).then((e=>{Object(a.Wb)(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.Zb)({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.Wb)(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{zt(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:Pl,lineNumber:665,columnNumber:30},this),"\uff1f"]},void 0,!0,{fileName:Pl,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:Pl,lineNumber:765,columnNumber:16},this),onConfirm:()=>{Object(a.F)(e.id).then((e=>{Object(a.Wb)(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:Pl,lineNumber:796,columnNumber:16},this),onConfirm:()=>{Object(a.ed)(i).then((e=>{Object(a.Wb)(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:Pl,lineNumber:832,columnNumber:13},this):Object(h.jsxDEV)("span",{className:"grid-link disabled",children:"\u7f16\u8f91"},void 0,!1,{fileName:Pl,lineNumber:842,columnNumber:18},this);case 2:if([4,5,7].includes(t.status)){if(7===t.status){if(ql()(t.end_time).valueOf()<=ql()().valueOf())return Object(h.jsxDEV)("span",{className:"grid-link disabled",children:"\u590d\u5236"},void 0,!1,{fileName:Pl,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:Pl,lineNumber:856,columnNumber:13},this)}return Object(h.jsxDEV)("span",{className:"grid-link disabled",children:"\u590d\u5236"},void 0,!1,{fileName:Pl,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:Pl,lineNumber:871,columnNumber:13},this):Object(h.jsxDEV)("span",{className:"grid-link disabled",children:"\u64a4\u9500\u5ba1\u6279"},void 0,!1,{fileName:Pl,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:Pl,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:Pl,lineNumber:901,columnNumber:22},this)]},void 0,!0,{fileName:Pl,lineNumber:900,columnNumber:17},this)},void 0,!1,{fileName:Pl,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:Pl,lineNumber:906,columnNumber:19},this),Object(h.jsxDEV)(D.a,{children:"\u8bbe\u7f6e\u56de\u8c03"},"6",!1,{fileName:Pl,lineNumber:907,columnNumber:19},this),Object(h.jsxDEV)(D.a,{disabled:!0,children:"\u65e5\u5fd7"},"2",!1,{fileName:Pl,lineNumber:908,columnNumber:19},this),Object(h.jsxDEV)(D.a,{children:"\u4f5c\u5e9f"},"5",!1,{fileName:Pl,lineNumber:911,columnNumber:19},this)]},void 0,!0,{fileName:Pl,lineNumber:905,columnNumber:17},this)},void 0,!1,{fileName:Pl,lineNumber:904,columnNumber:15},this)]},void 0,!0,{fileName:Pl,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:Pl,lineNumber:919,columnNumber:15},this):Object(h.jsxDEV)("span",{className:"grid-link disabled",children:"\u66f4\u591a"},void 0,!1,{fileName:Pl,lineNumber:930,columnNumber:18},this);default:return}}dingTask(e){Object(a.G)(e).then((e=>{Object(a.Wb)(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:Pl,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:Pl,lineNumber:960,columnNumber:15},this),Object(h.jsxDEV)("span",{children:e.invalid_total},void 0,!1,{fileName:Pl,lineNumber:961,columnNumber:15},this)]},void 0,!0,{fileName:Pl,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:Pl,lineNumber:964,columnNumber:15},this),Object(h.jsxDEV)("span",{children:e.usage_total},void 0,!1,{fileName:Pl,lineNumber:965,columnNumber:15},this)]},void 0,!0,{fileName:Pl,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:Pl,lineNumber:972,columnNumber:15},this),Object(h.jsxDEV)("span",{children:e.overdue_total},void 0,!1,{fileName:Pl,lineNumber:973,columnNumber:15},this)]},void 0,!0,{fileName:Pl,lineNumber:971,columnNumber:13},this)]},void 0,!0,{fileName:Pl,lineNumber:958,columnNumber:11},this)]},void 0,!0,{fileName:Pl,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)(Lt,{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:Pl,lineNumber:991,columnNumber:17},this),Object(h.jsxDEV)(u.a,{type:"primary",onClick:()=>this.bulkExport(),children:"\u6279\u91cf\u5bfc\u51fa"},void 0,!1,{fileName:Pl,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:Pl,lineNumber:1002,columnNumber:17},this)]},void 0,!0,{fileName:Pl,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:Pl,lineNumber:1010,columnNumber:15},this)]},void 0,!0,{fileName:Pl,lineNumber:989,columnNumber:13},this),Object(h.jsxDEV)("div",{className:"code-table",children:Object(h.jsxDEV)(T,{countChange:e=>{this.countChange(e)},spliteColor:"#fff",tableData:this.state.distdata,Column:Wl,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:Pl,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:Pl,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:Pl,lineNumber:1064,columnNumber:25},this)},void 0,!1,{fileName:Pl,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:Pl,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:Bt.keysStatusBg(i.status)}},void 0,!1,{fileName:Pl,lineNumber:1085,columnNumber:27},this),i.status_text]},void 0,!0,{fileName:Pl,lineNumber:1084,columnNumber:25},this)},void 0,!1,{fileName:Pl,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:Pl,lineNumber:1103,columnNumber:27},this):Object(h.jsxDEV)("span",{className:"grid-link disabled",children:"\u9489\u9489\u5ba1\u6279\u67e5\u8be2"},void 0,!1,{fileName:Pl,lineNumber:1112,columnNumber:27},this),this.opearoEl(4,i)]},void 0,!0,{fileName:Pl,lineNumber:1098,columnNumber:23},this):void 0}},void 0,!1,{fileName:Pl,lineNumber:1026,columnNumber:15},this)},void 0,!1,{fileName:Pl,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:Pl,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:Pl,lineNumber:1126,columnNumber:19},this),Object(h.jsxDEV)("div",{className:"audit-box-title",children:"\u53d1\u9001"},void 0,!1,{fileName:Pl,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:Pl,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:Pl,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:Pl,lineNumber:1147,columnNumber:29},this)))},void 0,!1,{fileName:Pl,lineNumber:1138,columnNumber:23},this)},void 0,!1,{fileName:Pl,lineNumber:1137,columnNumber:21},this)]},void 0,!0,{fileName:Pl,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:Pl,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:Pl,lineNumber:1175,columnNumber:29},this)))},void 0,!1,{fileName:Pl,lineNumber:1166,columnNumber:23},this)},void 0,!1,{fileName:Pl,lineNumber:1165,columnNumber:21},this)]},void 0,!0,{fileName:Pl,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:Pl,lineNumber:1192,columnNumber:21},this)},void 0,!1,{fileName:Pl,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:Pl,lineNumber:1199,columnNumber:21},this)},void 0,!1,{fileName:Pl,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:Pl,lineNumber:1207,columnNumber:21},this),Object(h.jsxDEV)(u.a,{type:"primary",onClick:e=>{this.send(e)},children:"\u53d1\u9001"},void 0,!1,{fileName:Pl,lineNumber:1214,columnNumber:21},this)]},void 0,!0,{fileName:Pl,lineNumber:1206,columnNumber:19},this)]},void 0,!0,{fileName:Pl,lineNumber:1125,columnNumber:17},this)]},void 0,!0,{fileName:Pl,lineNumber:1123,columnNumber:15},this):null]},void 0,!0,{fileName:Pl,lineNumber:988,columnNumber:11},this)},void 0,!1,{fileName:Pl,lineNumber:982,columnNumber:9},this)},void 0,!1,{fileName:Pl,lineNumber:981,columnNumber:7},this)}}var Al=i(484),Jl=(i(255),"D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\components\\UseUploadExcel\\index.jsx");const zl=[{title:"\u884c\u53f7",name:"id"},{title:"key",name:"key"},{title:"\u9519\u8bef\u539f\u56e0",name:"msg"}];var Rl=e=>{const{title:t="\u63d0\u793a",onClose:i,onImport:l,visible:s=!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),[I,T]=Object(r.useState)([]),L=Object(r.useRef)(null),[F,H]=Object(r.useState)(!1);Object(r.useEffect)((()=>{try{let e=L.current;e&&e.click()}catch(e){}}),[L,F]);const M=e=>{let t="";for(let i in e)t+=e[i]+" ";return t},q=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:M(e.msg)}))),T(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),q(t)},W=()=>{""!==f&&(B(),l(f))},B=()=>{N(2),D(!1),V(!1),y(!0),i()},A=()=>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:Jl,lineNumber:264,columnNumber:13},void 0),d]},void 0,!0,{fileName:Jl,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:Jl,lineNumber:268,columnNumber:13},void 0),Object(h.jsxDEV)(g.a,{type:"up-circle-o"},void 0,!1,{fileName:Jl,lineNumber:275,columnNumber:13},void 0),Object(h.jsxDEV)("span",{children:"\u66f4\u65b0\u6587\u4ef6"},void 0,!1,{fileName:Jl,lineNumber:276,columnNumber:13},void 0)]},void 0,!0,{fileName:Jl,lineNumber:267,columnNumber:11},void 0)]},void 0,!0,{fileName:Jl,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:Jl,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:Jl,lineNumber:250,columnNumber:9},void 0)]},void 0,!0,{fileName:Jl,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:Jl,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:Jl,lineNumber:242,columnNumber:9},void 0)]},void 0,!0,{fileName:Jl,lineNumber:240,columnNumber:7},void 0);default:return}})()]},void 0,!0,{fileName:Jl,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:Jl,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:Jl,lineNumber:305,columnNumber:13},void 0)]},void 0,!0,{fileName:Jl,lineNumber:303,columnNumber:11},void 0)},void 0,!1,{fileName:Jl,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:Jl,lineNumber:308,columnNumber:9},void 0),Object(h.jsxDEV)("div",{className:"btn-group",children:[Object(h.jsxDEV)(u.a,{type:"default",onClick:()=>B(),children:"\u53d6\u6d88"},void 0,!1,{fileName:Jl,lineNumber:313,columnNumber:11},void 0),Object(h.jsxDEV)(u.a,{type:"primary",disabled:x,onClick:e=>{W()},style:{background:"#1890ff",color:"#FFFFFF",border:"none"},children:"\u786e\u5b9a\u5bfc\u5165"},void 0,!1,{fileName:Jl,lineNumber:316,columnNumber:11},void 0)]},void 0,!0,{fileName:Jl,lineNumber:312,columnNumber:9},void 0)]},void 0,!0,{fileName:Jl,lineNumber:300,columnNumber:7},void 0);return Object(h.jsxDEV)("div",{children:s?Object(h.jsxDEV)("div",{children:[Object(h.jsxDEV)("div",{className:"modal"},void 0,!1,{fileName:Jl,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:Jl,lineNumber:401,columnNumber:17},void 0),Object(h.jsxDEV)(g.a,{type:"close",className:"import-close",onClick:()=>B()},void 0,!1,{fileName:Jl,lineNumber:402,columnNumber:17},void 0)]},void 0,!0,{fileName:Jl,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:Jl,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:Jl,lineNumber:358,columnNumber:9},void 0),Object(h.jsxDEV)("div",{className:"gridpanel1",children:Object(h.jsxDEV)(Al.a,{columns:zl,datasets:I,scroll:{y:250},size:"large"},void 0,!1,{fileName:Jl,lineNumber:361,columnNumber:11},void 0)},void 0,!1,{fileName:Jl,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(!F)},children:"\u91cd\u65b0\u4e0a\u4f20"},void 0,!1,{fileName:Jl,lineNumber:366,columnNumber:13},void 0),Object(h.jsxDEV)(u.a,{type:"primary",onClick:e=>{W()},style:{background:"#1890ff",color:"#FFFFFF",border:"none"},children:"\u786e\u5b9a\u5bfc\u5165"},void 0,!1,{fileName:Jl,lineNumber:374,columnNumber:13},void 0)]},void 0,!0,{fileName:Jl,lineNumber:365,columnNumber:11},void 0)},void 0,!1,{fileName:Jl,lineNumber:364,columnNumber:9},void 0)]},void 0,!0,{fileName:Jl,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:Jl,lineNumber:181,columnNumber:13},void 0),Object(h.jsxDEV)("span",{className:"step-label active",children:"\u4e0a\u4f20\u6587\u4ef6"},void 0,!1,{fileName:Jl,lineNumber:182,columnNumber:13},void 0)]},void 0,!0,{fileName:Jl,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:Jl,lineNumber:185,columnNumber:13},void 0)},void 0,!1,{fileName:Jl,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:Jl,lineNumber:188,columnNumber:13},void 0),Object(h.jsxDEV)("span",{className:"step-label",children:"\u5bfc\u5165\u5b8c\u6210"},void 0,!1,{fileName:Jl,lineNumber:189,columnNumber:13},void 0)]},void 0,!0,{fileName:Jl,lineNumber:187,columnNumber:11},void 0)]},void 0,!0,{fileName:Jl,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:Jl,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:Jl,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:Jl,lineNumber:197,columnNumber:13},void 0)]},void 0,!0,{fileName:Jl,lineNumber:195,columnNumber:11},void 0)]},void 0,!0,{fileName:Jl,lineNumber:193,columnNumber:9},void 0)]},void 0,!0,{fileName:Jl,lineNumber:178,columnNumber:7},void 0),E?A():Object(h.jsxDEV)("div",{className:"upload-excel-01",children:[Object(h.jsxDEV)("input",{ref:L,type:"file",accept:".xls,.xlsx,.csv",className:"upload-input",onClick:e=>e.target.value="",onChange:e=>P(e)},void 0,!1,{fileName:Jl,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:Jl,lineNumber:221,columnNumber:9},void 0)]},void 0,!0,{fileName:Jl,lineNumber:212,columnNumber:7},void 0),J()]},void 0,!0,{fileName:Jl,lineNumber:340,columnNumber:7},void 0)]},void 0,!0,{fileName:Jl,lineNumber:399,columnNumber:13},void 0)},void 0,!1,{fileName:Jl,lineNumber:398,columnNumber:11},void 0)]},void 0,!0,{fileName:Jl,lineNumber:396,columnNumber:9},void 0):null},void 0,!1,{fileName:Jl,lineNumber:394,columnNumber:5},void 0)},Kl=(i(257),"D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\components\\keysFind\\index.jsx");const Yl=[{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 $l=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)(U.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:Kl,lineNumber:86,columnNumber:32},this)},void 0,!1,{fileName:Kl,lineNumber:85,columnNumber:7},this)}function x(e){var t,i,a,l;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===(l=e.key_batch_id)||void 0===l?void 0:l.id)||null}}return Object(r.useEffect)((()=>{let e=x(m);t(e)}),[m]),Object(r.useEffect)((()=>{Object(a.wb)().then((e=>Object(a.Wb)(e,((e,t)=>{const i=e.map((e=>({key:e.id,text:e.name})));p(i)}),(e=>{})))),Object(a.tb)().then((e=>Object(a.Wb)(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)(s.a,{children:[Object(h.jsxDEV)(l.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:Kl,lineNumber:132,columnNumber:11},void 0)},void 0,!1,{fileName:Kl,lineNumber:131,columnNumber:9},void 0),Object(h.jsxDEV)(l.a,{labelname:"\u72b6\u6001\uff1a",required:"",labelwidth:"50px",children:Object(h.jsxDEV)(X.a,{name:"state",value:m.state,options:Yl,placeholder:"\u8bf7\u9009\u62e9",width:204,clearable:!0,onChange:e=>d({...m,state:e})},void 0,!1,{fileName:Kl,lineNumber:141,columnNumber:11},void 0)},void 0,!1,{fileName:Kl,lineNumber:140,columnNumber:9},void 0),Object(h.jsxDEV)(l.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:Kl,lineNumber:152,columnNumber:11},void 0)},void 0,!1,{fileName:Kl,lineNumber:151,columnNumber:9},void 0),Object(h.jsxDEV)(l.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.Qc)({plan_id:t}).then((e=>{Object(a.Wb)(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:Kl,lineNumber:163,columnNumber:11},void 0)},void 0,!1,{fileName:Kl,lineNumber:162,columnNumber:9},void 0),Object(h.jsxDEV)(l.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)(U.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:Kl,lineNumber:94,columnNumber:32},this)},void 0,!1,{fileName:Kl,lineNumber:93,columnNumber:7},this)},width:204,clearable:!0,onChange:e=>{d({...m,key_batch_id:e})}},void 0,!1,{fileName:Kl,lineNumber:182,columnNumber:11},void 0)},void 0,!1,{fileName:Kl,lineNumber:181,columnNumber:9},void 0),Object(h.jsxDEV)(l.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:Kl,lineNumber:195,columnNumber:11},void 0)},void 0,!1,{fileName:Kl,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:Kl,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:Kl,lineNumber:223,columnNumber:11},void 0)]},void 0,!0,{fileName:Kl,lineNumber:206,columnNumber:9},void 0)]},void 0,!0,{fileName:Kl,lineNumber:130,columnNumber:7},void 0)},void 0,!1,{fileName:Kl,lineNumber:129,columnNumber:5},void 0)})),Ul=(i(258),"D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\pages\\plan\\keyList\\index.jsx");const Gl=[{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 Ql=()=>{const e=Object(r.useRef)(null),t=Object(r.useRef)(null),[i,l]=Object(R.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}),s=()=>{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(Ft.a)({...e},(e=>Object(Ht.a)(e)||Object(Mt.a)(e))),e};Object(pt.a)((()=>{(()=>{const e=s();l({loading:!0}),Object(a.kb)(e).then((e=>{Object(a.Wb)(e,((e,t)=>{l({loading:!1}),e.total>0?l({lodgingTable:!1}):l({lodgingTable:!0}),l({dataCount:e.total,tableData:e.data})}),(e=>{c.a.error(e),l({loading:!1})}))}))})()}),[i.isQuery]);const n=()=>{t.current.allChecked(!1),l({selectTable:[]})},o=e=>{let t={keys:e};try{Object(a.Yb)(t).then((e=>{Object(a.Wb)(e,((e,t)=>{c.a.success("\u6279\u91cf\u4f5c\u5e9f\u6210\u529f"),n(),l({multipleDisabledBtn:!0,isQuery:!i.isQuery})}))}))}catch(s){}},m=e=>{let t={key:e.key};Object(a.bc)(t).then((e=>{Object(a.Wb)(e,((e,t)=>{l({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((s=>{Object(a.Wb)(s,((a,s)=>{c.a.success("\u6279\u91cf\u4e0a\u4f20\u6807\u8bb0\u4e3a\u4f5c\u5e9f"),e.current.clearData(),l({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)(Lt,{tabs:i.tabList,style:{paddingBottom:0},children:[Object(h.jsxDEV)("div",{className:"distable dflexj",style:{paddingBottom:0},children:Object(h.jsxDEV)($l,{ref:e,query:e=>(e=>{let t=Object(Ft.a)({...e},(e=>Object(Ht.a)(e)||Object(Mt.a)(e)));l({query:t})})(e),onQuery:e=>{l({page:1,limit:10,hash:"",isQuery:!i.isQuery})},resetChange:()=>{l({page:1,limit:10,hash:"",tableData:[],lodgingTable:!1,dataCount:0})}},void 0,!1,{fileName:Ul,lineNumber:637,columnNumber:11},void 0)},void 0,!1,{fileName:Ul,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:()=>{l({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:Ul,lineNumber:647,columnNumber:13},void 0),Object(h.jsxDEV)(u.a,{style:{border:"1px solid red",color:"red"},onClick:()=>{l({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:Ul,lineNumber:648,columnNumber:13},void 0),Object(h.jsxDEV)(u.a,{style:{border:"1px solid red",color:"red"},onClick:()=>{l({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:Ul,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{zt(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:Ul,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:Ul,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.ac)(e).then((e=>{Object(a.Wb)(e,((e,t)=>{c.a.success("\u6279\u91cf\u6807\u8bb0\u4e3a\u4f7f\u7528\u6210\u529f"),n(),l({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:Ul,lineNumber:664,columnNumber:13},void 0),Object(h.jsxDEV)(u.a,{onClick:()=>(()=>{let e=!1,t=s();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.K)(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:Ul,lineNumber:667,columnNumber:13},void 0)]},void 0,!0,{fileName:Ul,lineNumber:645,columnNumber:11},void 0)},void 0,!1,{fileName:Ul,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:Ul,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:Ul,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:Ul,lineNumber:674,columnNumber:13},void 0):null,Object(h.jsxDEV)(vt.a,{loading:i.loading,icon:"circle",children:Object(h.jsxDEV)(T,{spliteColor:"#fff",tableData:i.tableData,Column:Gl,countbarVisible:!1,maxheight:i.tableHeight,isSwitch:!1,page:i.page,ref:t,dataCount:i.dataCount,pageChange:e=>(e=>{l({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=>{l({limit:e,isQuery:!i.isQuery})})(e),checkChange:e=>(e=>{e.length>0?l({multipleDisabledBtn:!1}):l({multipleDisabledBtn:!0}),l({selectTable:e});let t=0,i=0,a=0,s=0,n=0;e.forEach((e=>{t+=Number(e.total),i+=Number(e.residue),a+=Number(e.usage),n+=Number(e.overdue),s+=Number(e.invalid)})),l({grantTotal:t,usageTotal:a,invalidTotal:s,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:Ul,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:Bt.keyStatusBg(parseInt(t.status))}},void 0,!1,{fileName:Ul,lineNumber:723,columnNumber:25},void 0),t.status_text]},void 0,!0,{fileName:Ul,lineNumber:722,columnNumber:23},void 0)},void 0,!1,{fileName:Ul,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:Ul,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:Ul,lineNumber:743,columnNumber:32},void 0)]},void 0,!0,{fileName:Ul,lineNumber:742,columnNumber:27},void 0)},void 0,!1,{fileName:Ul,lineNumber:741,columnNumber:25},void 0),Object(h.jsxDEV)(y.c,{children:Object(h.jsxDEV)(O.a,{onClick:(e,s)=>((e,t,s)=>{if(1===Number(t)){let e={key:s.key};Object(a.dc)(e).then((e=>{Object(a.Wb)(e,((e,t)=>{l({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:s.key};try{zt(e).then((e=>{2===e?m(s):1===e&&G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:Object(h.jsxDEV)("p",{children:["\u786e\u5b9a\u4f5c\u5e9f",s.title,"\uff1f"]},void 0,!0,{fileName:Ul,lineNumber:496,columnNumber:24},void 0),onConfirm(){m(s)},onCancel(){},className:"questModal",parentComponent:void 0})}))}catch(n){}}3===Number(t)&&(sessionStorage.setItem("keyCode",s.key),window.open("#/home/key-log"))})(0,s,t),children:[Object(h.jsxDEV)(D.a,{disabled:1!==t.status,children:"\u6807\u8bb0\u6210\u5df2\u4f7f\u7528"},"1",!1,{fileName:Ul,lineNumber:748,columnNumber:29},void 0),Object(h.jsxDEV)(D.a,{disabled:4===t.status||3===t.status,children:"\u4f5c\u5e9f"},"2",!1,{fileName:Ul,lineNumber:751,columnNumber:29},void 0),Object(h.jsxDEV)(D.a,{children:"\u65e5\u5fd7"},"3",!1,{fileName:Ul,lineNumber:757,columnNumber:29},void 0)]},void 0,!0,{fileName:Ul,lineNumber:747,columnNumber:27},void 0)},void 0,!1,{fileName:Ul,lineNumber:746,columnNumber:25},void 0)]},void 0,!0,{fileName:Ul,lineNumber:740,columnNumber:23},void 0)]},void 0,!0,{fileName:Ul,lineNumber:736,columnNumber:21},void 0):void 0},void 0,!1,{fileName:Ul,lineNumber:693,columnNumber:13},void 0)},void 0,!1,{fileName:Ul,lineNumber:692,columnNumber:11},void 0)]},void 0,!0,{fileName:Ul,lineNumber:672,columnNumber:9},void 0)]},void 0,!0,{fileName:Ul,lineNumber:635,columnNumber:7},void 0),Object(h.jsxDEV)(Rl,{title:i.dialogTitle,visible:i.bachVisible,url:i.bachUrl,onClose:()=>{l({bachVisible:!1})},onImport:t=>(t=>{1!==i.bachApiType?2!==i.bachApiType?3!==i.bachApiType||Object(a.j)({hash:t}).then((s=>{Object(a.Wb)(s,((a,s)=>{c.a.success("\u6279\u91cf\u4e0a\u4f20\u6807\u8bb0\u4e3a\u4f7f\u7528"),e.current.clearData(),l({page:1,limit:10,hash:t,isQuery:!i.isQuery})}),(e=>{c.a.error(e)}))})):zt({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:Ul,lineNumber:596,columnNumber:22},void 0),onConfirm(){d(t)},onCancel(){},className:"questModal",parentComponent:void 0})})):l({page:1,hash:t,isQuery:!i.isQuery})})(t)},void 0,!1,{fileName:Ul,lineNumber:771,columnNumber:7},void 0)]},void 0,!0,{fileName:Ul,lineNumber:634,columnNumber:5},void 0)},Zl=(i(259),"D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\pages\\plan\\list\\list.js"),Xl=i(155);const es=[{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"}],ts=[{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 is 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,l={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(l.phone)?Object(a.gc)(i,l).then((e=>{Object(a.Wb)(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.ub)(Object(Ya.a)(e)).then((e=>{Object(a.Wb)(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:Zl,lineNumber:347,columnNumber:11},this),"\u7684\u72b6\u6001\uff1f"]},void 0,!0,{fileName:Zl,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,l={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.dd)(t.id,l).then((l=>{Object(a.Wb)(l,((a,l)=>{let s=Object(oi.a)(this.state.distdata,(e=>e.id==t.id));this.state.distdata[s].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){let i=this;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");switch(Number(e)){case 1:return void Object(a.xb)(t.reseller_id).then((e=>{Object(a.Wb)(e,((e,t)=>{this.setState({audit_visible:!0,phone_list:e.contact_phone,email_list:e.contact_email})}),(e=>{c.a.error(e)}))}));case 2:default:break;case 3:return void 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:Zl,lineNumber:519,columnNumber:20},this),onConfirm:()=>{i.setState({isCancel:!0}),Object(a.fc)(t.id).then((e=>{i.setState({isCancel:!1}),Object(a.Wb)(e,((e,t)=>{c.a.success("\u4f5c\u5e9f\u6210\u529f"),i.setState({page:1,limit:10});i.getPlanList({page:1,limit:10})}),(e=>{c.a.error(e)}))}))},onCancel:this.onCancel,className:"questModal",parentComponent:this});case 4:return void 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:Zl,lineNumber:551,columnNumber:20},this),onConfirm:()=>{Object(a.A)(t.id).then((e=>{Object(a.Wb)(e,((e,t)=>{c.a.success(t),i.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),i.getPlanList(a)}),(e=>{c.a.error(e)}))}))},onCancel:this.onCancel,className:"questModal",parentComponent:this});case 5:sessionStorage.setItem("pathname2","/home/plan-message"),sessionStorage.setItem("showflag",!0);let e=[{pagetitle:"\u7f16\u8f91",items:[{path:"/home/key-list",name:"\u8425\u9500\u8ba1\u5212\u7ba1\u7406"},{path:"/home/key-list",name:t.title},{path:"/home/key-list",name:"\u5b9a\u5236\u63d0\u793a"}]}];return sessionStorage.setItem("breakchangenav",JSON.stringify(e)),sessionStorage.setItem("linkshowname","\u8425\u9500\u8ba1\u5212\u7ba1\u7406"),sessionStorage.setItem("plan_id",t.id),void this.props.history.push("/home/plan-message")}if(6==e&&this.callBack(t),7==e){let e=await Object(a.Nb)({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:Zl,lineNumber:615,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,l=0,s=0,n=0,o=0;e.forEach((e=>{t+=Number(e.grant),i+=Number(e.receive),a+=Number(e.usage),l+=Number(e.silent),s+=Number(e.receive_total),n+=Number(e.usage_total),o+=Number(e.silent_total)})),this.setState({grantTotal:t,receiveTotal:i,usageTotal:a,silentTotal:l,receive_total:s,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 l=window.location.href.replace(window.location.hash,"#/home/plan-edit");sessionStorage.setItem("KeyPcType","1"),window.open(l,"_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 l=window.location.href.replace(window.location.hash,"#/home/plan-edit-copy");sessionStorage.setItem("KeyPcType","2"),window.open(l,"_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:Zl,lineNumber:849,columnNumber:14},this):Object(h.jsxDEV)(Ei.a,{trigger:"hover",content:Object(h.jsxDEV)(Xl,{value:e.href},void 0,!1,{fileName:Zl,lineNumber:852,columnNumber:39},this),children:Object(h.jsxDEV)("span",{style:{color:"#2B66F2"},onClick:t=>this.currPreviewBtn(e.href),children:"\u9884\u89c8"},void 0,!1,{fileName:Zl,lineNumber:853,columnNumber:11},this)},void 0,!1,{fileName:Zl,lineNumber:852,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:Zl,lineNumber:878,columnNumber:13},this):Object(h.jsxDEV)("span",{className:"grid-link disabled",children:"\u7f16\u8f91"},void 0,!1,{fileName:Zl,lineNumber:888,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:Zl,lineNumber:893,columnNumber:13},this):Object(h.jsxDEV)("span",{className:"grid-link disabled",children:"\u590d\u5236"},void 0,!1,{fileName:Zl,lineNumber:903,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:Zl,lineNumber:915,columnNumber:22},this)]},void 0,!0,{fileName:Zl,lineNumber:914,columnNumber:17},this)},void 0,!1,{fileName:Zl,lineNumber:913,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:Zl,lineNumber:920,columnNumber:19},this),Object(h.jsxDEV)(D.a,{children:"\u8bbe\u7f6e\u56de\u8c03"},"6",!1,{fileName:Zl,lineNumber:922,columnNumber:19},this),Object(h.jsxDEV)(D.a,{disabled:!0,children:"\u65e5\u5fd7"},"2",!1,{fileName:Zl,lineNumber:923,columnNumber:19},this),Object(h.jsxDEV)(D.a,{children:"\u4f5c\u5e9f"},"3",!1,{fileName:Zl,lineNumber:926,columnNumber:19},this),Object(h.jsxDEV)(D.a,{children:"\u7ed1\u5b9a\u90ae\u50a8\u5546\u6237\u7f16\u53f7"},"7",!1,{fileName:Zl,lineNumber:927,columnNumber:19},this)]},void 0,!0,{fileName:Zl,lineNumber:919,columnNumber:17},this)},void 0,!1,{fileName:Zl,lineNumber:918,columnNumber:15},this)]},void 0,!0,{fileName:Zl,lineNumber:908,columnNumber:13},this):Object(h.jsxDEV)("span",{className:"grid-link disabled",children:["\u66f4\u591a ",Object(h.jsxDEV)(g.a,{type:"down"},void 0,!1,{fileName:Zl,lineNumber:935,columnNumber:18},this)]},void 0,!0,{fileName:Zl,lineNumber:934,columnNumber:13},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:Zl,lineNumber:942,columnNumber:13},this):Object(h.jsxDEV)("span",{className:"grid-link disabled",style:{paddingRight:0},children:"\u5220\u9664"},void 0,!1,{fileName:Zl,lineNumber:955,columnNumber:13},this);default:return""}}dingTask(e){Object(a.G)(e).then((e=>{Object(a.Wb)(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)(Lt,{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:Zl,lineNumber:991,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:ts,clearable:!0,placeholder:"\u8bf7\u9009\u62e9\u67e5\u8be2\u5206\u7c7b"},void 0,!1,{fileName:Zl,lineNumber:995,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:Zl,lineNumber:1011,columnNumber:17},this):null]},void 0,!0,{fileName:Zl,lineNumber:994,columnNumber:13},this)]},void 0,!0,{fileName:Zl,lineNumber:990,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:Zl,lineNumber:1029,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:Zl,lineNumber:1044,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:Zl,lineNumber:1050,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:Zl,lineNumber:1041,columnNumber:15},this):null,Object(h.jsxDEV)(T,{spliteColor:"#fff",tableData:this.state.distdata,Column:es,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:Zl,lineNumber:1081,columnNumber:21},this):"title"==e?Object(h.jsxDEV)("span",{className:"grid-link",onClick:e=>{this.linkTo(t)},children:t.title},void 0,!1,{fileName:Zl,lineNumber:1089,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:Zl,lineNumber:1101,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:Bt.planStatusBg(parseInt(t.status))}},void 0,!1,{fileName:Zl,lineNumber:1115,columnNumber:25},this),t.status_text]},void 0,!0,{fileName:Zl,lineNumber:1114,columnNumber:23},this)},void 0,!1,{fileName:Zl,lineNumber:1113,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:Zl,lineNumber:1131,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:Zl,lineNumber:1133,columnNumber:25},this):Object(h.jsxDEV)("span",{className:"grid-link disabled",children:"\u9489\u9489\u5ba1\u6279\u67e5\u8be2"},void 0,!1,{fileName:Zl,lineNumber:1142,columnNumber:25},this),this.opearoEl(3,t),this.opearoEl(4,t)]},void 0,!0,{fileName:Zl,lineNumber:1128,columnNumber:21},this):void 0},void 0,!1,{fileName:Zl,lineNumber:1061,columnNumber:13},this),this.state.audit_visible?Object(h.jsxDEV)("div",{children:[Object(h.jsxDEV)("div",{className:"modal",children:" "},void 0,!1,{fileName:Zl,lineNumber:1154,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:Zl,lineNumber:1156,columnNumber:19},this),Object(h.jsxDEV)("div",{className:"audit-box-title",children:"\u53d1\u9001"},void 0,!1,{fileName:Zl,lineNumber:1163,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:Zl,lineNumber:1164,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:Zl,lineNumber:1166,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:Zl,lineNumber:1178,columnNumber:29},this)))},void 0,!1,{fileName:Zl,lineNumber:1169,columnNumber:23},this)},void 0,!1,{fileName:Zl,lineNumber:1168,columnNumber:21},this)]},void 0,!0,{fileName:Zl,lineNumber:1165,columnNumber:19},this),Object(h.jsxDEV)("div",{className:"email-group",children:[Object(h.jsxDEV)("div",{children:"\u63a5\u6536\u90ae\u7bb1"},void 0,!1,{fileName:Zl,lineNumber:1194,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:Zl,lineNumber:1205,columnNumber:29},this)))},void 0,!1,{fileName:Zl,lineNumber:1196,columnNumber:23},this)},void 0,!1,{fileName:Zl,lineNumber:1195,columnNumber:21},this)]},void 0,!0,{fileName:Zl,lineNumber:1193,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:Zl,lineNumber:1221,columnNumber:21},this)},void 0,!1,{fileName:Zl,lineNumber:1220,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:Zl,lineNumber:1228,columnNumber:21},this)},void 0,!1,{fileName:Zl,lineNumber:1227,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:Zl,lineNumber:1236,columnNumber:21},this),Object(h.jsxDEV)(u.a,{type:"primary",onClick:e=>{this.send(e)},children:"\u53d1\u9001"},void 0,!1,{fileName:Zl,lineNumber:1243,columnNumber:21},this)]},void 0,!0,{fileName:Zl,lineNumber:1235,columnNumber:19},this)]},void 0,!0,{fileName:Zl,lineNumber:1155,columnNumber:17},this)]},void 0,!0,{fileName:Zl,lineNumber:1153,columnNumber:15},this):null]},void 0,!0,{fileName:Zl,lineNumber:1039,columnNumber:11},this)]},void 0,!0,{fileName:Zl,lineNumber:989,columnNumber:9},this)},void 0,!1,{fileName:Zl,lineNumber:988,columnNumber:7},this)}}class as 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:"D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\pages\\plan\\main\\main.js",lineNumber:9,columnNumber:12},this)}}i(260);var ls="D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\pages\\plan\\message\\index.jsx";const ss=[{id:1,statusText:"\u672a\u5f00\u59cb",defaultPrompt:"\u8fd8\u6ca1\u5f00\u59cb\u54df\uff0c\u5151\u6362\u65f6\u95f4\u4e3a${\u5f00\u59cb\u65f6\u95f4}\u81f3${\u7ed3\u675f\u65f6\u95f4}",customizePrompt:"",typeText:"\u901a\u7528",variables:"\u5f00\u59cb\u65f6\u95f4:${start_time}\uff0c\u7ed3\u675f\u65f6\u95f4:${end_time}",readOnly:!0},{id:2,statusText:"\u4f5c\u5e9fkey\u6279\u6b21",defaultPrompt:"\u5f53\u524d\u5546\u54c1\u5151\u6362\u5df2\u7ed3\u675f",customizePrompt:"",typeText:"\u901a\u7528"},{id:3,statusText:"\u4ec5\u5151\u6362\u4e00\u6b21",defaultPrompt:"\u4eb2\uff0c\u4ec5\u53ef\u5151\u6362\u4e00\u6b21\u54e6\uff01",customizePrompt:"",typeText:"\u901a\u7528"},{id:4,statusText:"\u7d2f\u8ba1\u6b21\u6570\u8fbe\u5230\u4e0a\u9650",defaultPrompt:"\u5f53\u524d\u5546\u54c1\u5151\u6362\u6b21\u6570\u8fbe\u5230\u4e0a\u9650",customizePrompt:"",typeText:"\u901a\u7528"},{id:5,statusText:"\u65e0\u5e93\u5b58",defaultPrompt:"\u6682\u65e0\u5e93\u5b58\uff0c\u770b\u770b\u5176\u4ed6\u5546\u54c1\u5427~",customizePrompt:"",typeText:"\u901a\u7528"},{id:6,statusText:"\u5176\u4ed6\u5546\u54c1\u5904\u4e8e\u5151\u6362\u4e2d",defaultPrompt:"\u5f53\u524d\u5546\u54c1\u4e0d\u53ef\u5151\u6362",customizePrompt:"",typeText:"\u901a\u7528"},{id:7,statusText:"\u5168\u90e8\u5151\u6362",defaultPrompt:"\u5f53\u524d\u5546\u54c1\u5151\u6362\u6b21\u6570\u8fbe\u5230\u4e0a\u9650",customizePrompt:"",typeText:"\u901a\u7528"},{id:8,statusText:"\u5546\u54c1\u6682\u505c",defaultPrompt:"\u8be5\u5546\u54c1\u6682\u65e0\u6cd5\u5151\u6362",customizePrompt:"",typeText:"\u901a\u7528"},{id:9,statusText:"\u6b63\u5e38\u8fc7\u671f",defaultPrompt:"\u5151\u6362\u5df2\u8fc7\u671f\uff0c\u5151\u6362\u65f6\u95f4\u4e3a${\u5f00\u59cb\u65f6\u95f4}\u81f3${\u7ed3\u675f\u65f6\u95f4}",customizePrompt:"",typeText:"\u901a\u7528"},{id:10,statusText:"\u4e0d\u5728\u9886\u53d6\u65f6\u95f4\u8303\u56f4\u5185",defaultPrompt:"\u8be5\u7ea2\u5305\u5546\u54c1\u4e0d\u5728\u9886\u53d6\u65f6\u95f4\u6bb5\u5185",customizePrompt:"",typeText:"\u7ea2\u5305"}];i(261);var ns="D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\pages\\plan\\qrcode\\qrcode.js";class os 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)(Lt,{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:ns,lineNumber:21,columnNumber:13},this)},void 0,!1,{fileName:ns,lineNumber:20,columnNumber:11},this)},void 0,!1,{fileName:ns,lineNumber:19,columnNumber:9},this)},void 0,!1,{fileName:ns,lineNumber:18,columnNumber:7},this)}}i(262);var rs="D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\pages\\system\\account\\add\\adduserinfo\\adduserinfo.js";class ms 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 l,s,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===(l=d.department)||void 0===l?void 0:l.id,text:null===(s=d.department)||void 0===s?void 0:s.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.ab)({company_id:u.company.key}).then((t=>{Object(a.Wb)(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.bb)({department_id:u.deparment.key}).then((t=>{Object(a.Wb)(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:rs,lineNumber:139,columnNumber:19},this),"\u8d26\u53f7\uff1f"]},void 0,!0,{fileName:rs,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:rs,lineNumber:143,columnNumber:19},this),"\u8d26\u53f7\u4fe1\u606f\uff1f"]},void 0,!0,{fileName:rs,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.hc)(e).then((e=>{Object(a.Wb)(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.xc)(t,e).then((e=>{Object(a.Wb)(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.fd)(i).then((e=>{Object(a.Wb)(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.ab)({company_id:e.key}).then((e=>{Object(a.Wb)(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.bb)({department_id:e.key}).then((e=>{Object(a.Wb)(e,((e,i)=>{let a=e.map((e=>({key:e.id,text:e.job_name})));t.setState({departmentJob:a});let l=this.state.model;l.post="",t.setState({model:l})}),(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.X)().then((t=>{Object(a.Wb)(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.Ab)({page:1,limit:1e3}).then((t=>{Object(a.Wb)(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:rs,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)(s.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)(l.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:rs,lineNumber:465,columnNumber:13},this)},void 0,!1,{fileName:rs,lineNumber:464,columnNumber:11},this),Object(h.jsxDEV)(l.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:rs,lineNumber:487,columnNumber:13},this)},void 0,!1,{fileName:rs,lineNumber:486,columnNumber:11},this),Object(h.jsxDEV)(l.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:rs,lineNumber:509,columnNumber:13},this)},void 0,!1,{fileName:rs,lineNumber:508,columnNumber:11},this),Object(h.jsxDEV)(l.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:rs,lineNumber:537,columnNumber:13},this)},void 0,!1,{fileName:rs,lineNumber:536,columnNumber:11},this),Object(h.jsxDEV)(l.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),Ut.a.emit("change","company",e)}},void 0,!1,{fileName:rs,lineNumber:558,columnNumber:13},this)},void 0,!1,{fileName:rs,lineNumber:557,columnNumber:11},this),Object(h.jsxDEV)(l.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),Ut.a.emit("change","deparment",e)}},void 0,!1,{fileName:rs,lineNumber:569,columnNumber:13},this)},void 0,!1,{fileName:rs,lineNumber:568,columnNumber:11},this),Object(h.jsxDEV)(l.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),Ut.a.emit("change","post",e)}},void 0,!1,{fileName:rs,lineNumber:581,columnNumber:13},this)},void 0,!1,{fileName:rs,lineNumber:580,columnNumber:11},this),Object(h.jsxDEV)(l.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),Ut.a.emit("change","station",e)},popupWidth:"360px",width:"520px"},void 0,!1,{fileName:rs,lineNumber:593,columnNumber:13},this)},void 0,!1,{fileName:rs,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:rs,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:rs,lineNumber:610,columnNumber:13},this)]},void 0,!0,{fileName:rs,lineNumber:606,columnNumber:11},this)]},void 0,!0,{fileName:rs,lineNumber:463,columnNumber:9},this),Object(h.jsxDEV)("div",{className:"mypic",children:[Object(h.jsxDEV)("b",{children:"\u5934\u50cf"},void 0,!1,{fileName:rs,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:rs,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:rs,lineNumber:632,columnNumber:15},this)},void 0,!1,{fileName:rs,lineNumber:618,columnNumber:11},this)]},void 0,!0,{fileName:rs,lineNumber:616,columnNumber:9},this)]},void 0,!0,{fileName:rs,lineNumber:462,columnNumber:7},this)}}i(263);var cs="D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\pages\\system\\account\\add\\add.js";class ds 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)(ms,{enumer:this.state.enumer,rowData:this.state.rowData},void 0,!1,{fileName:cs,lineNumber:26,columnNumber:13},this)},void 0,!1,{fileName:cs,lineNumber:25,columnNumber:11},this)},void 0,!1,{fileName:cs,lineNumber:24,columnNumber:9},this)},void 0,!1,{fileName:cs,lineNumber:23,columnNumber:7},this)}}i(137);var us="D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\pages\\system\\account\\list\\delAuth.js";const hs=Z.a.Group,bs=Z.a.Button;class ps 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.lb)(e).then((e=>{Object(a.Wb)(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.Ub)(e,{page:1,limit:1e3}).then((e=>{Object(a.Wb)(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:us,lineNumber:126,columnNumber:9},this),Object(h.jsxDEV)(s.a,{ref:"form1",children:[Object(h.jsxDEV)(l.a,{labelname:"\u4ea4\u63a5\u89d2\u8272",children:Object(h.jsxDEV)(hs,{onChange:this.authChange,value:this.state.authWay,children:[Object(h.jsxDEV)(bs,{value:1,disabled:!this.state.levelAuth,children:"\u5e73\u7ea7"},void 0,!1,{fileName:us,lineNumber:132,columnNumber:15},this),Object(h.jsxDEV)(bs,{value:0,disabled:!this.state.downLevel,children:"\u4e0b\u7ea7"},void 0,!1,{fileName:us,lineNumber:135,columnNumber:15},this)]},void 0,!0,{fileName:us,lineNumber:131,columnNumber:13},this)},void 0,!1,{fileName:us,lineNumber:130,columnNumber:11},this),Object(h.jsxDEV)(l.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:us,lineNumber:141,columnNumber:13},this)},void 0,!1,{fileName:us,lineNumber:140,columnNumber:11},this)]},void 0,!0,{fileName:us,lineNumber:129,columnNumber:9},this)]},void 0,!0,{fileName:us,lineNumber:125,columnNumber:7},this):null}}var Ns="D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\pages\\system\\account\\list\\modifypwd.js";function js(e,t){return e!==t.getSectionValue("password").password?{name:"passwordEqual",message:"\u4e24\u6b21\u586b\u5199\u7684\u5bc6\u7801\u4e0d\u4e00\u81f4"}:null}var vs=e=>{const t=bi.a.useForm(pi.b.View),[i,l]=m.a.useState("password"),[s,n]=m.a.useState("password"),o=m.a.useCallback((t=>{const i=t.getValue();if(i){let t=Object(de.a)(i);Object(a.Dc)(e.id,t).then((t=>{Object(a.Wb)(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:()=>{l("password"==i?"text":"password")}},void 0,!1,{fileName:Ns,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:Ns,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"==s?"eye-o":"closed-eye",onClick:()=>{n("password"==s?"text":"password")}},void 0,!1,{fileName:Ns,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"),js],props:{type:"password"==s?"password":"text",maxLength:16,autoComplete:"new-password"}},void 0,!1,{fileName:Ns,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:Ns,lineNumber:102,columnNumber:9},void 0),",",Object(h.jsxDEV)(u.a,{onClick:()=>{e.visibleShow(!1)},children:"\u53d6\u6d88"},void 0,!1,{fileName:Ns,lineNumber:105,columnNumber:10},void 0)]},void 0,!0,{fileName:Ns,lineNumber:101,columnNumber:7},void 0)]},void 0,!0,{fileName:Ns,lineNumber:61,columnNumber:5},void 0)},gs="D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\pages\\system\\account\\list\\list.js";const fs=[{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 _s 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,l={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:gs,lineNumber:139,columnNumber:11},this),"\u8d26\u53f7\uff1f"]},void 0,!0,{fileName:gs,lineNumber:137,columnNumber:9},this),onConfirm:()=>{Object(a.vc)(t.id,l).then((e=>{Object(a.Wb)(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.X)().then((e=>{Object(a.Wb)(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:l}=e.state,s={page:t,limit:i};l&&(s.search=l),Object(a.N)(s).then((t=>{Object(a.Wb)(t,((t,i)=>{const a=t.data,{total:l}=t;e.setState({accList:a,total:l})}),(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:gs,lineNumber:297,columnNumber:22},this),"\uff1f"]},void 0,!0,{fileName:gs,lineNumber:296,columnNumber:13},this),onConfirm:()=>{let i={admin_user_id:this.state.deldata.id,receive_uid:t.personnel.key};Object(a.Nc)(i).then((t=>{Object(a.Wb)(t,((t,i)=>{c.a.clear(),c.a.success(i),setTimeout((()=>{Object(a.o)(this.state.deldata.id).then((t=>{Object(a.Wb)(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:gs,lineNumber:350,columnNumber:22},this),"\uff1f"]},void 0,!0,{fileName:gs,lineNumber:349,columnNumber:13},this),onConfirm:()=>{let i={admin_user_id:this.state.deldata.id,receive_uid:t.personnel.key};Object(a.wc)(i).then((t=>{Object(a.Wb)(t,((t,i)=>{c.a.clear(),c.a.success(i),setTimeout((()=>{Object(a.o)(this.state.deldata.id).then((t=>{Object(a.Wb)(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)(Lt,{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:gs,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:gs,lineNumber:452,columnNumber:15},this)]},void 0,!0,{fileName:gs,lineNumber:447,columnNumber:13},this),Object(h.jsxDEV)("div",{className:"table-container",children:Object(h.jsxDEV)(T,{spliteColor:"#fff",tableData:this.state.accList,Column:fs,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:gs,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:gs,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:gs,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:gs,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:gs,lineNumber:510,columnNumber:25},this)]},void 0,!0,{fileName:gs,lineNumber:500,columnNumber:23},this):void 0},void 0,!1,{fileName:gs,lineNumber:468,columnNumber:15},this)},void 0,!1,{fileName:gs,lineNumber:467,columnNumber:13},this)]},void 0,!0,{fileName:gs,lineNumber:446,columnNumber:11},this)},void 0,!1,{fileName:gs,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)(vs,{visibleShow:e=>this.setVisible(e),id:this.state.id},void 0,!1,{fileName:gs,lineNumber:529,columnNumber:13},this)},void 0,!1,{fileName:gs,lineNumber:528,columnNumber:11},this)},void 0,!1,{fileName:gs,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:gs,lineNumber:540,columnNumber:15},this),Object(h.jsxDEV)(u.a,{onClick:e=>{this.setdelVisible(!1)},children:"\u53d6\u6d88"},void 0,!1,{fileName:gs,lineNumber:548,columnNumber:15},this)]},void 0,!0,{fileName:gs,lineNumber:539,columnNumber:13},this),children:Object(h.jsxDEV)("div",{children:Object(h.jsxDEV)(ps,{deldata:this.state.deldata,visibleShow:e=>this.setdelVisible(e),id:this.state.id,ref:"delAuthDom"},void 0,!1,{fileName:gs,lineNumber:559,columnNumber:13},this)},void 0,!1,{fileName:gs,lineNumber:558,columnNumber:11},this)},void 0,!1,{fileName:gs,lineNumber:533,columnNumber:9},this)]},void 0,!0,{fileName:gs,lineNumber:443,columnNumber:7},this)}}var xs=i(505),ys=(i(264),"D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\pages\\system\\customize\\main.js");const Os=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:ys,lineNumber:14,columnNumber:7},void 0),Object(h.jsxDEV)("span",{className:"delfilebtn",onClick:()=>i(t),children:"\u5220\u9664"},void 0,!1,{fileName:ys,lineNumber:15,columnNumber:7},void 0)]},void 0,!0,{fileName:ys,lineNumber:13,columnNumber:5},void 0)};class Ds 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.fd)(i).then((e=>{Object(a.Wb)(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:ys,lineNumber:85,columnNumber:19},this),"\u6a21\u677f\uff1f"]},void 0,!0,{fileName:ys,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.uc)(t).then((e=>{Object(a.Wb)(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.sb)().then((t=>{Object(a.Wb)(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)(s.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)(l.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:ys,lineNumber:183,columnNumber:15},this)},void 0,!1,{fileName:ys,lineNumber:182,columnNumber:13},this),Object(h.jsxDEV)(l.a,{labelname:"\u6587\u4ef6\u4e0a\u4f20",prop:"zip",children:Object(h.jsxDEV)(xs.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:Os,onError:this.onUploadError,sortable:!0},void 0,!1,{fileName:ys,lineNumber:204,columnNumber:15},this)},void 0,!1,{fileName:ys,lineNumber:203,columnNumber:13},this),Object(h.jsxDEV)(l.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:ys,lineNumber:217,columnNumber:15},this)},void 0,!1,{fileName:ys,lineNumber:216,columnNumber:13},this),Object(h.jsxDEV)(l.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:ys,lineNumber:230,columnNumber:15},this)},void 0,!1,{fileName:ys,lineNumber:229,columnNumber:13},this),Object(h.jsxDEV)(l.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:ys,lineNumber:241,columnNumber:15},this)},void 0,!1,{fileName:ys,lineNumber:240,columnNumber:13},this)]},void 0,!0,{fileName:ys,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:ys,lineNumber:253,columnNumber:13},this),Object(h.jsxDEV)(u.a,{type:"normal",onClick:()=>this.onCancel(),children:"\u53d6\u6d88"},void 0,!1,{fileName:ys,lineNumber:256,columnNumber:13},this)]},void 0,!0,{fileName:ys,lineNumber:252,columnNumber:11},this)]},void 0,!0,{fileName:ys,lineNumber:180,columnNumber:9},this)},void 0,!1,{fileName:ys,lineNumber:179,columnNumber:7},this)}}var Es=i(493),Vs=(i(265),"D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\pages\\system\\menu\\leftnav\\leftnav.js");class ks 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.mb)().then((t=>{Object(a.Wb)(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)(Es.a,{checkable:!0,size:"small",data:this.state.menu_data,onCheck:this.onCheck,onSelect:this.onselect,checkedKeys:e,disabledCheckedKeys:t},void 0,!1,{fileName:Vs,lineNumber:56,columnNumber:9},this)},void 0,!1,{fileName:Vs,lineNumber:55,columnNumber:7},this)}}var Ss=i(498),ws=(i(266),"D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\pages\\system\\menu\\menubody\\menubody.js");const Cs=Z.a.Group,Is=Z.a.Button;class Ts 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)(s.a,{model:this.state.model,rules:{menuname:[{type:"required",message:"\u8bf7\u8f93\u5165\u83dc\u5355\u540d\u79f0"}]},ref:"form1",children:[Object(h.jsxDEV)(l.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:ws,lineNumber:76,columnNumber:13},this)},void 0,!1,{fileName:ws,lineNumber:75,columnNumber:11},this),Object(h.jsxDEV)(l.a,{required:!1,labelname:"\u83dc\u5355\u7c7b\u578b",children:Object(h.jsxDEV)(Cs,{onChange:this.typeonChange,value:this.state.model.level,children:[Object(h.jsxDEV)(Is,{value:"1",children:"\u4e00\u7ea7\u83dc\u5355"},void 0,!1,{fileName:ws,lineNumber:98,columnNumber:15},this),Object(h.jsxDEV)(Is,{value:"5",children:"\u4e8c\u7ea7\u83dc\u5355"},void 0,!1,{fileName:ws,lineNumber:99,columnNumber:15},this),Object(h.jsxDEV)(Is,{value:"10",children:"\u64cd\u4f5c\u6309\u94ae"},void 0,!1,{fileName:ws,lineNumber:100,columnNumber:15},this)]},void 0,!0,{fileName:ws,lineNumber:97,columnNumber:13},this)},void 0,!1,{fileName:ws,lineNumber:96,columnNumber:11},this),Object(h.jsxDEV)(l.a,{required:!1,labelname:"\u8bf7\u6c42\u65b9\u5f0f",children:Object(h.jsxDEV)(Cs,{onChange:this.methodsonChange,value:this.state.model.method,children:[Object(h.jsxDEV)(Is,{value:"1",children:"GET"},void 0,!1,{fileName:ws,lineNumber:106,columnNumber:15},this),Object(h.jsxDEV)(Is,{value:"5",children:"POST"},void 0,!1,{fileName:ws,lineNumber:107,columnNumber:15},this),Object(h.jsxDEV)(Is,{value:"10",children:"PUT"},void 0,!1,{fileName:ws,lineNumber:108,columnNumber:15},this),Object(h.jsxDEV)(Is,{value:"15",children:"DELETE"},void 0,!1,{fileName:ws,lineNumber:109,columnNumber:15},this)]},void 0,!0,{fileName:ws,lineNumber:105,columnNumber:13},this)},void 0,!1,{fileName:ws,lineNumber:104,columnNumber:11},this),Object(h.jsxDEV)(l.a,{required:!1,labelname:"\u662f\u5426\u663e\u793a",children:Object(h.jsxDEV)(Cs,{onChange:this.statusChange,value:this.state.model.status,children:[Object(h.jsxDEV)(Is,{value:"1",children:"\u662f"},void 0,!1,{fileName:ws,lineNumber:114,columnNumber:15},this),Object(h.jsxDEV)(Is,{value:"0",children:"\u5426"},void 0,!1,{fileName:ws,lineNumber:115,columnNumber:15},this)]},void 0,!0,{fileName:ws,lineNumber:113,columnNumber:13},this)},void 0,!1,{fileName:ws,lineNumber:112,columnNumber:11},this),Object(h.jsxDEV)(l.a,{required:!1,labelname:"\u662f\u5426\u9a8c\u8bc1\u767b\u9646",children:Object(h.jsxDEV)(Cs,{onChange:this.authChange,value:this.state.model.auth,children:[Object(h.jsxDEV)(Is,{value:"1",children:"\u662f"},void 0,!1,{fileName:ws,lineNumber:120,columnNumber:15},this),Object(h.jsxDEV)(Is,{value:"0",children:"\u5426"},void 0,!1,{fileName:ws,lineNumber:121,columnNumber:15},this)]},void 0,!0,{fileName:ws,lineNumber:119,columnNumber:13},this)},void 0,!1,{fileName:ws,lineNumber:118,columnNumber:11},this),Object(h.jsxDEV)(l.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:ws,lineNumber:125,columnNumber:13},this)},void 0,!1,{fileName:ws,lineNumber:124,columnNumber:11},this),Object(h.jsxDEV)(l.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:ws,lineNumber:146,columnNumber:13},this)},void 0,!1,{fileName:ws,lineNumber:145,columnNumber:11},this),Object(h.jsxDEV)(l.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:ws,lineNumber:167,columnNumber:13},this)},void 0,!1,{fileName:ws,lineNumber:166,columnNumber:11},this),Object(h.jsxDEV)(l.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:ws,lineNumber:188,columnNumber:13},this)},void 0,!1,{fileName:ws,lineNumber:187,columnNumber:11},this),Object(h.jsxDEV)(l.a,{required:!1,labelname:"\u83dc\u5355\u6392\u5e8f",children:Object(h.jsxDEV)(Ss.a,{value:this.state.model.sort,showStepper:!0,onChange:e=>this.sortChange(e),placeholder:"\u8bf7\u8f93\u5165\u6570\u5b57"},void 0,!1,{fileName:ws,lineNumber:209,columnNumber:13},this)},void 0,!1,{fileName:ws,lineNumber:208,columnNumber:11},this)]},void 0,!0,{fileName:ws,lineNumber:74,columnNumber:9},this)},void 0,!1,{fileName:ws,lineNumber:73,columnNumber:7},this)}}i(267);var Ls="D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\pages\\system\\menu\\menuright\\menuright.js";const Fs=Z.a.Group,Hs=Z.a.Button;class Ms 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:Ls,lineNumber:70,columnNumber:18},this),onConfirm:()=>{Object(a.Oc)(this.state.model.id,e).then((e=>{Object(a.Wb)(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:Ls,lineNumber:142,columnNumber:11},this),Object(h.jsxDEV)(u.a,{type:"normal",onClick:this.resetInfo.bind(this),children:"\u91cd\u7f6e"},void 0,!1,{fileName:Ls,lineNumber:145,columnNumber:11},this)]},void 0,!0,{fileName:Ls,lineNumber:141,columnNumber:9},this),Object(h.jsxDEV)(s.a,{model:this.state.model,rules:{menuname:[{type:"required",message:"\u8bf7\u8f93\u5165\u83dc\u5355\u540d\u79f0"}]},ref:"form1",children:[Object(h.jsxDEV)(l.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:Ls,lineNumber:151,columnNumber:13},this)},void 0,!1,{fileName:Ls,lineNumber:150,columnNumber:11},this),Object(h.jsxDEV)(l.a,{required:!1,labelname:"\u83dc\u5355\u7c7b\u578b",children:Object(h.jsxDEV)(Fs,{onChange:this.typeonChange,value:this.state.model.level,children:[Object(h.jsxDEV)(Hs,{value:1,children:"\u4e00\u7ea7\u83dc\u5355"},void 0,!1,{fileName:Ls,lineNumber:173,columnNumber:15},this),Object(h.jsxDEV)(Hs,{value:5,children:"\u4e8c\u7ea7\u83dc\u5355"},void 0,!1,{fileName:Ls,lineNumber:174,columnNumber:15},this),Object(h.jsxDEV)(Hs,{value:10,children:"\u64cd\u4f5c\u6309\u94ae"},void 0,!1,{fileName:Ls,lineNumber:175,columnNumber:15},this)]},void 0,!0,{fileName:Ls,lineNumber:172,columnNumber:13},this)},void 0,!1,{fileName:Ls,lineNumber:171,columnNumber:11},this),Object(h.jsxDEV)(l.a,{required:!1,labelname:"\u8bf7\u6c42\u65b9\u5f0f",children:Object(h.jsxDEV)(Fs,{onChange:this.methodsonChange,value:this.state.model.method,children:[Object(h.jsxDEV)(Hs,{value:1,children:"GET"},void 0,!1,{fileName:Ls,lineNumber:181,columnNumber:15},this),Object(h.jsxDEV)(Hs,{value:5,children:"POST"},void 0,!1,{fileName:Ls,lineNumber:182,columnNumber:15},this),Object(h.jsxDEV)(Hs,{value:10,children:"PUT"},void 0,!1,{fileName:Ls,lineNumber:183,columnNumber:15},this),Object(h.jsxDEV)(Hs,{value:15,children:"DELETE"},void 0,!1,{fileName:Ls,lineNumber:184,columnNumber:15},this)]},void 0,!0,{fileName:Ls,lineNumber:180,columnNumber:13},this)},void 0,!1,{fileName:Ls,lineNumber:179,columnNumber:11},this),Object(h.jsxDEV)(l.a,{required:!1,labelname:"\u662f\u5426\u663e\u793a",children:Object(h.jsxDEV)(Fs,{onChange:this.statusChange,value:this.state.model.status,children:[Object(h.jsxDEV)(Hs,{value:1,children:"\u662f"},void 0,!1,{fileName:Ls,lineNumber:189,columnNumber:15},this),Object(h.jsxDEV)(Hs,{value:0,children:"\u5426"},void 0,!1,{fileName:Ls,lineNumber:190,columnNumber:15},this)]},void 0,!0,{fileName:Ls,lineNumber:188,columnNumber:13},this)},void 0,!1,{fileName:Ls,lineNumber:187,columnNumber:11},this),Object(h.jsxDEV)(l.a,{required:!1,labelname:"\u662f\u5426\u9a8c\u8bc1\u767b\u9646",children:Object(h.jsxDEV)(Fs,{onChange:this.authChange,value:this.state.model.auth,children:[Object(h.jsxDEV)(Hs,{value:1,children:"\u662f"},void 0,!1,{fileName:Ls,lineNumber:195,columnNumber:15},this),Object(h.jsxDEV)(Hs,{value:0,children:"\u5426"},void 0,!1,{fileName:Ls,lineNumber:196,columnNumber:15},this)]},void 0,!0,{fileName:Ls,lineNumber:194,columnNumber:13},this)},void 0,!1,{fileName:Ls,lineNumber:193,columnNumber:11},this),Object(h.jsxDEV)(l.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:Ls,lineNumber:200,columnNumber:13},this)},void 0,!1,{fileName:Ls,lineNumber:199,columnNumber:11},this),Object(h.jsxDEV)(l.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:Ls,lineNumber:221,columnNumber:13},this)},void 0,!1,{fileName:Ls,lineNumber:220,columnNumber:11},this),Object(h.jsxDEV)(l.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:Ls,lineNumber:242,columnNumber:13},this)},void 0,!1,{fileName:Ls,lineNumber:241,columnNumber:11},this),Object(h.jsxDEV)(l.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:Ls,lineNumber:263,columnNumber:13},this)},void 0,!1,{fileName:Ls,lineNumber:262,columnNumber:11},this),Object(h.jsxDEV)(l.a,{required:!1,labelname:"\u83dc\u5355\u6392\u5e8f",children:Object(h.jsxDEV)(Ss.a,{value:this.state.model.sort,showStepper:!0,onChange:e=>this.sortChange(e),placeholder:"\u8bf7\u8f93\u5165\u6570\u5b57"},void 0,!1,{fileName:Ls,lineNumber:284,columnNumber:13},this)},void 0,!1,{fileName:Ls,lineNumber:283,columnNumber:11},this)]},void 0,!0,{fileName:Ls,lineNumber:149,columnNumber:9},this)]},void 0,!0,{fileName:Ls,lineNumber:140,columnNumber:7},this)}}i(268);var qs="D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\pages\\system\\menu\\main\\main.js";class Ps 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:qs,lineNumber:42,columnNumber:17},this),"\uff1f"]},void 0,!0,{fileName:qs,lineNumber:41,columnNumber:11},this),onConfirm:()=>{Object(a.v)(e.id).then((e=>{Object(a.Wb)(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.lc)(e).then((e=>{Object(a.Wb)(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:qs,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:qs,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:qs,lineNumber:105,columnNumber:13},this)]},void 0,!0,{fileName:qs,lineNumber:98,columnNumber:11},this)},void 0,!1,{fileName:qs,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)(ks,{ref:"navitem",menuInfo:e=>{this.getMenuInfo(e)}},void 0,!1,{fileName:qs,lineNumber:113,columnNumber:15},this)},void 0,!1,{fileName:qs,lineNumber:112,columnNumber:13},this)},void 0,!1,{fileName:qs,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)(Ms,{menuList:this.state.selectdom},void 0,!1,{fileName:qs,lineNumber:123,columnNumber:15},this)},void 0,!1,{fileName:qs,lineNumber:122,columnNumber:13},this)},void 0,!1,{fileName:qs,lineNumber:121,columnNumber:11},this)]},void 0,!0,{fileName:qs,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:qs,lineNumber:135,columnNumber:15},this),",",Object(h.jsxDEV)(u.a,{onClick:()=>this.setVisible(!1),children:"\u53d6\u6d88"},void 0,!1,{fileName:qs,lineNumber:138,columnNumber:16},this)]},void 0,!0,{fileName:qs,lineNumber:134,columnNumber:13},this),title:this.state.dialogtitle,children:Object(h.jsxDEV)(Ts,{ref:"menubody",fid:this.state.fid},void 0,!1,{fileName:qs,lineNumber:143,columnNumber:11},this)},void 0,!1,{fileName:qs,lineNumber:128,columnNumber:9},this)]},void 0,!0,{fileName:qs,lineNumber:96,columnNumber:7},this)}}i(269);var Ws="D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\pages\\system\\role\\tree\\tree.js";class Bs 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.mb)().then((t=>{Object(a.Wb)(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)(Es.a,{checkable:!0,size:"medium",data:this.state.menu_data,onCheck:this.onCheck,checkedKeys:e,disabledCheckedKeys:t},void 0,!1,{fileName:Ws,lineNumber:38,columnNumber:9},this)},void 0,!1,{fileName:Ws,lineNumber:37,columnNumber:7},this)}}i(270);var As="D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\pages\\system\\role\\add\\add.js";class Js 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:As,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:As,lineNumber:61,columnNumber:21},this),"\u89d2\u8272\uff1f"]},void 0,!0,{fileName:As,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:As,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.tc)(e).then((e=>{Object(a.Wb)(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.Cc)(t.state.menuList.id,e).then((e=>{Object(a.Wb)(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:As,lineNumber:138,columnNumber:9},this),Object(h.jsxDEV)(d.a,{style:{width:"100%"},title:this.state.pagetitle,children:Object(h.jsxDEV)(s.a,{model:this.state.model,rules:{role:[{type:"required",message:"\u8bf7\u8f93\u5165\u89d2\u8272\u540d"}]},ref:"roleform",className:"addform",children:[Object(h.jsxDEV)(l.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:As,lineNumber:142,columnNumber:15},this)},void 0,!1,{fileName:As,lineNumber:141,columnNumber:13},this),Object(h.jsxDEV)(l.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:As,lineNumber:164,columnNumber:17},this),Object(h.jsxDEV)(ne.a,{value:5,children:"\u8be5\u8d26\u53f7\u6570\u636e"},void 0,!1,{fileName:As,lineNumber:165,columnNumber:17},this)]},void 0,!0,{fileName:As,lineNumber:163,columnNumber:15},this)},void 0,!1,{fileName:As,lineNumber:162,columnNumber:13},this),Object(h.jsxDEV)(l.a,{labelname:"\u8bbe\u7f6e\u6743\u9650",prop:"setrole",id:"setrole",children:Object(h.jsxDEV)(Bs,{ref:"roletree",rules:this.state.menuList.rule_id},void 0,!1,{fileName:As,lineNumber:169,columnNumber:15},this)},void 0,!1,{fileName:As,lineNumber:168,columnNumber:13},this)]},void 0,!0,{fileName:As,lineNumber:140,columnNumber:11},this)},void 0,!1,{fileName:As,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:As,lineNumber:174,columnNumber:11},this),Object(h.jsxDEV)(u.a,{type:"normal",onClick:this.cancel.bind(this),children:"\u53d6\u6d88"},void 0,!1,{fileName:As,lineNumber:177,columnNumber:11},this)]},void 0,!0,{fileName:As,lineNumber:173,columnNumber:9},this)]},void 0,!0,{fileName:As,lineNumber:137,columnNumber:7},this)}}i(271);var zs="D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\pages\\system\\role\\list\\list.js";const Rs=[{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 Ks 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,l={page:t,limit:i};Object(a.Bb)(l).then((t=>{Object(a.Wb)(t,((t,i)=>{const a=t.data,{total:l}=t;e.setState({roleList:a,total:l})}))}))}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:zs,lineNumber:132,columnNumber:15},this),"\uff1f"]},void 0,!0,{fileName:zs,lineNumber:131,columnNumber:9},this),onConfirm:()=>{Object(a.x)(t.id).then((e=>{Object(a.Wb)(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)(Lt,{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:zs,lineNumber:162,columnNumber:13},this)},void 0,!1,{fileName:zs,lineNumber:161,columnNumber:11},this),Object(h.jsxDEV)("div",{className:"table-container",children:Object(h.jsxDEV)(T,{spliteColor:"#fff",tableData:this.state.roleList,Column:Rs,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:zs,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:zs,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:zs,lineNumber:194,columnNumber:23},this)]},void 0,!0,{fileName:zs,lineNumber:190,columnNumber:21},this):void 0},void 0,!1,{fileName:zs,lineNumber:167,columnNumber:13},this)},void 0,!1,{fileName:zs,lineNumber:166,columnNumber:11},this)]},void 0,!0,{fileName:zs,lineNumber:160,columnNumber:9},this)},void 0,!1,{fileName:zs,lineNumber:159,columnNumber:7},this)}}var Ys=i(480),$s=(i(272),"D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\pages\\system\\station\\main.js");class Us 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.X)().then((t=>{Object(a.Wb)(t,((t,i)=>{e.setState({company:t})}),(e=>{c.a.error(e)}))})).catch((e=>{}))}getDepartmentFn(e){let t=this;Object(a.ab)({company_id:e}).then((e=>{Object(a.Wb)(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.bb)({department_id:e}).then((e=>{Object(a.Wb)(e,((e,i)=>{t.setState({post:e})}),(e=>{c.a.error(e)}))})).catch((e=>{}))}editFn(e,t){let i=this,l=null;if("\u516c\u53f8"==t?l="companyBtn":"\u90e8\u95e8"==t?l="departmentBtn":"\u5c97\u4f4d"==t&&(l="postBtn"),e.parentNode.parentNode.children[0].value){let s=e.parentNode.parentNode.children[0].value;if("\u4fdd\u5b58"==e.innerHTML){if(e.parentNode.parentNode.className=l+" newitem","\u516c\u53f8"==t){let t={company_name:s};Object(a.jc)(t).then((t=>{Object(a.Wb)(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:s,company_id:this.state.companyName};Object(a.nc)(t).then((t=>{Object(a.Wb)(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:s,department_id:this.state.departmentName};Object(a.pc)(t).then((t=>{Object(a.Wb)(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 l=this;if(e.target.value&&13==e.keyCode){let s=null;if("\u516c\u53f8"==i?s="companyBtn":"\u90e8\u95e8"==i?s="departmentBtn":"\u5c97\u4f4d"==i&&(s="postBtn"),t.parentNode.className=s+" newitem","\u516c\u53f8"==i){let i={company_name:e.target.value};Object(a.jc)(i).then((e=>{Object(a.Wb)(e,((e,i)=>{c.a.clear(),c.a.success(i),l.getCompanyFn(),t.parentNode.remove(),l.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.nc)(i).then((e=>{Object(a.Wb)(e,((e,i)=>{c.a.clear(),c.a.success(i),l.getDepartmentFn(l.state.companyName),t.parentNode.remove(),l.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.pc)(i).then((e=>{Object(a.Wb)(e,((e,i)=>{c.a.clear(),c.a.success(i),l.getDepartmentJobFn(l.state.departmentName),t.parentNode.remove(),l.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 l=this,s=null,n=t.id;this.setState({vistype:i}),s="\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:["[",s,"]"]},void 0,!0,{fileName:$s,lineNumber:376,columnNumber:15},this),"\uff1f"]},void 0,!0,{fileName:$s,lineNumber:375,columnNumber:9},this),onConfirm:()=>{"\u516c\u53f8"==i?Object(a.r)(n).then((e=>{Object(a.Wb)(e,((e,t)=>{c.a.clear(),c.a.success(t),l.getCompanyFn()}),(e=>{c.a.error(e)}))})).catch((e=>{})):"\u90e8\u95e8"==i?Object(a.t)(n).then((e=>{Object(a.Wb)(e,((e,t)=>{c.a.clear(),c.a.success(t),l.getDepartmentFn(l.state.companyName)}),(e=>{c.a.error(e)}))})).catch((e=>{})):Object(a.u)(n).then((e=>{Object(a.Wb)(e,((e,t)=>{c.a.clear(),c.a.success(t),l.getDepartmentJobFn(l.state.departmentName)}),(e=>{c.a.error(e)}))})).catch((e=>{}))},onCancel:this.onCancel,className:"questModal",parentComponent:this})}savebtnFn(e,t,i){let l=this,s=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:$s,lineNumber:445,columnNumber:16},this),onConfirm:()=>{"\u516c\u53f8"==i?Object(a.kc)(s,{company_name:t.company_name}).then((e=>{Object(a.Wb)(e,((e,t)=>{l.setState({visibleId:"",opertip:"\u53d6\u6d88"}),c.a.clear(),c.a.success(t),l.getCompanyFn(),l.setState({companyBtn:!0})}),(e=>{c.a.error(e)}))})).catch((e=>{})):"\u90e8\u95e8"==i?Object(a.oc)(s,{department_name:t.department_name}).then((e=>{Object(a.Wb)(e,((e,t)=>{l.setState({visibleId:"",opertip:"\u53d6\u6d88"}),c.a.clear(),c.a.success(t),l.getDepartmentFn(l.state.companyName),l.setState({departmentBtn:!0})}),(e=>{c.a.error(e)}))})).catch((e=>{})):Object(a.qc)(s,{job_name:t.job_name}).then((e=>{Object(a.Wb)(e,((e,t)=>{l.setState({visibleId:"",opertip:"\u53d6\u6d88"}),l.getDepartmentJobFn(l.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,l=t.id;this.setState({opertip:"\u7f16\u8f91",vistype:i,visibleId:l}),"\u516c\u53f8"==i?(a=t.company_name,this.setState({visibletip:a,companyBtn:!1,companyName:t.id}),this.state.companyName==l&&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==l&&e.target.parentNode.parentNode.children[0].focus()):(a=t.job_name,this.setState({visibletip:a,postBtn:!1,jobName:t.id}),this.state.jobName==l&&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(Ys.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(Ys.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(Ys.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,l=document.createElement("div");l.className=t+" newitem",l.innerHTML=`\n \n

\u53d6\u6d88\u4fdd\u5b58

\n `,i.appendChild(l),"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:$s,lineNumber:649,columnNumber:17},this),Object(h.jsxDEV)("div",{className:"addList"},void 0,!1,{fileName:$s,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:$s,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\r ",onClick:t=>this.cancelbtnFn(t,e,"\u516c\u53f8"),children:"\u53d6\u6d88"},void 0,!1,{fileName:$s,lineNumber:682,columnNumber:31},this),Object(h.jsxDEV)("span",{className:"operation\r ",onClick:t=>this.savebtnFn(t,e,"\u516c\u53f8"),children:"\u4fdd\u5b58"},void 0,!1,{fileName:$s,lineNumber:689,columnNumber:31},this)]},void 0,!0,{fileName:$s,lineNumber:681,columnNumber:29},this):Object(h.jsxDEV)("p",{children:[1!=e.id?Object(h.jsxDEV)("span",{className:"del\r ",onClick:t=>this.delbtnFn(t,e,"\u516c\u53f8"),children:"\u5220\u9664"},void 0,!1,{fileName:$s,lineNumber:700,columnNumber:33},this):null,Object(h.jsxDEV)("span",{className:"operation\r ",onClick:t=>this.editbtnFn(t,e,"\u516c\u53f8"),children:"\u7f16\u8f91"},void 0,!1,{fileName:$s,lineNumber:708,columnNumber:31},this)]},void 0,!0,{fileName:$s,lineNumber:698,columnNumber:29},this)]},t,!0,{fileName:$s,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:$s,lineNumber:721,columnNumber:21},this)},void 0,!1,{fileName:$s,lineNumber:653,columnNumber:17},this)]},void 0,!0,{fileName:$s,lineNumber:648,columnNumber:15},this)},void 0,!1,{fileName:$s,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:$s,lineNumber:728,columnNumber:17},this),Object(h.jsxDEV)("div",{className:"addList"},void 0,!1,{fileName:$s,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:$s,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\r ",onClick:t=>this.cancelbtnFn(t,e,"\u90e8\u95e8"),children:"\u53d6\u6d88"},void 0,!1,{fileName:$s,lineNumber:761,columnNumber:31},this),Object(h.jsxDEV)("span",{className:"operation\r ",onClick:t=>this.savebtnFn(t,e,"\u90e8\u95e8"),children:"\u4fdd\u5b58"},void 0,!1,{fileName:$s,lineNumber:768,columnNumber:31},this)]},void 0,!0,{fileName:$s,lineNumber:760,columnNumber:29},this):Object(h.jsxDEV)("p",{children:[Object(h.jsxDEV)("span",{className:"del\r ",onClick:t=>this.delbtnFn(t,e,"\u90e8\u95e8"),children:"\u5220\u9664"},void 0,!1,{fileName:$s,lineNumber:778,columnNumber:31},this),Object(h.jsxDEV)("span",{className:"operation\r ",onClick:t=>this.editbtnFn(t,e,"\u90e8\u95e8"),children:"\u7f16\u8f91"},void 0,!1,{fileName:$s,lineNumber:785,columnNumber:31},this)]},void 0,!0,{fileName:$s,lineNumber:777,columnNumber:29},this)]},t,!0,{fileName:$s,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:$s,lineNumber:798,columnNumber:21},this):null},void 0,!1,{fileName:$s,lineNumber:732,columnNumber:17},this)]},void 0,!0,{fileName:$s,lineNumber:727,columnNumber:15},this)},void 0,!1,{fileName:$s,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:$s,lineNumber:805,columnNumber:17},this),Object(h.jsxDEV)("div",{className:"addList"},void 0,!1,{fileName:$s,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:$s,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\r ",onClick:t=>this.cancelbtnFn(t,e,"\u5c97\u4f4d"),children:"\u53d6\u6d88"},void 0,!1,{fileName:$s,lineNumber:837,columnNumber:31},this),Object(h.jsxDEV)("span",{className:"operation\r ",onClick:t=>this.savebtnFn(t,e,"\u5c97\u4f4d"),children:"\u4fdd\u5b58"},void 0,!1,{fileName:$s,lineNumber:844,columnNumber:31},this)]},void 0,!0,{fileName:$s,lineNumber:836,columnNumber:29},this):Object(h.jsxDEV)("p",{children:[Object(h.jsxDEV)("span",{className:"del\r ",onClick:t=>this.delbtnFn(t,e,"\u5c97\u4f4d"),children:"\u5220\u9664"},void 0,!1,{fileName:$s,lineNumber:854,columnNumber:31},this),Object(h.jsxDEV)("span",{className:"operation\r ",onClick:t=>this.editbtnFn(t,e,"\u5c97\u4f4d"),children:"\u7f16\u8f91"},void 0,!1,{fileName:$s,lineNumber:861,columnNumber:31},this)]},void 0,!0,{fileName:$s,lineNumber:853,columnNumber:29},this)]},void 0,!0,{fileName:$s,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:$s,lineNumber:874,columnNumber:21},this)},void 0,!1,{fileName:$s,lineNumber:809,columnNumber:17},this)]},void 0,!0,{fileName:$s,lineNumber:804,columnNumber:15},this)},void 0,!1,{fileName:$s,lineNumber:803,columnNumber:13},this)]},void 0,!0,{fileName:$s,lineNumber:646,columnNumber:11},this)},void 0,!1,{fileName:$s,lineNumber:645,columnNumber:9},this)},void 0,!1,{fileName:$s,lineNumber:644,columnNumber:7},this)}}i(273);var Gs="D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\pages\\system\\subAccount\\add\\adduserinfo\\tree.js";class Qs 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.Tb)(t).then((t=>{Object(a.Wb)(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:Gs,lineNumber:98,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:Gs,lineNumber:100,columnNumber:13},this)},void 0,!1,{fileName:Gs,lineNumber:99,columnNumber:11},this)]},void 0,!0,{fileName:Gs,lineNumber:97,columnNumber:9},this),Object(h.jsxDEV)(Es.a,{checkable:!0,size:"medium",data:this.state.menu_data,onCheck:this.onCheck,checkedKeys:e,disabledCheckedKeys:t},void 0,!1,{fileName:Gs,lineNumber:105,columnNumber:9},this)]},void 0,!0,{fileName:Gs,lineNumber:96,columnNumber:7},this)}}var Zs="D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\pages\\system\\subAccount\\add\\adduserinfo\\adduserinfo.js";class Xs 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 l,s,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===(l=r.department)||void 0===l?void 0:l.id,text:null===(s=r.department)||void 0===s?void 0:s.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.ab)({company_id:m.company.key}).then((t=>{Object(a.Wb)(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.bb)({department_id:m.deparment.key}).then((t=>{Object(a.Wb)(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,l=this;e?G.a.confirm({type:"warning",closeBtn:!0,title:"\u786e\u8ba4\u64cd\u4f5c",content:0==l.props.enumer?Object(h.jsxDEV)("p",{children:["\u662f\u5426\u65b0\u589e",Object(h.jsxDEV)("b",{children:["[",i.user_name,"]"]},void 0,!0,{fileName:Zs,lineNumber:142,columnNumber:19},this),"\u8d26\u53f7\uff1f"]},void 0,!0,{fileName:Zs,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:Zs,lineNumber:146,columnNumber:19},this),"\u8d26\u53f7\u4fe1\u606f\uff1f"]},void 0,!0,{fileName:Zs,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(l.state.headImg&&(e.head=l.state.headImg),0==l.props.enumer)Object(a.ic)(e).then((e=>{Object(a.Wb)(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=l.state.id;delete e.password,e.head=l.state.headImg,Object(a.yc)(t,e).then((e=>{Object(a.Wb)(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.fd)(i).then((e=>{Object(a.Wb)(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({departmentJob:[],departmentList:[],model:i}),Object(a.ab)({company_id:e.key}).then((e=>{Object(a.Wb)(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({departmentJob:[],departmentList:[]})}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,departmentJob:[]}),e?Object(a.bb)({department_id:e.key}).then((e=>{Object(a.Wb)(e,((e,i)=>{let a=e.map((e=>({key:e.id,text:e.job_name}))),l=this.state.model;l.post="",t.setState({model:l,departmentJob:a})}),(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.X)().then((t=>{Object(a.Wb)(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.Ab)().then((t=>{Object(a.Wb)(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:Zs,lineNumber:394,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)(s.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)(l.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:Zs,lineNumber:431,columnNumber:17},this)},void 0,!1,{fileName:Zs,lineNumber:430,columnNumber:15},this),Object(h.jsxDEV)(l.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:Zs,lineNumber:453,columnNumber:17},this)},void 0,!1,{fileName:Zs,lineNumber:452,columnNumber:15},this),Object(h.jsxDEV)(l.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:Zs,lineNumber:475,columnNumber:17},this)},void 0,!1,{fileName:Zs,lineNumber:474,columnNumber:15},this),Object(h.jsxDEV)(l.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:Zs,lineNumber:503,columnNumber:17},this)},void 0,!1,{fileName:Zs,lineNumber:502,columnNumber:15},this),Object(h.jsxDEV)(l.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),Ut.a.emit("change","company",e)}},void 0,!1,{fileName:Zs,lineNumber:524,columnNumber:17},this)},void 0,!1,{fileName:Zs,lineNumber:523,columnNumber:15},this),Object(h.jsxDEV)(l.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),Ut.a.emit("change","deparment",e)}},void 0,!1,{fileName:Zs,lineNumber:535,columnNumber:17},this)},void 0,!1,{fileName:Zs,lineNumber:534,columnNumber:15},this),Object(h.jsxDEV)(l.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),Ut.a.emit("change","post",e)}},void 0,!1,{fileName:Zs,lineNumber:547,columnNumber:17},this)},void 0,!1,{fileName:Zs,lineNumber:546,columnNumber:15},this),Object(h.jsxDEV)(l.a,{required:"",labelname:"\u8bbe\u7f6e\u6743\u9650",myClassName:"rolechoose",id:"station",children:Object(h.jsxDEV)(Qs,{ref:"roletree",rules:this.state.ruleId,enum:this.props.enumer},void 0,!1,{fileName:Zs,lineNumber:559,columnNumber:17},this)},void 0,!1,{fileName:Zs,lineNumber:558,columnNumber:15},this)]},void 0,!0,{fileName:Zs,lineNumber:429,columnNumber:13},this),Object(h.jsxDEV)("div",{className:"mypic",children:[Object(h.jsxDEV)("b",{children:"\u5934\u50cf"},void 0,!1,{fileName:Zs,lineNumber:563,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:Zs,lineNumber:566,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:Zs,lineNumber:578,columnNumber:19},this)},void 0,!1,{fileName:Zs,lineNumber:564,columnNumber:15},this)]},void 0,!0,{fileName:Zs,lineNumber:562,columnNumber:13},this)]},void 0,!0,{fileName:Zs,lineNumber:428,columnNumber:11},this)},void 0,!1,{fileName:Zs,lineNumber:427,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:Zs,lineNumber:596,columnNumber:11},this),Object(h.jsxDEV)(u.a,{type:"normal",htmlType:"reset",onClick:this.cancel.bind(this),children:"\u53d6\u6d88"},void 0,!1,{fileName:Zs,lineNumber:599,columnNumber:11},this)]},void 0,!0,{fileName:Zs,lineNumber:595,columnNumber:9},this)]},void 0,!0,{fileName:Zs,lineNumber:426,columnNumber:7},this)}}i(274);var en="D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\pages\\system\\subAccount\\add\\add.js";class tn 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)(Xs,{enumer:this.state.enumer,rowData:this.state.rowData,title:this.state.pagetitle},void 0,!1,{fileName:en,lineNumber:24,columnNumber:11},this)},void 0,!1,{fileName:en,lineNumber:23,columnNumber:9},this)},void 0,!1,{fileName:en,lineNumber:22,columnNumber:7},this)}}i(275);var an="D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\pages\\system\\subAccount\\list\\modifypwd.js";function ln(e,t){return e!==t.getSectionValue("password").password?{name:"passwordEqual",message:"\u4e24\u6b21\u586b\u5199\u7684\u5bc6\u7801\u4e0d\u4e00\u81f4"}:null}var sn=e=>{const t=bi.a.useForm(pi.b.View),[i,l]=m.a.useState("password"),[s,n]=m.a.useState("password"),o=m.a.useCallback((t=>{const i=t.getValue();if(i){let t=Object(de.a)(i);Object(a.Dc)(e.id,t).then((t=>{Object(a.Wb)(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:()=>{l("password"==i?"text":"password")}},void 0,!1,{fileName:an,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:an,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"==s?"eye-o":"closed-eye",onClick:()=>{n("password"==s?"text":"password")}},void 0,!1,{fileName:an,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"),ln],props:{type:"password"==s?"password":"text",maxLength:16,autoComplete:"new-password"}},void 0,!1,{fileName:an,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:an,lineNumber:101,columnNumber:9},void 0),",",Object(h.jsxDEV)(u.a,{onClick:()=>{e.visibleShow(!1)},children:"\u53d6\u6d88"},void 0,!1,{fileName:an,lineNumber:104,columnNumber:10},void 0)]},void 0,!0,{fileName:an,lineNumber:100,columnNumber:7},void 0)]},void 0,!0,{fileName:an,lineNumber:60,columnNumber:5},void 0)},nn="D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\pages\\system\\subAccount\\list\\list.js";const on=[{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 rn 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,l={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:nn,lineNumber:127,columnNumber:11},this),"\u8d26\u53f7\uff1f"]},void 0,!0,{fileName:nn,lineNumber:125,columnNumber:9},this),onConfirm:()=>{Object(a.vc)(t.id,l).then((e=>{Object(a.Wb)(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:nn,lineNumber:176,columnNumber:15},this),"\uff1f"]},void 0,!0,{fileName:nn,lineNumber:175,columnNumber:9},this),onConfirm:()=>{Object(a.o)(t.id).then((e=>{Object(a.Wb)(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.X)().then((e=>{Object(a.Wb)(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:l}=e.state,s={page:t,limit:i};l&&(s.search=l),Object(a.Ub)(sessionStorage.getItem("subaid"),s).then((t=>{Object(a.Wb)(t,((t,i)=>{const a=t.data,{total:l}=t;e.setState({accList:a,total:l})}),(e=>{c.a.error(e)}))})).catch((e=>{}))}getAccountFn(){let e=this,{page:t,limit:i,search:l}=e.state,s={page:t,limit:i};l&&(s.search=l),Object(a.Fb)(s).then((t=>{Object(a.Wb)(t,((t,i)=>{const a=t.data,{total:l}=t;e.setState({accList:a,total:l})}),(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)(Lt,{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:nn,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:nn,lineNumber:382,columnNumber:15},this)]},void 0,!0,{fileName:nn,lineNumber:377,columnNumber:13},this),Object(h.jsxDEV)("div",{className:"table-container",children:Object(h.jsxDEV)(T,{spliteColor:"#fff",tableData:this.state.accList,Column:on,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:nn,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:nn,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:nn,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:nn,lineNumber:437,columnNumber:25},this)]},void 0,!0,{fileName:nn,lineNumber:430,columnNumber:23},this):void 0},void 0,!1,{fileName:nn,lineNumber:398,columnNumber:15},this)},void 0,!1,{fileName:nn,lineNumber:397,columnNumber:13},this)]},void 0,!0,{fileName:nn,lineNumber:376,columnNumber:11},this)},void 0,!1,{fileName:nn,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)(sn,{visibleShow:e=>this.setVisible(e),id:this.state.id},void 0,!1,{fileName:nn,lineNumber:456,columnNumber:13},this)},void 0,!1,{fileName:nn,lineNumber:455,columnNumber:11},this)},void 0,!1,{fileName:nn,lineNumber:449,columnNumber:9},this)]},void 0,!0,{fileName:nn,lineNumber:373,columnNumber:7},this)}}i(276);var mn="D:\\project\\\u8425\u9500\u7cfb\u7edf\\frontend\\src\\pages\\system\\systemMould\\main.js";const cn=[{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 dn 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,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.Gb)(e).then((e=>{Object(a.Wb)(e,((e,t)=>{this.setState({dataCount:e.total,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:mn,lineNumber:175,columnNumber:15},this),"\uff1f"]},void 0,!0,{fileName:mn,lineNumber:174,columnNumber:9},this),onConfirm:()=>{Object(a.y)(t.id).then((e=>{Object(a.Wb)(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)(Lt,{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:mn,lineNumber:210,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:mn,lineNumber:221,columnNumber:13},this)]},void 0,!0,{fileName:mn,lineNumber:209,columnNumber:11},this),Object(h.jsxDEV)("div",{className:"code-table",children:Object(h.jsxDEV)(T,{spliteColor:"#fff",tableData:this.state.distdata,Column:cn,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:mn,lineNumber:261,columnNumber:25},this),children:Object(h.jsxDEV)("img",{src:t.thumb,alt:"",style:{width:"30px",height:"30px"}},void 0,!1,{fileName:mn,lineNumber:268,columnNumber:23},this)},void 0,!1,{fileName:mn,lineNumber:257,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:mn,lineNumber:284,columnNumber:23},this)," ",Object(h.jsxDEV)("a",{onClick:e=>{this.delFn(e,t)},className:"grid-link",children:[" ","\u5220\u9664"," "]},void 0,!0,{fileName:mn,lineNumber:293,columnNumber:23},this)]},void 0,!0,{fileName:mn,lineNumber:283,columnNumber:21},this):void 0},void 0,!1,{fileName:mn,lineNumber:237,columnNumber:13},this)},void 0,!1,{fileName:mn,lineNumber:236,columnNumber:11},this)]},void 0,!0,{fileName:mn,lineNumber:208,columnNumber:9},this)},void 0,!1,{fileName:mn,lineNumber:207,columnNumber:7},this)}}const un=[{path:"/home/exchangepage",component:Na},{path:"/home/plan-message",component:function(){const[e,t]=Object(R.a)({tableData:[],backupTableData:[],tabs:[{title:"\u63d0\u793a\u5217\u8868"}],planId:sessionStorage.getItem("plan_id")});return Object(r.useEffect)((()=>{t({tableData:Object(de.a)(ss),backupTableData:Object(de.a)(ss)}),Object(a.S)(e.planId)}),[]),Object(h.jsxDEV)("div",{className:"planMessages",children:[Object(h.jsxDEV)(Lt,{tabs:e.tabs,children:Object(h.jsxDEV)(T,{spliteColor:"#fff",isShowPageBar:!1,isSwitch:!1,isMultiple:!1,countbarVisible:!1,tableData:e.tableData,Column:[{title:"\u8303\u56f4",prop:"typeText",name:"typeText",type:"normal",width:"200px"},{title:"\u89e6\u53d1\u539f\u56e0",name:"statusText",prop:"statusText",type:"normal",width:"300px"},{title:"\u53ef\u7528\u53d8\u91cf",name:"variables",prop:"variables",type:"slot",width:"200px"},{title:"\u9ed8\u8ba4\u63d0\u793a",name:"defaultPrompt",prop:"defaultPrompt",type:"normal",width:"450px"},{title:"\u5b9a\u5236\u63d0\u793a",prop:"customizePrompt",name:"customizePrompt",type:"slot",width:"520px"}],maxheight:670,ComponentHandler:(i,a)=>"customizePrompt"===i?Object(h.jsxDEV)(n.a,{onChange:i=>{a.customizePrompt=i,t({...e})},onClearItem:()=>{a.customizePrompt="",t({...e})},value:a.customizePrompt,placeholder:"\u8bf7\u8f93\u5165\uff08\u8bf7\u52ff\u8f93\u5165\u8fc7\u957f\u6587\u6848\uff0c\u4ee5\u9632C\u7aef\u5f39\u7a97\u5c55\u793a\u5f02\u5e38\uff0c\u53d8\u91cf\u4f7f\u7528 ${xx} \u683c\u5f0f\u3002\uff09",labelWidth:"0px",countShow:!1,disabled:a.readOnly,height:"36px",width:"400px",alignment:"left"},void 0,!1,{fileName:ls,lineNumber:168,columnNumber:17},this):"variables"===i?Object(h.jsxDEV)("div",{children:[Object(h.jsxDEV)("p",{className:"variable",children:["\u5f00\u59cb\u65f6\u95f4: ",Object(h.jsxDEV)("span",{children:"${start_time}"},void 0,!1,{fileName:ls,lineNumber:193,columnNumber:27},this)]},void 0,!0,{fileName:ls,lineNumber:192,columnNumber:19},this),Object(h.jsxDEV)("p",{className:"variable",children:["\u7ed3\u675f\u65f6\u95f4: ",Object(h.jsxDEV)("span",{children:"${end_time}"},void 0,!1,{fileName:ls,lineNumber:196,columnNumber:27},this)]},void 0,!0,{fileName:ls,lineNumber:195,columnNumber:19},this)]},void 0,!0,{fileName:ls,lineNumber:191,columnNumber:17},this):void 0},void 0,!1,{fileName:ls,lineNumber:156,columnNumber:9},this)},void 0,!1,{fileName:ls,lineNumber:155,columnNumber:7},this),Object(h.jsxDEV)("div",{className:"button_box",children:[Object(h.jsxDEV)(u.a,{type:"primary",onClick:function(){const t=[];e.tableData.map((i=>{e.backupTableData.map((e=>{i.id===e.id&&i.customizePrompt!==e.customizePrompt&&t.push(i)}))}))},children:"\u63d0\u4ea4"},void 0,!1,{fileName:ls,lineNumber:205,columnNumber:9},this),Object(h.jsxDEV)(u.a,{type:"normal",onClick:()=>window.history.go(-1),children:"\u53d6\u6d88"},void 0,!1,{fileName:ls,lineNumber:208,columnNumber:9},this)]},void 0,!0,{fileName:ls,lineNumber:204,columnNumber:7},this)]},void 0,!0,{fileName:ls,lineNumber:154,columnNumber:5},this)}},{path:"/home/settlementList",component:Za},{path:"/home/packageDetail",component:tl},{path:"/home/mytempMould",component:ya},{path:"/home/myexchangetemplate",component:ga},{path:"/home/order-list",component:Wa},{path:"/home/download-orderlist",component:ka},{path:"/home/order-addetails",component:Ra},{path:"/home/plan",component:as},{path:"/home/plan-list",component:is},{path:"/home/plan-qrcode",component:os},{path:"/home/plan-create",component:yl},{path:"/home/plan-edit",component:Dl},{path:"/home/plan-edit-copy",component:Vl},{path:"/home/key-list",component:Bl},{path:"/home/plan-keyList",component:Ql},{path:"/home/key-addEdit",component:Cl},{path:"/home/key-detail",component:Tl},{path:"/home/key-log",component:Hl},{path:"/home/system/account-add",component:ds},{path:"/home/system/subaccount-list",component:rn},{path:"/home/system/subaccount-add",component:tn},{path:"/home/system/role-list",component:Ks},{path:"/home/system/role-add",component:Js},{path:"/home/system/station",component:Us},{path:"/home/system/customize",component:Ds},{path:"/home/system/menu",component:Ps},{path:"/home/system/my-mould",component:dn},{path:"/home/distributor-list",component:Oi},{path:"/home/distributor-add",component:si},{path:"/home/distributor-edit",component:si},{path:"/home/distributor-merchant",component:function(){var e,t,i,m,b;const[p,N]=Object(R.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.P)().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)(s.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)(l.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)(l.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)(l.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)(l.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)(l.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)(l.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)(l.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)($t.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)(l.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.L)({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)(l.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)(l.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)(l.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)(l.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)(l.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.ad)(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:_s},{path:"/home/exchangecode-exchangecodeAdd",component:Ji},{path:"/home/combiningAdd",component:ia},{path:"/home/coupon-list",component:Yt},{path:"/home/coupon-add-edit",component:It},{path:"/home/coupon-commodity",component:Wt},{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.Pc)(e).then((e=>{const{voucher_notify_url:a,voucher_receive_url:l}=e.data;i({...t,voucher_status_notify:a,voucher_receive_notify:l})}))}()}),[]),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)(s.a,{model:t,ref:e,children:[Object(h.jsxDEV)(l.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)(l.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:l,voucher_receive_notify:s}=t;if(l&&!e.test(l))return c.a.warn("\u8bf7\u5165\u5408\u6cd5\u7684\u5238\u72b6\u6001\u901a\u77e5\u5730\u5740\uff01");if(s&&!e.test(s))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.bd)(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.Zc)(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.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})}))}},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)}}],hn=["/home/extension","/home/plan-create","/home/mytempMould","/home/edittemplate"],bn=[{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"]}]}]},438:function(e,t,i){},510:function(e,t,i){"use strict";i.r(t),i.d(t,"default",(function(){return N}));var a=i(59),l=i(277),s=i(508),n=i(456);let o=[];function r(e=[]){e.map((e=>{e.children&&e.children.length?r(e.children):e.code&&(Object(s.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:l,router:s,level:n,children:o}=e;t.push({id:i,title:a,icon:l,router:s,level:n,children:o?m(o):void 0})}})),t}function c(e){o=e;const t=Object(n.a)(l.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(391),h=i(211),b=(i(438),i(10)),p="D:\\project\\\u8425\u9500\u7cfb\u7edf\\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.Mb)().then((e=>{e?sessionStorage.setItem("isEarlyWarningMan",!0):sessionStorage.setItem("isEarlyWarningMan",!1)}))}onSubmit(e,t){Object(a.sc)({authorization:e,head:t}).then((e=>{Object(a.Wb)(e,((e,t)=>{Object(a.O)().then((e=>{Object(a.Wb)(e,((e,t)=>{sessionStorage.setItem("enmu",JSON.stringify(e))}))})),Object(a.U)().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(l){}}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.vb)().then((e=>{Object(a.Wb)(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.ea574933.chunk.js.LICENSE.txt b/build/static/js/7.ea574933.chunk.js.LICENSE.txt deleted file mode 100644 index ce12c4d1..00000000 --- a/build/static/js/7.ea574933.chunk.js.LICENSE.txt +++ /dev/null @@ -1,13 +0,0 @@ -//! 1:直冲 2:立减金 3:红包 - -//!type 1:权益商品 2:立减金 3:红包 - -//!以下注释相关路由、组件(未使用/引用)待系统稳定上线运行一个版本后,请进行相关代码、文件删除 - -//!以下注释相关路由(未使用/引用)待系统稳定上线运行一个版本后,请进行相关代码、文件删除 - -//!提取动态删除核销状态条件 - -//!状态筛选 - -//!获取订单列表 diff --git a/build/static/js/runtime-main.31034e9a.js b/build/static/js/runtime-main.31034e9a.js deleted file mode 100644 index 18a44d4b..00000000 --- a/build/static/js/runtime-main.31034e9a.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){function t(t){for(var n,o,c=t[0],i=t[1],f=t[2],s=0,d=[];s