import{_ as b,d as h,E as v,a7 as q,af as x,a9 as A,x as a,o as c,N as E,K as t,y as e,c as D,M as T,u as I,L as R,b as N,W as U,aS as j}from"./index.1417328f.js";import{o as n}from"./status.4c13d767.js";const L={class:"w-full flex justify-end"},M=U("\u4FDD\u5B58"),O=h({__name:"financial-review",props:{isElectronic:{type:Boolean,required:!0},isSupport:{type:Boolean,required:!0},isSpecialTicket:{type:Boolean,required:!0},isPlain:{type:Boolean,required:!0},invType:{type:String,required:!0}},emits:["changeStatus"],setup(y,{emit:B}){const s=y,u=v({open_type:"",status:"2",remark:""}),d=v(null),p=q({status:[{required:!0,message:"\u8BF7\u9009\u62E9\u5BA1\u6838\u72B6\u6001",trigger:"change"}],open_type:[{required:!0,message:"\u8BF7\u9009\u62E9\u5F00\u7968\u7C7B\u578B",trigger:"change"}],remark:[{required:!1,message:"\u8BF7\u8F93\u5165\u5BA1\u6838\u5907\u6CE8",trigger:"blur"}]}),F=x(()=>s.isSupport?s.isSpecialTicket?[n[1],n[2]]:n:[n[2]]);function g(){if(s.invType==="special_electronic"&&u.value.open_type!=="3"){j.error("\u91D1\u7A0E\u6682\u4E0D\u652F\u6301\u5F00\u5177\u7535\u5B50\u4E13\u7968");return}d.value.validate(m=>{m&&B("changeStatus",u.value)})}return A(()=>{p.remark[0].required=u.value.status==="8",p.open_type[0].required=u.value.status==="2"}),(m,o)=>{const i=a("ElOption"),_=a("ElSelect"),r=a("ElFormItem"),f=a("ElCol"),k=a("ElRow"),w=a("ElInput"),C=a("ElButton"),S=a("ElForm");return c(),E(S,{"label-width":"80px",ref_key:"formRef",ref:d,model:u.value,rules:p},{default:t(()=>[e(k,null,{default:t(()=>[e(f,{span:12},{default:t(()=>[e(r,{label:"\u5BA1\u6838\u72B6\u6001",prop:"status"},{default:t(()=>[e(_,{style:{width:"100%"},modelValue:u.value.status,"onUpdate:modelValue":o[0]||(o[0]=l=>u.value.status=l),placeholder:"\u5BA1\u6838\u72B6\u6001"},{default:t(()=>[e(i,{label:"\u901A\u8FC7",value:"2"}),e(i,{label:"\u9A73\u56DE",value:"8"})]),_:1},8,["modelValue"])]),_:1})]),_:1}),e(f,{span:10},{default:t(()=>[e(r,{label:"\u5F00\u7968\u65B9\u5F0F",prop:"open_type"},{default:t(()=>[e(_,{style:{width:"100%"},placeholder:"\u5F00\u7968\u65B9\u5F0F",modelValue:u.value.open_type,"onUpdate:modelValue":o[1]||(o[1]=l=>u.value.open_type=l)},{default:t(()=>[(c(!0),D(R,null,T(I(F),(l,V)=>(c(),E(i,{key:"type"+l.value+V,label:l.label,value:l.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1}),e(r,{label:"\u5907\u6CE8",prop:"remark"},{default:t(()=>[e(w,{placeholder:"\u5907\u6CE8",type:"textarea",modelValue:u.value.remark,"onUpdate:modelValue":o[2]||(o[2]=l=>u.value.remark=l)},null,8,["modelValue"])]),_:1}),e(r,null,{default:t(()=>[N("div",L,[e(C,{type:"primary",onClick:g},{default:t(()=>[M]),_:1})])]),_:1})]),_:1},8,["model","rules"])}}});var W=b(O,[["__file","/Users/apple/Desktop/Company Projects/accout-vue3-ui/src/views/InvoiceSales/invoiceApply/components/approval-process/src/financial-review.vue"]]);export{W as default};