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