import{_ as f,d as x,w as n,z as E,r as i,aC as h,H as B,o as N,c as g,h as t,j as l,M as r,C as D,aN as b}from"./index.js";import{a as w}from"./index.3c9dc929.js";const C={class:"flex items-center justify-between"},y={class:"flex"},F=t("p",{class:"mr-[5px]"},[t("span",{class:"text-red"},"*"),r(" \u9879\u76EE\u6BDB\u5229\u7387: ")],-1),V={class:"flex"},j=x({__name:"grossForm",props:{rate:{type:Number,required:!0},id:{type:String,required:!0}},emits:["refresh"],setup(c,{emit:k}){const o=c,a=n(!1),s=n(0);E(()=>o.rate,()=>{s.value=Number(o.rate||0)},{immediate:!0});async function m(){a.value=!0;const{code:u}=await w({projectNo:o.id,rate:s.value});a.value=!1;const e=Number(u)===0;b[e?"success":"danger"](`\u9879\u76EE\u6BDB\u5229\u7387\u4FEE\u6539${e?"\u6210\u529F":"\u5931\u8D25"}`)}return(u,e)=>{const p=i("ElInputNumber"),d=i("ElButton"),_=h("loading");return B((N(),g("div",C,[t("div",y,[F,t("div",V,[l(p,{min:0,max:100,modelValue:s.value,"onUpdate:modelValue":e[0]||(e[0]=v=>s.value=v),precision:2,"controls-position":"right",class:"mr-[5px]",size:"small"},null,8,["modelValue"]),r(" % ")])]),l(d,{class:"ml-[10px]",size:"small",type:"primary",onClick:m},{default:D(()=>[r("\u4FDD\u5B58")]),_:1})])),[[_,a.value]])}}});var I=f(j,[["__file","C:/Users/Administrator/Desktop/projects/purchase-vue3/src/views/sellOut/project/components/grossForm.vue"]]);export{I as default};
