/* empty css             *//* empty css                   *//* empty css                     *//* empty css                  *//* empty css                 *//* empty css               *//* empty css                  *//* empty css                     *//* empty css                  *//* empty css                  */import{m as e,a,b as l}from"./index-bb837113.js";/* empty css                   */import{d as s,m as t,X as o,x as r,Z as d,f as u,o as i,l as m,w as p,e as n,a as c,c as v,F as f,y as b,b as j,a7 as V,a5 as y,a6 as _,as as h,A as g,B as x,W as w,a0 as T,a2 as k,_ as q}from"./index-41bf27b7.js";import"./http-e55ef919.js";/* empty css                   */const F={class:"flex flex-row justify-between"},U={class:"w-full"},I={class:"flex justify-end"},W=q(s({__name:"depotsTransfer",props:{primary:Object},emits:["close"],setup(s,{emit:q}){const W=s,X=t(),z=t(!1),A=o({miniProgramIds:[{required:!0,message:"请选择小程序"}]}),B=t({}),C=t([]),O=t({});return r((()=>{e(W.primary.id).then((e=>{C.value=e.data.all;let a=setTimeout((()=>{var l;(null==(l=e.data.on)?void 0:l.length)>0&&(B.value.depotsValue=e.data.on.map((e=>e.id))[0],clearTimeout(a))}),10)})),a(W.primary.id).then((e=>{B.value=e.data}))})),(e,a)=>{const s=y,t=_,o=h,r=g,P=x,Q=w,R=T,S=k;return d((i(),m(R,{model:u(B),"label-width":"130px",ref_key:"ruleForm",ref:X,rules:u(A),class:"pr-4"},{default:p((()=>[n("div",F,[n("div",U,[c(t,{label:"小程序名称",prop:"email"},{default:p((()=>[c(s,{modelValue:u(B).name,"onUpdate:modelValue":a[0]||(a[0]=e=>u(B).name=e),disabled:"",placeholder:"请填写登录账号"},null,8,["modelValue"])])),_:1}),c(t,{label:"状态",prop:"status"},{default:p((()=>[c(o,{modelValue:u(B).status,"onUpdate:modelValue":a[1]||(a[1]=e=>u(B).status=e),disabled:"","active-value":1,"inactive-value":0},null,8,["modelValue"])])),_:1}),c(t,{label:"分配至投放公司",prop:"depotsValue",rules:[{required:!0,message:"请选择"}]},{default:p((()=>[c(P,{modelValue:u(B).depotsValue,"onUpdate:modelValue":a[2]||(a[2]=e=>u(B).depotsValue=e),filterable:"",clearable:"",placeholder:"请选择"},{default:p((()=>[(i(!0),v(f,null,b(u(C),(e=>(i(),m(r,{key:e.id,label:e.username,value:e.id},null,8,["label","value"])))),128))])),_:1},8,["modelValue"])])),_:1})])]),n("div",I,[c(Q,{type:"primary",size:"default",onClick:a[3]||(a[3]=e=>{return a=u(X),O.value={action:"on",uids:B.value.depotsValue},void(a&&a.validate((e=>{e?l(W.primary.id,O.value).then((e=>{V.success(e.message),q("close",!1)})):z.value=!1})).then((()=>{})));var a})},{default:p((()=>[j("确定")])),_:1})])])),_:1},8,["model","rules"])),[[S,u(z)]])}}}),[["__scopeId","data-v-86a9e81d"]]);export{W as default};
