import{D as w,q as z}from"./elementPlus.CqHltQSO.js";import{u as R,a as U}from"./useTableData.DHj98pR6.js";import{_ as N}from"./DataTableSlot.vue_vue_type_script_setup_true_lang.Cb6yZqTm.js";import{g as E}from"./api.Btom0L60.js";import{X as H}from"./index.DoJnwA7v.js";import T from"./index.CSJpDP8-.js";import{d as X,r as m,Z as L,E as P,j,ai as u,o as v,c as F,U as i,aa as K,a8 as $,O as l,u as t,K as I,am as Z,M as A,D as G,R as J,F as Q,B as q,a as ee}from"./vue.1RczIYhx.js";import{_ as te}from"./_plugin-vue_export-helper.DlAUqK2U.js";import"./index.vue_vue_type_script_setup_true_lang.DfUMpYc_.js";import"./hasPermission.lEsua58A.js";import"./useCopyText.pVj3jbkF.js";/* empty css                   */import"./countryInfo.Df1X6FZ-.js";import"./TitleCard.ByglUdtw.js";import"./LineChart.vue_vue_type_script_setup_true_lang.4RJmZZ55.js";import"./echarts.DoXO02ct.js";import"./DataDisplay.vue_vue_type_style_index_0_lang.Clmo_Bmg.js";import"./useResponse.DqThFJSa.js";const C=[{type:"seq",title:"序 号",width:50,align:"center"},{field:"product_info",title:"产品信息",width:280,align:"center",slots:{default:"product_info"}},{field:"sku",title:"SKU",minWidth:"auto",align:"center",showOverflow:!0},{field:"fulfillment_channel",title:"渠道",minWidth:"auto",align:"center",showOverflow:!0},{field:"ncx_rate",title:"NCX率",minWidth:"auto",align:"center",showOverflow:!0,slots:{default:"ncx_rate"}},{field:"ncx_count",title:"NCX订单",minWidth:"auto",align:"center",showOverflow:!0},{field:"order_count",title:"所有订单",minWidth:"auto",align:"center",showOverflow:!0},{field:"all_score",title:"星级",minWidth:"auto",align:"center",showOverflow:!0,slots:{default:"all_score"}},{field:"return_record_rate",title:"退货率",minWidth:"auto",align:"center",showOverflow:!0,slots:{default:"return_record_rate"}},{field:"last_updated_date",title:"最近更新",minWidth:"auto",align:"center",showOverflow:!0,formatter({cellValue:p}){return H.toDateString(p,"yyyy-MM-dd")}},{field:"operate",title:"详情",fixed:"right",align:"center",width:90,slots:{default:"operate"}}],oe=X({__name:"DataTable",setup(p,{expose:b}){const a=q("query-parameter"),{tableOptions:g,handlePageChange:D}=R(f),_=m(),e=L({size:"mini",border:!1,round:!0,stripe:!0,currentRowHighLight:!0,height:"100%",toolbarConfig:{size:"large",slots:{buttons:"toolbar_buttons",tools:"toolbar_tools"}},rowConfig:{isHover:!0},columnConfig:{resizable:!0},pagerConfig:{total:g.value.total,page:g.value.page,limit:g.value.limit},loading:!1,loadingConfig:{icon:"vxe-icon-indicator roll",text:"正在拼命加载中..."},columns:"",data:""});m(!1);const s=m(!1),h=m({}),x=w(a==null?void 0:a.date[0]).format("YYYY-MM-DD"),O=w(a==null?void 0:a.date[1]).format("YYYY-MM-DD");P(()=>{e.pagerConfig.limit=10}),j(()=>{f()});async function f(r=!1){var d,c;r&&(e.pagerConfig.page=1),e.data=[],e.columns=[];const o={search:a==null?void 0:a.asin,start_time:x,end_time:O};await U(E,o,e),e&&((d=e.data)!=null&&d.length)&&await _.value.loadColumn(C),e.showHeader=!!((c=e.data)!=null&&c.length)}function y(){f()}function S(r){console.log(123),s.value=!0,h.value=r}const M={custom({type:r}){r=="confirm"&&f()}};function W(){return{fontWeight:500}}return b({fetchList:f}),(r,o)=>{const d=u("el-icon"),c=u("el-button"),Y=u("vxe-pager"),k=u("el-empty"),B=u("vxe-grid");return v(),F(Q,null,[i(B,I({ref_key:"gridRef",ref:_,"cell-style":W},t(e),Z(M)),K({toolbar_buttons:l(()=>[]),toolbar_tools:l(()=>[i(c,{circle:"",class:"toolbar-btn",onClick:y},{default:l(()=>[i(d,null,{default:l(()=>[i(t(z))]),_:1})]),_:1})]),top:l(()=>[o[3]||(o[3]=ee("div",{class:"mb-2"},null,-1))]),pager:l(()=>[i(Y,{currentPage:t(e).pagerConfig.page,"onUpdate:currentPage":o[0]||(o[0]=n=>t(e).pagerConfig.page=n),pageSize:t(e).pagerConfig.limit,"onUpdate:pageSize":o[1]||(o[1]=n=>t(e).pagerConfig.limit=n),total:t(e).pagerConfig.total,class:"mt-1.5",onPageChange:t(D)},null,8,["currentPage","pageSize","total","onPageChange"])]),empty:l(()=>[i(k,{description:"暂无数据"})]),_:2},[$(t(C),n=>({name:`${n.field}`,fn:l(({row:V})=>[i(N,{field:n.field,row:V,onShowDetail:S},null,8,["field","row"])])}))]),1040),t(s)?(v(),A(T,{key:0,modelValue:t(s),"onUpdate:modelValue":o[2]||(o[2]=n=>G(s)?s.value=n:null),rowData:t(h)},null,8,["modelValue","rowData"])):J("",!0)],64)}}}),be=te(oe,[["__scopeId","data-v-97355777"]]);export{be as default};
