import{d as B,r as u,f as H,B as M,o,l as i,w as s,i as t,a,j as _,C as j,c as b,F as O,k as U,y as k,t as G,a2 as I,D as J,G as K,H as W,ag as X,ah as A,K as Q,J as Y,N as Z,_ as $,__tla as ee}from"./index-b2b3c6c4.js";import{_ as ae,__tla as le}from"./Dialog-70b24cbf.js";import{g as se,__tla as re}from"./index-292d166c.js";import{a as te,D as ue,__tla as oe}from"./dict-7f0cc6d2.js";import{P as ne,__tla as de}from"./index-0911c910.js";import{u as ie,__tla as _e}from"./useMessage-a5edbb0f.js";let L,me=Promise.all([(()=>{try{return ee}catch{}})(),(()=>{try{return le}catch{}})(),(()=>{try{return re}catch{}})(),(()=>{try{return oe}catch{}})(),(()=>{try{return de}catch{}})(),(()=>{try{return _e}catch{}})()]).then(async()=>{L=$(B({name:"CrmTransferForm",__name:"TransferForm",emits:["success"],setup(ve,{expose:C,emit:F}){const R=ie(),d=u(!1),c=u(""),m=u(!1),V=u([]),v=u(!1),r=u({id:void 0,newOwnerUserId:void 0,oldOwnerPermissionLevel:void 0}),x=H({newOwnerUserId:[{required:!0,message:"\u65B0\u8D1F\u8D23\u4EBA\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}],oldOwnerPermissionLevel:[{required:!0,message:"\u8001\u8D1F\u8D23\u4EBA\u52A0\u5165\u56E2\u961F\u540E\u7684\u6743\u9650\u7EA7\u522B\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}]}),f=u(),h=u(()=>{});C({open:async(n,l,w)=>{d.value=!0,c.value=n,h.value=w,D(),r.value.id=l}});const E=F,z=async()=>{if(f&&await f.value.validate()){m.value=!0;try{const n=r.value;await h.value(a(n)),R.success(c.value+"\u6210\u529F"),d.value=!1,E("success")}finally{m.value=!1}}},D=()=>{var n;(n=f.value)==null||n.resetFields(),r.value={id:void 0,newOwnerUserId:void 0,oldOwnerPermissionLevel:void 0}};return M(async()=>{V.value=await se()}),(n,l)=>{const w=J,N=K,p=W,y=X,g=A,S=Q,P=Y,T=ae,q=Z;return o(),i(T,{modelValue:a(d),"onUpdate:modelValue":l[5]||(l[5]=e=>k(d)?d.value=e:null),title:a(c),width:"30%"},{footer:s(()=>[t(P,{disabled:a(m),type:"primary",onClick:z},{default:s(()=>[_("\u786E \u5B9A")]),_:1},8,["disabled"]),t(P,{onClick:l[4]||(l[4]=e=>d.value=!1)},{default:s(()=>[_("\u53D6 \u6D88")]),_:1})]),default:s(()=>[j((o(),i(S,{ref_key:"formRef",ref:f,model:a(r),rules:a(x),"label-width":"150px"},{default:s(()=>[t(p,{label:"\u9009\u62E9\u65B0\u8D1F\u8D23\u4EBA",prop:"newOwnerUserId"},{default:s(()=>[t(N,{modelValue:a(r).newOwnerUserId,"onUpdate:modelValue":l[0]||(l[0]=e=>a(r).newOwnerUserId=e)},{default:s(()=>[(o(!0),b(O,null,U(a(V),e=>(o(),i(w,{key:e.id,label:e.nickname,value:e.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),t(p,{label:"\u8001\u8D1F\u8D23\u4EBA"},{default:s(()=>[t(g,{modelValue:a(v),"onUpdate:modelValue":l[1]||(l[1]=e=>k(v)?v.value=e:null),onChange:l[2]||(l[2]=e=>a(r).oldOwnerPermissionLevel=void 0)},{default:s(()=>[t(y,{label:!1,size:"large"},{default:s(()=>[_("\u79FB\u9664")]),_:1}),t(y,{label:!0,size:"large"},{default:s(()=>[_("\u52A0\u5165\u56E2\u961F")]),_:1})]),_:1},8,["modelValue"])]),_:1}),a(v)?(o(),i(p,{key:0,label:"\u8001\u8D1F\u8D23\u4EBA\u6743\u9650\u7EA7\u522B",prop:"oldOwnerPermissionLevel"},{default:s(()=>[t(g,{modelValue:a(r).oldOwnerPermissionLevel,"onUpdate:modelValue":l[3]||(l[3]=e=>a(r).oldOwnerPermissionLevel=e)},{default:s(()=>[(o(!0),b(O,null,U(a(te)(a(ue).CRM_PERMISSION_LEVEL),e=>(o(),b(O,{key:e.value},[e.value!=a(ne).OWNER?(o(),i(y,{key:0,label:e.value},{default:s(()=>[_(G(e.label),1)]),_:2},1032,["label"])):I("",!0)],64))),128))]),_:1},8,["modelValue"])]),_:1})):I("",!0)]),_:1},8,["model","rules"])),[[q,a(m)]])]),_:1},8,["modelValue","title"])}}}),[["__file","/Users/RuHu.Xu/Desktop/mall-newfeifan-zx-admin/src/views/crm/permission/components/TransferForm.vue"]])});export{me as __tla,L as default};
