"use strict";(self["webpackChunkaida"]=self["webpackChunkaida"]||[]).push([[8376],{88376:function(e,t,a){a.r(t),a.d(t,{default:function(){return y}});var i=a(66252),l=a(49963);const n=e=>((0,i.dD)("data-v-e1a229c4"),e=e(),(0,i.Cn)(),e),r={class:"itemAffiliateDetail",ref:"itemAffiliateDetail"},o={class:"generalModel_btn"},s=n((()=>(0,i._)("svg",{width:"46",height:"46",viewBox:"0 0 46 46",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[(0,i._)("circle",{cx:"23",cy:"23",r:"23",fill:"white","fill-opacity":"0.3"}),(0,i._)("rect",{x:"32.5063",y:"12",width:"3",height:"29",rx:"1.5",transform:"rotate(45 32.5063 12)",fill:"white"}),(0,i._)("rect",{x:"34.6274",y:"32.5059",width:"3",height:"29",rx:"1.5",transform:"rotate(135 34.6274 32.5059)",fill:"white"})],-1))),c=[s],d={class:"admin_page"},g={class:"admin_state_item"},u=n((()=>(0,i._)("span",null,"Start Time:",-1))),h=n((()=>(0,i._)("span",{class:"icon iconfont range_picker_icon icon-rili"},null,-1))),m={class:"itemAffiliateDetail_content generalModel_table_content",ref:"historyTable"},f={class:"mark_loading"};function p(e,t,a,n,s,p){const w=(0,i.up)("a-range-picker"),S=(0,i.up)("a-table"),_=(0,i.up)("a-modal"),D=(0,i.up)("a-spin");return(0,i.wg)(),(0,i.iD)(i.HY,null,[(0,i._)("div",r,null,512),(0,i.Wm)(_,{class:"generalModel",visible:e.itemAffiliateDetailShow,"onUpdate:visible":t[3]||(t[3]=t=>e.itemAffiliateDetailShow=t),footer:null,"get-container":()=>e.$refs.itemAffiliateDetail,width:"75%",maskClosable:!1,centered:!0,closable:!1,mask:!0,wrapClassName:"#app"},{default:(0,i.w5)((()=>[(0,i._)("div",o,[(0,i._)("div",{class:"generalModel_closeIcon",onClick:t[0]||(t[0]=(0,l.iM)((t=>e.cancelDsign()),["stop"]))},c)]),(0,i._)("div",d,[(0,i._)("div",g,[u,(0,i.Wm)(w,{style:{width:"280px"},class:"range_picker",value:e.rangePickerValue,"onUpdate:value":t[1]||(t[1]=t=>e.rangePickerValue=t),allowClear:!1,placeholder:[e.$t("HistoryPage.StartDate"),e.$t("HistoryPage.EndDate")],valueFormat:"YYYY-MM-DD"},{suffixIcon:(0,i.w5)((()=>[h])),_:1},8,["value","placeholder"]),(0,i._)("div",{class:"gallery_btn",onClick:t[2]||(t[2]=(...t)=>e.getDetailList&&e.getDetailList(...t)),style:{"margin-left":"2rem"}},"Search")]),(0,i._)("div",m,[(0,i.Wm)(S,{columns:e.columns,"data-source":e.collectionList,scroll:{y:200},onChange:e.changePage,pagination:{showSizeChanger:!0,current:e.currentPage,pageSize:e.pageSize,total:e.total,showQuickJumper:!0,bordered:!1}},null,8,["columns","data-source","onChange","pagination"])],512)])])),_:1},8,["visible","get-container"]),(0,i.wy)((0,i._)("div",f,[(0,i.Wm)(D,{size:"large"})],512),[[l.F8,e.loadingShow]])],64)}var w=a(2262),S=a(74961),_=(0,i.aZ)({components:{},setup(){(0,w.iH)({});const e=(0,w.qj)({historyTable:null}),t=(0,w.qj)({itemAffiliateDetailShow:!1,loadingShow:!1,rangePickerValue:[],itemId:-1,collectionList:[],currentPage:1,pageSize:10,order:"",total:0,historyTableHeight:0,columns:(0,i.Fl)((()=>[{title:"Id",align:"center",width:50,dataIndex:"accountId",key:"accountId",fixed:"left"},{title:"User Name",key:"username",dataIndex:"username",align:"center",width:150},{title:"Time",align:"center",width:200,dataIndex:"time",key:"time",sorter:!0},{title:"First Subscription Payment Amount",align:"center",width:200,dataIndex:"firstSubscriptionPaymentAmount",key:"firstSubscriptionPaymentAmount"},{title:"Commission",align:"center",ellipsis:!0,width:150,dataIndex:"commission",key:"commission",fixed:"right"}]))}),a=a=>{t.itemAffiliateDetailShow=!0,n(a.type),(0,i.Y3)((()=>{t.historyTableHeight=e.historyTable.clientHeight-40,t.itemId=a.id,o()}))},l=()=>{t.itemAffiliateDetailShow=!1,t.loadingShow=!1},n=e=>{const a=new Date,i=a.getFullYear(),l=a.getMonth();let n,r;"month"===e?(n=new Date(i,l,1),r=new Date(i,l+1,0),n.setHours(0,0,0,0),r.setHours(23,59,59,999)):"year"===e&&(n=new Date(i,0,1),r=new Date(i,11,31));const o=e=>e.getFullYear()+"-"+String(e.getMonth()+1).padStart(2,"0")+"-"+String(e.getDate()).padStart(2,"0")+" "+String(e.getHours()).padStart(2,"0")+":"+String(e.getMinutes()).padStart(2,"0")+":"+String(e.getSeconds()).padStart(2,"0");"month"===e&&(t.rangePickerValue=[o(n),o(r)])},r=(e,a,i)=>{t.currentPage=e.current,t.pageSize=e.pageSize,t.order="descend"==i.order?"DESC":"ASC",o()},o=()=>{t.loadingShow=!0;let e=t.rangePickerValue?.[0]?t.rangePickerValue[0]+" 00:00:00":"",a=t.rangePickerValue?.[1]?t.rangePickerValue[1]+" 23:59:59":"",i={affiliateId:t.itemId,endTime:a,startTime:e,order:t.order,page:t.currentPage,size:t.pageSize};S.V.axiosPost(S.V.httpUrls.getEachAffiliateGeneratedRevenue,i).then((e=>{console.log(e),t.collectionList=e.records,t.loadingShow=!1,t.total=e.total})).catch((e=>{t.loadingShow=!1}))};return{...(0,w.BK)(e),...(0,w.BK)(t),init:a,cancelDsign:l,changePage:r,getDetailList:o}}}),D=a(83744);const k=(0,D.Z)(_,[["render",p],["__scopeId","data-v-e1a229c4"]]);var y=k}}]);