FollowUpRecordForm-10fb41b0.js 5.4 KB

1
  1. import{am as i,d as K,h as W,r as d,e as X,o as c,x as y,w as s,f as o,a,y as S,z as Y,c as g,F as h,v as F,l as J,A as N,B as Q,C as Z,E as $,D as ee,i as ae,H as le,G as te,K as oe,_ as se,__tla as re}from"./index-35524533.js";import{_ as ue,__tla as de}from"./Dialog-92dae773.js";import{_ as ce,__tla as ne}from"./Editor-a8cb3155.js";import{a as pe,D as _e,__tla as me}from"./dict-d4a9f1d4.js";import ie,{__tla as fe}from"./BusinessList-fbe64c8f.js";import we,{__tla as ye}from"./ContactList-b60649b6.js";import{a as ve,__tla as be}from"./index-d9a9a46a.js";import{d as Ue,__tla as ge}from"./index-19a3eb81.js";import{u as he,__tla as Fe}from"./useMessage-b70a06ec.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(K({name:"FollowUpRecordForm",__name:"FollowUpRecordForm",emits:["success"],setup(r,{expose:C,emit:O}){const{t:b}=W(),V=he(),n=d(!1),R=d(""),p=d(!1),x=d(""),l=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([]);C({open:async(u,t,_,m)=>{if(n.value=!0,R.value=b("action."+_),x.value=_,j(),l.value.bizType=u,l.value.bizId=t,k.value=await ve(),P.value=await Ue(),m){p.value=!0;try{l.value=await v.getFollowUpRecord(m)}finally{p.value=!1}}}});const q=O,L=async()=>{await U.value.validate(),p.value=!0;try{const u=l.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,q("success")}finally{p.value=!1}},j=()=>{var u;(u=U.value)==null||u.resetFields(),l.value={}};return(u,t)=>{const _=N,m=Q,f=Z,w=$,B=ee,E=ce,H=ae,M=le,T=te,A=ue,G=oe;return c(),y(A,{modelValue:a(n),"onUpdate:modelValue":t[8]||(t[8]=e=>J(n)?n.value=e:null),title:a(R),width:"50%"},{footer:s(()=>[o(T,{disabled:a(p),type:"primary",onClick:L},{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(M,{ref_key:"formRef",ref:U,model:a(l),rules:a(D),"label-width":"120px"},{default:s(()=>[o(H,null,{default:s(()=>[o(w,{span:12},{default:s(()=>[o(f,{label:"\u8DDF\u8FDB\u7C7B\u578B",prop:"type"},{default:s(()=>[o(m,{modelValue:a(l).type,"onUpdate:modelValue":t[0]||(t[0]=e=>a(l).type=e),placeholder:"\u8BF7\u9009\u62E9\u8DDF\u8FDB\u7C7B\u578B"},{default:s(()=>[(c(!0),g(h,null,F(a(pe)(a(_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(B,{modelValue:a(l).nextTime,"onUpdate:modelValue":t[1]||(t[1]=e=>a(l).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:a(l).content,"onUpdate:modelValue":t[2]||(t[2]=e=>a(l).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:a(l).contactIds,"onUpdate:modelValue":t[3]||(t[3]=e=>a(l).contactIds=e),multiple:"",placeholder:"\u8BF7\u9009\u62E9"},{default:s(()=>[(c(!0),g(h,null,F(a(k),e=>(c(),y(_,{key:e.id,label:e.name,value:e.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),o(a(we),{contactIds:a(l).contactIds,"onUpdate:contactIds":t[4]||(t[4]=e=>a(l).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:a(l).businessIds,"onUpdate:modelValue":t[5]||(t[5]=e=>a(l).businessIds=e),multiple:"",placeholder:"\u8BF7\u9009\u62E9"},{default:s(()=>[(c(!0),g(h,null,F(a(P),e=>(c(),y(_,{key:e.id,label:e.name,value:e.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),o(a(ie),{businessIds:a(l).businessIds,"onUpdate:businessIds":t[6]||(t[6]=e=>a(l).businessIds=e)},null,8,["businessIds"])]),_:1})]),_:1})]),_:1})]),_:1},8,["model","rules"])),[[G,a(p)]])]),_:1},8,["modelValue","title"])}}}),[["__file","/Users/RuHu.Xu/Desktop/mall-newfeifan-zx-business/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};