import{_ as q,d as A,n as v,Q as h,aa as x,S as D,r as o,o as c,A as E,y as t,h as e,c as T,F as I,z as R,e as N,H as U,cm as j}from"./index.js";import{o as n}from"./status.4c13d767.js";const O={class:"w-full flex justify-end"},z=A({__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,F=B,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"}]}),g=x(()=>s.isSupport?s.isSpecialTicket?[n[1],n[2]]:n:[n[2]]);function k(){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&&F("changeStatus",u.value)})}return D(()=>{p.remark[0].required=u.value.status==="8",p.open_type[0].required=u.value.status==="2"}),(m,a)=>{const i=o("ElOption"),_=o("ElSelect"),r=o("ElFormItem"),f=o("ElCol"),w=o("ElRow"),S=o("ElInput"),V=o("ElButton"),C=o("ElForm");return c(),E(C,{"label-width":"80px",ref_key:"formRef",ref:d,model:u.value,rules:p},{default:t(()=>[e(w,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":a[0]||(a[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":a[1]||(a[1]=l=>u.value.open_type=l)},{default:t(()=>[(c(!0),T(I,null,R(g.value,(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(S,{placeholder:"\u5907\u6CE8",type:"textarea",modelValue:u.value.remark,"onUpdate:modelValue":a[2]||(a[2]=l=>u.value.remark=l)},null,8,["modelValue"])]),_:1}),e(r,null,{default:t(()=>[N("div",O,[e(V,{type:"primary",onClick:k},{default:t(()=>a[3]||(a[3]=[U("\u4FDD\u5B58")])),_:1})])]),_:1})]),_:1},8,["model","rules"])}}});var M=q(z,[["__file","D:/work/jiesuan/settle-vue3/src/views/InvoiceSales/invoiceApply/components/approval-process/src/financial-review.vue"]]);export{M as default};
