包含后厨 团餐 门店分支
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 
 

2 řádky
78 KiB

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