From b2fd5a9a9a42b5a4670b9272b4b43bceb59317f7 Mon Sep 17 00:00:00 2001 From: linfso Date: Tue, 2 Jul 2024 19:39:24 +0800 Subject: [PATCH] md --- .env.production | 1 - public/static/tpl/batch_import_order.xls | Bin 26112 -> 26112 bytes src/components/XdTable/index.vue | 9 ++- .../emis/EmisBaseTools/TanexPrinterPanel.vue | 64 ++++++++++++++---- .../emis/emisWaybill/sendWaybillList.vue | 2 + .../emis/emisWaybill/waybillIsPrinted.vue | 9 +-- 6 files changed, 62 insertions(+), 23 deletions(-) diff --git a/.env.production b/.env.production index 54b3ce71..e6bf2889 100644 --- a/.env.production +++ b/.env.production @@ -10,7 +10,6 @@ VUE_APP_VERSION = '20240520' VUE_APP_PDOMAIN = 'tanex56' VUE_APP_DATA_FROM = 'pc' VUE_APP_BASE_API = 'https://api.emis.tanex56.com/api/bizsvr' - VUE_APP_WS_HOST = 'wss://api.emis.tanex56.com/api/bizsvr' VUE_APP_PRINTER_HOST = '127.0.0.1:17080' diff --git a/public/static/tpl/batch_import_order.xls b/public/static/tpl/batch_import_order.xls index 3131571519c44b316d55b8d776dc74dd1219cd58..6f2c604735e1fba57afdf9886dcd8c96de7e9c5c 100644 GIT binary patch delta 1283 zcmaLXO-vI(6bJDCY+Kqw+ifXeP;7xhOGOk!{78!y!FFjav?U^u7`PBg(0K8n2Ll&x z8e>LHJP>1|2M;F3y^+X`8}XotCY~^nJ03|S`esGn zrCK{KfVMg|g+(mTeis9Hh#=naz0^&X<_qcT{wSjO1H)0I%)Ggo?qhBZEb%y9GIxi= z8q0HkW=Oj;!CzEL=CjN_Z7zaw?-(>V@c=%mZpTcp>JD_GGf;I5F>Hma?m`!!SKWM;mqgbEn%TF>8u=>*J{DjI3l1?gxNc~EUqyeQc>6B6vX;7(| zbh=Hkg*c>ih;)Xtd@^xX#o8!#j`RtQbhAfE$gE`Oh@FcOel4FENU7XTYON|pN>kf9 zy#q$i+CZ6}@j5E}b-vh;M`d4d@K=RGjh(_?)y`K7#TxxC)YiIfwH}+jw!TJ+wbc!_ zY@f}3TlLe4+G^dF9ke-QtNuAz9K3=ly6f*WDSr5XMfSz1aX7!jb3BJe0}V^zXKikg-OR8C399~Y>;hDG#D($!>JKAY|W##>hP zZvH9T#NzyWwlmYC!i+vFi(VP71%r!}gR9`0D59(x)bXY4yI-*ri8q#VYCAGq&VXa2e(RR%y;xVlQq!AvTO$;8_wRWnV zAl)^@$3{p$tmPf zZG1aFuXAo&&ST5%%vEzm|@NQL9r*` zqS+8R7oCv^uM}T7#rEV2%bon$QlIg(#Pg|w6)XK@n`4yRpEF<*<4Okonh@Jwv^k_s zE4idnN^U8dYnk*&O)Aw$ol){iO(}`}W@5UeSSLB7#*Gu4s+ diff --git a/src/components/XdTable/index.vue b/src/components/XdTable/index.vue index 79232548..e7a439cd 100644 --- a/src/components/XdTable/index.vue +++ b/src/components/XdTable/index.vue @@ -545,7 +545,7 @@ export default { key: '' }, tableData:[], - + dropCol:[], isDragging: false, startRowIndex: -1, @@ -838,14 +838,13 @@ export default { getTablePosition() { return this.tableDom.getBoundingClientRect(); }, - /** - * 列拖拽 - */ + // 列拖拽 columnDrop() { const _this = this; var xdTableObj = document.getElementById(this.tableId); // var tbHeader1=xdTableObj.getElementsByClassName("el-table__body-wrapper")[0]; const wrapperTr = xdTableObj.querySelector('.el-table__header-wrapper tr'); + console.log("===>columnDrop==>",wrapperTr) this.sortable = Sortable.create(wrapperTr, { animation: 180, delay: 0, @@ -856,7 +855,7 @@ export default { this.newCol=evt.newIndex-1 _this.dropCol.splice(evt.oldIndex- empty, 1); _this.dropCol.splice(evt.newIndex- empty, 0, oldItem); - console.log(_this.dropCol) + console.log("===>columnDrop==>",_this.dropCol) } }); }, diff --git a/src/views/emis/EmisBaseTools/TanexPrinterPanel.vue b/src/views/emis/EmisBaseTools/TanexPrinterPanel.vue index 3b9cf9f4..10adca1a 100644 --- a/src/views/emis/EmisBaseTools/TanexPrinterPanel.vue +++ b/src/views/emis/EmisBaseTools/TanexPrinterPanel.vue @@ -116,6 +116,8 @@ subBillEnd:null, openPdfView:false, + orderDetailMap:new Map(), + isInitA4:false, printManCode:this.$store.getters.empCode, @@ -259,7 +261,7 @@ this.tanexPrinter.batchPrintAdv(printDataList,this.printManCode); }, - batchPrint(orderList,tplCode){ + batchPrint(orderList,tplCode,orderDetailList){ if(this.printerStatus !=1){ this.$modal.msgError("打印机未连接"); @@ -267,6 +269,13 @@ } this.isInitA4=false; + this.orderDetailMap=new Map(); + if(orderDetailList){ + orderDetailList.map(v=>{ + this.orderDetailMap[v.billCode]=v; + }); + } + let that = this; let newOrderList=[]; if(orderList){ @@ -286,13 +295,16 @@ subBillStart=this.subBillStart; } - let subBillEnd=50; - if(this.subBillEnd){ - subBillEnd = this.subBillEnd; + let billDetail = this.orderDetailMap[billCode]; + + let subBillEnd=parseInt(billDetail.parcelQty); + if(this.subBillEnd&&this.subBillEnd!=''){ + subBillEnd = parseInt(this.subBillEnd)<=parseInt(billDetail.parcelQty)?parseInt(this.subBillEnd):parseInt(billDetail.parcelQty); } + // 循环子单范围 for(let i=subBillStart;i<=subBillEnd;i++){ - let subBillCode = billCode+""+this.lpadZero(i,4); + let subBillCode = billCode+""+this.lpadZero(i,4); newOrderList.push(subBillCode); } @@ -301,8 +313,8 @@ newOrderList=[...orderList]; } - console.log("tnprint===>",newOrderList); - console.log("tnprint===>",that.selTplCode); + // console.log("tnprint===>",newOrderList); + // console.log("tnprint===>",that.selTplCode); that.tanexPrinter.batchPrint(that.selTplCode,that.selPrinterName,newOrderList,this.printManCode) }, @@ -356,13 +368,23 @@ }); }, - printPreview(orderList,isA4,tplCode){ + printPreview(orderList,isA4,tplCode,orderDetailList){ this.refreshKey(); if(this.printerStatus !=1){ this.$modal.msgError("打印机未连接"); return; } + + this.orderDetailMap=new Map(); + if(orderDetailList){ + orderDetailList.map(v=>{ + this.orderDetailMap[v.billCode]=v; + }); + } + + // console.log("====>orderDetailMap==>",this.orderDetailMap); + if(tplCode){ this.selTplCode=tplCode; } @@ -377,6 +399,8 @@ this.orderList=[...orderList] } + + // 打印子单 if(this.selTplCode=="TAN-GC-130"){ for(let i=0;ibillDetail==>",billDetail); + + let subBillEnd=parseInt(billDetail.parcelQty); if(this.subBillEnd){ - subBillEnd = this.subBillEnd; + subBillEnd = parseInt(this.subBillEnd)<=parseInt(billDetail.parcelQty)?parseInt(this.subBillEnd):parseInt(billDetail.parcelQty); } + // 循环子单范围 for(let i=subBillStart;i<=subBillEnd;i++){ let subBillCode = billCode+""+this.lpadZero(i,4); @@ -439,13 +467,20 @@ } }); }, - downPDF(orderList,isA4,tplCode){ + downPDF(orderList,isA4,tplCode,orderDetailList){ if(this.printerStatus !=1){ this.$modal.msgError("打印机未连接"); return; } + this.orderDetailMap=new Map(); + if(orderDetailList){ + orderDetailList.map(v=>{ + this.orderDetailMap[v.billCode]=v; + }); + } + if(tplCode){ this.selTplCode=tplCode; } @@ -470,9 +505,12 @@ subBillStart=this.subBillStart; } - let subBillEnd=50; + let billDetail = this.orderDetailMap[billCode]; + // console.log("====>billDetail==>",billDetail); + + let subBillEnd=parseInt(billDetail.parcelQty); if(this.subBillEnd){ - subBillEnd = this.subBillEnd; + subBillEnd = parseInt(this.subBillEnd)<=parseInt(billDetail.parcelQty)?parseInt(this.subBillEnd):parseInt(billDetail.parcelQty); } for(let i=subBillStart;i<=subBillEnd;i++){ diff --git a/src/views/emis/emisWaybill/sendWaybillList.vue b/src/views/emis/emisWaybill/sendWaybillList.vue index 520e2e01..20d1f6d8 100644 --- a/src/views/emis/emisWaybill/sendWaybillList.vue +++ b/src/views/emis/emisWaybill/sendWaybillList.vue @@ -300,6 +300,8 @@ :height="(slotProps.contentHeight)+'px'" ref="refTable" + + row-key="id" storageName="sendWaybillList_main_240702" v-loading="loading" border diff --git a/src/views/emis/emisWaybill/waybillIsPrinted.vue b/src/views/emis/emisWaybill/waybillIsPrinted.vue index 0d6767ca..728469a6 100644 --- a/src/views/emis/emisWaybill/waybillIsPrinted.vue +++ b/src/views/emis/emisWaybill/waybillIsPrinted.vue @@ -461,8 +461,8 @@ export default { orderList.push(item.billCode); }); - - this.$refs.tanexPrinter.batchPrint(orderList,null,false); + // batchPrint(orderList,tplCode,orderDetailList) + this.$refs.tanexPrinter.batchPrint(orderList,null,this.currentSelection); }).catch(() => {}); }, @@ -471,14 +471,15 @@ export default { this.currentSelection.forEach(item=>{ orderList.push(item.billCode); }); - this.$refs.tanexPrinter.printPreview(orderList,false); + // printPreview(orderList,isA4,tplCode,orderDetailList) + this.$refs.tanexPrinter.printPreview(orderList,false,null,this.currentSelection); }, handleDownPDF(){ let orderList=[]; this.currentSelection.forEach(item=>{ orderList.push(item.billCode); }); - this.$refs.tanexPrinter.downPDF(orderList,false); + this.$refs.tanexPrinter.downPDF(orderList,false,null,this.currentSelection); }, /** 查询运单列表列表 */ getList() {