This commit is contained in:
liuyp 2024-05-29 21:26:31 +08:00
commit bd4e0b4c10
7 changed files with 209 additions and 171 deletions

View File

@ -98,6 +98,7 @@
"vue-meta": "2.4.0", "vue-meta": "2.4.0",
"vue-okr-tree": "^1.0.17", "vue-okr-tree": "^1.0.17",
"vue-pdf": "^4.2.0", "vue-pdf": "^4.2.0",
"vue-pdf-signature": "^4.2.7",
"vue-print-nb": "^1.7.5", "vue-print-nb": "^1.7.5",
"vue-property-decorator": "^9.1.2", "vue-property-decorator": "^9.1.2",
"vue-router": "3.4.9", "vue-router": "3.4.9",

View File

@ -9,14 +9,14 @@ export function listEmisWaybill(query) {
}) })
} }
// 查询运单列表详细 // 查询运单详细
export function getInfoByBillCode(billCode) { // export function getInfoByBillCode(billCode) {
return request({ // return request({
url: '/emis/emisWaybill/getInfoByBillCode', // url: '/emis/emisWaybill/getInfoByBillCode',
method: 'get', // method: 'get',
params: {billCode: billCode} // params: {billCode: billCode}
}) // })
} // }
export function getWaybillDetail(billCode) { export function getWaybillDetail(billCode) {
return request({ return request({

View File

@ -1,89 +1,13 @@
<template> <template>
<div id="container"> <div id="container">
<div class="tools"> <div class="tools">
<!-- <el-button type="text" @click="FirstPage()">
<el-tooltip class="item" effect="light" content="第一页" placement="top">
<i class="el-icon-d-arrow-left"></i>
</el-tooltip>
</el-button>
<el-button type="text" @click="changePdfPage(0)">
<el-tooltip class="item" effect="light" content="上一页" placement="top">
<i class="el-icon-arrow-left"></i>
</el-tooltip>
</el-button>
<el-button type="text" @click="changePdfPage(1)">
<el-tooltip class="item" effect="light" content="下一页" placement="top">
<i class="el-icon-arrow-right"></i>
</el-tooltip>
</el-button>
<el-button type="text" @click="lastPage()">
<el-tooltip class="item" effect="light" content="最后一页" placement="top">
<i class="el-icon-d-arrow-right"></i>
</el-tooltip>
</el-button>
<el-button type="text" @click="setIsExit()" v-show="!isExit" style="margin-right:10px;">
<el-tooltip class="item" effect="light" content="页码选择" placement="top">
<i class="el-icon-setting"></i>
</el-tooltip>
</el-button>
<el-tooltip class="item" effect="light" content="页码选择" placement="top" v-show="isExit">
<el-select v-model="value" placeholder="请选择" @change="pageSelect" size="mini">
<el-option v-for="item in pageCount" :key="item" :label="'第 '+item+' 页'" :value="item"></el-option>
</el-select>
</el-tooltip>
<el-button type="text" @click="scaleD()">
<el-tooltip class="item" effect="light" content="放大" placement="top">
<i class="el-icon-zoom-in"></i>
</el-tooltip>
</el-button>
<el-button type="text" @click="scaleX()">
<el-tooltip class="item" effect="light" content="缩小" placement="top">
<i class="el-icon-zoom-out"></i>
</el-tooltip>
</el-button>
<el-button type="text" @click="clock()">
<el-tooltip class="item" effect="light" content="顺时针旋转" placement="top">
<i class="el-icon-refresh-right"></i>
</el-tooltip>
</el-button>
<el-button type="text" @click="counterClock()">
<el-tooltip class="item" effect="light" content="逆时针旋转" placement="top">
<i class="el-icon-refresh-left"></i>
</el-tooltip>
</el-button> -->
<div style="width:100%;text-align: right;"> <div style="width:100%;text-align: right;">
<el-button type="text" @click="downPDF"> <el-button title="下载" type="primary" icon="el-icon-download" @click="downPDF">下载</el-button>
<el-tooltip class="item" effect="light" content="下载" placement="top"> <el-button title="打印" type="primary" icon="el-icon-printer" @click="printPDF">打印</el-button>
<i class="el-icon-download"></i>
</el-tooltip>
</el-button>
<el-button type="text" @click="printPDF">
<el-tooltip class="item" effect="light" content="打印" placement="top">
<i class="el-icon-printer"></i>
</el-tooltip>
</el-button>
</div> </div>
<!-- <p class="total">
<el-tooltip class="item" effect="light" content="当前页" placement="top">
<b style="color:#F56C6C;cursor:pointer;">{{ currentPage }}</b> </el-tooltip>&nbsp;/&nbsp;
<el-tooltip class="item" effect="light" content="总页数" placement="top">
<b style="color:#67C23A;cursor:pointer;">{{ pageCount }}</b></el-tooltip>
</p> -->
</div> </div>
<div class="main"> <div class="main">
<div class="pdfview"> <iframe style="width: 100%; height: 100%;" :src="pdfLoadUrl" frameborder="0"></iframe>
<pdf
v-for="i in pageCount" :key="i"
ref="pdf" id="pdf"
:page="i"
:src="pdfLoadUrl"
style="width: 100%;margin-bottom: 10px;"
@num-pages="currentPage=$event">
</pdf>
</div>
<!-- <pdf ref="pdf" id="pdf" :src="src" :page="currentPage" :rotate="pageRotate" @num-pages="pageCount = $event" @page-loaded="currentPage = $event" @loaded="loadPdfHandler"></pdf> -->
</div> </div>
</div> </div>
</template> </template>
@ -126,7 +50,9 @@ export default {
pdfUrl(newVal) { pdfUrl(newVal) {
console.log(this.pdfUrl) console.log(this.pdfUrl)
if(this.pdfUrl){ if(this.pdfUrl){
this.src=this.pdfUrl; // this.src=this.pdfUrl;
this.pdfLoadUrl='/static/pdfjs/4.2.67/web/viewer.html?file=' + encodeURIComponent(this.pdfUrl)
console.log(this.pdfLoadUrl)
} }
}, },
}, },
@ -253,9 +179,10 @@ export default {
.tools { .tools {
display: flex; display: flex;
background: #e1e1e1; z-index: 9999;
width: 100%; position: absolute;
z-index:9999; top: 20px;
right: 30px;
} }
.total { .total {

View File

@ -64,6 +64,12 @@ class TanexPrinterSdk {
// 默认打印机 // 默认打印机
defaultPrinter = null; defaultPrinter = null;
defaultTplCode = null;
isSendSetToken=false;
isSendGetTpl=false;
isSendGetPrinter=false;
// 标识:是否连接成功 , 记录重试的次数,重新连接尝试的次数 // 标识:是否连接成功 , 记录重试的次数,重新连接尝试的次数
connected = false; connected = false;
printerIsRead = false; printerIsRead = false;
@ -130,29 +136,13 @@ class TanexPrinterSdk {
return this.defaultPrinter; return this.defaultPrinter;
} }
// 获取pdf链接
getPdfUrl(ydSn,tplName,printerName){
return this.HTTP_GET_PDF + '?ydSn=' + ydSn+"&tplName="+tplName+"&printerName="+printerName;
}
// 下载PDF文件
// downPdfFile(ydSn,tplName,printerName){
// let link = document.createElement('a');
// link.style.display = 'none';
// link.href = this.HTTP_GET_PDF + '?ydSn=' + ydSn+"&tplName="+tplName+"&printerName="+printerName;
// // window.open(link.href, '_blank');
// document.body.appendChild(link);
// link.click();
// }
// 批量获取PDF文件 // 批量获取PDF文件
batchGetPDF(tplName,printerName,orderList,callback){ batchGetPDF(tplCode,printerName,orderList,callback){
if(tplName&&printerName&&orderList&&orderList.length>0){ if(tplCode&&printerName&&orderList&&orderList.length>0){
this.setOnBatchGetPDF(callback); this.setOnBatchGetPDF(callback);
// 超时计算 // 超时计算
this.sendBatchGetPDFCMD(tplName,printerName,orderList); this.sendBatchGetPDFCMD(tplCode,printerName,orderList);
this.recievePdfFileTimer = setTimeout(function(){ this.recievePdfFileTimer = setTimeout(function(){
if(this.onBatchGetPDFCallback){ if(this.onBatchGetPDFCallback){
if(this.onBatchGetPDFCallback.length>0){ if(this.onBatchGetPDFCallback.length>0){
@ -170,19 +160,30 @@ class TanexPrinterSdk {
} }
} }
// 批量打印 // 批量打印
batchPrint(tplName,printerName,orderList){ batchPrint(tplCode,printerName,orderList){
if(tplName&&printerName&&orderList&&orderList.length>0){ if(tplCode&&printerName&&orderList&&orderList.length>0){
this.sendBatchPrintCMD(tplName,printerName,orderList); this.sendBatchPrintCMD(tplCode,printerName,orderList);
} }
} }
refreshPrintTpl(){
this.sendRefreshPrintTplListCMD();
}
getRequestId() {
let requestId = 'req' + new Date().getTime().toString(36) + Math.random().toString(36).substring(2, 9);
return requestId;
}
//--内部方法-------------------------------------------------------------- //--内部方法--------------------------------------------------------------
sendSetTokenCMD(){ sendSetTokenCMD(){
// if(this.isSendSetToken){
// return;
// }
// {"CMD":"setToken","status":"1","Data":"token"} // {"CMD":"setToken","status":"1","Data":"token"}
var printCmd={}; var printCmd={};
printCmd['RequestId']=this.getRequestId();
printCmd['CMD']="setToken"; printCmd['CMD']="setToken";
printCmd['Status']="1"; printCmd['Status']="1";
printCmd['Data']=getToken(); printCmd['Data']=getToken();
@ -190,14 +191,15 @@ class TanexPrinterSdk {
this.send(JSON.stringify(printCmd),null); this.send(JSON.stringify(printCmd),null);
} }
sendBatchPrintCMD(tplName,printerName,orderList){ sendBatchPrintCMD(tplCode,printerName,orderList){
// {"CMD":"batchPrint","status":"1","Data":["DT20210901001","DT20210901002"]} // {"CMD":"batchPrint","status":"1","Data":["DT20210901001","DT20210901002"]}
var printCmd={}; var printCmd={};
printCmd['RequestId']=this.getRequestId();
printCmd['CMD']="batchPrint"; printCmd['CMD']="batchPrint";
printCmd['Status']="1"; printCmd['Status']="1";
if(orderList!=null && orderList.length>0){ if(orderList!=null && orderList.length>0){
let printData={ let printData={
"tplName":tplName, "tplCode":tplCode,
"printerName":printerName, "printerName":printerName,
"orderList":orderList.toString() "orderList":orderList.toString()
} }
@ -207,14 +209,15 @@ class TanexPrinterSdk {
} }
} }
sendBatchGetPDFCMD(tplName,printerName,orderList){ sendBatchGetPDFCMD(tplCode,printerName,orderList){
// {"CMD":"batchGetPDF","status":"1","Data":["DT20210901001","DT20210901002"]} // {"CMD":"batchGetPDF","status":"1","Data":["DT20210901001","DT20210901002"]}
var printCmd={}; var printCmd={};
printCmd['RequestId']=this.getRequestId();
printCmd['CMD']="batchGetPDF"; printCmd['CMD']="batchGetPDF";
printCmd['Status']="1"; printCmd['Status']="1";
if(orderList!=null && orderList.length>0){ if(orderList!=null && orderList.length>0){
let printData={ let printData={
"tplName":tplName, "tplCode":tplCode,
"printerName":printerName, "printerName":printerName,
"orderList":orderList.toString() "orderList":orderList.toString()
} }
@ -230,7 +233,13 @@ class TanexPrinterSdk {
sendGetPrinterListCMD(){ sendGetPrinterListCMD(){
// {"CMD":"getPrinterList","status":"1","Data":""} // {"CMD":"getPrinterList","status":"1","Data":""}
// if(this.isSendGetPrinter){
// return;
// }
var printCmd={}; var printCmd={};
printCmd['RequestId']=this.getRequestId();
printCmd['CMD']="getPrinterList"; printCmd['CMD']="getPrinterList";
printCmd['Status']="1"; printCmd['Status']="1";
printCmd['Data']=""; printCmd['Data']="";
@ -239,8 +248,12 @@ class TanexPrinterSdk {
} }
sendGetPrintTplListCMD(){ sendGetPrintTplListCMD(){
// if(this.isSendGetTpl){
// return;
// }
// {"CMD":"getPrintTplList","status":"1","Data":""} // {"CMD":"getPrintTplList","status":"1","Data":""}
var printCmd={}; var printCmd={};
printCmd['RequestId']=this.getRequestId();
printCmd['CMD']="getPrintTplList"; printCmd['CMD']="getPrintTplList";
printCmd['Status']="1"; printCmd['Status']="1";
printCmd['Data']=""; printCmd['Data']="";
@ -248,12 +261,23 @@ class TanexPrinterSdk {
this.send(JSON.stringify(printCmd),null); this.send(JSON.stringify(printCmd),null);
} }
sendRefreshPrintTplListCMD(){
// {"CMD":"getPrintTplList","status":"1","Data":"reInit"}
var printCmd={};
printCmd['RequestId']=this.getRequestId();
printCmd['CMD']="getPrintTplList";
printCmd['Status']="1";
printCmd['Data']="reInit";
// console.log(JSON.stringify(printCmd));
this.send(JSON.stringify(printCmd),null);
}
// 连接服务器的方法 // 连接服务器的方法
connect() { connect() {
// 连接服务器 // 连接服务器
if (!window.WebSocket) { if (!window.WebSocket) {
// console.log('您的浏览器不支持WebSocket'); console.log('您的浏览器不支持WebSocket');
return null; return null;
} }
@ -300,6 +324,10 @@ class TanexPrinterSdk {
this.connected = false; this.connected = false;
this.connectRetryCount++; this.connectRetryCount++;
if(this.connectRetryCount>120){
this.connectRetryCount=0;
}
if(this.onCloseCallback.length>0){ if(this.onCloseCallback.length>0){
this.onCloseCallback.forEach(callback=>{ this.onCloseCallback.forEach(callback=>{
if(callback!=null){ if(callback!=null){
@ -307,10 +335,11 @@ class TanexPrinterSdk {
} }
}) })
} }
// * this.connectRetryCount
setTimeout(() => { setTimeout(() => {
this.connect() this.connect()
}, 500 * this.connectRetryCount) }, 1000 )
}; };
this.ws.onmessage = e => { this.ws.onmessage = e => {
@ -374,6 +403,10 @@ class TanexPrinterSdk {
innerGetPrinterList(msg){ innerGetPrinterList(msg){
// console.log("innerGetPrinterList") // console.log("innerGetPrinterList")
this.isSendGetPrinter=true;
if(msg){ if(msg){
this.printerList=[]; this.printerList=[];
// console.log(msg); // console.log(msg);
@ -391,22 +424,21 @@ class TanexPrinterSdk {
innerGetPrintTplList(msg){ innerGetPrintTplList(msg){
// console.log("innerGetPrintTplList") // console.log("innerGetPrintTplList")
this.isSendGetTpl=false;
if(msg){ if(msg){
this.printTplList=[]; this.printTplList=[];
msg.Data.tplList.forEach(item=>{ msg.Data.tplList.forEach(item=>{
let optionItem={ this.printTplList.push(item);
label:item, this.defaultTplCode=this.printTplList[0].tplCode;
value:item
}
this.printTplList.push(optionItem);
this.selTplName=this.printTplList[0].value;
}) })
} }
} }
innerBatchGetPDF(msg){ innerBatchGetPDF(msg){
// console.log("innerBatchGetPDF") // console.log("innerBatchGetPDF")
// console.log(msg)
// 有出错,停止接收数据 // 有出错,停止接收数据
if(msg.Status!='2'){ if(msg.Status!='2'){
clearTimeout(this.recievePdfFileTimer); clearTimeout(this.recievePdfFileTimer);
@ -462,9 +494,6 @@ class TanexPrinterSdk {
} }
jsonToObj(json){ jsonToObj(json){
return JSON.parse(json) return JSON.parse(json)
} }
@ -487,6 +516,7 @@ class TanexPrinterSdk {
// 发送数据的方法 // 发送数据的方法
send(data) { send(data) {
console.log("send:"+data)
if (this.getWSReadyState() === this.WS_OPEN ) { if (this.getWSReadyState() === this.WS_OPEN ) {
this.sendRetryCount = 0 this.sendRetryCount = 0
this.ws.send(data) this.ws.send(data)
@ -512,7 +542,7 @@ class TanexPrinterSdk {
// this.ws.ping(); // this.ws.ping();
this.ws.send(0x9); this.ws.send(0x9);
} }
}, 10000); }, 1000);
} }
} }

View File

@ -11,15 +11,28 @@
<div v-if="printerStatus==1" style="display: inline-flex;"> <div v-if="printerStatus==1" style="display: inline-flex;">
<div style="font-size: 12px; line-height: 28px;font-weight: 600;">模板:</div> <div style="font-size: 12px; line-height: 28px;font-weight: 600;">模板:</div>
<div> <div>
<el-select v-model="selTplName" size="mini" placeholder="选择打印模板" clearable filterable> <el-select v-model="selTplCode" size="mini" placeholder="选择打印模板" clearable filterable>
<template slot="prefix">
<span style="padding: 5px;line-height: 28px;font-size: 16px;color: rgb(111 111 111);cursor: pointer;" @click="refreshPrintTpl()">
<i class="el-icon-refresh"></i>
</span>
</template>
<el-option <el-option
v-for="item in printTplList" v-for="item in printTplList"
:key="item.value" :key="item.tplCode"
:label="item.label" :label="item.tplName"
:value="item.value" :value="item.tplCode"
/> />
</el-select> </el-select>
</div> </div>
<div v-if="selTplCode=='TAN-GC-130'" class="subBillRange" style="display: inline-flex;font-size: 12px; line-height: 28px; font-weight: 600;">
<span >子单:
<el-input size="mini" style="width:40px" v-model="subBillStart" type="text" maxlength="4" ></el-input>
-
<el-input size="mini" style="width:40px" v-model="subBillEnd" type="text" maxlength="4" ></el-input>
</span>
</div>
<div style="font-size: 12px;line-height: 28px;font-weight: 600;">打印机:</div> <div style="font-size: 12px;line-height: 28px;font-weight: 600;">打印机:</div>
<div> <div>
<el-select v-model="selPrinterName" size="mini" placeholder="打印机" clearable filterable> <el-select v-model="selPrinterName" size="mini" placeholder="打印机" clearable filterable>
@ -40,10 +53,10 @@
</div> </div>
</div> </div>
<el-dialog class="printPreDialog" title="预览" :visible.sync="openPdfView" width="70%" :close-on-click-modal="false" v-dialogDrag append-to-body> <el-dialog class="printPreDialog" title="预览" :visible.sync="openPdfView" width="95%" :close-on-click-modal="false" v-dialogDrag append-to-body>
<div style="height: 800px;width:100%;overflow: auto;"> <div style="height: 1600px;width:100%;overflow: auto;">
<PdfViewer :pdfUrl="pdfUrl" style="width:100%" @onPrint="batchPrint" ></PdfViewer> <PdfViewer :pdfUrl="pdfUrl" style="width:100%" @onPrint="batchPrint" ></PdfViewer>
</div> </div>
</el-dialog> </el-dialog>
</div> </div>
@ -74,7 +87,8 @@
data() { data() {
return { return {
svalue: this.value, svalue: this.value,
subBillStart:1,
subBillEnd:1,
openPdfView:false, openPdfView:false,
pdfUrl:null, pdfUrl:null,
@ -89,7 +103,7 @@
printerList:[], printerList:[],
printTplList:[], printTplList:[],
selTplName:null, selTplCode:null,
selPrinterName:null, selPrinterName:null,
currentSelection:[], currentSelection:[],
@ -148,26 +162,74 @@
}, },
onGetPrintTpl(msg){ onGetPrintTpl(msg){
// console.log("onGetPrintTpl") // console.log("onGetPrintTpl")
this.printTplList=[];
this.printTplList=this.tanexPrinter.getPrintTplList(); this.printTplList=this.tanexPrinter.getPrintTplList();
this.selTplName=this.printTplList[0].value; // console.log(this.printTplList)
this.selTplCode=this.printTplList[0].tplCode;
},
refreshPrintTpl(){
this.printTplList=[];
this.selTplCode=null;
this.tanexPrinter.refreshPrintTpl()
},
lpadZero(val,len) {
return (new Array(len + 1).join('0') + val).slice(-len);
}, },
batchPrint(orderList){ batchPrint(orderList){
let that = this; let that = this;
let newOrderList=[];
if(orderList){ if(orderList){
this.orderList=[...orderList] this.orderList=[...orderList]
} }
this.tanexPrinter.batchPrint(that.selTplName,that.selPrinterName,that.orderList) // 打印子单
if(this.selTplCode=="TAN-GC-130"){
for(let i=0;i<this.orderList.length;i++){
let billCode=this.orderList[i];
// 循环子单范围
for(let i=this.subBillStart;i<=this.subBillEnd;i++){
let subBillCode = billCode+""+this.lpadZero(i,4);
newOrderList.push(subBillCode);
}
}
}else{
newOrderList=[...orderList];
}
that.tanexPrinter.batchPrint(that.selTplCode,that.selPrinterName,newOrderList)
}, },
printPreview(orderList){ printPreview(orderList){
let that =this; let that = this;
let newOrderList=[];
if(orderList){ if(orderList){
this.orderList=[...orderList] this.orderList=[...orderList]
} }
// 打印子单
if(this.selTplCode=="TAN-GC-130"){
for(let i=0;i<this.orderList.length;i++){
let billCode=this.orderList[i];
// 循环子单范围
for(let i=this.subBillStart;i<=this.subBillEnd;i++){
let subBillCode = billCode+""+this.lpadZero(i,4);
newOrderList.push(subBillCode);
}
}
}else{
newOrderList=[...orderList];
}
const loadingInstance = this.$loading({ const loadingInstance = this.$loading({
text: '正在生成预览...' text: '正在生成预览...'
}) })
this.tanexPrinter.batchGetPDF(this.selTplName,this.selPrinterName,this.orderList,function(pdfList,success,erroMsg){
this.tanexPrinter.batchGetPDF(this.selTplCode,this.selPrinterName,newOrderList,function(pdfList,success,erroMsg){
// console.log(erroMsg); // console.log(erroMsg);
if(success){ if(success){
const pdfDataList=[...pdfList]; const pdfDataList=[...pdfList];
@ -179,7 +241,7 @@
that.openPdfView = true; that.openPdfView = true;
}) })
.catch(error => { .catch(error => {
console.log(error) // console.log(error)
that.$modal.msgError("打印出错:"+erroMsg); that.$modal.msgError("打印出错:"+erroMsg);
}); });
}else{ }else{
@ -188,15 +250,30 @@
}); });
}, },
downPDF(orderList){ downPDF(orderList){
let that =this; let that = this;
let newOrderList=[];
if(orderList){ if(orderList){
this.orderList=[...orderList] this.orderList=[...orderList]
} }
// 打印子单
if(this.selTplCode=="TAN-GC-130"){
for(let i=0;i<this.orderList.length;i++){
let billCode=this.orderList[i];
// 循环子单范围
for(let i=this.subBillStart;i<=this.subBillEnd;i++){
let subBillCode = billCode+""+this.lpadZero(i,4);
newOrderList.push(subBillCode);
}
}
}else{
newOrderList=[...orderList];
}
const loadingInstance = this.$loading({ const loadingInstance = this.$loading({
text: '正在下载...' text: '正在下载...'
}) })
this.tanexPrinter.batchGetPDF(this.selTplName,this.selPrinterName,orderList,function(pdfList,success,erroMsg){ this.tanexPrinter.batchGetPDF(this.selTplCode,this.selPrinterName,newOrderList,function(pdfList,success,erroMsg){
loadingInstance.close(); loadingInstance.close();
if(success){ if(success){
const pdfDataList=[...pdfList]; const pdfDataList=[...pdfList];
@ -205,7 +282,7 @@
}else{ }else{
that.$modal.msgError("下载出错:"+erroMsg); that.$modal.msgError("下载出错:"+erroMsg);
} }
}); });
}, },
} }
@ -218,5 +295,10 @@
margin: 0px!important; margin: 0px!important;
} }
.subBillRange .el-input__inner {
padding:0px;
text-align: center;
}
</style> </style>

View File

@ -1,6 +1,6 @@
<template> <template>
<div class="app-container"> <XdPageContainer class="app-container">
<SearchForm :model="queryParams" ref="queryForm" size="mini" :maxShow="8" label-width="100px" v-show="showSearch" @search="handleQuery" @reset="resetQuery"> <SearchForm slot="pageHeader" :model="queryParams" ref="queryForm" size="mini" :maxShow="8" label-width="100px" v-show="showSearch" @search="handleQuery" @reset="resetQuery">
<el-form-item label="" prop="billCode"> <el-form-item label="" prop="billCode">
<div slot="label"> <div slot="label">
<el-radio-group class="query-label" v-model="queryOrderType"> <el-radio-group class="query-label" v-model="queryOrderType">
@ -197,7 +197,12 @@
</SearchForm> </SearchForm>
<XdTable v-loading="loading" <XdTable
slot="pageContent"
slot-scope="slotProps"
:height="(slotProps.contentHeight)+'px'"
v-loading="loading"
border stripe border stripe
size="small" size="small"
:data="emisWaybillList" :data="emisWaybillList"
@ -207,7 +212,6 @@
@queryTable="getList" @queryTable="getList"
@selection-change="handleSelectionChange" @selection-change="handleSelectionChange"
@sort-change="handleSortChange" @sort-change="handleSortChange"
v-if="tableHeight" :max-height="tableHeight + 'px'"
> >
<div slot="toolbar"> <div slot="toolbar">
@ -472,7 +476,7 @@
--> -->
</div> </XdPageContainer>
</template> </template>
<script> <script>
@ -741,14 +745,6 @@ export default {
this.getList(); this.getList();
this.queryOrderType="1"; this.queryOrderType="1";
// this.initTanexPrinterSdk();
// 调整表格的高度,不允许滚动
this.$nextTick(function() {
let queryFormEl = this.$refs.queryForm.$el;
let tableH = queryFormEl.offsetHeight+190;
this.tableHeight = window.innerHeight - tableH;
});
}, },
methods: { methods: {

View File

@ -189,7 +189,9 @@
<script> <script>
import { addEmisWaybillProblemInfo,listEmisWaybillProblemInfo } from "@/api/emis/emisWaybillProblemInfo"; import { addEmisWaybillProblemInfo,listEmisWaybillProblemInfo } from "@/api/emis/emisWaybillProblemInfo";
import { doScan } from "@/api/emis/emisTmsScanRecord"; import { doScan } from "@/api/emis/emisTmsScanRecord";
import { listEmisWaybill } from "@/api/emis/emisWaybill"; // import { listEmisWaybill } from "@/api/emis/emisWaybill";
import { getWaybillDetail } from "@/api/emis/emisWaybill";
import EmisSiteSimplePicker from '@/views/emis/EmisBaseTools/EmisSiteSimplePicker.vue'; import EmisSiteSimplePicker from '@/views/emis/EmisBaseTools/EmisSiteSimplePicker.vue';
import ProblemTypePicker from '@/views/emis/EmisBaseTools/ProblemTypePicker.vue'; import ProblemTypePicker from '@/views/emis/EmisBaseTools/ProblemTypePicker.vue';
@ -343,15 +345,15 @@ export default {
this.$message.error("输入单号后回车"); this.$message.error("输入单号后回车");
return; return;
} }
if(this.form.notifySite==null || this.form.notifySite==''){ // if(this.form.notifySite==null || this.form.notifySite==''){
this.$message.error("请选择通知网点"); // this.$message.error("请选择通知网点");
return; // return;
} // }
if(this.form.problemType==null || this.form.problemType==''){ // if(this.form.problemType==null || this.form.problemType==''){
this.$message.error("请选择问题类型"); // this.$message.error("请选择问题类型");
return; // return;
} // }
// if(this.dataMap[this.form.billCode]){ // if(this.dataMap[this.form.billCode]){
// this.$message.error("重复登记"); // this.$message.error("重复登记");