包含后厨 团餐 门店分支
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 line
12 KiB

  1. (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[8054],{95816:function(Ie,z,t){"use strict";t.r(z),t.d(z,{default:function(){return Ce}});var De=t(57338),ee=t(83107),Ee=t(57663),W=t(71577),Ae=t(62350),K=t(24565),y=t(2824),d=t(39428),Re=t(34792),f=t(48086),F=t(3182),ae=t(49101),v=t(67294),ne=t(28790),te=t(85224),re=t(16894),ue=t(12826),Me=t(71194),L=t(50146),Be=t(9715),x=t(55843),Te=t(47673),R=t(4107),Oe=t(43358),U=t(34041),n=t(85893),se=function(a){var c=U.Z.Option,g=U.Z.OptGroup;return(0,n.jsx)(L.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,n.jsxs)(x.Z,{layout:"horizontal",labelCol:{span:4},preserve:!1,initialValues:a.values,onFinish:a.onFinish,children:[(0,n.jsx)(x.Z.Item,{name:"id",hidden:!0,children:(0,n.jsx)(R.Z,{})}),(0,n.jsx)(x.Z.Item,{name:"name",label:"\u4F01\u4E1A\u540D\u79F0",rules:[{required:!0,max:30}],children:(0,n.jsx)(R.Z,{placeholder:"\u8BF7\u8F93\u5165\u4F01\u4E1A\u540D\u79F0"})}),(0,n.jsx)(x.Z.Item,{name:"adminName",label:"\u7BA1\u7406\u5458\u59D3\u540D",rules:[{required:!0,max:20}],children:(0,n.jsx)(R.Z,{placeholder:"\u8BF7\u8F93\u5165\u7BA1\u7406\u5458\u59D3\u540D"})}),(0,n.jsx)(x.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,n.jsx)(R.Z,{placeholder:"\u7535\u5B50\u90AE\u4EF6\u662F\u767B\u5F55\u8D26\u6237",disabled:!!a.values.id})}),(0,n.jsx)(x.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,n.jsx)(R.Z,{placeholder:"\u8BF7\u8F93\u5165\u7535\u8BDD"})}),(0,n.jsx)(x.Z.Item,{name:"remark",label:"\u5907\u6CE8",rules:[{max:100}],children:(0,n.jsx)(R.Z,{placeholder:"\u8BF7\u8F93\u5165\u5907\u6CE8"})}),(0,n.jsxs)(x.Z.Item,{children:[(0,n.jsx)(W.Z,{htmlType:"button",style:{float:"right",left:10},onClick:a.onCancel,children:"\u53D6\u6D88"}),(0,n.jsx)(W.Z,{type:"primary",htmlType:"submit",style:{float:"right"},children:"\u4FDD\u5B58"})]})]})})},le=se,Pe=t(13062),ie=t(71230),$e=t(89032),oe=t(15746),Ge=t(32157),de=t(7573),Ve=t(71153),ce=t(60331),S=t(48971),Z={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:"PUT",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/menutrees?getType=".concat(a),{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})}},w=t(62255),fe=function(a){var c=(0,v.useState)(),g=(0,y.Z)(c,2),e=g[0],m=g[1],T=(0,v.useState)(),O=(0,y.Z)(T,2),P=O[0],N=O[1],$=(0,v.useState)(),D=(0,y.Z)($,2),b=D[0],G=D[1];(0,v.useEffect)((0,F.Z)((0,d.Z)().mark(function I(){var l,E,M;return(0,d.Z)().wrap(function(j){for(;;)switch(j.prev=j.next){case 0:return l=[],w.Z.from(a.values).forEach(function(V){V.isParentMenu||l.push(V.id)}),G(l),j.next=5,Z.GetMenu("ALL");case 5:E=j.sent,M=w.Z.from(E.data).toArray(),m(M);case 8:case"end":return j.stop()}},I)})),[a.modalVisible]);var Y=function(){var l=[];return w.Z.from(a.values).forEach(function(E){l.push((0,n.jsx)(ce.Z,{style:{width:100,margin:"Center"},color:"processing",children:E.name}))}),l},k=(0,n.jsx)(L.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,n.jsx)(ie.Z,{children:(0,n.jsx)(oe.Z,{span:8,children:(0,n.jsx)(de.Z,{treeData:e,onCheck:function(l,E){G(l)},defaultExpandAll:!0,checkedKeys:b,checkable:!0})})})});return k},me=fe,he=function(){var s=(0,F.Z)((0,d.Z)().mark(function a(c){return(0,d.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Z.addCompany(c).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(c){return s.apply(this,arguments)}}(),ve=function(){var s=(0,F.Z)((0,d.Z)().mark(function a(c){return(0,d.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Z.updateCompany(c).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(c){return s.apply(this,arguments)}}(),pe=function(){var s=(0,F.Z)((0,d.Z)().mark(function a(c){return(0,d.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(c){e.next=2;break}return e.abrupt("return",!0);case 2:return e.prev=2,e.next=5,Z.removeCompany(c.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(c){return s.apply(this,arguments)}}(),ye=function(){var s=(0,F.Z)((0,d.Z)().mark(function a(c){return(0,d.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Z.addRoleMenu(c).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(c){return s.apply(this,arguments)}}(),Ze=function(){var a=(0,v.useState)(),c=(0,y.Z)(a,2),g=c[0],e=c[1],m=(0,v.useState)(),T=(0,y.Z)(m,2),O=T[0],P=T[1],N=(0,v.useState)({}),$=(0,y.Z)(N,2),D=$[0],b=$[1],G=(0,v.useState)(),Y=(0,y.Z)(G,2),k=Y[0],I=Y[1],l=(0,v.useRef)(),E=(0,v.useState)(),M=(0,y.Z)(E,2),C=M[0],j=M[1],V=(0,v.useState)(),H=(0,y.Z)(V,2),B=H[0],J=H[1],Se=(0,v.useState)(),Q=(0,y.Z)(Se,2),Fe=Q[0],ge=Q[1],je=(0,v.useState)(),X=(0,y.Z)(je,2),xe=X[0],be=X[1];(0,v.useEffect)(function(){Z.GetMenu().then(function(i){i.data&&ge(i.data.data)})},[]);var q=[{title:"\u4E3B\u952E",dataIndex:"id",tip:"key",hideInSearch:!0,hideInTable:!0,render:function(o,r){return(0,n.jsx)("a",{onClick:function(){j(r),I(!0)},children:o})}},{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:"\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(o,r){var p=[(0,n.jsxs)("a",{onClick:function(){e(!0),b(r)},children:[" ","\u66F4\u65B0"]}),(0,n.jsxs)("a",{onClick:function(){Z.GetRoleMenu(r.sysRoleId).then(function(A){be(A.data),P(!0)}),b(r)},children:[" ","\u4F01\u4E1A\u83DC\u5355\u6388\u6743"]}),(0,n.jsx)(K.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(){Z.removeCompany([r.id]).then(function(A){f.default.success("\u5220\u9664\u6210\u529F\uFF0C\u5373\u5C06\u5237\u65B0"),l.current.reload()})},onCancel:function(){},children:(0,n.jsx)("a",{href:"#",children:"\u5220\u9664"})},"primary"),(0,n.jsxs)("a",{children:[" ","LOGO\u8BBE\u7F6E"]})];return p.push((0,n.jsxs)("a",{onClick:function(){r.status==1?Z.Enable(r.id).then(function(A){f.default.success("\u542F\u7528\u6210\u529F\uFF0C\u5373\u5C06\u5237\u65B0"),l.current.reload()}):Z.Disable(r.id).then(function(A){f.default.success("\u7981\u7528\u6210\u529F\uFF0C\u5373\u5C06\u5237\u65B0"),l.current.reload()})},children:[" ",r.status==0?"\u7981\u7528":"\u542F\u7528"]},"primary")),p}}];return(0,n.jsxs)(ne.ZP,{host:!0,header:{title:"",breadcrumb:{}},children:[(0,n.jsx)(re.ZP,{headerTitle:"\u4F01\u4E1A\u4FE1\u606F\u5217\u8868",actionRef:l,rowKey:"id",pagination:{defaultPageSize:10},search:{labelWidth:120},toolBarRender:function(){return[(0,n.jsxs)(W.Z,{type:"primary",onClick:function(){e(!0)},children:[(0,n.jsx)(ae.Z,{})," \u65B0\u5EFA"]},"primary")]},request:function(){var i=(0,F.Z)((0,d.Z)().mark(function o(r){var p,h;return(0,d.Z)().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return p=[],h=0,u.next=4,Z.companyPage(r).then(function(_){p=_.data.data,h=_.data.total});case 4:return u.abrupt("return",{data:p,success:!0,total:h});case 5:case"end":return u.stop()}},o)}));return function(o){return i.apply(this,arguments)}}(),columns:q,rowSelection:{onChange:function(o,r){J(r)}}}),(B==null?void 0:B.length)>0&&(0,n.jsx)(te.Z,{extra:(0,n.jsxs)("div",{children:["\u5DF2\u9009\u62E9"," ",(0,n.jsx)("a",{style:{fontWeight:600},children:B.length})," ","\u9879 \xA0\xA0"]}),children:(0,n.jsx)(K.Z,{type:"primary",title:"\u786E\u8BA4\u5220\u9664\u5417\uFF1F",okText:"\u662F",cancelText:"\u5426",onConfirm:function(){var o,r;pe(B),J([]),(o=l.current)===null||o===void 0||(r=o.reloadAndRest)===null||r===void 0||r.call(o)},onCancel:function(){},children:(0,n.jsx)("a",{href:"#",children:"\u6279\u91CF\u5220\u9664"})},"primary")}),(0,n.jsx)(le,{onFinish:function(){var i=(0,F.Z)((0,d.Z)().mark(function o(r){var p,h;return(0,d.Z)().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:if(h=!1,!r.id){u.next=7;break}return u.next=4,ve(r);case 4:h=u.sent,u.next=10;break;case 7:return u.next=9,he(r);case 9:h=u.sent;case 10:h&&(e(!1),j(void 0),l.current&&l.current.reload()),(p=l.current)===null||p===void 0||p.reload();case 12:case"end":return u.stop()}},o)}));return function(o){return i.apply(this,arguments)}}(),onCancel:function(){e(!1),b({})},modalVisible:g,values:D||{}}),D&&Object.keys(D).length?(0,n.jsx)(me,{treeData:Fe,onSubmit:function(){var i=(0,F.Z)((0,d.Z)().mark(function o(r){var p,h;return(0,d.Z)().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return p={sysRoleId:D.sysRoleId,sysMenuId:r},u.next=3,ye(p);case 3:h=u.sent,h&&(P(!1),b({}),l.current&&l.current.reload());case 5:case"end":return u.stop()}},o)}));return function(o){return i.apply(this,arguments)}}(),onCancel:function(){P(!1),b({})},modalVisible:O,values:xe||{}}):null,(0,n.jsx)(ee.Z,{width:600,visible:k,onClose:function(){j(void 0),I(!1)},closable:!1,children:(C==null?void 0:C.name)&&(0,n.jsx)(ue.ZP,{column:2,title:C==null?void 0:C.name,request:(0,F.Z)((0,d.Z)().mark(function i(){return(0,d.Z)().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",{data:C||{}});case 1:case"end":return r.stop()}},i)})),params:{id:C==null?void 0:C.name},columns:q})})]})},Ce=Ze}}]);