import{_ as P,d as k,b1 as C,w as m,a0 as D,o as n,c as d,b as e,L as l,u as c,F as h,a as f,D as E,y as B}from"./index.0bc83371.js";import{a as g}from"./calc.1104f430.js";var q=` `;const A={id:"print-template"},I={class:"header"},L={class:"first"},O={class:"column"},R={class:"supplier"},T={class:"record"},U={class:"column"},S={class:"company"},j={key:0,class:"total"},z={key:1,class:"total"},H=e("th",{style:{"text-align":"left"},width:"65px"},"\u5E8F\u53F7",-1),M=e("th",{style:{"text-align":"left"},width:"165px"},"\u91C7\u8D2D\u5355\u7F16\u53F7",-1),V=e("th",{style:{"text-align":"left"},width:"165px"},"\u9500\u552E\u5355\u7F16\u53F7",-1),W=e("th",{style:{"text-align":"left"}},"\u5546\u54C1\u540D\u79F0",-1),G=e("th",{style:{"text-align":"left"},width:"30px"},"\u5355\u4F4D",-1),J=e("th",{style:{"text-align":"left"},width:"70px"},"\u5546\u54C1\u6570\u91CF",-1),K=e("th",{style:{"text-align":"left"},width:"100px"},"\u5546\u54C1\u5355\u4EF7",-1),Q=e("th",{style:{"text-align":"left"},width:"100px"},"\u603B\u8D27\u6B3E",-1),X=e("th",{style:{"text-align":"left"},width:"30px"},"\u7A0E\u7387",-1),Y=k({__name:"index",props:{record:{type:Object,required:!0}},setup(v,{expose:y}){const p=v,_={supplierName:"",companyName:"",totalPrice:0,totalNum:0,payNo:""},u=C(!1),x=m([]),o=m({..._});function N(i){o.value={..._};const{cgdlist:r,payNo:t,companyName:s,supplierName:w}=i;r.forEach((a,F)=>{o.value.totalPrice=g(o.value.totalPrice,a.totalPrice),o.value.totalNum=g(o.value.totalNum,a.goodNum),x.value.push({index:F+1,qrdNo:a.qrdCode,tax:a.tax+"%",goodNum:a.goodNum,cgdNo:a.sequenceNo,goodUnit:a.goodUnit,goodName:a.goodName,goodPrice:a.goodPrice,totalPrice:a.totalPrice})}),o.value.totalPrice=Number(o.value.totalPrice.toFixed(2)),o.value.supplierName=w,o.value.companyName=s,o.value.payNo=t}function b(i=!1){u.value=i,B(()=>{const r=document.getElementById("print-template").innerHTML,t=document.createElement("iframe");t.setAttribute("style","position: absolute; width: 0; height: 0;"),document.body.appendChild(t);const s=t.contentWindow.document;s.write(q),s.write("