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