Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
 
 
 

2 rindas
6.8 KiB

  1. (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[5815,7975,1322],{73937:function(k,T,e){"use strict";e.r(T),e.d(T,{default:function(){return X}});var v=e(57663),g=e(71577),p=e(2824),l=e(39428),B=e(34792),a=e(48086),f=e(3182),D=e(49101),m=e(67294),$=e(78009),R=e(85224),i=e(16894),S=e(71194),w=e(50146),t=e(9715),I=e(71257),te=e(47673),b=e(4107),ne=e(43358),x=e(34041),n=e(85893),V=function(s){var c=x.Z.Option,C=x.Z.OptGroup;return(0,n.jsx)(w.Z,{title:s.values.id?"\u7F16\u8F91":"\u65B0\u5EFA",width:640,visible:s.createModalVisible,bodyStyle:{padding:"32px 40px 48px"},footer:null,onCancel:function(){s.onCancel()},destroyOnClose:!0,children:(0,n.jsxs)(I.Z,{layout:"vertical",preserve:!1,initialValues:s.values,onFinish:s.onFinish,children:[(0,n.jsx)(I.Z.Item,{name:"id",hidden:!0,children:(0,n.jsx)(b.Z,{})}),(0,n.jsx)(I.Z.Item,{label:"\u7B49\u7EA7",name:"storeLevel_Name",rules:[{required:!0}],children:(0,n.jsx)(b.Z,{})}),(0,n.jsx)(I.Z.Item,{children:(0,n.jsx)(g.Z,{type:"primary",htmlType:"submit",children:"\u4FDD\u5B58"})})]})})},Y=V,F=e(94595),E="message",J=function(){var A=(0,f.Z)((0,l.Z)().mark(function s(c){return(0,l.Z)().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,a.default.loading("\u6B63\u5728\u6DFB\u52A0",E),r.next=4,(0,F.ef)(JSON.stringify(c)).then(function(u){return a.default.destroy(E),u.data?(a.default.success("\u6DFB\u52A0\u6210\u529F"),!0):(a.default.error("\u6DFB\u52A0\u5931\u8D25"),!1)});case 4:r.next=10;break;case 6:return r.prev=6,r.t0=r.catch(0),a.default.error("\u6DFB\u52A0\u5931\u8D25\u8BF7\u91CD\u8BD5\uFF01"),r.abrupt("return",!1);case 10:case"end":return r.stop()}},s,null,[[0,6]])}));return function(c){return A.apply(this,arguments)}}(),Q=function(){var A=(0,f.Z)((0,l.Z)().mark(function s(c){return(0,l.Z)().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,a.default.loading("\u6B63\u5728\u4FEE\u6539",E),a.default.destroy(E),r.next=5,(0,F.EQ)(JSON.stringify(c)).then(function(u){return a.default.destroy(E),u.data?(a.default.success("\u4FEE\u6539\u6210\u529F"),!0):(a.default.success("\u4FEE\u6539\u5931\u8D25"),!1)});case 5:r.next=11;break;case 7:return r.prev=7,r.t0=r.catch(0),a.default.error("\u4FEE\u6539\u5931\u8D25\u8BF7\u91CD\u8BD5\uFF01"),r.abrupt("return",!1);case 11:case"end":return r.stop()}},s,null,[[0,7]])}));return function(c){return A.apply(this,arguments)}}(),z=function(){var A=(0,f.Z)((0,l.Z)().mark(function s(c){var C;return(0,l.Z)().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return u.prev=0,a.default.loading("\u6B63\u5728\u5220\u9664"),C=[],c.forEach(function(j){C.push(j.id)}),u.next=6,(0,F.mv)(C).then(function(j){return j.data?(a.default.success("\u5220\u9664\u6210\u529F"),!0):(a.default.success("\u5220\u9664\u5931\u8D25"),!1)});case 6:u.next=12;break;case 8:return u.prev=8,u.t0=u.catch(0),a.default.error("\u5220\u9664\u5931\u8D25\u8BF7\u91CD\u8BD5\uFF01"),u.abrupt("return",!1);case 12:case"end":return u.stop()}},s,null,[[0,8]])}));return function(c){return A.apply(this,arguments)}}(),H=function(){var s=(0,m.useState)(!1),c=(0,p.Z)(s,2),C=c[0],r=c[1],u=(0,m.useState)(!1),j=(0,p.Z)(u,2),ae=j[0],se=j[1],M=(0,m.useRef)(),q=(0,m.useState)(),G=(0,p.Z)(q,2),_=G[0],W=G[1],ee=(0,m.useState)([]),U=(0,p.Z)(ee,2),O=U[0],K=U[1],re=[{title:"\u4E3B\u952E",dataIndex:"id",hideInSearch:!0,hideInTable:!0,tip:"\u89C4\u5219\u540D\u79F0\u662F\u552F\u4E00\u7684 key"},{title:"\u7B49\u7EA7",dataIndex:"storeLevel_Name",valueType:"textarea",ellipsis:!0},{title:"\u521B\u5EFA\u65F6\u95F4",dataIndex:"createAt",hideInForm:!0,search:!1},{title:"\u4FEE\u6539\u65F6\u95F4",dataIndex:"updateAt",hideInForm:!0,search:!1},{title:"\u64CD\u4F5C",dataIndex:"option",valueType:"option",render:function(d,o){return[(0,n.jsx)("a",{onClick:function(){r(!0),W(o)},children:" \u66F4\u65B0"},"config")]}}];return(0,n.jsxs)($.ZP,{children:[(0,n.jsx)(i.ZP,{headerTitle:"\u5E97\u94FA\u7C7B\u578B",actionRef:M,rowKey:"id",search:{labelWidth:120},toolBarRender:function(){return[(0,n.jsxs)(g.Z,{type:"primary",onClick:function(){r(!0)},children:[(0,n.jsx)(D.Z,{})," \u65B0\u5EFA"]},"primary")]},request:function(){var y=(0,f.Z)((0,l.Z)().mark(function d(o){var h,Z;return(0,l.Z)().wrap(function(P){for(;;)switch(P.prev=P.next){case 0:return h=[],Z=0,P.next=4,(0,F.k3)(o).then(function(N){h=N.data.data,Z=N.data.total});case 4:return P.abrupt("return",{data:h,success:!0,total:Z});case 5:case"end":return P.stop()}},d)}));return function(d){return y.apply(this,arguments)}}(),columns:re,rowSelection:{onChange:function(d,o){K(o)}}}),(O==null?void 0:O.length)>0&&(0,n.jsx)(R.Z,{extra:(0,n.jsxs)("div",{children:["\u5DF2\u9009\u62E9"," ",(0,n.jsx)("a",{style:{fontWeight:600},children:O.length})," ","\u9879 \xA0\xA0"]}),children:(0,n.jsx)(g.Z,{onClick:(0,f.Z)((0,l.Z)().mark(function y(){var d,o;return(0,l.Z)().wrap(function(Z){for(;;)switch(Z.prev=Z.next){case 0:return Z.next=2,z(O);case 2:K([]),(d=M.current)===null||d===void 0||(o=d.reloadAndRest)===null||o===void 0||o.call(d);case 4:case"end":return Z.stop()}},y)})),children:"\u5220\u9664"})}),(0,n.jsx)(Y,{onFinish:function(){var y=(0,f.Z)((0,l.Z)().mark(function d(o){var h;return(0,l.Z)().wrap(function(L){for(;;)switch(L.prev=L.next){case 0:h=!1,o.id?h=Q(o):h=J(o),h&&(r(!1),W(void 0),M.current.reload());case 3:case"end":return L.stop()}},d)}));return function(d){return y.apply(this,arguments)}}(),onCancel:function(){r(!1),W(void 0)},createModalVisible:C,values:_||{}})]})},X=H},94595:function(k,T,e){"use strict";e.d(T,{k3:function(){return l},ef:function(){return a},EQ:function(){return D},mv:function(){return $}});var v=e(39428),g=e(3182),p=e(48971);function l(i){return B.apply(this,arguments)}function B(){return B=(0,g.Z)((0,v.Z)().mark(function i(S){return(0,v.Z)().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",(0,p.WY)("/kitchen/api/store/store-level-page",{method:"POST",data:S}));case 1:case"end":return t.stop()}},i)})),B.apply(this,arguments)}function a(i){return f.apply(this,arguments)}function f(){return f=(0,g.Z)((0,v.Z)().mark(function i(S){return(0,v.Z)().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",(0,p.WY)("/kitchen/api\u200B/store\u200B/store-level",{method:"POST",data:S}));case 1:case"end":return t.stop()}},i)})),f.apply(this,arguments)}function D(i){return m.apply(this,arguments)}function m(){return m=(0,g.Z)((0,v.Z)().mark(function i(S){return(0,v.Z)().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",(0,p.WY)("/kitchen/api/store/store-level",{method:"put",data:S}));case 1:case"end":return t.stop()}},i)})),m.apply(this,arguments)}function $(i){return R.apply(this,arguments)}function R(){return R=(0,g.Z)((0,v.Z)().mark(function i(S){return(0,v.Z)().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",(0,p.WY)("/kitchen/api\u200B/store\u200B/del-store-level",{method:"POST",data:S}));case 1:case"end":return t.stop()}},i)})),R.apply(this,arguments)}}}]);