From b0d4df5f39525ae7fe252e8ee65d85fd71dca721 Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期四, 07 五月 2026 14:53:32 +0800
Subject: [PATCH] 手动下单:检验中订单撤销报错问题修复

---
 src/views/business/materialOrderComponents/materialOrder/printDialog.vue |   24 +++++++++---------------
 1 files changed, 9 insertions(+), 15 deletions(-)

diff --git a/src/views/business/materialOrderComponents/materialOrder/printDialog.vue b/src/views/business/materialOrderComponents/materialOrder/printDialog.vue
index 9889033..58a72ce 100644
--- a/src/views/business/materialOrderComponents/materialOrder/printDialog.vue
+++ b/src/views/business/materialOrderComponents/materialOrder/printDialog.vue
@@ -47,7 +47,7 @@
                   </div>
                   <div style="font-weight: bold;display: flex;align-items: center;">
                     <span class="full-title">鏍峰搧鐘舵��</span>:
-                    <el-radio-group v-model="item.labelStatus" style="margin-top: 7px;margin-left: 4px;" v-removeAriaHidden>
+                    <el-radio-group v-model="item.labelStatus" style="margin-top: 7px;margin-left: 4px;">
                       <el-radio label="0" style="font-weight: bold;margin-right: 7px;">寰呮</el-radio>
                       <el-radio label="1" style="font-weight: bold;margin-right: 7px;">鍦ㄦ</el-radio>
                       <el-radio label="2" style="font-weight: bold;margin-right: 7px;">宸叉</el-radio>
@@ -77,7 +77,7 @@
           <div>
             <div class="titleH1" style="text-align: center;margin-bottom: 1px">妫�娴嬩腑蹇冩牱鍝佹爣璇嗗崱</div>
             <div style="text-align: center;">
-              <barcode :value="item.barcode" :height="22" :width="1.6" :displayValue="false"></barcode>
+              <barcode :margin="1" :value="item.barcode" :height="22" :width="1.6" :displayValue="false"></barcode>
             </div>
             <div style="margin-left: 12px;text-align: left">
               <div class="item">
@@ -127,6 +127,8 @@
 
 <script>
 import PrintJS from "print-js";
+import {printLabel} from "@/api/business/rawMaterialOrder";
+import {stringToBase64} from '@/utils/base64Util'
 
 export default {
   name: "printDialog",
@@ -161,20 +163,13 @@
         selection.map(m=> {
           ids.push(m.id)
         })
-        this.$axios.post(this.$api.materialInspection.printLabel,{
-          ids: ids
-        },{
-          headers: {
-            'Content-Type': 'application/json'
-          },
-          noQs:true
-        }).then(res => {
+        printLabel({ids: ids}).then(res => {
           if (res.code === 200 && res.data.length > 0) {
             res.data.forEach(item => {
               console.log('item---', item)
               item.sendTime = item.sendTime && item.sendTime.substring(0, 10)
               item.sampleNumber = item.qtyArrived + item.buyUnitMeas
-              this.$set(item, 'barcode', item.entrustCode)
+              this.$set(item, 'barcode', item.entrustCode+","+stringToBase64(item.color))
               this.$set(item, 'isLeave', item.labelStatus === '2')
             })
             this.barcodeData = res.data
@@ -230,7 +225,7 @@
         targetStyles: ["*"], // 浣跨敤dom鐨勬墍鏈夋牱寮忥紝寰堥噸瑕�
         printable: 'printOrder',//椤甸潰
         type: "html",//鏂囨。绫诲瀷
-        maxWidth:360,
+        maxWidth:440,
         header: '',
         style:
           `@page {
@@ -239,14 +234,13 @@
             margin-top: 0.4cm;
             margin-bottom: 0.4cm;
             padding-bottom: 0px;
-            size: 400px 75px collapse;
+            size: 440px 75px collapse;
           }
           html{
             zoom:100%;
-
           }
           @media print{
-            width: 400px;
+            width: 440px;
             height: 75px;
             margin:0;
           }`,

--
Gitblit v1.9.3