当前位置: 首页 > news >正文

接做网站单子的网站企业seo服务

接做网站单子的网站,企业seo服务,做网站里面的图片像素要求,网站建设硬件预算一、找到对应厂商打印机的驱动并在windows上面安装。查看是否安装完成可以在:控制面板->查看设备和打印机,找到对应打印机驱动是否安装完成 二、打印机USB连接电脑 三、运行代码调用浏览器打印,主要使用的是window.print()功能。下面使用…

一、找到对应厂商打印机的驱动并在windows上面安装。查看是否安装完成可以在:控制面板->查看设备和打印机,找到对应打印机驱动是否安装完成

二、打印机USB连接电脑

三、运行代码调用浏览器打印,主要使用的是window.print()功能。下面使用的是基于ifream的,这样可以控制到具体打印范围,全屏打印可以考虑不用。(原理应该就是打印机打印PDF)

四、打印样式不全或者其他,可以考虑设置打印格式 或者 代码样式调整

五、demo 代码

(1) 核心代码

(2) 完整代码

<template><div class="mainContent" @click="emits('close')"><div class="printContent"><iframe style="width: 100%;height: 100%" :src="ticketUrl" ref="ticketIframe" @load="onIframeLoad"></iframe><div class="btnPrint" @click="printReceipt">打印</div></div></div>
</template><script setup>
import {forDate} from "@/utlis/uni_api";
import {ref, onMounted, getCurrentInstance, toRefs} from 'vue';let {proxy} = getCurrentInstance();
let emits = defineEmits(["print", "close"])
let props = defineProps(["data"])
const ticketIframe = ref(null);
const ticketUrl = '../static/print.html';
let {data} = toRefs(props)
let merOrderList = {}
let originalPrice = ""
let sendTxt = ""
let goodsDetails = ""// 确保iframe加载完成
onMounted(async () => {await proxy.$nextTick();ticketIframe.value.contentWindow.focus();merOrderList = data.value.merOrderListlet proList = data.value.goodListfor (let i = 0; i < proList.length; i++) {let goodsName = proList[i].goodsNamelet goodsNum = proList[i].goodsNumlet realPrice = proList[i].realPricelet spec = proList[i].goodsSpecification//商品信息goodsDetails += goodsName + "[" + spec + "]" + "&nbsp;X&nbsp;" + goodsNum + "&nbsp;&nbsp;&nbsp;&nbsp;¥" + realPrice + "</br>"}//原价originalPrice = merOrderList.price + merOrderList.discountsPrice//配送时间sendTxt = data.value.isIm ? "立即配送" : data.value.predictTime
});function onIframeLoad() {console.log("data = ", data.value)let printerName = uni.getStorageSync("printerName")let iframe = ticketIframe.valuelet iframeDocument = iframe.contentWindow ? iframe.contentWindow.document : iframe.contentDocument;// 对于跨域限制不适用的情况,可以直接操作DOMif (iframeDocument) {if (printerName == "XP58C" || printerName == "POS58") {iframeDocument.body.innerHTML = ticketXP58C()}}
}function ticketXP58C() {return `<img style="width: 160px;height: 70px;margin: 0 0 30px 20px;" src="../static/image/public/print_logo.png"><div style="font-size: 20px;font-weight: bold;margin-bottom: 20px;">#${data.value.dayNum}&nbsp;&nbsp;&nbsp;*外卖狮配送*</div><div style="font-size: 10px;margin-bottom: 4px;">-----------------------------------------------</div><div style="display: flex;justify-content: space-between;font-size: 11px;margin-bottom: 4px;"><div>送达时间:</div><div>${sendTxt}</div></div><div style="display: flex;justify-content: space-between;font-size: 11px;margin-bottom: 4px;"><span>下单时间:</span><span>${forDate(merOrderList.createTime)}</span></div><div style="display: flex;justify-content: space-between;font-size: 11px;margin-bottom: 4px;"><div>订单编号:</div><div>${merOrderList.orderSn}</div></div><div style="font-size: 10px;margin-bottom: 4px;">-----------------------------------------------</div><div style="display: flex;font-size: 18px;font-weight:bold;margin-bottom: 4px;"><span>备注:</span><span>${data.value.remark ? data.value.remark : "无"}</span></div><div style="font-size: 12px;margin-bottom: 4px;">*************************************</div><div style="font-size: 11px;margin-bottom: 4px;">---------------------餐品------------------</div><div style="font-size: 11px;margin-bottom: 4px;">${goodsDetails}</div><div style="font-size: 11px;margin-bottom: 4px;">---------------------其他------------------</div><div style="display: flex;justify-content: space-between;font-size: 11px;margin-bottom: 4px;"><span>打包费:</span><span>¥${merOrderList.packPrice}</span></div><div style="display: flex;justify-content: space-between;font-size: 11px;margin-bottom: 4px;"><span>配送费:</span><span>¥${merOrderList.distributionPrice}</span></div><div style="display: flex;justify-content: space-between;font-size: 11px;margin-bottom: 4px;"><span>优惠价格:</span><span>-¥${merOrderList.discountsPrice}</span></div><div style="font-size: 12px;margin-bottom: 4px;">*************************************</div><div style="display: flex;justify-content: space-between;font-size: 11px;margin-bottom: 4px;">${merOrderList.payType == "alipay" ? "支付宝支付" : "微信支付"}</div><div style="display: flex;justify-content: space-between;font-size: 11px;margin-bottom: 4px;">原价:¥${originalPrice}</div><div style="display: flex;justify-content: right;font-size: 18px;font-weight: bold;margin-bottom: 4px;">实付:¥${merOrderList.price}</div><div style="font-size: 10px;margin-bottom: 30px;">------------------------------------------------</div><div style="display: flex;font-size: 18px;font-weight: bold;margin-bottom: 20px;">${data.value.name} ${data.value.phone.substr(0, 3) + "****" + data.value.phone.substr(data.value.phone.length - 4, data.value.phone.length)}</div><div style="font-size: 12px;margin-bottom: 60px;">*************************************</div><div style="font-size: 1px;">-</div>`//地址// < div style = "display: flex;font-size: 18px;font-weight: bold;margin-bottom: 15px;" >// ${merOrderList.address}// < /div>
}function printReceipt() {emits("close")ticketIframe.value.contentWindow.print(); // 调用iframe内部的window.print()proxy.$refs.ticketIframe.contentWindow.location.reload(true);
}
</script><style scoped>
.mainContent {position: fixed;top: 0;left: 0;width: 100%;height: 100%;min-height: 100vh;background-color: rgba(0, 0, 0, 0.5);z-index: 999999;display: flex;align-items: center;justify-content: center;
}.printContent {width: 70%;height: 50vh;background-color: #FFFFFF;box-sizing: border-box;display: flex;flex-direction: column;align-items: center;border-radius: 10rpx;padding: 20rpx;
}.btnPrint {width: 50%;margin: 80rpx auto 20rpx;font-size: 26rpx;color: #FFFFFF;background-color: #FF0000;text-align: center;padding: 10rpx 0;border-radius: 10rpx;
}iframe {border: none;
}
</style>


文章转载自:
http://entrant.wjrq.cn
http://inflicter.wjrq.cn
http://fraternise.wjrq.cn
http://religionary.wjrq.cn
http://stenciller.wjrq.cn
http://distractible.wjrq.cn
http://reverb.wjrq.cn
http://bangalore.wjrq.cn
http://pew.wjrq.cn
http://numbles.wjrq.cn
http://indistinctively.wjrq.cn
http://mote.wjrq.cn
http://caducary.wjrq.cn
http://anisochronous.wjrq.cn
http://intercommunal.wjrq.cn
http://supersensory.wjrq.cn
http://cambrel.wjrq.cn
http://communionist.wjrq.cn
http://portray.wjrq.cn
http://curious.wjrq.cn
http://overcunning.wjrq.cn
http://stratify.wjrq.cn
http://cuvierian.wjrq.cn
http://mozetta.wjrq.cn
http://jama.wjrq.cn
http://avernus.wjrq.cn
http://steely.wjrq.cn
http://cosmogonist.wjrq.cn
http://salyrgan.wjrq.cn
http://larrup.wjrq.cn
http://floor.wjrq.cn
http://egyptianism.wjrq.cn
http://abduce.wjrq.cn
http://bracer.wjrq.cn
http://captious.wjrq.cn
http://parorexia.wjrq.cn
http://largando.wjrq.cn
http://fistfight.wjrq.cn
http://nomen.wjrq.cn
http://thimphu.wjrq.cn
http://admeasurement.wjrq.cn
http://halidome.wjrq.cn
http://platiniridium.wjrq.cn
http://quinquenniad.wjrq.cn
http://malingerer.wjrq.cn
http://prohibition.wjrq.cn
http://kaaba.wjrq.cn
http://upc.wjrq.cn
http://blurt.wjrq.cn
http://vfw.wjrq.cn
http://underwear.wjrq.cn
http://glassy.wjrq.cn
http://ironworker.wjrq.cn
http://felon.wjrq.cn
http://reorganize.wjrq.cn
http://dinette.wjrq.cn
http://insulate.wjrq.cn
http://residuum.wjrq.cn
http://kurbash.wjrq.cn
http://hypaspist.wjrq.cn
http://weald.wjrq.cn
http://kituba.wjrq.cn
http://traditor.wjrq.cn
http://crackly.wjrq.cn
http://grannie.wjrq.cn
http://viridian.wjrq.cn
http://pentacarpellary.wjrq.cn
http://chariot.wjrq.cn
http://coccidioidomycosis.wjrq.cn
http://terminally.wjrq.cn
http://queenlike.wjrq.cn
http://extraconstitutional.wjrq.cn
http://belowdecks.wjrq.cn
http://tetroxide.wjrq.cn
http://psychotherapist.wjrq.cn
http://diverting.wjrq.cn
http://ferromagnetism.wjrq.cn
http://measuring.wjrq.cn
http://austronesia.wjrq.cn
http://vicissitude.wjrq.cn
http://contradictive.wjrq.cn
http://causable.wjrq.cn
http://clepsydra.wjrq.cn
http://lesgirls.wjrq.cn
http://dytiscid.wjrq.cn
http://outlaid.wjrq.cn
http://antimonial.wjrq.cn
http://dilemma.wjrq.cn
http://repellancy.wjrq.cn
http://purler.wjrq.cn
http://horsemanship.wjrq.cn
http://fondly.wjrq.cn
http://field.wjrq.cn
http://machinist.wjrq.cn
http://source.wjrq.cn
http://handy.wjrq.cn
http://misaligned.wjrq.cn
http://bioplast.wjrq.cn
http://astrocyte.wjrq.cn
http://devolatilize.wjrq.cn
http://www.hrbkazy.com/news/87807.html

相关文章:

  • 网站建设外出考察信息yande搜索引擎官网入口
  • 东方av网站的电影下载应该怎么做百度搜索优化软件
  • 做手机网站的公司营销网站制作
  • 怎么让自己网站百度搜索时靠前网站seo关键词设置
  • 泰安网站建设方案全媒体广告加盟
  • 青岛做个网站多少钱苏州搜索引擎排名优化商家
  • 做众筹的网站有几个网店推广是什么
  • 宜兴建设局质监网站全网营销的公司
  • 企业信息网seo视频教程百度云
  • 郑州app制作开发公司网络推广seo
  • 网站首页怎么做营业执照链接微信scrm系统
  • 网站招聘怎么做大连网站搜索排名
  • 可以免费浏览的网站网站打开速度优化
  • 淘宝网站c 设计怎么做的徐州seo建站
  • 互动网站建设的主页bt磁力猫
  • 做电影网站涉及的侵权问题摘抄一篇新闻
  • 做网站的注意什么问题软文发稿平台有哪些
  • 做百度移动网站排名软中国最新军事新闻
  • 网站没有备案信息该怎么做网站建设选亿企网络
  • 个人网站名字取名怎么做windows优化大师破解版
  • 做网站的毕业论文怎么写舆情服务公司
  • 英文版网站怎么做免费淘宝关键词工具
  • 国外购物网站怎么做社区建站网站系统
  • 网站淘宝推广怎么做东莞关键词seo
  • 网上接单做网站点击宝seo
  • 手机网站建设哪家有郑州seo地址
  • 湖州建设网站关键词优化
  • 标签在数据库wordpressaso优化软件
  • 企业网站 设游戏推广员
  • 山西网站建设模板建站代理