包含后厨 团餐 门店分支
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
72 KiB

  1. (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[5462],{50727:function(Jt,gt,n){"use strict";var We=n(9715),le=n(55843),Ke=n(57663),$e=n(71577),Le=n(96156),Pt=n(28481),F=n(81253),yt=n(55507),Ht=n(92137),$=n(28991),ie=n(85893),It=n(49101),ye=n(97462),Xe=n(952),Ce=n(78775),lt=n(26369),qe=n(22270),wt=n(48171),Dt=n(60249),h=n(21770),Mt=n(88306),T=n(8880),C=n(67294),Rt=n(77153),Y=["onTableChange","maxLength","formItemProps","recordCreatorProps","rowKey","controlled","defaultValue","onChange","editableFormRef"],y=["record","position","creatorButtonText","newRecordType","parentKey","style"],w=C.createContext(void 0);function p(r){var d=r.children,K=r.record,xe=r.position,Ee=r.newRecordType,je=r.parentKey,i=(0,C.useContext)(w);return C.cloneElement(d,(0,$.Z)((0,$.Z)({},d.props),{},{onClick:function(){var pe=(0,Ht.Z)((0,yt.Z)().mark(function Ie(fe){var ke,e,we,De;return(0,yt.Z)().wrap(function(D){for(;;)switch(D.prev=D.next){case 0:return D.next=2,(ke=(e=d.props).onClick)===null||ke===void 0?void 0:ke.call(e,fe);case 2:if(De=D.sent,De!==!1){D.next=5;break}return D.abrupt("return");case 5:i==null||(we=i.current)===null||we===void 0||we.addEditRecord(K,{position:xe,newRecordType:Ee,parentKey:je});case 6:case"end":return D.stop()}},Ie)}));function me(Ie){return pe.apply(this,arguments)}return me}()}))}function f(r){var d,K,xe=(0,Ce.YB)(),Ee=r.onTableChange,je=r.maxLength,i=r.formItemProps,pe=r.recordCreatorProps,me=r.rowKey,Ie=r.controlled,fe=r.defaultValue,ke=r.onChange,e=r.editableFormRef,we=(0,F.Z)(r,Y),De=(0,lt.Z)(r.value),et=(0,C.useRef)(),D=(0,C.useRef)();(0,C.useImperativeHandle)(we.actionRef,function(){return et.current});var Lt=(0,h.Z)(function(){return r.value||fe||[]},{value:r.value,onChange:r.onChange}),tt=(0,Pt.Z)(Lt,2),k=tt[0],_=tt[1],Re=C.useMemo(function(){return typeof me=="function"?me:function(se,O){return se[me]||O}},[me]),Ft=function(O){if(typeof O=="number"&&!r.name){if(O>=k.length)return O;var V=k&&k[O];return Re==null?void 0:Re(V,O)}if((typeof O=="string"||O>=k.length)&&r.name){var z=k.findIndex(function(J,he){var ue;return(Re==null||(ue=Re(J,he))===null||ue===void 0?void 0:ue.toString())===(O==null?void 0:O.toString())});return z}return O};(0,C.useImperativeHandle)(e,function(){var se=function(z){var J,he;if(z==null)throw new Error("rowIndex is required");var ue=Ft(z),at=[r.name,(J=ue==null?void 0:ue.toString())!==null&&J!==void 0?J:""].flat(1).filter(Boolean);return(he=D.current)===null||he===void 0?void 0:he.getFieldValue(at)},O=function(){var z,J=[r.name].flat(1).filter(Boolean);if(Array.isArray(J)&&J.length===0){var he,ue=(he=D.current)===null||he===void 0?void 0:he.getFieldsValue();return Array.isArray(ue)?ue:Object.keys(ue).map(function(at){return ue[at]})}return(z=D.current)===null||z===void 0?void 0:z.getFieldValue(J)};return(0,$.Z)((0,$.Z)({},D.current),{},{getRowData:se,getRowsData:O,setRowData:function(z,J){var he,ue,at,Kt;if(z==null)throw new Error("rowIndex is required");var ua=Ft(z),da=[r.name,(he=ua==null?void 0:ua.toString())!==null&&he!==void 0?he:""].flat(1).filter(Boolean),an=((ue=D.current)===null||ue===void 0||(at=ue.getFieldsValue)===null||at===void 0?void 0:at.call(ue))||{},ca=(0,T.Z)(an,da,(0,$.Z)((0,$.Z)({},se(z)),J||{}));return(Kt=D.current)===null||Kt===void 0?void 0:Kt.setFieldsValue(ca)}})}),(0,C.useEffect)(function(){!r.controlled||k.forEach(function(se,O){var V;(V=D.current)===null||V===void 0||V.setFieldsValue((0,Le.Z)({},Re(se,O),se))},{})},[k,r.controlled]),(0,C.useEffect)(function(){if(r.name){var se;D.current=r==null||(se=r.editable)===null||se===void 0?void 0:se.form}},[(d=r.editable)===null||d===void 0?void 0:d.form,r.name]);var it=pe||{},pt=it.record,st=it.position,la=it.creatorButtonText,tn=it.newRecordType,ia=it.parentKey,Pa=it.style,sa=(0,F.Z)(it,y),Ca=st==="top",bt=(0,C.useMemo)(function(){return je&&je<=(k==null?void 0:k.length)?!1:pe!==!1&&(0,ie.jsx)(p,{record:(0,qe.h)(pt,k==null?void 0:k.length,k)||{},position:st,parentKey:(0,qe.h)(ia,k==null?void 0:k.length,k),newRecordType:tn,children:(0,ie.jsx)($e.Z,(0,$.Z)((0,$.Z)({type:"dashed",style:(0,$.Z)({display:"block",margin:"10px 0",width:"100%"},Pa),icon:(0,ie.jsx)(It.Z,{})},sa),{},{children:la||xe.getMessage("editableTable.action.add","\u6DFB\u52A0\u4E00\u884C\u6570\u636E")}))})},[pe,je,k==null?void 0:k.length]),Ia=(0,C.useMemo)(function(){return bt?Ca?{components:{header:{wrapper:function(O){var V,z=O.className,J=O.children;return(0,ie.jsxs)("thead",{className:z,children:[J,(0,ie.jsxs)("tr",{style:{position:"relative"},children:[(0,ie.jsx)("td",{colSpan:0,style:{visibility:"hidden"},children:bt}),(0,ie.jsx)("td",{style:{position:"absolute",left:0,width:"100%"},colSpan:(V=we.columns)===null||V===void 0?void 0:V.length,children:bt})]})]})}}}}:{tableViewRender:function(O,V){var z,J;return(0,ie.jsxs)(ie.Fragment,{children:[(z=(J=r.tableViewRender)===null||J===void 0?void 0:J.call(r,O,V))!==null&&z!==void 0?z:V,bt]})}}:{}},[Ca,bt]),Wt=(0,$.Z)({},r.editable),wa=(0,wt.J)(function(se,O){var V,z,J;if((V=r.editable)===null||V===void 0||(z=V.onValuesChange)===null||z===void 0||z.call(V,se,O),(J=r.onValuesChange)===null||J===void 0||J.call(r,O,se),r.controlled){var he;r==null||(he=r.onChange)===null||he===void 0||he.call(r,O)}});return((r==null?void 0:r.onValuesChange)||((K=r.editable)===null||K===void 0?void 0:K.onValuesChange)||r.controlled&&(r==null?void 0:r.onChange))&&(Wt.onValuesChange=wa),(0,ie.jsxs)(ie.Fragment,{children:[(0,ie.jsx)(w.Provider,{value:et,children:(0,ie.jsx)(Rt.Z,(0,$.Z)((0,$.Z)((0,$.Z)({search:!1,options:!1,pagination:!1,rowKey:me,revalidateOnFocus:!1},we),Ia),{},{tableLayout:"fixed",actionRef:et,onChange:Ee,editable:(0,$.Z)((0,$.Z)({},Wt),{},{formProps:(0,$.Z)({formRef:D},Wt.formProps)}),dataSource:k,onDataSourceChange:function(O){if(_(O),r.name&&st==="top"){var V,z=(0,T.Z)({},[r.name].flat(1).filter(Boolean),O);(V=D.current)===null||V===void 0||V.setFieldsValue(z)}}}))}),r.name?(0,ie.jsx)(ye.Z,{name:[r.name],children:function(O){var V,z,J=(0,Mt.Z)(O,[r.name].flat(1)),he=J==null?void 0:J.find(function(ue,at){return!(0,Dt.Z)(ue,De==null?void 0:De[at])});return he&&De&&(r==null||(V=r.editable)===null||V===void 0||(z=V.onValuesChange)===null||z===void 0||z.call(V,he,J)),null}}):null]})}function v(r){var d=Xe.ZP.useFormInstance();return r.name?(0,ie.jsx)(le.Z.Item,(0,$.Z)((0,$.Z)({style:{maxWidth:"100%"}},r==null?void 0:r.formItemProps),{},{name:r.name,children:(0,ie.jsx)(f,(0,$.Z)((0,$.Z)({},r),{},{editable:(0,$.Z)((0,$.Z)({},r.editable),{},{form:d})}))})):(0,ie.jsx)(f,(0,$.Z)({},r))}v.RecordCreator=p,gt.Z=v},86788:function(Jt){Jt.exports={main:"main___2WFgL",headerList:"headerList___biBTa",stepDescription:"stepDescription___1s2vA",pageHeader:"pageHeader___s3P6L",moreInfo:"moreInfo___69vNN",formlable:"formlable___f0Dsl",formlabletxt:"formlabletxt___3mBrA"}},6599:function(){},43237:function(){},31666:function(){},61070:function(){},58856:function(){},52953:function(){},70736:function(Jt,gt,n){"use strict";n.r(gt),n.d(gt,{default:function(){return co}});var We=n(58024),le=n(91894),Ke=n(77576),$e=n(59314),Le=n(11849),Pt=n(43185),F=n(93349),yt=n(62999),Ht=n(85733),$=n(77883),ie=n(21888),It=n(49111),ye=n(19650),Xe=n(57663),Ce=n(71577),lt=n(48736),qe=n(27049),wt=n(62350),Dt=n(24565),h=n(39428),Mt=n(34792),T=n(48086),C=n(3182),Rt=n(9715),Y=n(55843),y=n(2824),w=n(47673),p=n(4107),f=n(43358),v=n(34041),r=n(35556),d=n(57748),K=n(49101),xe=n(84391),Ee=n(6700),je=n(28790),i=n(67294),pe=n(94184),me=n.n(pe),Ie=n(16894),fe=n(71194),ke=n(50146),e=n(85893),we=function(t){var l,a=v.Z.Option,x=v.Z.OptGroup;return(0,e.jsx)(ke.Z,{title:"\u5173\u8054\u5546\u54C1\u914D\u65B9",width:640,visible:t.createModalVisible,bodyStyle:{padding:"32px 40px 1px 48px"},footer:null,onCancel:function(){t.onCancel()},destroyOnClose:!0,children:(0,e.jsxs)(Y.Z,{labelCol:{span:4},layout:"horizontal",preserve:!1,onFinish:t.onFinish,children:[(0,e.jsx)(Y.Z.Item,{name:"bomId",label:"\u914D\u65B9\u4FE1\u606F",rules:[{required:!0,message:"\u914D\u65B9\u4FE1\u606F"}],children:(0,e.jsx)(v.Z,{showSearch:!0,mode:"multiple",optionFilterProp:"children",placeholder:"\u8BF7\u9009\u914D\u65B9\u4FE1\u606F",children:(l=t.Bomdata)===null||l===void 0?void 0:l.map(function(m,M){return(0,e.jsx)(a,{index:M,value:m.id,children:m.name},m.id)})})}),(0,e.jsxs)(Y.Z.Item,{children:[(0,e.jsx)(Ce.Z,{htmlType:"button",style:{float:"right",left:10},onClick:t.onCancel,children:"\u53D6\u6D88"}),(0,e.jsx)(Ce.Z,{type:"primary",htmlType:"submit",style:{float:"right"},children:"\u4FDD\u5B58"})]})]})})},De=we,et=n(88983),D=n(47933),Lt=n(71153),tt=n(60331),k=n(86582),_=n(48971);function Re(o){return Ft.apply(this,arguments)}function Ft(){return Ft=(0,C.Z)((0,h.Z)().mark(function o(t){return(0,h.Z)().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.abrupt("return",(0,_.WY)("/saasbase/api/goods/getgoodsbompage",{method:"Post",data:t}));case 1:case"end":return a.stop()}},o)})),Ft.apply(this,arguments)}function it(o){return pt.apply(this,arguments)}function pt(){return pt=_asyncToGenerator(_regeneratorRuntime().mark(function o(t){return _regeneratorRuntime().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.abrupt("return",request("/saasbase/api/bom/getpage",{method:"Post",data:t}));case 1:case"end":return a.stop()}},o)})),pt.apply(this,arguments)}function st(o){return la.apply(this,arguments)}function la(){return la=(0,C.Z)((0,h.Z)().mark(function o(t){return(0,h.Z)().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.abrupt("return",(0,_.WY)("/saasbase/api/systemconfig/GetCosRequestSignURL",{method:"POST",data:t}));case 1:case"end":return a.stop()}},o)})),la.apply(this,arguments)}function tn(o){return ia.apply(this,arguments)}function ia(){return ia=_asyncToGenerator(_regeneratorRuntime().mark(function o(t){return _regeneratorRuntime().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.abrupt("return",request("/saasbase/api/GoodsBom/AddBom",{method:"Post",data:t}));case 1:case"end":return a.stop()}},o)})),ia.apply(this,arguments)}function Pa(o){return sa.apply(this,arguments)}function sa(){return sa=(0,C.Z)((0,h.Z)().mark(function o(t){return(0,h.Z)().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.abrupt("return",(0,_.WY)("/saasbase/api/bom/getbomtypelist",{method:"Get"}));case 1:case"end":return a.stop()}},o)})),sa.apply(this,arguments)}function Ca(o){return bt.apply(this,arguments)}function bt(){return bt=(0,C.Z)((0,h.Z)().mark(function o(t){return(0,h.Z)().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.abrupt("return",(0,_.WY)("/saasbase/api/bom/addbomtype",{method:"Post",data:t}));case 1:case"end":return a.stop()}},o)})),bt.apply(this,arguments)}function Ia(o){return Wt.apply(this,arguments)}function Wt(){return Wt=(0,C.Z)((0,h.Z)().mark(function o(t){return(0,h.Z)().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.abrupt("return",(0,_.WY)("/saasbase/api/goods/delgoodsbom?Ids=".concat(t),{method:"GET"}));case 1:case"end":return a.stop()}},o)})),Wt.apply(this,arguments)}function wa(o){return se.apply(this,arguments)}function se(){return se=(0,C.Z)((0,h.Z)().mark(function o(t){return(0,h.Z)().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.abrupt("return",(0,_.WY)("\u200B/saasbase/api\u200B/goodstype/tree",{method:"GET",data:(0,Le.Z)({},t)}));case 1:case"end":return a.stop()}},o)})),se.apply(this,arguments)}function O(){return V.apply(this,arguments)}function V(){return V=(0,C.Z)((0,h.Z)().mark(function o(){return(0,h.Z)().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.abrupt("return",(0,_.WY)("/saasbase/api/goods/getgoodsuintlist",{method:"Get"}));case 1:case"end":return l.stop()}},o)})),V.apply(this,arguments)}function z(o){return J.apply(this,arguments)}function J(){return J=(0,C.Z)((0,h.Z)().mark(function o(t){return(0,h.Z)().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.abrupt("return",(0,_.WY)("/saasbase/api/goods/addgoodsuint",{method:"Post",data:t}));case 1:case"end":return a.stop()}},o)})),J.apply(this,arguments)}function he(o){return ue.apply(this,arguments)}function ue(){return ue=(0,C.Z)((0,h.Z)().mark(function o(t){return(0,h.Z)().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.abrupt("return",(0,_.WY)("/saasbase/api/goodsattribute/getbygoodsidattribute?id="+t,{method:"Get"}));case 1:case"end":return a.stop()}},o)})),ue.apply(this,arguments)}function at(){return Kt.apply(this,arguments)}function Kt(){return Kt=(0,C.Z)((0,h.Z)().mark(function o(){return(0,h.Z)().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.abrupt("return",(0,_.WY)("/saasbase/api/bom/getbomlist",{method:"Get"}));case 1:case"end":return l.stop()}},o)})),Kt.apply(this,arguments)}function ua(o){return da.apply(this,arguments)}function da(){return da=(0,C.Z)((0,h.Z)().mark(function o(t){return(0,h.Z)().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.abrupt("return",(0,_.WY)("/saasbase/api/batching/getbatchingselectlist",{method:"Get"}));case 1:case"end":return a.stop()}},o)})),da.apply(this,arguments)}function an(o){return ca.apply(this,arguments)}function ca(){return ca=_asyncToGenerator(_regeneratorRuntime().mark(function o(t){return _regeneratorRuntime().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.abrupt("return",request("/saasbase/api/bom/getbomtypepage",{method:"Post",data:t}));case 1:case"end":return a.stop()}},o)})),ca.apply(this,arguments)}function fn(o){return Da.apply(this,arguments)}function Da(){return Da=(0,C.Z)((0,h.Z)().mark(function o(t){return(0,h.Z)().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.abrupt("return",(0,_.WY)("/saasbase/api/goods/addgoodsbomattribute",{method:"Post",data:t}));case 1:case"end":return a.stop()}},o)})),Da.apply(this,arguments)}function hn(o){return Ra.apply(this,arguments)}function Ra(){return Ra=(0,C.Z)((0,h.Z)().mark(function o(t){return(0,h.Z)().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.abrupt("return",(0,_.WY)("/saasbase/api/goods/addgoodsbom",{method:"Post",data:t}));case 1:case"end":return a.stop()}},o)})),Ra.apply(this,arguments)}function mn(o){return Fa.apply(this,arguments)}function Fa(){return Fa=(0,C.Z)((0,h.Z)().mark(function o(t){return(0,h.Z)().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.abrupt("return",(0,_.WY)("/saasbase/api/goods/getbyidgoods?id="+t,{method:"Get"}));case 1:case"end":return a.stop()}},o)})),Fa.apply(this,arguments)}function vo(o){return Na.apply(this,arguments)}function Na(){return Na=_asyncToGenerator(_regeneratorRuntime().mark(function o(t){return _regeneratorRuntime().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.abrupt("return",request("/saasbase/api/goodstechnology/GetGoodsTechnology",{method:"Post",data:t}));case 1:case"end":return a.stop()}},o)})),Na.apply(this,arguments)}function go(o){return Ga.apply(this,arguments)}function Ga(){return Ga=_asyncToGenerator(_regeneratorRuntime().mark(function o(t){return _regeneratorRuntime().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.abrupt("return",request("/saasbase/api/goodstechnology/gettechnologyactionList?GoodstechnologyId="+t,{method:"Get"}));case 1:case"end":return a.stop()}},o)})),Ga.apply(this,arguments)}function vn(){return $a.apply(this,arguments)}function $a(){return $a=(0,C.Z)((0,h.Z)().mark(function o(){return(0,h.Z)().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.abrupt("return",(0,_.WY)("/saasbase/api/devicetechnology/gettechnologyactionlist",{method:"Get"}));case 1:case"end":return l.stop()}},o)})),$a.apply(this,arguments)}function gn(o){return ka.apply(this,arguments)}function ka(){return ka=(0,C.Z)((0,h.Z)().mark(function o(t){return(0,h.Z)().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.abrupt("return",(0,_.WY)("/saasbase/api/goodstechnology/addgoodstechnologyaction",{method:"Post",data:t}));case 1:case"end":return a.stop()}},o)})),ka.apply(this,arguments)}function yn(o){return Oa.apply(this,arguments)}function Oa(){return Oa=(0,C.Z)((0,h.Z)().mark(function o(t){return(0,h.Z)().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.abrupt("return",(0,_.WY)("/saasbase/api/goodstechnology/updategoodstechnologyaction",{method:"Post",data:t}));case 1:case"end":return a.stop()}},o)})),Oa.apply(this,arguments)}function nn(o){return Va.apply(this,arguments)}function Va(){return Va=(0,C.Z)((0,h.Z)().mark(function o(t){return(0,h.Z)().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.abrupt("return",(0,_.WY)("/saasbase/api/goodstechnology/getGoodstechnologyaction?goodsId="+t,{method:"Get"}));case 1:case"end":return a.stop()}},o)})),Va.apply(this,arguments)}function pn(o){return Ma.apply(this,arguments)}function Ma(){return Ma=(0,C.Z)((0,h.Z)().mark(function o(t){return(0,h.Z)().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.abrupt("return",(0,_.WY)("/saasbase/api/goodstechnology/deletegoodstechnologyaction?id="+t,{method:"Get"}));case 1:case"end":return a.stop()}},o)})),Ma.apply(this,arguments)}function bn(o){return La.apply(this,arguments)}function La(){return La=(0,C.Z)((0,h.Z)().mark(function o(t){return(0,h.Z)().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.abrupt("return",(0,_.WY)("/saasbase/api/goodstechnology/deletebydevidegoodstechnologyaction",{method:"Post",data:t}));case 1:case"end":return a.stop()}},o)})),La.apply(this,arguments)}function Zn(){return Wa.apply(this,arguments)}function Wa(){return Wa=(0,C.Z)((0,h.Z)().mark(function o(){return(0,h.Z)().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.abrupt("return",(0,_.WY)("/saasbase/api/goodstechnology/getdevicetechnology",{method:"Get"}));case 1:case"end":return l.stop()}},o)})),Wa.apply(this,arguments)}function Cn(){return Ka.apply(this,arguments)}function Ka(){return Ka=(0,C.Z)((0,h.Z)().mark(function o(){return(0,h.Z)().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.abrupt("return",(0,_.WY)("/saasbase/api/batching/getbytypebatching",{method:"Get"}));case 1:case"end":return l.stop()}},o)})),Ka.apply(this,arguments)}var Sn=n(50727),xn=function(t){var l=v.Z.Option,a=v.Z.OptGroup,x=(0,i.useState)([]),m=(0,y.Z)(x,2),M=m[0],P=m[1],L=(0,i.useState)([]),B=(0,y.Z)(L,2),R=B[0],X=B[1],Oe=(0,i.useState)([]),ve=(0,y.Z)(Oe,2),Te=ve[0],N=ve[1],Se=(0,i.useState)([]),ne=(0,y.Z)(Se,2),S=ne[0],E=ne[1],oe=(0,i.useState)([]),j=(0,y.Z)(oe,2),I=j[0],q=j[1],Fe=(0,i.useRef)(),Ue=Y.Z.useForm(),Nt=(0,y.Z)(Ue,1),Ne=Nt[0],Ve=(0,i.useState)(""),Gt=(0,y.Z)(Ve,2),dt=Gt[0],Ct=Gt[1],St=(0,i.useRef)(null),Xt=function(W){Ct(W.target.value)},$t=function(W){W.preventDefault(),Ct("");var te={name:dt};Ca(te).then(function(ee){ee.succeeded?(T.default.success("\u6DFB\u52A0\u6210\u529F"),t.initTypeList()):T.default.error(ee.errors)})};(0,i.useEffect)(function(){if(console.log("111111111"),console.log(t.defaultmatedata),Ne.setFieldsValue({bomName:t.goodsname}),t.defaultmatedata){var H=[];t.defaultmatedata.forEach(function(W,te){var ee={id:te,batchingId:W,dosage:0};H.push(ee)}),q(H.map(function(W){return W.id})),E(H)}},[]);var kt=[{title:"\u7269\u6599\u540D\u79F0",dataIndex:"batchingId",formItemProps:function(W,te){var ee=te.rowIndex;return{rules:ee>1?[{required:!0,message:"\u6B64\u9879\u4E3A\u5FC5\u586B\u9879"}]:[]}},valueType:"select",fieldProps:{showSearch:!0,options:t.matedata.map(function(H,W){return{label:H.name,value:H.id}})},width:"25%"},{title:"\u7528\u91CF",dataIndex:"dosage",valueType:"digit",width:"15%"},{title:"\u64CD\u4F5C",valueType:"option",width:"15%",render:function(){return null}}],xt=function(){Ne.validateFields().then(function(W){var te=!0,ee=W;console.log(S),Te.length==0?(te=!1,T.default.error("\u8BF7\u9009\u62E9\u5546\u54C1\u5C5E\u6027")):ee.shuxing=Te,S.length==0?(te=!1,T.default.error("\u8BF7\u9009\u62E9\u7269\u6599")):ee.mate=S.map(function(_e){return{batchingId:_e.batchingId,dosage:_e.dosage}}),te&&(Ne.resetFields(),t.onFinish(ee),E([]))}).catch(function(W){T.default.error("\u8BF7\u586B\u5199\u5FC5\u586B\u4FE1\u606F")})},Me=function(W){for(var te=W.target,ee=te.name,_e=te.value,Be="",re=(0,k.Z)(Te),Ye=0;Ye<t.goodsAttriburteData.length;Ye++)ee==="radiogroup"+Ye&&(re[Ye]=_e);t.goodsAttriburteData.forEach(function(nt){for(var jt=function(ot){var ze;Tt=(ze=nt.goodsAttributeValueList.find(function(Ut){return Ut.goodsAttributeValuId==re[ot]}))===null||ze===void 0?void 0:ze.attributeValue,Tt&&(Be=Be+Tt,ot<re.length-1&&(Be=Be+"-"))},Et=0;Et<re.length;Et++){var Tt;jt(Et)}}),Ne.setFieldsValue({bomName:t.goodsname+"("+Be+")"}),N(re)};return(0,e.jsxs)(ke.Z,{title:"\u65B0\u5EFA\u914D\u65B9",width:1040,visible:t.handleCreateoodsBomModalVisible,bodyStyle:{padding:"32px 40px 1px 48px"},okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:xt,onCancel:function(){t.onCancel()},destroyOnClose:!0,children:[(0,e.jsxs)(Y.Z,{layout:"horizontal",preserve:!1,form:Ne,children:[(0,e.jsx)(Y.Z.Item,{name:"bomName",label:"\u914D\u65B9\u540D\u79F0",rules:[{required:!0,message:"\u914D\u65B9\u540D\u79F0"}],children:(0,e.jsx)(p.Z,{placeholder:"\u8BF7\u8F93\u5165\u914D\u65B9\u540D\u79F0"})}),(0,e.jsx)(Y.Z.Item,{name:"bomTypeList",rules:[{required:!0,message:"\u914D\u65B9\u5206\u7C7B"}],label:"\u914D\u65B9\u5206\u7C7B",children:(0,e.jsx)(v.Z,{style:{width:"100%"},mode:"tags",placeholder:"\u8BF7\u9009\u914D\u65B9\u5206\u7C7B",options:t.bomTypeData,dropdownRender:function(W){return(0,e.jsxs)(e.Fragment,{children:[W,(0,e.jsx)(qe.Z,{style:{margin:"8px 0"}}),(0,e.jsxs)(ye.Z,{style:{padding:"0 8px 4px"},children:[(0,e.jsx)(p.Z,{placeholder:"\u8BF7\u8F93\u5165\u914D\u65B9\u5206\u7C7B",ref:St,value:dt,onChange:Xt,onKeyDown:function(ee){return ee.stopPropagation()}}),(0,e.jsx)(Ce.Z,{type:"text",icon:(0,e.jsx)(K.Z,{}),onClick:$t,children:"\u65B0\u589E"})]})]})}})}),(0,e.jsx)(Y.Z.Item,{name:"bomType",label:"\u914D\u65B9\u7C7B\u578B",initialValue:"1",rules:[{required:!0,message:"\u914D\u65B9\u7C7B\u578B"}],children:(0,e.jsx)(v.Z,{placeholder:"\u8BF7\u9009\u914D\u65B9\u7C7B\u578B",onChange:function(W){Ne.setFieldsValue({bomType:W})},children:(0,e.jsxs)(a,{children:[(0,e.jsx)(v.Z.Option,{value:"1",children:"\u4E3B\u6599\u914D\u65B9"}),(0,e.jsx)(v.Z.Option,{value:"0",children:"\u8F85\u6599\u914D\u65B9"})]})})})]}),(0,e.jsxs)("span",{children:[(0,e.jsx)("span",{style:{color:"red",marginRight:3},children:"*"}),"\u5546\u54C1\u5C5E\u6027"]}),t.goodsAttriburteData==null?"":t.goodsAttriburteData.map(function(H,W){return(0,e.jsx)("div",{style:{marginLeft:80},children:(0,e.jsxs)("div",{children:[(0,e.jsxs)("span",{style:{marginRight:10},children:[" ",(0,e.jsx)(tt.Z,{color:"blue",children:H.attributeName}),"\uFF1A"]}),(0,e.jsx)("span",{children:(0,e.jsx)(D.ZP.Group,{name:"radiogroup"+W,buttonStyle:"solid",size:"small",onChange:Me,children:H.goodsAttributeValueList.map(function(te,ee){return(0,e.jsx)(D.ZP.Button,{name:ee,value:te.goodsAttributeValuId,style:{marginRight:22,marginTop:16},children:te.attributeValue})})})})]})})}),(0,e.jsx)(Sn.Z,{headerTitle:(0,e.jsxs)("span",{children:[(0,e.jsx)("span",{style:{color:"red",marginRight:3},children:"*"}),"\u914D\u65B9\u8BE6\u60C5"]}),columns:kt,rowKey:"id",value:S,onChange:E,recordCreatorProps:{newRecordType:"dataSource",record:function(){return{id:Date.now()}}},editable:{type:"multiple",editableKeys:I,actionRender:function(W,te,ee){return[ee.delete,ee.Button]},onValuesChange:function(W,te){E(te)},onDelete:function(){var H=(0,C.Z)((0,h.Z)().mark(function te(ee,_e){return(0,h.Z)().wrap(function(re){for(;;)switch(re.prev=re.next){case 0:console.log(ee),console.log(_e);case 2:case"end":return re.stop()}},te)}));function W(te,ee){return H.apply(this,arguments)}return W}(),onChange:q}})]})},jn=xn,yo=n(98858),on=n(4914),En=n(54977),Ua=n(73171),de=n(28991),po=n(18106),rn=n(25499),be=n(96156),ln=n(90484),sn=n(28481),bo=n(84305),_a=n(88182),Ya=n(81253),Zo=n(6999),Tn=n(75302),Bn=n(8812),An=n(53621),Pn=n(97435),In=n(50344),wn=n(80334),Co=n(58856),Dn=["tab","children"],Rn=["key","tab","tabKey","disabled","destroyInactiveTabPane","children","className","style","cardProps"];function Fn(o){return o.filter(function(t){return t})}function Nn(o,t,l){if(o)return o.map(function(x){return(0,de.Z)((0,de.Z)({},x),{},{children:(0,e.jsx)(ha,(0,de.Z)((0,de.Z)({},l==null?void 0:l.cardProps),{},{children:x.children}))})});(0,wn.ET)(!l,"Tabs.TabPane is deprecated. Please use `items` directly.");var a=(0,In.Z)(t).map(function(x){if(i.isValidElement(x)){var m=x.key,M=x.props,P=M||{},L=P.tab,B=P.children,R=(0,Ya.Z)(P,Dn),X=(0,de.Z)((0,de.Z)({key:String(m)},R),{},{children:(0,e.jsx)(ha,(0,de.Z)((0,de.Z)({},l==null?void 0:l.cardProps),{},{children:B})),label:L});return X}return null});return Fn(a)}var Gn=function(t){var l=t.key,a=t.tab,x=t.tabKey,m=t.disabled,M=t.destroyInactiveTabPane,P=t.children,L=t.className,B=t.style,R=t.cardProps,X=(0,Ya.Z)(t,Rn),Oe=(0,i.useContext)(_a.ZP.ConfigContext),ve=Oe.getPrefixCls,Te=ve("pro-card-tabpane"),N=me()(Te,L);return(0,e.jsx)(rn.Z.TabPane,(0,de.Z)((0,de.Z)({tabKey:x,tab:a,className:N,style:B,disabled:m,destroyInactiveTabPane:M},X),{},{children:(0,e.jsx)(ha,(0,de.Z)((0,de.Z)({},R),{},{children:P}))}),l)},$n=Gn,kn=n(21770),So=n(6599),On=function(t){var l=t.actions,a=t.prefixCls;return Array.isArray(l)&&(l==null?void 0:l.length)?(0,e.jsx)("ul",{className:"".concat(a,"-actions"),children:l.map(function(x,m){return(0,e.jsx)("li",{style:{width:"".concat(100/l.length,"%")},children:(0,e.jsx)("span",{children:x})},"action-".concat(m))})}):l?(0,e.jsx)("ul",{className:"".concat(a,"-actions"),children:l}):null},Vn=On,xo=n(89032),ut=n(15746),jo=n(13062),fa=n(71230),Eo=n(61070),Mn=function(t){var l=t.style,a=t.prefix;return(0,e.jsxs)("div",{className:"".concat(a,"-loading-content"),style:l,children:[(0,e.jsx)(fa.Z,{gutter:8,children:(0,e.jsx)(ut.Z,{span:22,children:(0,e.jsx)("div",{className:"".concat(a,"-loading-block")})})}),(0,e.jsxs)(fa.Z,{gutter:8,children:[(0,e.jsx)(ut.Z,{span:8,children:(0,e.jsx)("div",{className:"".concat(a,"-loading-block")})}),(0,e.jsx)(ut.Z,{span:15,children:(0,e.jsx)("div",{className:"".concat(a,"-loading-block")})})]}),(0,e.jsxs)(fa.Z,{gutter:8,children:[(0,e.jsx)(ut.Z,{span:6,children:(0,e.jsx)("div",{className:"".concat(a,"-loading-block")})}),(0,e.jsx)(ut.Z,{span:18,children:(0,e.jsx)("div",{className:"".concat(a,"-loading-block")})})]}),(0,e.jsxs)(fa.Z,{gutter:8,children:[(0,e.jsx)(ut.Z,{span:13,children:(0,e.jsx)("div",{className:"".concat(a,"-loading-block")})}),(0,e.jsx)(ut.Z,{span:9,children:(0,e.jsx)("div",{className:"".concat(a,"-loading-block")})})]}),(0,e.jsxs)(fa.Z,{gutter:8,children:[(0,e.jsx)(ut.Z,{span:4,children:(0,e.jsx)("div",{className:"".concat(a,"-loading-block")})}),(0,e.jsx)(ut.Z,{span:3,children:(0,e.jsx)("div",{className:"".concat(a,"-loading-block")})}),(0,e.jsx)(ut.Z,{span:16,children:(0,e.jsx)("div",{className:"".concat(a,"-loading-block")})})]})]})},Ln=Mn,To=n(43237),Wn=["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"],Kn=Tn.ZP.useBreakpoint,Un=i.forwardRef(function(o,t){var l,a,x,m=o.className,M=o.style,P=o.bodyStyle,L=P===void 0?{}:P,B=o.headStyle,R=B===void 0?{}:B,X=o.title,Oe=o.subTitle,ve=o.extra,Te=o.tip,N=o.wrap,Se=N===void 0?!1:N,ne=o.layout,S=o.loading,E=o.gutter,oe=E===void 0?0:E,j=o.tooltip,I=o.split,q=o.headerBordered,Fe=q===void 0?!1:q,Ue=o.bordered,Nt=Ue===void 0?!1:Ue,Ne=o.children,Ve=o.size,Gt=o.actions,dt=o.ghost,Ct=dt===void 0?!1:dt,St=o.hoverable,Xt=St===void 0?!1:St,$t=o.direction,kt=o.collapsed,xt=o.collapsible,Me=xt===void 0?!1:xt,H=o.collapsibleIconRender,W=o.defaultCollapsed,te=W===void 0?!1:W,ee=o.onCollapse,_e=o.checked,Be=o.onChecked,re=o.tabs,Ye=o.type,nt=(0,Ya.Z)(o,Wn),jt=(0,i.useContext)(_a.ZP.ConfigContext),Et=jt.getPrefixCls,Tt=Kn(),qt=(0,kn.Z)(te,{value:kt,onChange:ee}),ot=(0,sn.Z)(qt,2),ze=ot[0],Ut=ot[1],Ot=["xxl","xl","lg","md","sm","xs"],_t=Nn(re==null?void 0:re.items,Ne,re),ea=function(ge){var ce=[0,0],Ae=Array.isArray(ge)?ge:[ge,0];return Ae.forEach(function(Ge,He){if((0,ln.Z)(Ge)==="object")for(var Qe=0;Qe<Ot.length;Qe+=1){var vt=Ot[Qe];if(Tt[vt]&&Ge[vt]!==void 0){ce[He]=Ge[vt];break}}else ce[He]=Ge||0}),ce},Vt=function(ge,ce){return ge?ce:{}},va=function(ge){var ce=ge;if((0,ln.Z)(ge)==="object")for(var Ae=0;Ae<Ot.length;Ae+=1){var Ge=Ot[Ae];if(Tt[Ge]&&ge[Ge]!==void 0){ce=ge[Ge];break}}var He=Vt(typeof ce=="string"&&/\d%|\dpx/i.test(ce),{width:ce,flexShrink:0});return{span:ce,colSpanStyle:He}},G=Et("pro-card"),ct=ea(oe),ft=(0,sn.Z)(ct,2),ht=ft[0],Je=ft[1],rt=!1,Bt=i.Children.toArray(Ne),ga=Bt.map(function(Ze,ge){var ce;if(Ze==null||(ce=Ze.type)===null||ce===void 0?void 0:ce.isProCard){var Ae;rt=!0;var Ge=Ze.props.colSpan,He=va(Ge),Qe=He.span,vt=He.colSpanStyle,ya=me()(["".concat(G,"-col")],(Ae={},(0,be.Z)(Ae,"".concat(G,"-split-vertical"),I==="vertical"&&ge!==Bt.length-1),(0,be.Z)(Ae,"".concat(G,"-split-horizontal"),I==="horizontal"&&ge!==Bt.length-1),(0,be.Z)(Ae,"".concat(G,"-col-").concat(Qe),typeof Qe=="number"&&Qe>=0&&Qe<=24),Ae));return(0,e.jsx)("div",{style:(0,de.Z)((0,de.Z)((0,de.Z)({},vt),Vt(ht>0,{paddingRight:ht/2,paddingLeft:ht/2})),Vt(Je>0,{paddingTop:Je/2,paddingBottom:Je/2})),className:ya,children:i.cloneElement(Ze)},"pro-card-col-".concat((Ze==null?void 0:Ze.key)||ge))}return Ze}),Yt=me()("".concat(G),m,(l={},(0,be.Z)(l,"".concat(G,"-border"),Nt),(0,be.Z)(l,"".concat(G,"-contain-card"),rt),(0,be.Z)(l,"".concat(G,"-loading"),S),(0,be.Z)(l,"".concat(G,"-split"),I==="vertical"||I==="horizontal"),(0,be.Z)(l,"".concat(G,"-ghost"),Ct),(0,be.Z)(l,"".concat(G,"-hoverable"),Xt),(0,be.Z)(l,"".concat(G,"-size-").concat(Ve),Ve),(0,be.Z)(l,"".concat(G,"-type-").concat(Ye),Ye),(0,be.Z)(l,"".concat(G,"-collapse"),ze),(0,be.Z)(l,"".concat(G,"-checked"),_e),l)),ta=me()("".concat(G,"-body"),(a={},(0,be.Z)(a,"".concat(G,"-body-center"),ne==="center"),(0,be.Z)(a,"".concat(G,"-body-direction-column"),I==="horizontal"||$t==="column"),(0,be.Z)(a,"".concat(G,"-body-wrap"),Se&&rt),a)),aa=(0,de.Z)((0,de.Z)((0,de.Z)({},Vt(ht>0,{marginRight:-ht/2,marginLeft:-ht/2})),Vt(Je>0,{marginTop:-Je/2,marginBottom:-Je/2})),L),na=i.isValidElement(S)?S:(0,e.jsx)(Ln,{prefix:G,style:L.padding===0||L.padding==="0px"?{padding:24}:void 0}),mt=Me&&kt===void 0&&(H?H({collapsed:ze}):(0,e.jsx)(Bn.Z,{rotate:ze?void 0:90,className:"".concat(G,"-collapsible-icon")}));return(0,e.jsxs)("div",(0,de.Z)((0,de.Z)({className:Yt,style:M,ref:t,onClick:function(ge){var ce;Be==null||Be(ge),nt==null||(ce=nt.onClick)===null||ce===void 0||ce.call(nt,ge)}},(0,Pn.Z)(nt,["prefixCls","colSpan"])),{},{children:[(X||ve||mt)&&(0,e.jsxs)("div",{className:me()("".concat(G,"-header"),(x={},(0,be.Z)(x,"".concat(G,"-header-border"),Fe||Ye==="inner"),(0,be.Z)(x,"".concat(G,"-header-collapsible"),mt),x)),style:R,onClick:function(){mt&&Ut(!ze)},children:[(0,e.jsxs)("div",{className:"".concat(G,"-title"),children:[mt,(0,e.jsx)(An.Z,{label:X,tooltip:j||Te,subTitle:Oe})]}),ve&&(0,e.jsx)("div",{className:"".concat(G,"-extra"),children:ve})]}),re?(0,e.jsx)("div",{className:"".concat(G,"-tabs"),children:(0,e.jsx)(rn.Z,(0,de.Z)((0,de.Z)({onChange:re.onChange},re),{},{items:_t,children:S?na:Ne}))}):(0,e.jsx)("div",{className:ta,style:aa,children:S?na:ga}),(0,e.jsx)(Vn,{actions:Gt,prefixCls:G})]}))}),ha=Un,Bo=n(31666),_n=function(t){var l=(0,i.useContext)(_a.ZP.ConfigContext),a=l.getPrefixCls,x=a("pro-card-divider"),m=t.className,M=t.style,P=M===void 0?{}:M,L=t.type,B=me()(x,m,(0,be.Z)({},"".concat(x,"-").concat(L),L));return(0,e.jsx)("div",{className:B,style:P})},Yn=_n,zn=function(t){return(0,e.jsx)(ha,(0,de.Z)({bodyStyle:{padding:0}},t))},ma=ha;ma.isProCard=!0,ma.Divider=Yn,ma.TabPane=$n,ma.Group=zn;var Qt=ma,Jn=n(86788),Zt=n.n(Jn),Hn=p.Z.TextArea,Qn=function(t){var l=function(M,P,L){console.log("id",P),console.log("props.optiondata",t.optiondata),console.log("props.fromdata",t.fromdata),t.fromdata.forEach(function(B){L?B.id==L&&B.optiondata.forEach(function(R){R.technologyactionId==P&&(console.log("e.target.value",M.target.value),R.actionValue=M.target.value)}):(console.log("\u8FDB\u6765\u4E86"),console.log(t.index),B.optiondata.forEach(function(R){R.technologyactionId==P&&B.index==t.index&&(console.log("e.target.value",M.target.value),R.actionValue=M.target.value)}))}),console.log(t.fromdata),t.onSaveClick(t.fromdata)},a=function(M,P,L){t.fromdata.forEach(function(B){L?B.id==L&&B.optiondata.forEach(function(R){R.technologyactionId==P&&(console.log("e.target.value",M),R.actionValue=M)}):B.optiondata.forEach(function(R,X){R.technologyactionId==P&&B.index==t.index&&(console.log("e.target.value",M),R.actionValue=M)})}),console.log(t.fromdata),t.onSaveClick(t.fromdata)},x=function(M,P,L){console.log(M),console.log(P),t.optiondata.forEach(function(B){B.technologyactionId==P&&(B.actionValue=M.label)}),t.onSaveClick(t.fromdata)};return(0,e.jsx)("div",{children:t.propsdata.length>0?t.propsdata.map(function(m,M){var P=t.optiondata.find(function(R){return R.id==m.technologyactionId&&R.actionName==m.actionName}).actionValue;if(m.actionType=="text")return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("div",{className:Zt().formlable,style:{display:"block",float:"left",backgroundColor:"#dcf4ff",marginBottom:5},children:m.actionName}),(0,e.jsx)("div",{style:{display:"block",float:"left",marginBottom:5},children:(0,e.jsx)(p.Z,{defaultValue:P,style:{width:240},onChange:function(X){l(X,m.id,m.goddteid)}},m.id)})]});if(m.actionType=="digit")return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("div",{className:Zt().formlable,style:{display:"block",float:"left",backgroundColor:"#dcf4ff",marginBottom:5},children:m.actionName}),(0,e.jsx)("div",{style:{display:"block",float:"left",marginBottom:5},children:(0,e.jsx)(ie.Z,{defaultValue:P,style:{width:240},onChange:function(X){a(X,m.id,m.goddteid)}},m.id)})]});if(m.actionType=="textarea")return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("div",{className:Zt().formlable,style:{display:"block",float:"left",backgroundColor:"#dcf4ff",marginBottom:5},children:m.actionName}),(0,e.jsx)("div",{style:{display:"block",float:"left",marginBottom:5},children:(0,e.jsx)(Hn,{defaultValue:P,style:{width:240},onChange:function(X){l(X,m.id,m.goddteid)}},m.id)})]});if(m.actionType=="switch")return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("div",{className:Zt().formlable,style:{display:"block",float:"left",backgroundColor:"#dcf4ff",marginBottom:5},children:m.actionName}),(0,e.jsx)("div",{style:{display:"block",float:"left",marginBottom:5},children:(0,e.jsx)($e.Z,{defaultValue:P,onChange:function(X){l(X,m.id,m.goddteid)}},m.id)})]});if(m.actionType=="select"){var L=[];m.actionValue&&m.actionValue.length>0&&(L=JSON.parse(m.actionValue));var B=L.map(function(R,X){return{value:X,label:R.actionValueName}});return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("div",{className:Zt().formlable,style:{display:"block",float:"left",backgroundColor:"#dcf4ff",marginBottom:5},children:m.actionName}),(0,e.jsx)("div",{style:{display:"block",float:"left",marginBottom:5},children:(0,e.jsx)(v.Z,{defaultValue:P,labelInValue:!0,options:B,style:{width:240},onChange:function(X){x(X,m.id,m.goddteid)}},m.id)})]})}}):""})},Xn=Qn,Ao=p.Z.TextArea,qn=function(t){var l=(0,i.useState)(!1),a=(0,y.Z)(l,2),x=a[0],m=a[1],M=(0,i.useState)([]),P=(0,y.Z)(M,2),L=P[0],B=P[1],R=(0,i.useState)([]),X=(0,y.Z)(R,2),Oe=X[0],ve=X[1],Te=(0,i.useRef)(),N=[{title:"\u4E3B\u952E",dataIndex:"id",tip:"\u89C4\u5219\u540D\u79F0\u662F\u552F\u4E00\u7684 key",hideInSearch:!0,hideInTable:!0,render:function(E,oe){return(0,e.jsx)("a",{onClick:function(){},children:E})}},{title:"\u540D\u79F0",dataIndex:"name",valueType:"textarea",ellipsis:!0,search:!1}];(0,i.useEffect)(function(){if(console.log("\u6DB2\u6001\u6599",t.optiondata),t.fromdata[0].optiondata.length>0){var S=[];t.fromdata[0].optiondata.forEach(function(E){S.push({id:E.technologyactionId,name:E.actionName})}),ve(S.map(function(E){return E.id})),B(S)}B([]),ve([])},[t.modalVisible]);var Se=function(E,oe){console.log("id",oe),console.log("props.optiondata",t.optiondata),console.log("props.fromdata",t.fromdata),t.fromdata.forEach(function(j){j.optiondata.forEach(function(I){I.technologyactionId==oe&&j.index==t.index&&(console.log("e.target.value",E.target.value),I.actionValue=E.target.value)})}),console.log(t.fromdata),t.onSaveClick(t.fromdata)},ne=function(){m(!0)};return(0,e.jsxs)("div",{children:[t.optiondata.length>0?t.optiondata.map(function(S,E){return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("div",{className:Zt().formlable,style:{display:"block",float:"left"},children:S.actionName}),(0,e.jsx)("div",{style:{display:"block",float:"left"},children:(0,e.jsx)(p.Z,{defaultValue:S.actionValue,style:{width:240},onChange:function(j){Se(j,S.technologyactionId)}},S.technologyactionId)})]})}):"",(0,e.jsx)(Ce.Z,{type:"dashed",style:{width:100,marginLeft:140,marginTop:10},block:!0,onClick:ne,children:"\u6DFB\u52A0"}),(0,e.jsx)(ke.Z,{title:"\u7269\u6599\u5217\u8868",width:640,visible:x,bodyStyle:{padding:"32px 40px 1px 48px"},focusTriggerAfterClose:!1,onCancel:function(){m(!1),B([])},onOk:function(){m(!1)},maskClosable:!1,children:(0,e.jsx)(Ie.ZP,{headerTitle:"\u7269\u6599\u5217\u8868",rowKey:"id",actionRef:Te,search:{labelWidth:120},columns:N,request:function(E){var oe="",j=[],I=t.batchingdata.filter(function(q){return q.typeName==t.typeName});return j.length>0&&(B(j),ve(j.map(function(q){return q.id}))),{data:I,success:!0,total:I.length}},rowSelection:{selectedRowKeys:Oe,onSelect:function(E,oe){var j=(0,k.Z)(Oe),I=[],q=j.findIndex(function(Fe){return Fe===E.id});oe?(q<0&&j.push(E.id),I.push({id:E.id,name:E.name})):q>-1&&j.splice(q,1),ve(j)},onSelectAll:function(E,oe,j){var I=(0,k.Z)(Oe);E?oe.forEach(function(q){if(!!q){var Fe=I.findIndex(function(Ue){return Ue===q.id});Fe<0&&I.push(q.id)}}):j.forEach(function(q){var Fe=I.findIndex(function(Ue){return Ue===q.id});Fe>-1&&I.splice(Fe,1)}),ve(I)},onChange:function(E,oe){oe.forEach(function(j){t.optiondata.findIndex(function(I){return I.technologyactionId==j.id})==-1&&t.optiondata.push({actionName:j.name,actionValue:"",technologyactionId:j.id})}),B(oe)}}})})]})},eo=qn,to=function(t){var l=(0,i.useState)([]),a=(0,y.Z)(l,2),x=a[0],m=a[1],M=(0,i.useState)(1),P=(0,y.Z)(M,2),L=P[0],B=P[1];(0,i.useEffect)(function(){console.log("\u589E\u52A0\u7F16\u8F91\u72B6\u6001\u503C",t.UpdataStatus),console.log("props.fromdata",t.fromdata),t.fromdata.length==0?m([]):t.UpdataStatus=="update"&&(t.fromdata.forEach(function(N){N.index=N.sort}),m(t.fromdata))},[t.fromdata]);var R=function(Se,ne){if(t.devideId=="0")T.default.error("\u8BF7\u9009\u62E9\u8BBE\u5907\u540E\u5728\u65B0\u589E");else{var S=L;console.log("fromdata",x),B(L+1);var E=(0,k.Z)(x),oe=x.length;if(x.length==0)S=1;else{var j=x.reduce(function(I,q){return I.sort>q.sort?I:q});console.log("\u6700\u5927\u5E8F\u53F7\uFF1A",j.sort),S=j.sort+1}E.push({index:oe+1,id:"",stepName:"",chnologyId:"",actionJson:"",sort:S,goodsId:"",goodsAttributeId:"",optiondata:[],propsdata:[],isBatch:!0,typeName:"",disabled:!1}),m(E),t.onUpdataStatus("add")}},X=function(Se){console.log(Se),console.log(x);var ne=x.filter(function(S){return S.sort!=Se});ne.forEach(function(S,E){S.sort=E+1}),m(ne),console.log(ne),ne.length==0?B(1):B(L-1),t.onUpdataStatus("view"),t.onSaveClick(ne)},Oe=function(Se,ne,S){console.log(x),console.log(S);var E=t.technologyattralldata.filter(function(j){return j.goodstechnologyId==Se}),oe=x.map(function(j){if(j.index==S){E.length>0?j.isBatch=!0:j.isBatch=!1,j.typeName=ne.label,j.stepName=ne.label,j.chnologyId=ne.value;var I=[];E.forEach(function(q,Fe){I.push({actionName:q.actionName,actionValue:"",technologyactionId:q.id,index:Fe})}),j.propsdata=E,j.optiondata=I}return j});m(oe),console.log("from",oe)},ve=function(Se){t.onSaveClick(Se)},Te=function(){t.onUpdataStatus("view"),m([]),B(1),t.onSaveClick([])};return(0,e.jsxs)("div",{children:[x.length>0?x.map(function(N,Se){return(0,e.jsxs)(Qt,{boxShadow:!0,title:"\u5DE5\u5E8F\u53F7"+N.sort,bordered:!0,bodyStyle:{padding:15,display:"flex"},headStyle:{padding:"0px 24px"},style:{marginBlockEnd:8},extra:(0,e.jsx)(Ua.Z,{onClick:function(){X(N.sort)}}),children:[(0,e.jsx)("div",{style:{float:"left",width:"20%"},children:(0,e.jsx)(v.Z,{name:"chnologyId",style:{width:"108px"},value:N.chnologyId,disabled:N.disabled,options:t.goodstechnologydata,onChange:function(){var ne=(0,C.Z)((0,h.Z)().mark(function S(E,oe){return(0,h.Z)().wrap(function(I){for(;;)switch(I.prev=I.next){case 0:Oe(E,oe,N.index);case 1:case"end":return I.stop()}},S)}));return function(S,E){return ne.apply(this,arguments)}}()},N.sort)}),(0,e.jsx)("div",{style:{float:"left",width:"360px"},children:N.isBatch?(0,e.jsx)(Xn,{propsdata:N.propsdata,fromdata:x,onSaveClick:ve,optiondata:N.optiondata,index:N.index}):(0,e.jsx)(eo,{batchingdata:t.batchingdata,typeName:N.typeName,modalVisible:!0,optiondata:N.optiondata,onSaveClick:ve,index:N.index,fromdata:x})})]})}):"",(0,e.jsx)(Ce.Z,{type:"dashed",block:!0,onClick:R,ghost:!0,style:{background:"#FA541C"},children:"\u6DFB\u52A0\u5DE5\u827A"}),(0,e.jsx)(Ce.Z,{block:!0,onClick:Te,children:"\u91CD\u7F6E"})]})},ao=to,no=function(t){var l=(0,i.useState)(""),a=(0,y.Z)(l,2),x=a[0],m=a[1],M=(0,i.useState)([]),P=(0,y.Z)(M,2),L=P[0],B=P[1],R=(0,i.useState)([]),X=(0,y.Z)(R,2),Oe=X[0],ve=X[1],Te=(0,i.useState)([]),N=(0,y.Z)(Te,2),Se=N[0],ne=N[1],S=(0,i.useState)([]),E=(0,y.Z)(S,2),oe=E[0],j=E[1],I=(0,i.useState)([]),q=(0,y.Z)(I,2),Fe=q[0],Ue=q[1],Nt=(0,i.useState)({}),Ne=(0,y.Z)(Nt,2),Ve=Ne[0],Gt=Ne[1],dt=(0,i.useState)([]),Ct=(0,y.Z)(dt,2),St=Ct[0],Xt=Ct[1],$t=(0,i.useState)([]),kt=(0,y.Z)($t,2),xt=kt[0],Me=kt[1],H=(0,i.useState)(1),W=(0,y.Z)(H,2),te=W[0],ee=W[1],_e=(0,i.useState)([]),Be=(0,y.Z)(_e,2),re=Be[0],Ye=Be[1],nt=(0,i.useState)([]),jt=(0,y.Z)(nt,2),Et=jt[0],Tt=jt[1],qt=(0,i.useState)([]),ot=(0,y.Z)(qt,2),ze=ot[0],Ut=ot[1],Ot=(0,i.useState)("block"),_t=(0,y.Z)(Ot,2),ea=_t[0],Vt=_t[1],va=(0,i.useState)([]),G=(0,y.Z)(va,2),ct=G[0],ft=G[1],ht=(0,i.useState)("view"),Je=(0,y.Z)(ht,2),rt=Je[0],Bt=Je[1],ga=(0,i.useState)(!1),Yt=(0,y.Z)(ga,2),ta=Yt[0],aa=Yt[1],na=(0,i.useState)("0"),mt=(0,y.Z)(na,2),Ze=mt[0],ge=mt[1],ce=(0,i.useState)(""),Ae=(0,y.Z)(ce,2),Ge=Ae[0],He=Ae[1],Qe=(0,i.useState)(""),vt=(0,y.Z)(Qe,2),ya=vt[0],za=vt[1],Ja=(0,i.useState)("add"),Sa=(0,y.Z)(Ja,2),un=Sa[0],xa=Sa[1];(0,i.useEffect)(function(){ja()},[]);var ja=function(){mn(t.goodsid).then(function(g){if(g.succeeded){g.data.goodsAttributeList.length==0?Vt("none"):g.data.goodsAttributeList.forEach(function(u){u.defalutvalue=[],u.goodsAttributeValueList.forEach(function(s){u.attributeName=="\u9ED8\u8BA4\u5C5E\u6027"?(s.check=!0,m(s.attributeValue),u.defalutvalue.push(s.goodsAttributeValuId)):s.check=!1})}),console.log("\u5546\u54C1\u5C5E\u6027",g.data),Gt(g.data);var Z=[{key:"1",label:"\u5546\u54C1\u540D\u79F0",children:g.data.name},{key:"2",label:"\u5546\u54C1\u4EF7\u683C",children:g.data.price},{key:"3",label:"\u5546\u54C1\u7C7B\u578B",children:g.data.goodsTypeName},{key:"4",label:"\u5546\u54C1\u5355\u4F4D",children:g.data.goodsUintName}];ve(Z)}else T.default.error("\u67E5\u8BE2\u5546\u54C1\u4FE1\u606F\u5931\u8D25")}),vn().then(function(g){Ue(g.data)}),nn(t.goodsid).then(function(g){if(g.data.length>0){Me(g.data);var Z=g.data.reduce(function(u,s){return u.sort>s.sort?u:s});console.log("\u6700\u5927\u5E8F\u53F7\uFF1A",Z.sort),ee(Z.sort)}}),Cn().then(function(g){Ye(g.data)}),Zn().then(function(g){if(Tt(g.data),g.data.length>0){var Z=g.data.map(function(u){return{value:u.id,label:u.deviceName}});Ut(Z)}})},pa=function(g){console.log(L);for(var Z=g.target,u=Z.name,s=Z.value,c="",b=(0,k.Z)(L),Q=0;Q<Ve.goodsAttributeList.length;Q++)u==="radiogroup"+Q&&(b[Q]=s);Ve.goodsAttributeList.forEach(function(A){for(var U=function(Ba){var ra;At=(ra=A.goodsAttributeValueList.find(function(Za){return Za.goodsAttributeValuId==b[Ba]}))===null||ra===void 0?void 0:ra.attributeValue,At&&(c=c+At,Ba<b.length-1&&(c=c+"-"))},Pe=0;Pe<b.length;Pe++){var At;U(Pe)}A.goodsAttributeValueList.forEach(function(zt){s==zt.goodsAttributeValuId&&(zt.check=!0)})}),m(c),B(b)},Ha=function(g,Z,u){if(xa("update"),rt!="add"){He(Z.deviceId),ba(Z.deviceId);var s=[];Z.data.forEach(function(c){var b={},Q=[],A=Fe.filter(function(U){return U.goodstechnologyId==c.chnologyId});b.stepName=c.stepName,b.id=c.id,b.chnologyId=c.chnologyId,b.sort=c.sort,b.actionJson=c.actionJson,b.optiondata=JSON.parse(c.actionJson),A.forEach(function(U){var Pe={id:U.id,actionName:U.actionName,actionType:U.actionType,actionValue:U.actionValue,goodstechnologyId:U.goodstechnologyId,isBatch:U.isBatch,sort:U.sort,goddteid:c.id};Q.push(Pe)}),b.propsdata=Q,b.isBatch=c.isBatch,b.typeName=c.stepName,s.push(b)}),console.log("attr",s),ft(s),Bt("update")}else T.default.error("\u8BF7\u4FDD\u5B58\u5F53\u524D\u6570\u636E\u540E\u5728\u7F16\u8F91")},Qa=function(g,Z,u){pn(Z.id).then(function(s){s.data?(T.default.success("\u5220\u9664\u6210\u529F"),console.log(ct),oa()):T.default.error("\u5220\u9664\u5931\u8D25")})},Ea=function(g,Z,u){bn({devideId:Z,goodsId:t.goodsid}).then(function(s){s.data?(T.default.success("\u5220\u9664\u6210\u529F"),Me([]),oa()):T.default.error("\u5220\u9664\u5931\u8D25")})},oa=function(){nn(t.goodsid).then(function(g){if(g.data.length>0){Me(g.data);var Z=g.data.reduce(function(s,c){return s.sort>c.sort?s:c});ee(Z.sort);var u={attributes:[]};j(u)}else j([]),Me([])})},ba=function(g){console.log("\u8FDB\u6765\u4E86",g),He(g),ge(g);var Z=[],u=Et.find(function(s){return s.id==g});u&&(u.goodsTechnologyInfo.length>0&&(Z=u.goodsTechnologyInfo.map(function(s){return{value:s.goodsTechnologyId,label:s.name}}),ne(Z)),ft([])),console.log("godata",Z),ne(Z)},Xa=function(g){Bt(g)},qa=function(g){console.log("222",g),ft(g)},en=function(){console.log("\u4FDD\u5B58\u7684\u6570\u636E",ct);var g=!0,Z=[];ct.forEach(function(u){var s={};s.deviceId=Ze,s.id=u.id,s.stepName=u.stepName,s.chnologyId=u.chnologyId,s.isBatch=u.isBatch,rt!="add"&&(s.sort=u.sort),u.optiondata.length==0?g=!1:s.actionJson=JSON.stringify(u.optiondata),u.optiondata.forEach(function(c){var b=u.propsdata.find(function(Q){return Q.id==c.technologyactionId});b?(b.actionType=="select"&&c.actionValue==""&&(g=!1),b.actionType=="digit"&&(c.actionValue===""||c.actionValue===null)&&(g=!1)):c.actionValue===""&&(g=!1)}),s.goodsId=t.goodsid,s.goodsAttributeId=L.join(","),u.chnologyId==""&&(g=!1),Z.push(s)}),console.log("\u8F6C\u5316\u540E\u8981\u4FDD\u5B58\u7684\u6570\u636E",Z),console.log("\u66F4\u65B0\u6DFB\u52A0\u72B6\u6001",rt),Z.length>0&&g?(rt=="add"?gn(Z).then(function(u){u.data?(T.default.success("\u4FDD\u5B58\u6210\u529F"),ft([]),oa()):T.default.error("\u4FDD\u5B58\u5931\u8D25")}):yn(Z).then(function(u){u.data?(T.default.success("\u4FDD\u5B58\u6210\u529F"),ft([]),oa()):T.default.error("\u4FDD\u5B58\u5931\u8D25")}),Bt("view"),aa(!1),xa("add")):T.default.error("\u6CA1\u6709\u8981\u4FDD\u5B58\u7684\u6570\u636E\u6216\u6570\u636E\u683C\u5F0F\u4E0D\u6B63\u786E")},Ta=function(g){console.log(g),T.default.error("\u53D6\u6D88\u5220\u9664")};return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)(le.Z,{bodyStyle:{padding:15},children:[(0,e.jsx)("div",{style:{fontSize:16,marginBottom:5,color:"#1890ff",fontWeight:600},children:"\u5546\u54C1\u4FE1\u606F"}),(0,e.jsx)("div",{style:{float:"left"},children:(0,e.jsx)("img",{style:{width:100,height:100},src:Ve.imgUrl})}),(0,e.jsx)(on.Z,{style:{float:"left",width:"71%",marginLeft:"10px"},labelStyle:{fontSize:16,fontWeight:600},children:Oe.map(function(ae,g){return(0,e.jsx)(on.Z.Item,{label:ae.label,children:ae.children},g)})})]}),(0,e.jsxs)(le.Z,{bodyStyle:{padding:15},style:{display:ea},children:[(0,e.jsx)("div",{style:{fontSize:16,marginBottom:5,color:"#1890ff",fontWeight:600},children:"\u5546\u54C1\u5C5E\u6027"}),Ve.goodsAttributeList==null?"":Ve.goodsAttributeList.map(function(ae,g){return(0,e.jsx)("div",{style:{marginLeft:10},children:(0,e.jsxs)("div",{children:[(0,e.jsxs)("span",{style:{marginRight:10},children:[" ",(0,e.jsx)(tt.Z,{color:"blue",style:{fontSize:14,fontWeight:600},children:ae.attributeName}),"\uFF1A"]}),(0,e.jsx)("span",{children:(0,e.jsx)(D.ZP.Group,{name:"radiogroup"+g,buttonStyle:"solid",onChange:pa,defaultValue:ae.defalutvalue,children:ae.goodsAttributeValueList.map(function(Z,u){return(0,e.jsx)(D.ZP.Button,{name:u,defaultChecked:Z.check,value:Z.goodsAttributeValuId,style:{marginRight:22,marginTop:10},children:Z.attributeValue},u)})})})]})})})]}),(0,e.jsx)(le.Z,{bodyStyle:{padding:15},style:{display:ea},children:(0,e.jsxs)("div",{style:{fontSize:16,marginBottom:5,color:"#1890ff",fontWeight:600},children:["\u9009\u62E9\u8BBE\u5907\uFF1A",(0,e.jsx)(v.Z,{showSearch:!0,style:{width:200,marginRight:10},value:Ge,placeholder:"\u8BF7\u9009\u62E9\u8BBE\u5907",optionFilterProp:"children",filterOption:function(g,Z){var u;return((u=Z==null?void 0:Z.label)!==null&&u!==void 0?u:"").includes(g)},filterSort:function(g,Z){var u,s;return((u=g==null?void 0:g.label)!==null&&u!==void 0?u:"").toLowerCase().localeCompare(((s=Z==null?void 0:Z.label)!==null&&s!==void 0?s:"").toLowerCase())},onChange:ba,options:ze})]})}),(0,e.jsxs)(le.Z,{bodyStyle:{padding:15},children:[(0,e.jsx)("div",{style:{fontSize:16,marginBottom:5,color:"#1890ff",fontWeight:600},children:"\u5DE5\u827A\u8BBE\u8BA1"}),(0,e.jsxs)(Qt,{split:"vertical",children:[(0,e.jsxs)(Qt,{title:"\u7F16\u8F91\u5DE5\u827A",type:"inner",colSpan:"33%",bodyStyle:{padding:5},headerBordered:!0,headStyle:{paddingLeft:"5%"},extra:[(0,e.jsx)(Ce.Z,{type:"primary",ghost:!0,onClick:function(){en()},children:"\u4FDD\u5B58\u5DE5\u827A"})],children:[(0,e.jsx)("div",{style:{textAlign:"center",marginBottom:10,color:"brown"},children:x}),(0,e.jsx)(ao,{devideId:Ze,disabled:ta,fromdata:ct,maxsort:te,UpdataStatus:rt,onUpdataStatus:Xa,onSaveClick:qa,goodstechnologydata:Se,technologyattralldata:Fe,batchingdata:re})]}),(0,e.jsx)(Qt,{title:"\u67E5\u770B\u5DE5\u827A",type:"inner",headStyle:{paddingLeft:"45%"},bodyStyle:{padding:5,width:"1072px","overflow-x":"scroll"},headerBordered:!0,children:(0,e.jsx)("div",{style:{width:"max-content"},children:xt==null?"":xt.map(function(ae,g){return(0,e.jsx)(Qt,{wrap:!0,gutter:16,boxShadow:!0,title:ae.deviceName+"\u3010"+x+"\u3011",bodyStyle:{padding:0,"overflow-x":"scrol"},headStyle:{padding:"0px 0px",backgroundColor:"burlywood",paddingLeft:"40%",height:45},extra:[(0,e.jsx)(En.Z,{style:{marginRight:10},onClick:function(u){Ha(u,ae)}}),(0,e.jsx)(Dt.Z,{title:"\u786E\u8BA4\u5220\u9664\u5417?",description:"\u786E\u8BA4\u5220\u9664\u5417",onConfirm:function(u){Ea(u,ae.deviceId)},onCancel:Ta,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",children:(0,e.jsx)(Ua.Z,{style:{marginRight:6}})})],style:{marginBlockEnd:8,width:453,float:"left",marginRight:"10px"},children:ae.data.map(function(Z){var u=JSON.parse(Z.actionJson);return(0,e.jsx)(Qt,{type:"inner",hoverable:!0,layout:"center",title:"\u5DE5\u5E8F\u53F7"+Z.sort,bordered:!0,bodyStyle:{padding:5},headStyle:{padding:"0px 5px",border:"none",backgroundColor:"#e8f0fd"},extra:[(0,e.jsx)(Dt.Z,{title:"\u786E\u8BA4\u5220\u9664\u5417?",description:"\u786E\u8BA4\u5220\u9664\u5417",onConfirm:function(c){Qa(c,Z,u)},onCancel:Ta,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",children:(0,e.jsx)(Ua.Z,{})})],style:{boxShadow:"5px 8px 24px 5px rgba(208, 216, 243, 0.6)"},children:(0,e.jsxs)("div",{style:{lineHeight:"200px",height:"100%",width:"100%"},children:[(0,e.jsx)("div",{className:Zt().formlable,style:{float:"left",width:"29%",backgroundColor:"#4eaaf5",color:"white"},children:Z.stepName}),(0,e.jsx)("div",{style:{float:"left",marginBottom:"5px",width:"67%"},children:u.map(function(s){return(0,e.jsxs)("div",{style:{float:"left",marginBottom:"5px"},children:[(0,e.jsx)("div",{className:Zt().formlable,style:{display:"block",float:"left",backgroundColor:"#dcf4ff"},children:s.actionName}),(0,e.jsxs)("div",{className:Zt().formlabletxt,style:{display:"block",float:"left"},children:[" ",s.actionValue]})]})})})]})})})})})})})]})]})]})},oo=no,ro=n(82539),lo=n(9669),io=n.n(lo),Po=d.Z.Step,Io=v.Z.Option,wo=v.Z.OptGroup,so=p.Z.TextArea,uo=function(t){var l,a,x,m,M=Y.Z.useForm(),P=(0,y.Z)(M,1),L=P[0],B=(0,i.useState)([]),R=(0,y.Z)(B,2),X=R[0],Oe=R[1],ve=(0,i.useState)([]),Te=(0,y.Z)(ve,2),N=Te[0],Se=Te[1],ne=(0,i.useState)([]),S=(0,y.Z)(ne,2),E=S[0],oe=S[1],j=(0,i.useState)([]),I=(0,y.Z)(j,2),q=I[0],Fe=I[1],Ue=(0,i.useState)(),Nt=(0,y.Z)(Ue,2),Ne=Nt[0],Ve=Nt[1],Gt=(0,i.useState)(!1),dt=(0,y.Z)(Gt,2),Ct=dt[0],St=dt[1],Xt=(0,i.useState)([]),$t=(0,y.Z)(Xt,2),kt=$t[0],xt=$t[1],Me=(0,i.useRef)(),H=(0,i.useState)("basis"),W=(0,y.Z)(H,2),te=W[0],ee=W[1],_e=(0,i.useState)(t.location.query.values?t.location.query.values.imgUrl:null),Be=(0,y.Z)(_e,2),re=Be[0],Ye=Be[1],nt=(0,i.useState)(0),jt=(0,y.Z)(nt,2),Et=jt[0],Tt=jt[1],qt=(0,i.useState)([]),ot=(0,y.Z)(qt,2),ze=ot[0],Ut=ot[1],Ot=(0,i.useState)([]),_t=(0,y.Z)(Ot,2),ea=_t[0],Vt=_t[1],va=(0,i.useState)([]),G=(0,y.Z)(va,2),ct=G[0],ft=G[1],ht=(0,i.useState)(),Je=(0,y.Z)(ht,2),rt=Je[0],Bt=Je[1],ga=(0,i.useState)(""),Yt=(0,y.Z)(ga,2),ta=Yt[0],aa=Yt[1],na=(0,i.useState)([]),mt=(0,y.Z)(na,2),Ze=mt[0],ge=mt[1],ce=(0,i.useRef)(null),Ae=(0,i.useState)([]),Ge=(0,y.Z)(Ae,2),He=Ge[0],Qe=Ge[1],vt=(0,i.useState)([]),ya=(0,y.Z)(vt,2),za=ya[0],Ja=ya[1],Sa=function(){var u=(0,C.Z)((0,h.Z)().mark(function s(c){var b;return(0,h.Z)().wrap(function(A){for(;;)switch(A.prev=A.next){case 0:return b=T.default.loading("\u6B63\u5728\u6267\u884C"),console.log(c),A.prev=2,t.location.query.isAdd&&(c.id=null),c.imgUrl=re||c.imgUrl,c.defaultMate?c.defaultMate=c.defaultMate.join():c.defaultMate="",A.next=8,(0,ro.Rq)(JSON.stringify(c)).then(function(U){U.succeeded?(T.default.success("\u64CD\u4F5C\u6210\u529F"),_.m8.push({pathname:"/database/goods/newgoods"})):T.default.error(U.errors)});case 8:return b(),A.abrupt("return",!0);case 12:return A.prev=12,A.t0=A.catch(2),b(),T.default.error("\u64CD\u4F5C\u5931\u8D25\u8BF7\u91CD\u8BD5\uFF01"),A.abrupt("return",!1);case 17:case"end":return A.stop()}},s,null,[[2,12]])}));return function(c){return u.apply(this,arguments)}}(),un={name:"file",showUploadList:!1,multiple:!1,accept:".png, .jpg, .jpeg, .gif",headers:{"Content-Type":"application/octet-stream"},customRequest:function(s){var c=s.action,b=s.file,Q=s.headers,A=s.onError,U=s.onProgress,Pe=s.onSuccess,At=s.withCredentials;console.log("\u4E0A\u4F20\u56FE\u7247",b);var zt=b.name.lastIndexOf("."),Ba=b.name.substr(zt+1),ra=null;return st({directory:"goods",fileExtension:Ba,method:"PUT"}).then(function(Za){c=Za.allUrl;var dn=new FileReader;dn.readAsArrayBuffer(b),dn.onload=function(fo){ra=fo.target.result,io().put(c,ra,{withCredentials:At,headers:Q,onUploadProgress:function(cn){var ho=cn.total,mo=cn.loaded;U({percent:Math.round(mo/ho*100).toFixed(2)},b)}}).then(function(Aa){console.log("onSuccess",Aa,b),(Aa.status==200||Aa.statusText=="OK")&&Ye(Za.seeUrl)}).catch(A)}}),{abort:function(){console.log("upload progress is aborted.")}}}},xa=(0,i.useState)({operationKey:t.location.query.tabStatus?t.location.query.tabStatus:"basis",tabActiveKey:t.location.query.tabStatus?t.location.query.tabStatus:"basis"}),ja=(0,y.Z)(xa,2),pa=ja[0],Ha=ja[1];(0,i.useEffect)(function(){ee(pa.tabActiveKey),Ea(),oa(),ba(),Xa()},[pa]);var Qa=function(s){if(Et===1){T.default.info("\u5957\u9910\u4E0D\u80FD\u8BBE\u7F6E\u914D\u65B9");return}Ha({operationKey:s,tabActiveKey:s})};function Ea(){O().then(function(u){var s=[];u.data.length>0&&u.data.forEach(function(c){s.push({text:c.name,value:c.id,label:c.name})}),console.log("list",s),Se(s)})}function oa(){wa().then(function(u){Bt(u.data)})}function ba(){Pa().then(function(u){var s=[];u.data.length>0&&u.data.forEach(function(c){s.push({text:c.name,value:c.id,label:c.name})}),ge(s)})}function Xa(){ua().then(function(u){ft(u.data)})}function qa(){ba()}var en=function(s){aa(s.target.value)},Ta=function(s){s.preventDefault(),aa("");var c={name:ta};z(c).then(function(b){b.succeeded?(T.default.success("\u6DFB\u52A0\u6210\u529F"),Ea()):T.default.error(b.errors)})},ae=[{key:"basis",tab:"\u5546\u54C1\u57FA\u7840\u4FE1\u606F"},{key:"goodsbom",tab:"\u5546\u54C1\u914D\u65B9"},{key:"goodstechnologymaken",tab:"\u5546\u54C1\u5DE5\u827A"}],g=[{title:"\u4E3B\u952E",dataIndex:"id",key:"id",hideInTable:!0,hideInSearch:!0,tip:"\u89C4\u5219\u540D\u79F0\u662F\u552F\u4E00\u7684 key"},{title:"\u914D\u65B9\u540D\u79F0",key:"name",dataIndex:"name",valueType:"textarea"},{title:"\u914D\u65B9\u7C7B\u578B",dataIndex:"isMain",hideInForm:!0,valueEnum:{false:{text:"\u8F85\u6599",status:"Processing"},true:{text:"\u4E3B\u6599",status:"Success"}}},{title:"\u64CD\u4F5C",dataIndex:"option",valueType:"option",render:function(s,c){return[(0,e.jsx)("a",{type:"primary",onClick:function(){},children:"\u66F4\u65B0"},"primary"),(0,e.jsx)("a",{type:"primary",onClick:function(){},children:"\u914D\u65B9\u8BE6\u60C5"},"primary"),(0,e.jsx)(Dt.Z,{type:"primary",title:"\u786E\u8BA4\u5220\u9664\u5417\uFF1F",okText:"\u662F",cancelText:"\u5426",onConfirm:(0,C.Z)((0,h.Z)().mark(function b(){var Q;return(0,h.Z)().wrap(function(U){for(;;)switch(U.prev=U.next){case 0:return Q=T.default.loading("\u6B63\u5728\u5220\u9664"),U.prev=1,Ia(c.id),Q(),T.default.success("\u5220\u9664\u6210\u529F\uFF0C\u5373\u5C06\u5237\u65B0"),Me.current.reload(),U.abrupt("return",!0);case 9:return U.prev=9,U.t0=U.catch(1),Q(),T.default.error("\u5220\u9664\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5"),Me.current.reload(),U.abrupt("return",!1);case 15:case"end":return U.stop()}},b,null,[[1,9]])})),onCancel:function(){},children:(0,e.jsx)("a",{href:"#",children:"\u5220\u9664"})},"primary")]}}],Z={basis:(0,e.jsx)(le.Z,{title:"\u5546\u54C1\u57FA\u7840\u4FE1\u606F",style:{marginBottom:24},bordered:!1,children:(0,e.jsxs)(Y.Z,{form:L,labelCol:{span:4},wrapperCol:{span:6},layout:"horizontal",preserve:!1,initialValues:t.location.query.values,onFinish:Sa,children:[(0,e.jsx)(Y.Z.Item,{name:"id",hidden:!0,children:(0,e.jsx)(p.Z,{})}),(0,e.jsx)(Y.Z.Item,{name:"name",label:"\u5546\u54C1\u540D\u79F0",rules:[{required:!0}],children:(0,e.jsx)(p.Z,{})}),(0,e.jsx)(Y.Z.Item,{name:"goodsUintId",label:"\u5546\u54C1\u5355\u4F4D",rules:[{required:!0}],children:(0,e.jsx)(v.Z,{style:{width:400},placeholder:"\u8BF7\u9009\u62E9\u5355\u4F4D",options:N,dropdownRender:function(s){return(0,e.jsxs)(e.Fragment,{children:[s,(0,e.jsx)(qe.Z,{style:{margin:"8px 0"}}),(0,e.jsxs)(ye.Z,{style:{padding:"0 8px 4px"},children:[(0,e.jsx)(p.Z,{placeholder:"\u8BF7\u8F93\u5165\u5355\u4F4D",ref:ce,value:ta,onChange:en,onKeyDown:function(b){return b.stopPropagation()}}),(0,e.jsx)(Ce.Z,{type:"text",icon:(0,e.jsx)(K.Z,{}),onClick:Ta,children:"\u65B0\u589E"})]})]})}})}),(0,e.jsx)(Y.Z.Item,{name:"price",label:"\u5546\u54C1\u4EF7\u683C",rules:[{required:!0}],children:(0,e.jsx)(ie.Z,{placeholder:"\u4EF7\u683C",min:0})}),(0,e.jsx)(Y.Z.Item,{name:"goodsTypeId",label:"\u5546\u54C1\u7C7B\u578B",rules:[{required:!0}],children:(0,e.jsx)(Ht.Z,{allowClear:!0,showSearch:!0,style:{width:"100%"},dropdownStyle:{maxHeight:400,overflow:"auto"},treeData:rt,placeholder:"\u8BF7\u9009\u62E9\u5546\u54C1\u7C7B\u578B",treeDefaultExpandAll:!0})}),(0,e.jsx)(Y.Z.Item,{name:"foreignKeyRe",label:"\u5173\u8054\u5916\u952E",rules:[{required:!1}],children:(0,e.jsx)(p.Z,{})}),(0,e.jsx)(Y.Z.Item,{name:"defaultMate",label:"\u9ED8\u8BA4\u539F\u6599",rules:[{required:!1}],children:(0,e.jsx)(v.Z,{mode:"multiple",allowClear:!0,children:ct==null?"":ct.map(function(u,s){return(0,e.jsx)(v.Z.Option,{index:s,value:u.id,children:u.name},u.id)})})}),(0,e.jsx)(Y.Z.Item,{name:"remark",label:"\u5907\u6CE8",children:(0,e.jsx)(p.Z,{})}),(0,e.jsxs)(Y.Z.Item,{name:"design",label:"\u89C4\u683C",children:["\xA0 \xA0 \xA0 \xA0 \xA0 ",(0,e.jsx)(so,{rows:4}),"\xA0 \xA0 \xA0 \xA0 \xA0 "]}),(0,e.jsx)(Y.Z.Item,{name:"imgUrl",hidden:!0,children:(0,e.jsx)(p.Z,{})}),(0,e.jsx)(Y.Z.Item,{name:"imgUrl1",label:"\u5546\u54C1\u56FE\u7247\u5730\u5740",children:(0,e.jsx)(F.Z,(0,Le.Z)((0,Le.Z)({},un),{},{children:re?(0,e.jsx)("img",{src:re,alt:"avatar",style:{width:"100%"}}):(0,e.jsx)(Ce.Z,{icon:(0,e.jsx)(xe.Z,{}),children:"\u4E0A\u4F20"})}))}),(0,e.jsx)(Y.Z.Item,{label:"\u662F\u5426\u79F0\u91CD",name:"isWeigh",valuePropName:"checked",initialValue:"false",children:(0,e.jsx)($e.Z,{checkedChildren:"\u662F",unCheckedChildren:"\u5426",defaultChecked:"false"})}),(0,e.jsx)(Y.Z.Item,{label:"\u662F\u5426\u591A\u5C5E\u6027",name:"isAttrubute",valuePropName:"checked",initialValue:"false",children:(0,e.jsx)($e.Z,{checkedChildren:"\u662F",unCheckedChildren:"\u5426",defaultChecked:"false"})}),(0,e.jsx)(Y.Z.Item,{children:(0,e.jsx)(Ce.Z,{type:"primary",htmlType:"submit",children:"\u4FDD\u5B58"})})]})}),goodsbom:(0,e.jsxs)(le.Z,{title:"\u5546\u54C1\u914D\u65B9",style:{marginBottom:24},bordered:!1,children:[(0,e.jsx)(Ie.ZP,{columns:g,actionRef:Me,rowKey:"id",search:!1,toolBarRender:function(){return[(0,e.jsxs)(Ce.Z,{type:"primary",onClick:function(){var c,b;((c=t.location.query.values)===null||c===void 0?void 0:c.id)==null||((b=t.location.query.values)===null||b===void 0?void 0:b.id)==null?T.default.info("\u8BF7\u5148\u6DFB\u52A0\u5546\u54C1\u57FA\u7840\u4FE1\u606F!"):(at().then(function(Q){if(za.length>0){var A=[];Q.data.map(function(U){var Pe={},At=za.find(function(zt){return zt==U.id});At||A.push(U)})}console.log("da",A),Qe(A)}),Ve(!0))},children:[(0,e.jsx)(K.Z,{})," \u9009\u62E9\u914D\u65B9"]},"primary"),(0,e.jsxs)(Ce.Z,{type:"primary",onClick:(0,C.Z)((0,h.Z)().mark(function s(){var c,b;return(0,h.Z)().wrap(function(A){for(;;)switch(A.prev=A.next){case 0:if(!(((c=t.location.query.values)===null||c===void 0?void 0:c.id)==null||((b=t.location.query.values)===null||b===void 0?void 0:b.id)==null)){A.next=4;break}T.default.info("\u8BF7\u5148\u6DFB\u52A0\u5546\u54C1\u57FA\u7840\u4FE1\u606F!"),A.next=7;break;case 4:return A.next=6,he(t.location.query.values.id).then(function(U){Ut(U.data)});case 6:St(!0);case 7:case"end":return A.stop()}},s)})),children:[(0,e.jsx)(K.Z,{})," \u65B0\u5EFA\u914D\u65B9"]},"primary")]},request:function(){var u=(0,C.Z)((0,h.Z)().mark(function s(c){var b,Q,A;return(0,h.Z)().wrap(function(Pe){for(;;)switch(Pe.prev=Pe.next){case 0:if(!(t.location.query.values.id==null||t.location.query.values.id==null)){Pe.next=3;break}Pe.next=10;break;case 3:return c.GoodsId=t.location.query.values.id,b=0,Pe.next=7,Re(c);case 7:return Q=Pe.sent,Q.data.data.length>0&&(A=Q.data.data.map(function(At){return At.bomId}),Ja(A)),Pe.abrupt("return",{data:Q.data.data,success:!0,total:b});case 10:case"end":return Pe.stop()}},s)}));return function(s){return u.apply(this,arguments)}}(),rowSelection:{onChange:function(s,c){return xt(c)}}}),(0,e.jsx)(De,{Bomdata:He,onFinish:function(){var u=(0,C.Z)((0,h.Z)().mark(function s(c){var b;return(0,h.Z)().wrap(function(A){for(;;)switch(A.prev=A.next){case 0:return console.log("value",c),c.GoodsId=t.location.query.values.id,b=!1,A.next=5,hn(c);case 5:b=A.sent,b&&Ve(!1),Me.current.reload();case 8:case"end":return A.stop()}},s)}));return function(s){return u.apply(this,arguments)}}(),onCancel:function(){Ve(!1)},createModalVisible:Ne}),(0,e.jsx)(jn,{handleCreateoodsBomModalVisible:Ct,bomTypeData:Ze,initTypeList:qa,onFinish:function(){var u=(0,C.Z)((0,h.Z)().mark(function s(c){return(0,h.Z)().wrap(function(Q){for(;;)switch(Q.prev=Q.next){case 0:return c.goodsId=t.location.query.values.id,console.log(c),Q.next=4,fn(c).then(function(A){console.log(A),A.data?(T.default.success("\u6DFB\u52A0\u6210\u529F"),St(!1)):T.default.error("\u6DFB\u52A0\u5931\u8D25"),Me.current.reload()});case 4:case"end":return Q.stop()}},s)}));return function(s){return u.apply(this,arguments)}}(),goodsid:(l=t.location.query.values)===null||l===void 0?void 0:l.id,goodsname:(a=t.location.query.values)===null||a===void 0?void 0:a.name,goodsAttriburteData:ze,matedata:ct,bomtype:ea,defaultmatedata:(x=t.location.query.values)===null||x===void 0?void 0:x.defaultMate,onCancel:function(){St(!1)}})]}),goodstechnologymaken:(0,e.jsx)(le.Z,{title:"\u5546\u54C1\u5DE5\u827A",style:{marginBottom:24},bordered:!1,children:(0,e.jsx)(oo,{goodsid:(m=t.location.query.values)===null||m===void 0?void 0:m.id})})};return(0,e.jsx)(je.ZP,{host:!0,header:{title:[(0,e.jsxs)("a",{onClick:function(){_.m8.push({pathname:"/database/goods/newgoods"})},children:[(0,e.jsx)(Ee.Z,{}),"\u8FD4\u56DE"]},"back")],breadcrumb:{}},title:t.location.query.isAdd?"\u5546\u54C1\u65B0\u589E":"\u8BE6\u60C5",tabActiveKey:te,onTabChange:Qa,tabList:ae,children:Z[pa.operationKey]})},co=uo},82539:function(Jt,gt,n){"use strict";n.d(gt,{lO:function(){return Le},Rq:function(){return ye},e3:function(){return Ce},yR:function(){return qe},FM:function(){return Mt}});var We=n(11849),le=n(39428),Ke=n(3182),$e=n(48971);function Le(f){return Pt.apply(this,arguments)}function Pt(){return Pt=(0,Ke.Z)((0,le.Z)().mark(function f(v){return(0,le.Z)().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.abrupt("return",(0,$e.WY)("/saasbase/api/goods/page",{method:"Post",data:v}));case 1:case"end":return d.stop()}},f)})),Pt.apply(this,arguments)}function F(f){return yt.apply(this,arguments)}function yt(){return yt=_asyncToGenerator(_regeneratorRuntime().mark(function f(v){return _regeneratorRuntime().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.abrupt("return",request("/saasbase/api/bom/getpage",{method:"Post",data:v}));case 1:case"end":return d.stop()}},f)})),yt.apply(this,arguments)}function Ht(f){return $.apply(this,arguments)}function $(){return $=_asyncToGenerator(_regeneratorRuntime().mark(function f(v){return _regeneratorRuntime().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.abrupt("return",request("/saasbase/api/GoodsBom/AddBom",{method:"Post",data:v}));case 1:case"end":return d.stop()}},f)})),$.apply(this,arguments)}function ie(f){return It.apply(this,arguments)}function It(){return It=_asyncToGenerator(_regeneratorRuntime().mark(function f(v){return _regeneratorRuntime().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.abrupt("return",request("/saasbase/api/GoodsBom/getBomInfo",{method:"Post",data:v}));case 1:case"end":return d.stop()}},f)})),It.apply(this,arguments)}function ye(f){return Xe.apply(this,arguments)}function Xe(){return Xe=(0,Ke.Z)((0,le.Z)().mark(function f(v){return(0,le.Z)().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.abrupt("return",(0,$e.WY)("/saasbase/api/goods/add",{method:"POST",data:v}));case 1:case"end":return d.stop()}},f)})),Xe.apply(this,arguments)}function Ce(f){return lt.apply(this,arguments)}function lt(){return lt=(0,Ke.Z)((0,le.Z)().mark(function f(v){return(0,le.Z)().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return console.log("\u5546\u54C1\u6570\u636E\u4FEE\u6539",v),d.abrupt("return",(0,$e.WY)("/saasbase/api/goods/update",{method:"Post",data:v}));case 2:case"end":return d.stop()}},f)})),lt.apply(this,arguments)}function qe(f){return wt.apply(this,arguments)}function wt(){return wt=(0,Ke.Z)((0,le.Z)().mark(function f(v){return(0,le.Z)().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.abrupt("return",(0,$e.WY)("/saasbase/api/goods/delete?id="+v,{method:"Get"}));case 1:case"end":return d.stop()}},f)})),wt.apply(this,arguments)}function Dt(f){return h.apply(this,arguments)}function h(){return h=_asyncToGenerator(_regeneratorRuntime().mark(function f(v){return _regeneratorRuntime().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.abrupt("return",request("/saasbase/api/goods-type/goods-types",{method:"POST",data:v}));case 1:case"end":return d.stop()}},f)})),h.apply(this,arguments)}function Mt(f){return T.apply(this,arguments)}function T(){return T=(0,Ke.Z)((0,le.Z)().mark(function f(v){return(0,le.Z)().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.abrupt("return",(0,$e.WY)("\u200B/saasbase/api\u200B/goodstype/tree",{method:"GET",data:(0,We.Z)({},v)}));case 1:case"end":return d.stop()}},f)})),T.apply(this,arguments)}function C(f){return Rt.apply(this,arguments)}function Rt(){return Rt=_asyncToGenerator(_regeneratorRuntime().mark(function f(v){return _regeneratorRuntime().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.abrupt("return",request("/saasbase/api/goodstaste/getlist"));case 1:case"end":return d.stop()}},f)})),Rt.apply(this,arguments)}function Y(f){return y.apply(this,arguments)}function y(){return y=_asyncToGenerator(_regeneratorRuntime().mark(function f(v){return _regeneratorRuntime().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.abrupt("return",request("/saasbase//api/goods/exportgood",{method:"POST",data:v}));case 1:case"end":return d.stop()}},f)})),y.apply(this,arguments)}function w(){return p.apply(this,arguments)}function p(){return p=_asyncToGenerator(_regeneratorRuntime().mark(function f(){return _regeneratorRuntime().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",request("/saasbase/api/goods/goodstemplateexport",{method:"post",responseType:"blob"}));case 1:case"end":return r.stop()}},f)})),p.apply(this,arguments)}},4914:function(Jt,gt,n){"use strict";n.d(gt,{K:function(){return h},Z:function(){return y}});var We=n(96156),le=n(28481),Ke=n(90484),$e=n(94184),Le=n.n($e),Pt=n(50344),F=n(67294),yt=n(53124),Ht=n(96159),$=n(24308),ie=function(p){var f=p.children;return f},It=ie,ye=n(22122);function Xe(w){return w!=null}var Ce=function(p){var f=p.itemPrefixCls,v=p.component,r=p.span,d=p.className,K=p.style,xe=p.labelStyle,Ee=p.contentStyle,je=p.bordered,i=p.label,pe=p.content,me=p.colon,Ie=v;if(je){var fe;return F.createElement(Ie,{className:Le()((fe={},(0,We.Z)(fe,"".concat(f,"-item-label"),Xe(i)),(0,We.Z)(fe,"".concat(f,"-item-content"),Xe(pe)),fe),d),style:K,colSpan:r},Xe(i)&&F.createElement("span",{style:xe},i),Xe(pe)&&F.createElement("span",{style:Ee},pe))}return F.createElement(Ie,{className:Le()("".concat(f,"-item"),d),style:K,colSpan:r},F.createElement("div",{className:"".concat(f,"-item-container")},(i||i===0)&&F.createElement("span",{className:Le()("".concat(f,"-item-label"),(0,We.Z)({},"".concat(f,"-item-no-colon"),!me)),style:xe},i),(pe||pe===0)&&F.createElement("span",{className:Le()("".concat(f,"-item-content")),style:Ee},pe)))},lt=Ce;function qe(w,p,f){var v=p.colon,r=p.prefixCls,d=p.bordered,K=f.component,xe=f.type,Ee=f.showLabel,je=f.showContent,i=f.labelStyle,pe=f.contentStyle;return w.map(function(me,Ie){var fe=me.props,ke=fe.label,e=fe.children,we=fe.prefixCls,De=we===void 0?r:we,et=fe.className,D=fe.style,Lt=fe.labelStyle,tt=fe.contentStyle,k=fe.span,_=k===void 0?1:k,Re=me.key;return typeof K=="string"?F.createElement(lt,{key:"".concat(xe,"-").concat(Re||Ie),className:et,style:D,labelStyle:(0,ye.Z)((0,ye.Z)({},i),Lt),contentStyle:(0,ye.Z)((0,ye.Z)({},pe),tt),span:_,colon:v,component:K,itemPrefixCls:De,bordered:d,label:Ee?ke:null,content:je?e:null}):[F.createElement(lt,{key:"label-".concat(Re||Ie),className:et,style:(0,ye.Z)((0,ye.Z)((0,ye.Z)({},i),D),Lt),span:1,colon:v,component:K[0],itemPrefixCls:De,bordered:d,label:ke}),F.createElement(lt,{key:"content-".concat(Re||Ie),className:et,style:(0,ye.Z)((0,ye.Z)((0,ye.Z)({},pe),D),tt),span:_*2-1,component:K[1],itemPrefixCls:De,bordered:d,content:e})]})}var wt=function(p){var f=F.useContext(h),v=p.prefixCls,r=p.vertical,d=p.row,K=p.index,xe=p.bordered;return r?F.createElement(F.Fragment,null,F.createElement("tr",{key:"label-".concat(K),className:"".concat(v,"-row")},qe(d,p,(0,ye.Z)({component:"th",type:"label",showLabel:!0},f))),F.createElement("tr",{key:"content-".concat(K),className:"".concat(v,"-row")},qe(d,p,(0,ye.Z)({component:"td",type:"content",showContent:!0},f)))):F.createElement("tr",{key:K,className:"".concat(v,"-row")},qe(d,p,(0,ye.Z)({component:xe?["th","td"]:"td",type:"item",showLabel:!0,showContent:!0},f)))},Dt=wt,h=F.createContext({}),Mt={xxl:3,xl:3,lg:3,md:3,sm:2,xs:1};function T(w,p){if(typeof w=="number")return w;if((0,Ke.Z)(w)==="object")for(var f=0;f<$.c4.length;f++){var v=$.c4[f];if(p[v]&&w[v]!==void 0)return w[v]||Mt[v]}return 3}function C(w,p,f){var v=w;return(p===void 0||p>f)&&(v=(0,Ht.Tm)(w,{span:f})),v}function Rt(w,p){var f=(0,Pt.Z)(w).filter(function(K){return K}),v=[],r=[],d=p;return f.forEach(function(K,xe){var Ee,je=(Ee=K.props)===null||Ee===void 0?void 0:Ee.span,i=je||1;if(xe===f.length-1){r.push(C(K,je,d)),v.push(r);return}i<d?(d-=i,r.push(K)):(r.push(C(K,i,d)),v.push(r),d=p,r=[])}),v}function Y(w){var p,f=w.prefixCls,v=w.title,r=w.extra,d=w.column,K=d===void 0?Mt:d,xe=w.colon,Ee=xe===void 0?!0:xe,je=w.bordered,i=w.layout,pe=w.children,me=w.className,Ie=w.style,fe=w.size,ke=w.labelStyle,e=w.contentStyle,we=F.useContext(yt.E_),De=we.getPrefixCls,et=we.direction,D=De("descriptions",f),Lt=F.useState({}),tt=(0,le.Z)(Lt,2),k=tt[0],_=tt[1],Re=T(K,k);F.useEffect(function(){var pt=$.ZP.subscribe(function(st){(0,Ke.Z)(K)==="object"&&_(st)});return function(){$.ZP.unsubscribe(pt)}},[]);var Ft=Rt(pe,Re),it=F.useMemo(function(){return{labelStyle:ke,contentStyle:e}},[ke,e]);return F.createElement(h.Provider,{value:it},F.createElement("div",{className:Le()(D,(p={},(0,We.Z)(p,"".concat(D,"-").concat(fe),fe&&fe!=="default"),(0,We.Z)(p,"".concat(D,"-bordered"),!!je),(0,We.Z)(p,"".concat(D,"-rtl"),et==="rtl"),p),me),style:Ie},(v||r)&&F.createElement("div",{className:"".concat(D,"-header")},v&&F.createElement("div",{className:"".concat(D,"-title")},v),r&&F.createElement("div",{className:"".concat(D,"-extra")},r)),F.createElement("div",{className:"".concat(D,"-view")},F.createElement("table",null,F.createElement("tbody",null,Ft.map(function(pt,st){return F.createElement(Dt,{key:st,index:st,colon:Ee,prefixCls:D,vertical:i==="vertical",bordered:je,row:pt})}))))))}Y.Item=It;var y=Y},98858:function(Jt,gt,n){"use strict";var We=n(38663),le=n.n(We),Ke=n(52953),$e=n.n(Ke)}}]);