FollowUpRecordForm-cba55a4d.js 5.4 KB

1
  1. import{aA as i,d as K,P as Y,r as d,x as Z,o as c,C as y,A as r,f as o,a as l,D as O,k as B,c as g,F as h,R as F,a2 as G,S as N,U as Q,V as X,H as $,I as ee,K as le,W as ae,J as te,Z as oe,_ as re,__tla as se}from"./index-54aa57d8.js";import{_ as ue,__tla as de}from"./Dialog-7bb778a5.js";import{_ as ce,__tla as ne}from"./Editor-2839cd89.js";import{a as pe,D as _e,__tla as me}from"./dict-573b3b04.js";import ie,{__tla as fe}from"./BusinessList-9269c80a.js";import we,{__tla as ye}from"./ContactList-28b1104a.js";import{a as ve,__tla as be}from"./index-81c82128.js";import{d as Ue,__tla as ge}from"./index-6c7639d0.js";import{u as he,__tla as Fe}from"./useMessage-f56cafbb.js";let v,V,P,Ve=Promise.all([(()=>{try{return se}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 s=>await i.get({url:"/crm/follow-up-record/page",params:s}),getFollowUpRecord:async s=>await i.get({url:"/crm/follow-up-record/get?id="+s}),createFollowUpRecord:async s=>await i.post({url:"/crm/follow-up-record/create",data:s}),updateFollowUpRecord:async s=>await i.put({url:"/crm/follow-up-record/update",data:s}),deleteFollowUpRecord:async s=>await i.delete({url:"/crm/follow-up-record/delete?id="+s}),exportFollowUpRecord:async s=>await i.download({url:"/crm/follow-up-record/export-excel",params:s})},V=re(K({name:"FollowUpRecordForm",__name:"FollowUpRecordForm",emits:["success"],setup(s,{expose:S,emit:C}){const{t:b}=Y(),I=he(),n=d(!1),x=d(""),p=d(!1),R=d(""),a=d({}),D=Z({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([]),T=d([]);S({open:async(u,t,_,m)=>{if(n.value=!0,x.value=b("action."+_),R.value=_,j(),a.value.bizType=u,a.value.bizId=t,k.value=await ve(),T.value=await Ue(),m){p.value=!0;try{a.value=await v.getFollowUpRecord(m)}finally{p.value=!1}}}});const L=C,q=async()=>{await U.value.validate(),p.value=!0;try{const u=a.value;R.value==="create"?(await v.createFollowUpRecord(u),I.success(b("common.createSuccess"))):(await v.updateFollowUpRecord(u),I.success(b("common.updateSuccess"))),n.value=!1,L("success")}finally{p.value=!1}},j=()=>{var u;(u=U.value)==null||u.resetFields(),a.value={}};return(u,t)=>{const _=N,m=Q,f=X,w=$,A=ee,E=ce,M=le,W=ae,z=te,H=ue,J=oe;return c(),y(H,{modelValue:l(n),"onUpdate:modelValue":t[8]||(t[8]=e=>G(n)?n.value=e:null),title:l(x),width:"50%"},{footer:r(()=>[o(z,{disabled:l(p),type:"primary",onClick:q},{default:r(()=>[O("\u786E \u5B9A")]),_:1},8,["disabled"]),o(z,{onClick:t[7]||(t[7]=e=>n.value=!1)},{default:r(()=>[O("\u53D6 \u6D88")]),_:1})]),default:r(()=>[B((c(),y(W,{ref_key:"formRef",ref:U,model:l(a),rules:l(D),"label-width":"120px"},{default:r(()=>[o(M,null,{default:r(()=>[o(w,{span:12},{default:r(()=>[o(f,{label:"\u8DDF\u8FDB\u7C7B\u578B",prop:"type"},{default:r(()=>[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:r(()=>[(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:r(()=>[o(f,{label:"\u4E0B\u6B21\u8054\u7CFB\u65F6\u95F4",prop:"nextTime"},{default:r(()=>[o(A,{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:r(()=>[o(f,{label:"\u8DDF\u8FDB\u5185\u5BB9",prop:"content"},{default:r(()=>[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:r(()=>[o(f,{label:"\u5173\u8054\u8054\u7CFB\u4EBA",prop:"contactIds"},{default:r(()=>[o(m,{modelValue:l(a).contactIds,"onUpdate:modelValue":t[3]||(t[3]=e=>l(a).contactIds=e),multiple:"",placeholder:"\u8BF7\u9009\u62E9"},{default:r(()=>[(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:r(()=>[o(f,{label:"\u5173\u8054\u5546\u673A",prop:"businessIds"},{default:r(()=>[o(m,{modelValue:l(a).businessIds,"onUpdate:modelValue":t[5]||(t[5]=e=>l(a).businessIds=e),multiple:"",placeholder:"\u8BF7\u9009\u62E9"},{default:r(()=>[(c(!0),g(h,null,F(l(T),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"])),[[J,l(p)]])]),_:1},8,["modelValue","title"])}}}),[["__file","D:/zx/mall-newfeifan-zx-admin/src/views/crm/followup/FollowUpRecordForm.vue"]]),P=Object.freeze(Object.defineProperty({__proto__:null,default:V},Symbol.toStringTag,{value:"Module"}))});export{v as F,Ve as __tla,V as a,P as b};