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

  1. (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[3976],{69513:function(Be,A,t){"use strict";t.r(A),t.d(A,{default:function(){return pe}});var Pe=t(57663),R=t(71577),Te=t(62350),$=t(24565),c=t(39428),be=t(34792),h=t(48086),U=t(11849),D=t(3182),j=t(2824),K=t(49101),m=t(67294),L=t(28790),N=t(85224),z=t(16894),Re=t(62255),Ae=t(71194),H=t(50146),We=t(43358),O=t(34041),Ve=t(77883),J=t(21888),Ye=t(62999),Q=t(85733),Ge=t(13062),S=t(71230),Me=t(89032),f=t(15746),$e=t(9715),o=t(55843),Ue=t(47673),C=t(4107),Ke=t(88983),W=t(47933),I=t(28991),X=t(81253),e=t(85893),w=t(22270),k=t(64893),q=t(31649),_=["fieldProps","options","radioType","layout","proFieldProps","valueEnum"],ee=m.forwardRef(function(r,s){var v=r.fieldProps,x=r.options,Z=r.radioType,E=r.layout,F=r.proFieldProps,B=r.valueEnum,T=(0,X.Z)(r,_);return(0,e.jsx)(q.Z,(0,I.Z)((0,I.Z)({valueType:Z==="button"?"radioButton":"radio",ref:s,valueEnum:(0,w.h)(B,void 0)},T),{},{fieldProps:(0,I.Z)({options:x,layout:E},v),proFieldProps:F,filedConfig:{customLightMode:!0}}))}),te=m.forwardRef(function(r,s){var v=r.fieldProps,x=r.children;return(0,e.jsx)(W.ZP,(0,I.Z)((0,I.Z)({},v),{},{ref:s,children:x}))}),ae=(0,k.G)(te,{valuePropName:"checked",ignoreWidth:!0}),P=ae;P.Group=ee,P.Button=W.ZP.Button,P.displayName="ProFormComponent";var ne=P,re=function(s){var v=(0,m.useState)(),x=(0,j.Z)(v,2),Z=x[0],E=x[1];return(0,e.jsx)(H.Z,{title:s.values.id?"\u7F16\u8F91\u83DC\u5355":"\u65B0\u5EFA\u83DC\u5355",width:1e3,visible:s.modalVisible,bodyStyle:{padding:"32px 40px 1px 48px"},footer:null,maskClosable:!1,onCancel:function(){s.onCancel()},destroyOnClose:!0,children:(0,e.jsxs)(o.Z,{preserve:!1,layout:"horizontal",labelCol:{span:4},initialValues:s.values,onFinish:s.onFinish,children:[(0,e.jsx)(o.Z.Item,{name:"id",hidden:!0,children:(0,e.jsx)(C.Z,{})}),(0,e.jsxs)(S.Z,{children:[(0,e.jsx)(f.Z,{span:12,children:(0,e.jsx)(o.Z.Item,{name:"code",label:"\u83DC\u5355\u7F16\u7801",rules:[{required:!0,max:255}],children:(0,e.jsx)(C.Z,{placeholder:"\u8BF7\u8F93\u5165\u83DC\u5355\u7F16\u7801"})})}),(0,e.jsx)(f.Z,{span:12,children:(0,e.jsx)(o.Z.Item,{name:"name",label:"\u83DC\u5355\u540D\u79F0",rules:[{required:!0,max:255}],children:(0,e.jsx)(C.Z,{placeholder:"\u8BF7\u8F93\u5165\u83DC\u5355\u540D\u79F0"})})})]}),(0,e.jsxs)(S.Z,{children:[(0,e.jsx)(f.Z,{span:12,children:(0,e.jsx)(o.Z.Item,{name:"router",label:"\u83DC\u5355\u8DEF\u5F84",children:(0,e.jsx)(C.Z,{placeholder:"\u8BF7\u8F93\u5165\u83DC\u5355\u540D\u79F0"})})}),(0,e.jsx)(f.Z,{span:12,children:(0,e.jsx)(o.Z.Item,{name:"pid",label:"\u4E0A\u7EA7\u83DC\u5355",children:(0,e.jsx)(Q.Z,{allowClear:!0,style:{width:"100%"},dropdownStyle:{maxHeight:400,overflow:"auto"},treeData:s.treeDatas,placeholder:"\u8BF7\u9009\u62E9\u4E0A\u7EA7\u83DC\u5355",treeDefaultExpandAll:!0})})})]}),(0,e.jsxs)(S.Z,{children:[(0,e.jsx)(f.Z,{span:12,children:(0,e.jsx)(o.Z.Item,{name:"component",label:"\u83DC\u5355\u7EC4\u4EF6",children:(0,e.jsx)(C.Z,{placeholder:"\u8BF7\u8F93\u5165\u83DC\u5355\u7EC4\u4EF6"})})}),(0,e.jsx)(f.Z,{span:12,children:(0,e.jsxs)(S.Z,{children:[(0,e.jsx)(f.Z,{span:12,children:(0,e.jsx)(o.Z.Item,{name:"sort",label:"\u6392\u5E8F",style:{marginLeft:"2.5em",overflow:"auto"},children:(0,e.jsx)(J.Z,{min:1,style:{marginLeft:"0.8em"}})})}),(0,e.jsx)(f.Z,{span:12,children:(0,e.jsx)(o.Z.Item,{name:"icon",label:"\u56FE\u6807",children:(0,e.jsx)(C.Z,{placeholder:"\u8BF7\u8F93\u5165\u83DC\u5355\u56FE\u6807"})})})]})})]}),(0,e.jsxs)(S.Z,{children:[(0,e.jsx)(f.Z,{span:12,children:(0,e.jsx)(o.Z.Item,{defaultValue:s.values.isAdmin,name:"isAdmin",label:"\u8D85\u7BA1\u83DC\u5355",rules:[{required:!0}],children:(0,e.jsx)(ne.Group,{initialValue:0,onChange:function(B){E(B.target.value)},options:[{label:"\u5426",value:0},{label:"\u662F",value:1}]})})}),(0,e.jsx)(f.Z,{span:12,children:(0,e.jsx)(o.Z.Item,{name:"type",label:"\u6240\u5C5E\u5E73\u53F0",children:(0,e.jsx)(O.Z,{placeholder:"\u8BF7\u9009\u62E9\u6240\u5C5E\u5E73\u53F0",mode:"multiple",allowClear:!0,options:[{value:"0",label:"\u56E2\u9910"},{value:"1",label:"\u95E8\u5E97"},{value:"2",label:"\u540E\u53A8"},{value:"3",label:"\u516C\u5171"}]})})})]}),(0,e.jsxs)(o.Z.Item,{children:[(0,e.jsx)(R.Z,{htmlType:"button",style:{float:"right",left:10},onClick:s.onCancel,children:"\u53D6\u6D88"}),(0,e.jsx)(R.Z,{type:"primary",htmlType:"submit",style:{float:"right"},children:"\u4FDD\u5B58"})]})]})})},ue=re,p=t(48971);function le(r){return(0,p.WY)("/saasbase/api\u200B/menu/getmenutreepage",{method:"post",data:r})}function se(r){return(0,p.WY)("/saasbase/api\u200B/menu/enable?Id=".concat(r))}function ie(r){return(0,p.WY)("/saasbase/api/menu/disable?Id=".concat(r))}function oe(r){return(0,p.WY)("/saasbase/api\u200B/menu/delete",{method:"post",data:r})}function de(r){return(0,p.WY)("/saasbase/api\u200B/menu/add",{method:"post",data:r})}function ce(r){return(0,p.WY)("/saasbase/api\u200B/menu/update",{method:"post",data:r})}function he(){return(0,p.WY)("\u200B/saasbase/api/menu/menutreesall",{method:"Get"})}function me(r){return(0,p.WY)("/saasbase/api/select/getdictvalue/?TypeCode=".concat(r))}var y={menutreepage:le,trees:he,enable:se,disable:ie,add:de,remove:oe,update:ce,getDicData:me},Le="Menu",fe=function(){var s=(0,m.useState)(),v=(0,j.Z)(s,2),x=v[0],Z=v[1],E=(0,m.useState)({}),F=(0,j.Z)(E,2),B=F[0],T=F[1],g=(0,m.useRef)(),ve=(0,m.useState)(),V=(0,j.Z)(ve,2),b=V[0],xe=V[1],Ze=(0,m.useState)(),Y=(0,j.Z)(Ze,2),ye=Y[0],je=Y[1],Ce=(0,m.useState)(),G=(0,j.Z)(Ce,2),Fe=G[0],Ne=G[1],ge=function(){var i=(0,D.Z)((0,c.Z)().mark(function a(u){return(0,c.Z)().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return u.type=u.type.join(","),n.next=3,y.add((0,U.Z)({},u)).then(function(d){d.succeeded?(h.default.success("\u6DFB\u52A0\u6210\u529F"),g.current.reload(),Z(!1)):h.default.error(d.errors)});case 3:case"end":return n.stop()}},a)}));return function(u){return i.apply(this,arguments)}}(),De=function(){var i=(0,D.Z)((0,c.Z)().mark(function a(u){return(0,c.Z)().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:u.type=u.type.join(","),y.update(u).then(function(d){d.succeeded?(h.default.success("\u66F4\u65B0\u6210\u529F"),g.current.reload(),Z(!1)):h.default.error(d.errors)});case 2:case"end":return n.stop()}},a)}));return function(u){return i.apply(this,arguments)}}(),M=function(){var i=(0,D.Z)((0,c.Z)().mark(function a(){return(0,c.Z)().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,y.trees().then(function(n){je(n.data)});case 2:case"end":return l.stop()}},a)}));return function(){return i.apply(this,arguments)}}();(0,m.useEffect)(function(){},[]);var Se=function(a){var u=[];return u.push((0,e.jsx)("a",{onClick:function(){M(),Z(!0),console.log("record.type",a.type),Array.isArray(a.type)||(a.type=a.type.split(",")),T(a)},children:"\u66F4\u65B0"})),a.status==1&&u.push((0,e.jsx)("a",{onClick:function(){y.enable(a.id).then(function(n){n.succeeded?(h.default.success("\u64CD\u4F5C\u6210\u529F"),g.current.reload()):h.default.error(n.errors)})},children:"\u542F\u7528"})),a.status==0&&u.push((0,e.jsx)("a",{onClick:function(){y.disable(a.id).then(function(n){n.succeeded?(h.default.success("\u64CD\u4F5C\u6210\u529F"),g.current.reload()):h.default.error(n.errors)})},children:"\u7981\u7528"})),u.push((0,e.jsx)($.Z,{type:"primary",title:"\u786E\u8BA4\u5220\u9664\u5417\uFF1F",okText:"\u662F",cancelText:"\u5426",onConfirm:function(){y.remove([a.id]).then(function(n){n.succeeded?(h.default.success("\u64CD\u4F5C\u6210\u529F"),g.current.reload()):h.default.error(n.errors)})},onCancel:function(){},children:(0,e.jsx)("a",{href:"#",children:"\u5220\u9664"})},"primary")),u},Ie=[{title:"\u4E3B\u952E",dataIndex:"id",tip:"key",hideInSearch:!0,hideInTable:!0},{title:"\u83DC\u5355\u540D\u79F0",dataIndex:"name",ellipsis:!0},{title:"\u6240\u5C5E\u5E73\u53F0",dataIndex:"typeName"},{title:"\u6240\u5C5E\u5E73\u53F0",dataIndex:"type",valueType:"select",ellipsis:!0,hideInTable:!0,valueEnum:{0:{text:"\u56E2\u9910"},1:{text:"\u95E8\u5E97"},2:{text:"\u540E\u53A8"},3:{text:"\u516C\u5171"}}},{title:"\u83DC\u5355\u7F16\u7801",dataIndex:"code",ellipsis:!0},{title:"\u6392\u5E8F",dataIndex:"sort",ellipsis:!0},{title:"\u83DC\u5355\u56FE\u6807",dataIndex:"icon",hideInSearch:!0},{title:"\u83DC\u5355\u8DEF\u5F84",dataIndex:"router",hideInSearch:!0,ellipsis:!0},{title:"\u72B6\u6001",dataIndex:"status",hideInSearch:!0,valueEnum:{0:{text:"\u542F\u7528",status:"Success"},1:{text:"\u7981\u7528",status:"Warning"}}},{title:"\u521B\u5EFA\u65F6\u95F4",dataIndex:"createAt",sorter:!0,hideInSearch:!0},{title:"\u64CD\u4F5C",dataIndex:"option",valueType:"option",fixed:"right",width:350,render:function(a,u){return Se(u)}}];return(0,e.jsxs)(L.ZP,{ghost:!0,header:{title:"",breadcrumb:{}},children:[(0,e.jsx)(z.ZP,{style:{marginTop:"20px"},headerTitle:"\u83DC\u5355\u5217\u8868",actionRef:g,rowKey:"id",pagination:{defaultPageSize:10},search:{labelWidth:120},toolBarRender:function(){return(0,e.jsxs)(R.Z,{type:"primary",onClick:function(){M(),Z(!0)},children:[(0,e.jsx)(K.Z,{})," \u65B0\u5EFA"]},"primary1")},request:function(){var i=(0,D.Z)((0,c.Z)().mark(function a(u){var l;return(0,c.Z)().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return l=[],d.next=3,y.menutreepage(u).then(function(Ee){l=Ee.data,console.log("UserData",l)});case 3:return d.abrupt("return",{data:l,success:!0});case 4:case"end":return d.stop()}},a)}));return function(a){return i.apply(this,arguments)}}(),columns:Ie,rowSelection:{onChange:function(a,u){xe(u)},checkStrictly:!1}}),(b==null?void 0:b.length)>0&&(0,e.jsx)(N.Z,{extra:(0,e.jsxs)("div",{children:["\u5DF2\u9009\u62E9"," ",(0,e.jsx)("a",{style:{fontWeight:600},children:b.length})," ","\u9879"]})}),(0,e.jsx)(ue,{treeDatas:ye,dictData:Fe,onFinish:function(){var i=(0,D.Z)((0,c.Z)().mark(function a(u){return(0,c.Z)().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(!u.id){n.next=5;break}return n.next=3,De(u);case 3:n.next=7;break;case 5:return n.next=7,ge(u);case 7:case"end":return n.stop()}},a)}));return function(a){return i.apply(this,arguments)}}(),onCancel:function(){Z(!1),T({})},modalVisible:x,values:B||{}})]})},pe=fe}}]);