1 |
- import{o as r}from"./status.4c13d767.js";import{d as w,v as E,Z as S,a6 as x,a0 as A,r as a,o as m,E as v,B as l,j as e,c as D,F as T,C as q,u as I,a as R,M as N,aQ as U}from"./index.b2b87cd1.js";const j={class:"w-full flex justify-end"},L=w({__name:"financial-review",props:{isElectronic:{type:Boolean},isSupport:{type:Boolean},isSpecialTicket:{type:Boolean},isPlain:{type:Boolean},invType:null},emits:["changeStatus"],setup(B,{emit:y}){const s=B,u=E({open_type:"",status:"2",remark:""}),d=E(null),p=S({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?[r[1],r[2]]:r:[r[2]]);function g(){if(s.invType==="special_electronic"&&u.value.open_type!=="3"){U.error("\u91D1\u7A0E\u6682\u4E0D\u652F\u6301\u5F00\u5177\u7535\u5B50\u4E13\u7968");return}d.value.validate(i=>{i&&y("changeStatus",u.value)})}return A(()=>{p.remark[0].required=u.value.status==="8",p.open_type[0].required=u.value.status==="2"}),(i,o)=>{const c=a("ElOption"),_=a("ElSelect"),n=a("ElFormItem"),f=a("ElCol"),k=a("ElRow"),C=a("ElInput"),V=a("ElButton"),b=a("ElForm");return m(),v(b,{"label-width":"80px",ref_key:"formRef",ref:d,model:u.value,rules:p},{default:l(()=>[e(k,null,{default:l(()=>[e(f,{span:12},{default:l(()=>[e(n,{label:"\u5BA1\u6838\u72B6\u6001",prop:"status"},{default:l(()=>[e(_,{style:{width:"100%"},modelValue:u.value.status,"onUpdate:modelValue":o[0]||(o[0]=t=>u.value.status=t),placeholder:"\u5BA1\u6838\u72B6\u6001"},{default:l(()=>[e(c,{label:"\u901A\u8FC7",value:"2"}),e(c,{label:"\u9A73\u56DE",value:"8"})]),_:1},8,["modelValue"])]),_:1})]),_:1}),e(f,{span:10},{default:l(()=>[e(n,{label:"\u5F00\u7968\u65B9\u5F0F",prop:"open_type"},{default:l(()=>[e(_,{style:{width:"100%"},placeholder:"\u5F00\u7968\u65B9\u5F0F",modelValue:u.value.open_type,"onUpdate:modelValue":o[1]||(o[1]=t=>u.value.open_type=t)},{default:l(()=>[(m(!0),D(T,null,q(I(F),(t,h)=>(m(),v(c,{key:"type"+t.value+h,label:t.label,value:t.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1}),e(n,{label:"\u5907\u6CE8",prop:"remark"},{default:l(()=>[e(C,{placeholder:"\u5907\u6CE8",type:"textarea",modelValue:u.value.remark,"onUpdate:modelValue":o[2]||(o[2]=t=>u.value.remark=t)},null,8,["modelValue"])]),_:1}),e(n,null,{default:l(()=>[R("div",j,[e(V,{type:"primary",onClick:g},{default:l(()=>[N("\u4FDD\u5B58")]),_:1})])]),_:1})]),_:1},8,["model","rules"])}}});export{L as default};
|