包含后厨 团餐 门店分支
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

2 lines
19 KiB

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