import{d as e,e as a,a9 as t,r as s,aa as n,f as i,g as r,o,h as l,w as d,i as m,a as p,_ as u,aq as c,K as h,x as _,z as b}from"./index-WeUkftbp.js";import{_ as x}from"./uni-search-bar.BHGf4P5g.js";import{p as f}from"./paymentRecord.DngmXPIL.js";import{c as w}from"./customerTab.Dl-WFCzx.js";import{p as g}from"./assessment.C7cFhOQt.js";import{K as j}from"./customer.C_v9K5hM.js";import{_ as I}from"./_plugin-vue_export-helper.BCo6x5W8.js";import"./uni-icons.B3nCnuXe.js";/* empty css                                                                  */import"./uni-row.DLutFlIQ.js";import"./uni-tag.BU4fxSTe.js";import"./uni-dateformat.CAFQ6hZt.js";import"./uni-list.D2b1m_I0.js";import"./uni-badge.CLrZv6EZ.js";import"./index.D8Jasx-l.js";/* empty css                                                              */const y=I(e({__name:"search",setup(e){const I=a({typeIndex:0,tabIndex:0,tabId:1,placeholder:"请输入关键字搜索",examineTabData:g,listData:[],emptyTitle:"暂无搜索结果～",where:{types:"",page:1,limit:10,status:0,time:"",name:"",date:"",no_withdraw:1}});t((e=>{const a=I.examineTabData.length-1;e.index&&(e.index>a?I.tabIndex=a:I.tabIndex=Number(e.index),I.tabId=I.examineTabData[I.tabIndex].id,I.where.status=1===I.tabId?0:"")}));const y=()=>{I.where.name="",I.listData=[]},D=()=>{u()},v=()=>{I.where.page=1,I.where.name?C(!0):y()},T=e=>{if(I.tabId===e.id||""===I.where.name)return!1;I.where.page>1&&c(),I.tabId=e.id,I.tabIndex=e.index,I.where.status=1===I.tabId?0:"",C(!0)},C=(e=!1)=>{I.where.page=1,K(e)},F=s(!1),K=(e=!1)=>{j(I.where).then((a=>{e&&(I.listData=[]),I.listData.push(...a.data.list);const t=Math.ceil(a.data.count/I.where.limit);F.value=!(I.listData.length<=0||I.where.page>=t),h()})).catch((e=>{_.error(e.message)}))};return n((()=>{F.value&&(I.where.page++,K())})),(e,a)=>{const t=b,s=i(r("uni-search-bar"),x);return o(),l(t,{class:"content"},{default:d((()=>[m(t,{class:"cr-position-header"},{default:d((()=>[m(t,{class:"status_bar"}),m(t,{class:"default-search"},{default:d((()=>[m(s,{onConfirm:v,onFocus:v,placeholder:p(I).placeholder,focus:!0,bgColor:"#F0F1F5",modelValue:p(I).where.name,"onUpdate:modelValue":a[0]||(a[0]=e=>p(I).where.name=e),onClear:y,onCancel:D},null,8,["placeholder","modelValue"])])),_:1}),m(w,{"examine-tab-data":p(I).examineTabData,onChange:T,index:p(I).tabIndex},null,8,["examine-tab-data","index"])])),_:1}),m(t,{class:"m10"},{default:d((()=>[m(f,{listData:p(I).listData,"type-index":1,"empty-title":p(I).emptyTitle},null,8,["listData","empty-title"])])),_:1})])),_:1})}}}),[["__scopeId","data-v-933ce614"]]);export{y as default};
