|
- (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[4093],{35611:function(st,We,e){"use strict";e.d(We,{Z:function(){return Ve}});var Z=e(28991),s=e(85893),_e=e(18106),re=e(95562),I=e(96156),et=e(90484),S=e(28481),Ct=e(84305),y=e(39559),Fe=e(81253),St=e(6999),bt=e(75302),w=e(8812),Ke=e(53621),tt=e(94184),je=e.n(tt),Je=e(97435),Zt=e(50344),Re=e(80334),de=e(67294),at=e(58856),xt=["tab","children"],ze=["key","tab","tabKey","disabled","destroyInactiveTabPane","children","className","style","cardProps"];function oe(c){return c.filter(function(b){return b})}function Te(c,b,m){if(c)return c.map(function($){return(0,Z.Z)((0,Z.Z)({},$),{},{children:(0,s.jsx)(se,(0,Z.Z)((0,Z.Z)({},m==null?void 0:m.cardProps),{},{children:$.children}))})});(0,Re.ET)(!m,"Tabs.TabPane is deprecated. Please use `items` directly.");var x=(0,Zt.Z)(b).map(function($){if(de.isValidElement($)){var le=$.key,ie=$.props,Ie=ie||{},Ee=Ie.tab,Pe=Ie.children,He=(0,Fe.Z)(Ie,xt),ce=(0,Z.Z)((0,Z.Z)({key:String(le)},He),{},{children:(0,s.jsx)(se,(0,Z.Z)((0,Z.Z)({},m==null?void 0:m.cardProps),{},{children:Pe})),label:Ee});return ce}return null});return oe(x)}var nt=function(b){var m=b.key,x=b.tab,$=b.tabKey,le=b.disabled,ie=b.destroyInactiveTabPane,Ie=b.children,Ee=b.className,Pe=b.style,He=b.cardProps,ce=(0,Fe.Z)(b,ze),r=(0,de.useContext)(y.ZP.ConfigContext),J=r.getPrefixCls,_=J("pro-card-tabpane"),H=je()(_,Ee);return(0,s.jsx)(re.Z.TabPane,(0,Z.Z)((0,Z.Z)({tabKey:$,tab:x,className:H,style:Pe,disabled:le,destroyInactiveTabPane:ie},ce),{},{children:(0,s.jsx)(se,(0,Z.Z)((0,Z.Z)({},He),{},{children:Ie}))}),m)},p=nt,g=e(21770),v=e(6599),i=function(b){var m=b.actions,x=b.prefixCls;return Array.isArray(m)&&(m==null?void 0:m.length)?(0,s.jsx)("ul",{className:"".concat(x,"-actions"),children:m.map(function($,le){return(0,s.jsx)("li",{style:{width:"".concat(100/m.length,"%")},children:(0,s.jsx)("span",{children:$})},"action-".concat(le))})}):m?(0,s.jsx)("ul",{className:"".concat(x,"-actions"),children:m}):null},P=i,D=e(89032),C=e(15746),E=e(13062),K=e(71230),ye=e(61070),k=function(b){var m=b.style,x=b.prefix;return(0,s.jsxs)("div",{className:"".concat(x,"-loading-content"),style:m,children:[(0,s.jsx)(K.Z,{gutter:8,children:(0,s.jsx)(C.Z,{span:22,children:(0,s.jsx)("div",{className:"".concat(x,"-loading-block")})})}),(0,s.jsxs)(K.Z,{gutter:8,children:[(0,s.jsx)(C.Z,{span:8,children:(0,s.jsx)("div",{className:"".concat(x,"-loading-block")})}),(0,s.jsx)(C.Z,{span:15,children:(0,s.jsx)("div",{className:"".concat(x,"-loading-block")})})]}),(0,s.jsxs)(K.Z,{gutter:8,children:[(0,s.jsx)(C.Z,{span:6,children:(0,s.jsx)("div",{className:"".concat(x,"-loading-block")})}),(0,s.jsx)(C.Z,{span:18,children:(0,s.jsx)("div",{className:"".concat(x,"-loading-block")})})]}),(0,s.jsxs)(K.Z,{gutter:8,children:[(0,s.jsx)(C.Z,{span:13,children:(0,s.jsx)("div",{className:"".concat(x,"-loading-block")})}),(0,s.jsx)(C.Z,{span:9,children:(0,s.jsx)("div",{className:"".concat(x,"-loading-block")})})]}),(0,s.jsxs)(K.Z,{gutter:8,children:[(0,s.jsx)(C.Z,{span:4,children:(0,s.jsx)("div",{className:"".concat(x,"-loading-block")})}),(0,s.jsx)(C.Z,{span:3,children:(0,s.jsx)("div",{className:"".concat(x,"-loading-block")})}),(0,s.jsx)(C.Z,{span:16,children:(0,s.jsx)("div",{className:"".concat(x,"-loading-block")})})]})]})},ae=k,Ge=e(43237),pe=["className","style","bodyStyle","headStyle","title","subTitle","extra","tip","wrap","layout","loading","gutter","tooltip","split","headerBordered","bordered","children","size","actions","ghost","hoverable","direction","collapsed","collapsible","collapsibleIconRender","defaultCollapsed","onCollapse","checked","onChecked","tabs","type"],O=bt.ZP.useBreakpoint,Le=de.forwardRef(function(c,b){var m,x,$,le=c.className,ie=c.style,Ie=c.bodyStyle,Ee=Ie===void 0?{}:Ie,Pe=c.headStyle,He=Pe===void 0?{}:Pe,ce=c.title,r=c.subTitle,J=c.extra,_=c.tip,H=c.wrap,u=H===void 0?!1:H,M=c.layout,T=c.loading,N=c.gutter,A=N===void 0?0:N,R=c.tooltip,ue=c.split,U=c.headerBordered,ee=U===void 0?!1:U,ot=c.bordered,F=ot===void 0?!1:ot,fe=c.children,X=c.size,te=c.actions,Y=c.ghost,ke=Y===void 0?!1:Y,z=c.hoverable,ve=z===void 0?!1:z,De=c.direction,lt=c.collapsed,ct=c.collapsible,Vt=ct===void 0?!1:ct,ut=c.collapsibleIconRender,ne=c.defaultCollapsed,it=ne===void 0?!1:ne,kt=c.onCollapse,jt=c.checked,It=c.onChecked,Ne=c.tabs,ft=c.type,Me=(0,Fe.Z)(c,pe),$t=(0,de.useContext)(y.ZP.ConfigContext),Et=$t.getPrefixCls,Nt=O(),At=(0,g.Z)(it,{value:lt,onChange:kt}),Tt=(0,S.Z)(At,2),rt=Tt[0],wt=Tt[1],Xe=["xxl","xl","lg","md","sm","xs"],qt=Te(Ne==null?void 0:Ne.items,fe,Ne),Ot=function(W){var V=[0,0],he=Array.isArray(W)?W:[W,0];return he.forEach(function(Ze,we){if((0,et.Z)(Ze)==="object")for(var Ae=0;Ae<Xe.length;Ae+=1){var ge=Xe[Ae];if(Nt[ge]&&Ze[ge]!==void 0){V[we]=Ze[ge];break}}else V[we]=Ze||0}),V},Ye=function(W,V){return W?V:{}},Pt=function(W){var V=W;if((0,et.Z)(W)==="object")for(var he=0;he<Xe.length;he+=1){var Ze=Xe[he];if(Nt[Ze]&&W[Ze]!==void 0){V=W[Ze];break}}var we=Ye(typeof V=="string"&&/\d%|\dpx/i.test(V),{width:V,flexShrink:0});return{span:V,colSpanStyle:we}},j=Et("pro-card"),Rt=Ot(A),Dt=(0,S.Z)(Rt,2),$e=Dt[0],Qe=Dt[1],vt=!1,ht=de.Children.toArray(fe),Ft=ht.map(function(G,W){var V;if(G==null||(V=G.type)===null||V===void 0?void 0:V.isProCard){var he;vt=!0;var Ze=G.props.colSpan,we=Pt(Ze),Ae=we.span,ge=we.colSpanStyle,yt=je()(["".concat(j,"-col")],(he={},(0,I.Z)(he,"".concat(j,"-split-vertical"),ue==="vertical"&&W!==ht.length-1),(0,I.Z)(he,"".concat(j,"-split-horizontal"),ue==="horizontal"&&W!==ht.length-1),(0,I.Z)(he,"".concat(j,"-col-").concat(Ae),typeof Ae=="number"&&Ae>=0&&Ae<=24),he));return(0,s.jsx)("div",{style:(0,Z.Z)((0,Z.Z)((0,Z.Z)({},ge),Ye($e>0,{paddingRight:$e/2,paddingLeft:$e/2})),Ye(Qe>0,{paddingTop:Qe/2,paddingBottom:Qe/2})),className:yt,children:de.cloneElement(G)},"pro-card-col-".concat((G==null?void 0:G.key)||W))}return G}),gt=je()("".concat(j),le,(m={},(0,I.Z)(m,"".concat(j,"-border"),F),(0,I.Z)(m,"".concat(j,"-contain-card"),vt),(0,I.Z)(m,"".concat(j,"-loading"),T),(0,I.Z)(m,"".concat(j,"-split"),ue==="vertical"||ue==="horizontal"),(0,I.Z)(m,"".concat(j,"-ghost"),ke),(0,I.Z)(m,"".concat(j,"-hoverable"),ve),(0,I.Z)(m,"".concat(j,"-size-").concat(X),X),(0,I.Z)(m,"".concat(j,"-type-").concat(ft),ft),(0,I.Z)(m,"".concat(j,"-collapse"),rt),(0,I.Z)(m,"".concat(j,"-checked"),jt),m)),be=je()("".concat(j,"-body"),(x={},(0,I.Z)(x,"".concat(j,"-body-center"),M==="center"),(0,I.Z)(x,"".concat(j,"-body-direction-column"),ue==="horizontal"||De==="column"),(0,I.Z)(x,"".concat(j,"-body-wrap"),u&&vt),x)),zt=(0,Z.Z)((0,Z.Z)((0,Z.Z)({},Ye($e>0,{marginRight:-$e/2,marginLeft:-$e/2})),Ye(Qe>0,{marginTop:-Qe/2,marginBottom:-Qe/2})),Ee),mt=de.isValidElement(T)?T:(0,s.jsx)(ae,{prefix:j,style:Ee.padding===0||Ee.padding==="0px"?{padding:24}:void 0}),Ue=Vt&<===void 0&&(ut?ut({collapsed:rt}):(0,s.jsx)(w.Z,{rotate:rt?void 0:90,className:"".concat(j,"-collapsible-icon")}));return(0,s.jsxs)("div",(0,Z.Z)((0,Z.Z)({className:gt,style:ie,ref:b,onClick:function(W){var V;It==null||It(W),Me==null||(V=Me.onClick)===null||V===void 0||V.call(Me,W)}},(0,Je.Z)(Me,["prefixCls","colSpan"])),{},{children:[(ce||J||Ue)&&(0,s.jsxs)("div",{className:je()("".concat(j,"-header"),($={},(0,I.Z)($,"".concat(j,"-header-border"),ee||ft==="inner"),(0,I.Z)($,"".concat(j,"-header-collapsible"),Ue),$)),style:He,onClick:function(){Ue&&wt(!rt)},children:[(0,s.jsxs)("div",{className:"".concat(j,"-title"),children:[Ue,(0,s.jsx)(Ke.Z,{label:ce,tooltip:R||_,subTitle:r})]}),J&&(0,s.jsx)("div",{className:"".concat(j,"-extra"),children:J})]}),Ne?(0,s.jsx)("div",{className:"".concat(j,"-tabs"),children:(0,s.jsx)(re.Z,(0,Z.Z)((0,Z.Z)({onChange:Ne.onChange},Ne),{},{items:qt,children:T?mt:fe}))}):(0,s.jsx)("div",{className:be,style:zt,children:T?mt:Ft}),(0,s.jsx)(P,{actions:te,prefixCls:j})]}))}),se=Le,Ce=e(31666),t=function(b){var m=(0,de.useContext)(y.ZP.ConfigContext),x=m.getPrefixCls,$=x("pro-card-divider"),le=b.className,ie=b.style,Ie=ie===void 0?{}:ie,Ee=b.type,Pe=je()($,le,(0,I.Z)({},"".concat($,"-").concat(Ee),Ee));return(0,s.jsx)("div",{className:Pe,style:Ie})},Be=t,q=function(b){return(0,s.jsx)(se,(0,Z.Z)({bodyStyle:{padding:0}},b))},Se=se;Se.isProCard=!0,Se.Divider=Be,Se.TabPane=p,Se.Group=q;var Ve=Se},84239:function(st){st.exports={main:"main___2K5qG",headerList:"headerList___MwLVF",stepDescription:"stepDescription___KxeLE",pageHeader:"pageHeader___1L3IU",moreInfo:"moreInfo___3-nlm",formlable:"formlable___1ZX6u",formlabletxt:"formlabletxt___1jTba"}},6599:function(){},43237:function(){},31666:function(){},61070:function(){},58856:function(){},52953:function(){},631:function(st,We,e){"use strict";e.r(We),e.d(We,{default:function(){return He}});var Z=e(47673),s=e(4107),_e=e(43358),re=e(34041),I=e(35556),et=e(75899),S=e(6700),Ct=e(28790),y=e(67294),Fe=e(71194),St=e(50146),bt=e(57663),w=e(71577),Ke=e(88983),tt=e(47933),je=e(71153),Je=e(60331),Zt=e(58024),Re=e(91894),de=e(98858),at=e(4914),xt=e(62350),ze=e(24565),oe=e(39428),Te=e(3182),nt=e(11849),p=e(86582),g=e(34792),v=e(48086),i=e(2824),P=e(35611),D=e(16894),C=e(48971),E=e(50198),K=e(96690);function ye(ce){return k.apply(this,arguments)}function k(){return k=(0,Te.Z)((0,oe.Z)().mark(function ce(r){return(0,oe.Z)().wrap(function(_){for(;;)switch(_.prev=_.next){case 0:return _.abrupt("return",(0,C.WY)((0,K.w)()+"/api/warehousetemplate/list?deviceId="+r,{method:"Get"}));case 1:case"end":return _.stop()}},ce)})),k.apply(this,arguments)}var ae=e(73171),Ge=e(77576),pe=e(12028),O=e(77883),Le=e(85986),se=e(84239),Ce=e.n(se),t=e(85893),Be=s.Z.TextArea,q=function(r){var J=function(M,T,N){console.log("id",T),console.log("props.optiondata",r.optiondata),console.log("props.fromdata",r.fromdata),r.fromdata.forEach(function(A){N?A.id==N&&A.optiondata.forEach(function(R){R.technologyactionId==T&&(console.log("e.target.value",M.target.value),R.actionValue=M.target.value)}):(console.log("\u8FDB\u6765\u4E86"),console.log(r.index),A.optiondata.forEach(function(R){R.technologyactionId==T&&A.index==r.index&&(console.log("e.target.value",M.target.value),R.actionValue=M.target.value)}))}),console.log(r.fromdata),r.onSaveClick(r.fromdata)},_=function(M,T,N){r.fromdata.forEach(function(A){N?A.id==N&&A.optiondata.forEach(function(R){R.technologyactionId==T&&(console.log("e.target.value",M),R.actionValue=M)}):A.optiondata.forEach(function(R,ue){R.technologyactionId==T&&A.index==r.index&&(console.log("e.target.value",M),R.actionValue=M)})}),console.log(r.fromdata),r.onSaveClick(r.fromdata)},H=function(M,T,N){console.log(M),console.log(T),r.optiondata.forEach(function(A){A.technologyactionId==T&&(A.actionValue=M.label)}),r.onSaveClick(r.fromdata)};return(0,t.jsx)("div",{children:r.propsdata.length>0?r.propsdata.map(function(u,M){var T,N=(T=r.optiondata.find(function(U){return U.id==u.technologyactionId&&U.actionName==u.actionName}))===null||T===void 0?void 0:T.actionValue;if(u.actionType=="text")return(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)("div",{style:{width:"100%",height:"40px"},children:[(0,t.jsx)("span",{className:Ce().formlable,style:{display:"block",float:"left",backgroundColor:"#dcf4ff",marginBottom:5},children:u.actionName}),(0,t.jsx)("span",{style:{display:"block",float:"left",marginBottom:5,width:"60%"},children:(0,t.jsx)(s.Z,{defaultValue:N,style:{width:"100%"},onChange:function(ee){J(ee,u.id,u.goddteid)}},u.id)})]})});if(u.actionType=="digit")return(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)("div",{style:{width:"100%",height:"40px"},children:[(0,t.jsx)("span",{className:Ce().formlable,style:{display:"block",float:"left",backgroundColor:"#dcf4ff",marginBottom:5},children:u.actionName}),(0,t.jsx)("span",{style:{display:"block",float:"left",marginBottom:5,width:"60%"},children:(0,t.jsx)(Le.Z,{defaultValue:N,style:{width:"100%"},onChange:function(ee){_(ee,u.id,u.goddteid)}},u.id)})]})});if(u.actionType=="textarea")return(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)("div",{style:{width:"100%",height:"40px"},children:[(0,t.jsx)("span",{className:Ce().formlable,style:{display:"block",float:"left",backgroundColor:"#dcf4ff",marginBottom:5},children:u.actionName}),(0,t.jsx)("span",{style:{display:"block",float:"left",marginBottom:5,width:"60%"},children:(0,t.jsx)(Be,{defaultValue:N,style:{width:"100%"},onChange:function(ee){J(ee,u.id,u.goddteid)}},u.id)})]})});if(u.actionType=="switch")return(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)("div",{style:{width:"100%",height:"40px"},children:[(0,t.jsx)("span",{className:Ce().formlable,style:{display:"block",float:"left",backgroundColor:"#dcf4ff",marginBottom:5},children:u.actionName}),(0,t.jsx)("span",{style:{display:"block",float:"left",marginBottom:5,width:"60%"},children:(0,t.jsx)(pe.Z,{defaultValue:N,onChange:function(ee){J(ee,u.id,u.goddteid)}},u.id)})]})});if(u.actionType=="select"){var A=[];u.actionValue&&u.actionValue.length>0&&(A=JSON.parse(u.actionValue));var R=A.map(function(U,ee){return{value:ee,label:U.actionValueName}});if(u.technologyType==1){var ue=r.batchingdata.map(function(U){return{value:U.id,label:U.name}});R=ue}return(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)("div",{style:{width:"100%",height:"40px"},children:[(0,t.jsx)("span",{className:Ce().formlable,style:{display:"block",float:"left",backgroundColor:"#dcf4ff",marginBottom:5},children:u.actionName}),(0,t.jsx)("span",{style:{display:"block",float:"left",marginBottom:5,width:"60%"},children:(0,t.jsx)(re.Z,{defaultValue:N,labelInValue:!0,options:R,style:{width:"100%"},onChange:function(ee){H(ee,u.id,u.goddteid)}},u.id)})]})})}}):""})},Se=q,Ve=function(r){var J=(0,y.useState)([]),_=(0,i.Z)(J,2),H=_[0],u=_[1],M=(0,y.useState)(1),T=(0,i.Z)(M,2),N=T[0],A=T[1];(0,y.useEffect)(function(){r.fromdata.length==0?u([]):r.UpdataStatus=="update"&&(r.fromdata.forEach(function(F){F.index=F.sort}),u(r.fromdata))},[r.fromdata]);var R=function(fe,X){if(r.devideId=="0")v.default.error("\u8BF7\u9009\u62E9\u8BBE\u5907\u540E\u5728\u65B0\u589E");else{var te=N;A(N+1);var Y=(0,p.Z)(H),ke=H.length;if(H.length==0)te=1;else{var z=H.reduce(function(ve,De){return ve.sort>De.sort?ve:De});te=z.sort+1}Y.push({index:ke+1,id:"",stepName:"",chnologyId:"",actionJson:"",sort:te,goodsId:"",goodsAttributeId:"",optiondata:[],propsdata:[],isBatch:!0,typeName:"",disabled:!1}),u(Y),r.ontechnologyChange(Y),r.onUpdataStatus("add")}},ue=function(fe){var X=H.filter(function(te){return te.sort!=fe});X.forEach(function(te,Y){te.sort=Y+1}),u(X),X.length==0?A(1):A(N-1),r.onUpdataStatus("view"),r.onSaveClick(X)},U=function(fe,X,te){var Y=r.technologyattralldata.filter(function(z){return z.technologyId==fe}),ke=H.map(function(z){if(z.index==te){Y.length>0?z.isBatch=!0:z.isBatch=!1,z.typeName=X.label,z.stepName=X.label,z.chnologyId=X.value;var ve=[];Y.forEach(function(De,lt){ve.push({actionName:De.actionName,actionValue:"",technologyactionId:De.id,index:lt})}),z.propsdata=Y,z.optiondata=ve}return z});u(ke),r.ontechnologyChange(ke)},ee=function(fe){r.onSaveClick(fe)},ot=function(){r.onUpdataStatus("view"),u([]),A(1),r.onSaveClick([])};return(0,t.jsxs)("div",{children:[H.length>0?H.map(function(F,fe){return(0,t.jsxs)(P.Z,{boxShadow:!0,title:"\u5DE5\u5E8F\u53F7"+F.sort,bordered:!0,bodyStyle:{padding:15,display:"flex"},headStyle:{padding:"0px 24px"},style:{marginBlockEnd:8},extra:(0,t.jsx)(ae.Z,{onClick:function(){ue(F.sort)}}),children:[(0,t.jsx)("div",{style:{float:"left",width:"20%"},children:(0,t.jsx)(re.Z,{name:"chnologyId",style:{width:"100%"},value:F.chnologyId,disabled:F.disabled,options:r.goodstechnologydata,onChange:function(){var X=(0,Te.Z)((0,oe.Z)().mark(function te(Y,ke){return(0,oe.Z)().wrap(function(ve){for(;;)switch(ve.prev=ve.next){case 0:U(Y,ke,F.index);case 1:case"end":return ve.stop()}},te)}));return function(te,Y){return X.apply(this,arguments)}}()},F.sort)}),(0,t.jsx)("div",{style:{float:"left",width:"78%"},children:(0,t.jsx)(Se,{propsdata:F.propsdata,fromdata:H,batchingdata:r.batchingdata,onSaveClick:ee,optiondata:F.optiondata,index:F.index})})]},F.id)}):"",(0,t.jsx)(w.Z,{type:"dashed",block:!0,onClick:R,ghost:!0,style:{background:"#FA541C"},children:"\u6DFB\u52A0\u5DE5\u827A"}),(0,t.jsx)(w.Z,{block:!0,onClick:ot,children:"\u91CD\u7F6E"})]})},c=Ve,b=e(64172),m=function(r){var J=(0,y.useState)(""),_=(0,i.Z)(J,2),H=_[0],u=_[1],M=(0,y.useState)([]),T=(0,i.Z)(M,2),N=T[0],A=T[1],R=(0,y.useState)([]),ue=(0,i.Z)(R,2),U=ue[0],ee=ue[1],ot=(0,y.useState)([]),F=(0,i.Z)(ot,2),fe=F[0],X=F[1],te=(0,y.useState)([]),Y=(0,i.Z)(te,2),ke=Y[0],z=Y[1],ve=(0,y.useState)([]),De=(0,i.Z)(ve,2),lt=De[0],ct=De[1],Vt=(0,y.useState)({}),ut=(0,i.Z)(Vt,2),ne=ut[0],it=ut[1],kt=(0,y.useState)([]),jt=(0,i.Z)(kt,2),It=jt[0],Ne=jt[1],ft=(0,y.useState)(1),Me=(0,i.Z)(ft,2),$t=Me[0],Et=Me[1],Nt=(0,y.useState)([]),At=(0,i.Z)(Nt,2),Tt=At[0],rt=At[1],wt=(0,y.useState)([]),Xe=(0,i.Z)(wt,2),qt=Xe[0],Ot=Xe[1],Ye=(0,y.useState)([]),Pt=(0,i.Z)(Ye,2),j=Pt[0],Rt=Pt[1],Dt=(0,y.useState)("block"),$e=(0,i.Z)(Dt,2),Qe=$e[0],vt=$e[1],ht=(0,y.useState)([]),Ft=(0,i.Z)(ht,2),gt=Ft[0],be=Ft[1],zt=(0,y.useState)("view"),mt=(0,i.Z)(zt,2),Ue=mt[0],G=mt[1],W=(0,y.useState)(!1),V=(0,i.Z)(W,2),he=V[0],Ze=V[1],we=(0,y.useState)("0"),Ae=(0,i.Z)(we,2),ge=Ae[0],yt=Ae[1],pa=(0,y.useState)(""),_t=(0,i.Z)(pa,2),Ca=_t[0],Gt=_t[1],Sa=(0,y.useState)("add"),ea=(0,i.Z)(Sa,2),on=ea[0],ta=ea[1],ba=(0,y.useState)([]),aa=(0,i.Z)(ba,2),Mt=aa[0],Za=aa[1],xa=(0,y.useState)("none"),na=(0,i.Z)(xa,2),ja=na[0],oa=na[1],Ia=(0,y.useState)(""),la=(0,i.Z)(Ia,2),Ut=la[0],Wt=la[1],Ea=(0,y.useState)(""),ia=(0,i.Z)(Ea,2),Na=ia[0],Kt=ia[1],Aa=(0,y.useState)(!1),ra=(0,i.Z)(Aa,2),Ta=ra[0],Jt=ra[1],Pa=(0,y.useState)(!1),da=(0,i.Z)(Pa,2),Da=da[0],Ht=da[1],Fa=(0,y.useState)(!1),sa=(0,i.Z)(Fa,2),La=sa[0],ca=sa[1],Ba=(0,y.useState)(!1),ua=(0,i.Z)(Ba,2),Va=ua[0],Lt=ua[1],ka=(0,y.useState)([]),fa=(0,i.Z)(ka,2),va=fa[0],$a=fa[1],pt=(0,y.useRef)(null),ha=(0,y.useRef)(),wa=(0,y.useState)([]),ga=(0,i.Z)(wa,2),Xt=ga[0],Oa=ga[1],Ra=function(){Ht(!0),ca(!0)},za=function(){Ht(!1),ca(!1),pt.current.reload()};(0,y.useEffect)(function(){return b.Z.getRoleBasicMenu().then(function(h){h.data&&Oa(h.data)}),Ga(),document.addEventListener("click",ya,!0),function(){document.removeEventListener("click",ya,!0)}},[]);var Ga=function(){r.goodsid!=null&&(0,E.wR)(r.goodsid).then(function(a){if(a.succeeded){var n=[],l=[];a.data.goodsAttributeList.length==0?vt("none"):a.data.goodsAttributeList.forEach(function(d){var f,L;d.defalutvalue=[],d.goodsAttributeValueList.forEach(function(Q){d.attributeName=="\u9ED8\u8BA4\u5C5E\u6027"?(Q.check=!0,u(Q.attributeValue),d.defalutvalue.push(Q.goodsAttributeValuId)):Q.check=!1}),d.defalutvalue=(f=d.goodsAttributeValueList[0])===null||f===void 0?void 0:f.goodsAttributeValuId,d.goodsAttributeValueList[0].check=!0,n.push(d.defalutvalue),l.push((L=d.goodsAttributeValueList[0])===null||L===void 0?void 0:L.attributeValue)}),A(n),it(a.data),u(l.map(function(d,f){return f===l.length-1?d:"".concat(d,"-")}).join(""));var o=[{key:"1",label:"\u5546\u54C1\u540D\u79F0",children:a.data.name},{key:"2",label:"\u5546\u54C1\u4EF7\u683C",children:a.data.price},{key:"3",label:"\u5DE5\u827A\u5206\u7C7B",children:a.data.goodsTypeName},{key:"4",label:"\u5546\u54C1\u5355\u4F4D",children:a.data.goodsUintName}];ee(o)}else v.default.error("\u67E5\u8BE2\u5546\u54C1\u4FE1\u606F\u5931\u8D25")}),(0,E.uz)(r.goodsid).then(function(a){if(a.data.length>0){Ne(a.data);var n=a.data.reduce(function(l,o){return l.sort>o.sort?l:o});Et(n.sort)}}),(0,E.Ds)().then(function(a){rt(a.data)}),(0,E.bn)().then(function(a){if(Ot(a.data),a.data.length>0){var n=a.data.map(function(l){return{value:l.id,label:l.deviceName}});Rt(n)}})},Ma=function(a){be([]);for(var n=a.target,l=n.name,o=n.value,d="",f=(0,p.Z)(N),L=0;L<ne.goodsAttributeList.length;L++)l==="radiogroup"+L&&(f[L]=o);var Q=null;ne.goodsAttributeList.forEach(function(me){for(var B=function(dt){var Qt;qe=(Qt=me.goodsAttributeValueList.find(function(nn){return nn.goodsAttributeValuId==f[dt]}))===null||Qt===void 0?void 0:Qt.attributeValue,qe&&(d=d+qe,dt<f.length-1&&(d=d+"-"))},xe=0;xe<f.length;xe++){var qe;B(xe)}me.goodsAttributeValueList.forEach(function(Oe){o==Oe.goodsAttributeValuId&&(Q=Oe.goodsAttributeId)})}),ne.goodsAttributeList.forEach(function(me){me.goodsAttributeId==Q&&me.goodsAttributeValueList.forEach(function(B){o==B.goodsAttributeValuId?(B.check=!0,me.defalutvalue=o):B.check=!1})}),it(ne),u(d),A(f)},Ua=function(a,n,l){be([]),Jt(!0),Gt(n.deviceId),yt(n.deviceId),Yt(n.deviceId,"edit",n);var o=[],d=ne.goodsAttributeList.map(function(B){return B.goodsAttributeValueList.forEach(function(xe){var qe=n.goodsAttributeId.split(","),Oe=qe.find(function(dt){return dt==xe.goodsAttributeValuId});Oe&&(xe.check=!0,B.defalutvalue=xe.goodsAttributeValuId,o.push(xe.goodsAttributeValuId))}),B}),f=(0,nt.Z)((0,nt.Z)({},ne),{},{goodsAttributeList:d}),L=f;it(L),A(o);var Q=/\【(.*?)\】/,me=n.deviceName.match(Q);u(me[1]),G("update")},Wa=function(a,n){var l=[];a.data.forEach(function(o){var d,f={},L=[],Q=n==null?void 0:n.filter(function(B){return B.technologyId==o.chnologyId});f.stepName=o.stepName,f.id=o.id,f.chnologyId=o.chnologyId,f.sort=o.sort,f.actionJson=o.actionJson,f.optiondata=JSON.parse(o.actionJson),Q==null||Q.forEach(function(B){var xe={id:B.id,actionName:B.actionName,actionType:B.actionType,actionValue:B.actionValue,goodstechnologyId:B.technologyId,technologyType:B.technologyType,sort:B.sort,goddteid:o.id};L.push(xe)}),f.propsdata=L,f.technologyType=o.technologyType,f.typeName=o.stepName;var me=[];f.propsdata.forEach(function(B){var xe=f.optiondata.some(function(Oe){return Oe.technologyactionId===B.id});if(!xe){var qe=f.optiondata.reduce(function(Oe,dt){return Math.max(Oe,dt.index||0)},0);me.push({actionName:B.actionName,actionValue:"",index:qe+1,technologyactionId:B.id})}}),(d=f.optiondata).push.apply(d,me),l.push(f)}),be(l)},Yt=function(a,n,l){var o=[];l&&(ma(l.deviceId),Wt(l.warehousrTemplateId),Kt(l.warehousrTemplateId)),(0,E.t5)(a).then(function(d){if(d.data.length>0){var f,L=[];o=(f=d.data)===null||f===void 0?void 0:f.map(function(Q){return Q.technologyActionInfo.length>0&&Q.technologyActionInfo.forEach(function(me){L.push(me)}),{value:Q.id,label:Q.name}}),ct(L),X(o)}else ct([]),X([]);n=="edit"&&Wa(l,L)})},Ka=function(a,n,l,o,d){gt.length>0&&be([]),(0,E.MP)({devideId:n,goodsId:r.goodsid,goodsAttributeId:l,warehousrTemplateId:o}).then(function(f){f.data?(v.default.success("\u5220\u9664\u6210\u529F"),Bt(),pt.current.reload()):v.default.error("\u5220\u9664\u5931\u8D25")})},Bt=function(){(0,E.uz)(r.goodsid).then(function(a){if(a.data.length>0){Ne(a.data);var n=a.data.reduce(function(o,d){return o.sort>d.sort?o:d});Et(n.sort);var l={attributes:[]};z(l)}else z([]),Ne([])})},ma=function(a){oa("block"),ye(a).then(function(n){Za(n.data)})},Ja=function(a){be([]);var n=!1;ne.goodsAttributeList.forEach(function(l){var o=l.goodsAttributeValueList.find(function(d){return d.check==!0});o!=null?n=!0:n=!1}),n?(Kt(""),a?(Gt(a),yt(a),Yt(a,"",null),ma(a),Jt(!0)):(Wt(""),Jt(!1),oa("none"),Gt(""),yt(""))):v.default.error("\u8BF7\u9009\u62E9\u5C5E\u6027")},Ha=function(a){G(a)},Xa=function(a){be(a)},Ya=function(a){be(a)},Qa=function(){var a=!0,n=[],l="\u6CA1\u6709\u8981\u4FDD\u5B58\u7684\u6570\u636E\u6216\u6570\u636E\u683C\u5F0F\u4E0D\u6B63\u786E";gt.forEach(function(o){var d={};d.deviceId=ge,d.id=o.id,d.stepName=o.stepName,d.chnologyId=o.chnologyId,d.technologyType=o.technologyType,Ue!="add"&&(d.sort=o.sort),o.optiondata.length==0?a=!1:d.actionJson=JSON.stringify(o.optiondata),d.goodsId=r.goodsid,d.warehousrTemplateId=Ut,d.goodsAttributeId=N.join(","),o.chnologyId==""&&(a=!1),(ge==null||ge=="")&&(a=!1,l="\u8BF7\u9009\u62E9\u8BBE\u5907"),(Ut==null||Ut=="")&&(a=!1,l="\u8BF7\u9009\u62E9\u4ED3\u4F4D\u6A21\u677F"),(d.goodsAttributeId==null||d.goodsAttributeId=="")&&(a=!1,l="\u8BF7\u9009\u62E9\u5546\u54C1\u5C5E\u6027"),n.push(d)}),n.length>0&&a?(Ue=="add"?(0,E.XB)(n).then(function(o){o.data?(v.default.success("\u4FDD\u5B58\u6210\u529F"),be([]),Bt(),pt.current.reload()):v.default.error("\u4FDD\u5B58\u5931\u8D25")}):(0,E.uR)(n).then(function(o){o.data?(v.default.success("\u4FDD\u5B58\u6210\u529F"),be([]),Bt(),pt.current.reload()):v.default.error("\u4FDD\u5B58\u5931\u8D25")}),it(ne),G("view"),Ze(!1),ta("add")):v.default.error(l)},qa=function(a){Yt(va.deviceId,"edit",va),G("update"),Lt(!1)},_a=function(){Lt(!1)},en=function(a){G("add"),Wt(a),Kt(a),(0,E.uz)(r.goodsid).then(function(n){n.data.forEach(function(l){l.goodsAttributeId===N.map(function(o,d){return d===N.length-1?o:"".concat(o,",")}).join("")&&l.deviceId===ge&&l.warehousrTemplateId===a&&($a(l),Lt(!0))})})},ya=function(a){a.target.closest(".ant-popover-inner")||Lt(!1)},tn=[{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",hideInSearch:!0},{title:"\u5C5E\u6027\u540D\u79F0",dataIndex:"technologyName",valueType:"textarea",ellipsis:!0},{title:"\u64CD\u4F5C",dataIndex:"option",valueType:"option",fixed:"right",render:function(a,n){return[(0,t.jsx)(ze.Z,{type:"primary",title:"\u662F\u5426\u9700\u8981\u5C06\u5F53\u524D\u5C5E\u6027\u590D\u5236",okText:"\u662F",cancelText:"\u5426",onConfirm:(0,Te.Z)((0,oe.Z)().mark(function l(){var o;return(0,oe.Z)().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return o={OldgoodsId:n.goodsId,goodsAttributeId:n.goodsAttributeId,NewgoodsId:r.goodsid,DevideId:ge,NewgoodsAttributeId:N.join(",")},f.next=3,(0,E.IE)(o).then(function(L){L.succeeded?(v.default.success("\u590D\u5236\u6210\u529F"),be([]),Bt(),Ht(!1),ta("add"),ha.current.reload()):v.default.error(L.errors)});case 3:case"end":return f.stop()}},l)})),onCancel:!0,children:(0,t.jsx)("a",{href:"#",children:"\u590D\u5236"})},"primary")]}}],an=[{title:"\u4E3B\u952E",dataIndex:"id",hideInSearch:!0,hideInTable:!0,tip:"\u89C4\u5219\u540D\u79F0\u662F\u552F\u4E00\u7684 key"},{title:"\u540D\u79F0",dataIndex:"deviceName"},{title:"\u64CD\u4F5C",dataIndex:"option",valueType:"option",fixed:"right",render:function(a,n){return[(0,t.jsx)("a",{type:"primary",onClick:function(o){Ua(o,n)},children:"\u7F16\u8F91"},"primary"),Xt.includes("GoodTeDel")&&(0,t.jsx)(ze.Z,{type:"primary",title:"\u786E\u8BA4\u5220\u9664\u5417\uFF1F",okText:"\u662F",cancelText:"\u5426",onConfirm:function(o){Ka(o,n.deviceId,n.goodsAttributeId,n.warehousrTemplateId)},onCancel:!0,children:(0,t.jsx)("a",{href:"#",children:"\u5220\u9664"})},"primary")]}}];return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(Re.Z,{bodyStyle:{padding:15},children:[(0,t.jsx)("div",{style:{fontSize:16,marginBottom:5,color:"#1890ff",fontWeight:600},children:"\u5546\u54C1\u4FE1\u606F"}),(0,t.jsx)("div",{style:{float:"left"},children:(0,t.jsx)("img",{style:{width:100,height:100},src:ne.imgUrl})}),(0,t.jsx)(at.Z,{style:{float:"left",width:"71%",marginLeft:"10px"},labelStyle:{fontSize:16,fontWeight:600},children:U.map(function(h,a){return(0,t.jsx)(at.Z.Item,{label:h.label,children:h.children},a)})})]}),(0,t.jsxs)(Re.Z,{bodyStyle:{padding:15},children:[(0,t.jsx)("div",{style:{fontSize:16,marginBottom:5,color:"#1890ff",fontWeight:600},children:"\u5546\u54C1\u5C5E\u6027"}),ne.goodsAttributeList==null||ne.goodsAttributeList==""?(0,t.jsxs)("div",{style:{fontSize:"12px",marginLeft:10},children:["\u5F53\u524D\u5546\u54C1\u7684\u5DE5\u827A\u5206\u7C7B\u8FD8\u672A\u914D\u7F6E\u5C5E\u6027\u70B9\u51FB\u8DF3\u8F6C ",(0,t.jsx)("a",{type:"primary",onClick:function(){C.m8.push({pathname:"/database/goods/goodstypemanage"})},children:"\u6DFB\u52A0\u5C5E\u6027"},"primary")]}):ne.goodsAttributeList.map(function(h,a){return(0,t.jsx)("div",{style:{marginLeft:10},children:(0,t.jsxs)("div",{children:[(0,t.jsxs)("span",{style:{marginRight:10},children:[" ",(0,t.jsx)(Je.Z,{color:"blue",style:{fontSize:14,fontWeight:600},children:h.attributeName}),"\uFF1A"]}),(0,t.jsx)("span",{children:(0,t.jsx)(tt.ZP.Group,{name:"radiogroup"+a,buttonStyle:"solid",onChange:Ma,value:h.defalutvalue,children:h.goodsAttributeValueList.map(function(n,l){return(0,t.jsx)(tt.ZP.Button,{name:l,value:n.goodsAttributeValuId,style:{marginRight:22,marginTop:10},children:n.attributeValue},l)})})})]})})})]}),(0,t.jsx)(Re.Z,{bodyStyle:{padding:15},children:(0,t.jsxs)("div",{style:{fontSize:16,marginBottom:5,color:"#1890ff",fontWeight:600},children:[(0,t.jsxs)("span",{style:{float:"left"},children:["\u9009\u62E9\u8BBE\u5907\uFF1A",(0,t.jsx)(re.Z,{showSearch:!0,allowClear:!0,style:{width:200,marginRight:10},value:Ca,placeholder:"\u8BF7\u9009\u62E9\u8BBE\u5907",optionFilterProp:"children",filterOption:function(a,n){var l;return((l=n==null?void 0:n.label)!==null&&l!==void 0?l:"").includes(a)},filterSort:function(a,n){var l,o;return((l=a==null?void 0:a.label)!==null&&l!==void 0?l:"").toLowerCase().localeCompare(((o=n==null?void 0:n.label)!==null&&o!==void 0?o:"").toLowerCase())},onChange:Ja,options:j})]}),(0,t.jsxs)("span",{style:{float:"left",width:"30%",display:ja},children:["\u9009\u62E9\u4ED3\u4F4D\u6A21\u677F\uFF1A",(0,t.jsx)(ze.Z,{title:"\u8BE5\u5546\u54C1\u5C5E\u6027\u7684\u5DE5\u827A\u5DF2\u5B58\u5728\uFF0C\u662F\u5426\u9700\u8981\u7F16\u8F91\uFF1F",visible:Va,onConfirm:qa,onCancel:_a,okText:"\u7F16\u8F91",cancelText:"\u53D6\u6D88",children:(0,t.jsx)(re.Z,{style:{width:"50%"},value:Na,allowClear:!0,showSearch:!0,filterOption:function(a,n){var l;return((l=n==null?void 0:n.label)!==null&&l!==void 0?l:"").includes(a)},filterSort:function(a,n){var l,o;return((l=a==null?void 0:a.label)!==null&&l!==void 0?l:"").toLowerCase().localeCompare(((o=n==null?void 0:n.label)!==null&&o!==void 0?o:"").toLowerCase())},onChange:en,children:Mt==null?void 0:Mt.map(function(h,a){return(0,t.jsx)(re.Z.Option,{index:a,value:h.id,children:h.templateName},h.id)})})})]}),Xt.includes("GoodTeCopy")&&(0,t.jsx)("span",{children:Ta&&(0,t.jsx)(w.Z,{type:"primary",ghost:!0,onClick:Ra,children:"\u590D\u5236"})})]})}),(0,t.jsxs)(Re.Z,{bodyStyle:{padding:15},children:[(0,t.jsx)("div",{style:{fontSize:16,marginBottom:5,color:"#1890ff",fontWeight:600},children:"\u5DE5\u827A\u8BBE\u8BA1"}),(0,t.jsxs)(P.Z,{split:"vertical",children:[(0,t.jsxs)(P.Z,{title:"\u7F16\u8F91\u5DE5\u827A",type:"inner",colSpan:"33%",bodyStyle:{padding:5},headerBordered:!0,headStyle:{paddingLeft:"5%"},extra:[Xt.includes("GoodTeUp")&&(0,t.jsx)(w.Z,{type:"primary",ghost:!0,onClick:function(){Qa()},children:"\u4FDD\u5B58\u5DE5\u827A"})],children:[(0,t.jsx)("div",{style:{textAlign:"center",marginBottom:10,color:"brown"},children:H}),(0,t.jsx)(c,{devideId:ge,goodsId:r.goodsid,goodsAttributeId:N.join(","),disabled:he,fromdata:gt,maxsort:$t,UpdataStatus:Ue,onUpdataStatus:Ha,ontechnologyChange:Ya,onSaveClick:Xa,goodstechnologydata:fe,technologyattralldata:lt,batchingdata:Tt})]}),(0,t.jsx)(P.Z,{title:"\u67E5\u770B\u5DE5\u827A",type:"inner",headStyle:{paddingLeft:"45%",paddingBottom:"2.1%"},bodyStyle:{padding:5},pagination:{defaultPageSize:10},search:{labelWidth:200},children:(0,t.jsx)(D.ZP,{headerTitle:"",actionRef:pt,rowKey:"id",pagination:{defaultPageSize:10},search:{labelWidth:120},request:function(){var h=(0,Te.Z)((0,oe.Z)().mark(function a(n){var l,o;return(0,oe.Z)().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return l=[],o=0,n.goodsId=r.goodsid,f.next=5,(0,E.o5)(n).then(function(L){l=L.data.data,o=L.data.total});case 5:return f.abrupt("return",{data:l,success:!0,total:o});case 6:case"end":return f.stop()}},a)}));return function(a){return h.apply(this,arguments)}}(),columns:an,rowSelection:!1})})]})]}),(0,t.jsx)(St.Z,{title:"\u5DE5\u827A\u5C5E\u6027",open:La,onCancel:za,width:1040,destroyOnClose:!0,bodyStyle:{padding:"32px 40px 1px 48px"},visible:Da,footer:null,children:(0,t.jsx)(D.ZP,{pagination:{defaultPageSize:10},actionRef:ha,request:function(){var h=(0,Te.Z)((0,oe.Z)().mark(function a(n){var l;return(0,oe.Z)().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return l=[],n.deviceId=ge,d.next=4,(0,E.Ny)(n).then(function(f){l=f.data});case 4:return d.abrupt("return",{data:l,success:!0});case 5:case"end":return d.stop()}},a)}));return function(a){return h.apply(this,arguments)}}(),columns:tn})})]})},x=m,$=e(9669),le=et.Z.Step,ie=re.Z.Option,Ie=re.Z.OptGroup,Ee=s.Z.TextArea,Pe=function(r){var J;return(0,y.useEffect)(function(){},[]),(0,t.jsx)(Ct.ZP,{host:!0,header:{title:[(0,t.jsxs)("a",{onClick:function(){C.m8.push({pathname:"/database/goods/newgoods",state:{deviceId:r.location.query.deviceId}})},children:[(0,t.jsx)(S.Z,{}),"\u8FD4\u56DE"]},"back")],breadcrumb:{}},title:"\u5546\u54C1\u5DE5\u827A",children:(0,t.jsx)(x,{goodsid:(J=r.location.query.values)===null||J===void 0?void 0:J.id})})},He=Pe},4914:function(st,We,e){"use strict";e.d(We,{K:function(){return de},Z:function(){return nt}});var Z=e(96156),s=e(28481),_e=e(90484),re=e(94184),I=e.n(re),et=e(50344),S=e(67294),Ct=e(53124),y=e(96159),Fe=e(24308),St=function(g){var v=g.children;return v},bt=St,w=e(22122);function Ke(p){return p!=null}var tt=function(g){var v=g.itemPrefixCls,i=g.component,P=g.span,D=g.className,C=g.style,E=g.labelStyle,K=g.contentStyle,ye=g.bordered,k=g.label,ae=g.content,Ge=g.colon,pe=i;if(ye){var O;return S.createElement(pe,{className:I()((O={},(0,Z.Z)(O,"".concat(v,"-item-label"),Ke(k)),(0,Z.Z)(O,"".concat(v,"-item-content"),Ke(ae)),O),D),style:C,colSpan:P},Ke(k)&&S.createElement("span",{style:E},k),Ke(ae)&&S.createElement("span",{style:K},ae))}return S.createElement(pe,{className:I()("".concat(v,"-item"),D),style:C,colSpan:P},S.createElement("div",{className:"".concat(v,"-item-container")},(k||k===0)&&S.createElement("span",{className:I()("".concat(v,"-item-label"),(0,Z.Z)({},"".concat(v,"-item-no-colon"),!Ge)),style:E},k),(ae||ae===0)&&S.createElement("span",{className:I()("".concat(v,"-item-content")),style:K},ae)))},je=tt;function Je(p,g,v){var i=g.colon,P=g.prefixCls,D=g.bordered,C=v.component,E=v.type,K=v.showLabel,ye=v.showContent,k=v.labelStyle,ae=v.contentStyle;return p.map(function(Ge,pe){var O=Ge.props,Le=O.label,se=O.children,Ce=O.prefixCls,t=Ce===void 0?P:Ce,Be=O.className,q=O.style,Se=O.labelStyle,Ve=O.contentStyle,c=O.span,b=c===void 0?1:c,m=Ge.key;return typeof C=="string"?S.createElement(je,{key:"".concat(E,"-").concat(m||pe),className:Be,style:q,labelStyle:(0,w.Z)((0,w.Z)({},k),Se),contentStyle:(0,w.Z)((0,w.Z)({},ae),Ve),span:b,colon:i,component:C,itemPrefixCls:t,bordered:D,label:K?Le:null,content:ye?se:null}):[S.createElement(je,{key:"label-".concat(m||pe),className:Be,style:(0,w.Z)((0,w.Z)((0,w.Z)({},k),q),Se),span:1,colon:i,component:C[0],itemPrefixCls:t,bordered:D,label:Le}),S.createElement(je,{key:"content-".concat(m||pe),className:Be,style:(0,w.Z)((0,w.Z)((0,w.Z)({},ae),q),Ve),span:b*2-1,component:C[1],itemPrefixCls:t,bordered:D,content:se})]})}var Zt=function(g){var v=S.useContext(de),i=g.prefixCls,P=g.vertical,D=g.row,C=g.index,E=g.bordered;return P?S.createElement(S.Fragment,null,S.createElement("tr",{key:"label-".concat(C),className:"".concat(i,"-row")},Je(D,g,(0,w.Z)({component:"th",type:"label",showLabel:!0},v))),S.createElement("tr",{key:"content-".concat(C),className:"".concat(i,"-row")},Je(D,g,(0,w.Z)({component:"td",type:"content",showContent:!0},v)))):S.createElement("tr",{key:C,className:"".concat(i,"-row")},Je(D,g,(0,w.Z)({component:E?["th","td"]:"td",type:"item",showLabel:!0,showContent:!0},v)))},Re=Zt,de=S.createContext({}),at={xxl:3,xl:3,lg:3,md:3,sm:2,xs:1};function xt(p,g){if(typeof p=="number")return p;if((0,_e.Z)(p)==="object")for(var v=0;v<Fe.c4.length;v++){var i=Fe.c4[v];if(g[i]&&p[i]!==void 0)return p[i]||at[i]}return 3}function ze(p,g,v){var i=p;return(g===void 0||g>v)&&(i=(0,y.Tm)(p,{span:v})),i}function oe(p,g){var v=(0,et.Z)(p).filter(function(C){return C}),i=[],P=[],D=g;return v.forEach(function(C,E){var K,ye=(K=C.props)===null||K===void 0?void 0:K.span,k=ye||1;if(E===v.length-1){P.push(ze(C,ye,D)),i.push(P);return}k<D?(D-=k,P.push(C)):(P.push(ze(C,k,D)),i.push(P),D=g,P=[])}),i}function Te(p){var g,v=p.prefixCls,i=p.title,P=p.extra,D=p.column,C=D===void 0?at:D,E=p.colon,K=E===void 0?!0:E,ye=p.bordered,k=p.layout,ae=p.children,Ge=p.className,pe=p.style,O=p.size,Le=p.labelStyle,se=p.contentStyle,Ce=S.useContext(Ct.E_),t=Ce.getPrefixCls,Be=Ce.direction,q=t("descriptions",v),Se=S.useState({}),Ve=(0,s.Z)(Se,2),c=Ve[0],b=Ve[1],m=xt(C,c);S.useEffect(function(){var le=Fe.ZP.subscribe(function(ie){(0,_e.Z)(C)==="object"&&b(ie)});return function(){Fe.ZP.unsubscribe(le)}},[]);var x=oe(ae,m),$=S.useMemo(function(){return{labelStyle:Le,contentStyle:se}},[Le,se]);return S.createElement(de.Provider,{value:$},S.createElement("div",{className:I()(q,(g={},(0,Z.Z)(g,"".concat(q,"-").concat(O),O&&O!=="default"),(0,Z.Z)(g,"".concat(q,"-bordered"),!!ye),(0,Z.Z)(g,"".concat(q,"-rtl"),Be==="rtl"),g),Ge),style:pe},(i||P)&&S.createElement("div",{className:"".concat(q,"-header")},i&&S.createElement("div",{className:"".concat(q,"-title")},i),P&&S.createElement("div",{className:"".concat(q,"-extra")},P)),S.createElement("div",{className:"".concat(q,"-view")},S.createElement("table",null,S.createElement("tbody",null,x.map(function(le,ie){return S.createElement(Re,{key:ie,index:ie,colon:K,prefixCls:q,vertical:k==="vertical",bordered:ye,row:le})}))))))}Te.Item=bt;var nt=Te},98858:function(st,We,e){"use strict";var Z=e(38663),s=e.n(Z),_e=e(52953),re=e.n(_e)}}]);
|