包含后厨 团餐 门店分支
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 
 

2 righe
13 KiB

  1. (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[8054],{95816:function(Ee,K,n){"use strict";n.r(K),n.d(K,{default:function(){return Ce}});var Ie=n(57338),ee=n(83107),De=n(57663),W=n(71577),Ae=n(62350),U=n(24565),Z=n(2824),o=n(39428),Re=n(34792),f=n(48086),F=n(3182),ae=n(49101),p=n(67294),te=n(28790),ne=n(85224),re=n(16894),ue=n(12826),Me=n(71194),N=n(50146),Be=n(9715),g=n(55843),Te=n(47673),R=n(4107),Oe=n(43358),Y=n(34041),t=n(85893),se=function(a){var d=Y.Z.Option,x=Y.Z.OptGroup;return(0,t.jsx)(N.Z,{title:a.values.id?"\u7F16\u8F91":"\u65B0\u5EFA",width:640,visible:a.modalVisible,bodyStyle:{padding:"32px 40px 1px 48px"},footer:null,onCancel:function(){a.onCancel()},destroyOnClose:!0,maskClosable:!1,children:(0,t.jsxs)(g.Z,{layout:"horizontal",labelCol:{span:4},preserve:!1,initialValues:a.values,onFinish:a.onFinish,children:[(0,t.jsx)(g.Z.Item,{name:"id",hidden:!0,children:(0,t.jsx)(R.Z,{})}),(0,t.jsx)(g.Z.Item,{name:"name",label:"\u4F01\u4E1A\u540D\u79F0",rules:[{required:!0,max:30}],children:(0,t.jsx)(R.Z,{placeholder:"\u8BF7\u8F93\u5165\u4F01\u4E1A\u540D\u79F0"})}),(0,t.jsx)(g.Z.Item,{name:"adminName",label:"\u7BA1\u7406\u5458\u59D3\u540D",rules:[{required:!0,max:20}],children:(0,t.jsx)(R.Z,{placeholder:"\u8BF7\u8F93\u5165\u7BA1\u7406\u5458\u59D3\u540D"})}),(0,t.jsx)(g.Z.Item,{name:"email",label:"\u90AE\u7BB1\u8D26\u53F7",rules:[{required:!0,max:50,message:"\u8BF7\u8F93\u5165\u90AE\u7BB1\u8D26\u53F7"},{pattern:/^[a-zA-Z0-9_.-]+@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*\.[a-zA-Z0-9]{2,6}$/,message:"\u90AE\u7BB1\u683C\u5F0F\u4E0D\u6B63\u786E"}],children:(0,t.jsx)(R.Z,{placeholder:"\u7535\u5B50\u90AE\u4EF6\u662F\u767B\u5F55\u8D26\u6237",disabled:!!a.values.id})}),(0,t.jsx)(g.Z.Item,{name:"type",label:"\u6240\u5C5E\u5E73\u53F0",rules:[{required:!0}],children:(0,t.jsx)(Y.Z,{placeholder:"\u8BF7\u9009\u62E9\u6240\u5C5E\u5E73\u53F0",allowClear:!0,options:[{value:0,label:"\u56E2\u9910"},{value:1,label:"\u95E8\u5E97"},{value:2,label:"\u540E\u53A8"}]})}),(0,t.jsx)(g.Z.Item,{name:"phone",label:"\u7535\u8BDD",rules:[{max:20,pattern:/0?(13|14|15|18|17)[0-9]{9}$/,message:"\u624B\u673A\u53F7\u683C\u5F0F\u4E0D\u6B63\u786E"}],children:(0,t.jsx)(R.Z,{placeholder:"\u8BF7\u8F93\u5165\u7535\u8BDD"})}),(0,t.jsx)(g.Z.Item,{name:"remark",label:"\u5907\u6CE8",rules:[{max:100}],children:(0,t.jsx)(R.Z,{placeholder:"\u8BF7\u8F93\u5165\u5907\u6CE8"})}),(0,t.jsxs)(g.Z.Item,{children:[(0,t.jsx)(W.Z,{htmlType:"button",style:{float:"right",left:10},onClick:a.onCancel,children:"\u53D6\u6D88"}),(0,t.jsx)(W.Z,{type:"primary",htmlType:"submit",style:{float:"right"},children:"\u4FDD\u5B58"})]})]})})},le=se,Pe=n(13062),ie=n(71230),$e=n(89032),oe=n(15746),Ge=n(32157),de=n(7573),we=n(71153),ce=n(60331),S=n(48971),C={companyPage:function(a){return(0,S.WY)("/saasbase/api/company/companypage",{method:"POST",data:a})},addCompany:function(a){return(0,S.WY)("/saasbase/api/company/add",{method:"POST",data:a})},updateCompany:function(a){return(0,S.WY)("/saasbase/api/company/update",{method:"POST",data:a})},removeCompany:function(a){return(0,S.WY)("/saasbase/api/company/delete",{method:"POST",data:a})},Enable:function(a){return(0,S.WY)("/saasbase/api/company/enable/?Id=".concat(a),{method:"Get"})},Disable:function(a){return(0,S.WY)("/saasbase/api/company/disable/?Id=".concat(a),{method:"Get"})},addRoleMenu:function(a){return(0,S.WY)("/saasbase/api/roles/addorupdatemenurole",{method:"POST",data:a})},GetMenu:function(a){return(0,S.WY)("\u200B/saasbase/api/menu/menuparmytrees?getType=".concat(a.getType,"&&type=").concat(a.type),{method:"Get"})},GetRoleMenu:function(a){return(0,S.WY)("/saasbase/api/roles/getmenurole/?RoleId=".concat(a))},menutreepage:function(a){return(0,S.WY)("/saasbase/api\u200B/menu/getmenutreepage",{method:"post",data:a})}},k=n(62255),fe=function(a){var d=(0,p.useState)(),x=(0,Z.Z)(d,2),e=x[0],m=x[1],O=(0,p.useState)(),P=(0,Z.Z)(O,2),$=P[0],H=P[1],G=(0,p.useState)(),j=(0,Z.Z)(G,2),b=j[0],w=j[1];(0,p.useEffect)((0,F.Z)((0,o.Z)().mark(function E(){var i,I,M,y;return(0,o.Z)().wrap(function(D){for(;;)switch(D.prev=D.next){case 0:return i=[],k.Z.from(a.values).forEach(function(B){B.isParentMenu||i.push(B.id)}),w(i),console.log("props.values",a.datas),I={getType:"ALL",type:a.datas.type},D.next=7,C.GetMenu(I);case 7:M=D.sent,y=k.Z.from(M.data).toArray(),m(y);case 10:case"end":return D.stop()}},E)})),[a.modalVisible]);var z=function(){var i=[];return k.Z.from(a.values).forEach(function(I){i.push((0,t.jsx)(ce.Z,{style:{width:100,margin:"Center"},color:"processing",children:I.name}))}),i},L=(0,t.jsx)(N.Z,{width:700,bodyStyle:{padding:"32px 40px 48px"},destroyOnClose:!0,title:"\u83DC\u5355\u5206\u914D",visible:a.modalVisible,onOk:function(){return a.onSubmit(b)},onCancel:function(){return a.onCancel()},maskClosable:!1,children:(0,t.jsx)(ie.Z,{children:(0,t.jsx)(oe.Z,{span:8,children:(0,t.jsx)(de.Z,{treeData:e,onCheck:function(i,I){w(i)},defaultExpandAll:!0,checkedKeys:b,checkable:!0})})})});return L},me=fe,he=function(){var l=(0,F.Z)((0,o.Z)().mark(function a(d){return(0,o.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,C.addCompany(d).then(function(m){if(!m.succeeded)return f.default.error(m.errors),!1;m.data?f.default.success("\u6DFB\u52A0\u6210\u529F"):f.default.error("\u6DFB\u52A0\u5931\u8D25\u8BF7\u91CD\u8BD5\uFF01")});case 3:return e.abrupt("return",!0);case 6:return e.prev=6,e.t0=e.catch(0),f.default.error("\u6DFB\u52A0\u5931\u8D25\u8BF7\u91CD\u8BD5\uFF01"),e.abrupt("return",!1);case 10:case"end":return e.stop()}},a,null,[[0,6]])}));return function(d){return l.apply(this,arguments)}}(),pe=function(){var l=(0,F.Z)((0,o.Z)().mark(function a(d){return(0,o.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,C.updateCompany(d).then(function(m){if(!m.succeeded)return f.default.error(m.errors),!1;m.data?f.default.success("\u914D\u7F6E\u6210\u529F"):f.default.error("\u914D\u7F6E\u5931\u8D25\u8BF7\u91CD\u8BD5\uFF01")});case 3:return e.abrupt("return",!0);case 6:return e.prev=6,e.t0=e.catch(0),f.default.error("\u914D\u7F6E\u5931\u8D25\u8BF7\u91CD\u8BD5\uFF01"),e.abrupt("return",!1);case 10:case"end":return e.stop()}},a,null,[[0,6]])}));return function(d){return l.apply(this,arguments)}}(),ve=function(){var l=(0,F.Z)((0,o.Z)().mark(function a(d){return(0,o.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(d){e.next=2;break}return e.abrupt("return",!0);case 2:return e.prev=2,e.next=5,C.removeCompany(d.map(function(m){return m.id})).then(function(m){if(m)return f.default.success("\u5220\u9664\u6210\u529F\uFF0C\u5373\u5C06\u5237\u65B0"),!0;f.default.error("\u5220\u9664\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5")});case 5:return e.abrupt("return",!0);case 8:return e.prev=8,e.t0=e.catch(2),f.default.error("\u5220\u9664\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5"),e.abrupt("return",!1);case 12:case"end":return e.stop()}},a,null,[[2,8]])}));return function(d){return l.apply(this,arguments)}}(),ye=function(){var l=(0,F.Z)((0,o.Z)().mark(function a(d){return(0,o.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,C.addRoleMenu(d).then(function(m){m.data?f.default.success("\u6388\u6743\u6210\u529F"):f.default.error("\u6388\u6743\u5931\u8D25\u8BF7\u91CD\u8BD5\uFF01")});case 3:return e.abrupt("return",!0);case 6:return e.prev=6,e.t0=e.catch(0),f.default.error("\u6388\u6743\u5931\u8D25\u8BF7\u91CD\u8BD5\uFF01"),e.abrupt("return",!1);case 10:case"end":return e.stop()}},a,null,[[0,6]])}));return function(d){return l.apply(this,arguments)}}(),Ze=function(){var a=(0,p.useState)(),d=(0,Z.Z)(a,2),x=d[0],e=d[1],m=(0,p.useState)(),O=(0,Z.Z)(m,2),P=O[0],$=O[1],H=(0,p.useState)({}),G=(0,Z.Z)(H,2),j=G[0],b=G[1],w=(0,p.useState)(),z=(0,Z.Z)(w,2),L=z[0],E=z[1],i=(0,p.useRef)(),I=(0,p.useState)(),M=(0,Z.Z)(I,2),y=M[0],V=M[1],D=(0,p.useState)(),B=(0,Z.Z)(D,2),T=B[0],J=B[1],Se=(0,p.useState)(),Q=(0,Z.Z)(Se,2),Fe=Q[0],ge=Q[1],xe=(0,p.useState)(),X=(0,Z.Z)(xe,2),je=X[0],be=X[1];(0,p.useEffect)(function(){var c={getType:"ALL",type:0};C.GetMenu(c).then(function(u){u.data&&ge(u.data.data)})},[]);var q=[{title:"\u4E3B\u952E",dataIndex:"id",tip:"key",hideInSearch:!0,hideInTable:!0,render:function(u,r){return(0,t.jsx)("a",{onClick:function(){V(r),E(!0)},children:u})}},{title:"\u4F01\u4E1A\u540D\u79F0",dataIndex:"name",ellipsis:!0},{title:"\u7BA1\u7406\u5458\u59D3\u540D",dataIndex:"adminName",ellipsis:!0},{title:"\u90AE\u7BB1\u8D26\u53F7",dataIndex:"email",ellipsis:!0},{title:"\u6240\u5C5E\u5E73\u53F0",dataIndex:"type",valueType:"select",ellipsis:!0,valueEnum:{0:{text:"\u56E2\u9910"},1:{text:"\u95E8\u5E97"},2:{text:"\u540E\u53A8"}}},{title:"\u7535\u8BDD",dataIndex:"phone",hideInSearch:!0},{title:"\u5907\u6CE8",dataIndex:"remark",hideInSearch:!0},{title:"\u72B6\u6001",dataIndex:"status",hideInForm:!0,hideInSearch:!0,valueEnum:{0:{text:"\u542F\u7528",status:"Processing"},1:{text:"\u7981\u7528",status:"Success"}}},{title:"\u521B\u5EFA\u65F6\u95F4",dataIndex:"createAt",valueType:"date",hideInForm:!0,hideInSearch:!0},{title:"\u64CD\u4F5C",dataIndex:"option",valueType:"option",fixed:"right",width:350,render:function(u,r){var v=[(0,t.jsxs)("a",{onClick:function(){e(!0),b(r)},children:[" ","\u66F4\u65B0"]}),(0,t.jsxs)("a",{onClick:function(){C.GetRoleMenu(r.sysRoleId).then(function(A){be(A.data),$(!0)}),b(r)},children:[" ","\u4F01\u4E1A\u83DC\u5355\u6388\u6743"]}),(0,t.jsx)(U.Z,{type:"primary",title:"\u5220\u9664\u52A0\u76DF\u5546\u5C06\u4F1A\u5220\u9664\u4E0B\u9762\u7684\u7528\u6237\u4EE5\u53CA\u83DC\u5355\u6743\u9650\uFF0C\u786E\u8BA4\u5220\u9664\u5417\uFF1F",okText:"\u662F",cancelText:"\u5426",onConfirm:function(){C.removeCompany([r.id]).then(function(A){f.default.success("\u5220\u9664\u6210\u529F\uFF0C\u5373\u5C06\u5237\u65B0"),i.current.reload()})},onCancel:function(){},children:(0,t.jsx)("a",{href:"#",children:"\u5220\u9664"})},"primary"),(0,t.jsxs)("a",{children:[" ","LOGO\u8BBE\u7F6E"]})];return v.push((0,t.jsxs)("a",{onClick:function(){r.status==1?C.Enable(r.id).then(function(A){f.default.success("\u542F\u7528\u6210\u529F\uFF0C\u5373\u5C06\u5237\u65B0"),i.current.reload()}):C.Disable(r.id).then(function(A){f.default.success("\u7981\u7528\u6210\u529F\uFF0C\u5373\u5C06\u5237\u65B0"),i.current.reload()})},children:[" ",r.status==0?"\u7981\u7528":"\u542F\u7528"]},"primary")),v}}];return(0,t.jsxs)(te.ZP,{host:!0,header:{title:"",breadcrumb:{}},children:[(0,t.jsx)(re.ZP,{headerTitle:"\u4F01\u4E1A\u4FE1\u606F\u5217\u8868",actionRef:i,rowKey:"id",pagination:{defaultPageSize:10},search:{labelWidth:120},toolBarRender:function(){return[(0,t.jsxs)(W.Z,{type:"primary",onClick:function(){e(!0)},children:[(0,t.jsx)(ae.Z,{})," \u65B0\u5EFA"]},"primary")]},request:function(){var c=(0,F.Z)((0,o.Z)().mark(function u(r){var v,h;return(0,o.Z)().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return v=[],h=0,s.next=4,C.companyPage(r).then(function(_){v=_.data.data,h=_.data.total});case 4:return s.abrupt("return",{data:v,success:!0,total:h});case 5:case"end":return s.stop()}},u)}));return function(u){return c.apply(this,arguments)}}(),columns:q,rowSelection:{onChange:function(u,r){J(r)}}}),(T==null?void 0:T.length)>0&&(0,t.jsx)(ne.Z,{extra:(0,t.jsxs)("div",{children:["\u5DF2\u9009\u62E9"," ",(0,t.jsx)("a",{style:{fontWeight:600},children:T.length})," ","\u9879 \xA0\xA0"]}),children:(0,t.jsx)(U.Z,{type:"primary",title:"\u786E\u8BA4\u5220\u9664\u5417\uFF1F",okText:"\u662F",cancelText:"\u5426",onConfirm:function(){var u,r;ve(T),J([]),(u=i.current)===null||u===void 0||(r=u.reloadAndRest)===null||r===void 0||r.call(u)},onCancel:function(){},children:(0,t.jsx)("a",{href:"#",children:"\u6279\u91CF\u5220\u9664"})},"primary")}),(0,t.jsx)(le,{onFinish:function(){var c=(0,F.Z)((0,o.Z)().mark(function u(r){var v,h;return(0,o.Z)().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:if(h=!1,!r.id){s.next=7;break}return s.next=4,pe(r);case 4:h=s.sent,s.next=10;break;case 7:return s.next=9,he(r);case 9:h=s.sent;case 10:h&&(e(!1),V(void 0),i.current&&i.current.reload()),(v=i.current)===null||v===void 0||v.reload();case 12:case"end":return s.stop()}},u)}));return function(u){return c.apply(this,arguments)}}(),onCancel:function(){e(!1),b({})},modalVisible:x,values:j||{}}),j&&Object.keys(j).length?(0,t.jsx)(me,{treeData:Fe,onSubmit:function(){var c=(0,F.Z)((0,o.Z)().mark(function u(r){var v,h;return(0,o.Z)().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return v={sysRoleId:j.sysRoleId,sysMenuId:r},s.next=3,ye(v);case 3:h=s.sent,h&&($(!1),b({}),i.current&&i.current.reload());case 5:case"end":return s.stop()}},u)}));return function(u){return c.apply(this,arguments)}}(),onCancel:function(){$(!1),b({})},modalVisible:P,values:je||{},datas:j||{}}):null,(0,t.jsx)(ee.Z,{width:600,visible:L,onClose:function(){V(void 0),E(!1)},closable:!1,children:(y==null?void 0:y.name)&&(0,t.jsx)(ue.ZP,{column:2,title:y==null?void 0:y.name,request:(0,F.Z)((0,o.Z)().mark(function c(){return(0,o.Z)().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",{data:y||{}});case 1:case"end":return r.stop()}},c)})),params:{id:y==null?void 0:y.name},columns:q})})]})},Ce=Ze}}]);