md
This commit is contained in:
parent
c451f92772
commit
347d13c488
@ -1,13 +1,9 @@
|
||||
{
|
||||
"name": "xd-vue-pdf",
|
||||
"version": "1.0.1",
|
||||
"version": "3.0.0",
|
||||
"description": "vue.js pdf viewer",
|
||||
"main": "src/vuePdfNoSss.vue",
|
||||
"scripts": {},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/FranckFreiburger/vue-pdf.git"
|
||||
},
|
||||
"keywords": [
|
||||
"vue.js",
|
||||
"pdf",
|
||||
@ -15,16 +11,12 @@
|
||||
],
|
||||
"author": "Franck FREIBURGER",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/FranckFreiburger/vue-pdf/issues"
|
||||
},
|
||||
"homepage": "https://github.com/FranckFreiburger/vue-pdf#readme",
|
||||
"dependencies": {
|
||||
"babel-plugin-syntax-dynamic-import": "^6.18.0",
|
||||
"loader-utils": "^1.4.0",
|
||||
"raw-loader": "^4.0.1",
|
||||
"worker-loader": "^2.0.0",
|
||||
"pdfjs-dist": "^2.5.207",
|
||||
"pdfjs-dist-sign": "^2.5.208",
|
||||
"vue-resize-sensor": "^2.0.0"
|
||||
},
|
||||
"peerDependencies": {}
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { CMapCompressionType } from 'pdfjs-dist/es5/build/pdf.js'
|
||||
import { CMapCompressionType } from 'pdfjs-dist-sign/es5/build/pdf.js'
|
||||
|
||||
// see https://github.com/mozilla/pdf.js/blob/628e70fbb5dea3b9066aa5c34cca70aaafef8db2/src/display/dom_utils.js#L64
|
||||
|
||||
@ -6,16 +6,13 @@ export default function() {
|
||||
|
||||
this.fetch = function(query) {
|
||||
|
||||
return import('./buffer-loader!pdfjs-dist/cmaps/'+query.name+'.bcmap' /* webpackChunkName: "noprefetch-[request]" */)
|
||||
return import('./buffer-loader!pdfjs-dist-sign/cmaps/'+query.name+'.bcmap' /* webpackChunkName: "noprefetch-[request]" */)
|
||||
.then(function(bcmap) {
|
||||
|
||||
delete require.cache[require.resolve('./buffer-loader!pdfjs-dist-sign/cmaps/'+query.name+'.bcmap')];
|
||||
|
||||
return {
|
||||
cMapData: bcmap.default,
|
||||
compressionType: CMapCompressionType.BINARY,
|
||||
};
|
||||
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { PDFLinkService } from 'pdfjs-dist/es5/web/pdf_viewer';
|
||||
import { PDFLinkService } from 'pdfjs-dist-sign/es5/web/pdf_viewer';
|
||||
|
||||
var pendingOperation = Promise.resolve();
|
||||
|
||||
@ -26,9 +26,6 @@ export default function(PDFJS) {
|
||||
// source.pdfBug = true;
|
||||
// source.stopAtErrors = true;
|
||||
|
||||
if ( options && options.withCredentials )
|
||||
source.withCredentials = options.withCredentials;
|
||||
|
||||
var loadingTask = PDFJS.getDocument(source);
|
||||
loadingTask.__PDFDocumentLoadingTask = true; // since PDFDocumentLoadingTask is not public
|
||||
|
||||
@ -84,29 +81,31 @@ export default function(PDFJS) {
|
||||
|
||||
// 1in == 72pt
|
||||
// 1in == 96px
|
||||
var PRINT_RESOLUTION = dpi === undefined ? 300 : dpi;
|
||||
var PRINT_RESOLUTION = dpi === undefined ? 150 : dpi;
|
||||
var PRINT_UNITS = PRINT_RESOLUTION / 72.0;
|
||||
var CSS_UNITS = 96.0 / 72.0;
|
||||
|
||||
var printContainerElement = document.createElement('div');
|
||||
printContainerElement.setAttribute('id', 'print-container')
|
||||
var iframeElt = document.createElement('iframe');
|
||||
|
||||
function removeIframe() {
|
||||
|
||||
function removePrintContainer() {
|
||||
printContainerElement.parentNode.removeChild(printContainerElement);
|
||||
|
||||
iframeElt.parentNode.removeChild(iframeElt);
|
||||
}
|
||||
|
||||
new Promise(function(resolve, reject) {
|
||||
|
||||
printContainerElement.frameBorder = '0';
|
||||
printContainerElement.scrolling = 'no';
|
||||
printContainerElement.width = '0px;'
|
||||
printContainerElement.height = '0px;'
|
||||
printContainerElement.style.cssText = 'position: absolute; top: 0; left: 0';
|
||||
iframeElt.frameBorder = '0';
|
||||
iframeElt.scrolling = 'no';
|
||||
iframeElt.width = '0px;'
|
||||
iframeElt.height = '0px;'
|
||||
iframeElt.style.cssText = 'position: absolute; top: 0; left: 0';
|
||||
|
||||
window.document.body.appendChild(printContainerElement);
|
||||
resolve(window)
|
||||
iframeElt.onload = function() {
|
||||
|
||||
resolve(this.contentWindow);
|
||||
}
|
||||
|
||||
window.document.body.appendChild(iframeElt);
|
||||
})
|
||||
.then(function(win) {
|
||||
|
||||
@ -116,21 +115,21 @@ export default function(PDFJS) {
|
||||
.then(function(page) {
|
||||
|
||||
var viewport = page.getViewport({ scale: 1 });
|
||||
printContainerElement.appendChild(win.document.createElement('style')).textContent =
|
||||
win.document.head.appendChild(win.document.createElement('style')).textContent =
|
||||
'@supports ((size:A4) and (size:1pt 1pt)) {' +
|
||||
'@page { margin: 1pt; size: ' + ((viewport.width * PRINT_UNITS) / CSS_UNITS) + 'pt ' + ((viewport.height * PRINT_UNITS) / CSS_UNITS) + 'pt; }' +
|
||||
'}' +
|
||||
'#print-canvas { display: none }' +
|
||||
|
||||
'@media print {' +
|
||||
'body { margin: 0 }' +
|
||||
'#print-canvas { page-break-before: avoid; page-break-after: always; page-break-inside: avoid; display: block }' +
|
||||
'body > *:not(#print-container) { display: none; }' +
|
||||
'canvas { page-break-before: avoid; page-break-after: always; page-break-inside: avoid }' +
|
||||
'}'+
|
||||
|
||||
'@media screen {' +
|
||||
'body { margin: 0 }' +
|
||||
'}'+
|
||||
|
||||
'}'
|
||||
''
|
||||
return win;
|
||||
})
|
||||
})
|
||||
@ -149,8 +148,7 @@ export default function(PDFJS) {
|
||||
|
||||
var viewport = page.getViewport({ scale: 1 });
|
||||
|
||||
var printCanvasElt = printContainerElement.appendChild(win.document.createElement('canvas'));
|
||||
printCanvasElt.setAttribute('id', 'print-canvas')
|
||||
var printCanvasElt = win.document.body.appendChild(win.document.createElement('canvas'));
|
||||
printCanvasElt.width = (viewport.width * PRINT_UNITS);
|
||||
printCanvasElt.height = (viewport.height * PRINT_UNITS);
|
||||
|
||||
@ -175,11 +173,12 @@ export default function(PDFJS) {
|
||||
win.document.execCommand('print', false, null);
|
||||
} else {
|
||||
win.print();
|
||||
}
|
||||
removePrintContainer();
|
||||
}
|
||||
removeIframe();
|
||||
})
|
||||
.catch(function(err) {
|
||||
removePrintContainer();
|
||||
|
||||
removeIframe();
|
||||
emitEvent('error', err);
|
||||
})
|
||||
})
|
||||
|
||||
@ -6,11 +6,11 @@
|
||||
if ( process.env.VUE_ENV !== 'server' ) {
|
||||
|
||||
var pdfjsWrapper = require('./pdfjsWrapper.js').default;
|
||||
var PDFJS = require('pdfjs-dist/es5/build/pdf.js');
|
||||
var PDFJS = require('pdfjs-dist-sign/es5/build/pdf.js');
|
||||
|
||||
if ( typeof window !== 'undefined' && 'Worker' in window && navigator.appVersion.indexOf('MSIE 10') === -1 ) {
|
||||
|
||||
var PdfjsWorker = require('worker-loader!pdfjs-dist/es5/build/pdf.worker.js');
|
||||
var PdfjsWorker = require('worker-loader!pdfjs-dist-sign/es5/build/pdf.worker.js');
|
||||
PDFJS.GlobalWorkerOptions.workerPort = new PdfjsWorker();
|
||||
}
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
if ( process.env.VUE_ENV !== 'server' ) {
|
||||
|
||||
var pdfjsWrapper = require('./pdfjsWrapper.js').default;
|
||||
var PDFJS = require('pdfjs-dist/es5/build/pdf.js');
|
||||
var PDFJS = require('pdfjs-dist-sign/es5/build/pdf.js');
|
||||
var component = componentFactory(pdfjsWrapper(PDFJS));
|
||||
} else {
|
||||
|
||||
|
||||
@ -4,13 +4,13 @@
|
||||
import componentFactory from './componentFactory'
|
||||
import pdfjsWrapper from './pdfjsWrapper'
|
||||
|
||||
var PDFJS = require('pdfjs-dist/es5/build/pdf.js');
|
||||
var PDFJS = require('pdfjs-dist-sign/es5/build/pdf.js');
|
||||
|
||||
if ( process.env.VUE_ENV !== 'server' ) {
|
||||
|
||||
if ( typeof window !== 'undefined' && 'Worker' in window ) {
|
||||
|
||||
var PdfjsWorker = require('worker-loader!pdfjs-dist/es5/build/pdf.worker.js');
|
||||
var PdfjsWorker = require('worker-loader!pdfjs-dist-sign/es5/build/pdf.worker.js');
|
||||
PDFJS.GlobalWorkerOptions.workerPort = new PdfjsWorker();
|
||||
}
|
||||
}
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
<pdf
|
||||
v-for="i in numPages"
|
||||
:key="i"
|
||||
:src="src"
|
||||
:src="currentPdfUrl"
|
||||
:page="i"
|
||||
></pdf>
|
||||
</div>
|
||||
@ -27,11 +27,22 @@
|
||||
numPages: undefined,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
currentPdfUrl() {
|
||||
if (!this.pdfSrc) return ''
|
||||
console.log("====>pdfSrc==>",this.pdfSrc)
|
||||
return pdf.createLoadingTask({
|
||||
url: this.pdfSrc
|
||||
})
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.loadPDF(this.pdfSrc)
|
||||
},
|
||||
methods:{
|
||||
loadPDF(url){
|
||||
if (!url) return ''
|
||||
|
||||
this.src=pdf.createLoadingTask(url)
|
||||
this.src.promise.then(pdf => {
|
||||
this.numPages = pdf.numPages;//获取pdf页数
|
||||
|
||||
@ -23,6 +23,7 @@
|
||||
:min="0"
|
||||
:max="pageCount"
|
||||
size="mini"
|
||||
@keyup.enter.native="gotoPage(currentPage)"
|
||||
/>
|
||||
</div>
|
||||
<div class="page-count">/ {{ pageCount }}</div>
|
||||
@ -61,7 +62,9 @@
|
||||
import printJS from 'print-js'
|
||||
// npm i pdfjs-dist@2.5.207
|
||||
// npm i vue-pdf@4.2.0
|
||||
import pdf from 'xd-vue-pdf'
|
||||
// import pdf from 'xd-vue-pdf'
|
||||
// import pdf from 'xd-vue-pdf'
|
||||
import pdf from "./xdpdf/vuePdfNoSss.vue"
|
||||
import PdfUtils from '@/utils/pdfUtils.js';
|
||||
export default {
|
||||
components: { pdf },
|
||||
@ -76,10 +79,6 @@ export default {
|
||||
type: Number,
|
||||
default: 1
|
||||
},
|
||||
isLoadComplete:{
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@ -113,11 +112,16 @@ export default {
|
||||
computed: {
|
||||
currentPdfUrl() {
|
||||
if (!this.loadPdfUrl) return ''
|
||||
|
||||
console.log("====>currentPdfUrl==>",this.loadPdfUrl)
|
||||
const publicPath ='/static/'
|
||||
// return pdf.createLoadingTask({
|
||||
// url: this.loadPdfUrl,
|
||||
// cMapUrl: `${publicPath}cmaps/`,
|
||||
// cMapPacked: true
|
||||
// })
|
||||
return pdf.createLoadingTask({
|
||||
url: this.loadPdfUrl,
|
||||
cMapUrl: `${publicPath}cmaps/`,
|
||||
cMapPacked: true
|
||||
url: this.loadPdfUrl
|
||||
})
|
||||
}
|
||||
},
|
||||
@ -131,19 +135,28 @@ export default {
|
||||
this.showFirstFile();
|
||||
},
|
||||
thisPageCount(value) {
|
||||
console.log("===>thisPageCount==>",value);
|
||||
|
||||
if(this.isA4){
|
||||
this.doScale(75);
|
||||
}else{
|
||||
this.doScale(25);
|
||||
}
|
||||
},
|
||||
isLoadComplete(newVal,oldVal){
|
||||
if(this.isA4){
|
||||
this.showA4Page(1);
|
||||
}else{
|
||||
this.showSinglePage(1);
|
||||
}
|
||||
}
|
||||
// isLoadComplete(newVal,oldVal){
|
||||
// console.log("===isLoadComplete=>this.cacheFileList==>",isLoadComplete,this.cacheFileList)
|
||||
|
||||
// if(this.isA4){
|
||||
// this.showA4Page(1);
|
||||
// }else{
|
||||
// let newTmpList = this.cacheFileList.sort((one, two) => {
|
||||
// return one.seqNo - two.seqNo;
|
||||
// });
|
||||
// this.cacheFileList=newTmpList;
|
||||
// this.showFirstFile(1);
|
||||
// // this.showSinglePage(1);
|
||||
// }
|
||||
// }
|
||||
},
|
||||
mounted() {
|
||||
this.initA4List();
|
||||
@ -184,7 +197,7 @@ export default {
|
||||
this.cacheA4FileList.push(fileItem);
|
||||
}
|
||||
},
|
||||
showFirstFile(){
|
||||
showFirstFile(page){
|
||||
if(this.isA4){
|
||||
this.scale=75;
|
||||
this.preScale=75;
|
||||
@ -194,7 +207,11 @@ export default {
|
||||
this.scale=25;
|
||||
this.preScale=25;
|
||||
this.pageCount=this.cacheFileList.length;
|
||||
setTimeout( this.showSinglePage(1),2000);
|
||||
setTimeout(
|
||||
// this.showSinglePage(page?page:this.pageCount)
|
||||
// this.gotoPage(page?page:this.pageCount)
|
||||
this.gotoPage(1)
|
||||
,2000);
|
||||
}
|
||||
|
||||
this.resetCountKey++;
|
||||
@ -217,14 +234,15 @@ export default {
|
||||
|
||||
onPageLoaded(currentPage){
|
||||
|
||||
console.log("====>onPageLoaded===>",currentPage)
|
||||
|
||||
if(this.isA4){
|
||||
// this.page = 1;
|
||||
// this.doScale(75);
|
||||
this.doScale(75);
|
||||
}else{
|
||||
// this.currentPage=1;
|
||||
// this.page = 1;
|
||||
// this.doScale(20);
|
||||
this.doScale(20);
|
||||
}
|
||||
},
|
||||
|
||||
@ -258,6 +276,13 @@ export default {
|
||||
this.doScale(this.scale );
|
||||
}
|
||||
},
|
||||
gotoPage(page) {
|
||||
this.currentPage=page;
|
||||
let fileNo = this.currentPage
|
||||
if (fileNo < 1) return
|
||||
this.currentPage = fileNo
|
||||
this.showSinglePage(this.currentPage)
|
||||
},
|
||||
prePage() {
|
||||
if(!this.isA4){
|
||||
let fileNo = this.currentPage - 1
|
||||
@ -372,7 +397,6 @@ export default {
|
||||
document.body.removeChild(tempLink)
|
||||
}).catch(() => {});
|
||||
|
||||
|
||||
},
|
||||
// 打印
|
||||
printPDF() {
|
||||
|
||||
@ -118,11 +118,12 @@
|
||||
<div style="width:50%">
|
||||
<div class="pagination-container"><slot name="statInfo" /></div>
|
||||
</div>
|
||||
<div style="width:50%">
|
||||
<div style="width:50%;overflow: hidden;">
|
||||
<!-- :pagerCount="3" -->
|
||||
<pagination
|
||||
v-show="total>0 && showPagination"
|
||||
:total="total"
|
||||
:pagerCount="3"
|
||||
|
||||
:page-sizes="[10,20,50,100,300,500,1000,2000,5000]"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
|
||||
@ -307,7 +307,7 @@ class TanexPrinterSdk {
|
||||
"orderList":orderList.toString()
|
||||
}]
|
||||
printCmd['Data']=printData
|
||||
console.log(JSON.stringify(printCmd));
|
||||
// console.log(JSON.stringify(printCmd));
|
||||
this.send(JSON.stringify(printCmd),null);
|
||||
}
|
||||
}
|
||||
@ -578,7 +578,7 @@ class TanexPrinterSdk {
|
||||
}
|
||||
|
||||
console.log("===>this.recievePdfFileList.length==>",this.recievePdfFileList.length);
|
||||
console.log("===>this.sendPdfFileListCount==>",this.sendPdfFileListCount);
|
||||
// console.log("===>this.sendPdfFileListCount==>",this.sendPdfFileListCount);
|
||||
|
||||
// 如果已相等则表示文件已接收完成
|
||||
if(this.recievePdfFileList.length >= this.sendPdfFileListCount){
|
||||
|
||||
@ -59,8 +59,8 @@
|
||||
|
||||
<el-dialog :key="resetRefreshId+'.dlg'" class="printPreDialog" title="预览" :resizable="true" :visible.sync="openPdfView" width="90%" :close-on-click-modal="false" :destroy-on-close="true" v-dialogDrag append-to-body @close="handleClose">
|
||||
<div style="height:100%;width:100%;overflow: auto;">
|
||||
<PdfViewer :key="resetRefreshId+'.pdf'" ref="pdfViewer" v-if="openPdfView&&!isInitA4" :pdfList="pdfList" :printOrderList="printOrderList" :isLoadComplete="isLoadComplete" @onPrint="onPdfViewPrint" ></PdfViewer>
|
||||
<A4Viewer :key="resetRefreshId+'.pdf'" ref="pdfViewer" v-if="openPdfView&&isInitA4" :pdfList="pdfList" :printOrderList="printOrderList" :isLoadComplete="isLoadComplete" ></A4Viewer>
|
||||
<PdfViewer :key="resetRefreshId+'.pdf'" ref="pdfViewer" v-if="openPdfView&&!isInitA4" :pdfList="pdfList" :isLoadComplete="isLoadComplete" @onPrint="onPdfViewPrint" ></PdfViewer>
|
||||
<A4Viewer :key="resetRefreshId+'.pdf'" ref="pdfViewer" v-if="openPdfView&&isInitA4" :pdfList="pdfList" :isLoadComplete="isLoadComplete" ></A4Viewer>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
@ -127,7 +127,7 @@
|
||||
|
||||
pdfList:[],
|
||||
pdfBase64List:[],
|
||||
isLoadComplete:false,
|
||||
isLoadComplete:0,
|
||||
|
||||
tanexPrinter:null,
|
||||
printerDownUrl:null,
|
||||
@ -379,15 +379,13 @@
|
||||
}
|
||||
else if(code == 800){
|
||||
// 全部获取完成
|
||||
console.log("===全部获取完成ADV====>");
|
||||
// let newTmpList = that.pdfList.sort((one, two) => {
|
||||
// return one.seqNo - two.seqNo;
|
||||
// });
|
||||
// that.pdfList=newTmpList;
|
||||
// if(!that.openPdfView && that.showCounter==0){
|
||||
// that.openPdfView = true;
|
||||
// }
|
||||
that.isLoadComplete=true;
|
||||
// console.log("===全部获取完成ADV====>");
|
||||
let newTmpList = that.pdfList.sort((one, two) => {
|
||||
return one.seqNo - two.seqNo;
|
||||
});
|
||||
// console.log("===newTmpList====>",newTmpList);
|
||||
that.pdfList=newTmpList;
|
||||
that.refreshKey();
|
||||
}
|
||||
|
||||
});
|
||||
@ -423,8 +421,6 @@
|
||||
this.orderList=[...orderList]
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 打印子单
|
||||
if(this.selTplCode=="TAN-GC-130"){
|
||||
for(let i=0;i<this.orderList.length;i++){
|
||||
@ -499,7 +495,13 @@
|
||||
else if(code == 800){
|
||||
// 全部获取完成
|
||||
console.log("===全部获取完成2====>");
|
||||
that.isLoadComplete=true;
|
||||
let newTmpList = that.pdfList.sort((one, two) => {
|
||||
return one.seqNo - two.seqNo;
|
||||
});
|
||||
console.log("===newTmpList====>",newTmpList);
|
||||
that.pdfList=newTmpList;
|
||||
|
||||
that.refreshKey();
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
@ -14,7 +14,7 @@
|
||||
<el-steps :active="active" align-center finish-status="finish">
|
||||
<el-step >
|
||||
<template slot="title">
|
||||
收件(<span >{{billDetail.sender.countryName}}</span>)
|
||||
收件(<span >{{billDetail?(billDetail.sender.countryName):''}}</span>)
|
||||
</template>
|
||||
<span class="icon iconfont" slot="icon"></span>
|
||||
</el-step>
|
||||
@ -29,7 +29,7 @@
|
||||
</el-step>
|
||||
<el-step >
|
||||
<template slot="title">
|
||||
签收(<span >{{billDetail.reciever.countryName}}</span>)
|
||||
签收(<span >{{billDetail?(billDetail.reciever.countryName):''}}</span>)
|
||||
</template>
|
||||
<span class="icon iconfont" slot="icon"></span>
|
||||
</el-step>
|
||||
@ -45,7 +45,7 @@
|
||||
|
||||
<div>
|
||||
<div style="text-align: center;">
|
||||
<ImagePreview height="50px" v-for="pic in (billDetail.billPicDispatchRmk||'').split(',')" :key="pic" :src="pic" ></ImagePreview>
|
||||
<ImagePreview height="50px" v-for="pic in (billDetail?billDetail.billPicDispatchRmk:'').split(',')" :key="pic" :src="pic" ></ImagePreview>
|
||||
</div>
|
||||
<div style="text-align: center;">
|
||||
签收底单
|
||||
|
||||
@ -1077,23 +1077,23 @@ methods: {
|
||||
|
||||
let printDataList=[]
|
||||
// 打印主单,子单
|
||||
let orderList=[];
|
||||
orderList.push(this.form.billCode);
|
||||
// 客户联
|
||||
let customerItem ={
|
||||
"tplCode":"TAN-CM-130",
|
||||
"printerName":this.$refs.tanexPrinter.getDefaultPrinter(),
|
||||
"orderList":orderList.toString()
|
||||
}
|
||||
printDataList.push(customerItem);
|
||||
// let orderList=[];
|
||||
// orderList.push(this.form.billCode);
|
||||
// // 客户联
|
||||
// let customerItem ={
|
||||
// "tplCode":"TAN-CM-130",
|
||||
// "printerName":this.$refs.tanexPrinter.getDefaultPrinter(),
|
||||
// "orderList":orderList.toString()
|
||||
// }
|
||||
// printDataList.push(customerItem);
|
||||
|
||||
// 主单
|
||||
let mainBillItem ={
|
||||
"tplCode":"TAN-GM-130",
|
||||
"printerName":this.$refs.tanexPrinter.getDefaultPrinter(),
|
||||
"orderList":orderList.toString()
|
||||
}
|
||||
printDataList.push(mainBillItem);
|
||||
// let mainBillItem ={
|
||||
// "tplCode":"TAN-GM-130",
|
||||
// "printerName":this.$refs.tanexPrinter.getDefaultPrinter(),
|
||||
// "orderList":orderList.toString()
|
||||
// }
|
||||
// printDataList.push(mainBillItem);
|
||||
|
||||
|
||||
|
||||
@ -1162,12 +1162,12 @@ methods: {
|
||||
printDataList.push(customerItem);
|
||||
|
||||
// 主单
|
||||
let mainBillItem ={
|
||||
"tplCode":"TAN-GM-130",
|
||||
"printerName":this.$refs.tanexPrinter.getDefaultPrinter(),
|
||||
"orderList":orderList.toString()
|
||||
}
|
||||
printDataList.push(mainBillItem);
|
||||
// let mainBillItem ={
|
||||
// "tplCode":"TAN-GM-130",
|
||||
// "printerName":this.$refs.tanexPrinter.getDefaultPrinter(),
|
||||
// "orderList":orderList.toString()
|
||||
// }
|
||||
// printDataList.push(mainBillItem);
|
||||
|
||||
|
||||
// 打印子单
|
||||
|
||||
Loading…
Reference in New Issue
Block a user