index-b08f4df1.js 7.2 KB

1
  1. import{d as V,r as f,u as Y,Y as j,b as q,a1 as H,o as p,c as K,f as e,B as r,a,l as N,A as c,G as n,E as _,F as Q,L as X,a7 as Z,a8 as aa,J as ea}from"./index-39d329c4.js";import{_ as ia}from"./OperateLogV2-0bcd0781.js";import{u as ra}from"./tagsView-58b1e0b4.js";import{g as ta,t as la,l as $,r as oa,p as ma,a as sa}from"./index-9e03f1c7.js";import{_ as ua}from"./CustomerForm.vue_vue_type_script_setup_true_lang-7ebe802a.js";import{_ as pa}from"./CustomerDetailsInfo.vue_vue_type_script_setup_true_lang-38c93834.js";import{_ as na}from"./CustomerDetailsHeader.vue_vue_type_script_setup_true_lang-9c51e9ef.js";import{_ as da}from"./ContactList.vue_vue_type_script_setup_true_lang-aab359b0.js";import{_ as fa}from"./ContractList.vue_vue_type_script_setup_true_lang-d6c0813a.js";import{_ as ca}from"./BusinessList.vue_vue_type_script_setup_true_lang-701334fe.js";import{_ as _a}from"./ReceivableList.vue_vue_type_script_setup_true_lang-09be3b9e.js";import{_ as ya}from"./ReceivablePlanList.vue_vue_type_script_setup_true_lang-ff0ccf13.js";import{_ as ba}from"./PermissionList.vue_vue_type_script_setup_true_lang-dae3fb0d.js";import{_ as za}from"./TransferForm.vue_vue_type_script_setup_true_lang-36598a0b.js";import{_ as va}from"./index.vue_vue_type_script_setup_true_lang-14c1af22.js";import{B as y}from"./index-1aac47d6.js";import{u as wa}from"./useMessage-47346882.js";import"./el-timeline-item-548c5a43.js";import"./formatTime-4c4af720.js";import"./dict-0856c143.js";import"./_plugin-vue_export-helper-1b428a4d.js";import"./Dialog-6a91c005.js";import"./el-tree-select-2af4c3cc.js";import"./index-7e0ef0d5.js";import"./tree-fd3a041e.js";import"./index-1bb0320c.js";import"./ContentWrap.vue_vue_type_script_setup_true_lang-f3ab50e7.js";import"./el-card-5cc80b8a.js";import"./el-collapse-item-d4073a86.js";import"./el-descriptions-item-a2a4aeac.js";import"./DictTag.vue_vue_type_script_lang-b95bb985.js";import"./color-6e929987.js";import"./index.vue_vue_type_script_setup_true_lang-24521fcb.js";import"./index-e66b1f22.js";import"./el-link-fd77eff1.js";import"./index-b97b3218.js";import"./ContactForm.vue_vue_type_script_setup_true_lang-b31b0828.js";import"./ContractForm.vue_vue_type_script_setup_true_lang-96a414ca.js";import"./formatter-20463de3.js";import"./index-ff7238a2.js";import"./BusinessForm.vue_vue_type_script_setup_true_lang-a445bb90.js";import"./index-464ce4fc.js";import"./BusinessListModal.vue_vue_type_script_setup_true_lang-ee93b452.js";import"./ReceivableForm.vue_vue_type_script_setup_true_lang-31059b92.js";import"./ReceivablePlanForm.vue_vue_type_script_setup_true_lang-8ddb802d.js";import"./PermissionForm.vue_vue_type_script_setup_true_lang-a55bf1f1.js";import"./FollowUpRecordForm.vue_vue_type_script_setup_true_lang-dfe91387.js";import"./style.css_vue_type_style_index_0_src_true_lang-1943bea4.js";import"./BusinessList.vue_vue_type_script_setup_true_lang-d52dab3f.js";import"./ContactList.vue_vue_type_script_setup_true_lang-2cb049e5.js";const Ca=V({name:"CrmCustomerDetail",__name:"index",setup(ka){const l=f(0),v=f(!0),o=wa(),{delView:g}=ra(),{currentRoute:h}=Y(),s=f(),i=f({}),b=async()=>{v.value=!0;try{i.value=await ta(l.value),await L()}finally{v.value=!1}},C=f(),W=()=>{var u;(u=C.value)==null||u.open("update",l.value)},k=f(),x=()=>{var u;(u=k.value)==null||u.open("\u5BA2\u6237\u8F6C\u79FB",l.value,la)},B=async()=>{await o.confirm(`\u786E\u5B9A\u9501\u5B9A\u5BA2\u6237\u3010${i.value.name}\u3011 \u5417\uFF1F`),await $(a(l.value),!0),o.success(`\u9501\u5B9A\u5BA2\u6237\u3010${i.value.name}\u3011\u6210\u529F`),await b()},D=async()=>{await o.confirm(`\u786E\u5B9A\u89E3\u9501\u5BA2\u6237\u3010${i.value.name}\u3011 \u5417\uFF1F`),await $(a(l.value),!1),o.success(`\u89E3\u9501\u5BA2\u6237\u3010${i.value.name}\u3011\u6210\u529F`),await b()},F=async()=>{await o.confirm(`\u786E\u5B9A\u9886\u53D6\u5BA2\u6237\u3010${i.value.name}\u3011 \u5417\uFF1F`),await oa([a(l.value)]),o.success(`\u9886\u53D6\u5BA2\u6237\u3010${i.value.name}\u3011\u6210\u529F`),await b()},I=async()=>{await o.confirm(`\u786E\u5B9A\u5C06\u5BA2\u6237\u3010${i.value.name}\u3011\u653E\u5165\u516C\u6D77\u5417\uFF1F`),await ma(a(l.value)),o.success(`\u5BA2\u6237\u3010${i.value.name}\u3011\u653E\u5165\u516C\u6D77\u6210\u529F`),w()},R=f([]),L=async()=>{if(!l.value)return;const u=await sa(l.value);R.value=u.list},w=()=>{g(a(h))},{params:M}=j();return q(()=>{if(!M.id)return o.warning("\u53C2\u6570\u9519\u8BEF\uFF0C\u5BA2\u6237\u4E0D\u80FD\u4E3A\u7A7A\uFF01"),void w();l.value=M.id,b()}),(u,t)=>{const d=X,m=Z,P=ia,A=aa,G=ea,J=H("hasPermi");return p(),K(Q,null,[e(na,{customer:a(i),loading:a(v)},{default:r(()=>{var z,O,U,S,T,E;return[(z=a(s))!=null&&z.validateWrite?N((p(),c(d,{key:0,type:"primary",onClick:W},{default:r(()=>t[0]||(t[0]=[n(" \u7F16\u8F91 ")])),_:1})),[[J,["crm:customer:update"]]]):_("",!0),(O=a(s))!=null&&O.validateOwnerUser?(p(),c(d,{key:1,type:"primary",onClick:x},{default:r(()=>t[1]||(t[1]=[n(" \u8F6C\u79FB ")])),_:1})):_("",!0),(U=a(s))!=null&&U.validateWrite?(p(),c(d,{key:2},{default:r(()=>t[2]||(t[2]=[n("\u66F4\u6539\u6210\u4EA4\u72B6\u6001")])),_:1})):_("",!0),a(i).lockStatus&&((S=a(s))!=null&&S.validateOwnerUser)?(p(),c(d,{key:3,onClick:D},{default:r(()=>t[3]||(t[3]=[n(" \u89E3\u9501 ")])),_:1})):_("",!0),!a(i).lockStatus&&((T=a(s))!=null&&T.validateOwnerUser)?(p(),c(d,{key:4,onClick:B},{default:r(()=>t[4]||(t[4]=[n(" \u9501\u5B9A ")])),_:1})):_("",!0),a(i).ownerUserId?_("",!0):(p(),c(d,{key:5,type:"primary",onClick:F},{default:r(()=>t[5]||(t[5]=[n(" \u9886\u53D6\u5BA2\u6237 ")])),_:1})),a(i).ownerUserId&&((E=a(s))!=null&&E.validateOwnerUser)?(p(),c(d,{key:6,onClick:I},{default:r(()=>t[6]||(t[6]=[n(" \u5BA2\u6237\u653E\u5165\u516C\u6D77 ")])),_:1})):_("",!0)]}),_:1},8,["customer","loading"]),e(G,null,{default:r(()=>[e(A,null,{default:r(()=>[e(m,{label:"\u8DDF\u8FDB\u8BB0\u5F55"},{default:r(()=>[e(va,{"biz-id":a(l),"biz-type":a(y).CRM_CUSTOMER},null,8,["biz-id","biz-type"])]),_:1}),e(m,{label:"\u57FA\u672C\u4FE1\u606F"},{default:r(()=>[e(pa,{customer:a(i)},null,8,["customer"])]),_:1}),e(m,{label:"\u8054\u7CFB\u4EBA",lazy:""},{default:r(()=>[e(da,{"biz-id":a(i).id,"biz-type":a(y).CRM_CUSTOMER},null,8,["biz-id","biz-type"])]),_:1}),e(m,{label:"\u56E2\u961F\u6210\u5458"},{default:r(()=>{var z;return[e(ba,{ref_key:"permissionListRef",ref:s,"biz-id":a(i).id,"biz-type":a(y).CRM_CUSTOMER,"show-action":!((z=a(s))!=null&&z.isPool)||!1},null,8,["biz-id","biz-type","show-action"])]}),_:1}),e(m,{label:"\u5546\u673A",lazy:""},{default:r(()=>[e(ca,{"biz-id":a(i).id,"biz-type":a(y).CRM_CUSTOMER},null,8,["biz-id","biz-type"])]),_:1}),e(m,{label:"\u5408\u540C",lazy:""},{default:r(()=>[e(fa,{"biz-id":a(i).id,"biz-type":a(y).CRM_CUSTOMER},null,8,["biz-id","biz-type"])]),_:1}),e(m,{label:"\u56DE\u6B3E",lazy:""},{default:r(()=>[e(ya,{"biz-id":a(i).id,"biz-type":a(y).CRM_CUSTOMER},null,8,["biz-id","biz-type"]),e(_a,{"biz-id":a(i).id,"biz-type":a(y).CRM_CUSTOMER},null,8,["biz-id","biz-type"])]),_:1}),e(m,{label:"\u64CD\u4F5C\u65E5\u5FD7"},{default:r(()=>[e(P,{"log-list":a(R)},null,8,["log-list"])]),_:1}),e(m,{label:"\u56DE\u8BBF",lazy:""},{default:r(()=>t[7]||(t[7]=[n("TODO \u5F85\u5F00\u53D1")])),_:1})]),_:1})]),_:1}),e(ua,{ref_key:"formRef",ref:C,onSuccess:b},null,512),e(za,{ref_key:"crmTransferFormRef",ref:k,onSuccess:w},null,512)],64)}}});export{Ca as default};