import{d as L,r as n,u as Q,J as j,l as q,Q as A,o as s,c as G,f as a,w as _,a as t,x as K,v as y,n as u,P as f,F as N,C as Y,W as Z,X as tt,E as at,_ as rt,__tla as _t}from"./index-11e4820e.js";import{_ as lt,__tla as et}from"./OperateLogV2-cb81d9e8.js";import{u as it,__tla as ot}from"./tagsView-4d7a359f.js";import{g as ct,t as st,l as T,r as ut,p as mt,a as nt,__tla as yt}from"./index-81684676.js";import ft,{__tla as pt}from"./CustomerForm-af466a3f.js";import dt,{__tla as ht}from"./CustomerDetailsInfo-e99d6652.js";import bt,{__tla as zt}from"./CustomerDetailsHeader-a1f19bb8.js";import vt,{__tla as wt}from"./ContactList-d2dffe2c.js";import Ct,{__tla as kt}from"./ContractList-845b201a.js";import Rt,{__tla as Mt}from"./BusinessList-98eaf006.js";import Ut,{__tla as Ot}from"./ReceivableList-dea1736e.js";import St,{__tla as Tt}from"./ReceivablePlanList-0fbb28ab.js";import Et,{__tla as $t}from"./PermissionList-f37089c9.js";import gt,{__tla as xt}from"./TransferForm-daeb2784.js";import Pt,{__tla as Dt}from"./index-a4cdd25b.js";import{B as p,__tla as Wt}from"./index-c0569cbe.js";import{u as Ft,__tla as It}from"./useMessage-06ddf735.js";import{__tla as Vt}from"./el-timeline-item-52f21599.js";import{__tla as Xt}from"./formatTime-f6a2c881.js";import{__tla as Bt}from"./dict-4072dcec.js";import{__tla as Ht}from"./Dialog-bbfaf85c.js";import{__tla as Jt}from"./el-tree-select-beee4f04.js";import{__tla as Lt}from"./index-f6304368.js";import"./tree-0af4953a.js";import{__tla as Qt}from"./index-add3c606.js";import{__tla as jt}from"./ContentWrap-694014d4.js";import{__tla as qt}from"./ContentWrap.vue_vue_type_script_setup_true_lang-11f85821.js";import{__tla as At}from"./el-card-919c14be.js";import{__tla as Gt}from"./el-collapse-item-1259fd66.js";import{__tla as Kt}from"./el-descriptions-item-4246212b.js";import{__tla as Nt}from"./DictTag-e41ec8de.js";import"./color-6e929987.js";import{__tla as Yt}from"./index-c8f58bd0.js";import{__tla as Zt}from"./index-dd73c59d.js";import{__tla as ta}from"./el-link-6cd4f1ac.js";import{__tla as aa}from"./index-ba6610e3.js";import{__tla as ra}from"./ContactForm-45f6f295.js";import{__tla as _a}from"./ContractForm-50990564.js";import{__tla as la}from"./formatter-89070787.js";import{__tla as ea}from"./index-bd35df69.js";import{__tla as ia}from"./BusinessForm-fc8346ce.js";import{__tla as oa}from"./index-92580438.js";import{__tla as ca}from"./BusinessListModal-5e153927.js";import{__tla as sa}from"./ReceivableForm-1b7646d9.js";import{__tla as ua}from"./ReceivablePlanForm-97327e86.js";import{__tla as ma}from"./PermissionForm-4a58c318.js";import{__tla as na}from"./FollowUpRecordForm-f0fe1d64.js";import{__tla as ya}from"./Editor-0f5cadc2.js";import{__tla as fa}from"./BusinessList-2f97a78f.js";import{__tla as pa}from"./ContactList-2ae5f2c2.js";let E,da=Promise.all([(()=>{try{return _t}catch{}})(),(()=>{try{return et}catch{}})(),(()=>{try{return ot}catch{}})(),(()=>{try{return yt}catch{}})(),(()=>{try{return pt}catch{}})(),(()=>{try{return ht}catch{}})(),(()=>{try{return zt}catch{}})(),(()=>{try{return wt}catch{}})(),(()=>{try{return kt}catch{}})(),(()=>{try{return Mt}catch{}})(),(()=>{try{return Ot}catch{}})(),(()=>{try{return Tt}catch{}})(),(()=>{try{return $t}catch{}})(),(()=>{try{return xt}catch{}})(),(()=>{try{return Dt}catch{}})(),(()=>{try{return Wt}catch{}})(),(()=>{try{return It}catch{}})(),(()=>{try{return Vt}catch{}})(),(()=>{try{return Xt}catch{}})(),(()=>{try{return Bt}catch{}})(),(()=>{try{return Ht}catch{}})(),(()=>{try{return Jt}catch{}})(),(()=>{try{return Lt}catch{}})(),(()=>{try{return Qt}catch{}})(),(()=>{try{return jt}catch{}})(),(()=>{try{return qt}catch{}})(),(()=>{try{return At}catch{}})(),(()=>{try{return Gt}catch{}})(),(()=>{try{return Kt}catch{}})(),(()=>{try{return Nt}catch{}})(),(()=>{try{return Yt}catch{}})(),(()=>{try{return Zt}catch{}})(),(()=>{try{return ta}catch{}})(),(()=>{try{return aa}catch{}})(),(()=>{try{return ra}catch{}})(),(()=>{try{return _a}catch{}})(),(()=>{try{return la}catch{}})(),(()=>{try{return ea}catch{}})(),(()=>{try{return ia}catch{}})(),(()=>{try{return oa}catch{}})(),(()=>{try{return ca}catch{}})(),(()=>{try{return sa}catch{}})(),(()=>{try{return ua}catch{}})(),(()=>{try{return ma}catch{}})(),(()=>{try{return na}catch{}})(),(()=>{try{return ya}catch{}})(),(()=>{try{return fa}catch{}})(),(()=>{try{return pa}catch{}})()]).then(async()=>{E=rt(L({name:"CrmCustomerDetail",__name:"index",setup(ha){const l=n(0),b=n(!0),e=Ft(),{delView:$}=it(),{currentRoute:g}=Q(),o=n(),r=n({}),d=async()=>{b.value=!0;try{r.value=await ct(l.value),await V()}finally{b.value=!1}},v=n(),x=()=>{var c;(c=v.value)==null||c.open("update",l.value)},w=n(),P=()=>{var c;(c=w.value)==null||c.open("\u5BA2\u6237\u8F6C\u79FB",l.value,st)},D=async()=>{await e.confirm(`\u786E\u5B9A\u9501\u5B9A\u5BA2\u6237\u3010${r.value.name}\u3011 \u5417\uFF1F`),await T(t(l.value),!0),e.success(`\u9501\u5B9A\u5BA2\u6237\u3010${r.value.name}\u3011\u6210\u529F`),await d()},W=async()=>{await e.confirm(`\u786E\u5B9A\u89E3\u9501\u5BA2\u6237\u3010${r.value.name}\u3011 \u5417\uFF1F`),await T(t(l.value),!1),e.success(`\u89E3\u9501\u5BA2\u6237\u3010${r.value.name}\u3011\u6210\u529F`),await d()},F=async()=>{await e.confirm(`\u786E\u5B9A\u9886\u53D6\u5BA2\u6237\u3010${r.value.name}\u3011 \u5417\uFF1F`),await ut([t(l.value)]),e.success(`\u9886\u53D6\u5BA2\u6237\u3010${r.value.name}\u3011\u6210\u529F`),await d()},I=async()=>{await e.confirm(`\u786E\u5B9A\u5C06\u5BA2\u6237\u3010${r.value.name}\u3011\u653E\u5165\u516C\u6D77\u5417\uFF1F`),await mt(t(l.value)),e.success(`\u5BA2\u6237\u3010${r.value.name}\u3011\u653E\u5165\u516C\u6D77\u6210\u529F`),z()},C=n([]),V=async()=>{if(!l.value)return;const c=await nt(l.value);C.value=c.list},z=()=>{$(t(g))},{params:k}=j();return q(()=>{if(!k.id)return e.warning("\u53C2\u6570\u9519\u8BEF\uFF0C\u5BA2\u6237\u4E0D\u80FD\u4E3A\u7A7A\uFF01"),void z();l.value=k.id,d()}),(c,ba)=>{const m=Y,i=Z,X=lt,B=tt,H=at,J=A("hasPermi");return s(),G(N,null,[a(bt,{customer:t(r),loading:t(b)},{default:_(()=>{var h,R,M,U,O,S;return[(h=t(o))!=null&&h.validateWrite?K((s(),y(m,{key:0,type:"primary",onClick:x},{default:_(()=>[u(" \u7F16\u8F91 ")]),_:1})),[[J,["crm:customer:update"]]]):f("",!0),(R=t(o))!=null&&R.validateOwnerUser?(s(),y(m,{key:1,type:"primary",onClick:P},{default:_(()=>[u(" \u8F6C\u79FB ")]),_:1})):f("",!0),(M=t(o))!=null&&M.validateWrite?(s(),y(m,{key:2},{default:_(()=>[u("\u66F4\u6539\u6210\u4EA4\u72B6\u6001")]),_:1})):f("",!0),t(r).lockStatus&&((U=t(o))!=null&&U.validateOwnerUser)?(s(),y(m,{key:3,onClick:W},{default:_(()=>[u(" \u89E3\u9501 ")]),_:1})):f("",!0),!t(r).lockStatus&&((O=t(o))!=null&&O.validateOwnerUser)?(s(),y(m,{key:4,onClick:D},{default:_(()=>[u(" \u9501\u5B9A ")]),_:1})):f("",!0),t(r).ownerUserId?f("",!0):(s(),y(m,{key:5,type:"primary",onClick:F},{default:_(()=>[u(" \u9886\u53D6\u5BA2\u6237 ")]),_:1})),t(r).ownerUserId&&((S=t(o))!=null&&S.validateOwnerUser)?(s(),y(m,{key:6,onClick:I},{default:_(()=>[u(" \u5BA2\u6237\u653E\u5165\u516C\u6D77 ")]),_:1})):f("",!0)]}),_:1},8,["customer","loading"]),a(H,null,{default:_(()=>[a(B,null,{default:_(()=>[a(i,{label:"\u8DDF\u8FDB\u8BB0\u5F55"},{default:_(()=>[a(Pt,{"biz-id":t(l),"biz-type":t(p).CRM_CUSTOMER},null,8,["biz-id","biz-type"])]),_:1}),a(i,{label:"\u57FA\u672C\u4FE1\u606F"},{default:_(()=>[a(dt,{customer:t(r)},null,8,["customer"])]),_:1}),a(i,{label:"\u8054\u7CFB\u4EBA",lazy:""},{default:_(()=>[a(vt,{"biz-id":t(r).id,"biz-type":t(p).CRM_CUSTOMER},null,8,["biz-id","biz-type"])]),_:1}),a(i,{label:"\u56E2\u961F\u6210\u5458"},{default:_(()=>{var h;return[a(Et,{ref_key:"permissionListRef",ref:o,"biz-id":t(r).id,"biz-type":t(p).CRM_CUSTOMER,"show-action":!((h=t(o))!=null&&h.isPool)||!1},null,8,["biz-id","biz-type","show-action"])]}),_:1}),a(i,{label:"\u5546\u673A",lazy:""},{default:_(()=>[a(Rt,{"biz-id":t(r).id,"biz-type":t(p).CRM_CUSTOMER},null,8,["biz-id","biz-type"])]),_:1}),a(i,{label:"\u5408\u540C",lazy:""},{default:_(()=>[a(Ct,{"biz-id":t(r).id,"biz-type":t(p).CRM_CUSTOMER},null,8,["biz-id","biz-type"])]),_:1}),a(i,{label:"\u56DE\u6B3E",lazy:""},{default:_(()=>[a(St,{"biz-id":t(r).id,"biz-type":t(p).CRM_CUSTOMER},null,8,["biz-id","biz-type"]),a(Ut,{"biz-id":t(r).id,"biz-type":t(p).CRM_CUSTOMER},null,8,["biz-id","biz-type"])]),_:1}),a(i,{label:"\u64CD\u4F5C\u65E5\u5FD7"},{default:_(()=>[a(X,{"log-list":t(C)},null,8,["log-list"])]),_:1}),a(i,{label:"\u56DE\u8BBF",lazy:""},{default:_(()=>[u("TODO \u5F85\u5F00\u53D1")]),_:1})]),_:1})]),_:1}),a(ft,{ref_key:"formRef",ref:v,onSuccess:d},null,512),a(gt,{ref_key:"crmTransferFormRef",ref:w,onSuccess:z},null,512)],64)}}}),[["__file","/Users/RuHu.Xu/Desktop/mall-newfeifan-zx-admin/src/views/crm/customer/detail/index.vue"]])});export{da as __tla,E as default};