import{e,a9 as a,r as t,aa as s,f as n,g as i,h as r,w as o,x as d,z as m,o as l,i as p,N as u,_,aq as c}from"./index-DXvjTqMr.js";import{_ as h}from"./uni-search-bar.CxwyNur9.js";import{c as x}from"./contractList.BB-ZDMYP.js";import{c as b}from"./customerTab.g3HmAsdX.js";import{L as w}from"./customer.BB8HSfBC.js";import{_ as y}from"./_plugin-vue_export-helper.BCo6x5W8.js";import"./uni-icons.Dxt3pfrw.js";/* empty css */import"./uni-row.DufxBgTC.js";import"./uni-dateformat.R_eYMhRe.js";import"./uni-list.DC8Q_4GY.js";import"./uni-badge.BiEW0hVl.js";import"./index.Bd3eRv6X.js";/* empty css */import"./index.CLXfhtlu.js";import"./default-avatar.BAKNUlXW.js";/* empty css */import"./moment.BD7_iMEL.js";const f=y({__name:"search",setup(y){const f=e({typeIndex:0,tabIndex:0,eid:"",examineTabData:[{name:"我负责的",id:6},{name:"我查看的",id:5}],listData:[],emptyTitle:"暂无搜索结果~",btnShow:!1,where:{page:1,limit:10,types:1,eid:"",pay_status:"",name:"",renew:"",sort:"",abnormal:"",time:"",sign_status:"",salesman_id:""}});a((e=>{e.index&&(f.tabIndex=Number(e.index)),e.type&&(f.where.types=e.type),e.eid&&(f.eid=e.eid,f.where.eid=e.eid)}));const j=()=>{f.where.name="",f.listData=[]},g=()=>{_()},v=()=>{f.where.page=1,f.where.name?I(!0):j()},D=e=>{f.where.page>1&&c(),f.tabIndex=e.index,f.where.page=1,f.where.name?I(!0):j()},I=(e=!1)=>{f.where.types=1===f.tabIndex?0:1,S(e)},C=t(!1),S=(e=!1)=>{w(f.where).then((a=>{e&&(f.listData=[]),f.listData.push(...a.data.list);const t=Math.ceil(a.data.count/f.where.limit);f.listData.length<=0||f.where.page>=t?C.value=!1:C.value=!0})).catch((e=>{d.error(e.message)}))};return s((()=>{C.value&&(f.where.page++,S())})),(e,a)=>{const t=m,s=n(i("uni-search-bar"),h);return l(),r(t,{class:"content"},{default:o((()=>[p(t,{class:"cr-position-header"},{default:o((()=>[p(t,{class:"status_bar"}),p(t,{class:"default-search"},{default:o((()=>[p(s,{onConfirm:v,onFocus:v,focus:!0,bgColor:"#F0F1F5",modelValue:f.where.name,"onUpdate:modelValue":a[0]||(a[0]=e=>f.where.name=e),onClear:j,onCancel:g},null,8,["modelValue"])])),_:1}),f.eid?u("",!0):(l(),r(b,{key:0,"examine-tab-data":f.examineTabData,onChange:D,index:f.tabIndex},null,8,["examine-tab-data","index"]))])),_:1}),p(t,{class:"examine-content m10"},{default:o((()=>[p(x,{"list-data":f.listData,"type-index":f.typeIndex,btnShow:f.btnShow,"empty-title":f.emptyTitle},null,8,["list-data","type-index","btnShow","empty-title"])])),_:1})])),_:1})}}},[["__scopeId","data-v-db076eb9"]]);export{f as default};