Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
 
 
 

2 Zeilen
19 KiB

  1. (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[3148,1322],{50727:function(xe,se,t){"use strict";var je=t(9715),J=t(55843),Be=t(57663),Ze=t(71577),$=t(96156),a=t(28481),ye=t(81253),w=t(55507),E=t(92137),p=t(28991),h=t(85893),pe=t(49101),Ce=t(97462),Ee=t(952),Me=t(78775),de=t(26369),be=t(22270),De=t(48171),Oe=t(60249),ce=t(21770),Ie=t(88306),L=t(8880),A=t(67294),ve=t(77153),l=["onTableChange","maxLength","formItemProps","recordCreatorProps","rowKey","controlled","defaultValue","onChange","editableFormRef"],Re=["record","position","creatorButtonText","newRecordType","parentKey","style"],fe=A.createContext(void 0);function he(e){var F=e.children,U=e.record,te=e.position,z=e.newRecordType,Q=e.parentKey,k=(0,A.useContext)(fe);return A.cloneElement(F,(0,p.Z)((0,p.Z)({},F.props),{},{onClick:function(){var X=(0,E.Z)((0,w.Z)().mark(function ie(q){var ne,H,N,G;return(0,w.Z)().wrap(function(R){for(;;)switch(R.prev=R.next){case 0:return R.next=2,(ne=(H=F.props).onClick)===null||ne===void 0?void 0:ne.call(H,q);case 2:if(G=R.sent,G!==!1){R.next=5;break}return R.abrupt("return");case 5:k==null||(N=k.current)===null||N===void 0||N.addEditRecord(U,{position:te,newRecordType:z,parentKey:Q});case 6:case"end":return R.stop()}},ie)}));function K(ie){return X.apply(this,arguments)}return K}()}))}function V(e){var F,U,te=(0,Me.YB)(),z=e.onTableChange,Q=e.maxLength,k=e.formItemProps,X=e.recordCreatorProps,K=e.rowKey,ie=e.controlled,q=e.defaultValue,ne=e.onChange,H=e.editableFormRef,N=(0,ye.Z)(e,l),G=(0,de.Z)(e.value),re=(0,A.useRef)(),R=(0,A.useRef)();(0,A.useImperativeHandle)(N.actionRef,function(){return re.current});var Te=(0,ce.Z)(function(){return e.value||q||[]},{value:e.value,onChange:e.onChange}),ge=(0,a.Z)(Te,2),n=ge[0],i=ge[1],u=A.useMemo(function(){return typeof K=="function"?K:function(o,s){return o[K]||s}},[K]),r=function(s){if(typeof s=="number"&&!e.name){if(s>=n.length)return s;var c=n&&n[s];return u==null?void 0:u(c,s)}if((typeof s=="string"||s>=n.length)&&e.name){var f=n.findIndex(function(d,b){var D;return(u==null||(D=u(d,b))===null||D===void 0?void 0:D.toString())===(s==null?void 0:s.toString())});return f}return s};(0,A.useImperativeHandle)(H,function(){var o=function(f){var d,b;if(f==null)throw new Error("rowIndex is required");var D=r(f),x=[e.name,(d=D==null?void 0:D.toString())!==null&&d!==void 0?d:""].flat(1).filter(Boolean);return(b=R.current)===null||b===void 0?void 0:b.getFieldValue(x)},s=function(){var f,d=[e.name].flat(1).filter(Boolean);if(Array.isArray(d)&&d.length===0){var b,D=(b=R.current)===null||b===void 0?void 0:b.getFieldsValue();return Array.isArray(D)?D:Object.keys(D).map(function(x){return D[x]})}return(f=R.current)===null||f===void 0?void 0:f.getFieldValue(d)};return(0,p.Z)((0,p.Z)({},R.current),{},{getRowData:o,getRowsData:s,setRowData:function(f,d){var b,D,x,le;if(f==null)throw new Error("rowIndex is required");var oe=r(f),Pe=[e.name,(b=oe==null?void 0:oe.toString())!==null&&b!==void 0?b:""].flat(1).filter(Boolean),T=((D=R.current)===null||D===void 0||(x=D.getFieldsValue)===null||x===void 0?void 0:x.call(D))||{},Z=(0,L.Z)(T,Pe,(0,p.Z)((0,p.Z)({},o(f)),d||{}));return(le=R.current)===null||le===void 0?void 0:le.setFieldsValue(Z)}})}),(0,A.useEffect)(function(){!e.controlled||n.forEach(function(o,s){var c;(c=R.current)===null||c===void 0||c.setFieldsValue((0,$.Z)({},u(o,s),o))},{})},[n,e.controlled]),(0,A.useEffect)(function(){if(e.name){var o;R.current=e==null||(o=e.editable)===null||o===void 0?void 0:o.form}},[(F=e.editable)===null||F===void 0?void 0:F.form,e.name]);var I=X||{},g=I.record,j=I.position,ae=I.creatorButtonText,Y=I.newRecordType,ee=I.parentKey,ue=I.style,O=(0,ye.Z)(I,Re),S=j==="top",C=(0,A.useMemo)(function(){return Q&&Q<=(n==null?void 0:n.length)?!1:X!==!1&&(0,h.jsx)(he,{record:(0,be.h)(g,n==null?void 0:n.length,n)||{},position:j,parentKey:(0,be.h)(ee,n==null?void 0:n.length,n),newRecordType:Y,children:(0,h.jsx)(Ze.Z,(0,p.Z)((0,p.Z)({type:"dashed",style:(0,p.Z)({display:"block",margin:"10px 0",width:"100%"},ue),icon:(0,h.jsx)(pe.Z,{})},O),{},{children:ae||te.getMessage("editableTable.action.add","\u6DFB\u52A0\u4E00\u884C\u6570\u636E")}))})},[X,Q,n==null?void 0:n.length]),B=(0,A.useMemo)(function(){return C?S?{components:{header:{wrapper:function(s){var c,f=s.className,d=s.children;return(0,h.jsxs)("thead",{className:f,children:[d,(0,h.jsxs)("tr",{style:{position:"relative"},children:[(0,h.jsx)("td",{colSpan:0,style:{visibility:"hidden"},children:C}),(0,h.jsx)("td",{style:{position:"absolute",left:0,width:"100%"},colSpan:(c=N.columns)===null||c===void 0?void 0:c.length,children:C})]})]})}}}}:{tableViewRender:function(s,c){var f,d;return(0,h.jsxs)(h.Fragment,{children:[(f=(d=e.tableViewRender)===null||d===void 0?void 0:d.call(e,s,c))!==null&&f!==void 0?f:c,C]})}}:{}},[S,C]),_=(0,p.Z)({},e.editable),W=(0,De.J)(function(o,s){var c,f,d;if((c=e.editable)===null||c===void 0||(f=c.onValuesChange)===null||f===void 0||f.call(c,o,s),(d=e.onValuesChange)===null||d===void 0||d.call(e,s,o),e.controlled){var b;e==null||(b=e.onChange)===null||b===void 0||b.call(e,s)}});return((e==null?void 0:e.onValuesChange)||((U=e.editable)===null||U===void 0?void 0:U.onValuesChange)||e.controlled&&(e==null?void 0:e.onChange))&&(_.onValuesChange=W),(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(fe.Provider,{value:re,children:(0,h.jsx)(ve.Z,(0,p.Z)((0,p.Z)((0,p.Z)({search:!1,options:!1,pagination:!1,rowKey:K,revalidateOnFocus:!1},N),B),{},{tableLayout:"fixed",actionRef:re,onChange:z,editable:(0,p.Z)((0,p.Z)({},_),{},{formProps:(0,p.Z)({formRef:R},_.formProps)}),dataSource:n,onDataSourceChange:function(s){if(i(s),e.name&&j==="top"){var c,f=(0,L.Z)({},[e.name].flat(1).filter(Boolean),s);(c=R.current)===null||c===void 0||c.setFieldsValue(f)}}}))}),e.name?(0,h.jsx)(Ce.Z,{name:[e.name],children:function(s){var c,f,d=(0,Ie.Z)(s,[e.name].flat(1)),b=d==null?void 0:d.find(function(D,x){return!(0,Oe.Z)(D,G==null?void 0:G[x])});return b&&G&&(e==null||(c=e.editable)===null||c===void 0||(f=c.onValuesChange)===null||f===void 0||f.call(c,b,d)),null}}):null]})}function me(e){var F=Ee.ZP.useFormInstance();return e.name?(0,h.jsx)(J.Z.Item,(0,p.Z)((0,p.Z)({style:{maxWidth:"100%"}},e==null?void 0:e.formItemProps),{},{name:e.name,children:(0,h.jsx)(V,(0,p.Z)((0,p.Z)({},e),{},{editable:(0,p.Z)((0,p.Z)({},e.editable),{},{form:F})}))})):(0,h.jsx)(V,(0,p.Z)({},e))}me.RecordCreator=he,se.Z=me},67549:function(xe,se,t){"use strict";t.r(se),t.d(se,{default:function(){return ge}});var je=t(57663),J=t(71577),Be=t(62350),Ze=t(24565),$=t(2824),a=t(39428),ye=t(34792),w=t(48086),E=t(3182),p=t(49101),h=t(67294),pe=t(78009),Ce=t(85224),Ee=t(16894),Me=t(71194),de=t(50146),be=t(77883),De=t(85986),Oe=t(43358),ce=t(34041),Ie=t(9715),L=t(55843),A=t(47673),ve=t(4107),l=t(85893),Re=function(i){return(0,l.jsx)(de.Z,{title:i.values.id?"\u7F16\u8F91":"\u65B0\u5EFA",width:640,visible:i.createModalVisible,bodyStyle:{padding:"32px 40px 1px 48px"},footer:null,onCancel:function(){i.onCancel()},destroyOnClose:!0,children:(0,l.jsxs)(L.Z,{labelCol:{span:4},layout:"horizontal",initialValues:i.values,onFinish:i.onFinish,children:[(0,l.jsx)(L.Z.Item,{name:"id",hidden:!0,children:(0,l.jsx)(ve.Z,{})}),(0,l.jsx)(L.Z.Item,{name:"attributeName",label:"\u5C5E\u6027\u540D\u79F0",rules:[{required:!0,max:50}],children:(0,l.jsx)(ve.Z,{})}),(0,l.jsx)(L.Z.Item,{name:"goodsTypeId",label:"\u5546\u54C1\u5C0F\u7C7B",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u72B6\u6001"}],children:(0,l.jsx)(ce.Z,{mode:"multiple",allowClear:!0,children:i.goodstypeData==null?"":i.goodstypeData.map(function(u,r){return(0,l.jsx)(ce.Z.Option,{index:r,value:u.value,children:u.label},u.value)})})}),(0,l.jsx)(L.Z.Item,{name:"sort",label:"\u6392\u5E8F",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6392\u5E8F\u53F7"}],children:(0,l.jsx)(De.Z,{})}),(0,l.jsxs)(L.Z.Item,{children:[(0,l.jsx)(J.Z,{htmlType:"button",style:{float:"right",left:10},onClick:i.onCancel,children:"\u53D6\u6D88"}),(0,l.jsx)(J.Z,{type:"primary",htmlType:"submit",style:{float:"right"},children:"\u4FDD\u5B58"})]})]})})},fe=Re,he=t(50727),V=t(48971);function me(n){return e.apply(this,arguments)}function e(){return e=(0,E.Z)((0,a.Z)().mark(function n(i){return(0,a.Z)().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",(0,V.WY)("/kitchen/api/goodsattribute/getgoodsattributepage",{method:"POST",data:i}));case 1:case"end":return r.stop()}},n)})),e.apply(this,arguments)}function F(n){return U.apply(this,arguments)}function U(){return U=(0,E.Z)((0,a.Z)().mark(function n(i){return(0,a.Z)().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",(0,V.WY)("/kitchen/api/goodsattribute/addgoodsattribute",{method:"POST",data:i}));case 1:case"end":return r.stop()}},n)})),U.apply(this,arguments)}function te(n){return z.apply(this,arguments)}function z(){return z=(0,E.Z)((0,a.Z)().mark(function n(i){return(0,a.Z)().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",(0,V.WY)("/kitchen/api/goodsattribute/deletegoodsattribute",{method:"POST",data:i}));case 1:case"end":return r.stop()}},n)})),z.apply(this,arguments)}function Q(n){return k.apply(this,arguments)}function k(){return k=(0,E.Z)((0,a.Z)().mark(function n(i){return(0,a.Z)().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",(0,V.WY)("/kitchen/api/goodsattribute/getgoodsattributevalue?goodsAttributeId="+i,{method:"GET"}));case 1:case"end":return r.stop()}},n)})),k.apply(this,arguments)}function X(n){return K.apply(this,arguments)}function K(){return K=(0,E.Z)((0,a.Z)().mark(function n(i){return(0,a.Z)().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",(0,V.WY)("/kitchen/api/goodsattribute/addgoodsattributevalue",{method:"POST",data:i}));case 1:case"end":return r.stop()}},n)})),K.apply(this,arguments)}function ie(n){return q.apply(this,arguments)}function q(){return q=(0,E.Z)((0,a.Z)().mark(function n(i){return(0,a.Z)().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",(0,V.WY)("/kitchen/api/goodsattribute/deletegoodsattributevalue?id="+i,{method:"GET"}));case 1:case"end":return r.stop()}},n)})),q.apply(this,arguments)}function ne(){return H.apply(this,arguments)}function H(){return H=(0,E.Z)((0,a.Z)().mark(function n(){return(0,a.Z)().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return u.abrupt("return",(0,V.WY)("/kitchen/api/goodstype/list",{method:"POST"}));case 1:case"end":return u.stop()}},n)})),H.apply(this,arguments)}var N=function(i){var u=(0,h.useState)([]),r=(0,$.Z)(u,2),I=r[0],g=r[1],j=(0,h.useState)([]),ae=(0,$.Z)(j,2),Y=ae[0],ee=ae[1],ue=[{title:"\u540D\u79F0",dataIndex:"attributeValue",formItemProps:function(S,C){var B=C.rowIndex;return{rules:B>1?[{required:!0,message:"\u6B64\u9879\u4E3A\u5FC5\u586B\u9879"}]:[]}},width:"25%"},{title:"\u5916\u952E",dataIndex:"waiKey",width:"15%"},{title:"\u6392\u5E8F",dataIndex:"sort",valueType:"digit",width:"15%"},{title:"\u64CD\u4F5C",valueType:"option",width:"15%",render:function(){return null}}];return(0,h.useEffect)((0,E.Z)((0,a.Z)().mark(function O(){return(0,a.Z)().wrap(function(C){for(;;)switch(C.prev=C.next){case 0:case"end":return C.stop()}},O)})),[]),(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(de.Z,{title:"\u6DFB\u52A0\u5C5E\u6027\u503C",width:840,visible:i.createattrModalVisible,bodyStyle:{padding:"32px 40px 1px 48px"},footer:null,onCancel:function(){i.onCancel()},destroyOnClose:!0,children:(0,l.jsx)(he.Z,{headerTitle:"\u5C5E\u6027\u5217\u8868",columns:ue,rowKey:"id",request:(0,E.Z)((0,a.Z)().mark(function O(){var S,C;return(0,a.Z)().wrap(function(_){for(;;)switch(_.prev=_.next){case 0:return S=[],C=0,_.next=4,Q(i.attributeid).then(function(W){S=W.data,C=W.data.length,ee(W.data),g(W.data.map(function(o){return o.id}))});case 4:return _.abrupt("return",{data:S,success:!0,total:C});case 5:case"end":return _.stop()}},O)})),value:Y,onChange:ee,recordCreatorProps:{newRecordType:"dataSource",record:function(){return{id:Date.now()}}},toolBarRender:function(){return[(0,l.jsx)(J.Z,{type:"primary",onClick:function(){i.onFinish(Y),console.log(Y)},children:"\u4FDD\u5B58\u6570\u636E"},"save")]},editable:{type:"multiple",editableKeys:I,actionRender:function(S,C,B){return[B.delete,B.Button]},onValuesChange:function(S,C){ee(C)},onDelete:function(){var O=(0,E.Z)((0,a.Z)().mark(function C(B,_){return(0,a.Z)().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return console.log(B),console.log(_),o.next=4,ie(B).then(function(s){});case 4:case"end":return o.stop()}},C)}));function S(C,B){return O.apply(this,arguments)}return S}(),onChange:g}})})})},G=N,re=function(){var n=(0,E.Z)((0,a.Z)().mark(function i(u){var r;return(0,a.Z)().wrap(function(g){for(;;)switch(g.prev=g.next){case 0:return r=w.default.loading("\u6B63\u5728\u6DFB\u52A0"),u.createBy="admin",g.prev=2,g.next=5,F(JSON.stringify(u)).then(function(j){j.succeeded?w.default.success("\u6DFB\u52A0\u6210\u529F"):w.default.error(j.errors)});case 5:return r(),g.abrupt("return",!0);case 9:return g.prev=9,g.t0=g.catch(2),r(),w.default.error("\u6DFB\u52A0\u5931\u8D25\u8BF7\u91CD\u8BD5\uFF01"),g.abrupt("return",!1);case 14:case"end":return g.stop()}},i,null,[[2,9]])}));return function(u){return n.apply(this,arguments)}}(),R=function(){var n=(0,E.Z)((0,a.Z)().mark(function i(u){var r;return(0,a.Z)().wrap(function(g){for(;;)switch(g.prev=g.next){case 0:return r=w.default.loading("\u6B63\u5728\u4FEE\u6539"),g.prev=1,g.next=4,F({id:u.id,AttributeName:u.attributeName,goodsTypeId:u.goodsTypeId,Sort:u.sort}).then(function(j){j.succeeded?w.default.success("\u4FEE\u6539\u6210\u529F"):w.default.error(j.errors)});case 4:return r(),g.abrupt("return",!0);case 8:return g.prev=8,g.t0=g.catch(1),r(),w.default.error("\u4FEE\u6539\u5931\u8D25\u8BF7\u91CD\u8BD5\uFF01"),g.abrupt("return",!1);case 13:case"end":return g.stop()}},i,null,[[1,8]])}));return function(u){return n.apply(this,arguments)}}(),Te=function(){var i=(0,h.useState)(!1),u=(0,$.Z)(i,2),r=u[0],I=u[1],g=(0,h.useState)(!1),j=(0,$.Z)(g,2),ae=j[0],Y=j[1],ee=(0,h.useState)([]),ue=(0,$.Z)(ee,2),O=ue[0],S=ue[1],C=(0,h.useState)(""),B=(0,$.Z)(C,2),_=B[0],W=B[1],o=(0,h.useRef)(),s=(0,h.useState)(),c=(0,$.Z)(s,2),f=c[0],d=c[1],b=(0,h.useState)([]),D=(0,$.Z)(b,2),x=D[0],le=D[1];(0,h.useEffect)(function(){function T(){ne().then(function(Z){var m=Z.data,y=m.map(function(P){return{value:P.id,label:P.name}});S(y)})}T()},[]);var oe=function(){var T=(0,E.Z)((0,a.Z)().mark(function Z(m){var y;return(0,a.Z)().wrap(function(v){for(;;)switch(v.prev=v.next){case 0:if(y=w.default.loading("\u6B63\u5728\u5220\u9664"),m){v.next=3;break}return v.abrupt("return",!0);case 3:return v.next=5,te(m.map(function(M){return M.id})).then(function(M){M.succeeded?(w.default.success("\u5220\u9664\u6210\u529F"),o.current.reload()):w.default.error(M.errors)});case 5:return y(),v.abrupt("return",!0);case 7:case"end":return v.stop()}},Z)}));return function(m){return T.apply(this,arguments)}}(),Pe=[{title:"\u4E3B\u952E",dataIndex:"id",hideInSearch:!0,hideInTable:!0,tip:"\u89C4\u5219\u540D\u79F0\u662F\u552F\u4E00\u7684 key",render:function(Z,m){return(0,l.jsx)("a",{onClick:function(){d(m),setShowDetail(!0)},children:Z})}},{title:"\u5C5E\u6027\u540D\u79F0",dataIndex:"attributeName",valueType:"textarea",ellipsis:!0},{title:"\u5546\u54C1\u5C0F\u7C7B",dataIndex:"goodsTypeName",valueType:"select",fieldProps:{showSearch:!0,options:O}},{title:"\u6392\u5E8F",dataIndex:"sort",hideInSearch:!0},{title:"\u64CD\u4F5C",dataIndex:"option",valueType:"option",render:function(Z,m){return[(0,l.jsx)("a",{onClick:(0,E.Z)((0,a.Z)().mark(function y(){return(0,a.Z)().wrap(function(v){for(;;)switch(v.prev=v.next){case 0:W(m.id),Y(!0),d(m);case 3:case"end":return v.stop()}},y)})),children:"\u6DFB\u52A0\u5C5E\u6027\u503C"},"state"),(0,l.jsx)("a",{onClick:function(){I(!0),d(m)},children:"\u66F4\u65B0"},"config"),(0,l.jsx)(Ze.Z,{type:"primary",title:"\u5220\u9664\u5C5E\u6027\u540E\u4F1A\u5C06\u5C5E\u6027\u7684\u503C\u4E00\u8D77\u5220\u9664\uFF0C\u786E\u8BA4\u5220\u9664\u5417\uFF1F",okText:"\u662F",cancelText:"\u5426",onConfirm:(0,E.Z)((0,a.Z)().mark(function y(){return(0,a.Z)().wrap(function(v){for(;;)switch(v.prev=v.next){case 0:return v.next=2,te([m.id]).then(function(M){M.succeeded?(w.default.success("\u5220\u9664\u6210\u529F"),o.current.reload()):w.default.error(M.errors)});case 2:case"end":return v.stop()}},y)})),onCancel:function(){},children:(0,l.jsx)("a",{href:"#",children:"\u5220\u9664"})},"primary")]}}];return(0,l.jsxs)(pe.ZP,{children:[(0,l.jsx)(Ee.ZP,{headerTitle:"\u67E5\u8BE2\u8868\u683C",actionRef:o,rowKey:"id",search:{labelWidth:120},toolBarRender:function(){return[(0,l.jsxs)(J.Z,{type:"primary",onClick:function(){I(!0)},children:[(0,l.jsx)(p.Z,{})," \u65B0\u5EFA"]},"primary")]},request:function(){var T=(0,E.Z)((0,a.Z)().mark(function Z(m){var y,P;return(0,a.Z)().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return y=[],P=0,M.next=4,me(m).then(function(Se){y=Se.data.data,y.forEach(function(we){we.goodsTypeId!=null&&(we.goodsTypeId=we.goodsTypeId.split(","))}),P=Se.data.total});case 4:return M.abrupt("return",{data:y,success:!0,total:P});case 5:case"end":return M.stop()}},Z)}));return function(Z){return T.apply(this,arguments)}}(),columns:Pe,rowSelection:{onChange:function(Z,m){le(m)}}}),(x==null?void 0:x.length)>0&&(0,l.jsx)(Ce.Z,{extra:(0,l.jsxs)("div",{children:["\u5DF2\u9009\u62E9"," ",(0,l.jsx)("a",{style:{fontWeight:600},children:x.length})," ","\u9879 \xA0\xA0"]}),children:(0,l.jsx)(J.Z,{onClick:(0,E.Z)((0,a.Z)().mark(function T(){var Z,m;return(0,a.Z)().wrap(function(P){for(;;)switch(P.prev=P.next){case 0:return P.next=2,oe(x);case 2:le([]),(Z=o.current)===null||Z===void 0||(m=Z.reloadAndRest)===null||m===void 0||m.call(Z);case 4:case"end":return P.stop()}},T)})),children:"\u5220\u9664"})}),(0,l.jsx)(fe,{goodstypeData:O,onFinish:function(){var T=(0,E.Z)((0,a.Z)().mark(function Z(m){var y;return(0,a.Z)().wrap(function(v){for(;;)switch(v.prev=v.next){case 0:if(console.log(m),y=!1,!m.id){v.next=8;break}return v.next=5,R(m);case 5:y=v.sent,v.next=11;break;case 8:return v.next=10,re(m);case 10:y=v.sent;case 11:y&&(I(!1),d(void 0),o.current&&o.current.reload());case 12:case"end":return v.stop()}},Z)}));return function(Z){return T.apply(this,arguments)}}(),onCancel:function(){I(!1),d(void 0)},createModalVisible:r,values:f||{}}),(0,l.jsx)(G,{onFinish:function(){var T=(0,E.Z)((0,a.Z)().mark(function Z(m){var y;return(0,a.Z)().wrap(function(v){for(;;)switch(v.prev=v.next){case 0:return console.log(m),y=m.map(function(M){return M.GoodsAttributeId=f.id,M}),v.next=4,X(y).then(function(M){M.data?(w.default.success("\u4FDD\u5B58\u6210\u529F"),Y(!1),o.current.reload()):w.default.error("\u4FDD\u5B58\u5931\u8D25")});case 4:case"end":return v.stop()}},Z)}));return function(Z){return T.apply(this,arguments)}}(),onCancel:function(){var T=(0,E.Z)((0,a.Z)().mark(function Z(m){return(0,a.Z)().wrap(function(P){for(;;)switch(P.prev=P.next){case 0:W(void 0),Y(!1),d(void 0);case 3:case"end":return P.stop()}},Z)}));return function(Z){return T.apply(this,arguments)}}(),attributeid:_,createattrModalVisible:ae})]})},ge=Te}}]);