import{_ as g,d as N,aP as w,x as p,a0 as C,o as i,c as d,h as t,L as u,F as E,E as b,b4 as A,z as B}from"./index.js";import{p as T}from"./print-style.0cc9588c.js";const P={id:"print-template"},k={class:"header"},I={class:"first"},L=t("div",{class:"title"},"\u53D1\u8D27\u8FD0\u5355\u5BF9\u8D26\u5355",-1),R={class:"record",style:{width:"338px"}},O={class:"column"},S={class:"supplier"},j={class:"create",style:{width:"338px"}},H={class:"column"},M={class:"company"},W={class:"total",style:{width:"338px"}},q=t("thead",null,[t("tr",null,[t("th",{style:{"text-align":"left"},width:"35px"},"\u5E8F\u53F7"),t("th",{style:{"text-align":"left"},width:"135px"},"\u53D1\u8D27\u8FD0\u5355\u53F7"),t("th",{style:{"text-align":"left"},width:"135px"},"\u53D1\u8D27\u5DE5\u5355\u53F7"),t("th",{style:{"text-align":"left"},width:"135px"},"\u53D1\u8D27\u5355\u7F16\u53F7"),t("th",{style:{"text-align":"left"}},"\u5546\u54C1\u540D\u79F0"),t("th",{style:{"text-align":"left"},width:"135px"},"\u9500\u552E\u5355\u7F16\u53F7"),t("th",{style:{"text-align":"left"},width:"135px"},"\u91C7\u8D2D\u5355\u7F16\u53F7"),t("th",{style:{"text-align":"left"},width:"60px"},"\u7269\u6D41\u8D39\u7528")])],-1),z=N({__name:"index",props:{record:{type:Object,required:!0}},setup(_,{expose:h}){const a=_,c={createTime:"",supplierName:"",companyName:"",totalPrice:0,totalNum:0,payNo:""},m=w(!1),r=p([]),s=p({...c});function F(n){s.value={...c};const{cgdlist:o,payNo:e,companyName:l,supplierName:f,addtime:y}=n;r.value=o,s.value.totalPrice=(o||[]).reduce((x,D)=>Number(A(x,D.post_fee)).toFixed(2),0),s.value.supplierName=f,s.value.companyName=l,s.value.payNo=e,s.value.createTime=y}function v(n=!1){m.value=n,B(()=>{const o=document.getElementById("print-template").innerHTML,e=document.createElement("iframe");e.setAttribute("style","position: absolute; width: 0; height: 0;"),document.body.appendChild(e);const l=e.contentWindow.document;l.write(T),l.write("<div>"+o+"</div>"),setTimeout(function(){e.contentWindow.print(),document.body.removeChild(e)},50)})}return C(()=>{!a.record||JSON.stringify(a.record)==="{}"||F(a.record)}),h({print:v}),(n,o)=>(i(),d("div",P,[t("table",null,[t("div",k,[t("div",I,[L,t("div",R,"\u5BF9\u8D26\u5355\u53F7\uFF1A"+u(s.value.payNo),1)]),t("div",O,[t("div",S,"\u7269\u6D41\u4F9B\u8D27\u5546\uFF1A"+u(s.value.supplierName),1),t("div",j,"\u521B\u5EFA\u65F6\u95F4\uFF1A"+u(s.value.createTime),1)]),t("div",H,[t("div",M,"\u4E1A\u52A1\u516C\u53F8\uFF1A "+u(s.value.companyName),1),t("div",W,"\u8FD0\u8D39\u603B\u989D\uFF1A"+u(s.value.totalPrice),1)])]),q,t("tbody",null,[(i(!0),d(E,null,b(r.value,(e,l)=>(i(),d("tr",{key:l},[t("td",null,u(l+1),1),t("td",null,u(e.TrackCode),1),t("td",null,u(e.outChildCode),1),t("td",null,u(e.outCode),1),t("td",null,u(e.good_name),1),t("td",null,u(e.orderCode),1),t("td",null,u(e.cgdNo),1),t("td",null,u(e.post_fee),1)]))),128))])])]))}});var U=g(z,[["__file","C:/Users/89793/Desktop/projects/settle-vue3/src/components/sendPrintRecord/src/index.vue"]]);export{U as P};
