1 |
- import{as as m,d as W,B as Y,r as d,g as A,o as c,k as y,w as s,i as o,a as l,l as q,D as K,c as U,F as h,C as F,R as N,G as Q,H as X,I as Z,E as $,q as ee,p as le,J as ae,s as te,M as oe,_ as se,__tla as re}from"./index-3ec1f57f.js";import{_ as ue,__tla as de}from"./Dialog-a920f067.js";import{_ as ce,__tla as ne}from"./Editor-81910a58.js";import{a as pe,D as _e,__tla as ie}from"./dict-97f5716e.js";import me,{__tla as fe}from"./BusinessList-524229f0.js";import we,{__tla as ye}from"./ContactList-a1e3b13b.js";import{a as ve,__tla as be}from"./index-b0d3c723.js";import{d as ge,__tla as Ue}from"./index-21f1f1d9.js";import{u as he,__tla as Fe}from"./useMessage-40198045.js";let v,I,z,Ie=Promise.all([(()=>{try{return re}catch{}})(),(()=>{try{return de}catch{}})(),(()=>{try{return ne}catch{}})(),(()=>{try{return ie}catch{}})(),(()=>{try{return fe}catch{}})(),(()=>{try{return ye}catch{}})(),(()=>{try{return be}catch{}})(),(()=>{try{return Ue}catch{}})(),(()=>{try{return Fe}catch{}})()]).then(async()=>{v={getFollowUpRecordPage:async r=>await m.get({url:"/crm/follow-up-record/page",params:r}),getFollowUpRecord:async r=>await m.get({url:"/crm/follow-up-record/get?id="+r}),createFollowUpRecord:async r=>await m.post({url:"/crm/follow-up-record/create",data:r}),updateFollowUpRecord:async r=>await m.put({url:"/crm/follow-up-record/update",data:r}),deleteFollowUpRecord:async r=>await m.delete({url:"/crm/follow-up-record/delete?id="+r}),exportFollowUpRecord:async r=>await m.download({url:"/crm/follow-up-record/export-excel",params:r})},I=se(W({name:"FollowUpRecordForm",__name:"FollowUpRecordForm",emits:["success"],setup(r,{expose:C,emit:M}){const{t:b}=Y(),V=he(),n=d(!1),x=d(""),p=d(!1),R=d(""),a=d({}),P=A({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"}]}),g=d(),k=d([]),T=d([]);C({open:async(u,t,_,i)=>{if(n.value=!0,x.value=b("action."+_),R.value=_,L(),a.value.bizType=u,a.value.bizId=t,k.value=await ve(),T.value=await ge(),i){p.value=!0;try{a.value=await v.getFollowUpRecord(i)}finally{p.value=!1}}}});const D=M,S=async()=>{await g.value.validate(),p.value=!0;try{const u=a.value;R.value==="create"?(await v.createFollowUpRecord(u),V.success(b("common.createSuccess"))):(await v.updateFollowUpRecord(u),V.success(b("common.updateSuccess"))),n.value=!1,D("success")}finally{p.value=!1}},L=()=>{var u;(u=g.value)==null||u.resetFields(),a.value={}};return(u,t)=>{const _=Q,i=X,f=Z,w=$,j=ee,B=ce,E=le,G=ae,O=te,H=ue,J=oe;return c(),y(H,{modelValue:l(n),"onUpdate:modelValue":t[8]||(t[8]=e=>N(n)?n.value=e:null),title:l(x),width:"50%"},{footer:s(()=>[o(O,{disabled:l(p),type:"primary",onClick:S},{default:s(()=>[q("\u786E \u5B9A")]),_:1},8,["disabled"]),o(O,{onClick:t[7]||(t[7]=e=>n.value=!1)},{default:s(()=>[q("\u53D6 \u6D88")]),_:1})]),default:s(()=>[K((c(),y(G,{ref_key:"formRef",ref:g,model:l(a),rules:l(P),"label-width":"120px"},{default:s(()=>[o(E,null,{default:s(()=>[o(w,{span:12},{default:s(()=>[o(f,{label:"\u8DDF\u8FDB\u7C7B\u578B",prop:"type"},{default:s(()=>[o(i,{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),U(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(j,{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(B,{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(i,{modelValue:l(a).contactIds,"onUpdate:modelValue":t[3]||(t[3]=e=>l(a).contactIds=e),multiple:"",placeholder:"\u8BF7\u9009\u62E9"},{default:s(()=>[(c(!0),U(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(i,{modelValue:l(a).businessIds,"onUpdate:modelValue":t[5]||(t[5]=e=>l(a).businessIds=e),multiple:"",placeholder:"\u8BF7\u9009\u62E9"},{default:s(()=>[(c(!0),U(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(me),{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-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};
|