Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
 
 
 

2 rader
9.9 KiB

  1. (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[7578,7975,1322],{94339:function(b){b.exports={table_search_item:"table_search_item___3IyYw"}},54581:function(b,M,n){"use strict";n.r(M);var L=n(71194),r=n(50146),s=n(77883),e=n(85986),l=n(47673),_=n(4107),T=n(57663),y=n(71577),Ce=n(43358),g=n(34041),P=n(39428),Oe=n(34792),p=n(48086),I=n(3182),Ge=n(9715),m=n(55843),h=n(2824),c=n(67294),z=n(94339),A=n.n(z),$=n(78009),w=n(49101),V=n(16894),C=n(66050),t=n(85893),H=function(){var O=(0,c.useRef)(),J=m.Z.useForm(),Q=(0,h.Z)(J,1),G=Q[0],X=(0,c.useState)(!1),W=(0,h.Z)(X,2),q=W[0],S=W[1],ee=(0,c.useState)({id:""}),Z=(0,h.Z)(ee,2),te=Z[0],ae=Z[1],ne=(0,c.useState)([]),R=(0,h.Z)(ne,2),re=R[0],se=R[1],de=(0,c.useState)(""),U=(0,h.Z)(de,2),ue=U[0],j=U[1],ie=(0,c.useState)([]),x=(0,h.Z)(ie,2),D=x[0],oe=x[1],le=(0,c.useState)(""),F=(0,h.Z)(le,2),v=F[0],B=F[1],ce=(0,c.useState)(1),K=(0,h.Z)(ce,2),_e=K[0],me=K[1],he=(0,c.useState)(10),Y=(0,h.Z)(he,2),k=Y[0],Me=Y[1],fe=function(a){ae(a),S(!0),G.setFieldsValue(a)},Pe=function(){S(!0),G.resetFields(),G.setFieldValue("sleepTime",10),G.setFieldValue("status",1)},Te=function(a){console.log("\u5220\u9664",a)},Ee=function(){var i=(0,I.Z)((0,P.Z)().mark(function a(d){var u,o;return(0,P.Z)().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:if(!d.id){f.next=7;break}return f.next=3,C.Z.UpdatePayCardInfo(d);case 3:u=f.sent,u.statusCode===200?(S(!1),p.default.success("\u66F4\u65B0\u6210\u529F\uFF01"),O.current.reload()):p.default.error(u.error||"\u66F4\u65B0\u8BBE\u5907\u5931\u8D25"),f.next=11;break;case 7:return f.next=9,C.Z.PayCardAdd(d);case 9:o=f.sent,o.statusCode===200?(S(!1),p.default.success("\u65B0\u589E\u6210\u529F\uFF01"),O.current.reload()):p.default.error(o.error||"\u65B0\u589E\u8BBE\u5907\u5931\u8D25");case 11:case"end":return f.stop()}},a)}));return function(d){return i.apply(this,arguments)}}(),pe=[{title:"\u8BBE\u5907\u540D\u79F0",dataIndex:"name",ellipsis:!0},{title:"\u5F52\u5C5E\u6863\u53E3",dataIndex:"gateId",render:function(a,d){var u=D.find(function(o){return o.id===d.gateId});return(0,t.jsx)("div",{children:u?u.name:"\u9ED8\u8BA4\u6863\u53E3"})}},{title:"\u8BBE\u5907\u5730\u5740",dataIndex:"address",ellipsis:!0},{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:"\u95F4\u9694\u65F6\u95F4",dataIndex:"sleepTime"},{title:"\u64CD\u4F5C",valueType:"option",key:"option",render:function(a,d,u,o){return[(0,t.jsx)("a",{onClick:function(){return fe(d)},children:"\u7F16\u8F91"})]}}],ge=function(){var i=(0,I.Z)((0,P.Z)().mark(function a(){var d;return(0,P.Z)().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,C.Z.GetAllStore();case 2:d=o.sent,d.isSuccess?(se(d.data),j(d.data[0].id),N(d.data[0].id)):p.default.error(d.msg||"\u83B7\u53D6\u5E97\u94FA\u5217\u8868\u5931\u8D25");case 4:case"end":return o.stop()}},a)}));return function(){return i.apply(this,arguments)}}(),N=function(){var i=(0,I.Z)((0,P.Z)().mark(function a(d){var u;return(0,P.Z)().wrap(function(E){for(;;)switch(E.prev=E.next){case 0:return E.next=2,C.Z.GetGateListByStoreList(d);case 2:u=E.sent,u.statusCode===200?(u.data.length>0&&(oe(u.data),B(u.data[0].id)),O.current.reload()):p.default.error(u.error||"\u83B7\u53D6\u6863\u53E3\u5217\u8868\u5931\u8D25");case 4:case"end":return E.stop()}},a)}));return function(d){return i.apply(this,arguments)}}();return(0,c.useEffect)(function(){ge()},[]),(0,t.jsx)($.ZP,{children:(0,t.jsxs)("div",{className:A().member_card_container,children:[(0,t.jsx)(V.ZP,{columns:pe,actionRef:O,request:(0,I.Z)((0,P.Z)().mark(function i(){var a;return(0,P.Z)().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:if(console.log("selectedGate",v),!v){u.next=7;break}return u.next=4,C.Z.PayCardByGateId(v,_e,k);case 4:if(a=u.sent,a.statusCode!==200){u.next=7;break}return u.abrupt("return",{data:a.data.data,success:!0,total:a.data.total});case 7:case"end":return u.stop()}},i)})),cardBordered:!0,editable:{type:"multiple"},rowKey:"id",search:!1,options:{setting:{listsHeight:400}},pagination:{pageSize:k,onChange:function(a){return me(a)}},dateFormatter:"string",headerTitle:"\u5237\u5361\u673A\u7BA1\u7406",toolBarRender:function(){return[(0,t.jsxs)("div",{className:A().table_search_item,children:[(0,t.jsx)("div",{children:"\u5F53\u524D\u95E8\u5E97\uFF1A"}),(0,t.jsx)(g.Z,{style:{width:300},value:ue,onChange:function(d){j(d),N(d),B({})},children:re.map(function(a){return(0,t.jsx)(Option,{value:a.id,children:a.store_Name},a.id)})})]}),(0,t.jsxs)("div",{className:A().table_search_item,children:[(0,t.jsx)("div",{children:"\u5F53\u524D\u6863\u53E3\uFF1A"}),(0,t.jsx)(g.Z,{style:{width:300},value:v,onChange:function(d){B(d),O.current.reload()},children:D.map(function(a){return(0,t.jsx)(Option,{value:a.id,children:a.name},a.id)})})]}),(0,t.jsx)(y.Z,{icon:(0,t.jsx)(w.Z,{}),type:"primary",onClick:Pe,children:"\u65B0\u5EFA"},"button")]}}),(0,t.jsx)(r.Z,{width:600,title:te.id?"\u7F16\u8F91\u5237\u5361\u673A":"\u6DFB\u52A0\u5237\u5361\u673A",visible:q,footer:!1,onCancel:function(){return S(!1)},children:(0,t.jsxs)(m.Z,{name:"basic",onFinish:Ee,form:G,labelCol:{span:4},children:[(0,t.jsx)(m.Z.Item,{label:"id",name:"id",hidden:!0,children:(0,t.jsx)(_.Z,{})}),(0,t.jsx)(m.Z.Item,{label:"\u8BBE\u5907\u540D\u79F0",name:"name",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6863\u53E3\u540D\u79F0\uFF01"}],children:(0,t.jsx)(_.Z,{})}),(0,t.jsx)(m.Z.Item,{label:"\u5F52\u5C5E\u6863\u53E3",name:"gateId",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5F52\u5C5E\u95E8\u5E97\uFF01"}],children:(0,t.jsx)(g.Z,{children:D.map(function(i){return(0,t.jsx)(g.Z.Option,{value:i.id,children:i.name},i.id)})})}),(0,t.jsx)(m.Z.Item,{label:"\u72B6\u6001",name:"status",children:(0,t.jsxs)(g.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)(m.Z.Item,{label:"\u95F4\u9694\u65F6\u95F4",name:"sleepTime",children:(0,t.jsx)(e.Z,{min:0})}),(0,t.jsx)(m.Z.Item,{label:"\u8BBE\u5907\u5730\u5740",name:"address",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6863\u53E3\u540D\u79F0\uFF01"},{pattern:new RegExp(/[0-9A-Fa-f]{2}/,"g"),message:"\u8BF7\u8F93\u516516\u8FDB\u5236\uFF01"}],children:(0,t.jsx)(_.Z,{})}),(0,t.jsx)(m.Z.Item,{children:(0,t.jsx)(y.Z,{type:"primary",htmlType:"submit",children:"\u786E\u5B9A"})})]})})]})})};M.default=H},66050:function(b,M,n){"use strict";var L=n(11849),r=n(48971);M.Z={GetAllStore:function(){return(0,r.WY)("/kitchen/api/StoreHelper/GetAllStore",{method:"GET",headers:{TenantId:""}})},GetMemberListByPage:function(e){return(0,r.WY)("/kitchen/api/member/member-page-query",{method:"POST",data:e})},OnBindMember:function(e){return(0,r.WY)("/kitchen/api/member/member-binding-cards",{method:"POST",data:e})},GetMemberAccountCardConsRecord:function(e){return(0,r.WY)("/kitchen/api/member/member-account-amount-page",{method:"POST",data:e})},GetMemberAccountRecordTotal:function(e){return(0,r.WY)("/kitchen/api/member/member-account-record-total",{method:"POST",data:e})},AddGate:function(e){return(0,r.WY)("/kitchen/api/GateInfo/add",{method:"POST",data:e})},EnableGate:function(e){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return(0,r.WY)("/kitchen/api/GateInfo/Enable",{method:"POST",data:e,headers:{TenantId:l}})},GetGateListByStorePage:function(e,l,_){var T=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"";return(0,r.WY)("/kitchen/api/GateInfo/gatelist?StoreId=".concat(e,"&Current=").concat(l,"&PageSize=").concat(_),{method:"GET",headers:{TenantId:T}})},GetGateListByStorePageNew:function(e,l,_){var T=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"";return(0,r.WY)("/kitchen/api/one-card/gate-list?StoreId=".concat(e,"&Current=").concat(l,"&PageSize=").concat(_),{method:"GET",headers:{TenantId:T}})},GetGateListByStoreList:function(e){return(0,r.WY)("/kitchen/api/GateInfo/gatealllist?StoreId=".concat(e),{method:"GET"})},UpdateGateInfo:function(e){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return(0,r.WY)("/kitchen/api/GateInfo/Update",{method:"POST",data:e,headers:{TenantId:l}})},UpdateGateInfoNew:function(e){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return(0,r.WY)("/kitchen/api/one-card",{method:"PUT",data:e,headers:{TenantId:l}})},PayCardAdd:function(e){return(0,r.WY)("/kitchen/api/PayCard/add",{method:"POST",data:e})},PayCardEnable:function(e){return(0,r.WY)("/kitchenapi/PayCard/enable",{method:"POST",data:e})},PayCardByGateId:function(e,l,_){return(0,r.WY)("/kitchen/api/PayCard/gateList?GateId=".concat(e,"&Current=").concat(l,"&PageSize=").concat(_),{method:"GET"})},UpdatePayCardInfo:function(e){return(0,r.WY)("/kitchen/api/PayCard/update",{method:"POST",data:e})},GetCosRequestURL:function(e){return(0,r.WY)("/kitchen/api/systemconfig/GetCosRequestSignURL",{method:"POST",data:e})},GetMemberAccountPageList:function(e){return(0,r.WY)("/kitchen/api/member/member-account-page-list",{method:"POST",data:e})},UpdateMemberAccountStatus:function(e){return(0,r.WY)("/kitchen/api/member/member-account-status",{method:"POST",data:e})},GetMemberCardPageList:function(e){return(0,r.WY)("/kitchen/api/member/mmenber-card-page",{method:"POST",data:e})},AddMemberCard:function(e){return(0,r.WY)("/kitchen/api/member/mmenber-card",{method:"POST",data:e})},UpdateMemberCardState:function(e){return(0,r.WY)("/kitchen/api/member/mmenber-card-state",{method:"PUT",data:e})},GetDicList:function(e){return(0,r.WY)("/kitchen/api/dict-data/dic-list/".concat(e),{method:"Get"})},AddGateSetUp:function(e){return(0,r.WY)("/kitchen/api/GateInfo/AddGateSetUp",{method:"POST",data:e})},GetFoodList:function(e){return(0,r.WY)("/kitchen/api/dict-data/dic-list/".concat(e),{method:"Get"})},AddGateFood:function(e){return(0,r.WY)("/kitchen/api/GateInfo/AddGateFood",{method:"POST",data:e})},GetGoodsByMenuIdPage:function(e){return(0,r.WY)("/kitchen/api/FoodMenu/GetGoodsByMenuIdPage",{method:"POST",data:(0,L.Z)({},e)})}}}}]);