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