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,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 ae,K as le,J as te,N as oe,_ as se,__tla as re}from"./index-b2b3c6c4.js";import{_ as ue,__tla as de}from"./Dialog-70b24cbf.js";import{_ as ce,__tla as ne}from"./Editor-b514e2f8.js";import{a as pe,D as _e,__tla as me}from"./dict-7f0cc6d2.js";import ie,{__tla as fe}from"./BusinessList-48d41452.js";import we,{__tla as ye}from"./ContactList-888d5df1.js";import{a as ve,__tla as be}from"./index-9eb99b2b.js";import{d as Ue,__tla as ge}from"./index-db472324.js";import{u as he,__tla as Fe}from"./useMessage-a5edbb0f.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(""),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([]);O({open:async(u,t,_,m)=>{if(n.value=!0,R.value=b("action."+_),x.value=_,H(),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 j=C,q=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,j("success")}finally{p.value=!1}},H=()=>{var u;(u=U.value)==null||u.resetFields(),l.value={}};return(u,t)=>{const _=A,m=Q,f=Z,w=$,L=ee,E=ce,M=ae,G=le,T=te,J=ue,K=oe;return c(),y(J,{modelValue:a(n),"onUpdate:modelValue":t[8]||(t[8]=e=>B(n)?n.value=e:null),title:a(R),width:"50%"},{footer:s(()=>[o(T,{disabled:a(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:a(l),rules:a(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: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(L,{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"])),[[K,a(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};
|