Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

p__Company__Vip__index.bc5ab70f.async.js 12KB

1
  1. "use strict";(self.webpackChunk=self.webpackChunk||[]).push([[259],{2985:function(je,N,n){n.r(N),n.d(N,{default:function(){return ve}});var ne=n(5574),Z=n.n(ne),s=n(62435),z=n(59530),G=n(28459),te=n(15009),p=n.n(te),ae=n(99289),I=n.n(ae),le=n(95338),k=n(42075),V=n(26412),re=n(25278),$=n(14726),L=n(17788),h=n(78045),W=n(71230),o=n(15746),T=n(39680),e=n(86074),se=function(t){var c=t.dispatch,w=t.getId,g=t.openModel,u=(0,s.useRef)(),C=(0,s.useState)([]),M=Z()(C,2),P=M[0],D=M[1],S=(0,s.useState)(0),x=Z()(S,2),v=x[0],b=x[1],m=(0,s.useState)(1),F=Z()(m,2),l=F[0],d=F[1],j=(0,s.useState)(10),Y=Z()(j,2),R=Y[0],U=Y[1],me=(0,s.useState)(sessionStorage.getItem("vip_company_info")?JSON.parse(sessionStorage.getItem("vip_company_info")).full_name:""),X=Z()(me,2),q=X[0],_=X[1],ee=function(a){w(a)};(0,s.useEffect)(function(){if(!g.openModal){var i;(i=u.current)===null||i===void 0||i.reload()}return function(){sessionStorage.removeItem("company_info"),sessionStorage.removeItem("post_company_info"),sessionStorage.removeItem("vip_company_info")}},[g.openModal]),(0,s.useEffect)(function(){if(!g.openFeeModal){var i;(i=u.current)===null||i===void 0||i.reload()}},[g.openFeeModal]);var ge=function(a){return(0,e.jsx)(e.Fragment,{children:(0,e.jsx)(k.Z,{direction:"vertical",style:{width:"100%"},children:(0,e.jsxs)(V.Z,{title:"\u57FA\u672C\u4FE1\u606F",bordered:!0,column:3,contentStyle:{fontWeight:"bold"},labelStyle:{width:180},children:[(0,e.jsx)(V.Z.Item,{label:"\u89C1\u4E60\u57FA\u5730",children:a.probation_text}),(0,e.jsx)(V.Z.Item,{label:"\u77E5\u540D\u4F01\u4E1A",children:a.famous_text}),(0,e.jsx)(V.Z.Item,{label:"\u4E1A\u52A1\u5458",children:a.sales})]})})})};return(0,e.jsx)(e.Fragment,{children:(0,e.jsx)(G.ZP,{theme:{token:{colorPrimary:"#4FBE70",colorLink:"#4FBE70"}},children:(0,e.jsx)(le.Z,{scroll:{y:480,x:"auto"},bordered:!0,actionRef:u,dataSource:P,search:{span:8,labelWidth:"auto"},rowSelection:{type:"checkbox"},expandable:{expandedRowRender:ge},columns:[{title:"\u7B5B\u9009\u65E5\u671F",dataIndex:"date_range",hidden:!0,valueType:"dateRange"},{title:"ID",dataIndex:"id",width:200},{title:"\u4F01\u4E1A\u540D\u79F0",dataIndex:"full_name",width:200,valueType:"input",renderFormItem:function(){return(0,e.jsx)(e.Fragment,{children:(0,e.jsx)(re.Z,{placeholder:"\u8BF7\u8F93\u5165\u4F01\u4E1A\u540D\u79F0",value:q,onChange:function(r){_(r.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(a,r,B){return[(0,e.jsx)($.ZP,{type:"link",onClick:function(){ee(r.id),c({type:"openModel/getOpenModal",payload:!0})},children:"\u7F16\u8F91"},"1"),(0,e.jsx)($.ZP,{type:"link",onClick:function(){ee(r.id),c({type:"openModel/getOpenFeeModal",payload:!0})},children:"\u53D8\u66F4\u70B9\u6570"},"2")]}}],rowKey:"id",pagination:{current:l,pageSize:R,showSizeChanger:!0,total:v,pageSizeOptions:[9,18,27,99],onChange:function(a,r){d(a),U(r)},onShowSizeChange:function(a,r){d(a),U(r)}},request:I()(p()().mark(function i(){var a,r=arguments;return p()().wrap(function(E){for(;;)switch(E.prev=E.next){case 0:return a=r.length>0&&r[0]!==void 0?r[0]:{},E.abrupt("return",(0,T.oJ8)({page:l,pagesize:R,sort:"id",sortby:"desc",keyword:q,start_date:a.date_range?a.date_range[0]:"",end_date:a.date_range?a.date_range[1]:""}).then(function(y){D(y.data.list),b(y.data.total)}));case 2:case"end":return E.stop()}},i)})),onReset:function(){var a;sessionStorage.getItem("vip_company_info")&&sessionStorage.removeItem("vip_company_info"),_(""),(a=u.current)===null||a===void 0||a.reload()},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)(h.ZP.Group,{size:"small",onChange:function(){var r=I()(p()().mark(function B(E){var y;return p()().wrap(function(A){for(;;)switch(A.prev=A.next){case 0:(y=u.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)(o.Z,{span:12,children:(0,e.jsx)(h.ZP,{value:1,children:"\u8BD5\u7528\u7533\u8BF7\u4E2D"})}),(0,e.jsx)(o.Z,{span:12,children:(0,e.jsx)(h.ZP,{value:1,children:"\u8BD5\u7528\u6B63\u5F0F"})}),(0,e.jsx)(o.Z,{span:12,children:(0,e.jsx)(h.ZP,{value:1,children:"\u666E\u901A\u7533\u8BF7\u4E2D"})}),(0,e.jsx)(o.Z,{span:12,children:(0,e.jsx)(h.ZP,{value:1,children:"\u666E\u901A\u6B63\u5F0F"})}),(0,e.jsx)(o.Z,{span:12,children:(0,e.jsx)(h.ZP,{value:1,children:"VIP\u7533\u8BF7\u4E2D"})}),(0,e.jsx)(o.Z,{span:12,children:(0,e.jsx)(h.ZP,{value:1,children:"VIP\u6B63\u5F0F"})})]})}),(0,e.jsx)("h4",{style:{fontWeight:"bold"},children:"\u65F6\u957F\uFF1A"}),(0,e.jsx)(h.ZP.Group,{size:"small",onChange:function(){var r=I()(p()().mark(function B(E){var y;return p()().wrap(function(A){for(;;)switch(A.prev=A.next){case 0:(y=u.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)(o.Z,{span:12,children:(0,e.jsx)(h.ZP,{value:1,children:"1\u5929"})}),(0,e.jsx)(o.Z,{span:12,children:(0,e.jsx)(h.ZP,{value:1,children:"3\u5929"})}),(0,e.jsx)(o.Z,{span:12,children:(0,e.jsx)(h.ZP,{value:1,children:"7\u5929"})}),(0,e.jsx)(o.Z,{span:12,children:(0,e.jsx)(h.ZP,{value:1,children:"15\u5929"})}),(0,e.jsx)(o.Z,{span:12,children:(0,e.jsx)(h.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"})]}})})})},oe=(0,z.connect)(function(f){var t=f.dictModel,c=f.openModel;return{dictModel:t,openModel:c}})(se),H=n(97269),O=n(86615),ue=n(34540),J=n(5966),K=n(86250),Q=n(68872),Fe={label:"full_name",value:"id"},de=function(t){var c=t.dispatch,w=t.dictModel,g=t.openModel,u=t.id,C=(0,s.useRef)(),M=(0,s.useState)(!1),P=Z()(M,2),D=P[0],S=P[1],x=(0,s.useState)(null),v=Z()(x,2),b=v[0],m=v[1];return(0,s.useEffect)(function(){S(g.openModal)},[g.openModal]),(0,e.jsx)(e.Fragment,{children:(0,e.jsx)(G.ZP,{theme:{token:{colorPrimary:"#4FBE70"}},children:(0,e.jsx)(L.Z,{open:D,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)(H.A,{formRef:C,request:I()(p()().mark(function F(){var l;return p()().wrap(function(j){for(;;)switch(j.prev=j.next){case 0:if(!u){j.next=6;break}return j.next=3,(0,T.H2t)({id:u});case 3:return l=j.sent,l.data.dateRange=[l.data.start_date?l.data.start_date:null,l.data.end_date?l.data.end_date:null],j.abrupt("return",l.data);case 6:case"end":return j.stop()}},F)})),submitter:{searchConfig:{resetText:"\u53D6\u6D88",submitText:"\u4FDD\u5B58"},render:function(l,d){return(0,e.jsxs)(K.Z,{justify:"flex-end",children:[" ",(0,e.jsx)(k.Z,{children:d})]})},onReset:function(){m(null),S(!1)}},onFinish:function(){var F=I()(p()().mark(function l(d){var j;return p()().wrap(function(R){for(;;)switch(R.prev=R.next){case 0:return d.id=u,d.start_date=d.dateRange&&d.dateRange.length>0?d.dateRange[0]:"",d.end_date=d.dateRange&&d.dateRange.length>0?d.dateRange[1]:"",delete d.dateRange,R.next=6,(0,T.Pgr)(d);case 6:j=R.sent,Q.ZP.success("\u63D0\u4EA4\u6210\u529F"),c({type:"openModel/getOpenModal",payload:!1});case 9:case"end":return R.stop()}},l)}));return function(l){return F.apply(this,arguments)}}(),children:(0,e.jsxs)(W.Z,{gutter:[16,16],children:[(0,e.jsx)(o.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)(o.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)(o.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)(o.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)(o.Z,{span:12,children:(0,e.jsx)(ue.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)(o.Z,{span:12,children:(0,e.jsx)(J.Z,{name:"sale",label:"\u4E1A\u52A1\u5458",placeholder:"\u8BF7\u8F93\u5165\u4E1A\u52A1\u5458"})})]})})})})})},ie=(0,z.connect)(function(f){var t=f.dictModel,c=f.openModel;return{dictModel:t,openModel:c}})(de),ce=n(31199),ye={label:"full_name",value:"id"},pe=function(t){var c=t.dispatch,w=t.dictModel,g=t.openModel,u=t.id,C=(0,s.useRef)(),M=(0,s.useState)(!1),P=Z()(M,2),D=P[0],S=P[1];return(0,s.useEffect)(function(){S(g.openFeeModal)},[g.openFeeModal]),(0,e.jsx)(e.Fragment,{children:(0,e.jsx)(G.ZP,{theme:{token:{colorPrimary:"#4FBE70"},components:{Segmented:{itemSelectedBg:"#19be6e",itemSelectedColor:"#ffffff"}}},children:(0,e.jsx)(L.Z,{open:D,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)(H.A,{request:I()(p()().mark(function x(){var v;return p()().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:if(!u){m.next=6;break}return m.next=3,(0,T.H2t)({id:u});case 3:return v=m.sent,v.data.fee=v.data.balance_fee,m.abrupt("return",v.data);case 6:case"end":return m.stop()}},x)})),formRef:C,submitter:{searchConfig:{resetText:"\u53D6\u6D88",submitText:"\u4FDD\u5B58"},render:function(v,b){return(0,e.jsxs)(K.Z,{justify:"flex-end",children:[" ",(0,e.jsx)(k.Z,{children:b})]})},onReset:function(){S(!1)}},onFinish:function(){var x=I()(p()().mark(function v(b){var m;return p()().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return b.id=u,l.next=3,(0,T.aut)(b);case 3:m=l.sent,Q.ZP.success("\u63D0\u4EA4\u6210\u529F"),c({type:"openModel/getOpenFeeModal",payload:!1});case 6:case"end":return l.stop()}},v)}));return function(v){return x.apply(this,arguments)}}(),children:[(0,e.jsx)(ce.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)(J.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,z.connect)(function(f){var t=f.dictModel,c=f.openModel;return{dictModel:t,openModel:c}})(pe),he=function(t){var c=t.dispatch,w=t.openModel,g=(0,s.useState)(0),u=Z()(g,2),C=u[0],M=u[1],P=function(S){M(S)};return(0,s.useEffect)(function(){w.openModal||M(0)},[w.openModal]),(0,e.jsx)(e.Fragment,{children:(0,e.jsxs)(G.ZP,{theme:{token:{colorPrimary:"#4FBE70"}},children:[(0,e.jsx)(oe,{getId:P}),(0,e.jsx)(ie,{id:C}),(0,e.jsx)(fe,{id:C})]})})},ve=(0,z.connect)(function(f){var t=f.openModel;return{openModel:t}})(he)}}]);