Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 

2 lignes
15 KiB

  1. (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[9842,7975,1322],{32348:function(Ve,W,n){"use strict";n.r(W),n.d(W,{default:function(){return Be}});var Ne=n(71194),Y=n(50146),Ue=n(57663),K=n(71577),We=n(49111),J=n(19650),Ye=n(71153),z=n(60331),Ke=n(34792),c=n(48086),d=n(39428),v=n(3182),y=n(2824),Je=n(63185),se=n(9676),ie=n(49101),p=n(67294),de=n(78009),V=n(53779),Q=n(11849),ze=n(88983),O=n(47933),Qe=n(14965),oe=n(71356),He=n(9715),i=n(55843),Xe=n(47673),h=n(4107),qe=n(43358),N=n(34041),e=n(85893),ce=function(m){var M=N.Z.Option,L=N.Z.OptGroup,F=(0,p.useState)(),T=(0,y.Z)(F,2),C=T[0],E=T[1],S=function(){var j=(0,v.Z)((0,d.Z)().mark(function B(){return(0,d.Z)().wrap(function(R){for(;;)switch(R.prev=R.next){case 0:case"end":return R.stop()}},B)}));return function(){return j.apply(this,arguments)}}();(0,p.useEffect)(function(){var j=function(){var B=(0,v.Z)((0,d.Z)().mark(function A(R){return(0,d.Z)().wrap(function(P){for(;;)switch(P.prev=P.next){case 0:case"end":return P.stop()}},A)}));return function(R){return B.apply(this,arguments)}}();j()},[]);var $={labelCol:{sm:{span:4}},wrapperCol:{}},g={wrapperCol:{sm:{offset:1}}},k=function(B){};return(0,e.jsx)(Y.Z,{title:m.values.id?"\u7F16\u8F91\u4F1A\u5458\u4FE1\u606F":"\u65B0\u5EFA\u4F1A\u5458\u4FE1\u606F",width:700,maskClosable:!1,visible:m.createModalVisible,footer:null,onCancel:function(){m.onCancel()},destroyOnClose:!0,children:(0,e.jsxs)(i.Z,(0,Q.Z)((0,Q.Z)({},$),{},{layout:"Horizontal",preserve:!1,initialValues:m.values,onFinish:m.onFinish,children:[(0,e.jsx)(i.Z.Item,{name:"id",hidden:!0,children:(0,e.jsx)(h.Z,{})}),(0,e.jsx)(i.Z.Item,{name:"platformType",hidden:!0,children:(0,e.jsx)(h.Z,{})}),(0,e.jsx)(i.Z.Item,{name:"memberInfo_Id",hidden:!0,children:(0,e.jsx)(h.Z,{})}),(0,e.jsx)(i.Z.Item,{name:"nickName",label:"\u4F1A\u5458\u6635\u79F0",rules:[{required:!0,max:200}],children:(0,e.jsx)(h.Z,{placeholder:"\u8BF7\u8F93\u5165\u4F1A\u5458\u6635\u79F0"})}),(0,e.jsx)(i.Z.Item,{name:"phone",label:"\u7535\u8BDD\u53F7\u7801",rules:[{pattern:"^1[0-9]{10}$",message:"\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u7535\u8BDD\u53F7\u7801"}],children:(0,e.jsx)(h.Z,{placeholder:"",disabled:m.platformType==0})}),(0,e.jsx)(i.Z.Item,{name:"headImgUrl",label:"\u5934\u50CF",rules:[{max:500}],children:(0,e.jsx)(h.Z,{placeholder:"\u8BF7\u8F93\u5165\u4F1A\u5458\u6635\u79F0"})}),(0,e.jsxs)(i.Z.Item,{style:{height:32},children:[(0,e.jsx)(i.Z.Item,{name:"birthday",label:"\u51FA\u751F\u65E5\u671F",style:{float:"left",marginLeft:40},children:(0,e.jsx)(oe.Z,{})}),(0,e.jsx)(i.Z.Item,{name:"sex",label:"\u6027\u522B",style:{float:"left",marginLeft:110},children:(0,e.jsxs)(O.ZP.Group,{children:[(0,e.jsx)(O.ZP,{value:0,children:"\u672A\u77E5"}),(0,e.jsx)(O.ZP,{value:1,children:"\u7537"}),(0,e.jsx)(O.ZP,{value:2,children:"\u5973"})]})})]}),(0,e.jsxs)(i.Z.Item,{label:"\u5B9E\u540D\u8BA4\u8BC1",style:{height:32},children:[(0,e.jsx)(i.Z.Item,{name:"realName",style:{float:"left",width:"145px"},children:(0,e.jsx)(h.Z,{placeholder:"\u8BF7\u8F93\u5165\u771F\u5B9E\u59D3\u540D"})}),(0,e.jsx)(i.Z.Item,{name:"cardNum",style:{float:"left",marginLeft:10,width:"300px"},children:(0,e.jsx)(h.Z,{placeholder:"\u8BF7\u8F93\u5165\u8EAB\u4EFD\u8BC1\u53F7\u7801"})})]}),(0,e.jsx)(i.Z.Item,{name:"country",label:"\u56FD\u5BB6",children:(0,e.jsx)(h.Z,{placeholder:"\u8BF7\u8F93\u5165\u56FD\u5BB6"})}),(0,e.jsxs)(i.Z.Item,{label:"\u5730\u533A",style:{height:32},children:[(0,e.jsx)(i.Z.Item,{name:"province",style:{float:"left"},children:(0,e.jsx)(h.Z,{style:{width:"150px"},placeholder:"\u8BF7\u8F93\u5165\u7701"})}),(0,e.jsx)(i.Z.Item,{name:"city",style:{float:"left",marginLeft:10},children:(0,e.jsx)(h.Z,{style:{width:"150px"},placeholder:"\u8BF7\u8F93\u5165\u5E02"})}),(0,e.jsx)(i.Z.Item,{name:"county",style:{float:"left",marginLeft:10},children:(0,e.jsx)(h.Z,{style:{width:"150px"},placeholder:"\u8BF7\u8F93\u5165\u53BF(\u533A)"})})]}),(0,e.jsx)(i.Z.Item,{name:"address",label:"\u8BE6\u7EC6\u5730\u5740",children:(0,e.jsx)(h.Z,{placeholder:""})}),(0,e.jsx)(i.Z.Item,{name:"level_Id",label:"\u7B49\u7EA7",children:(0,e.jsx)(h.Z,{placeholder:""})}),(0,e.jsx)(i.Z.Item,{name:"status",label:"\u72B6\u6001",rules:[{required:!0}],children:(0,e.jsxs)(N.Z,{placeholder:"\u72B6\u6001",children:[(0,e.jsx)(M,{value:0,children:"\u542F\u7528"}),(0,e.jsx)(M,{value:1,children:"\u505C\u7528"})]})}),(0,e.jsx)(i.Z.Item,{children:(0,e.jsx)(K.Z,{type:"primary",htmlType:"submit",style:{float:"right"},children:"\u4FDD\u5B58"})})]}))})},me=ce,_e=n(57338),fe=n(273),I=n(48971);function et(o){return request("/kitchen/api/member/customer-page-query",{method:"post",data:o})}function he(o){return(0,I.WY)("\u200B/kitchen/api\u200B/member\u200B/member-page-query",{method:"post",data:o})}function pe(o){return(0,I.WY)("/kitchen/api/member/member-status",{method:"put",data:o})}function ve(o,m){return(0,I.WY)("/kitchen/api/member/member-tag-and-info/".concat(o,"/").concat(m),{method:"get"})}function ye(o){return(0,I.WY)("/kitchen/api/member/member-info",{method:"put",data:o})}function xe(o){return(0,I.WY)("/kitchen/api/member/member-tag",{method:"put",data:o})}function ge(o){return(0,I.WY)("/kitchen/api/member/syncmember/".concat(o),{method:"post"})}function Ze(o){return(0,I.WY)("/kitchen/api/member/platform-member-list/".concat(o),{method:"get"})}function Ie(o){return(0,I.WY)("/kitchen/api/member/member-integral-record-page",{method:"post",data:o})}var je=function(m){var M=(0,p.useRef)(),L=[{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(0,e.jsx)(fe.Z,{title:"\u79EF\u5206\u8BB0\u5F55",onClose:function(){m.onClose()},width:720,visible:m.integralRecordVisible,placement:"right",destroyOnClose:!0,children:(0,e.jsx)(V.ZP,{actionRef:M,rowKey:"id",request:function(){var F=(0,v.Z)((0,d.Z)().mark(function T(C){var E,S;return(0,d.Z)().wrap(function(g){for(;;)switch(g.prev=g.next){case 0:return E=[],S=0,C.memberId=m.memberId,g.next=5,Ie(JSON.stringify(C)).then(function(k){E=k.data.data,S=k.data.total});case 5:return g.abrupt("return",{data:E,success:!0,total:S});case 6:case"end":return g.stop()}},T)}));return function(T){return F.apply(this,arguments)}}(),columns:L,pagination:{defaultPageSize:10}})})},be=je,Fe=n(30381),Te=n.n(Fe),Ce=se.Z.Group,tt=null,at=null,x="message",Se=function(){var m=(0,p.useRef)(),M=(0,p.useRef)(),L=(0,p.useState)(!1),F=(0,y.Z)(L,2),T=F[0],C=F[1],E=(0,p.useState)(!1),S=(0,y.Z)(E,2),$=S[0],g=S[1],k=(0,p.useState)([]),j=(0,y.Z)(k,2),B=j[0],A=j[1],R=(0,p.useState)([]),U=(0,y.Z)(R,2),P=U[0],H=U[1],Re=(0,p.useState)(),X=(0,y.Z)(Re,2),b=X[0],w=X[1],Me=(0,p.useState)(!1),q=(0,y.Z)(Me,2),Ee=q[0],D=q[1],Ae=(0,p.useState)([]),_=(0,y.Z)(Ae,2),we=_[0],ke=_[1],Pe=p.useState(),ee=(0,y.Z)(Pe,2),te=ee[0],ae=ee[1],re=function(){var l=(0,v.Z)((0,d.Z)().mark(function u(a){return(0,d.Z)().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Ze(a).then(function(r){A(r.data)});case 2:case"end":return t.stop()}},u)}));return function(a){return l.apply(this,arguments)}}(),Oe=function(){var l=(0,v.Z)((0,d.Z)().mark(function u(a){return(0,d.Z)().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return c.default.loading("\u6B63\u5728\u4FEE\u6539...",x),t.prev=1,t.next=4,ye(JSON.stringify(a)).then(function(r){c.default.destroy(x),r.data?c.default.success("\u4FEE\u6539\u6210\u529F"):c.default.error("\u4FEE\u6539\u5931\u8D25"+r.errors==null?"":r.errors)});case 4:return m.current.reload(),t.abrupt("return",!0);case 8:return t.prev=8,t.t0=t.catch(1),c.default.destroy(x),c.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 l.apply(this,arguments)}}(),ne=function(){var l=(0,v.Z)((0,d.Z)().mark(function u(a){return(0,d.Z)().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return c.default.loading("\u6B63\u5728\u4FEE\u6539...",x),t.prev=1,t.next=4,pe(JSON.stringify(a)).then(function(r){c.default.destroy(x),r.data?(re(a.Id),c.default.success("\u4FEE\u6539\u6210\u529F")):c.default.error("\u4FEE\u6539\u5931\u8D25"+r.errors==null?"":r.errors)});case 4:return m.current.reload(),t.abrupt("return",!0);case 8:return t.prev=8,t.t0=t.catch(1),c.default.destroy(x),c.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 l.apply(this,arguments)}}(),Le=function(){var l=(0,v.Z)((0,d.Z)().mark(function u(a,s){return(0,d.Z)().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return c.default.loading("\u6B63\u5728\u4FEE\u6539...",x),r.prev=1,r.next=4,xe(JSON.stringify({platformType:a,memberInfo_Id:s,tags:te})).then(function(f){c.default.destroy(x),f.data?c.default.success("\u4FEE\u6539\u6210\u529F"):c.default.error("\u4FEE\u6539\u5931\u8D25"+f.errors==null?"":f.errors)});case 4:return m.current.reload(),r.abrupt("return",!0);case 8:return r.prev=8,r.t0=r.catch(1),c.default.destroy(x),c.default.error("\u4FEE\u6539\u5931\u8D25\u8BF7\u91CD\u8BD5\uFF01"),r.abrupt("return",!1);case 13:case"end":return r.stop()}},u,null,[[1,8]])}));return function(a,s){return l.apply(this,arguments)}}(),ue=function(){var l=(0,v.Z)((0,d.Z)().mark(function u(a,s){return(0,d.Z)().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,ve(a,s).then(function(f){if(f.data){var Z=[],le=[];f.data.forEach(function(G){G.memberTagInfoId!=null&&le.push(G.id),Z.push({label:G.name,value:G.id})}),ke(Z),ae(le)}});case 2:case"end":return r.stop()}},u)}));return function(a,s){return l.apply(this,arguments)}}(),$e=[{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",hideInForm:!0},{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:"\u542F\u7528",status:"Success"},1:{text:"\u7981\u7528",status:"error"}}},{title:"\u6807\u7B7E",dataIndex:"memberTag",search:!1,width:450,render:function(u,a){return(0,e.jsx)(J.Z,{children:a.memberTag.map(function(s){var t=s.id,r=s.name;return(0,e.jsx)(z.Z,{color:"#87d068",children:r},t)})})}},{title:"\u521B\u5EFA\u65F6\u95F4",dataIndex:"createAt",search:!1,valueType:"textarea"},{title:"\u64CD\u4F5C",dataIndex:"option",valueType:"option",render:function(u,a){var s=[(0,e.jsx)("a",{type:"primary",onClick:function(){C(!0),w(function(){return a.birthday=Te()(a.birthday),a})},children:"\u66F4\u65B0"},"primary"),(0,e.jsx)("a",{type:"primary",onClick:function(){var r={Id:a.id,platformType:0,status:a.status==0?1:0};ne(r)},children:a.status==0?"\u7981\u7528 ":"\u542F\u7528"},"primary"),(0,e.jsx)("a",{type:"primary",onClick:function(){ue(a.id,0),D(!0),w(function(){return a})},children:"\u6807\u7B7E\u7BA1\u7406"},"primary"),(0,e.jsx)("a",{type:"primary",onClick:function(){w(a),g(!0)},children:"\u79EF\u5206\u8BB0\u5F55"},"primary")];return s}}],De=function(u,a){u?(A(a.platformMemberInfos),H([a.id])):H([])},Ge=function(u){return(0,e.jsx)(V.ZP,{rowKey:"id",actionRef:M,columns:[{title:"\u5E73\u53F0",dataIndex:"platformType",key:"platformType",valueEnum:{1:{text:"\u5FAE\u4FE1"},2:{text:"\u652F\u4ED8\u5B9D"}}},{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},{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:"\u542F\u7528",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)(J.Z,{children:t.memberTag.map(function(r){var f=r.id,Z=r.name;return(0,e.jsx)(z.Z,{color:"#87d068",children:Z},f)})})})}},{title:"\u64CD\u4F5C",dataIndex:"option",valueType:"option",render:function(s,t){var r=[(0,e.jsx)("a",{type:"primary",onClick:function(){var Z={Id:t.memberInfo_Id,platformType:t.platformType,status:t.status==0?1:0};ne(Z)},children:t.status==0?"\u7981\u7528 ":"\u542F\u7528"},"primary"),(0,e.jsx)("a",{type:"primary",onClick:function(){ue(t.memberInfo_Id,t.platformType),D(!0),w(function(){return t}),re(t.memberInfo_Id)},children:"\u6807\u7B7E\u7BA1\u7406"},"primary")];return r}}],headerTitle:!1,search:!1,options:!1,dataSource:B,pagination:!1})};return(0,e.jsxs)(de.ZP,{children:[(0,e.jsx)(V.ZP,{headerTitle:"\u4F1A\u5458\u4FE1\u606F",actionRef:m,onExpand:De,expandedRowKeys:P,rowKey:"id",toolBarRender:function(){return[(0,e.jsxs)(K.Z,{type:"primary",onClick:function(){ge(1).then(function(a){c.default.success("\u542F\u52A8\u540C\u6B65,\u7A0D\u540E\u8BF7\u5237\u65B0\u9875\u9762")})},children:[(0,e.jsx)(ie.Z,{})," \u540C\u6B65\u4F1A\u5458"]},"primary")]},expandable:{expandedRowRender:Ge},request:function(){var l=(0,v.Z)((0,d.Z)().mark(function u(a){var s,t;return(0,d.Z)().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return s=[],t=0,f.next=4,he(a).then(function(Z){s=Z.data.data,t=Z.data.total});case 4:return f.abrupt("return",{data:s,success:!0,total:t});case 5:case"end":return f.stop()}},u)}));return function(u){return l.apply(this,arguments)}}(),columns:$e}),(0,e.jsx)(me,{onFinish:function(){var l=(0,v.Z)((0,d.Z)().mark(function u(a){var s;return(0,d.Z)().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:s=!1,a.id&&(a.platformType==0&&(a.MemberInfo_Id=a.id),s=Oe(a)),s&&(C(!1),m.current&&m.current.reload());case 3:case"end":return r.stop()}},u)}));return function(u){return l.apply(this,arguments)}}(),onCancel:function(){w(void 0),C(!1)},createModalVisible:T,values:b||{}}),(0,e.jsx)(Y.Z,{title:"\u4F1A\u5458\u6807\u7B7E",visible:Ee,onOk:function(){Le(b.platformType,b.platformType==0?b.id:b.memberInfo_Id)&&D(!1)},onCancel:function(){w([]),D(!1)},children:(0,e.jsx)(e.Fragment,{children:(0,e.jsx)(Ce,{options:we,value:te,onChange:function(u){ae(u)}})})}),(0,e.jsx)(be,{onClose:function(){g(!1)},memberId:b==null?void 0:b.id,integralRecordVisible:$})]})},Be=Se}}]);