1 |
- import{d as W,h as Z,r as d,e as $,u as ee,k as ae,P as le,o as c,c as R,f as e,w as t,a as l,Q as _,F as z,n as te,q as y,m,v as b,t as A,x as re,y as oe,z as ne,U as pe,_ as ie,B as ce,C as me,D as se,G as ue,H as de,__tla as _e}from"./index-2eab2d23.js";import{_ as fe,__tla as he}from"./index.vue_vue_type_script_setup_true_lang-5730b053.js";import{_ as ye,__tla as we}from"./DictTag.vue_vue_type_script_lang-cb1e47ff.js";import{E as be,__tla as ge}from"./el-link-f0d278a2.js";import{_ as xe,__tla as ve}from"./ContentWrap.vue_vue_type_script_setup_true_lang-5a63038a.js";import{d as v,__tla as ke}from"./formatTime-41155543.js";import{d as Ce}from"./download-20922b56.js";import{i as Ve,j as Ne,k as Ue,__tla as qe}from"./index-50096d4b.js";import{_ as Se,__tla as Ie}from"./ContactForm.vue_vue_type_script_setup_true_lang-f505d996.js";import{D as P,__tla as Ke}from"./dict-1ad71b6f.js";import{b as Qe,__tla as Te}from"./index-8009e4fb.js";import{u as De,__tla as Ee}from"./useMessage-171aa63e.js";import{__tla as Fe}from"./index-cc63c3c4.js";import"./color-6e929987.js";import{__tla as Re}from"./el-card-c558f0ec.js";import{__tla as ze}from"./Dialog-c2716df6.js";import"./_plugin-vue_export-helper-1b428a4d.js";import{__tla as Ae}from"./el-tree-select-4ae7c290.js";import{__tla as Pe}from"./index-e191a423.js";import{__tla as Ge}from"./index-44a34f60.js";import"./tree-fd3a041e.js";let G,Le=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 qe}catch{}})(),(()=>{try{return Ie}catch{}})(),(()=>{try{return Ke}catch{}})(),(()=>{try{return Te}catch{}})(),(()=>{try{return Ee}catch{}})(),(()=>{try{return Fe}catch{}})(),(()=>{try{return Re}catch{}})(),(()=>{try{return ze}catch{}})(),(()=>{try{return Ae}catch{}})(),(()=>{try{return Pe}catch{}})(),(()=>{try{return Ge}catch{}})()]).then(async()=>{G=W({name:"CrmContact",__name:"index",setup(Be){const k=De(),{t:L}=Z(),C=d(!0),U=d(0),q=d([]),S=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);q.value=s.list,U.value=s.total}finally{C.value=!1}},p=()=>{r.pageNo=1,w()},B=()=>{I.value.resetFields(),p()},K=d(),Q=(s,o)=>{K.value.open(s,o)},O=async()=>{try{await k.exportConfirm(),V.value=!0;const s=await Ue(r);Ce.excel(s,"\u8054\u7CFB\u4EBA.xls")}catch{}finally{V.value=!1}},{push:T}=ee();return ae(async()=>{await w(),S.value=await Qe()}),(s,o)=>{const j=re,H=oe,i=ne,f=pe,g=ie,h=ce,M=me,D=xe,E=be,n=se,F=ye,X=ue,Y=fe,x=le("hasPermi"),J=de;return c(),R(z,null,[e(D,null,{default:t(()=>[e(M,{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(H,{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(S),a=>(c(),y(j,{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:B},{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=>Q("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:O},{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(X,{data:l(q),"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(E,{underline:!1,type:"primary",onClick:N=>{return u=a.row.id,void T({name:"CrmContactDetail",params:{id:u}});var u}},{default:t(()=>[m(A(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(E,{underline:!1,type:"primary",onClick:N=>{return u=a.row.customerId,void T({name:"CrmCustomerDetail",params:{id:u}});var u}},{default:t(()=>[m(A(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(F,{type:l(P).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(F,{type:l(P).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=>Q("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(L("common.delSuccess")),await w()}catch{}})(a.row.id)},{default:t(()=>[m(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[x,["crm:contact:delete"]]])]),_:1})]),_:1},8,["data"])),[[J,l(C)]]),e(Y,{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(U),onPagination:w},null,8,["limit","page","total"])]),_:1}),e(Se,{ref_key:"formRef",ref:K,onSuccess:w},null,512)],64)}}})});export{Le as __tla,G as default};
|