import{d as A,r as n,u as G,I as H,k as J,P as K,o as c,c as N,f as a,w as _,a as t,v as Q,q as y,m as u,O as f,F as X,B as Y,V as Z,W as tt,E as at,__tla as rt}from"./index-73e02845.js";import{_ as _t,__tla as lt}from"./OperateLogV2-61c3e0aa.js";import{u as et,__tla as it}from"./tagsView-ec31b381.js";import{g as st,t as ot,l as T,r as ct,p as ut,a as mt,__tla as nt}from"./index-f7579301.js";import{_ as yt,__tla as ft}from"./CustomerForm.vue_vue_type_script_setup_true_lang-6655bef8.js";import{_ as pt,__tla as dt}from"./CustomerDetailsInfo.vue_vue_type_script_setup_true_lang-41d78682.js";import{_ as ht,__tla as bt}from"./CustomerDetailsHeader.vue_vue_type_script_setup_true_lang-fd5cbe06.js";import{_ as zt,__tla as vt}from"./ContactList.vue_vue_type_script_setup_true_lang-4c3eacbd.js";import{_ as wt,__tla as Ct}from"./ContractList.vue_vue_type_script_setup_true_lang-3ab2c229.js";import{_ as kt,__tla as Rt}from"./BusinessList.vue_vue_type_script_setup_true_lang-ea928f25.js";import{_ as Mt,__tla as Ot}from"./ReceivableList.vue_vue_type_script_setup_true_lang-b1466260.js";import{_ as Ut,__tla as St}from"./ReceivablePlanList.vue_vue_type_script_setup_true_lang-6c338cac.js";import{_ as Tt,__tla as Et}from"./PermissionList.vue_vue_type_script_setup_true_lang-b3bf1bc1.js";import{_ as $t,__tla as gt}from"./TransferForm.vue_vue_type_script_setup_true_lang-123a2112.js";import{_ as Pt,__tla as It}from"./index.vue_vue_type_script_setup_true_lang-73aea264.js";import{B as p,__tla as Vt}from"./index-251d8d19.js";import{u as Wt,__tla as xt}from"./useMessage-1490ad82.js";import{__tla as Bt}from"./el-timeline-item-f8a2980d.js";import{__tla as Dt}from"./formatTime-5f7a2be1.js";import{__tla as Ft}from"./dict-0fdd6c74.js";import"./_plugin-vue_export-helper-1b428a4d.js";import{__tla as qt}from"./Dialog-1f04d1b7.js";import{__tla as Lt}from"./el-tree-select-a05a2d94.js";import{__tla as jt}from"./index-ab952ec2.js";import"./tree-fd3a041e.js";import{__tla as At}from"./index-95424779.js";import{__tla as Gt}from"./ContentWrap.vue_vue_type_script_setup_true_lang-589371a6.js";import{__tla as Ht}from"./el-card-ada74e7d.js";import{__tla as Jt}from"./el-collapse-item-ef3a5f74.js";import{__tla as Kt}from"./el-descriptions-item-fc6bc3ea.js";import{__tla as Nt}from"./DictTag.vue_vue_type_script_lang-af2c8b0f.js";import"./color-6e929987.js";import{__tla as Qt}from"./index.vue_vue_type_script_setup_true_lang-2534a34f.js";import{__tla as Xt}from"./index-c1a24aa4.js";import{__tla as Yt}from"./el-link-a239bd3a.js";import{__tla as Zt}from"./index-b30ae5cf.js";import{__tla as ta}from"./ContactForm.vue_vue_type_script_setup_true_lang-e37b013d.js";import{__tla as aa}from"./ContractForm.vue_vue_type_script_setup_true_lang-31b713c9.js";import{__tla as ra}from"./formatter-0ce9a88d.js";import{__tla as _a}from"./index-cc324f26.js";import{__tla as la}from"./BusinessForm.vue_vue_type_script_setup_true_lang-39a18745.js";import{__tla as ea}from"./index-f253eb0e.js";import{__tla as ia}from"./BusinessListModal.vue_vue_type_script_setup_true_lang-395795b8.js";import{__tla as sa}from"./ReceivableForm.vue_vue_type_script_setup_true_lang-f670fe9e.js";import{__tla as oa}from"./ReceivablePlanForm.vue_vue_type_script_setup_true_lang-cabe054e.js";import{__tla as ca}from"./PermissionForm.vue_vue_type_script_setup_true_lang-f7eaa085.js";import{__tla as ua}from"./FollowUpRecordForm.vue_vue_type_script_setup_true_lang-34e8dec8.js";import{__tla as ma}from"./style.css_vue_type_style_index_0_src_true_lang-6489f3d1.js";import{__tla as na}from"./BusinessList.vue_vue_type_script_setup_true_lang-19eb07da.js";import{__tla as ya}from"./ContactList.vue_vue_type_script_setup_true_lang-86e32cc1.js";let E,fa=Promise.all([(()=>{try{return rt}catch{}})(),(()=>{try{return lt}catch{}})(),(()=>{try{return it}catch{}})(),(()=>{try{return nt}catch{}})(),(()=>{try{return ft}catch{}})(),(()=>{try{return dt}catch{}})(),(()=>{try{return bt}catch{}})(),(()=>{try{return vt}catch{}})(),(()=>{try{return Ct}catch{}})(),(()=>{try{return Rt}catch{}})(),(()=>{try{return Ot}catch{}})(),(()=>{try{return St}catch{}})(),(()=>{try{return Et}catch{}})(),(()=>{try{return gt}catch{}})(),(()=>{try{return It}catch{}})(),(()=>{try{return Vt}catch{}})(),(()=>{try{return xt}catch{}})(),(()=>{try{return Bt}catch{}})(),(()=>{try{return Dt}catch{}})(),(()=>{try{return Ft}catch{}})(),(()=>{try{return qt}catch{}})(),(()=>{try{return Lt}catch{}})(),(()=>{try{return jt}catch{}})(),(()=>{try{return At}catch{}})(),(()=>{try{return Gt}catch{}})(),(()=>{try{return Ht}catch{}})(),(()=>{try{return Jt}catch{}})(),(()=>{try{return Kt}catch{}})(),(()=>{try{return Nt}catch{}})(),(()=>{try{return Qt}catch{}})(),(()=>{try{return Xt}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 sa}catch{}})(),(()=>{try{return oa}catch{}})(),(()=>{try{return ca}catch{}})(),(()=>{try{return ua}catch{}})(),(()=>{try{return ma}catch{}})(),(()=>{try{return na}catch{}})(),(()=>{try{return ya}catch{}})()]).then(async()=>{E=A({name:"CrmCustomerDetail",__name:"index",setup(pa){const l=n(0),b=n(!0),e=Wt(),{delView:$}=et(),{currentRoute:g}=G(),s=n(),r=n({}),d=async()=>{b.value=!0;try{r.value=await st(l.value),await D()}finally{b.value=!1}},v=n(),P=()=>{var o;(o=v.value)==null||o.open("update",l.value)},w=n(),I=()=>{var o;(o=w.value)==null||o.open("\u5BA2\u6237\u8F6C\u79FB",l.value,ot)},V=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()},x=async()=>{await e.confirm(`\u786E\u5B9A\u9886\u53D6\u5BA2\u6237\u3010${r.value.name}\u3011 \u5417\uFF1F`),await ct([t(l.value)]),e.success(`\u9886\u53D6\u5BA2\u6237\u3010${r.value.name}\u3011\u6210\u529F`),await d()},B=async()=>{await e.confirm(`\u786E\u5B9A\u5C06\u5BA2\u6237\u3010${r.value.name}\u3011\u653E\u5165\u516C\u6D77\u5417\uFF1F`),await ut(t(l.value)),e.success(`\u5BA2\u6237\u3010${r.value.name}\u3011\u653E\u5165\u516C\u6D77\u6210\u529F`),z()},C=n([]),D=async()=>{if(!l.value)return;const o=await mt(l.value);C.value=o.list},z=()=>{$(t(g))},{params:k}=H();return J(()=>{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()}),(o,da)=>{const m=Y,i=Z,F=_t,q=tt,L=at,j=K("hasPermi");return c(),N(X,null,[a(ht,{customer:t(r),loading:t(b)},{default:_(()=>{var h,R,M,O,U,S;return[(h=t(s))!=null&&h.validateWrite?Q((c(),y(m,{key:0,type:"primary",onClick:P},{default:_(()=>[u(" \u7F16\u8F91 ")]),_:1})),[[j,["crm:customer:update"]]]):f("",!0),(R=t(s))!=null&&R.validateOwnerUser?(c(),y(m,{key:1,type:"primary",onClick:I},{default:_(()=>[u(" \u8F6C\u79FB ")]),_:1})):f("",!0),(M=t(s))!=null&&M.validateWrite?(c(),y(m,{key:2},{default:_(()=>[u("\u66F4\u6539\u6210\u4EA4\u72B6\u6001")]),_:1})):f("",!0),t(r).lockStatus&&((O=t(s))!=null&&O.validateOwnerUser)?(c(),y(m,{key:3,onClick:W},{default:_(()=>[u(" \u89E3\u9501 ")]),_:1})):f("",!0),!t(r).lockStatus&&((U=t(s))!=null&&U.validateOwnerUser)?(c(),y(m,{key:4,onClick:V},{default:_(()=>[u(" \u9501\u5B9A ")]),_:1})):f("",!0),t(r).ownerUserId?f("",!0):(c(),y(m,{key:5,type:"primary",onClick:x},{default:_(()=>[u(" \u9886\u53D6\u5BA2\u6237 ")]),_:1})),t(r).ownerUserId&&((S=t(s))!=null&&S.validateOwnerUser)?(c(),y(m,{key:6,onClick:B},{default:_(()=>[u(" \u5BA2\u6237\u653E\u5165\u516C\u6D77 ")]),_:1})):f("",!0)]}),_:1},8,["customer","loading"]),a(L,null,{default:_(()=>[a(q,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(pt,{customer:t(r)},null,8,["customer"])]),_:1}),a(i,{label:"\u8054\u7CFB\u4EBA",lazy:""},{default:_(()=>[a(zt,{"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(Tt,{ref_key:"permissionListRef",ref:s,"biz-id":t(r).id,"biz-type":t(p).CRM_CUSTOMER,"show-action":!((h=t(s))!=null&&h.isPool)||!1},null,8,["biz-id","biz-type","show-action"])]}),_:1}),a(i,{label:"\u5546\u673A",lazy:""},{default:_(()=>[a(kt,{"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(wt,{"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(Ut,{"biz-id":t(r).id,"biz-type":t(p).CRM_CUSTOMER},null,8,["biz-id","biz-type"]),a(Mt,{"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(F,{"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(yt,{ref_key:"formRef",ref:v,onSuccess:d},null,512),a($t,{ref_key:"crmTransferFormRef",ref:w,onSuccess:z},null,512)],64)}}})});export{fa as __tla,E as default};