1 |
- import{E as k,a7 as v,a9 as x,_ as E,d as b,x as u,o as A,N as R,K as l,b as V,y as a,u as t,b4 as w,W as y}from"./index.1417328f.js";import{R as F}from"./global.9ad647c8.js";function D({callback:i,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&&i());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=y("\u63D0\u4EA4\u5BA1\u6838\u7ED3\u679C"),P=b({__name:"approval-pending",emits:["changeStatus"],setup(i,{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"),C=u("el-input"),h=u("el-button"),B=u("el-form");return A(),R(B,{inline:"",rules:t(s),model:t(e),ref_key:"formRef",ref:r,"label-width":"100px",flex:"","justify-between":""},{default:l(()=>[V("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]=p=>t(e).status=p)},{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(C,w({type:"textarea",maxlength:2e3,rows:5,placeholder:"\u8BF7\u8F93\u5165\u5907\u6CE8",modelValue:t(e).remark,"onUpdate:modelValue":n[1]||(n[1]=p=>t(e).remark=p)},t(F)),null,16,["modelValue"])]),_:1})]),a(h,{type:"primary",onClick:t(m)},{default:l(()=>[N]),_:1},8,["onClick"])]),_:1},8,["rules","model"])}}});var j=E(P,[["__file","/Users/apple/Desktop/Company Projects/accout-vue3-ui/src/views/InvoiceSales/capitalClaim/components/approval-process/approval-pending.vue"]]);export{j as default};
|