/* 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-39cf29f1.js";/* empty css                 *//* empty css                   */import{d as s,m as t,U as o,x as r,W as d,f as i,o as u,l as m,w as p,e as n,a as c,c as f,F as v,y as j,b,a4 as V,a2 as y,a3 as _,ar as g,A as h,B as x,S as w,Y as U,$ as k,_ as T}from"./index-2b50ecca.js";import"./http-aa208300.js";/* empty css                   */const q={class:"flex flex-row justify-between"},F={class:"w-full"},I={class:"flex justify-end"},O=T(s({__name:"depotsTransfer",props:{primary:Object},emits:["close"],setup(s,{emit:T}){const O=s,Y=t(),z=t(!1),A=o({miniProgramIds:[{required:!0,message:"请选择小程序"}]}),B=t({}),C=t([]),P=t({});return r((()=>{e(O.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(O.primary.id).then((e=>{B.value=e.data}))})),(e,a)=>{const s=y,t=_,o=g,r=h,S=x,W=w,X=U,Z=k;return d((u(),m(X,{model:i(B),"label-width":"130px",ref_key:"ruleForm",ref:Y,rules:i(A),class:"pr-4"},{default:p((()=>[n("div",q,[n("div",F,[c(t,{label:"小程序名称",prop:"email"},{default:p((()=>[c(s,{modelValue:i(B).name,"onUpdate:modelValue":a[0]||(a[0]=e=>i(B).name=e),disabled:"",placeholder:"请填写登录账号"},null,8,["modelValue"])])),_:1}),c(t,{label:"状态",prop:"status"},{default:p((()=>[c(o,{modelValue:i(B).status,"onUpdate:modelValue":a[1]||(a[1]=e=>i(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(S,{modelValue:i(B).depotsValue,"onUpdate:modelValue":a[2]||(a[2]=e=>i(B).depotsValue=e),filterable:"",clearable:"",placeholder:"请选择"},{default:p((()=>[(u(!0),f(v,null,j(i(C),(e=>(u(),m(r,{key:e.id,label:e.username,value:e.id},null,8,["label","value"])))),128))])),_:1},8,["modelValue"])])),_:1})])]),n("div",I,[c(W,{type:"primary",size:"default",onClick:a[3]||(a[3]=e=>{return a=i(Y),P.value={action:"on",uids:B.value.depotsValue},void(a&&a.validate((e=>{e?l(O.primary.id,P.value).then((e=>{V.success(e.message),T("close",!1)})):z.value=!1})).then((()=>{})));var a})},{default:p((()=>[b("确定")])),_:1})])])),_:1},8,["model","rules"])),[[Z,i(z)]])}}}),[["__scopeId","data-v-79a6071b"]]);export{O as default};
