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