FollowUpRecordForm-a3e4a358.js 5.4 KB

1
  1. import{ap as i,d as N,n as W,r as d,f as X,o as c,l as y,w as s,i as o,a as l,j as S,C as Y,c as g,F as h,k as F,y as B,D as A,G as Q,H as Z,E as $,I as ee,s as le,K as ae,J as te,N as oe,_ as se,__tla as re}from"./index-af173888.js";import{_ as ue,__tla as de}from"./Dialog-987c90a1.js";import{_ as ce,__tla as ne}from"./Editor-c9f3a63b.js";import{a as pe,D as _e,__tla as me}from"./dict-093d1dfa.js";import ie,{__tla as fe}from"./BusinessList-f16df561.js";import we,{__tla as ye}from"./ContactList-5f9ce93a.js";import{a as ve,__tla as be}from"./index-287c6169.js";import{d as Ue,__tla as ge}from"./index-03c36734.js";import{u as he,__tla as Fe}from"./useMessage-170c1b43.js";let v,I,z,Ie=Promise.all([(()=>{try{return re}catch{}})(),(()=>{try{return de}catch{}})(),(()=>{try{return ne}catch{}})(),(()=>{try{return me}catch{}})(),(()=>{try{return fe}catch{}})(),(()=>{try{return ye}catch{}})(),(()=>{try{return be}catch{}})(),(()=>{try{return ge}catch{}})(),(()=>{try{return Fe}catch{}})()]).then(async()=>{v={getFollowUpRecordPage:async r=>await i.get({url:"/crm/follow-up-record/page",params:r}),getFollowUpRecord:async r=>await i.get({url:"/crm/follow-up-record/get?id="+r}),createFollowUpRecord:async r=>await i.post({url:"/crm/follow-up-record/create",data:r}),updateFollowUpRecord:async r=>await i.put({url:"/crm/follow-up-record/update",data:r}),deleteFollowUpRecord:async r=>await i.delete({url:"/crm/follow-up-record/delete?id="+r}),exportFollowUpRecord:async r=>await i.download({url:"/crm/follow-up-record/export-excel",params:r})},I=se(N({name:"FollowUpRecordForm",__name:"FollowUpRecordForm",emits:["success"],setup(r,{expose:O,emit:C}){const{t:b}=W(),V=he(),n=d(!1),R=d(""),p=d(!1),x=d(""),a=d({}),D=X({type:[{required:!0,message:"\u8DDF\u8FDB\u7C7B\u578B\u4E0D\u80FD\u4E3A\u7A7A",trigger:"change"}],content:[{required:!0,message:"\u8DDF\u8FDB\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}],nextTime:[{required:!0,message:"\u4E0B\u6B21\u8054\u7CFB\u65F6\u95F4\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}]}),U=d(),k=d([]),P=d([]);O({open:async(u,t,_,m)=>{if(n.value=!0,R.value=b("action."+_),x.value=_,H(),a.value.bizType=u,a.value.bizId=t,k.value=await ve(),P.value=await Ue(),m){p.value=!0;try{a.value=await v.getFollowUpRecord(m)}finally{p.value=!1}}}});const j=C,q=async()=>{await U.value.validate(),p.value=!0;try{const u=a.value;x.value==="create"?(await v.createFollowUpRecord(u),V.success(b("common.createSuccess"))):(await v.updateFollowUpRecord(u),V.success(b("common.updateSuccess"))),n.value=!1,j("success")}finally{p.value=!1}},H=()=>{var u;(u=U.value)==null||u.resetFields(),a.value={}};return(u,t)=>{const _=A,m=Q,f=Z,w=$,L=ee,E=ce,M=le,G=ae,T=te,J=ue,K=oe;return c(),y(J,{modelValue:l(n),"onUpdate:modelValue":t[8]||(t[8]=e=>B(n)?n.value=e:null),title:l(R),width:"50%"},{footer:s(()=>[o(T,{disabled:l(p),type:"primary",onClick:q},{default:s(()=>[S("\u786E \u5B9A")]),_:1},8,["disabled"]),o(T,{onClick:t[7]||(t[7]=e=>n.value=!1)},{default:s(()=>[S("\u53D6 \u6D88")]),_:1})]),default:s(()=>[Y((c(),y(G,{ref_key:"formRef",ref:U,model:l(a),rules:l(D),"label-width":"120px"},{default:s(()=>[o(M,null,{default:s(()=>[o(w,{span:12},{default:s(()=>[o(f,{label:"\u8DDF\u8FDB\u7C7B\u578B",prop:"type"},{default:s(()=>[o(m,{modelValue:l(a).type,"onUpdate:modelValue":t[0]||(t[0]=e=>l(a).type=e),placeholder:"\u8BF7\u9009\u62E9\u8DDF\u8FDB\u7C7B\u578B"},{default:s(()=>[(c(!0),g(h,null,F(l(pe)(l(_e).CRM_FOLLOW_UP_TYPE),e=>(c(),y(_,{key:e.value,label:e.label,value:e.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),o(w,{span:12},{default:s(()=>[o(f,{label:"\u4E0B\u6B21\u8054\u7CFB\u65F6\u95F4",prop:"nextTime"},{default:s(()=>[o(L,{modelValue:l(a).nextTime,"onUpdate:modelValue":t[1]||(t[1]=e=>l(a).nextTime=e),placeholder:"\u9009\u62E9\u4E0B\u6B21\u8054\u7CFB\u65F6\u95F4",type:"date","value-format":"x"},null,8,["modelValue"])]),_:1})]),_:1}),o(w,{span:24},{default:s(()=>[o(f,{label:"\u8DDF\u8FDB\u5185\u5BB9",prop:"content"},{default:s(()=>[o(E,{modelValue:l(a).content,"onUpdate:modelValue":t[2]||(t[2]=e=>l(a).content=e),height:"300px"},null,8,["modelValue"])]),_:1})]),_:1}),o(w,{span:24},{default:s(()=>[o(f,{label:"\u5173\u8054\u8054\u7CFB\u4EBA",prop:"contactIds"},{default:s(()=>[o(m,{modelValue:l(a).contactIds,"onUpdate:modelValue":t[3]||(t[3]=e=>l(a).contactIds=e),multiple:"",placeholder:"\u8BF7\u9009\u62E9"},{default:s(()=>[(c(!0),g(h,null,F(l(k),e=>(c(),y(_,{key:e.id,label:e.name,value:e.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),o(l(we),{contactIds:l(a).contactIds,"onUpdate:contactIds":t[4]||(t[4]=e=>l(a).contactIds=e)},null,8,["contactIds"])]),_:1})]),_:1}),o(w,{span:24},{default:s(()=>[o(f,{label:"\u5173\u8054\u5546\u673A",prop:"businessIds"},{default:s(()=>[o(m,{modelValue:l(a).businessIds,"onUpdate:modelValue":t[5]||(t[5]=e=>l(a).businessIds=e),multiple:"",placeholder:"\u8BF7\u9009\u62E9"},{default:s(()=>[(c(!0),g(h,null,F(l(P),e=>(c(),y(_,{key:e.id,label:e.name,value:e.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),o(l(ie),{businessIds:l(a).businessIds,"onUpdate:businessIds":t[6]||(t[6]=e=>l(a).businessIds=e)},null,8,["businessIds"])]),_:1})]),_:1})]),_:1})]),_:1},8,["model","rules"])),[[K,l(p)]])]),_:1},8,["modelValue","title"])}}}),[["__file","/Users/RuHu.Xu/Desktop/mall-newfeifan-zx-admin/src/views/crm/followup/FollowUpRecordForm.vue"]]),z=Object.freeze(Object.defineProperty({__proto__:null,default:I},Symbol.toStringTag,{value:"Module"}))});export{v as F,Ie as __tla,I as a,z as b};