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

  1. (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[1308],{38255:function(Je,W,r){"use strict";r.r(W),r.d(W,{default:function(){return Me}});var We=r(71194),Y=r(50146),Ye=r(57663),K=r(71577),Ke=r(49111),Q=r(19650),Qe=r(71153),H=r(60331),He=r(34792),d=r(48086),c=r(39428),I=r(3182),Z=r(2824),Xe=r(63185),me=r(9676),he=r(49101),v=r(67294),pe=r(28790),X=r(16894),q=r(11849),qe=r(88983),k=r(47933),_e=r(14965),ve=r(34895),et=r(9715),o=r(55843),tt=r(47673),p=r(4107),at=r(43358),U=r(34041),e=r(85893),ye=function(l){var b=U.Z.Option,$=U.Z.OptGroup,F=(0,v.useState)(),C=(0,Z.Z)(F,2),j=C[0],w=C[1],B=function(){var g=(0,I.Z)((0,c.Z)().mark(function m(){return(0,c.Z)().wrap(function(A){for(;;)switch(A.prev=A.next){case 0:case"end":return A.stop()}},m)}));return function(){return g.apply(this,arguments)}}();(0,v.useEffect)(function(){var g=function(){var m=(0,I.Z)((0,c.Z)().mark(function y(A){return(0,c.Z)().wrap(function(L){for(;;)switch(L.prev=L.next){case 0:case"end":return L.stop()}},y)}));return function(A){return m.apply(this,arguments)}}();g()},[]);var G={labelCol:{sm:{span:4}},wrapperCol:{}},M={wrapperCol:{sm:{offset:1}}},P=function(m){};return(0,e.jsx)(Y.Z,{title:l.isLook?"\u4F1A\u5458\u4FE1\u606F\u8BE6\u60C5":l.values.id?"\u7F16\u8F91\u4F1A\u5458\u4FE1\u606F":"\u65B0\u5EFA\u4F1A\u5458\u4FE1\u606F",width:700,maskClosable:!1,visible:l.createModalVisible,footer:null,onCancel:function(){l.onCancel()},destroyOnClose:!0,children:(0,e.jsxs)(o.Z,(0,q.Z)((0,q.Z)({},G),{},{layout:"Horizontal",preserve:!1,initialValues:l.values,onFinish:l.onFinish,children:[(0,e.jsx)(o.Z.Item,{name:"id",hidden:!0,children:(0,e.jsx)(p.Z,{})}),(0,e.jsx)(o.Z.Item,{name:"platformType",hidden:!0,children:(0,e.jsx)(p.Z,{})}),(0,e.jsx)(o.Z.Item,{name:"memberInfo_Id",hidden:!0,children:(0,e.jsx)(p.Z,{})}),(0,e.jsx)(o.Z.Item,{name:"nickName",label:"\u4F1A\u5458\u6635\u79F0",rules:[{required:!0,max:200}],children:(0,e.jsx)(p.Z,{placeholder:"\u8BF7\u8F93\u5165\u4F1A\u5458\u6635\u79F0"})}),(0,e.jsx)(o.Z.Item,{name:"phone",label:"\u7535\u8BDD\u53F7\u7801",rules:[{required:!0,pattern:"^1[0-9]{10}$",message:"\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u7535\u8BDD\u53F7\u7801"}],children:(0,e.jsx)(p.Z,{placeholder:"",disabled:l.platformType==0})}),(0,e.jsx)(o.Z.Item,{noStyle:!0,shouldUpdate:function(m,y){return m.platformType!==y.platformType},children:function(m){var y=m.getFieldValue;return y("id")?null:(0,e.jsx)(o.Z.Item,{name:"platformType",disabled:!0,label:"\u5E73\u53F0",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u5E73\u53F0"}],children:(0,e.jsxs)(U.Z,{style:{width:120},children:[(0,e.jsx)(b,{value:"1",disabled:!0,children:"\u5FAE\u4FE1"}),(0,e.jsx)(b,{value:"2",disabled:!0,children:"\u652F\u4ED8\u5B9D"}),(0,e.jsx)(b,{value:"3",children:"POS"}),(0,e.jsx)(b,{value:"4",children:"\u50A8\u503C\u5361"})]})})}}),(0,e.jsx)(o.Z.Item,{name:"headImgUrl",label:"\u5934\u50CF",rules:[{max:500}],children:(0,e.jsx)(p.Z,{placeholder:"\u8BF7\u8F93\u5165\u5934\u50CF"})}),(0,e.jsxs)(o.Z.Item,{style:{height:32},children:[(0,e.jsx)(o.Z.Item,{rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u51FA\u751F\u65E5\u671F"}],name:"birthday",label:"\u51FA\u751F\u65E5\u671F",style:{float:"left",marginLeft:40},children:(0,e.jsx)(ve.Z,{})}),(0,e.jsx)(o.Z.Item,{name:"sex",label:"\u6027\u522B",style:{float:"left",marginLeft:110},children:(0,e.jsxs)(k.ZP.Group,{children:[(0,e.jsx)(k.ZP,{value:0,children:"\u672A\u77E5"}),(0,e.jsx)(k.ZP,{value:1,children:"\u7537"}),(0,e.jsx)(k.ZP,{value:2,children:"\u5973"})]})})]}),(0,e.jsxs)(o.Z.Item,{label:"\u5B9E\u540D\u8BA4\u8BC1",style:{height:32},children:[(0,e.jsx)(o.Z.Item,{name:"realName",style:{float:"left",width:"145px"},children:(0,e.jsx)(p.Z,{placeholder:"\u8BF7\u8F93\u5165\u771F\u5B9E\u59D3\u540D"})}),(0,e.jsx)(o.Z.Item,{name:"cardNum",rules:[{pattern:"^(\\d{15}$|^\\d{18}$|^\\d{17}(\\d|X|x))$",message:"\u8BF7\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u8EAB\u4EFD\u8BC1\u53F7\u7801"}],style:{float:"left",marginLeft:10,width:"300px"},children:(0,e.jsx)(p.Z,{placeholder:"\u8BF7\u8F93\u5165\u8EAB\u4EFD\u8BC1\u53F7\u7801"})})]}),(0,e.jsx)(o.Z.Item,{name:"country",label:"\u56FD\u5BB6",children:(0,e.jsx)(p.Z,{placeholder:"\u8BF7\u8F93\u5165\u56FD\u5BB6"})}),(0,e.jsxs)(o.Z.Item,{label:"\u5730\u533A",style:{height:32},children:[(0,e.jsx)(o.Z.Item,{name:"province",style:{float:"left"},children:(0,e.jsx)(p.Z,{style:{width:"150px"},placeholder:"\u8BF7\u8F93\u5165\u7701"})}),(0,e.jsx)(o.Z.Item,{name:"city",style:{float:"left",marginLeft:10},children:(0,e.jsx)(p.Z,{style:{width:"150px"},placeholder:"\u8BF7\u8F93\u5165\u5E02"})}),(0,e.jsx)(o.Z.Item,{name:"county",style:{float:"left",marginLeft:10},children:(0,e.jsx)(p.Z,{style:{width:"150px"},placeholder:"\u8BF7\u8F93\u5165\u53BF(\u533A)"})})]}),(0,e.jsx)(o.Z.Item,{name:"address",label:"\u8BE6\u7EC6\u5730\u5740",children:(0,e.jsx)(p.Z,{placeholder:""})}),(0,e.jsx)(o.Z.Item,{name:"level_Id",label:"\u7B49\u7EA7",children:(0,e.jsx)(p.Z,{placeholder:""})}),(0,e.jsx)(o.Z.Item,{noStyle:!0,shouldUpdate:function(m,y){return m.platformType!==y.platformType},children:function(m){var y=m.getFieldValue;return l.isLook?null:(0,e.jsx)(o.Z.Item,{children:(0,e.jsx)(K.Z,{disabled:l.isLook,type:"primary",htmlType:"submit",style:{float:"right"},children:"\u4FDD\u5B58"})})}})]}))})},xe=ye,rt=r(57338),nt=function(l){var b=useRef(),$=[{title:"\u4E3B\u952E",dataIndex:"id",tip:"\u89C4\u5219\u540D\u79F0\u662F\u552F\u4E00\u7684key",hideInSearch:!0,hideInTable:!0},{title:"\u53D8\u66F4\u524D",dataIndex:"beforeChange",valueType:"textarea",search:!1},{title:"\u53D8\u66F4\u7C7B\u578B",dataIndex:"type",valueEnum:{1:{text:"\u589E\u52A0",status:"Success"},2:{text:"\u51CF\u5C11",status:"Error"}}},{title:"\u53D8\u66F4\u79EF\u5206",dataIndex:"integral",valueType:"textarea",search:!1},{title:"\u53D8\u66F4\u540E",dataIndex:"afterChange",valueType:"textarea",search:!1},{title:"\u53D8\u66F4\u65F6\u95F4",dataIndex:"createAt",valueType:"dateTime"}];return _jsx(_Drawer,{title:"\u79EF\u5206\u8BB0\u5F55",onClose:function(){l.onClose()},width:720,visible:l.integralRecordVisible,placement:"right",destroyOnClose:!0,children:_jsx(ProTable,{actionRef:b,rowKey:"id",request:function(){var F=_asyncToGenerator(_regeneratorRuntime().mark(function C(j){var w,B;return _regeneratorRuntime().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return w=[],B=0,j.memberId=l.memberId,M.next=5,GetIntegralRecord(JSON.stringify(j)).then(function(P){w=P.data.data,B=P.data.total});case 5:return M.abrupt("return",{data:w,success:!0,total:B});case 6:case"end":return M.stop()}},C)}));return function(C){return F.apply(this,arguments)}}(),columns:$,pagination:{defaultPageSize:10}})})},ut=null,ge=r(30381),_=r.n(ge),S=r(48971),T=r(96690);function Ie(f){return(0,S.WY)((0,T.zr)()+"\u200B/api/MemberInfoService/GetMemberPageQuery",{method:"post",data:f})}function Ze(f){return(0,S.WY)((0,T.zr)()+"/api/MemberInfoService/AddMember",{method:"post",data:f})}function be(f){return(0,S.WY)((0,T.zr)()+"/api/MemberInfoService/UpdateMemberInfo",{method:"post",data:f})}function je(f){return(0,S.WY)((0,T.zr)()+"/api/MemberInfoService/UpdateMemberStatus",{method:"post",data:f})}function Se(f){return(0,S.WY)((0,T.zr)()+"/api/MemberInfoService/GetPlatformMemberList?memberId=".concat(f),{method:"get"})}function Te(f,l){return(0,S.WY)((0,T.zr)()+"/api/MemberInfoService/GetMemberTagAndInfo?memberInfoId=".concat(f,"&PlatformType=").concat(l),{method:"get"})}function Fe(f){return(0,S.WY)((0,T.zr)()+"/api/MemberInfoService/UpdateMemberTag",{method:"post",data:f})}var ee=r(44276),Ce=me.Z.Group,lt=null,st=null,x="message",te=function(l){var b=(0,ee.Jx)(l);if(b.includes("BPA_BASE64"))return!0},ae=function(l){return(0,ee.Jx)(l).replace("BPA_BASE64","")},Be=function(){var l=(0,v.useRef)(),b=(0,v.useRef)(),$=(0,v.useState)(!1),F=(0,Z.Z)($,2),C=F[0],j=F[1],w=(0,v.useState)(!1),B=(0,Z.Z)(w,2),G=B[0],M=B[1],P=(0,v.useState)([]),g=(0,Z.Z)(P,2),m=g[0],y=g[1],A=(0,v.useState)([]),V=(0,Z.Z)(A,2),L=V[0],z=V[1],Ae=(0,v.useState)(),re=(0,Z.Z)(Ae,2),O=re[0],R=re[1],Re=(0,v.useState)(!1),ne=(0,Z.Z)(Re,2),Ee=ne[0],D=ne[1],we=(0,v.useState)([]),ue=(0,Z.Z)(we,2),Pe=ue[0],Le=ue[1],Oe=v.useState(),le=(0,Z.Z)(Oe,2),se=le[0],ie=le[1],ke=(0,v.useState)(!1),de=(0,Z.Z)(ke,2),$e=de[0],J=de[1],oe=function(){var i=(0,I.Z)((0,c.Z)().mark(function u(a){return(0,c.Z)().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Se(a).then(function(n){y(n.data)});case 2:case"end":return t.stop()}},u)}));return function(a){return i.apply(this,arguments)}}(),De=function(){var i=(0,I.Z)((0,c.Z)().mark(function u(a){return(0,c.Z)().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return d.default.loading("\u6B63\u5728\u6DFB\u52A0...",x),t.prev=1,a.status=0,t.next=5,Ze(JSON.stringify(a)).then(function(n){d.default.destroy(x),n.data?d.default.success("\u6DFB\u52A0\u6210\u529F"):d.default.error("\u6DFB\u52A0\u5931\u8D25")});case 5:return l.current.reloadAndRest(),t.abrupt("return",!0);case 9:return t.prev=9,t.t0=t.catch(1),d.default.destroy(x),d.default.error("\u6DFB\u52A0\u5931\u8D25\u8BF7\u91CD\u8BD5\uFF01"),t.abrupt("return",!1);case 14:case"end":return t.stop()}},u,null,[[1,9]])}));return function(a){return i.apply(this,arguments)}}(),Ne=function(){var i=(0,I.Z)((0,c.Z)().mark(function u(a){return(0,c.Z)().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return d.default.loading("\u6B63\u5728\u4FEE\u6539...",x),t.prev=1,t.next=4,be(JSON.stringify(a)).then(function(n){d.default.destroy(x),n.data?d.default.success("\u4FEE\u6539\u6210\u529F"):d.default.error("\u4FEE\u6539\u5931\u8D25"+n.errors==null?"":n.errors)});case 4:return l.current.reloadAndRest(),t.abrupt("return",!0);case 8:return t.prev=8,t.t0=t.catch(1),d.default.destroy(x),d.default.error("\u4FEE\u6539\u5931\u8D25\u8BF7\u91CD\u8BD5\uFF01"),t.abrupt("return",!1);case 13:case"end":return t.stop()}},u,null,[[1,8]])}));return function(a){return i.apply(this,arguments)}}(),it=function(){var i=(0,I.Z)((0,c.Z)().mark(function u(a){return(0,c.Z)().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return d.default.loading("\u6B63\u5728\u4FEE\u6539...",x),t.prev=1,t.next=4,je(JSON.stringify(a)).then(function(n){d.default.destroy(x),n.data?(oe(a.Id),d.default.success("\u4FEE\u6539\u6210\u529F")):d.default.error("\u4FEE\u6539\u5931\u8D25"+n.errors==null?"":n.errors)});case 4:return l.current.reloadAndRest(),t.abrupt("return",!0);case 8:return t.prev=8,t.t0=t.catch(1),d.default.destroy(x),d.default.error("\u4FEE\u6539\u5931\u8D25\u8BF7\u91CD\u8BD5\uFF01"),t.abrupt("return",!1);case 13:case"end":return t.stop()}},u,null,[[1,8]])}));return function(a){return i.apply(this,arguments)}}(),Ue=function(){var i=(0,I.Z)((0,c.Z)().mark(function u(a,s){return(0,c.Z)().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return d.default.loading("\u6B63\u5728\u4FEE\u6539...",x),n.prev=1,n.next=4,Fe(JSON.stringify({platformType:a,memberInfo_Id:s,tags:se})).then(function(h){d.default.destroy(x),h.data?d.default.success("\u4FEE\u6539\u6210\u529F"):d.default.error("\u4FEE\u6539\u5931\u8D25"+h.errors==null?"":h.errors)});case 4:return l.current.reloadAndRest(),n.abrupt("return",!0);case 8:return n.prev=8,n.t0=n.catch(1),d.default.destroy(x),d.default.error("\u4FEE\u6539\u5931\u8D25\u8BF7\u91CD\u8BD5\uFF01"),n.abrupt("return",!1);case 13:case"end":return n.stop()}},u,null,[[1,8]])}));return function(a,s){return i.apply(this,arguments)}}(),ce=function(){var i=(0,I.Z)((0,c.Z)().mark(function u(a,s){return(0,c.Z)().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,Te(a,s).then(function(h){if(h.data){var E=[],fe=[];h.data.forEach(function(N){N.memberTagInfoId!=null&&fe.push(N.id),E.push({label:N.name,value:N.id})}),Le(E),ie(fe)}});case 2:case"end":return n.stop()}},u)}));return function(a,s){return i.apply(this,arguments)}}(),Ge=[{title:"\u4E3B\u952E",dataIndex:"id",hideInSearch:!0,hideInTable:!0,tip:"\u89C4\u5219\u540D\u79F0\u662F\u552F\u4E00\u7684 key"},{title:"\u5934\u50CF",dataIndex:"headImgUrl",search:!1,hideInForm:!0,render:function(u,a){return(0,e.jsx)("img",{src:a.headImgUrl,style:{width:"45px",height:"45px"}})}},{title:"\u6635\u79F0",dataIndex:"nickName",valueType:"textarea",ellipsis:{showTitle:!0},hideInForm:!0,render:function(u,a){return(0,e.jsx)("a",{children:te(a.nickName)?ae(a.nickName):a.nickName})}},{title:"\u7535\u8BDD",dataIndex:"phone",valueType:"textarea",hideInForm:!0},{title:"\u6027\u522B",dataIndex:"sex",search:!1,valueEnum:{0:{text:"\u672A\u77E5"},1:{text:"\u7537"},2:{text:"\u5973"}}},{title:"\u7B49\u7EA7",dataIndex:"level",search:!1,valueType:"textarea"},{title:"\u72B6\u6001",dataIndex:"status",valueEnum:{0:{text:"\u6B63\u5E38",status:"Success"},1:{text:"\u7981\u7528",status:"error"}}},{title:"\u6807\u7B7E",dataIndex:"memberTag",search:!1,width:300,render:function(u,a){return(0,e.jsx)(Q.Z,{children:a.memberTag.map(function(s){var t=s.id,n=s.name;return(0,e.jsx)(H.Z,{color:"#87d068",children:n},t)})})}},{title:"\u521B\u5EFA\u65F6\u95F4",dataIndex:"createAt",search:!1,width:150,valueType:"textarea"},{title:"\u64CD\u4F5C",dataIndex:"option",valueType:"option",fixed:"right",width:300,render:function(u,a){var s=[(0,e.jsx)("a",{type:"primary",onClick:function(){j(!0),R(function(){return a.birthday=_()(a.birthday),J(!0),a})},children:"\u8BE6\u60C5"},"primary"),(0,e.jsx)("a",{type:"primary",onClick:function(){j(!0),R(function(){return a.birthday=_()(a.birthday),J(!1),a})},children:"\u66F4\u65B0"},"primary"),(0,e.jsx)("a",{type:"primary",onClick:function(){ce(a.id,0),D(!0),R(function(){return a})},children:"\u6807\u7B7E\u7BA1\u7406"},"primary")];return s}}],Ve=function(u,a){u?(y(a.platformMemberInfos),z([a.id])):z([])},ze=function(u){return(0,e.jsx)(X.ZP,{rowKey:"id",actionRef:b,pagination:{pageSize:10},scroll:{x:1300},columns:[{title:"\u5E73\u53F0",dataIndex:"platformType",key:"platformType",valueEnum:{1:{text:"\u5FAE\u4FE1"},2:{text:"\u652F\u4ED8\u5B9D"},3:{text:"POS"},4:{text:"\u50A8\u503C\u5361"}}},{title:"\u5934\u50CF",dataIndex:"headImgUrl",valueType:"textarea",search:!1,hideInForm:!0,render:function(s,t){return(0,e.jsx)("img",{src:t.headImgUrl,style:{width:"45px",height:"45px"}})}},{title:"\u6635\u79F0",dataIndex:"nickName",valueType:"textarea",hideInForm:!0,render:function(s,t){return(0,e.jsx)("a",{children:te(t.nickName)?ae(t.nickName):t.nickName})}},{title:"\u6027\u522B",dataIndex:"sex",search:!1,valueEnum:{0:{text:"\u672A\u77E5"},1:{text:"\u7537"},2:{text:"\u5973"}}},{title:"\u72B6\u6001",dataIndex:"status",valueEnum:{0:{text:"\u6B63\u5E38",status:"Success"},1:{text:"\u7981\u7528",status:"error"}}},{title:"\u6807\u7B7E",dataIndex:"memberTag",key:"memberTag",width:450,render:function(s,t){return(0,e.jsx)(e.Fragment,{children:(0,e.jsx)(Q.Z,{children:t.memberTag.map(function(n){var h=n.id,E=n.name;return(0,e.jsx)(H.Z,{color:"#87d068",children:E},h)})})})}},{title:"\u64CD\u4F5C",dataIndex:"option",valueType:"option",render:function(s,t){var n=[(0,e.jsx)("a",{type:"primary",onClick:function(){ce(t.memberInfo_Id,t.platformType),D(!0),R(function(){return t}),oe(t.memberInfo_Id)},children:"\u6807\u7B7E\u7BA1\u7406"},"primary")];return n}}],headerTitle:!1,search:!1,options:!1,dataSource:m})};return(0,e.jsxs)(pe.ZP,{header:{title:"",breadcrumb:{}},children:[(0,e.jsx)(X.ZP,{headerTitle:"\u4F1A\u5458\u4FE1\u606F",pagination:{pageSize:10},scroll:{x:1300},actionRef:l,onExpand:Ve,expandedRowKeys:L,rowKey:"id",toolBarRender:function(){return[(0,e.jsxs)(K.Z,{type:"primary",onClick:function(){J(!1),R({}),j(!0)},children:[(0,e.jsx)(he.Z,{})," \u6DFB\u52A0\u4F1A\u5458"]},"primary")]},expandable:{expandedRowRender:ze},request:function(){var i=(0,I.Z)((0,c.Z)().mark(function u(a){var s,t;return(0,c.Z)().wrap(function(h){for(;;)switch(h.prev=h.next){case 0:return s=[],t=0,h.next=4,Ie(a).then(function(E){s=E.data.data,t=E.data.total});case 4:return h.abrupt("return",{data:s,success:!0,total:t});case 5:case"end":return h.stop()}},u)}));return function(u){return i.apply(this,arguments)}}(),columns:Ge}),(0,e.jsx)(xe,{isLook:$e,onFinish:function(){var i=(0,I.Z)((0,c.Z)().mark(function u(a){var s;return(0,c.Z)().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:s=!1,a.MemberInfo_Id=a.id,a.id?s=Ne(a):s=De(a),s&&(j(!1),l.current&&l.current.reloadAndRest());case 4:case"end":return n.stop()}},u)}));return function(u){return i.apply(this,arguments)}}(),onCancel:function(){R(void 0),j(!1)},createModalVisible:C,values:O||{}}),(0,e.jsx)(Y.Z,{title:"\u4F1A\u5458\u6807\u7B7E",visible:Ee,onOk:function(){Ue(O.platformType,O.platformType==0?O.id:O.memberInfo_Id)&&(D(!1),z([]))},onCancel:function(){R([]),D(!1)},children:(0,e.jsx)(e.Fragment,{children:(0,e.jsx)(Ce,{options:Pe,value:se,onChange:function(u){ie(u)}})})})]})},Me=Be}}]);