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

  1. (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[3113],{3044:function(){},27800:function(Ie,F,r){"use strict";r.r(F),r.d(F,{default:function(){return q}});var Me=r(57338),H=r(83107),K=r(11849),Fe=r(71194),w=r(50146),Oe=r(43358),l=r(34041),Pe=r(47673),O=r(4107),Ee=r(57663),P=r(71577),Te=r(94233),E=r(51890),f=r(39428),Ae=r(34792),v=r(48086),x=r(3182),Re=r(9715),m=r(55843),o=r(2824),c=r(67294),Q=r(3044),J=r.n(Q),X=r(28790),T=r(89366),A=r(49101),R=r(16894),p=r(48971),S=r(96690),C={GetMemberCardPageList:function(u){return(0,p.WY)((0,S.zr)()+"/api/StoredValueCard/GetMmenberCardPage",{method:"POST",data:u})},AddMemberCard:function(u){return(0,p.WY)((0,S.zr)()+"/api/StoredValueCard/AddMmenberCard",{method:"POST",data:u})},UpdateMemberCardState:function(u){return(0,p.WY)((0,S.zr)()+"/api/StoredValueCard/UpdateMmenberCardState",{method:"PUT",data:u})},GetMemberListByPage:function(u){return(0,p.WY)((0,S.zr)()+"/api/MemberInfoService/GetMemberPageQuery",{method:"POST",data:u})},OnBindMember:function(u){return(0,p.WY)((0,S.zr)()+"/api/StoredValueCard/MemberBindingCards",{method:"POST",data:u})}},e=r(85893),k=function(){var u=(0,c.useRef)(),_=m.Z.useForm(),ee=(0,o.Z)(_,1),b=ee[0],te=(0,c.useState)(!1),U=(0,o.Z)(te,2),re=U[0],Z=U[1],ae=(0,c.useState)({id:""}),V=(0,o.Z)(ae,2),j=V[0],B=V[1],ne=(0,c.useState)(1),z=(0,o.Z)(ne,2),Ue=z[0],se=z[1],ue=(0,c.useState)(10),G=(0,o.Z)(ue,2),de=G[0],Ve=G[1],le=(0,c.useState)(0),D=(0,o.Z)(le,2),ze=D[0],Ge=D[1],ie=(0,c.useState)(!1),L=(0,o.Z)(ie,2),oe=L[0],y=L[1],ce=(0,c.useState)(1),W=(0,o.Z)(ce,2),De=W[0],me=W[1],he=(0,c.useState)(10),$=(0,o.Z)(he,2),fe=$[0],Le=$[1],ve=(0,c.useState)(0),N=(0,o.Z)(ve,2),We=N[0],pe=N[1],Se=(0,c.useState)([]),Y=(0,o.Z)(Se,2),I=Y[0],M=Y[1],Ce=function(t){b.setFieldsValue(t),B(t),Z(!0)},ge=function(){b.resetFields(),B({id:""}),Z(!0)},Ze=function(t){y(!0),B(t),M([]),t.memberInfoId&&M([t.memberInfoId])},xe=function(){var n=(0,x.Z)((0,f.Z)().mark(function t(){var a;return(0,f.Z)().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:if(I.length!==0){d.next=3;break}return v.default.info("\u8BF7\u9009\u62E9\u8981\u7ED1\u5B9A\u7684\u4F1A\u5458"),d.abrupt("return");case 3:return d.next=5,C.OnBindMember({memberInfoId:I[0],memberCardId:j.id});case 5:a=d.sent,a.data===!0?(v.default.success("\u7ED1\u5B9A\u6210\u529F"),u.current.reloadAndRest(),y(!1)):v.default.error(a.errors||"\u7ED1\u5B9A\u5931\u8D25");case 7:case"end":return d.stop()}},t)}));return function(){return n.apply(this,arguments)}}(),$e=function(t){console.log("\u5220\u9664",t)},be=function(){var n=(0,x.Z)((0,f.Z)().mark(function t(a){var i,d;return(0,f.Z)().wrap(function(h){for(;;)switch(h.prev=h.next){case 0:if(!a.id){h.next=7;break}return h.next=3,C.UpdateMemberCardState({id:a.id,type:a.type,state:a.state});case 3:i=h.sent,i.statusCode===200?(v.default.success("\u66F4\u65B0\u6210\u529F"),Z(!1),u.current.reloadAndRest()):v.default.error(i.errors||"\u66F4\u65B0\u50A8\u503C\u5361\u5931\u8D25"),h.next=11;break;case 7:return h.next=9,C.AddMemberCard({type:a.type,state:1});case 9:d=h.sent,d.statusCode===200?(v.default.success("\u6DFB\u52A0\u6210\u529F"),Z(!1),u.current.reloadAndRest()):v.default.error(d.errors||"\u6DFB\u52A0\u50A8\u503C\u5361\u5931\u8D25");case 11:case"end":return h.stop()}},t)}));return function(a){return n.apply(this,arguments)}}(),je=[{title:"\u5361\u53F7",dataIndex:"cardNum",ellipsis:!0},{title:"\u4F1A\u5458\u540D\u79F0",dataIndex:"memberName",ellipsis:!0,hideInSearch:!0},{title:"\u4F1A\u5458\u5934\u50CF",dataIndex:"headImgUrl",ellipsis:!0,width:100,align:"center",hideInSearch:!0,render:function(t,a){return(0,e.jsx)(E.C,{size:64,shape:"square",icon:(0,e.jsx)(T.Z,{}),src:a.headImgUrl})}},{title:"\u4F1A\u5458\u7535\u8BDD",dataIndex:"phone",ellipsis:!0,hideInSearch:!0},{title:"\u72B6\u6001",dataIndex:"state",valueType:"select",hideInSearch:!0,valueEnum:{0:{text:"\u505C\u7528",status:"Error"},1:{text:"\u6B63\u5E38",status:"Success"},2:{text:"\u6302\u5931",status:"Error"},3:{text:"\u4F5C\u5E9F",status:"Error"}}},{title:"\u7C7B\u578B",dataIndex:"type",valueType:"select",hideInSearch:!0,valueEnum:{1:{text:"\u4EBA\u8138",status:"Success"},2:{text:"\u5B9E\u4F53\u5361",status:"Success"},3:{text:"\u6307\u7EB9",status:"Success"}}},{title:"\u64CD\u4F5C",valueType:"option",key:"option",fixed:"right",width:150,render:function(t,a,i,d){return[(0,e.jsx)("a",{onClick:function(){return Ce(a)},children:"\u7F16\u8F91"}),(0,e.jsx)("a",{onClick:function(){return Ze(a)},children:"\u7ED1\u5B9A\u4F1A\u5458"})]}}],Be={onChange:function(t){M(t)},selectedRowKeys:I},ye=[{title:"\u4F1A\u5458\u5934\u50CF",dataIndex:"headImgUrl",ellipsis:!0,width:100,align:"center",hideInSearch:!0,render:function(t,a){return(0,e.jsx)(E.C,{size:64,shape:"square",icon:(0,e.jsx)(T.Z,{}),src:a.headImgUrl})}},{title:"\u771F\u5B9E\u59D3\u540D",dataIndex:"realName",ellipsis:!0},{title:"\u8054\u7CFB\u65B9\u5F0F",dataIndex:"phone",ellipsis:!0}];return(0,e.jsx)(X.ZP,{header:{title:"",breadcrumb:{}},children:(0,e.jsxs)("div",{className:J().member_card_container,children:[(0,e.jsx)(R.ZP,{pagination:{pageSize:de,onChange:function(t){return se(t)}},scroll:{x:1300},columns:je,actionRef:u,request:function(){var n=(0,x.Z)((0,f.Z)().mark(function t(a){var i;return(0,f.Z)().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return s.next=2,C.GetMemberCardPageList(a);case 2:return i=s.sent,s.abrupt("return",{data:i.data.data,success:!0,total:i.data.total});case 4:case"end":return s.stop()}},t)}));return function(t){return n.apply(this,arguments)}}(),cardBordered:!0,editable:{type:"multiple"},rowKey:"id",options:{setting:{listsHeight:400}},dateFormatter:"string",headerTitle:"\u50A8\u503C\u5361\u7BA1\u7406",toolBarRender:function(){return[(0,e.jsx)(P.Z,{icon:(0,e.jsx)(A.Z,{}),type:"primary",onClick:ge,children:"\u65B0\u5EFA"},"button")]}}),(0,e.jsx)(w.Z,{width:600,maskClosable:!1,title:j.id?"\u7F16\u8F91\u50A8\u503C\u5361":"\u6DFB\u52A0\u50A8\u503C\u5361",visible:re,onOk:function(){b.submit()},onCancel:function(){return Z(!1)},children:(0,e.jsxs)(m.Z,{name:"basic",onFinish:be,form:b,labelCol:{span:4},children:[(0,e.jsx)(m.Z.Item,{label:"id",name:"id",hidden:!0,children:(0,e.jsx)(O.Z,{})}),(0,e.jsx)(m.Z.Item,{label:"\u5361\u53F7",name:"cardNum",children:(0,e.jsx)(O.Z,{disabled:!0})}),(0,e.jsx)(m.Z.Item,{noStyle:!0,shouldUpdate:function(t,a){return t.mode!==a.mode},children:function(t){var a=t.getFieldValue;return j.id?(0,e.jsx)(m.Z.Item,{label:"\u72B6\u6001",name:"state",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u9009\u62E9\u72B6\u6001\uFF01"}],children:(0,e.jsxs)(l.Z,{children:[(0,e.jsx)(l.Z.Option,{value:0,children:"\u505C\u7528"}),(0,e.jsx)(l.Z.Option,{value:1,children:"\u6B63\u5E38"}),(0,e.jsx)(l.Z.Option,{disabled:!0,value:2,children:"\u6302\u5931"}),(0,e.jsx)(l.Z.Option,{value:3,children:"\u4F5C\u5E9F"})]})}):null}}),(0,e.jsx)(m.Z.Item,{noStyle:!0,shouldUpdate:function(t,a){return t.mode!==a.mode},children:function(t){var a=t.getFieldValue;return j.id?(0,e.jsx)(m.Z.Item,{label:"\u7C7B\u578B",name:"type",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u7C7B\u578B\uFF01"}],children:(0,e.jsxs)(l.Z,{disabled:!0,children:[(0,e.jsx)(l.Z.Option,{value:1,children:"\u4EBA\u8138"}),(0,e.jsx)(l.Z.Option,{value:2,children:"\u5B9E\u4F53\u5361"}),(0,e.jsx)(l.Z.Option,{value:3,children:"\u6307\u7EB9"})]})}):(0,e.jsx)(m.Z.Item,{label:"\u7C7B\u578B",name:"type",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u7C7B\u578B\uFF01"}],children:(0,e.jsxs)(l.Z,{children:[(0,e.jsx)(l.Z.Option,{value:1,children:"\u4EBA\u8138"}),(0,e.jsx)(l.Z.Option,{value:2,children:"\u5B9E\u4F53\u5361"}),(0,e.jsx)(l.Z.Option,{value:3,children:"\u6307\u7EB9"})]})})}})]})}),(0,e.jsx)(H.Z,{width:600,title:"\u7ED1\u5B9A\u4F1A\u5458",placement:"right",onClose:function(){return y(!1)},visible:oe,children:(0,e.jsx)(R.ZP,{toolBarRender:function(){return[(0,e.jsx)(P.Z,{icon:(0,e.jsx)(A.Z,{}),type:"primary",onClick:xe,children:"\u786E\u5B9A\u7ED1\u5B9A"},"button")]},rowSelection:(0,K.Z)({type:"radio"},Be),columns:ye,cardBordered:!0,request:(0,x.Z)((0,f.Z)().mark(function n(){var t,a,i=arguments;return(0,f.Z)().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return t=i.length>0&&i[0]!==void 0?i[0]:{},s.next=3,C.GetMemberListByPage(t);case 3:if(a=s.sent,a.statusCode!==200){s.next=7;break}return pe(a.data.total),s.abrupt("return",{data:a.data.data,success:!0,total:a.data.total});case 7:case"end":return s.stop()}},n)})),rowKey:"id",search:{labelWidth:"auto"},pagination:{pageSize:fe,onChange:function(t){return me(t)}},dateFormatter:"string",headerTitle:"\u4F1A\u5458\u5217\u8868"})})]})})},q=k}}]);