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