1 |
- import{d as W,B as Z,r as d,f as $,u as ee,z as ae,S as le,o as c,c as R,i as e,w as t,a as l,T as _,F as z,C as te,j as y,m,D as b,t as L,G as re,H as oe,I as ne,X as pe,_ as ie,q as ce,J as me,K as se,L as ue,M as de,__tla as _e}from"./index-1e808f2e.js";import{_ as fe,__tla as he}from"./index.vue_vue_type_script_setup_true_lang-571824c6.js";import{_ as ye,__tla as we}from"./DictTag.vue_vue_type_script_lang-5c02ebfe.js";import{E as be,__tla as ge}from"./el-link-1faa17b5.js";import{_ as xe,__tla as ve}from"./ContentWrap.vue_vue_type_script_setup_true_lang-cc335a20.js";import{d as v,__tla as ke}from"./formatTime-a348c3be.js";import{d as Ce}from"./download-20922b56.js";import{i as Ve,j as Ne,k as Se,__tla as Ue}from"./index-52a3759a.js";import{_ as qe,__tla as Ie}from"./ContactForm.vue_vue_type_script_setup_true_lang-c3c5f3e6.js";import{D as A,__tla as Ke}from"./dict-a31cb4ba.js";import{b as Te,__tla as Ee}from"./index-a619821f.js";import{u as De,__tla as Fe}from"./useMessage-5f9e8917.js";import{__tla as Qe}from"./index-73afebcf.js";import"./color-6e929987.js";import{__tla as Re}from"./el-card-03b3588b.js";import{__tla as ze}from"./Dialog-f44f9d78.js";import"./_plugin-vue_export-helper-1b428a4d.js";import{__tla as Le}from"./el-tree-select-e8e05888.js";import{__tla as Ae}from"./index-684d98da.js";import{__tla as Me}from"./index-f40ed4f7.js";import"./tree-fd3a041e.js";let M,Pe=Promise.all([(()=>{try{return _e}catch{}})(),(()=>{try{return he}catch{}})(),(()=>{try{return we}catch{}})(),(()=>{try{return ge}catch{}})(),(()=>{try{return ve}catch{}})(),(()=>{try{return ke}catch{}})(),(()=>{try{return Ue}catch{}})(),(()=>{try{return Ie}catch{}})(),(()=>{try{return Ke}catch{}})(),(()=>{try{return Ee}catch{}})(),(()=>{try{return Fe}catch{}})(),(()=>{try{return Qe}catch{}})(),(()=>{try{return Re}catch{}})(),(()=>{try{return ze}catch{}})(),(()=>{try{return Le}catch{}})(),(()=>{try{return Ae}catch{}})(),(()=>{try{return Me}catch{}})()]).then(async()=>{M=W({name:"CrmContact",__name:"index",setup(je){const k=De(),{t:P}=Z(),C=d(!0),S=d(0),U=d([]),q=d([]),r=$({pageNo:1,pageSize:10,mobile:void 0,telephone:void 0,email:void 0,customerId:void 0,name:void 0,qq:void 0,wechat:void 0}),I=d(),V=d(!1),w=async()=>{C.value=!0;try{const s=await Ve(r);U.value=s.list,S.value=s.total}finally{C.value=!1}},p=()=>{r.pageNo=1,w()},j=()=>{I.value.resetFields(),p()},K=d(),T=(s,o)=>{K.value.open(s,o)},B=async()=>{try{await k.exportConfirm(),V.value=!0;const s=await Se(r);Ce.excel(s,"\u8054\u7CFB\u4EBA.xls")}catch{}finally{V.value=!1}},{push:E}=ee();return ae(async()=>{await w(),q.value=await Te()}),(s,o)=>{const G=re,O=oe,i=ne,f=pe,g=ie,h=ce,X=me,D=xe,F=be,n=se,Q=ye,H=ue,J=fe,x=le("hasPermi"),Y=de;return c(),R(z,null,[e(D,null,{default:t(()=>[e(X,{ref_key:"queryFormRef",ref:I,inline:!0,model:l(r),class:"-mb-15px","label-width":"68px"},{default:t(()=>[e(i,{label:"\u5BA2\u6237",prop:"customerId"},{default:t(()=>[e(O,{modelValue:l(r).customerId,"onUpdate:modelValue":o[0]||(o[0]=a=>l(r).customerId=a),class:"!w-240px",clearable:"","lable-key":"name",placeholder:"\u8BF7\u9009\u62E9\u5BA2\u6237","value-key":"id",onKeyup:_(p,["enter"])},{default:t(()=>[(c(!0),R(z,null,te(l(q),a=>(c(),y(G,{key:a.id,label:a.name,value:a.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e(i,{label:"\u59D3\u540D",prop:"name"},{default:t(()=>[e(f,{modelValue:l(r).name,"onUpdate:modelValue":o[1]||(o[1]=a=>l(r).name=a),class:"!w-240px",clearable:"",placeholder:"\u8BF7\u8F93\u5165\u59D3\u540D",onKeyup:_(p,["enter"])},null,8,["modelValue"])]),_:1}),e(i,{label:"\u624B\u673A\u53F7",prop:"mobile"},{default:t(()=>[e(f,{modelValue:l(r).mobile,"onUpdate:modelValue":o[2]||(o[2]=a=>l(r).mobile=a),class:"!w-240px",clearable:"",placeholder:"\u8BF7\u8F93\u5165\u624B\u673A\u53F7",onKeyup:_(p,["enter"])},null,8,["modelValue"])]),_:1}),e(i,{label:"\u7535\u8BDD",prop:"telephone"},{default:t(()=>[e(f,{modelValue:l(r).telephone,"onUpdate:modelValue":o[3]||(o[3]=a=>l(r).telephone=a),class:"!w-240px",clearable:"",placeholder:"\u8BF7\u8F93\u5165\u7535\u8BDD",onKeyup:_(p,["enter"])},null,8,["modelValue"])]),_:1}),e(i,{label:"QQ",prop:"qq"},{default:t(()=>[e(f,{modelValue:l(r).qq,"onUpdate:modelValue":o[4]||(o[4]=a=>l(r).qq=a),class:"!w-240px",clearable:"",placeholder:"\u8BF7\u8F93\u5165QQ",onKeyup:_(p,["enter"])},null,8,["modelValue"])]),_:1}),e(i,{label:"\u5FAE\u4FE1",prop:"wechat"},{default:t(()=>[e(f,{modelValue:l(r).wechat,"onUpdate:modelValue":o[5]||(o[5]=a=>l(r).wechat=a),class:"!w-240px",clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5FAE\u4FE1",onKeyup:_(p,["enter"])},null,8,["modelValue"])]),_:1}),e(i,{label:"\u7535\u5B50\u90AE\u7BB1",prop:"email"},{default:t(()=>[e(f,{modelValue:l(r).email,"onUpdate:modelValue":o[6]||(o[6]=a=>l(r).email=a),class:"!w-240px",clearable:"",placeholder:"\u8BF7\u8F93\u5165\u7535\u5B50\u90AE\u7BB1",onKeyup:_(p,["enter"])},null,8,["modelValue"])]),_:1}),e(i,null,{default:t(()=>[e(h,{onClick:p},{default:t(()=>[e(g,{class:"mr-5px",icon:"ep:search"}),m(" \u641C\u7D22 ")]),_:1}),e(h,{onClick:j},{default:t(()=>[e(g,{class:"mr-5px",icon:"ep:refresh"}),m(" \u91CD\u7F6E ")]),_:1}),b((c(),y(h,{type:"primary",onClick:o[7]||(o[7]=a=>T("create"))},{default:t(()=>[e(g,{class:"mr-5px",icon:"ep:plus"}),m(" \u65B0\u589E ")]),_:1})),[[x,["crm:contact:create"]]]),b((c(),y(h,{loading:l(V),plain:"",type:"success",onClick:B},{default:t(()=>[e(g,{class:"mr-5px",icon:"ep:download"}),m(" \u5BFC\u51FA ")]),_:1},8,["loading"])),[[x,["crm:contact:export"]]])]),_:1})]),_:1},8,["model"])]),_:1}),e(D,null,{default:t(()=>[b((c(),y(H,{data:l(U),"show-overflow-tooltip":!0,stripe:!0},{default:t(()=>[e(n,{align:"center",fixed:"left",label:"\u59D3\u540D",prop:"name",width:"140"},{default:t(a=>[e(F,{underline:!1,type:"primary",onClick:N=>{return u=a.row.id,void E({name:"CrmContactDetail",params:{id:u}});var u}},{default:t(()=>[m(L(a.row.name),1)]),_:2},1032,["onClick"])]),_:1}),e(n,{align:"center",fixed:"left",label:"\u5BA2\u6237\u540D\u79F0",prop:"customerName",width:"120"},{default:t(a=>[e(F,{underline:!1,type:"primary",onClick:N=>{return u=a.row.customerId,void E({name:"CrmCustomerDetail",params:{id:u}});var u}},{default:t(()=>[m(L(a.row.customerName),1)]),_:2},1032,["onClick"])]),_:1}),e(n,{align:"center",label:"\u624B\u673A",prop:"mobile",width:"120"}),e(n,{align:"center",label:"\u7535\u8BDD",prop:"telephone",width:"120"}),e(n,{align:"center",label:"\u90AE\u7BB1",prop:"email",width:"120"}),e(n,{align:"center",label:"\u804C\u4F4D",prop:"post",width:"120"}),e(n,{align:"center",label:"\u5730\u5740",prop:"detailAddress",width:"120"}),e(n,{formatter:l(v),align:"center",label:"\u4E0B\u6B21\u8054\u7CFB\u65F6\u95F4",prop:"contactNextTime",width:"180px"},null,8,["formatter"]),e(n,{align:"center",label:"\u5907\u6CE8",prop:"remark"}),e(n,{align:"center",label:"\u5173\u952E\u51B3\u7B56\u4EBA",prop:"master",width:"100"},{default:t(a=>[e(Q,{type:l(A).INFRA_BOOLEAN_STRING,value:a.row.master},null,8,["type","value"])]),_:1}),e(n,{align:"center",label:"\u76F4\u5C5E\u4E0A\u7EA7",prop:"parentName",width:"140"}),e(n,{formatter:l(v),align:"center",label:"\u6700\u540E\u8DDF\u8FDB\u65F6\u95F4",prop:"contactLastTime",width:"180px"},null,8,["formatter"]),e(n,{align:"center",label:"\u6027\u522B",prop:"sex"},{default:t(a=>[e(Q,{type:l(A).SYSTEM_USER_SEX,value:a.row.sex},null,8,["type","value"])]),_:1}),e(n,{align:"center",label:"\u8D1F\u8D23\u4EBA",prop:"ownerUserName",width:"120"}),e(n,{align:"center",label:"\u521B\u5EFA\u4EBA",prop:"creatorName",width:"120"}),e(n,{formatter:l(v),align:"center",label:"\u66F4\u65B0\u65F6\u95F4",prop:"updateTime",width:"180px"},null,8,["formatter"]),e(n,{formatter:l(v),align:"center",label:"\u521B\u5EFA\u65F6\u95F4",prop:"createTime",width:"180px"},null,8,["formatter"]),e(n,{align:"center",fixed:"right",label:"\u64CD\u4F5C",width:"200"},{default:t(a=>[b((c(),y(h,{link:"",type:"primary",onClick:N=>T("update",a.row.id)},{default:t(()=>[m(" \u7F16\u8F91 ")]),_:2},1032,["onClick"])),[[x,["crm:contact:update"]]]),b((c(),y(h,{link:"",type:"danger",onClick:N=>(async u=>{try{await k.delConfirm(),await Ne(u),k.success(P("common.delSuccess")),await w()}catch{}})(a.row.id)},{default:t(()=>[m(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[x,["crm:contact:delete"]]])]),_:1})]),_:1},8,["data"])),[[Y,l(C)]]),e(J,{limit:l(r).pageSize,"onUpdate:limit":o[8]||(o[8]=a=>l(r).pageSize=a),page:l(r).pageNo,"onUpdate:page":o[9]||(o[9]=a=>l(r).pageNo=a),total:l(S),onPagination:w},null,8,["limit","page","total"])]),_:1}),e(qe,{ref_key:"formRef",ref:K,onSuccess:w},null,512)],64)}}})});export{Pe as __tla,M as default};
|