import{w as k,Z as v,a0 as b,_ as x,d as E,r as u,o as w,G as A,C as o,b as R,l as a,u as t,bw as V,M as F}from"./index.1d1a5ecb.js";import{R as y}from"./global.9ad647c8.js";function D({callback:i,failStatus:c,requiredRemark:l}){const e=k(null),s=v({status:"",remark:""}),r=v({status:[{required:!0,trigger:"change",message:"\u8BF7\u9009\u62E9\u5BA1\u6838\u72B6\u6001"}],remark:[{required:!0,trigger:"change",message:"\u8BF7\u8F93\u5165\u5907\u6CE8"}]}),m=()=>{e.value.validate(f=>f&&i())};return l||b(()=>r.remark[0].required=s.status===c),{formRef:e,formRules:r,formData:s,handleChangeStatus:m}}const S={flex:"","flex-col":"",style:{width:"50%"}},N=E({__name:"approval-pending",emits:["changeStatus"],setup(i,{emit:c}){const l={fail:"3",success:"2"},{formData:e,formRules:s,formRef:r,handleChangeStatus:m}=D({callback:()=>c("changeStatus",e),failStatus:l.fail});return(f,n)=>{const _=u("el-option"),g=u("el-select"),d=u("el-form-item"),C=u("el-input"),B=u("el-button"),h=u("el-form");return w(),A(h,{inline:"",rules:t(s),model:t(e),ref_key:"formRef",ref:r,"label-width":"100px",flex:"","justify-between":""},{default:o(()=>[R("div",S,[a(d,{label:"\u5BA1\u6838\u72B6\u6001",prop:"status"},{default:o(()=>[a(g,{placeholder:"\u8BF7\u9009\u62E9\u5BA1\u6838\u72B6\u6001",modelValue:t(e).status,"onUpdate:modelValue":n[0]||(n[0]=p=>t(e).status=p)},{default:o(()=>[a(_,{value:l.success,label:"\u901A\u8FC7"},null,8,["value"]),a(_,{value:l.fail,label:"\u4E0D\u901A\u8FC7"},null,8,["value"])]),_:1},8,["modelValue"])]),_:1}),a(d,{label:"\u5907\u6CE8",prop:"remark"},{default:o(()=>[a(C,V({type:"textarea",maxlength:2e3,rows:5,placeholder:"\u8BF7\u8F93\u5165\u5907\u6CE8",modelValue:t(e).remark,"onUpdate:modelValue":n[1]||(n[1]=p=>t(e).remark=p)},t(y)),null,16,["modelValue"])]),_:1})]),a(B,{type:"primary",onClick:t(m)},{default:o(()=>[F("\u63D0\u4EA4\u5BA1\u6838\u7ED3\u679C")]),_:1},8,["onClick"])]),_:1},8,["rules","model"])}}});var P=x(N,[["__file","C:/Users/63107/Desktop/projects/accout-vue3-ui/src/views/InvoiceSales/capitalClaim/components/approval-process/approval-pending.vue"]]);export{P as default};
