"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[857],{46701:function(le,O,t){t.r(O);var U=t(15009),u=t.n(U),B=t(97857),E=t.n(B),g=t(99289),D=t.n(g),K=t(5574),f=t.n(K),L=t(92296),o=t(31847),S=t(90930),W=t(85601),Z=t(57470),P=t(64317),F=t(34540),z=t(35312),$=t(13169),I=t(16250),N=t(27484),w=t.n(N),G=t(9220),c=t(67294),H=t(96974),x=t(48357),n=t(85893),J=function(){var j=(0,c.useRef)(),Q=(0,z.useIntl)(),d=function(){return window.innerWidth<=768},V=(0,c.useState)({deviceId:{show:!d()},appName:{show:!d()},platform:{show:!d()},deviceBrand:{show:!d()},deviceName:{show:!d()},ip:{show:!d()},advType:{show:!d()}}),T=f()(V,2),X=T[0],Y=T[1],k=[{title:"\u8BBE\u5907id",dataIndex:"deviceId",valueType:"textarea",ellipsis:!0,copyable:!0},{title:"\u5E94\u7528\u540D\u79F0",hideInSearch:!0,dataIndex:"appName",valueType:"textarea"},{title:"\u5E73\u53F0",dataIndex:"platform",valueEnum:{1:{text:"\u7A7F\u5C71\u7532"},2:{text:"\u817E\u8BAF"},3:{text:"\u767E\u5EA6\u8054\u76DF"},4:{text:"Mintegral"},5:{text:"\u5FEB\u624B"},6:{text:"\u6E38\u53EF\u8D62"},7:{text:"Sigmob"},8:{text:"Admob"}}},{title:"\u5E7F\u544A\u7C7B\u578B",dataIndex:"advType",valueEnum:{1:{text:"\u6A2A\u5E45",status:"Default"},2:{text:"\u63D2\u9875",status:"Processing"},3:{text:"\u6FC0\u52B1\u89C6\u9891",status:"Success"}}},{title:"ecpm(\u5143)",dataIndex:"ecpm",hideInSearch:!0,renderText:function(e){return e/100}},{title:"\u8BBE\u5907\u54C1\u724C",dataIndex:"deviceBrand",hideInSearch:!0,valueType:"textarea"},{title:"\u8BBE\u5907\u540D",dataIndex:"deviceName",hideInSearch:!0,valueType:"textarea"},{title:"ip",dataIndex:"ip",hideInSearch:!0,valueType:"textarea"},{title:"\u65F6\u95F4",hideInSearch:!0,dataIndex:"createdAt",valueType:"dateTime"},{title:"\u65F6\u95F4",hideInTable:!0,dataIndex:"createdAt",valueType:"dateRange"}],q=(0,H.UO)(),p=q.code,ee=function(){var a=D()(u()().mark(function e(i){var s,l,r;return u()().wrap(function(v){for(;;)switch(v.prev=v.next){case 0:return v.next=2,(0,x._5)(E()(E()({},i),{},{code:p}));case 2:return r=v.sent,v.abrupt("return",{data:(s=r.data)===null||s===void 0?void 0:s.data,total:(l=r.data)===null||l===void 0?void 0:l.total,success:!0});case 4:case"end":return v.stop()}},e)}));return function(i){return a.apply(this,arguments)}}(),te=(0,c.useState)(),b=f()(te,2),_=b[0],ae=b[1],ne=(0,c.useState)([]),y=f()(ne,2),C=y[0],re=y[1],M=o.Z.Divider,se=(0,c.useState)(!1),R=f()(se,2),h=R[0],_e=R[1],ie=function(){var a=D()(u()().mark(function e(i){var s;return u()().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,(0,x.d1)({appCode:i});case 2:s=r.sent,s.data&&ae(s.data);case 4:case"end":return r.stop()}},e)}));return function(i){return a.apply(this,arguments)}}(),A=function(){var a=D()(u()().mark(function e(i){var s;return u()().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,(0,x.Zb)(E()(E()({},i),{},{code:p}));case 2:s=r.sent,s.data&&re(s.data);case 4:case"end":return r.stop()}},e)}));return function(i){return a.apply(this,arguments)}}();(0,c.useEffect)(function(){var a;(a=j.current)===null||a===void 0||a.reload(),ie(p),A({code:p})},[p]);var m=function(e){return e?parseFloat((e/1e5).toFixed(2)):0},oe=C.map(function(a){return{date:function(){var e=a.date+"",i=e.slice(0,4),s=e.slice(4,6),l=e.slice(6,8);return"".concat(i,"-").concat(s,"-").concat(l)}(),income:m(a.income)}}),de={data:oe,xField:"date",yField:"income",tooltip:{name:"\u6536\u5165",field:"income"},axis:{date:{title:"\u65E5\u671F"}},title:"\u7D2F\u8BA1"+m(C.reduce(function(a,e){return a+(e.income?e.income:0)},0))+"\u5143",height:400,label:{text:function(e){return e.income>0?e.income:""},textBaseline:"bottom"}};return(0,n.jsx)(S._z,{children:(0,n.jsxs)($.Z,{defaultActiveKey:"1",centered:!0,style:{backgroundColor:"white",padding:"20px"},children:[(0,n.jsx)(I.Z,{tab:"\u5E7F\u544A\u8BE6\u60C5",children:(0,n.jsx)(W.Z,{headerTitle:Q.formatMessage({id:"pages.searchTable.title",defaultMessage:"Enquiry form"}),actionRef:j,rowKey:"key",search:{labelWidth:120},request:ee,columns:k,columnsState:{value:X,onChange:function(e){Y(e)}}})},"1"),(0,n.jsxs)(I.Z,{tab:"\u6570\u636E\u603B\u89C8",children:[(0,n.jsx)(G.Z,{onResize:function(e){_e(e.width<596)},children:(0,n.jsx)(o.Z,{children:(0,n.jsxs)(o.Z.Group,{direction:h?"column":"row",children:[(0,n.jsx)(o.Z,{statistic:{title:"\u4E0A\u6708\u6536\u5165\uFF08\u5143\uFF09",value:m(_==null?void 0:_.lastMonthIncome)}}),(0,n.jsx)(M,{type:h?"horizontal":"vertical"}),(0,n.jsx)(o.Z,{statistic:{title:"\u672C\u6708\u6536\u5165\uFF08\u5143\uFF09",value:m(_==null?void 0:_.thisMonthIncome)}}),(0,n.jsx)(M,{type:h?"horizontal":"vertical"}),(0,n.jsx)(o.Z,{statistic:{title:"\u4ECA\u65E5\u6536\u5165\uFF08\u5143\uFF09",value:m(_==null?void 0:_.todayIncome)}}),(0,n.jsx)(M,{type:h?"horizontal":"vertical"}),(0,n.jsx)(o.Z,{statistic:{title:"\u6628\u65E5\u6536\u5165\uFF08\u5143\uFF09",value:m(_==null?void 0:_.yesterdayIncome)}})]})})},"resize-observer"),(0,n.jsxs)(Z.t,{defaultCollapsed:!0,split:!0,onFinish:A,children:[(0,n.jsx)(P.Z,{label:"\u5E73\u53F0",name:"platform",valueEnum:{1:"\u7A7F\u5C71\u7532",2:"\u817E\u8BAF",3:"\u767E\u5EA6\u8054\u76DF",4:"Mintegral",5:"\u5FEB\u624B",6:"\u6E38\u53EF\u8D62",7:"Sigmob",8:"Admob"}}),(0,n.jsx)(P.Z,{name:"advType",label:"\u5E7F\u544A\u7C7B\u578B",valueEnum:{1:"\u6A2A\u5E45",2:"\u63D2\u9875",3:"\u6FC0\u52B1\u89C6\u9891"}}),(0,n.jsx)(F.Z,{fieldProps:{disabledDate:function(e){return e&&e>=w()().startOf("day")}},name:"date",label:"\u65F6\u95F4"})]}),(0,n.jsx)(L.Z,E()({},de))]},"2")]})})};O.default=J}}]);