import{d as A,r as n,x as D,u as E,w as L,o as y,c as M,f as a,B as o,E as g,k as B,a as t,A as P,G as j,F,_ as G,K as O,L as K,X as Q,Y as X,Z as Y,__tla as Z}from"./index-92ad187a.js";import{_ as q,__tla as H}from"./ContentWrap.vue_vue_type_script_setup_true_lang-c7ede7df.js";import{_ as J,__tla as V}from"./index.vue_vue_type_script_setup_true_lang-6fbe4cc3.js";import{_ as W,__tla as $}from"./DictTag.vue_vue_type_script_lang-96bcb962.js";import{E as aa,__tla as ta}from"./el-link-3ccf1de9.js";import{_ as ea,g as ra,__tla as la}from"./ContractForm.vue_vue_type_script_setup_true_lang-b0b8dbd4.js";import{B as oa,__tla as sa}from"./index-a4b5469a.js";import{f as _a,__tla as ia}from"./formatter-732f7466.js";import{d as h,__tla as na}from"./formatTime-c7f253d6.js";import{D as pa,__tla as ca}from"./dict-221f3e01.js";let b,ma=Promise.all([(()=>{try{return Z}catch{}})(),(()=>{try{return H}catch{}})(),(()=>{try{return V}catch{}})(),(()=>{try{return $}catch{}})(),(()=>{try{return ta}catch{}})(),(()=>{try{return la}catch{}})(),(()=>{try{return sa}catch{}})(),(()=>{try{return ia}catch{}})(),(()=>{try{return na}catch{}})(),(()=>{try{return ca}catch{}})()]).then(async()=>{b=A({name:"CrmContractList",__name:"ContractList",props:{bizType:{},bizId:{}},setup(v){const s=v,p=n(!0),m=n(0),u=n([]),e=D({pageNo:1,pageSize:10,customerId:void 0}),c=async()=>{p.value=!0;try{e.customerId=void 0;let _={list:[],total:0};if(s.bizType!==oa.CRM_CUSTOMER)return;e.customerId=s.bizId,_=await ra(e),u.value=_.list,m.value=_.total}finally{p.value=!1}},f=n(),C=()=>{f.value.open("create")},{push:S}=E();return L(()=>[s.bizId,s.bizType],()=>{e.pageNo=1,c()},{immediate:!0,deep:!0}),(_,i)=>{const w=G,z=O,T=K,I=aa,l=Q,x=W,R=X,k=J,N=q,U=Y;return y(),M(F,null,[a(T,{justify:"end"},{default:o(()=>[a(z,{onClick:C},{default:o(()=>[a(w,{class:"mr-5px",icon:"clarity:contract-line"}),g(" \u521B\u5EFA\u5408\u540C ")]),_:1})]),_:1}),a(N,{class:"mt-10px"},{default:o(()=>[B((y(),P(R,{data:t(u),stripe:!0,"show-overflow-tooltip":!0},{default:o(()=>[a(l,{label:"\u5408\u540C\u540D\u79F0",fixed:"left",align:"center",prop:"name"},{default:o(r=>[a(I,{type:"primary",underline:!1,onClick:ua=>{return d=r.row.id,void S({name:"CrmContractDetail",params:{id:d}});var d}},{default:o(()=>[g(j(r.row.name),1)]),_:2},1032,["onClick"])]),_:1}),a(l,{label:"\u5408\u540C\u7F16\u53F7",align:"center",prop:"no"}),a(l,{label:"\u5BA2\u6237\u540D\u79F0",align:"center",prop:"customerName"}),a(l,{label:"\u5408\u540C\u91D1\u989D\uFF08\u5143\uFF09",align:"center",prop:"price",formatter:t(_a)},null,8,["formatter"]),a(l,{label:"\u5F00\u59CB\u65F6\u95F4",align:"center",prop:"startTime",formatter:t(h),width:"180px"},null,8,["formatter"]),a(l,{label:"\u7ED3\u675F\u65F6\u95F4",align:"center",prop:"endTime",formatter:t(h),width:"180px"},null,8,["formatter"]),a(l,{align:"center",label:"\u72B6\u6001",prop:"auditStatus"},{default:o(r=>[a(x,{type:t(pa).CRM_AUDIT_STATUS,value:r.row.auditStatus},null,8,["type","value"])]),_:1})]),_:1},8,["data"])),[[U,t(p)]]),a(k,{total:t(m),page:t(e).pageNo,"onUpdate:page":i[0]||(i[0]=r=>t(e).pageNo=r),limit:t(e).pageSize,"onUpdate:limit":i[1]||(i[1]=r=>t(e).pageSize=r),onPagination:c},null,8,["total","page","limit"])]),_:1}),a(ea,{ref_key:"formRef",ref:f,onSuccess:c},null,512)],64)}}})});export{b as _,ma as __tla};
