modal.b8bc86.js 1.1 KB

1
  1. import{_ as v,d as _,w as i,bs as y,r as C,o as g,G as B,C as D,j as N,l as F,aq as b,aN as d}from"./index.js";import{F as h,c as w}from"./form.24520e.js";const x=_({__name:"modal",props:{visible:{type:Boolean,required:!0},companyNo:{type:String,required:!0}},emits:["refresh"],setup(t,{emit:c}){const l=t,n=i(!1),e=y(l,"visible"),u={expire_date:"",hand_uid:"",resign_date:"",resign_uid:""},a=i({...u});function p(){e.value=!1,a.value={...u}}async function m(){n.value=!0;const r=await w({...a.value,companyNo:l.companyNo});n.value=!1,r.code===0?d.success("\u6DFB\u52A0\u6210\u529F"):d.warning("\u6DFB\u52A0\u5931\u8D25"),e.value=!1,c("refresh")}return(r,o)=>{const f=C("ElDialog");return g(),B(f,{modelValue:F(e),"onUpdate:modelValue":o[1]||(o[1]=s=>b(e)?e.value=s:null),title:"\u6DFB\u52A0\u79BB\u804C\u4EA4\u63A5","close-on-click-modal":!1,onClose:p,center:""},{default:D(()=>[N(h,{data:a.value,"onUpdate:data":o[0]||(o[0]=s=>a.value=s),companyNo:t.companyNo,onSubmit:m,modal:!0},null,8,["data","companyNo"])]),_:1},8,["modelValue"])}}});var k=v(x,[["__file","C:/Users/63107/Desktop/projects/purchase-vue3/src/views/interest/handover/modal.vue"]]);export{k as default};