包含后厨 团餐 门店分支
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

2 lines
41 KiB

  1. (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[7657],{66247:function(){},16873:function(Pt,Be,c){"use strict";c.r(Be),c.d(Be,{default:function(){return Dr}});var ee=c(71194),pe=c(50146),be=c(38663),De=c(66247),Ie=c(57663),yt=c(63185),xe=c(59250),St=c(13254),Ge=c(47673),Ot=c(14781),Q=c(96156),he=c(85061),O=c(22122),Le=c(6610),fe=c(5991),Pe=c(10379),ve=c(44144),je=c(94184),le=c.n(je),l=c(67294),U=c(53124),ce=c(88258),A=c(65223),me=c(42051),Zt=c(85636),Ct=c(9708),Ft=c(57254),jt=c(98423),wt=c(9676),Nt=c(13013),Ut=c(96159),Wt=c(90484),zt=c(36138),Mt=c(93355),Vt=c(73171),Yt=c(34952),Ht=function(n){var s,t=n.renderedText,e=n.renderedEl,o=n.item,d=n.checked,i=n.disabled,p=n.prefixCls,a=n.onClick,u=n.onRemove,f=n.showRemove,Z=le()((s={},(0,Q.Z)(s,"".concat(p,"-content-item"),!0),(0,Q.Z)(s,"".concat(p,"-content-item-disabled"),i||o.disabled),(0,Q.Z)(s,"".concat(p,"-content-item-checked"),d),s)),D;return(typeof t=="string"||typeof t=="number")&&(D=String(t)),l.createElement(me.Z,{componentName:"Transfer",defaultLocale:Zt.Z.Transfer},function(y){var k={className:Z,title:D},x=l.createElement("span",{className:"".concat(p,"-content-item-text")},e);return f?l.createElement("li",(0,O.Z)({},k),x,l.createElement(Yt.Z,{disabled:i||o.disabled,className:"".concat(p,"-content-item-remove"),"aria-label":y.remove,onClick:function(){u==null||u(o)}},l.createElement(Vt.Z,null))):(k.onClick=i||o.disabled?void 0:function(){return a(o)},l.createElement("li",(0,O.Z)({},k),l.createElement(wt.Z,{className:"".concat(p,"-checkbox"),checked:d,disabled:i||o.disabled}),x))})},Jt=l.memo(Ht),Qt=(0,Mt.b)("handleFilter","handleClear","checkedKeys");function Ne(r){if(!r)return null;var n={pageSize:10,simple:!0,showSizeChanger:!1,showLessItems:!1};return(0,Wt.Z)(r)==="object"?(0,O.Z)((0,O.Z)({},n),r):n}var Xt=function(r){(0,Pe.Z)(s,r);var n=(0,ve.Z)(s);function s(){var t;return(0,Le.Z)(this,s),t=n.apply(this,arguments),t.state={current:1},t.onItemSelect=function(e){var o=t.props,d=o.onItemSelect,i=o.selectedKeys,p=i.includes(e.key);d(e.key,!p)},t.onItemRemove=function(e){var o=t.props.onItemRemove;o==null||o([e.key])},t.onPageChange=function(e){t.setState({current:e})},t.getItems=function(){var e=t.state.current,o=t.props,d=o.pagination,i=o.filteredRenderItems,p=Ne(d),a=i;return p&&(a=i.slice((e-1)*p.pageSize,e*p.pageSize)),a},t}return(0,fe.Z)(s,[{key:"render",value:function(){var e=this,o=this.state.current,d=this.props,i=d.prefixCls,p=d.onScroll,a=d.filteredRenderItems,u=d.selectedKeys,f=d.disabled,Z=d.showRemove,D=d.pagination,y=Ne(D),k=null;return y&&(k=l.createElement(zt.Z,{simple:y.simple,showSizeChanger:y.showSizeChanger,showLessItems:y.showLessItems,size:"small",disabled:f,className:"".concat(i,"-pagination"),total:a.length,pageSize:y.pageSize,current:o,onChange:this.onPageChange})),l.createElement(l.Fragment,null,l.createElement("ul",{className:le()("".concat(i,"-content"),(0,Q.Z)({},"".concat(i,"-content-show-remove"),Z)),onScroll:p},this.getItems().map(function(x){var P=x.renderedEl,z=x.renderedText,N=x.item,F=N.disabled,X=u.includes(N.key);return l.createElement(Jt,{disabled:f||F,key:N.key,item:N,renderedText:z,renderedEl:P,checked:X,prefixCls:i,onClick:e.onItemSelect,onRemove:e.onItemRemove,showRemove:Z})})),k)}}],[{key:"getDerivedStateFromProps",value:function(e,o){var d=e.filteredRenderItems,i=e.pagination,p=o.current,a=Ne(i);if(a){var u=Math.ceil(d.length/a.pageSize);if(p>u)return{current:u}}return null}}]),s}(l.Component),_t=Xt,qt=c(76570),Ke=c(4107);function bt(r){var n=r.placeholder,s=n===void 0?"":n,t=r.value,e=r.prefixCls,o=r.disabled,d=r.onChange,i=r.handleClear,p=l.useCallback(function(a){d==null||d(a),a.target.value===""&&(i==null||i())},[d]);return l.createElement(Ke.Z,{placeholder:s,className:e,value:t,onChange:p,disabled:o,allowClear:!0,prefix:l.createElement(qt.Z,null)})}var er=function(){return null};function tr(r){return!!(r&&!(0,Ut.l$)(r)&&Object.prototype.toString.call(r)==="[object Object]")}function Te(r){return r.filter(function(n){return!n.disabled}).map(function(n){return n.key})}var Ue=function(r){(0,Pe.Z)(s,r);var n=(0,ve.Z)(s);function s(t){var e;return(0,Le.Z)(this,s),e=n.call(this,t),e.defaultListBodyRef=l.createRef(),e.handleFilter=function(o){var d=e.props.handleFilter,i=o.target.value;e.setState({filterValue:i}),d(o)},e.handleClear=function(){var o=e.props.handleClear;e.setState({filterValue:""}),o()},e.matchFilter=function(o,d){var i=e.state.filterValue,p=e.props.filterOption;return p?p(i,d):o.includes(i)},e.renderListBody=function(o,d){var i=o?o(d):null,p=!!i;return p||(i=l.createElement(_t,(0,O.Z)({ref:e.defaultListBodyRef},d))),{customize:p,bodyContent:i}},e.renderItem=function(o){var d=e.props.render,i=d===void 0?er:d,p=i(o),a=tr(p);return{renderedText:a?p.value:p,renderedEl:a?p.label:p,item:o}},e.getSelectAllLabel=function(o,d){var i=e.props,p=i.itemsUnit,a=i.itemUnit,u=i.selectAllLabel;if(u)return typeof u=="function"?u({selectedCount:o,totalCount:d}):u;var f=d>1?p:a;return l.createElement(l.Fragment,null,(o>0?"".concat(o,"/"):"")+d," ",f)},e.state={filterValue:""},e}return(0,fe.Z)(s,[{key:"componentWillUnmount",value:function(){clearTimeout(this.triggerScrollTimer)}},{key:"getCheckStatus",value:function(e){var o=this.props.checkedKeys;return o.length===0?"none":e.every(function(d){return o.includes(d.key)||!!d.disabled})?"all":"part"}},{key:"getFilteredItems",value:function(e,o){var d=this,i=[],p=[];return e.forEach(function(a){var u=d.renderItem(a),f=u.renderedText;if(o&&!d.matchFilter(f,a))return null;i.push(a),p.push(u)}),{filteredItems:i,filteredRenderItems:p}}},{key:"getListBody",value:function(e,o,d,i,p,a,u,f,Z,D){var y=this,k=Z?l.createElement("div",{className:"".concat(e,"-body-search-wrapper")},l.createElement(bt,{prefixCls:"".concat(e,"-search"),onChange:this.handleFilter,handleClear:this.handleClear,placeholder:o,value:d,disabled:D})):null,x=this.renderListBody(f,(0,O.Z)((0,O.Z)({},(0,jt.Z)(this.props,Qt)),{filteredItems:i,filteredRenderItems:a,selectedKeys:u})),P=x.bodyContent,z=x.customize,N=function(){var L=y.props.direction==="left"?0:1;return Array.isArray(p)?p[L]:p},F;return z?F=l.createElement("div",{className:"".concat(e,"-body-customize-wrapper")},P):F=i.length?P:l.createElement("div",{className:"".concat(e,"-body-not-found")},N()),l.createElement("div",{className:le()(Z?"".concat(e,"-body ").concat(e,"-body-with-search"):"".concat(e,"-body"))},k,F)}},{key:"getCheckBox",value:function(e){var o=e.filteredItems,d=e.onItemSelectAll,i=e.disabled,p=e.prefixCls,a=this.getCheckStatus(o),u=a==="all",f=l.createElement(wt.Z,{disabled:i,checked:u,indeterminate:a==="part",className:"".concat(p,"-checkbox"),onChange:function(){d(o.filter(function(D){return!D.disabled}).map(function(D){var y=D.key;return y}),!u)}});return f}},{key:"render",value:function(){var e,o=this,d=this.state.filterValue,i=this.props,p=i.prefixCls,a=i.dataSource,u=a===void 0?[]:a,f=i.titleText,Z=f===void 0?"":f,D=i.checkedKeys,y=i.disabled,k=i.footer,x=i.showSearch,P=x===void 0?!1:x,z=i.style,N=i.searchPlaceholder,F=i.notFoundContent,X=i.selectAll,L=i.selectCurrent,C=i.selectInvert,g=i.removeAll,S=i.removeCurrent,$=i.renderList,ne=i.onItemSelectAll,q=i.onItemRemove,se=i.showSelectAll,ge=se===void 0?!0:se,ye=i.showRemove,H=i.pagination,te=i.direction,J=k&&(k.length<2?k(this.props):k(this.props,{direction:te})),de=le()(p,(e={},(0,Q.Z)(e,"".concat(p,"-with-pagination"),!!H),(0,Q.Z)(e,"".concat(p,"-with-footer"),!!J),e)),oe=this.getFilteredItems(u,d),_=oe.filteredItems,$e=oe.filteredRenderItems,Ae=this.getListBody(p,N,d,_,F,$e,D,$,P,y),ue=J?l.createElement("div",{className:"".concat(p,"-footer")},J):null,Se=!ye&&!H&&this.getCheckBox({filteredItems:_,onItemSelectAll:ne,disabled:y,prefixCls:p}),Ze;ye?Ze=[H?{key:"removeCurrent",onClick:function(){var j,re=Te((((j=o.defaultListBodyRef.current)===null||j===void 0?void 0:j.getItems())||[]).map(function(M){return M.item}));q==null||q(re)},label:S}:null,{key:"removeAll",onClick:function(){q==null||q(Te(_))},label:g}].filter(function(ae){return ae}):Ze=[{key:"selectAll",onClick:function(){var j=Te(_);ne(j,j.length!==D.length)},label:X},H?{key:"selectCurrent",onClick:function(){var j,re=((j=o.defaultListBodyRef.current)===null||j===void 0?void 0:j.getItems())||[];ne(Te(re.map(function(M){return M.item})),!0)},label:L}:null,{key:"selectInvert",onClick:function(){var j,re;H?re=Te((((j=o.defaultListBodyRef.current)===null||j===void 0?void 0:j.getItems())||[]).map(function(we){return we.item})):re=Te(_);var M=new Set(D),Ce=[],ke=[];re.forEach(function(we){M.has(we)?ke.push(we):Ce.push(we)}),ne(Ce,!0),ne(ke,!1)},label:C}];var Ee=l.createElement(Nt.Z,{className:"".concat(p,"-header-dropdown"),menu:{items:Ze},disabled:y},l.createElement(Ft.Z,null));return l.createElement("div",{className:de,style:z},l.createElement("div",{className:"".concat(p,"-header")},ge?l.createElement(l.Fragment,null,Se,Ee):null,l.createElement("span",{className:"".concat(p,"-header-selected")},this.getSelectAllLabel(D.length,_.length)),l.createElement("span",{className:"".concat(p,"-header-title")},Z)),Ae,ue)}}]),s}(l.PureComponent),Dt=c(67724),It=c(8812),Re=c(71577),rr=function(n){var s=n.disabled,t=n.moveToLeft,e=n.moveToRight,o=n.leftArrowText,d=o===void 0?"":o,i=n.rightArrowText,p=i===void 0?"":i,a=n.leftActive,u=n.rightActive,f=n.className,Z=n.style,D=n.direction,y=n.oneWay;return l.createElement("div",{className:f,style:Z},l.createElement(Re.Z,{type:"primary",size:"small",disabled:s||!u,onClick:e,icon:D!=="rtl"?l.createElement(It.Z,null):l.createElement(Dt.Z,null)},p),!y&&l.createElement(Re.Z,{type:"primary",size:"small",disabled:s||!a,onClick:t,icon:D!=="rtl"?l.createElement(Dt.Z,null):l.createElement(It.Z,null)},d))},Tt=rr,Oe=function(r){(0,Pe.Z)(s,r);var n=(0,ve.Z)(s);function s(t){var e;(0,Le.Z)(this,s),e=n.call(this,t),e.separatedDataSource=null,e.setStateKeys=function(a,u){a==="left"?e.setState(function(f){var Z=f.sourceSelectedKeys;return{sourceSelectedKeys:typeof u=="function"?u(Z||[]):u}}):e.setState(function(f){var Z=f.targetSelectedKeys;return{targetSelectedKeys:typeof u=="function"?u(Z||[]):u}})},e.getLocale=function(a,u){var f=e.props.locale,Z=f===void 0?{}:f;return(0,O.Z)((0,O.Z)((0,O.Z)({},a),{notFoundContent:u("Transfer")}),Z)},e.moveTo=function(a){var u=e.props,f=u.targetKeys,Z=f===void 0?[]:f,D=u.dataSource,y=D===void 0?[]:D,k=u.onChange,x=e.state,P=x.sourceSelectedKeys,z=x.targetSelectedKeys,N=a==="right"?P:z,F=N.filter(function(C){return!y.some(function(g){return!!(C===g.key&&g.disabled)})}),X=a==="right"?F.concat(Z):Z.filter(function(C){return!F.includes(C)}),L=a==="right"?"left":"right";e.setStateKeys(L,[]),e.handleSelectChange(L,[]),k==null||k(X,a,F)},e.moveToLeft=function(){return e.moveTo("left")},e.moveToRight=function(){return e.moveTo("right")},e.onItemSelectAll=function(a,u,f){e.setStateKeys(a,function(Z){var D=[];return f?D=Array.from(new Set([].concat((0,he.Z)(Z),(0,he.Z)(u)))):D=Z.filter(function(y){return!u.includes(y)}),e.handleSelectChange(a,D),D})},e.onLeftItemSelectAll=function(a,u){return e.onItemSelectAll("left",a,u)},e.onRightItemSelectAll=function(a,u){return e.onItemSelectAll("right",a,u)},e.handleFilter=function(a,u){var f=e.props.onSearch,Z=u.target.value;f==null||f(a,Z)},e.handleLeftFilter=function(a){return e.handleFilter("left",a)},e.handleRightFilter=function(a){return e.handleFilter("right",a)},e.handleClear=function(a){var u=e.props.onSearch;u==null||u(a,"")},e.handleLeftClear=function(){return e.handleClear("left")},e.handleRightClear=function(){return e.handleClear("right")},e.onItemSelect=function(a,u,f){var Z=e.state,D=Z.sourceSelectedKeys,y=Z.targetSelectedKeys,k=a==="left"?(0,he.Z)(D):(0,he.Z)(y),x=k.indexOf(u);x>-1&&k.splice(x,1),f&&k.push(u),e.handleSelectChange(a,k),e.props.selectedKeys||e.setStateKeys(a,k)},e.onLeftItemSelect=function(a,u){return e.onItemSelect("left",a,u)},e.onRightItemSelect=function(a,u){return e.onItemSelect("right",a,u)},e.onRightItemRemove=function(a){var u=e.props,f=u.targetKeys,Z=f===void 0?[]:f,D=u.onChange;e.setStateKeys("right",[]),D==null||D(Z.filter(function(y){return!a.includes(y)}),"left",(0,he.Z)(a))},e.handleScroll=function(a,u){var f=e.props.onScroll;f==null||f(a,u)},e.handleLeftScroll=function(a){return e.handleScroll("left",a)},e.handleRightScroll=function(a){return e.handleScroll("right",a)},e.handleListStyle=function(a,u){return typeof a=="function"?a({direction:u}):a};var o=t.selectedKeys,d=o===void 0?[]:o,i=t.targetKeys,p=i===void 0?[]:i;return e.state={sourceSelectedKeys:d.filter(function(a){return!p.includes(a)}),targetSelectedKeys:d.filter(function(a){return p.includes(a)})},e}return(0,fe.Z)(s,[{key:"getTitles",value:function(e){var o,d;return(d=(o=this.props.titles)!==null&&o!==void 0?o:e.titles)!==null&&d!==void 0?d:[]}},{key:"handleSelectChange",value:function(e,o){var d=this.state,i=d.sourceSelectedKeys,p=d.targetSelectedKeys,a=this.props.onSelectChange;!a||(e==="left"?a(o,p):a(i,o))}},{key:"separateDataSource",value:function(){var e=this.props,o=e.dataSource,d=o===void 0?[]:o,i=e.rowKey,p=e.targetKeys,a=p===void 0?[]:p,u=[],f=new Array(a.length);return d.forEach(function(Z){i&&(Z=(0,O.Z)((0,O.Z)({},Z),{key:i(Z)}));var D=a.indexOf(Z.key);D!==-1?f[D]=Z:u.push(Z)}),{leftDataSource:u,rightDataSource:f}}},{key:"render",value:function(){var e=this;return l.createElement(me.Z,{componentName:"Transfer",defaultLocale:Zt.Z.Transfer},function(o){return l.createElement(U.C,null,function(d){var i=d.getPrefixCls,p=d.renderEmpty,a=d.direction;return l.createElement(A.aM.Consumer,null,function(u){var f,Z=u.hasFeedback,D=u.status,y=e.props,k=y.prefixCls,x=y.className,P=y.disabled,z=y.operations,N=z===void 0?[]:z,F=y.showSearch,X=F===void 0?!1:F,L=y.footer,C=y.style,g=y.listStyle,S=g===void 0?{}:g,$=y.operationStyle,ne=y.filterOption,q=y.render,se=y.children,ge=y.showSelectAll,ye=y.oneWay,H=y.pagination,te=y.status,J=i("transfer",k),de=e.getLocale(o,p||ce.Z),oe=e.state,_=oe.sourceSelectedKeys,$e=oe.targetSelectedKeys,Ae=(0,Ct.F)(D,te),ue=!se&&H,Se=e.separateDataSource(),Ze=Se.leftDataSource,Ee=Se.rightDataSource,ae=$e.length>0,j=_.length>0,re=le()(J,(f={},(0,Q.Z)(f,"".concat(J,"-disabled"),P),(0,Q.Z)(f,"".concat(J,"-customize-list"),!!se),(0,Q.Z)(f,"".concat(J,"-rtl"),a==="rtl"),f),(0,Ct.Z)(J,Ae,Z),x),M=e.getTitles(de),Ce=e.props.selectAllLabels||[];return l.createElement("div",{className:re,style:C},l.createElement(Ue,(0,O.Z)({prefixCls:"".concat(J,"-list"),titleText:M==null?void 0:M[0],dataSource:Ze,filterOption:ne,style:e.handleListStyle(S,"left"),checkedKeys:_,handleFilter:e.handleLeftFilter,handleClear:e.handleLeftClear,onItemSelect:e.onLeftItemSelect,onItemSelectAll:e.onLeftItemSelectAll,render:q,showSearch:X,renderList:se,footer:L,onScroll:e.handleLeftScroll,disabled:P,direction:a==="rtl"?"right":"left",showSelectAll:ge,selectAllLabel:Ce[0],pagination:ue},de)),l.createElement(Tt,{className:"".concat(J,"-operation"),rightActive:j,rightArrowText:N[0],moveToRight:e.moveToRight,leftActive:ae,leftArrowText:N[1],moveToLeft:e.moveToLeft,style:$,disabled:P,direction:a,oneWay:ye}),l.createElement(Ue,(0,O.Z)({prefixCls:"".concat(J,"-list"),titleText:M==null?void 0:M[1],dataSource:Ee,filterOption:ne,style:e.handleListStyle(S,"right"),checkedKeys:$e,handleFilter:e.handleRightFilter,handleClear:e.handleRightClear,onItemSelect:e.onRightItemSelect,onItemSelectAll:e.onRightItemSelectAll,onItemRemove:e.onRightItemRemove,render:q,showSearch:X,renderList:se,footer:L,onScroll:e.handleRightScroll,disabled:P,direction:a==="rtl"?"left":"right",showSelectAll:ge,selectAllLabel:Ce[1],showRemove:ye,pagination:ue},de)))})})})}}],[{key:"getDerivedStateFromProps",value:function(e){var o=e.selectedKeys,d=e.targetKeys,i=e.pagination,p=e.children;if(o){var a=d||[];return{sourceSelectedKeys:o.filter(function(u){return!a.includes(u)}),targetSelectedKeys:o.filter(function(u){return a.includes(u)})}}return null}}]),s}(l.Component);Oe.List=Ue,Oe.Operation=Tt,Oe.Search=bt;var nr=Oe,Nr=c(62350),Rt=c(24565),m=c(39428),Ur=c(34792),W=c(48086),B=c(3182),G=c(2824),$t=c(49101),ar=c(28790),lr=c(16894),Wr=c(49111),ir=c(19650),zr=c(48736),sr=c(27049),Mr=c(43358),Fe=c(34041),Vr=c(9715),ie=c(55843),V=c(48971),Y=c(96690);function or(r){return We.apply(this,arguments)}function We(){return We=(0,B.Z)((0,m.Z)().mark(function r(n){return(0,m.Z)().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",(0,V.WY)((0,Y.w)()+"/api/device/page",{method:"POST",data:n}));case 1:case"end":return t.stop()}},r)})),We.apply(this,arguments)}function ur(){return ze.apply(this,arguments)}function ze(){return ze=(0,B.Z)((0,m.Z)().mark(function r(){return(0,m.Z)().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return s.abrupt("return",(0,V.WY)((0,Y.w)()+"/api/product/list",{method:"Get"}));case 1:case"end":return s.stop()}},r)})),ze.apply(this,arguments)}function cr(r){return Me.apply(this,arguments)}function Me(){return Me=(0,B.Z)((0,m.Z)().mark(function r(n){return(0,m.Z)().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",(0,V.WY)((0,Y.w)()+"/api/device/add",{method:"POST",data:n}));case 1:case"end":return t.stop()}},r)})),Me.apply(this,arguments)}function Yr(r){return Ve.apply(this,arguments)}function Ve(){return Ve=_asyncToGenerator(_regeneratorRuntime().mark(function r(n){return _regeneratorRuntime().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",request(getDataBaseUrl()+"/api/device/PushDeviceGoods?DeviceId="+n,{method:"Get"}));case 1:case"end":return t.stop()}},r)})),Ve.apply(this,arguments)}function dr(r){return Ye.apply(this,arguments)}function Ye(){return Ye=(0,B.Z)((0,m.Z)().mark(function r(n){return(0,m.Z)().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",(0,V.WY)((0,Y.w)()+"/api/device/update",{method:"POST",data:n}));case 1:case"end":return t.stop()}},r)})),Ye.apply(this,arguments)}function Hr(r){return He.apply(this,arguments)}function He(){return He=_asyncToGenerator(_regeneratorRuntime().mark(function r(n){return _regeneratorRuntime().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",request(getDataBaseUrl()+"/api/device/CopyDevice",{method:"POST",data:n}));case 1:case"end":return t.stop()}},r)})),He.apply(this,arguments)}function At(r){return Je.apply(this,arguments)}function Je(){return Je=(0,B.Z)((0,m.Z)().mark(function r(n){return(0,m.Z)().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",(0,V.WY)((0,Y.w)()+"\u200B\u200B/api/device/delete",{method:"POST",data:n}));case 1:case"end":return t.stop()}},r)})),Je.apply(this,arguments)}function pr(){return Qe.apply(this,arguments)}function Qe(){return Qe=(0,B.Z)((0,m.Z)().mark(function r(){return(0,m.Z)().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return s.abrupt("return",(0,V.WY)((0,Y.w)()+"\u200B/api/device/getdevicetypelist",{method:"GET"}));case 1:case"end":return s.stop()}},r)})),Qe.apply(this,arguments)}function hr(r){return Xe.apply(this,arguments)}function Xe(){return Xe=(0,B.Z)((0,m.Z)().mark(function r(n){return(0,m.Z)().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",(0,V.WY)((0,Y.w)()+"\u200B/api/device/adddevicetype",{method:"POST",data:n}));case 1:case"end":return t.stop()}},r)})),Xe.apply(this,arguments)}function fr(){return _e.apply(this,arguments)}function _e(){return _e=(0,B.Z)((0,m.Z)().mark(function r(){return(0,m.Z)().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return s.abrupt("return",(0,V.WY)((0,Y.w)()+"\u200B/api/devicevesion/getdevicevesionlist",{method:"GET"}));case 1:case"end":return s.stop()}},r)})),_e.apply(this,arguments)}function Jr(r,n){return qe.apply(this,arguments)}function qe(){return qe=_asyncToGenerator(_regeneratorRuntime().mark(function r(n,s){return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",request(getDataBaseUrl()+"/api/device/GetDeviceGoods",{method:"POST",data:_objectSpread({},n)}));case 1:case"end":return e.stop()}},r)})),qe.apply(this,arguments)}function Qr(r){return et.apply(this,arguments)}function et(){return et=_asyncToGenerator(_regeneratorRuntime().mark(function r(n){return _regeneratorRuntime().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",request(getDataBaseUrl()+"/api/device/AddDeviceGood",{method:"POST",data:_objectSpread({},n)}));case 1:case"end":return t.stop()}},r)})),et.apply(this,arguments)}function Xr(r){return tt.apply(this,arguments)}function tt(){return tt=_asyncToGenerator(_regeneratorRuntime().mark(function r(n){return _regeneratorRuntime().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",request(getDataBaseUrl()+"/\u200Bapi/device/GetGoods",{method:"POST",data:_objectSpread({},n)}));case 1:case"end":return t.stop()}},r)})),tt.apply(this,arguments)}function _r(r){return rt.apply(this,arguments)}function rt(){return rt=_asyncToGenerator(_regeneratorRuntime().mark(function r(n){return _regeneratorRuntime().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",request(getDataBaseUrl()+"/\u200Bapi/device/GetByDeviceGoods",{method:"POST",data:_objectSpread({},n)}));case 1:case"end":return t.stop()}},r)})),rt.apply(this,arguments)}function qr(r){return nt.apply(this,arguments)}function nt(){return nt=_asyncToGenerator(_regeneratorRuntime().mark(function r(n){return _regeneratorRuntime().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",request(getDataBaseUrl()+"/api/device/GetDeviceStorePage",{method:"POST",data:n}));case 1:case"end":return t.stop()}},r)})),nt.apply(this,arguments)}function en(r){return at.apply(this,arguments)}function at(){return at=_asyncToGenerator(_regeneratorRuntime().mark(function r(n){return _regeneratorRuntime().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",request(getDataBaseUrl()+"/api/device/DelStockAdjust?Id=".concat(n),{method:"DELETE"}));case 1:case"end":return t.stop()}},r)})),at.apply(this,arguments)}function tn(r){return lt.apply(this,arguments)}function lt(){return lt=_asyncToGenerator(_regeneratorRuntime().mark(function r(n){return _regeneratorRuntime().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",request(getDataBaseUrl()+"/api/device/AddUpdateDeviceStocAsync",{method:"POST",data:n}));case 1:case"end":return t.stop()}},r)})),lt.apply(this,arguments)}function rn(r){return it.apply(this,arguments)}function it(){return it=_asyncToGenerator(_regeneratorRuntime().mark(function r(n){return _regeneratorRuntime().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",request(getDataBaseUrl()+"/api/device/AddUpdateDeviceStocAsync",{method:"put",data:n}));case 1:case"end":return t.stop()}},r)})),it.apply(this,arguments)}function nn(r){return st.apply(this,arguments)}function st(){return st=_asyncToGenerator(_regeneratorRuntime().mark(function r(n){return _regeneratorRuntime().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",request(getDataBaseUrl()+"/api/deviceconfig/getlocs?Code=".concat(n),{method:"GET"}));case 1:case"end":return t.stop()}},r)})),st.apply(this,arguments)}function an(r){return ot.apply(this,arguments)}function ot(){return ot=_asyncToGenerator(_regeneratorRuntime().mark(function r(n){return _regeneratorRuntime().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",request(getDataBaseUrl()+"/api/device/GetProductList",{method:"post",data:n}));case 1:case"end":return t.stop()}},r)})),ot.apply(this,arguments)}function ln(r){return ut.apply(this,arguments)}function ut(){return ut=_asyncToGenerator(_regeneratorRuntime().mark(function r(n){return _regeneratorRuntime().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",request(getDataBaseUrl()+"/\u200Bapi/FoodMenu/tree",{data:_objectSpread({},n)}));case 1:case"end":return t.stop()}},r)})),ut.apply(this,arguments)}function sn(r){return ct.apply(this,arguments)}function ct(){return ct=_asyncToGenerator(_regeneratorRuntime().mark(function r(n){return _regeneratorRuntime().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",request(getDataBaseUrl()+"/api/device/PushDevice?DeviceId=".concat(n),{method:"post"}));case 1:case"end":return t.stop()}},r)})),ct.apply(this,arguments)}function on(r){return dt.apply(this,arguments)}function dt(){return dt=_asyncToGenerator(_regeneratorRuntime().mark(function r(n){return _regeneratorRuntime().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",request(getDataBaseUrl()+"/api/device/CheckStockAdjust?DeviceId=".concat(n),{method:"POST"}));case 1:case"end":return t.stop()}},r)})),dt.apply(this,arguments)}function Et(r){return pt.apply(this,arguments)}function pt(){return pt=(0,B.Z)((0,m.Z)().mark(function r(n){return(0,m.Z)().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",(0,V.WY)((0,Y.w)()+"/api/DeviceVesion/GetDeviceVesion?productId=".concat(n),{method:"Get"}));case 1:case"end":return t.stop()}},r)})),pt.apply(this,arguments)}function vr(r){return ht.apply(this,arguments)}function ht(){return ht=(0,B.Z)((0,m.Z)().mark(function r(n){return(0,m.Z)().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",(0,V.WY)((0,Y.w)()+"/api/goods/TechnologyTemplateExport?deviceId=".concat(n),{method:"post"}));case 1:case"end":return t.stop()}},r)})),ht.apply(this,arguments)}function mr(){return ft.apply(this,arguments)}function ft(){return ft=(0,B.Z)((0,m.Z)().mark(function r(){return(0,m.Z)().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return s.abrupt("return",(0,V.WY)((0,Y.Wz)()+"/api/store/getstorelist",{method:"Get"}));case 1:case"end":return s.stop()}},r)})),ft.apply(this,arguments)}function gr(){return vt.apply(this,arguments)}function vt(){return vt=(0,B.Z)((0,m.Z)().mark(function r(){return(0,m.Z)().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return s.abrupt("return",(0,V.WY)((0,Y.w)()+"/api/goods/getgoodslist",{method:"Get"}));case 1:case"end":return s.stop()}},r)})),vt.apply(this,arguments)}function yr(r){return mt.apply(this,arguments)}function mt(){return mt=(0,B.Z)((0,m.Z)().mark(function r(n){return(0,m.Z)().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",(0,V.WY)((0,Y.Wz)()+"/api/devicepushrecode/getdevicegoods?deviceId="+n,{method:"post"}));case 1:case"end":return t.stop()}},r)})),mt.apply(this,arguments)}function Sr(r){return gt.apply(this,arguments)}function gt(){return gt=(0,B.Z)((0,m.Z)().mark(function r(n){return(0,m.Z)().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",(0,V.WY)((0,Y.Wz)()+"/api/devicepushrecode/editdevicegoods",{method:"post",data:n}));case 1:case"end":return t.stop()}},r)})),gt.apply(this,arguments)}var I=c(85893),Zr=function(n){var s=(0,l.useState)(""),t=(0,G.Z)(s,2),e=t[0],o=t[1],d=(0,l.useState)([]),i=(0,G.Z)(d,2),p=i[0],a=i[1],u=(0,l.useState)([]),f=(0,G.Z)(u,2),Z=f[0],D=f[1],y=(0,l.useState)([]),k=(0,G.Z)(y,2),x=k[0],P=k[1],z=(0,l.useRef)(null);(0,l.useEffect)(function(){var L;if(Object.keys(n.values).length>0)var C=n.deviceVersions.map(function($){return{value:$.id,label:$.vesion}});P(C);var g=n.dicData.map(function($){return{value:$.id,label:$.label}});a(g);var S=(L=n.StopData)===null||L===void 0?void 0:L.map(function($){return{value:$.id,label:$.name}});D(S)},[n]);var N=function(C){Et(C).then(function(g){var S=g.data.map(function($){return{value:$.id,label:$.vesion}});P(S)})},F=function(C){o(C.target.value)},X=function(C){if(C.preventDefault(),e.length==0)W.default.error("\u8BF7\u8F93\u5165\u540D\u79F0");else{var g={name:e};hr(g).then(function(S){S.succeeded?(W.default.success("\u6DFB\u52A0\u6210\u529F"),n.initDeviceType(),o("")):W.default.error(S.errors)})}};return(0,I.jsx)(pe.Z,{title:n.values.id?"\u7F16\u8F91":"\u65B0\u5EFA",width:640,visible:n.createModalVisible,maskClosable:!1,bodyStyle:{padding:"32px 40px 48px"},footer:null,onCancel:function(){n.onCancel()},destroyOnClose:!0,children:(0,I.jsxs)(ie.Z,{layout:"Horizontal",labelCol:{span:4},preserve:!1,initialValues:n.values,onFinish:n.onFinish,children:[(0,I.jsx)(ie.Z.Item,{name:"id",hidden:!0,children:(0,I.jsx)(Ke.Z,{})}),(0,I.jsx)(ie.Z.Item,{label:"\u9009\u62E9\u573A\u666F",name:"stopId",rules:[{required:!0}],children:(0,I.jsx)(Fe.Z,{allowClear:!0,showSearch:!0,optionFilterProp:"children",filterOption:function(C,g){var S;return((S=g==null?void 0:g.label)!==null&&S!==void 0?S:"").includes(C)},filterSort:function(C,g){var S,$;return((S=C==null?void 0:C.label)!==null&&S!==void 0?S:"").toLowerCase().localeCompare((($=g==null?void 0:g.label)!==null&&$!==void 0?$:"").toLowerCase())},options:Z})}),(0,I.jsx)(ie.Z.Item,{label:"\u4EA7\u54C1",name:"productId",rules:[{required:!0}],children:(0,I.jsx)(Fe.Z,{onChange:N,allowClear:!0,showSearch:!0,optionFilterProp:"children",filterOption:function(C,g){var S;return((S=g==null?void 0:g.label)!==null&&S!==void 0?S:"").includes(C)},filterSort:function(C,g){var S,$;return((S=C==null?void 0:C.label)!==null&&S!==void 0?S:"").toLowerCase().localeCompare((($=g==null?void 0:g.label)!==null&&$!==void 0?$:"").toLowerCase())},options:p})}),(0,I.jsx)(ie.Z.Item,{label:"\u4EA7\u54C1\u7248\u672C",name:"productVersionId",rules:[{required:!0}],children:(0,I.jsx)(Fe.Z,{allowClear:!0,showSearch:!0,optionFilterProp:"children",filterOption:function(C,g){var S;return((S=g==null?void 0:g.label)!==null&&S!==void 0?S:"").includes(C)},filterSort:function(C,g){var S,$;return((S=C==null?void 0:C.label)!==null&&S!==void 0?S:"").toLowerCase().localeCompare((($=g==null?void 0:g.label)!==null&&$!==void 0?$:"").toLowerCase())},options:x})}),(0,I.jsx)(ie.Z.Item,{label:"\u8BBE\u5907\u540D\u79F0",name:"deviceName",rules:[{required:!0,max:50}],children:(0,I.jsx)(Ke.Z,{})}),(0,I.jsx)(ie.Z.Item,{label:"\u8BBE\u5907\u6807\u7B7E",name:"deviceTypeId",rules:[{required:!1}],children:(0,I.jsx)(Fe.Z,{style:{width:"100%"},placeholder:"\u8BF7\u9009\u8BBE\u5907\u6807\u7B7E",options:n.storeType,allowClear:!0,showSearch:!0,optionFilterProp:"children",filterOption:function(C,g){var S;return((S=g==null?void 0:g.label)!==null&&S!==void 0?S:"").includes(C)},filterSort:function(C,g){var S,$;return((S=C==null?void 0:C.label)!==null&&S!==void 0?S:"").toLowerCase().localeCompare((($=g==null?void 0:g.label)!==null&&$!==void 0?$:"").toLowerCase())},dropdownRender:function(C){return(0,I.jsxs)(I.Fragment,{children:[C,(0,I.jsx)(sr.Z,{style:{margin:"8px 0"}}),(0,I.jsxs)(ir.Z,{style:{padding:"0 8px 4px"},children:[(0,I.jsx)(Ke.Z,{placeholder:"\u8BF7\u8F93\u5165\u8BBE\u5907\u6807\u7B7E",ref:z,value:e,onChange:F,onKeyDown:function(S){return S.stopPropagation()}}),(0,I.jsx)(Re.Z,{type:"text",icon:(0,I.jsx)($t.Z,{}),onClick:X,children:"\u65B0\u589E"})]})]})}})}),(0,I.jsx)(ie.Z.Item,{label:"\u5730\u5740",name:"address",rules:[{max:50}],children:(0,I.jsx)(Ke.Z,{})}),(0,I.jsx)(ie.Z.Item,{children:(0,I.jsx)(Re.Z,{type:"primary",htmlType:"submit",style:{float:"right"},children:"\u4FDD\u5B58"})})]})})},Cr=Zr,wr=c(20173),un=c(96486),cn="message",br=function(){var n=(0,l.useState)(),s=(0,G.Z)(n,2),t=s[0],e=s[1],o=(0,l.useState)([]),d=(0,G.Z)(o,2),i=d[0],p=d[1],a=(0,l.useState)([]),u=(0,G.Z)(a,2),f=u[0],Z=u[1],D=(0,l.useState)([]),y=(0,G.Z)(D,2),k=y[0],x=y[1],P=(0,l.useState)([]),z=(0,G.Z)(P,2),N=z[0],F=z[1],X=(0,l.useState)([]),L=(0,G.Z)(X,2),C=L[0],g=L[1],S=(0,l.useState)([]),$=(0,G.Z)(S,2),ne=$[0],q=$[1],se=(0,l.useState)(!1),ge=(0,G.Z)(se,2),ye=ge[0],H=ge[1],te=(0,l.useRef)(),J=(0,l.useState)(),de=(0,G.Z)(J,2),oe=de[0],_=de[1],$e=(0,l.useState)([]),Ae=(0,G.Z)($e,2),ue=Ae[0],Se=Ae[1],Ze=(0,l.useState)([]),Ee=(0,G.Z)(Ze,2),ae=Ee[0],j=Ee[1],re=(0,l.useState)(!1),M=(0,G.Z)(re,2),Ce=M[0],ke=M[1],we=(0,l.useState)([]),kt=(0,G.Z)(we,2),Ir=kt[0],Tr=kt[1],Rr=(0,l.useState)([]),Lt=(0,G.Z)(Rr,2),Kt=Lt[0],Bt=Lt[1],$r=(0,l.useState)([]),xt=(0,G.Z)($r,2),dn=xt[0],pn=xt[1];(0,l.useEffect)(function(){mr().then(function(h){j(h.data)}),gr().then(function(h){var R=h.data,v=[];R.forEach(function(w){v.push({key:w.id,title:w.name,description:w.name})}),Tr(v)});function E(){(0,wr.FM)().then(function(h){R(h.data);function R(T){for(var K in T)T[K].type==2||T[K].type==3?T[K].disabled=!1:T[K].disabled=!0,T[K].children&&R(T[K].children)}Z(h.data);var v={};w(h.data);function w(T){for(var K in T)v[T[K].disabled]=!0,v[T[K].value]={text:T[K].title},T[K].children&&w(T[K].children)}x(v)})}E(),Gt();function b(){ur().then(function(h){var R=h.data,v={};if(h.succeeded){var w=[];R.forEach(function(T){v[T.name]={text:T.name},w.push({id:T.id,label:T.name,text:T.name})}),F(v),g(w)}})}b(),Ar()},[]);var Gt=function(){pr().then(function(b){var h={},R=[];b.data.forEach(function(v){R.push({label:v.name,text:v.name,value:v.id}),h[v.id]={text:v.name}}),p(R),e(h)})},Ar=function(){var E=(0,B.Z)((0,m.Z)().mark(function b(){var h;return(0,m.Z)().wrap(function(v){for(;;)switch(v.prev=v.next){case 0:return v.next=2,fr();case 2:h=v.sent,h.statusCode==200?q(h.data):W.default.error("\u83B7\u53D6\u8BBE\u5907\u7248\u672C\u5931\u8D25");case 4:case"end":return v.stop()}},b)}));return function(){return E.apply(this,arguments)}}(),Er=function(){var E=(0,B.Z)((0,m.Z)().mark(function b(h){var R;return(0,m.Z)().wrap(function(w){for(;;)switch(w.prev=w.next){case 0:return w.next=2,Et(h==null?void 0:h.productId);case 2:R=w.sent,R.statusCode==200?q(R.data):W.default.error("\u83B7\u53D6\u8BBE\u5907\u7248\u672C\u5931\u8D25");case 4:case"end":return w.stop()}},b)}));return function(h){return E.apply(this,arguments)}}(),kr=function(){return(ue==null?void 0:ue.length)>0&&(0,I.jsx)(Rt.Z,{title:"\u786E\u8BA4\u5220\u9664\u5417?",onConfirm:Lr,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",children:(0,I.jsx)(Re.Z,{type:"primary",children:"\u6279\u91CF\u5220\u9664"})})},Lr=function(){var b,h;Kr(ue),Se([]),(b=te.current)===null||b===void 0||(h=b.reloadAndRest)===null||h===void 0||h.call(b)},Kr=function(){var E=(0,B.Z)((0,m.Z)().mark(function b(h){return(0,m.Z)().wrap(function(v){for(;;)switch(v.prev=v.next){case 0:if(h){v.next=2;break}return v.abrupt("return",!0);case 2:return v.next=4,At(h.map(function(w){return w.id})).then(function(w){w.data?(W.default.success("\u5220\u9664\u6210\u529F"),te.current.reload()):W.default.error("\u5220\u9664\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5")});case 4:return v.abrupt("return",!0);case 5:case"end":return v.stop()}},b)}));return function(h){return E.apply(this,arguments)}}(),Br=[{title:"\u4E3B\u952E",dataIndex:"id",hideInSearch:!0,hideInTable:!0,tip:"\u89C4\u5219\u540D\u79F0\u662F\u552F\u4E00\u7684 key"},{title:"\u8BBE\u5907\u540D\u79F0",dataIndex:"deviceName",valueType:"textarea"},{title:"\u4EA7\u54C1",dataIndex:"productName",valueEnum:N,hideInSearch:!0},{title:"\u4EA7\u54C1\u7248\u672C",dataIndex:"productVersionName",search:!1},{title:"\u6240\u5C5E\u573A\u666F",dataIndex:"stopName",search:!1},{title:"\u5730\u5740",dataIndex:"address",search:!1},{title:"\u8BBE\u5907\u6807\u7B7E",dataIndex:"deviceTypeId",valueEnum:t},{title:"\u8BBE\u5907\u552F\u4E00key",dataIndex:"autoKey",search:!1},{title:"\u64CD\u4F5C",dataIndex:"option",valueType:"option",fixed:"right",width:400,render:function(b,h){return[(0,I.jsx)("a",{onClick:function(){Er(h),H(!0),_(h)},children:"\u66F4\u65B0"},"update"),(0,I.jsx)(Rt.Z,{type:"primary",title:"\u786E\u8BA4\u5220\u9664\u5417\uFF1F",okText:"\u662F",cancelText:"\u5426",onConfirm:(0,B.Z)((0,m.Z)().mark(function R(){return(0,m.Z)().wrap(function(w){for(;;)switch(w.prev=w.next){case 0:return w.next=2,At([h.id]).then(function(T){T.data?(W.default.success("\u5220\u9664\u6210\u529F"),te.current.reload()):W.default.error(T.errors)});case 2:case"end":return w.stop()}},R)})),onCancel:function(){},children:(0,I.jsx)("a",{href:"#",children:"\u5220\u9664"})},"primary"),(0,I.jsx)("a",{onClick:(0,B.Z)((0,m.Z)().mark(function R(){var v,w;return(0,m.Z)().wrap(function(K){for(;;)switch(K.prev=K.next){case 0:return K.next=2,vr(h.id);case 2:if(v=K.sent,v!=""){K.next=6;break}return W.default.error("\u5F53\u524D\u6A21\u677F\u4E0D\u5B58\u5728\uFF01"),K.abrupt("return");case 6:w=document.createElement("a"),w.href=v,w.click();case 9:case"end":return K.stop()}},R)})),children:"\u5BFC\u51FA\u5DE5\u827A\u6A21\u7248"},"add"),(0,I.jsx)("a",{onClick:function(){Or(h.id),_(h),ke(!0)},children:"\u8BBE\u7F6E\u8BBE\u5907\u5546\u54C1"},"edit")]}}],xr=function(){var E=(0,B.Z)((0,m.Z)().mark(function b(h){return(0,m.Z)().wrap(function(v){for(;;)switch(v.prev=v.next){case 0:return v.next=2,cr(JSON.stringify(h)).then(function(w){if(w.succeeded)W.default.success("\u6DFB\u52A0\u6210\u529F"),H(!1),te.current.reload();else return W.default.error(w.errors),!1});case 2:case"end":return v.stop()}},b)}));return function(h){return E.apply(this,arguments)}}(),Gr=function(){var E=(0,B.Z)((0,m.Z)().mark(function b(h){return(0,m.Z)().wrap(function(v){for(;;)switch(v.prev=v.next){case 0:return v.next=2,dr(JSON.stringify(h)).then(function(w){if(w.succeeded)W.default.success("\u66F4\u65B0\u6210\u529F"),H(!1),te.current.reload();else return W.default.error(w.errors),!1});case 2:case"end":return v.stop()}},b)}));return function(h){return E.apply(this,arguments)}}(),Pr=function(){var E=(0,B.Z)((0,m.Z)().mark(function b(){var h,R;return(0,m.Z)().wrap(function(w){for(;;)switch(w.prev=w.next){case 0:h=[],Kt.forEach(function(T,K,jr){h.push({goodsId:T,goodsName:""})}),R={deviceId:oe.id,goodsList:h,autoKey:oe.autoKey},Sr(R).then(function(T){if(T.succeeded)W.default.success("\u7F16\u8F91\u6210\u529F"),H(!1),te.current.reload();else return W.default.error(T.errors),!1}),ke(!1);case 5:case"end":return w.stop()}},b)}));return function(){return E.apply(this,arguments)}}(),Or=function(){var E=(0,B.Z)((0,m.Z)().mark(function b(h){var R;return(0,m.Z)().wrap(function(w){for(;;)switch(w.prev=w.next){case 0:R=[],yr(h).then(function(T){T.data.forEach(function(K,jr,hn){R.push(K.goodsId)}),Bt(R)});case 2:case"end":return w.stop()}},b)}));return function(h){return E.apply(this,arguments)}}(),Fr=function(b){Bt(b)};return(0,I.jsxs)(ar.ZP,{host:!0,header:{title:"",breadcrumb:{}},children:[(0,I.jsx)(lr.ZP,{headerTitle:"\u8BBE\u5907\u4FE1\u606F",actionRef:te,rowKey:"id",pagination:{defaultPageSize:10},search:{labelWidth:120},scroll:{x:2e3},toolBarRender:function(){return[(0,I.jsxs)(Re.Z,{type:"primary",onClick:function(){H(!0)},children:[(0,I.jsx)($t.Z,{})," \u65B0\u5EFA"]},"primary"),(0,I.jsx)(kr,{})]},request:function(){var E=(0,B.Z)((0,m.Z)().mark(function b(h){var R,v;return(0,m.Z)().wrap(function(T){for(;;)switch(T.prev=T.next){case 0:return R=[],v=0,T.next=4,or(h).then(function(K){R=K.data.data,v=K.data.total});case 4:return T.abrupt("return",{data:R,success:!0,total:v});case 5:case"end":return T.stop()}},b)}));return function(b){return E.apply(this,arguments)}}(),columns:Br,rowSelection:{onChange:function(b,h){Se(h)}}}),(0,I.jsx)(Cr,{storeType:i,OrgData:f,dicData:C,initDeviceType:Gt,onFinish:function(){var E=(0,B.Z)((0,m.Z)().mark(function b(h){return(0,m.Z)().wrap(function(v){for(;;)switch(v.prev=v.next){case 0:h.id?Gr(h):xr(h);case 1:case"end":return v.stop()}},b)}));return function(b){return E.apply(this,arguments)}}(),onCancel:function(){H(!1),_(void 0)},createModalVisible:ye,deviceVersions:ne,values:oe||{},StopData:ae}),(0,I.jsx)(pe.Z,{width:600,title:"\u7F16\u8F91\u8BBE\u5907\u5546\u54C1",open:Ce,onOk:function(){Pr()},onCancel:function(){ke(!1)},children:(0,I.jsx)(nr,{className:"tree-transfer",dataSource:Ir,targetKeys:Kt,onChange:Fr,onSearch:function(){},render:function(b){return b.title}})})]})},Dr=br},20173:function(Pt,Be,c){"use strict";c.d(Be,{lM:function(){return yt},IH:function(){return St},mm:function(){return he},eP:function(){return Le},FM:function(){return je}});var ee=c(39428),pe=c(11849),be=c(3182),De=c(48971),Ie=c(96690);function yt(l,U){return xe.apply(this,arguments)}function xe(){return xe=(0,be.Z)((0,ee.Z)().mark(function l(U,ce){return(0,ee.Z)().wrap(function(me){for(;;)switch(me.prev=me.next){case 0:return me.abrupt("return",(0,De.WY)((0,Ie.w)()+"/api/organize/page",{method:"POST",data:(0,pe.Z)({},U)}));case 1:case"end":return me.stop()}},l)})),xe.apply(this,arguments)}function St(l){return Ge.apply(this,arguments)}function Ge(){return Ge=(0,be.Z)((0,ee.Z)().mark(function l(U){return(0,ee.Z)().wrap(function(A){for(;;)switch(A.prev=A.next){case 0:return A.abrupt("return",(0,De.WY)((0,Ie.w)()+"/api/organize/addorg",{method:"POST",data:(0,pe.Z)({},U)}));case 1:case"end":return A.stop()}},l)})),Ge.apply(this,arguments)}function Ot(l){return Q.apply(this,arguments)}function Q(){return Q=_asyncToGenerator(_regeneratorRuntime().mark(function l(U){return _regeneratorRuntime().wrap(function(A){for(;;)switch(A.prev=A.next){case 0:return A.abrupt("return",request(getDataBaseUrl()+"\u200B/api\u200B/organize/getorglist",{method:"POST",data:_objectSpread({},U)}));case 1:case"end":return A.stop()}},l)})),Q.apply(this,arguments)}function he(l){return O.apply(this,arguments)}function O(){return O=(0,be.Z)((0,ee.Z)().mark(function l(U){return(0,ee.Z)().wrap(function(A){for(;;)switch(A.prev=A.next){case 0:return A.abrupt("return",(0,De.WY)((0,Ie.w)()+"\u200B/api\u200B/organize/deleteorg?id="+U,{method:"GET"}));case 1:case"end":return A.stop()}},l)})),O.apply(this,arguments)}function Le(l){return fe.apply(this,arguments)}function fe(){return fe=(0,be.Z)((0,ee.Z)().mark(function l(U){return(0,ee.Z)().wrap(function(A){for(;;)switch(A.prev=A.next){case 0:return A.abrupt("return",(0,De.WY)((0,Ie.w)()+"\u200B/api\u200B/organize/updateorg",{method:"POST",data:(0,pe.Z)({},U)}));case 1:case"end":return A.stop()}},l)})),fe.apply(this,arguments)}function Pe(l){return ve.apply(this,arguments)}function ve(){return ve=_asyncToGenerator(_regeneratorRuntime().mark(function l(U){return _regeneratorRuntime().wrap(function(A){for(;;)switch(A.prev=A.next){case 0:return A.abrupt("return",request(getDataBaseUrl()+"/api\u200B/sysOrg\u200B/detail",{method:"POST",data:_objectSpread({},U)}));case 1:case"end":return A.stop()}},l)})),ve.apply(this,arguments)}function je(l){return le.apply(this,arguments)}function le(){return le=(0,be.Z)((0,ee.Z)().mark(function l(U){return(0,ee.Z)().wrap(function(A){for(;;)switch(A.prev=A.next){case 0:return A.abrupt("return",(0,De.WY)((0,Ie.w)()+"\u200B/api\u200B/organize/tree",{method:"GET",data:(0,pe.Z)({},U)}));case 1:case"end":return A.stop()}},l)})),le.apply(this,arguments)}}}]);