import{_ as S,d as q,w as v,Z as h,ag as x,a0 as A,r as a,o as c,G as E,C as t,l as e,c as D,F as T,D as I,u as R,b as U,M as N,aY as j}from"./index.1d1a5ecb.js";import{o as n}from"./status.4c13d767.js";const M={class:"w-full flex justify-end"},O=q({__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=h({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"),V=a("ElForm");return c(),E(V,{"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(T,null,I(R(F),(l,b)=>(c(),E(i,{key:"type"+l.value+b,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(()=>[U("div",M,[e(C,{type:"primary",onClick:g},{default:t(()=>[N("\u4FDD\u5B58")]),_:1})])]),_:1})]),_:1},8,["model","rules"])}}});var P=S(O,[["__file","C:/Users/63107/Desktop/projects/accout-vue3-ui/src/views/InvoiceSales/invoiceApply/components/approval-process/src/financial-review.vue"]]);export{P as default};
