1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[5762],{37720:(function(ke,Q,l){l.r(Q),l.d(Q,{default:function(){return re}});var de=l(76979),ce=l.n(de),me=l(37810),v=l.n(me),fe=l(55472),N=l.n(fe),ve=l(98047),W=l.n(ve),b=l(31233),X=l(23855),A=l(37953),he=l(18466),ye=l(6758),xe=l(57704),B=l.n(xe),Se=l(50100),L=l.n(Se),Ae=l(65788),q=l.n(Ae),ge=l(71183),Ce=l(63980),_=l(13595),Ie=l(15322),pe=l(48211),je=l(9182),T=l.n(je),ee=l(55880),e=l(15621),E={1:{label:"\u5546\u54C1\u66DD\u5149\u91CF",bizKey:"TRAFFIC_IMPRESSION_COUNT"},2:{label:"\u5546\u54C1\u70B9\u51FB\u91CF",bizKey:"TRAFFIC_CLICK_COUNT"},4:{label:"\u652F\u4ED8\u4EF6\u6570",bizKey:"TRAFFIC_ORDER_PAY_GOODS_NUM"}};function ae(n){var a,o=n.visible,u=n.mallId,y=n.domain,g=n.onClose,C=(0,A.useState)([T()().subtract(3,"month").startOf("day"),T()().endOf("day")]),I=N()(C,2),S=I[0],p=I[1],P=(0,A.useState)({trendType:1,loadingMap:{},dataMap:{}}),O=N()(P,2),x=O[0],j=O[1],R=(0,A.useCallback)((function(){var d=q()(B()().mark(function t(i,m,M,$e){var K,se,oe,z,w,H,ue;return B()().wrap(function(F){for(;;
1)switch(F.prev=F.next){case 0:return K=0,Object.keys(E).forEach(function(h){var G=Number(h);E[G].bizKey===m&&(K=G)}),j(function(h){return v()(v()({},h),{},{loadingMap:v()(v()({},h.loadingMap),{},L()({},K,!0))})}),se=M[0].format("YYYYMMDD"),oe=M[1].format("YYYYMMDD"),F.prev=5,F.next=8,(0,ee.request)("/api/v1/tool/collection/analysis/trend/search",{method:"POST",data:{mallIdList:[i],bizKey:m,domain:$e,startDate:se,endDate:oe}});case 8:z=F.sent,(z==null?void 0:z.success)===!0&&(H=(z==null||(w=z.data)===null||w===void 0||(w=w[i])===null||w===void 0?void 0:w.trend)||{},ue=Object.keys(H).map(function(h){return{date:h,value:H[h]}}).sort(function(h,G){return h.date.localeCompare(G.date)}),j(function(h){return v()(v()({},h),{},{dataMap:v()(v()({},h.dataMap),{},L()({},K,ue))})}));case 10:return F.prev=10,j(function(h){return v()(v()({},h),{},{loadingMap:v()(v()({},h.loadingMap),{},L()({},K,!1))})}),F.finish(10);case 13:case"end":return F.stop()}},t,null,[[5,,10,13]])}));return function(t,i,m,M){return d.apply(this,arguments)}})(),[]);function V(d){var t=d[1].diff(d[0],"day");return t<=31?"1month":t<=93?"3month":t<=186?"6month":"1year"}var f=V(S);function r(d){var t;p(d);var i=x.trendType,m=(t=E[i])===null||t===void 0?void 0:t.bizKey;u&&m&&R(u,m,d,y)}(0,A.useEffect)(function(){if(u){var d=[T()().subtract(3,"month").startOf("day"),T()().endOf("day")];p(d),j({trendType:1,loadingMap:{1:!0},dataMap:{}}),R(u,E[1].bizKey,d,y)}},[u]);var s=x.trendType;return(0,e.jsx)(Ce.A,{title:"\u5E97\u94FA "+u+" \u6D41\u91CF\u8D8B\u52BF\u5206\u6790",open:o,onCancel:g,footer:null,width:"80vw",style:{minWidth:1e3},destroyOnClose:!0,children:(0,e.jsxs)("div",{style:{display:"flex",flexDirection:"column",height:"calc(80vh - 120px)",overflow:"hidden"},children:[(0,e.jsx)("div",{style:{flexShrink:0},children:(0,e.jsxs)("div",{style:{display:"flex",gap:16,marginBottom:12},children:[(0,e.jsxs)("div",{style:{flex:1},children:[(0,e.jsx)("div",{style:{fontSize:12,color:"#666",marginBottom:4},children:"\u8D8B\u52BF\u7C7B\u578B"}),(0,e.jsx)(_.A.Group,{optionType:"button",buttonStyle:"solid",size:"small",value:x.trendType,onChange:function(t){var i=t.target.value;j(function(m){return v()(v()({},m),{},{trendType:i,loadingMap:v()(v()({},m.loadingMap),{},L()({},i,!0))})}),R(u,E[i].bizKey,S,y)},options:[{label:"\u5546\u54C1\u66DD\u5149\u91CF",value:1},{label:"\u5546\u54C1\u70B9\u51FB\u91CF",value:2},{label:"\u652F\u4ED8\u4EF6\u6570",value:4}]})]}),(0,e.jsxs)("div",{style:{flex:1},children:[(0,e.jsx)("div",{style:{fontSize:12,color:"#666",marginBottom:4},children:"\u65F6\u95F4\u8303\u56F4"}),(0,e.jsxs)("div",{style:{display:"flex",gap:0,alignItems:"center"},children:[(0,e.jsx)(_.A.Group,{optionType:"button",buttonStyle:"solid",size:"small",value:f,style:{flex:1},onChange:function(t){var i=t.target.value,m=T()().endOf("day"),M;i==="1month"?M=T()().subtract(1,"month").startOf("day"):i==="3month"?M=T()().subtract(3,"month").startOf("day"):i==="6month"?M=T()().subtract(6,"month").startOf("day"):i==="1year"&&(M=T()().subtract(1,"year").startOf("day")),r([M,m])},options:[{label:"1\u4E2A\u6708",value:"1month"},{label:"3\u4E2A\u6708",value:"3month"},{label:"6\u4E2A\u6708",value:"6month"},{label:"1\u5E74",value:"1year"}]}),(0,e.jsx)(Ie.A.RangePicker,{size:"small",value:S,style:{flex:1},allowClear:!1,onChange:function(t){t&&t[0]&&t[1]&&r(t)}})]})]})]})}),(0,e.jsx)("div",{style:{flex:1,minHeight:0,position:"relative"},children:x.loadingMap[s]?(0,e.jsx)("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},children:(0,e.jsx)(pe.A,{})}):!x.dataMap[s]||!x.dataMap[s].length?(0,e.jsx)("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",color:"#999",fontSize:14},children:"\u6682\u65E0\u6570\u636E"}):(0,e.jsx)("div",{style:{width:"100%",height:"100%"},children:(0,e.jsx)(ge.A,{data:x.dataMap[s]||[],xField:"date",yField:"value",smooth:!0,color:"#fb7701",legend:!1,xAxis:{label:{autoRotate:!1}},yAxis:{title:{text:((a=E[s])===null||a===void 0?void 0:a.label)||""}},tooltip:{title:"date",items:[function(d){var t;return{name:((t=E[s])===null||t===void 0?void 0:t.label)||"\u6570\u503C",value:(0,b.kT)(d.value)}}]}})})})]})})}var te=l(61272),D=l(47215),be=l(73851),le=l(36519),Te=l(41313),ne=l(99778),U=l(86807),Me=l(64235),Ne=l(19413),$=l(21680),c=l(74436),De=l(58975);function ie(n){return(0,ee.request)("/api/v1/admin/analysis/mallSales",{method:"POST",data:n})}var Fe=[{label:"\u534A\u6258",value:"SEMI"},{label:"\u5168\u6258",value:"KUAJING_FULL"}],Ee=[{label:"\u5168\u7403",value:"agentseller.temu.com"},{label:"\u7F8E\u56FD",value:"agentseller-us.temu.com"},{label:"\u6B27\u533A",value:"agentseller-eu.temu.com"}],Oe={0:{text:"\u5168\u7403"},1:{text:"\u7F8E\u56FD"},2:{text:"\u6B27\u533A"}};function Re(n){return k.apply(this,arguments)}function k(){return k=q()(B()().mark(function n(a){return B()().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return u.abrupt("return",ie(v()(v()({},a.formValues),{},{page:a.page,pageSize:a.pageSize,orderBy:"last7DaySaleVolume",asc:!1})));case 1:case"end":return u.stop()}},n)})),k.apply(this,arguments)}function Ve(){var n=D.A.useForm(),a=N()(n,1),o=a[0],u=(0,X.Q_)(Re,{pageSize:20}),y=u.list,g=u.total,C=u.page,I=u.pageSize,S=u.loading,p=u.fetchList,P=(0,A.useState)({visible:!1,mallId:""}),O=N()(P,2),x=O[0],j=O[1],R=(0,A.useState)({visible:!1,mallId:"",domain:""}),V=N()(R,2),f=V[0],r=V[1],s=function(i){j({visible:!0,mallId:i.mallId})},d=function(i){r({visible:!0,mallId:i.mallId,domain:i.domain})};return(0,e.jsxs)($.A,{loading:S,total:g,page:C,pageSize:I,onPageChange:function(i){p(i)},children:[(0,e.jsx)(De.A,{children:(0,e.jsxs)(D.A,{form:o,layout:"vertical",onFinish:function(){p(1,o.getFieldsValue())},children:[(0,e.jsx)(D.A.Item,{label:"\u5E97\u94FAID",name:"mallId",children:(0,e.jsx)(be.A,{size:"small",allowClear:!0,placeholder:"\u8F93\u5165\u5E97\u94FAID"})}),(0,e.jsx)(D.A.Item,{label:"\u5E97\u94FA\u7C7B\u578B",name:"mallType",children:(0,e.jsx)(le.A,{size:"small",allowClear:!0,options:Fe,placeholder:"\u5168\u90E8"})}),(0,e.jsx)(D.A.Item,{label:"\u7AD9\u70B9",name:"domain",children:(0,e.jsx)(le.A,{size:"small",allowClear:!0,options:Ee,placeholder:"\u5168\u90E8"})}),(0,e.jsx)(D.A.Item,{label:"\u5728\u552E\u5546\u54C1\u6570",children:(0,e.jsxs)(Te.A.Compact,{block:!0,children:[(0,e.jsx)(D.A.Item,{name:"onSaleProductCountMin",noStyle:!0,children:(0,e.jsx)(ne.A,{size:"small",style:{width:"100%"},placeholder:"\u6700\u5C0F"})}),(0,e.jsx)(D.A.Item,{name:"onSaleProductCountMax",noStyle:!0,children:(0,e.jsx)(ne.A,{size:"small",style:{width:"100%"},placeholder:"\u6700\u5927"})})]})}),(0,e.jsxs)("div",{style:{display:"flex",gap:8,justifyContent:"flex-end"},children:[(0,e.jsx)(U.A,{size:"small",onClick:function(){o.resetFields(),p(1,o.getFieldsValue())},children:"\u91CD\u7F6E"}),(0,e.jsx)(U.A,{size:"small",type:"primary",onClick:function(){o.submit()},children:"\u67E5\u8BE2"})]})]})}),y.map(function(t){return(0,e.jsxs)(Me.A,{className:c.A.card,children:[(0,e.jsxs)("div",{className:c.A.rows,children:[(0,e.jsxs)("div",{className:c.A.row,children:[(0,e.jsx)("span",{className:c.A.rowLabel,children:"\u5E97\u94FAID"}),(0,e.jsxs)("span",{className:c.A.rowValue,children:[(0,e.jsx)("span",{className:c.A.link,onClick:function(){s(t)},children:t.mallId||"-"}),(0,e.jsx)(Ne.A,{text:t.mallId,successMsg:"\u5E97\u94FAID\u5DF2\u590
1D\u5236"})]})]}),(0,e.jsxs)("div",{className:c.A.row,children:[(0,e.jsx)("span",{className:c.A.rowLabel,children:"\u5E97\u94FA\u7C7B\u578B"}),(0,e.jsx)("span",{className:c.A.rowValue,children:(0,e.jsx)($.h,{valueEnum:{SEMI:{text:"\u534A\u6258"},KUAJING_FULL:{text:"\u5168\u6258"}},value:t.mallType})})]}),(0,e.jsxs)("div",{className:c.A.row,children:[(0,e.jsx)("span",{className:c.A.rowLabel,children:"\u7AD9\u70B9"}),(0,e.jsx)("span",{className:c.A.rowValue,children:(0,e.jsx)($.h,{valueEnum:Oe,value:t.domain})})]}),(0,e.jsxs)("div",{className:c.A.row,children:[(0,e.jsx)("span",{className:c.A.rowLabel,children:"\u5728\u552E\u5546\u54C1\u6570"}),(0,e.jsx)("span",{className:c.A.rowValue,children:(0,b.kT)(t.onSaleProductCount)})]}),(0,e.jsxs)("div",{className:c.A.row,children:[(0,e.jsx)("span",{className:c.A.rowLabel,children:"\u4ECA\u65E5\u9500\u91CF"}),(0,e.jsx)("span",{className:c.A.rowValue,children:(0,b.kT)(t.todaySaleVolume)})]}),(0,e.jsxs)("div",{className:c.A.row,children:[(0,e.jsx)("span",{className:c.A.rowLabel,children:"\u6700\u8FD17\u65E5\u9500\u91CF"}),(0,e.jsx)("span",{className:c.A.rowValue,children:(0,b.kT)(t.last7DaySaleVolume)})]}),(0,e.jsxs)("div",{className:c.A.row,children:[(0,e.jsx)("span",{className:c.A.rowLabel,children:"\u6700\u8FD130\u65E5\u9500\u91CF"}),(0,e.jsx)("span",{className:c.A.rowValue,children:(0,b.kT)(t.last30DaySaleVolume)})]}),(0,e.jsxs)("div",{className:c.A.row,children:[(0,e.jsx)("span",{className:c.A.rowLabel,children:"\u66F4\u65B0\u65F6\u95F4"}),(0,e.jsx)("span",{className:c.A.rowValue,children:t.updateTime||"-"})]})]}),(0,e.jsx)("div",{className:c.A.actionBar,children:(0,e.jsx)("span",{className:"text-click",onClick:function(){d(t)},children:"\u6D41\u91CF\u5206\u6790"})})]},t.id)}),(0,e.jsx)(te.A,{open:x.visible,onClose:function(){return j({visible:!1,mallId:""})},title:"\u5E97\u94FA ".concat(x.mallId," \u5546\u54C1\u6D41\u91CF"),filters:{mallId:x.mallId}}),(0,e.jsx)(ae,{visible:f.visible,mallId:f.mallId,domain:f.domain,onClose:function(){return r({visible:!1,mallId:"",domain:""})}})]})}var ze=Ve,Pe={"agentseller.temu.com":{text:"\u5168\u7403"},"agentseller-us.temu.com":{text:"\u7F8E\u56FD"},"agentseller-eu.temu.com":{text:"\u6B27\u533A"}},J={0:{text:"\u5168\u7403"},1:{text:"\u7F8E\u56FD"},2:{text:"\u6B27\u533A"}},Je=null,Y="mallSales_searchConditions",we=function(a){if(Array.isArray(a))return{min:a[0],max:a[1]};if(a&&W()(a)==="object"){var o,u,y,g,C,I,S;return{min:(o=(u=(y=(g=a.min)!==null&&g!==void 0?g:a.from)!==null&&y!==void 0?y:a.begin)!==null&&u!==void 0?u:a.start)!==null&&o!==void 0?o:a.gte,max:(C=(I=(S=a.max)!==null&&S!==void 0?S:a.to)!==null&&I!==void 0?I:a.end)!==null&&C!==void 0?C:a.lte}}return null},Ze=function(a){return[a==null?void 0:a.cat1Name,a==null?void 0:a.cat2Name,a==null?void 0:a.cat3Name,a==null?void 0:a.cat4Name].filter(Boolean).join(">")||"-"};function Ke(n){var a={cny:"\xA5",rmb:"\xA5",usd:"$",eur:"\u20AC",gbp:"\xA3"};if(!n)return"\xA5";var o=String(n).trim().toLowerCase();return a[o]||n+" "}function He(n){if(!n)return"-";var a=[];try{a=typeof n=="string"?JSON.parse(n):n}catch(o){return"-"}return!Array.isArray(a)||!a.length?"-":a.map(function(o){var u=Ke(o.currency),y=o.price!=null?(o.price/100).toFixed(2):"-";return(o.spec?o.spec+": ":"")+u+y}).join(` 2`)}function Be(){if(typeof window=="undefined")return{};try{var n=localStorage.getItem(Y);return n?JSON.parse(n):{}}catch(a){return{}}}function Z(n){return n==null||n===""?!0:Array.isArray(n)?n.every(function(a){return Z(a)}):W()(n)==="object"?Object.values(n).every(function(a){return Z(a)}):!1}function Le(n){return Object.keys(n||{}).reduce(function(a,o){var u=n[o];return Z(u)||(a[o]=u),a},{})}function Ue(n){if(typeof window!="undefined")try{var a=Le(n);if(!Object.keys(a).length){localStorage.removeItem(Y);return}localStorage.setItem(Y,JSON.stringify(a))}catch(o){}}function Ye(){if(typeof window!="undefined")try{localStorage.removeItem(Y)}catch(n){}}function Ge(n){return Object.keys(n||{}).reduce(function(a,o){return a[o]=void 0,a},{})}var re=(function(){var n=(0,X.al)(),a=(0,A.useRef)(),o=(0,A.useRef)(!1),u=(0,A.useState)({visible:!1,mallId:""}),y=N()(u,2),g=y[0],C=y[1],I=(0,A.useState)({visible:!1,mallId:"",domain:""}),S=N()(I,2),p=S[0],P=S[1],O=(0,A.useState)(function(){return Be()}),x=N()(O,2),j=x[0],R=x[1];function V(f){var r=f||a.current;o.current=!0,Ye(),R({}),r&&(r.setFieldsValue(Ge(r.getFieldsValue(!0))),r.submit()),window.setTimeout(function(){o.current=!1},0)}return n?(0,e.jsx)(ze,{}):(0,e.jsxs)(ye.Ay,{ghost:!0,children:[(0,e.jsx)(he.A,{formRef:a,rowKey:function(r){return r.id},sticky:!0,columnsState:{persistenceKey:"mallSales_columns",persistenceType:"localStorage"},pagination:{defaultPageSize:20},request:function(r,s){var d=Object.keys(s||{})[0],t=v()(v()({},r),{},{page:r.current,pageSize:r.pageSize,domain:r.domain}),i=we(r.onSaleProductCount);return i&&(i.min!==void 0&&i.min!==null&&i.min!==""&&(t.onSaleProductCountMin=i.min),i.max!==void 0&&i.max!==null&&i.max!==""&&(t.onSaleProductCountMax=i.max),delete t.onSaleProductCount),d&&(t.orderBy=d,t.asc=s[d]==="ascend"),delete t.current,ie(t).then(function(m){return{success:!!(m!=null&&m.success),data:(m==null?void 0:m.data)||[],total:(m==null?void 0:m.total)||0}})},search:{labelWidth:"auto",onReset:function(r){V(r)},defaultCollapsed:!1,optionRender:function(r,s,d){return[(0,e.jsx)(U.A,{onClick:function(){V(r==null?void 0:r.form)},children:"\u91CD\u7F6E"},"reset"),(0,e.jsx)(U.A,{type:"primary",onClick:function(){var i,m;r==null||(i=r.form)===null||i===void 0||(m=i.submit)===null||m===void 0||m.call(i)},children:"\u641C\u7D22"},"search")].concat(ce()(d.slice(2)))}},form:{initialValues:j,onValuesChange:function(r,s){o.current||Ue(s)}},scroll:{x:"max-content"},columns:[{dataIndex:"mallId",title:"\u5E97\u94FAID",fixed:"left",width:150,render:function(r,s){return(0,e.jsx)("a",{onClick:function(){return C({visible:!0,mallId:s.mallId})},children:s.mallId||"-"})}},{dataIndex:"mallType",title:"\u5E97\u94FA\u7C7B\u578B",width:150,hideInSearch:!0,render:function(r,s){return s.mallType==="SEMI"?"\u534A\u6258":s.mallType==="KUAJING_FULL"?"\u5168\u6258":"-"}},{dataIndex:"domain",title:"\u7AD9\u70B9",width:150,valueType:"select",valueEnum:Pe,render:function(r,s){var d,t=s==null?void 0:s.domain;return(J==null||(d=J[t])===null||d===void 0?void 0:d.text)||t}},{dataIndex:"onSaleProductCount",title:"\u5728\u552E\u5546\u54C1\u6570",width:150,sorter:!0,valueType:"digitRange",render:function(r,s){return(0,b.kT)(s.onSaleProductCount)}
2},{dataIndex:"todaySaleVolume",title:"\u4ECA\u65E5\u9500\u91CF",width:150,hideInSearch:!0,sorter:!0,render:function(r,s){return(0,b.kT)(s.todaySaleVolume)}},{dataIndex:"last7DaySaleVolume",title:"\u6700\u8FD17\u65E5\u9500\u91CF",width:150,hideInSearch:!0,sorter:!0,defaultSortOrder:"descend",render:function(r,s){return(0,b.kT)(s.last7DaySaleVolume)}},{dataIndex:"last30DaySaleVolume",title:"\u6700\u8FD130\u65E5\u9500\u91CF",width:150,hideInSearch:!0,sorter:!0,render:function(r,s){return(0,b.kT)(s.last30DaySaleVolume)}},{dataIndex:"updateTime",title:"\u66F4\u65B0\u65F6\u95F4",width:150,hideInSearch:!0,render:function(r,s){return s.updateTime||"-"}},{title:"\u64CD\u4F5C",width:80,fixed:"right",hideInSearch:!0,render:function(r,s){return(0,e.jsx)("a",{onClick:function(){P({visible:!0,mallId:s.mallId,domain:s.domain})},children:"\u6D41\u91CF\u5206\u6790"})}}]}),(0,e.jsx)(te.A,{open:g.visible,onClose:function(){return C({visible:!1,mallId:""})},title:"\u5E97\u94FA ".concat(g.mallId," \u5546\u54C1\u6D41\u91CF"),filters:{mallId:g.mallId}}),(0,e.jsx)(ae,{visible:p.visible,mallId:p.mallId,domain:p.domain,onClose:function(){P({visible:!1,mallId:"",domain:""})}})]})});l.dn(re)})}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.