import{e,a9 as t,b as a,r as s,K as i,x as r,aa as n,J as o,h as p,w as m,z as d,o as l,i as _,m as u}from"./index-WeUkftbp.js";import{d as c}from"./index.BcUDVLb2.js";/* empty css                                                              */import{_ as y}from"./_plugin-vue_export-helper.BCo6x5W8.js";import{c as j}from"./contractList.Iu5X35we.js";import{g as x}from"./index.NTbA_2SX.js";import{L as g}from"./customer.C_v9K5hM.js";import"./uni-nav-bar.cBITQXNK.js";import"./uni-icons.B3nCnuXe.js";/* empty css                                                                  *//* empty css                                                                    *//* empty css                                                              */import"./uni-row.DLutFlIQ.js";import"./uni-dateformat.CAFQ6hZt.js";import"./uni-list.D2b1m_I0.js";import"./uni-badge.CLrZv6EZ.js";import"./index.D8Jasx-l.js";/* empty css                                                              */import"./index.d2K7R4mP.js";import"./default-avatar.BAKNUlXW.js";/* empty css                                                              */import"./moment.BD7_iMEL.js";const h=y({__name:"contract",setup(y){const h=e({typeIndex:0,tabIndex:0,tabId:1,name:"",emptyTitle:"暂无合同，快去添加吧～",listData:[],types:0,where:{limit:10,page:1,types:"",eid:""},jumpUrl:""});t((e=>{h.where.eid=e.eid,h.jumpUrl=`/pages/customer/list/details?id=${h.where.eid}`,e.name&&(h.name=e.name),3==e.types&&(f=f.splice(1,1)),D()}));const f=e([{type:1,icon:"icon-sousuo"},{type:2,icon:"icon-a-gengduo2"}]),v=a(),w=e=>{1===e.type&&u(`/pages/customer/contract/search?eid=${h.where.eid}`),2===e.type&&(v.commit("setCustomerFormType",{type:"list-contract"}),u(`/pages/customer/contract/addContract?eid=${h.where.eid}&name=${h.name}`))},b=s(!1),D=(e=!1)=>{g(h.where).then((t=>{e&&(h.listData=[]),h.listData.push(...t.data.list);const a=Math.ceil(t.data.count/h.where.limit);h.listData.length<=0||h.where.page>=a?b.value=!1:b.value=!0,i()})).catch((e=>{r.error(e.message)}))};return n((()=>{b.value&&(h.where.page++,D())})),o((()=>{h.where.page=1,h.value=!1,h.listData=[],D()})),(e,t)=>{const a=d;return l(),p(a,{class:"content"},{default:m((()=>[_(a,{class:"cr-position-header"},{default:m((()=>[_(a,{class:"status_bar"}),_(c,{"is-right":!0,"jump-url":h.jumpUrl,"is-jump-bar":!1,"right-data":f,onHandleNarItem:w},null,8,["jump-url","right-data"])])),_:1}),_(a,{class:"examine-content m10"},{default:m((()=>[_(j,{"list-data":h.listData,"type-index":h.typeIndex,"form-type":{type:"list",eid:h.where.eid},"empty-title":h.emptyTitle},null,8,["list-data","type-index","form-type","empty-title"])])),_:1}),_(x)])),_:1})}}},[["__scopeId","data-v-2a80f94c"]]);export{h as default};
