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-DXvjTqMr.js";import{d as c}from"./index.D3kEQn5y.js";/* empty css                                                              */import{_ as y}from"./_plugin-vue_export-helper.BCo6x5W8.js";import{c as j}from"./contractList.BB-ZDMYP.js";import{g as x}from"./index.C_bCAwVj.js";import{L as g}from"./customer.BB8HSfBC.js";import"./uni-nav-bar.BZJJc0Hh.js";import"./uni-icons.Dxt3pfrw.js";/* empty css                                                                  *//* empty css                                                                    *//* 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 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};
