You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

2 rivejä
18 KiB

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