"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[5258],{46242:function(J,P,t){t.r(P);var T=t(26068),u=t.n(T),M=t(67825),p=t.n(M),R=t(90228),m=t.n(R),b=t(87999),f=t.n(b),j=t(48305),E=t.n(j),h=t(19869),x=t(92694),c=t(50959),v=t(98984),A=t(50159),C=t(16030),B=t(35384),D=t(49523),L=t(52495),i=t(11527),W=["type","defaultRender","formItemProps","fieldProps"],K=["type","defaultRender","formItemProps","fieldProps"],U=["type","defaultRender","formItemProps","fieldProps"],g=function(){var S=(0,c.useRef)(),G=(0,c.useState)(null),y=E()(G,2),F=y[0],N=y[1],$=(0,c.useState)([]),I=E()($,2),Z=I[0],z=I[1],w=function(){var s=f()(m()().mark(function n(e){var _,r,l;return m()().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.next=2,(0,L.rb)({userName:e});case 2:_=d.sent,r=_.success,l=_.data,l.records.map(function(a){a.userName=a.userName+" "+a.phone}),z(l.records);case 7:case"end":return d.stop()}},n)}));return function(e){return s.apply(this,arguments)}}(),H=[{title:"ID",dataIndex:"id",valueType:"text",search:!1},{title:"\u7528\u6237ID",dataIndex:"userId",valueType:"text",renderFormItem:function(n,e,_){var r=e.type,l=e.defaultRender,o=e.formItemProps,d=e.fieldProps,a=p()(e,W);return(0,i.jsx)(v.Z,u()(u()({},d),{},{allowClear:!0,showSearch:!0,placeholder:"\u8BF7\u8F93\u5165\u7528\u6237\u540D",style:{width:"100%"},filterOption:!1,onSearch:function(O){O&&w(O)},fieldNames:{label:"userName",value:"id"},options:Z}))}},{title:"\u8BB0\u5F55\u540D\u79F0",dataIndex:"recordName",valueType:"text",search:!1},{title:"\u5F53\u524D\u79EF\u5206\u4F59\u989D",dataIndex:"curPoints",valueType:"text",search:!1},{title:"\u79EF\u5206\u53D8\u52A8",dataIndex:"points",valueType:"text",search:!1},{title:"\u6765\u6E90",dataIndex:"sourceType",valueType:"text",search:!0,render:function(n,e){return(e==null?void 0:e.sourceType)==1?"\u8BA2\u5355":(e==null?void 0:e.sourceType)==2?"\u5145\u7535\u6869\u670D\u52A1\u8D39":(e==null?void 0:e.sourceType)==3?"\u5145\u503C":(e==null?void 0:e.sourceType)==4?"\u63D0\u73B0":"-"},renderFormItem:function(n,e,_){var r=e.type,l=e.defaultRender,o=e.formItemProps,d=e.fieldProps,a=p()(e,K);return(0,i.jsx)(v.Z,u()(u()({},d),{},{allowClear:!0,style:{width:"100%"},filterOption:!1,fieldNames:{label:"name",value:"id"},options:[{name:"\u8BA2\u5355",id:1},{name:"\u5145\u7535\u6869\u670D\u52A1\u8D39",id:2},{name:"\u5145\u503C",id:3},{name:"\u63D0\u73B0",id:4}]}))}},{title:"\u8BB0\u5F55\u7C7B\u578B",dataIndex:"type",valueType:"text",search:!0,render:function(n,e){var _,r=D;return(_=r.find(function(l){return l.id==e.type}))===null||_===void 0?void 0:_.name},renderFormItem:function(n,e,_){var r=e.type,l=e.defaultRender,o=e.formItemProps,d=e.fieldProps,a=p()(e,U);return(0,i.jsx)(v.Z,u()(u()({},d),{},{allowClear:!0,style:{width:"100%"},filterOption:!1,fieldNames:{label:"name",value:"id"},options:D}))}},{title:"\u521B\u5EFA\u65F6\u95F4",dataIndex:"createTime",valueType:"dateRange",search:{transform:function(n){return{createTimeBegin:n[0],createTimeEnd:n[1]}}},render:function(n,e){return e==null?void 0:e.createTime}}];return(0,i.jsx)(C._z,{children:(0,i.jsx)("div",{style:{width:"100%",float:"right"},children:(0,i.jsx)(B.Z,{actionRef:S,rowKey:"id",search:{labelWidth:120,defaultCollapsed:!1},toolBarRender:function(){return[(0,i.jsx)(A.ZP,{type:"primary",onClick:f()(m()().mark(function n(){var e;return m()().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,(0,h.G6)(F);case 2:e=r.sent,(0,x.u1)(e,"\u79EF\u5206\u53D8\u52A8\u8BB0\u5F55");case 4:case"end":return r.stop()}},n)})),children:"\u5BFC\u51FA"})]},request:function(){var s=f()(m()().mark(function n(e,_,r){var l,o;return m()().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return e.pointType=1,N(e),a.next=4,(0,h.I7)(e);case 4:return l=a.sent,o=l.data,a.abrupt("return",{data:(o==null?void 0:o.records)||[],total:o==null?void 0:o.total});case 7:case"end":return a.stop()}},n)}));return function(n,e,_){return s.apply(this,arguments)}}(),columns:H},"logList")})})};P.default=g}}]);
