No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
 
 
 

2 líneas
74 KiB

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