ContactForm-469c3a5d.js 8.7 KB

1
  1. import{d as P,r as m,e as Y,o as s,x as _,w as l,f as e,y as U,a as t,z as J,c as v,v as V,F as h,t as W,l as Z,h as $,R as ee,C as ae,E as le,A as te,B as de,i as ue,D as oe,ad as re,ae as se,H as me,G as ne,K as ie,_ as pe,__tla as _e}from"./index-8dc1e40a.js";import{_ as ce,__tla as fe}from"./Dialog-41802231.js";import{E as ve,__tla as Ve}from"./el-tree-select-d82790d8.js";import{a as he,b as be,e as ye,u as we,__tla as xe}from"./index-dfae8a2c.js";import{a as Ue,D as E,g as Ie,__tla as ke}from"./dict-f13a3c8f.js";import{g as ge,__tla as qe}from"./index-6f284c9a.js";import{b as Ne,__tla as Ae}from"./index-f3fa0e10.js";import{g as Te,__tla as Se}from"./index-fb53bc47.js";import{d as Ee}from"./tree-0af4953a.js";import{u as Re,__tla as Ce}from"./useMessage-7a27dd80.js";let R,Fe=Promise.all([(()=>{try{return _e}catch{}})(),(()=>{try{return fe}catch{}})(),(()=>{try{return Ve}catch{}})(),(()=>{try{return xe}catch{}})(),(()=>{try{return ke}catch{}})(),(()=>{try{return qe}catch{}})(),(()=>{try{return Ae}catch{}})(),(()=>{try{return Se}catch{}})(),(()=>{try{return Ce}catch{}})()]).then(async()=>{R=pe(P({__name:"ContactForm",emits:["success"],setup(Qe,{expose:C,emit:F}){const{t:x}=$(),I=Re(),c=m(!1),k=m(""),f=m(!1),g=m(""),q=m([]),u=m({contactNextTime:void 0,mobile:void 0,telephone:void 0,email:void 0,customerId:void 0,customerName:void 0,detailAddress:void 0,remark:void 0,ownerUserId:void 0,lastTime:void 0,id:void 0,parentId:void 0,name:void 0,post:void 0,qq:void 0,wechat:void 0,sex:void 0,master:!1,areaId:void 0}),Q=Y({name:[{required:!0,message:"\u59D3\u540D\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}],customerId:[{required:!0,message:"\u5BA2\u6237\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}],ownerUserId:[{required:!0,message:"\u8D1F\u8D23\u4EBA\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}]}),b=m(),z=m([]),N=m([]),A=m([]),T=m([]);C({open:async(n,d)=>{if(c.value=!0,k.value=x("action."+n),g.value=n,H(),T.value=await he(),N.value=await ge(),A.value=await Ne(),q.value=await Te(),d){f.value=!0;try{u.value=await be(d)}finally{f.value=!1}}}});const D=F,G=async()=>{if(b&&await b.value.validate()){f.value=!0;try{const n=u.value;g.value==="create"?(await ye(n),I.success(x("common.createSuccess"))):(await we(n),I.success(x("common.updateSuccess"))),c.value=!1,D("success")}finally{f.value=!1}}},H=()=>{var n;u.value={contactNextTime:void 0,mobile:void 0,telephone:void 0,email:void 0,customerId:void 0,detailAddress:void 0,remark:void 0,ownerUserId:void 0,lastTime:void 0,id:void 0,parentId:void 0,name:void 0,post:void 0,qq:void 0,wechat:void 0,sex:void 0,master:!1},(n=b.value)==null||n.resetFields(),z.value=[]};return(n,d)=>{const i=ee,o=ae,r=le,y=te,w=de,p=ue,O=oe,X=ve,B=re,M=se,j=me,S=ne,K=ce,L=ie;return s(),_(K,{modelValue:t(c),"onUpdate:modelValue":d[17]||(d[17]=a=>Z(c)?c.value=a:null),title:t(k),width:820},{footer:l(()=>[e(S,{disabled:t(f),type:"primary",onClick:G},{default:l(()=>[U("\u786E \u5B9A")]),_:1},8,["disabled"]),e(S,{onClick:d[16]||(d[16]=a=>c.value=!1)},{default:l(()=>[U("\u53D6 \u6D88")]),_:1})]),default:l(()=>[J((s(),_(j,{ref_key:"formRef",ref:b,model:t(u),rules:t(Q),"label-width":"110px"},{default:l(()=>[e(p,{gutter:20},{default:l(()=>[e(r,{span:12},{default:l(()=>[e(o,{label:"\u59D3\u540D",prop:"name"},{default:l(()=>[e(i,{modelValue:t(u).name,"onUpdate:modelValue":d[0]||(d[0]=a=>t(u).name=a),"input-style":"width:190px;",placeholder:"\u8BF7\u8F93\u5165\u59D3\u540D"},null,8,["modelValue"])]),_:1})]),_:1}),e(r,{span:12},{default:l(()=>[e(o,{label:"\u8D1F\u8D23\u4EBA",prop:"ownerUserId"},{default:l(()=>[e(w,{modelValue:t(u).ownerUserId,"onUpdate:modelValue":d[1]||(d[1]=a=>t(u).ownerUserId=a),"lable-key":"nickname",placeholder:"\u8BF7\u9009\u62E9\u8D1F\u8D23\u4EBA","value-key":"id"},{default:l(()=>[(s(!0),v(h,null,V(t(N),a=>(s(),_(y,{key:a.id,label:a.nickname,value:a.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1}),e(p,null,{default:l(()=>[e(r,{span:12},{default:l(()=>[e(o,{label:"\u5BA2\u6237\u540D\u79F0",prop:"customerName"},{default:l(()=>[e(w,{modelValue:t(u).customerId,"onUpdate:modelValue":d[2]||(d[2]=a=>t(u).customerId=a),"lable-key":"name",placeholder:"\u8BF7\u9009\u62E9\u5BA2\u6237","value-key":"id"},{default:l(()=>[(s(!0),v(h,null,V(t(A),a=>(s(),_(y,{key:a.id,label:a.name,value:a.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),e(r,{span:12},{default:l(()=>[e(o,{label:"\u6027\u522B",prop:"sex"},{default:l(()=>[e(w,{modelValue:t(u).sex,"onUpdate:modelValue":d[3]||(d[3]=a=>t(u).sex=a),placeholder:"\u8BF7\u9009\u62E9"},{default:l(()=>[(s(!0),v(h,null,V(t(Ue)(t(E).SYSTEM_USER_SEX),a=>(s(),_(y,{key:a.value,label:a.label,value:a.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1}),e(p,null,{default:l(()=>[e(r,{span:12},{default:l(()=>[e(o,{label:"\u624B\u673A\u53F7",prop:"mobile"},{default:l(()=>[e(i,{modelValue:t(u).mobile,"onUpdate:modelValue":d[4]||(d[4]=a=>t(u).mobile=a),"input-style":"width:190px;",placeholder:"\u8BF7\u8F93\u5165\u624B\u673A\u53F7"},null,8,["modelValue"])]),_:1})]),_:1}),e(r,{span:12},{default:l(()=>[e(o,{label:"\u7535\u8BDD",prop:"telephone"},{default:l(()=>[e(i,{modelValue:t(u).telephone,"onUpdate:modelValue":d[5]||(d[5]=a=>t(u).telephone=a),placeholder:"\u8BF7\u8F93\u5165\u7535\u8BDD",style:{width:"215px"}},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),e(p,null,{default:l(()=>[e(r,{span:12},{default:l(()=>[e(o,{label:"\u90AE\u7BB1",prop:"email"},{default:l(()=>[e(i,{modelValue:t(u).email,"onUpdate:modelValue":d[6]||(d[6]=a=>t(u).email=a),"input-style":"width:190px;",placeholder:"\u8BF7\u8F93\u5165\u90AE\u7BB1"},null,8,["modelValue"])]),_:1})]),_:1}),e(r,{span:12},{default:l(()=>[e(o,{label:"QQ",prop:"qq"},{default:l(()=>[e(i,{modelValue:t(u).qq,"onUpdate:modelValue":d[7]||(d[7]=a=>t(u).qq=a),placeholder:"\u8BF7\u8F93\u5165QQ",style:{width:"215px"}},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),e(p,null,{default:l(()=>[e(r,{span:12},{default:l(()=>[e(o,{label:"\u5FAE\u4FE1",prop:"wechat"},{default:l(()=>[e(i,{modelValue:t(u).wechat,"onUpdate:modelValue":d[8]||(d[8]=a=>t(u).wechat=a),"input-style":"width:190px;",placeholder:"\u8BF7\u8F93\u5165\u5FAE\u4FE1"},null,8,["modelValue"])]),_:1})]),_:1}),e(r,{span:12},{default:l(()=>[e(o,{label:"\u4E0B\u6B21\u8054\u7CFB\u65F6\u95F4",prop:"contactNextTime"},{default:l(()=>[e(O,{modelValue:t(u).contactNextTime,"onUpdate:modelValue":d[9]||(d[9]=a=>t(u).contactNextTime=a),placeholder:"\u9009\u62E9\u4E0B\u6B21\u8054\u7CFB\u65F6\u95F4",type:"datetime","value-format":"x"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),e(p,null,{default:l(()=>[e(r,{span:12},{default:l(()=>[e(o,{label:"\u6240\u5728\u5730",prop:"areaId"},{default:l(()=>[e(X,{modelValue:t(u).areaId,"onUpdate:modelValue":d[10]||(d[10]=a=>t(u).areaId=a),data:t(q),props:t(Ee),"render-after-expand":!0},null,8,["modelValue","data","props"])]),_:1})]),_:1}),e(r,{span:12},{default:l(()=>[e(o,{label:"\u5730\u5740",prop:"detailAddress"},{default:l(()=>[e(i,{modelValue:t(u).detailAddress,"onUpdate:modelValue":d[11]||(d[11]=a=>t(u).detailAddress=a),"input-style":"width:190px;",placeholder:"\u8BF7\u8F93\u5165\u5730\u5740"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),e(p,null,{default:l(()=>[e(r,{span:12},{default:l(()=>[e(o,{label:"\u76F4\u5C5E\u4E0A\u7EA7",prop:"parentId"},{default:l(()=>[e(w,{modelValue:t(u).parentId,"onUpdate:modelValue":d[12]||(d[12]=a=>t(u).parentId=a),placeholder:"\u8BF7\u9009\u62E9"},{default:l(()=>[(s(!0),v(h,null,V(t(T),a=>(s(),_(y,{key:a.id,disabled:a.id==t(u).id,label:a.name,value:a.id},null,8,["disabled","label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),e(r,{span:12},{default:l(()=>[e(o,{label:"\u804C\u4F4D",prop:"post"},{default:l(()=>[e(i,{modelValue:t(u).post,"onUpdate:modelValue":d[13]||(d[13]=a=>t(u).post=a),"input-style":"width:190px;",placeholder:"\u8BF7\u8F93\u5165\u804C\u4F4D"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),e(p,null,{default:l(()=>[e(r,{span:12},{default:l(()=>[e(o,{label:"\u5173\u952E\u51B3\u7B56\u4EBA",prop:"master",style:{width:"400px"}},{default:l(()=>[e(M,{modelValue:t(u).master,"onUpdate:modelValue":d[14]||(d[14]=a=>t(u).master=a)},{default:l(()=>[(s(!0),v(h,null,V(t(Ie)(t(E).INFRA_BOOLEAN_STRING),a=>(s(),_(B,{key:a.value,label:a.value},{default:l(()=>[U(W(a.label),1)]),_:2},1032,["label"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1}),e(p,null,{default:l(()=>[e(r,{span:24},{default:l(()=>[e(o,{label:"\u5907\u6CE8",prop:"remark"},{default:l(()=>[e(i,{modelValue:t(u).remark,"onUpdate:modelValue":d[15]||(d[15]=a=>t(u).remark=a),placeholder:"\u8BF7\u8F93\u5165\u5907\u6CE8"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1})]),_:1},8,["model","rules"])),[[L,t(f)]])]),_:1},8,["modelValue","title"])}}}),[["__file","/Users/RuHu.Xu/Desktop/mall-newfeifan-zx-admin/src/views/crm/contact/ContactForm.vue"]])});export{Fe as __tla,R as default};