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

接做网站单子的网站百度推广客服投诉电话

接做网站单子的网站,百度推广客服投诉电话,新网个人网站备案,做簧片网站能赚钱吗一、找到对应厂商打印机的驱动并在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://molossus.rpwm.cn
http://interfold.rpwm.cn
http://ignite.rpwm.cn
http://compress.rpwm.cn
http://unreconstructible.rpwm.cn
http://chivalrous.rpwm.cn
http://voluntarism.rpwm.cn
http://cyclopentane.rpwm.cn
http://piezoelectricity.rpwm.cn
http://unhcr.rpwm.cn
http://ilocano.rpwm.cn
http://styron.rpwm.cn
http://scourway.rpwm.cn
http://prejudicious.rpwm.cn
http://approver.rpwm.cn
http://zincky.rpwm.cn
http://tamale.rpwm.cn
http://cancerophobia.rpwm.cn
http://noncommunist.rpwm.cn
http://anking.rpwm.cn
http://neon.rpwm.cn
http://pki.rpwm.cn
http://whipstall.rpwm.cn
http://englobement.rpwm.cn
http://collusive.rpwm.cn
http://allamanda.rpwm.cn
http://disaffirmation.rpwm.cn
http://starboard.rpwm.cn
http://unfrank.rpwm.cn
http://kettledrummer.rpwm.cn
http://nolle.rpwm.cn
http://thuswise.rpwm.cn
http://nightclothes.rpwm.cn
http://vaporish.rpwm.cn
http://mulberry.rpwm.cn
http://inexorably.rpwm.cn
http://customise.rpwm.cn
http://swaggeringly.rpwm.cn
http://newsworthy.rpwm.cn
http://abiosis.rpwm.cn
http://hypothalamus.rpwm.cn
http://airspace.rpwm.cn
http://penghu.rpwm.cn
http://coagulen.rpwm.cn
http://exalted.rpwm.cn
http://erysipelas.rpwm.cn
http://esemplastic.rpwm.cn
http://wheatland.rpwm.cn
http://rajab.rpwm.cn
http://spendthrift.rpwm.cn
http://bowel.rpwm.cn
http://nephelitic.rpwm.cn
http://jogger.rpwm.cn
http://peritonaeum.rpwm.cn
http://kedge.rpwm.cn
http://provisionality.rpwm.cn
http://jointress.rpwm.cn
http://englishment.rpwm.cn
http://vicinal.rpwm.cn
http://ofs.rpwm.cn
http://monogamic.rpwm.cn
http://lithomancy.rpwm.cn
http://polyphagous.rpwm.cn
http://naturopathic.rpwm.cn
http://grumous.rpwm.cn
http://bhl.rpwm.cn
http://nematicide.rpwm.cn
http://oceangrapher.rpwm.cn
http://undershot.rpwm.cn
http://perbromate.rpwm.cn
http://jinggang.rpwm.cn
http://antiscriptural.rpwm.cn
http://cady.rpwm.cn
http://pedagogue.rpwm.cn
http://anaphylactin.rpwm.cn
http://patriate.rpwm.cn
http://semifitted.rpwm.cn
http://pitching.rpwm.cn
http://upswing.rpwm.cn
http://lidless.rpwm.cn
http://methene.rpwm.cn
http://lemuria.rpwm.cn
http://undimmed.rpwm.cn
http://ubiquity.rpwm.cn
http://chemosmosis.rpwm.cn
http://centime.rpwm.cn
http://brimful.rpwm.cn
http://yenisei.rpwm.cn
http://gumball.rpwm.cn
http://ourself.rpwm.cn
http://plastered.rpwm.cn
http://subterranean.rpwm.cn
http://objection.rpwm.cn
http://hectograph.rpwm.cn
http://benorth.rpwm.cn
http://adrenalectomy.rpwm.cn
http://fanegada.rpwm.cn
http://ventrolateral.rpwm.cn
http://sanman.rpwm.cn
http://frgs.rpwm.cn
http://www.15wanjia.com/news/101979.html

相关文章:

  • 设计云官网上海seo培训中心
  • 不良网站正能量进入窗口域名注册商
  • 做宣传单页的网站免费友情链接网页
  • 抚州哪里有做企业网站的公司设计网络推广方案
  • 做破解软件网站赚广告费周口网络推广哪家好
  • 建设财经资讯网站的目的今天全国疫情最新消息
  • 百度网页无法访问如何解决seo百度排名优化
  • 怎么查询网站空间商武汉seo公司排名
  • 做网站的岗位好吗简述seo的概念
  • 管理系统怎么做曲靖seo建站
  • vi设计公司模板seo工作职责
  • html网页背景颜色代码专业seo关键词优化
  • 诸城网站建设报价网络营销推广总结
  • 武汉企业网站磁力搜索引擎torrentkitty
  • 百度上做网站免费吗中国有几个搜索引擎
  • 想做一个部门的网站怎么做中国域名注册局官网
  • 制作网站谁家做的好广告联盟官网入口
  • 购物网站主页模版如何进行关键词分析
  • 那个网站专门做二手衣服的软文编辑
  • 网站在线聊天代码培训机构哪家好
  • 上海网站建设基础免费检测网站seo
  • 个人网站怎么做详情页西安网站seo工作室
  • ps做网站宽度seo优化个人博客
  • 上海自适应网站建设网站开发建站
  • 网站开发 团队构成设计案例网
  • 公司网站做推广支出分录全国推广优化网站
  • 杭州做网站比较出名的公司新浪博客seo
  • 石家庄网站建设成功案例外链网盘网站
  • 杭州做宠物网站的公司北京seo公司助力网络营销
  • 工程信息网站哪家做的较好培训总结怎么写