import{s as M}from"./salary-CA4jeSd5.js";import{g as C}from"./salary-C6c2q2dc.js";import{_ as L,r as u,N,x as O,e as n,o as d,c as f,f as s,h as l,k as S,m as v,F as T,I as A,J as E,O as F}from"./index-C1_1_QXk.js";const U={class:"form-modal"},J={class:"dialog-footer"},P={__name:"pay",props:["row","addVisible"],emits:["changeVisible"],setup(b,{emit:g}){const e=u({}),i=u(!1),r=b,p=g,m=u([]);N(()=>{}),M().then(t=>{m.value=[{value:"",label:"请选择"},...t.data.map(o=>({value:o.account,label:o.alias,id:o.account}))]});const c=O({get:()=>r.addVisible,set:t=>p("changeVisible",t)});function h(){i.value=!1,e.value={...e.value,...r.row}}function V(){e.value={}}function x(){c.value=!1}function y(){F.confirm("您确定要发薪吗",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(async()=>{console.log(e.value.subMchId),C({id:e.value.id,subMchId:e.value.subMchId}).then(t=>{p("getList"),c.value=!1,proxy.$modal.msgSuccess("成功")})}).catch(()=>{})}return(t,o)=>{const k=n("el-option"),w=n("el-select"),B=n("el-form-item"),_=n("el-button"),I=n("el-dialog");return d(),f("div",U,[s(I,{title:"确认发薪",modelValue:c.value,"onUpdate:modelValue":o[1]||(o[1]=a=>c.value=a),width:"550px",onOpen:h,onClose:V},{footer:l(()=>[S("span",J,[s(_,{onClick:x},{default:l(()=>[v("取 消")]),_:1}),s(_,{type:"primary",loading:i.value,onClick:y},{default:l(()=>[v("确认发薪")]),_:1},8,["loading"])])]),default:l(()=>[s(B,{label:"发薪账户",prop:"account"},{default:l(()=>[s(w,{modelValue:e.value.subMchId,"onUpdate:modelValue":o[0]||(o[0]=a=>e.value.subMchId=a),placeholder:"请选择",style:{width:"240px"}},{default:l(()=>[(d(!0),f(T,null,A(m.value,a=>(d(),E(k,{key:a.value,label:a.label,value:a.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1},8,["modelValue"])])}}},z=L(P,[["__scopeId","data-v-ae1772ef"]]);export{z as default};
