import{_ as E,d as V,Z as d,ag as b,w as F,a0 as D,r,o as _,G as c,C as a,l as e,u as n,a as A,M as q,aR as U}from"./index.1d1a5ecb.js";import{I as h}from"./index.c87609a1.js";const I=V({__name:"approval-pending",props:{returnType:{type:String,required:!0}},emits:["approval"],setup(f,{emit:g}){const v=f,t=d({return_img:"",status:"",remark:""}),s=d({return_img:[{required:!1,trigger:"change",message:"\u8BF7\u4E0A\u4F20\u9000\u6B3E\u56DE\u6267"}],status:[{required:!0,trigger:"change",message:"\u9009\u62E9\u5BA1\u6838\u72B6\u6001"}],remark:[{required:!0,trigger:"change",message:"\u8BF7\u8F93\u5165\u5907\u6CE8"}]}),k=b(()=>v.returnType!=="2"),p=F(null),y=()=>{p.value.validate(m=>m&&g("approval",n(t)))};return D(()=>{s.remark[0].required=String(t.status)!=="1"}),(m,u)=>{const i=r("el-option"),C=r("el-select"),l=r("el-form-item"),w=r("el-input"),x=r("el-row"),B=r("el-button");return _(),c(n(U),{ref_key:"formRef",ref:p,"label-width":"100px",size:"small",model:t,rules:s},{default:a(()=>[e(l,{label:"\u5BA1\u6279\u72B6\u6001",prop:"status"},{default:a(()=>[e(C,{"w-400px":"",modelValue:t.status,"onUpdate:modelValue":u[0]||(u[0]=o=>t.status=o)},{default:a(()=>[e(i,{label:"\u901A\u8FC7",value:"1"}),e(i,{label:"\u4E0D\u901A\u8FC7",value:"2"})]),_:1},8,["modelValue"])]),_:1}),e(l,{label:"\u5907\u6CE8",prop:"remark","w-500px":""},{default:a(()=>[e(w,{type:"textarea",modelValue:t.remark,"onUpdate:modelValue":u[1]||(u[1]=o=>t.remark=o)},null,8,["modelValue"])]),_:1}),e(x,null,{default:a(()=>[n(k)?(_(),c(l,{key:0,label:"\u9000\u6B3E\u56DE\u6267",prop:"return_img"},{default:a(()=>[e(n(h),{multiple:"",onChange:u[2]||(u[2]=o=>t.return_img=o)})]),_:1})):A("v-if",!0)]),_:1}),e(l,{"w-full":"",flex:"","justify-end":""},{default:a(()=>[e(B,{type:"primary",onClick:y},{default:a(()=>[q("\u4FDD\u5B58")]),_:1})]),_:1})]),_:1},8,["model","rules"])}}});var P=E(I,[["__file","C:/Users/63107/Desktop/projects/accout-vue3-ui/src/views/InvoiceSales/refund/components/approval-pending.vue"]]);export{P as default};
