1 |
- "use strict";(self.webpackChunk=self.webpackChunk||[]).push([[259],{2985:function(je,N,a){a.r(N),a.d(N,{default:function(){return ve}});var te=a(5574),Z=a.n(te),d=a(62435),D=a(59530),V=a(28459),ne=a(15009),p=a.n(ne),le=a(99289),I=a.n(le),re=a(95338),k=a(42075),G=a(26412),ue=a(25278),$=a(14726),L=a(17788),f=a(78045),W=a(71230),u=a(15746),T=a(39680),e=a(86074),se=function(t){var c=t.dispatch,w=t.getId,x=t.openModel,o=(0,d.useRef)(),b=(0,D.useSearchParams)(),M=Z()(b,2),g=M[0],z=M[1],C=(0,d.useState)([]),j=Z()(C,2),m=j[0],E=j[1],v=(0,d.useState)(0),P=Z()(v,2),l=P[0],i=P[1],F=(0,d.useState)(1),Y=Z()(F,2),R=Y[0],X=Y[1],xe=(0,d.useState)(10),q=Z()(xe,2),_=q[0],ee=q[1],ae=function(n){w(n)};(0,d.useEffect)(function(){if(!x.openModal){var s;(s=o.current)===null||s===void 0||s.reload()}},[x.openModal]),(0,d.useEffect)(function(){if(!x.openFeeModal){var s;(s=o.current)===null||s===void 0||s.reload()}},[x.openFeeModal]);var ge=function(n){return(0,e.jsx)(e.Fragment,{children:(0,e.jsx)(k.Z,{direction:"vertical",style:{width:"100%"},children:(0,e.jsxs)(G.Z,{title:"\u57FA\u672C\u4FE1\u606F",bordered:!0,column:3,contentStyle:{fontWeight:"bold"},labelStyle:{width:180},children:[(0,e.jsx)(G.Z.Item,{label:"\u89C1\u4E60\u57FA\u5730",children:n.probation_text}),(0,e.jsx)(G.Z.Item,{label:"\u77E5\u540D\u4F01\u4E1A",children:n.famous_text}),(0,e.jsx)(G.Z.Item,{label:"\u4E1A\u52A1\u5458",children:n.sales})]})})})};return(0,e.jsx)(e.Fragment,{children:(0,e.jsx)(V.ZP,{theme:{token:{colorPrimary:"#4FBE70",colorLink:"#4FBE70"}},children:(0,e.jsx)(re.Z,{scroll:{y:480,x:"auto"},bordered:!0,actionRef:o,dataSource:m,search:{span:8,labelWidth:"auto"},rowSelection:{type:"checkbox"},expandable:{expandedRowRender:ge},columns:[{title:"\u7B5B\u9009\u65E5\u671F",dataIndex:"date_range",hidden:!0,valueType:"dateRange",search:{transform:function(n){return{start_date:n[0],end_date:n[1]}}}},{title:"ID",dataIndex:"id",width:200},{title:"\u4F01\u4E1A\u540D\u79F0",dataIndex:"full_name",width:200,renderFormItem:function(n,r){var B=r.type,S=r.defaultRender;return(0,e.jsx)(ue.Z,{placeholder:"\u8BF7\u8F93\u5165\u4F01\u4E1A\u540D\u79F0",defaultValue:g.get("full_name"),onChange:function(H){console.log(H.target.value)}})}},{title:"\u4F1A\u5458\u7C7B\u578B",dataIndex:"member_type_text",width:200,search:!1},{title:"\u4F1A\u5458\u72B6\u6001",dataIndex:"member_status",width:200,search:!1,valueEnum:{0:{text:"\u5168\u90E8"},1:{text:"\u5F85\u5BA1",status:"Error"},2:{text:"\u6B63\u5E38",status:"Processing"},3:{text:"\u5230\u671F",status:"Error"},4:{text:"\u63A8\u8350",status:"Error"}}},{title:"\u5F00\u59CB\u65F6\u95F4",dataIndex:"start_date",width:200,search:!1},{title:"\u5230\u671F\u65F6\u95F4",dataIndex:"end_date",width:200,search:!1},{title:"\u5269\u4F59\u70B9\u6570",dataIndex:"balance_fee",width:200,search:!1},{title:"\u64CD\u4F5C",key:"option",valueType:"option",render:function(n,r,B){return[(0,e.jsx)($.ZP,{type:"link",onClick:function(){ae(r.id),c({type:"openModel/getOpenModal",payload:!0})},children:"\u7F16\u8F91"},"1"),(0,e.jsx)($.ZP,{type:"link",onClick:function(){ae(r.id),c({type:"openModel/getOpenFeeModal",payload:!0})},children:"\u53D8\u66F4\u70B9\u6570"},"2")]}}],rowKey:"id",pagination:{current:R,pageSize:_,showSizeChanger:!0,total:l,pageSizeOptions:[9,18,27,99],onChange:function(n,r){X(n),ee(r)},onShowSizeChange:function(n,r){X(n),ee(r)}},request:I()(p()().mark(function s(){var n,r=arguments;return p()().wrap(function(S){for(;;)switch(S.prev=S.next){case 0:return n=r.length>0&&r[0]!==void 0?r[0]:{},S.abrupt("return",(0,T.oJ8)({page:R,pagesize:_,sort:"id",sortby:"desc",keyword:g.get("full_name")?g.get("full_name"):n.full_name,id:n.id,start_date:n.start_date,end_date:n.end_date}).then(function(y){E(y.data.list),i(y.data.total)}));case 2:case"end":return S.stop()}},s)})),headerTitle:"VIP\u4F01\u4E1A\u5217\u8868",toolBarRender:function(){return[(0,e.jsx)($.ZP,{type:"primary",onClick:function(){L.Z.confirm({title:"\u8BF7\u9009\u62E9\u5BF9\u6279\u91CF\u6570\u636E\u5F00\u901A\u54EA\u79CD\u4F1A\u5458\u7C7B\u578B",content:(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("div",{children:"\u53C2\u6570\uFF1A id, member_type,start_date,end_date "}),(0,e.jsx)("h4",{style:{fontWeight:"bold"},children:"\u7C7B\u578B\uFF1A"}),(0,e.jsx)(f.ZP.Group,{size:"small",onChange:function(){var r=I()(p()().mark(function B(S){var y;return p()().wrap(function(A){for(;;)switch(A.prev=A.next){case 0:(y=o.current)===null||y===void 0||y.reload();case 1:case"end":return A.stop()}},B)}));return function(B){return r.apply(this,arguments)}}(),children:(0,e.jsxs)(W.Z,{gutter:[20,20],style:{padding:20},children:[(0,e.jsx)(u.Z,{span:12,children:(0,e.jsx)(f.ZP,{value:1,children:"\u8BD5\u7528\u7533\u8BF7\u4E2D"})}),(0,e.jsx)(u.Z,{span:12,children:(0,e.jsx)(f.ZP,{value:1,children:"\u8BD5\u7528\u6B63\u5F0F"})}),(0,e.jsx)(u.Z,{span:12,children:(0,e.jsx)(f.ZP,{value:1,children:"\u666E\u901A\u7533\u8BF7\u4E2D"})}),(0,e.jsx)(u.Z,{span:12,children:(0,e.jsx)(f.ZP,{value:1,children:"\u666E\u901A\u6B63\u5F0F"})}),(0,e.jsx)(u.Z,{span:12,children:(0,e.jsx)(f.ZP,{value:1,children:"VIP\u7533\u8BF7\u4E2D"})}),(0,e.jsx)(u.Z,{span:12,children:(0,e.jsx)(f.ZP,{value:1,children:"VIP\u6B63\u5F0F"})})]})}),(0,e.jsx)("h4",{style:{fontWeight:"bold"},children:"\u65F6\u957F\uFF1A"}),(0,e.jsx)(f.ZP.Group,{size:"small",onChange:function(){var r=I()(p()().mark(function B(S){var y;return p()().wrap(function(A){for(;;)switch(A.prev=A.next){case 0:(y=o.current)===null||y===void 0||y.reload();case 1:case"end":return A.stop()}},B)}));return function(B){return r.apply(this,arguments)}}(),children:(0,e.jsxs)(W.Z,{gutter:[20,20],style:{padding:20},children:[(0,e.jsx)(u.Z,{span:12,children:(0,e.jsx)(f.ZP,{value:1,children:"1\u5929"})}),(0,e.jsx)(u.Z,{span:12,children:(0,e.jsx)(f.ZP,{value:1,children:"3\u5929"})}),(0,e.jsx)(u.Z,{span:12,children:(0,e.jsx)(f.ZP,{value:1,children:"7\u5929"})}),(0,e.jsx)(u.Z,{span:12,children:(0,e.jsx)(f.ZP,{value:1,children:"15\u5929"})}),(0,e.jsx)(u.Z,{span:12,children:(0,e.jsx)(f.ZP,{value:1,children:"30\u5929"})})]})})]}),onOk:function(){},onCancel:function(){console.log("Cancel")},okText:"\u4FDD\u5B58",cancelText:"\u53D6\u6D88",centered:!0})},children:"\u6279\u91CF\u5F00\u901A\u4F1A\u5458"})]}})})})},de=(0,D.connect)(function(h){var t=h.dictModel,c=h.openModel;return{dictModel:t,openModel:c}})(se),J=a(97269),O=a(86615),oe=a(34540),K=a(5966),Q=a(86250),U=a(68872),Fe={label:"full_name",value:"id"},ie=function(t){var c=t.dispatch,w=t.dictModel,x=t.openModel,o=t.id,b=(0,d.useRef)(),M=(0,d.useState)(!1),g=Z()(M,2),z=g[0],C=g[1],j=(0,d.useState)(null),m=Z()(j,2),E=m[0],v=m[1];return(0,d.useEffect)(function(){C(x.openModal)},[x.openModal]),(0,e.jsx)(e.Fragment,{children:(0,e.jsx)(V.ZP,{theme:{token:{colorPrimary:"#4FBE70"}},children:(0,e.jsx)(L.Z,{open:z,title:"\u7F16\u8F91VIP",centered:!0,maskClosable:!1,footer:null,destroyOnClose:!0,width:680,onCancel:function(){c({type:"openModel/getOpenModal",payload:!1})},children:(0,e.jsx)(J.A,{formRef:b,request:I()(p()().mark(function P(){var l;return p()().wrap(function(F){for(;;)switch(F.prev=F.next){case 0:if(!o){F.next=6;break}return F.next=3,(0,T.H2t)({id:o});case 3:return l=F.sent,l.data.dateRange=[l.data.start_date?l.data.start_date:null,l.data.end_date?l.data.end_date:null],F.abrupt("return",l.data);case 6:case"end":return F.stop()}},P)})),submitter:{searchConfig:{resetText:"\u53D6\u6D88",submitText:"\u4FDD\u5B58"},render:function(l,i){return(0,e.jsxs)(Q.Z,{justify:"flex-end",children:[" ",(0,e.jsx)(k.Z,{children:i})]})},onReset:function(){v(null),C(!1)}},onFinish:function(){var P=I()(p()().mark(function l(i){var F;return p()().wrap(function(R){for(;;)switch(R.prev=R.next){case 0:return i.id=o,i.start_date=i.dateRange&&i.dateRange.length>0?i.dateRange[0]:"",i.end_date=i.dateRange&&i.dateRange.length>0?i.dateRange[1]:"",delete i.dateRange,R.next=6,(0,T.Pgr)(i);case 6:F=R.sent,U.ZP.success("\u63D0\u4EA4\u6210\u529F"),c({type:"openModel/getOpenModal",payload:!1});case 9:case"end":return R.stop()}},l)}));return function(l){return P.apply(this,arguments)}}(),children:(0,e.jsxs)(W.Z,{gutter:[16,16],children:[(0,e.jsx)(u.Z,{span:6,children:(0,e.jsx)(O.Z.Group,{name:"probation",label:"\u89C1\u4E60\u57FA\u5730",fieldProps:{buttonStyle:"solid"},options:[{label:"\u662F",value:1},{label:"\u5426",value:2}]})}),(0,e.jsx)(u.Z,{span:6,children:(0,e.jsx)(O.Z.Group,{name:"famous",label:"\u77E5\u540D\u4F01\u4E1A",fieldProps:{buttonStyle:"solid"},options:[{label:"\u662F",value:1},{label:"\u5426",value:2}]})}),(0,e.jsx)(u.Z,{span:24,children:(0,e.jsx)(O.Z.Group,{name:"member_type",label:"\u4F1A\u5458\u7C7B\u578B",fieldProps:{buttonStyle:"solid"},options:[{label:"\u8BD5\u7528\u7533\u8BF7\u4E2D",value:1},{label:"\u8BD5\u7528\u6B63\u5F0F",value:2},{label:"\u666E\u901A\u7533\u8BF7\u4E2D",value:3},{label:"\u666E\u901A\u6B63\u5F0F",value:4},{label:"VIP\u7533\u8BF7\u4E2D",value:5},{label:"VIP\u6B63\u5F0F",value:6}]})}),(0,e.jsx)(u.Z,{span:24,children:(0,e.jsx)(O.Z.Group,{name:"member_status",label:"\u4F1A\u5458\u72B6\u6001",fieldProps:{buttonStyle:"solid"},options:[{label:"\u5F85\u5BA1",value:1},{label:"\u6B63\u5E38",value:2},{label:"\u5230\u671F",value:3},{label:"\u63A8\u8350",value:4}]})}),(0,e.jsx)(u.Z,{span:12,children:(0,e.jsx)(oe.Z,{name:"dateRange",label:"\u4F1A\u5458\u751F\u6548\u65F6\u95F4",placeholder:["\u4F1A\u5458\u751F\u6548\u65F6\u95F4","\u4F1A\u5458\u5931\u6548\u65F6\u95F4"],fieldProps:{format:"YYYY-MM-DD"}})}),(0,e.jsx)(u.Z,{span:12,children:(0,e.jsx)(K.Z,{name:"sale",label:"\u4E1A\u52A1\u5458",placeholder:"\u8BF7\u8F93\u5165\u4E1A\u52A1\u5458"})})]})})})})})},ce=(0,D.connect)(function(h){var t=h.dictModel,c=h.openModel;return{dictModel:t,openModel:c}})(ie),pe=a(31199),ye={label:"full_name",value:"id"},he=function(t){var c=t.dispatch,w=t.dictModel,x=t.openModel,o=t.id,b=(0,d.useRef)(),M=(0,d.useState)(!1),g=Z()(M,2),z=g[0],C=g[1];return(0,d.useEffect)(function(){C(x.openFeeModal)},[x.openFeeModal]),(0,e.jsx)(e.Fragment,{children:(0,e.jsx)(V.ZP,{theme:{token:{colorPrimary:"#4FBE70"},components:{Segmented:{itemSelectedBg:"#19be6e",itemSelectedColor:"#ffffff"}}},children:(0,e.jsx)(L.Z,{open:z,title:"\u53D8\u66F4\u70B9\u6570",centered:!0,maskClosable:!1,footer:null,destroyOnClose:!0,width:480,onCancel:function(){c({type:"openModel/getOpenFeeModal",payload:!1})},children:(0,e.jsxs)(J.A,{request:I()(p()().mark(function j(){var m;return p()().wrap(function(v){for(;;)switch(v.prev=v.next){case 0:if(!o){v.next=6;break}return v.next=3,(0,T.H2t)({id:o});case 3:return m=v.sent,m.data.fee=m.data.balance_fee,v.abrupt("return",m.data);case 6:case"end":return v.stop()}},j)})),formRef:b,submitter:{searchConfig:{resetText:"\u53D6\u6D88",submitText:"\u4FDD\u5B58"},render:function(m,E){return(0,e.jsxs)(Q.Z,{justify:"flex-end",children:[" ",(0,e.jsx)(k.Z,{children:E})]})},onReset:function(){C(!1)}},onFinish:function(){var j=I()(p()().mark(function m(E){var v;return p()().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return E.id=o,l.next=3,(0,T.aut)(E);case 3:v=l.sent,U.ZP.success("\u63D0\u4EA4\u6210\u529F"),c({type:"openModel/getOpenFeeModal",payload:!1});case 6:case"end":return l.stop()}},m)}));return function(m){return j.apply(this,arguments)}}(),children:[(0,e.jsx)(pe.Z,{label:"\u70B9\u6570\u503C",placeholder:"\u70B9\u6570\u503C",name:"fee",min:0,rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u70B9\u6570\u503C"}]}),(0,e.jsx)(O.Z.Group,{name:"change_type",label:"\u53D8\u66F4\u7C7B\u578B",fieldProps:{buttonStyle:"solid"},options:[{label:"\u589E\u52A0",value:1},{label:"\u6263\u51CF",value:2}],rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u53D8\u66F4\u7C7B\u578B"}]}),(0,e.jsx)(K.Z,{name:"remark",label:"\u5907\u6CE8\u8BF4\u660E",placeholder:"\u5907\u6CE8\u8BF4\u660E",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5907\u6CE8\u8BF4\u660E"}]})]})})})})},fe=(0,D.connect)(function(h){var t=h.dictModel,c=h.openModel;return{dictModel:t,openModel:c}})(he),me=function(t){var c=t.dispatch,w=t.openModel,x=(0,d.useState)(0),o=Z()(x,2),b=o[0],M=o[1],g=function(C){M(C)};return(0,d.useEffect)(function(){w.openModal||M(0)},[w.openModal]),(0,e.jsx)(e.Fragment,{children:(0,e.jsxs)(V.ZP,{theme:{token:{colorPrimary:"#4FBE70"}},children:[(0,e.jsx)(de,{getId:g}),(0,e.jsx)(ce,{id:b}),(0,e.jsx)(fe,{id:b})]})})},ve=(0,D.connect)(function(h){var t=h.openModel;return{openModel:t}})(me)}}]);
|