1 |
- import{_ as g,d as w,aP as N,w as p,a0 as C,o as i,c as d,b as t,L as u,F as b,D as A,y as B}from"./index.88f7d256.js";import{a as E}from"./calc.850c7422.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"},H={class:"create",style:{width:"338px"}},M={class:"column"},W={class:"company"},j={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),G=w({__name:"index",props:{record:{type:Object,required:!0}},setup(_,{expose:m}){const a=_,c={createTime:"",supplierName:"",companyName:"",totalPrice:0,totalNum:0,payNo:""},h=N(!1),r=p([]),o=p({...c});function v(n){o.value={...c};const{cgdlist:s,payNo:e,companyName:l,supplierName:f,addtime:y}=n;r.value=s,o.value.totalPrice=(s||[]).reduce((D,x)=>Number(E(D,x.post_fee)).toFixed(2),0),o.value.supplierName=f,o.value.companyName=l,o.value.payNo=e,o.value.createTime=y}function F(n=!1){h.value=n,B(()=>{const s=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>"+s+"</div>"),setTimeout(function(){e.contentWindow.print(),document.body.removeChild(e)},50)})}return C(()=>{!a.record||JSON.stringify(a.record)==="{}"||v(a.record)}),m({print:F}),(n,s)=>(i(),d("div",P,[t("table",null,[t("div",k,[t("div",I,[L,t("div",R,"\u5BF9\u8D26\u5355\u53F7\uFF1A"+u(o.value.payNo),1)]),t("div",O,[t("div",S,"\u7269\u6D41\u4F9B\u8D27\u5546\uFF1A"+u(o.value.supplierName),1),t("div",H,"\u521B\u5EFA\u65F6\u95F4\uFF1A"+u(o.value.createTime),1)]),t("div",M,[t("div",W,"\u4E1A\u52A1\u516C\u53F8\uFF1A "+u(o.value.companyName),1),t("div",j,"\u8FD0\u8D39\u603B\u989D\uFF1A"+u(o.value.totalPrice),1)])]),q,t("tbody",null,[(i(!0),d(b,null,A(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 K=g(G,[["__file","D:/work/accout-vue3-ui2/settle-vue3/src/components/sendPrintRecord/src/index.vue"]]);export{K as P};
|