Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.
 
 
 

2 рядки
12 KiB

  1. (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[579],{40335:function(j,M,n){"use strict";n.r(M);var y=n(57338),a=n(273),d=n(57663),e=n(71577),_=n(13062),p=n(71230),i=n(89032),h=n(15746),S=n(47673),c=n(4107),O=n(57106),B=n(6129),K=n(43358),v=n(34041),m=n(39428),F=n(34792),g=n(48086),I=n(3182),U=n(9715),P=n(71257),C=n(2824),E=n(67294),de=n(16894),Y=n(3996),se=n(9669),oe=n.n(se),b=n(66050),ue=n(48971),t=n(85893),ie=function(){var L=(0,E.useRef)(),le=P.Z.useForm(),ce=(0,C.Z)(le,1),k=ce[0],_e=(0,E.useState)([]),N=(0,C.Z)(_e,2),W=N[0],me=N[1],fe=(0,E.useState)(""),z=(0,C.Z)(fe,2),T=z[0],Ee=z[1],he=(0,E.useState)(""),w=(0,C.Z)(he,2),x=w[0],Pe=w[1],pe=(0,E.useState)(1),$=(0,C.Z)(pe,2),Oe=$[0],ve=$[1],ge=(0,E.useState)(100),H=(0,C.Z)(ge,2),V=H[0],Le=H[1],Ce=(0,E.useState)(!1),J=(0,C.Z)(Ce,2),Ie=J[0],Z=J[1],ye=[{title:"\u6863\u53E3\u540D\u79F0",dataIndex:"name",ellipsis:!0},{title:"\u5F52\u5C5E\u95E8\u5E97",dataIndex:"storeId",render:function(r,u){var s=W.find(function(f){return f.id===u.storeId});if(s)return(0,t.jsx)("div",{children:s.store_Name})}},{title:"\u5C5E\u6027",dataIndex:"mode",valueType:"select",valueEnum:{1:{text:"\u56FA\u5B9A",status:"Success"},2:{text:"\u81EA\u7531\u8BBE\u5B9A",status:"Success"}}},{title:"\u91D1\u989D",dataIndex:"price"},{title:"\u72B6\u6001",dataIndex:"status",valueType:"select",valueEnum:{0:{text:"\u6B63\u5E38",status:"Success"},1:{text:"\u7981\u7528",status:"Error"},2:{text:"\u5220\u9664",status:"Error"}}},{title:"\u64CD\u4F5C",valueType:"option",key:"option",render:function(r,u,s,f){return[(0,t.jsx)("a",{onClick:function(){return Me(u)},children:"\u66F4\u65B0"})]}}],Me=function(r){Z(!0),te(r.remaek),k.setFieldsValue(r)},Se=(0,E.useState)(null),Q=(0,C.Z)(Se,2),G=Q[0],X=Q[1],Te=(0,E.useState)(""),q=(0,C.Z)(Te,2),ee=q[0],te=q[1],De={},be={placeholder:"\u8BF7\u8F93\u5165\u5927\u5C4F\u6A2A\u5E45...",MENU_CONF:{fontSize:{fontSizeList:["10px","20px","40px","60px","80px","100px","150px","180px","200px"]},uploadImage:{customUpload:function(r,u){return(0,I.Z)((0,m.Z)().mark(function s(){var f,D,l;return(0,m.Z)().wrap(function(R){for(;;)switch(R.prev=R.next){case 0:f=r.name.lastIndexOf("."),D=r.name.substr(f+1),l=null,b.Z.GetCosRequestURL({directory:"kitchen",fileExtension:D,method:"PUT"}).then(function(A){var Ae=A.allUrl,ae=new FileReader;ae.readAsArrayBuffer(r),ae.onload=function(Be){l=Be.target.result,oe().put(Ae,l).then(function(re){(re.status==200||re.statusText=="OK")&&(u(A.seeUrl,A.seeUrl,A.seeUrl),g.default.success("\u4E0A\u4F20\u6210\u529F\uFF01"))})}});case 4:case"end":return R.stop()}},s)}))()}}}},xe=function(){var o=(0,I.Z)((0,m.Z)().mark(function r(){var u,s,f;return(0,m.Z)().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:if(u=ue.m8.location.query.storeId,!u){l.next=6;break}return l.next=4,b.Z.GetAllStore();case 4:s=l.sent,s.isSuccess?(me(s.data),f=s.data.find(function(ne){return ne.id===u}),f&&(Pe(f.companyId),Ee(f.id))):g.default.error(s.msg||"\u83B7\u53D6\u5E97\u94FA\u5217\u8868\u5931\u8D25");case 6:case"end":return l.stop()}},r)}));return function(){return o.apply(this,arguments)}}(),Ge=function(){var o=(0,I.Z)((0,m.Z)().mark(function r(u){var s,f;return(0,m.Z)().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:if(!u.id){l.next=6;break}return u.remaek=ee,l.next=4,b.Z.UpdateGateInfoNew(u,x);case 4:s=l.sent,s.statusCode===200?(g.default.success("\u66F4\u65B0\u6863\u53E3\u6210\u529F\uFF01"),Z(!1),(f=L.current)===null||f===void 0||f.reload()):g.default.error(s.errors||"\u66F4\u65B0\u6863\u53E3\u5931\u8D25");case 6:case"end":return l.stop()}},r)}));return function(u){return o.apply(this,arguments)}}();return(0,E.useEffect)(function(){return function(){G!=null&&(G.destroy(),X(null))}},[G]),(0,E.useEffect)(function(){xe()},[T]),(0,E.useEffect)(function(){var o;(o=L.current)===null||o===void 0||o.reload()},[x]),(0,t.jsxs)("div",{children:[T?(0,t.jsx)(de.ZP,{columns:ye,actionRef:L,request:(0,I.Z)((0,m.Z)().mark(function o(){var r;return(0,m.Z)().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:if(!(T&&x)){s.next=6;break}return s.next=3,b.Z.GetGateListByStorePageNew(T,Oe,V,x);case 3:if(r=s.sent,r.statusCode!==200){s.next=6;break}return s.abrupt("return",{data:r.data.data.data,success:!0,total:r.data.total});case 6:case"end":return s.stop()}},o)})),cardBordered:!0,editable:{type:"multiple"},rowKey:"id",search:!1,options:{setting:{listsHeight:400}},pagination:{pageSize:V,onChange:function(r){return ve(r)}},dateFormatter:"string",headerTitle:"\u6863\u53E3\u7BA1\u7406",toolBarRender:function(){return[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,t.jsx)("div",{children:"\u5F53\u524D\u95E8\u5E97\uFF1A"}),(0,t.jsx)(v.Z,{style:{width:300},value:T,disabled:!0,children:W.map(function(r){return(0,t.jsx)(Option,{value:r.id,children:r.store_Name},r.id)})})]})]}}):(0,t.jsx)(B.ZP,{status:"404",title:"\u95E8\u5E97ID\u9519\u8BEF",subTitle:"\u8BF7\u68C0\u67E5URL\u4E2D storeId\u662F\u5426\u6B63\u786E"}),(0,t.jsx)(a.Z,{destroyOnClose:!0,width:"100%",title:"\u7F16\u8F91\u6863\u53E3",visible:Ie,onClose:function(){return Z(!1)},children:(0,t.jsxs)(P.Z,{name:"basic",onFinish:Ge,form:k,labelCol:{span:4},children:[(0,t.jsx)(P.Z.Item,{label:"id",name:"id",hidden:!0,children:(0,t.jsx)(c.Z,{size:"large"})}),(0,t.jsxs)("div",{style:{border:"1px solid #ccc",zIndex:100,marginBottom:"10px"},children:[(0,t.jsx)(Y.o,{editor:G,defaultConfig:De,mode:"default",style:{borderBottom:"1px solid #ccc"}}),(0,t.jsx)(Y.M,{defaultConfig:be,value:ee,onCreated:X,onChange:function(r){return te(r.getHtml())},mode:"default",style:{height:"700px"}})]}),(0,t.jsxs)(p.Z,{children:[(0,t.jsx)(h.Z,{xs:12,sm:12,md:12,lg:12,xl:12,children:(0,t.jsx)(P.Z.Item,{label:"\u6863\u53E3\u540D\u79F0",name:"name",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6863\u53E3\u540D\u79F0\uFF01"}],children:(0,t.jsx)(c.Z,{size:"large"})})}),(0,t.jsx)(h.Z,{xs:12,sm:12,md:12,lg:12,xl:12,children:(0,t.jsx)(P.Z.Item,{label:"\u5F52\u5C5E\u95E8\u5E97",name:"storeId",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5F52\u5C5E\u95E8\u5E97\uFF01"}],children:(0,t.jsx)(v.Z,{size:"large",disabled:!0,children:W.map(function(o){return(0,t.jsx)(v.Z.Option,{value:o.id,children:o.store_Name},o.id)})})})}),(0,t.jsx)(h.Z,{xs:12,sm:12,md:12,lg:12,xl:12,children:(0,t.jsx)(P.Z.Item,{label:"\u5C5E\u6027",name:"mode",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u9009\u62E9\u5C5E\u6027\uFF01"}],children:(0,t.jsxs)(v.Z,{size:"large",children:[(0,t.jsx)(v.Z.Option,{value:1,children:"\u56FA\u5B9A\u91D1\u989D"}),(0,t.jsx)(v.Z.Option,{value:2,children:"\u81EA\u7531\u8BBE\u5B9A"})]})})}),(0,t.jsx)(h.Z,{xs:12,sm:12,md:12,lg:12,xl:12,children:(0,t.jsx)(P.Z.Item,{noStyle:!0,shouldUpdate:function(r,u){return r.mode!==u.mode},children:function(r){var u=r.getFieldValue;return u("mode")=="1"?(0,t.jsx)(P.Z.Item,{label:"\u91D1\u989D",name:"price",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u91D1\u989D\uFF01"}],children:(0,t.jsx)(c.Z,{size:"large"})}):null}})}),(0,t.jsx)(h.Z,{xs:12,sm:12,md:12,lg:12,xl:12,children:(0,t.jsx)(P.Z.Item,{label:"\u72B6\u6001",name:"status",children:(0,t.jsxs)(v.Z,{size:"large",defaultValue:1,children:[(0,t.jsx)(Option,{value:0,children:"\u6B63\u5E38"}),(0,t.jsx)(Option,{value:1,children:"\u7981\u7528"})]})})})]}),(0,t.jsx)(P.Z.Item,{children:(0,t.jsx)(e.Z,{type:"primary",htmlType:"submit",style:{marginTop:"10px",marginLeft:"auto"},children:"\u786E\u5B9A"})})]})})]})};M.default=ie},66050:function(j,M,n){"use strict";var y=n(11849),a=n(48971);M.Z={GetAllStore:function(){return(0,a.WY)("/kitchen/api/StoreHelper/GetAllStore",{method:"GET",headers:{TenantId:""}})},GetMemberListByPage:function(e){return(0,a.WY)("/kitchen/api/member/member-page-query",{method:"POST",data:e})},OnBindMember:function(e){return(0,a.WY)("/kitchen/api/member/member-binding-cards",{method:"POST",data:e})},GetMemberAccountCardConsRecord:function(e){return(0,a.WY)("/kitchen/api/member/member-account-amount-page",{method:"POST",data:e})},GetMemberAccountRecordTotal:function(e){return(0,a.WY)("/kitchen/api/member/member-account-record-total",{method:"POST",data:e})},AddGate:function(e){return(0,a.WY)("/kitchen/api/GateInfo/add",{method:"POST",data:e})},EnableGate:function(e){var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return(0,a.WY)("/kitchen/api/GateInfo/Enable",{method:"POST",data:e,headers:{TenantId:_}})},GetGateListByStorePage:function(e,_,p){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"";return(0,a.WY)("/kitchen/api/GateInfo/gatelist?StoreId=".concat(e,"&Current=").concat(_,"&PageSize=").concat(p),{method:"GET",headers:{TenantId:i}})},GetGateListByStorePageNew:function(e,_,p){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"";return(0,a.WY)("/kitchen/api/one-card/gate-list?StoreId=".concat(e,"&Current=").concat(_,"&PageSize=").concat(p),{method:"GET",headers:{TenantId:i}})},GetGateListByStoreList:function(e){return(0,a.WY)("/kitchen/api/GateInfo/gatealllist?StoreId=".concat(e),{method:"GET"})},UpdateGateInfo:function(e){var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return(0,a.WY)("/kitchen/api/GateInfo/Update",{method:"POST",data:e,headers:{TenantId:_}})},UpdateGateInfoNew:function(e){var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return(0,a.WY)("/kitchen/api/one-card",{method:"PUT",data:e,headers:{TenantId:_}})},PayCardAdd:function(e){return(0,a.WY)("/kitchen/api/PayCard/add",{method:"POST",data:e})},PayCardEnable:function(e){return(0,a.WY)("/kitchenapi/PayCard/enable",{method:"POST",data:e})},PayCardByGateId:function(e,_,p){return(0,a.WY)("/kitchen/api/PayCard/gateList?GateId=".concat(e,"&Current=").concat(_,"&PageSize=").concat(p),{method:"GET"})},UpdatePayCardInfo:function(e){return(0,a.WY)("/kitchen/api/PayCard/update",{method:"POST",data:e})},GetCosRequestURL:function(e){return(0,a.WY)("/kitchen/api/systemconfig/GetCosRequestSignURL",{method:"POST",data:e})},GetMemberAccountPageList:function(e){return(0,a.WY)("/kitchen/api/member/member-account-page-list",{method:"POST",data:e})},UpdateMemberAccountStatus:function(e){return(0,a.WY)("/kitchen/api/member/member-account-status",{method:"POST",data:e})},GetMemberCardPageList:function(e){return(0,a.WY)("/kitchen/api/member/mmenber-card-page",{method:"POST",data:e})},AddMemberCard:function(e){return(0,a.WY)("/kitchen/api/member/mmenber-card",{method:"POST",data:e})},UpdateMemberCardState:function(e){return(0,a.WY)("/kitchen/api/member/mmenber-card-state",{method:"PUT",data:e})},GetDicList:function(e){return(0,a.WY)("/kitchen/api/dict-data/dic-list/".concat(e),{method:"Get"})},AddGateSetUp:function(e){return(0,a.WY)("/kitchen/api/GateInfo/AddGateSetUp",{method:"POST",data:e})},GetFoodList:function(e){return(0,a.WY)("/kitchen/api/dict-data/dic-list/".concat(e),{method:"Get"})},AddGateFood:function(e){return(0,a.WY)("/kitchen/api/GateInfo/AddGateFood",{method:"POST",data:e})},GetGoodsByMenuIdPage:function(e){return(0,a.WY)("/kitchen/api/FoodMenu/GetGoodsByMenuIdPage",{method:"POST",data:(0,y.Z)({},e)})}}},34952:function(j,M,n){"use strict";var y=n(22122),a=n(15105),d=n(67294),e=function(i,h){var S={};for(var c in i)Object.prototype.hasOwnProperty.call(i,c)&&h.indexOf(c)<0&&(S[c]=i[c]);if(i!=null&&typeof Object.getOwnPropertySymbols=="function")for(var O=0,c=Object.getOwnPropertySymbols(i);O<c.length;O++)h.indexOf(c[O])<0&&Object.prototype.propertyIsEnumerable.call(i,c[O])&&(S[c[O]]=i[c[O]]);return S},_={border:0,background:"transparent",padding:0,lineHeight:"inherit",display:"inline-block"},p=d.forwardRef(function(i,h){var S=function(g){var I=g.keyCode;I===a.Z.ENTER&&g.preventDefault()},c=function(g){var I=g.keyCode,U=i.onClick;I===a.Z.ENTER&&U&&U()},O=i.style,B=i.noStyle,K=i.disabled,v=e(i,["style","noStyle","disabled"]),m={};return B||(m=(0,y.Z)({},_)),K&&(m.pointerEvents="none"),m=(0,y.Z)((0,y.Z)({},m),O),d.createElement("div",(0,y.Z)({role:"button",tabIndex:0,ref:h},v,{onKeyDown:S,onKeyUp:c,style:m}))});M.Z=p}}]);