Ver Fonte

bug 修复

lilei há 3 anos atrás
pai
commit
e8fed59ed7

+ 3 - 3
src/libs/JGPrint.js

@@ -22,9 +22,9 @@ export const JGPrintTag = function (html, width, height, data) {
   LODOP.SET_SHOW_MODE('HIDE_PAPER_BOARD', 1) //  隐藏底图上有模拟走纸板的条纹线
   LODOP.SET_PRINT_MODE('POS_BASEON_PAPER', true) // 可使输出以纸张边缘为基点
   LODOP.ADD_PRINT_HTM(0, 0, '100%', '100%', html)
-  // LODOP.ADD_PRINT_BARCODE('36%','65%',90,90,"QRCode",data.qrCodeContent)
-  // LODOP.SET_PRINT_STYLEA(0,"QRCodeVersion",5)
-  // LODOP.SET_PRINT_STYLEA(0,"QRCodeErrorLevel",'L')
+  LODOP.ADD_PRINT_BARCODE('36%','65%',90,90,"QRCode",data.qrCodeContent)
+  LODOP.SET_PRINT_STYLEA(0,"QRCodeVersion",5)
+  LODOP.SET_PRINT_STYLEA(0,"QRCodeErrorLevel",'L')
   LODOP.SET_PRINT_COPIES(data.printQty)// 指定份数
   LODOP.SET_PRINT_PAGESIZE(1, width, height)
   LODOP.PRINT()

+ 5 - 3
src/views/numsGoodsShelves/replenishmentManagement/printView.vue

@@ -33,7 +33,7 @@
           <div style="float: right;width: 34%;">
             <div class="productSno" style="font-size: 15pt;text-align: center;">{{ item.shelfPlaceCode }}</div>
             <div class="qrcode" ref="qrCodeUrl" style="text-align: center;">
-              <vue-qr :text="`${item.shelfSn}&${item.productCode}`" :margin="0" :size="70"></vue-qr>
+              <vue-qr :text="`${item.shelfSn}&${item.productCode}&${item.productSn}&${item.shelfPlaceSn}`" :margin="0" :size="70"></vue-qr>
             </div>
           </div>
         </div>
@@ -76,9 +76,11 @@ export default {
       const printBox = document.querySelectorAll('.print-pages')
       console.log(printBox)
       for (let i = 0; i < printBox.length; i++) {
-        const htmlStr = printBox[i].outerHTML
+        // const htmlStr = printBox[i].outerHTML
+        const htmlStr = printBox[i].outerHTML.replace(/<\s?img[^>]*>/gi, '')
         const item = this.list[i]
-        this.list[i].qrCodeContent = `${item.shelfSn}&${item.productCode}`
+        // `dealerSn=${nowData.dealerSn}&shelfSn=${item.shelfSn}&productSn=${item.productSn}&productCode=${item.productCode}&shelfPlaceCode=${item.shelfPlaceCode}&shelfPlaceSn=${item.shelfPlaceSn}&replenishBillDetailSn=${item.replenishBillDetailSn}`
+        this.list[i].qrCodeContent = `${item.shelfSn}&${item.productCode}&${item.productSn}&${item.shelfPlaceSn}`
         JGPrintTag(htmlStr, '60mm', '40mm', this.list[i])
       }
     },