From 8fb3ee9eae369f7a5c39da8ed69d0e8cea3ae2f8 Mon Sep 17 00:00:00 2001
From: chenlu <1320612696@qq.com>
Date: 星期三, 24 十二月 2025 16:24:59 +0800
Subject: [PATCH] 生产加工单上显示图纸和图纸尺寸调整功能,流程卡上图纸尺寸调整功能

---
 north-glass-erp/northglass-erp/src/components/pp/PrintProcess.vue |   44 ++++++++++++++++++++++++++++++--------------
 1 files changed, 30 insertions(+), 14 deletions(-)

diff --git a/north-glass-erp/northglass-erp/src/components/pp/PrintProcess.vue b/north-glass-erp/northglass-erp/src/components/pp/PrintProcess.vue
index 64a6757..876be06 100644
--- a/north-glass-erp/northglass-erp/src/components/pp/PrintProcess.vue
+++ b/north-glass-erp/northglass-erp/src/components/pp/PrintProcess.vue
@@ -11,6 +11,7 @@
 import companyInfo from "@/stores/sd/companyInfo";
 import userInfo from "@/stores/userInfo"
 import {add} from '@/utils/decimal'
+import ImageSizeEditor from '@/components/ImageSizeEditor.vue'
 //璇█鑾峰彇
 const company = companyInfo()
 const {t} = useI18n()
@@ -19,6 +20,7 @@
 let list = ref()
 const details = ref([])
 const user=userInfo()
+const imgSizeMap = ref({})
 
 let totalQuantity = 0;  // 鐢ㄤ簬璁板綍鎬绘暟閲�
 let totalArea = 0;      // 鐢ㄤ簬璁板綍鎬婚潰绉�
@@ -170,13 +172,15 @@
       totalArea = add(totalArea, collection.total_area)
       //鏍规嵁鏈夊嚑灞傝绠楅噸閲�
       for (let j = 0; j < produceList.value[i].detail.length; j++) {
-        if (produceList.value[i].detail[j].technologyNumber.length>1){
-          totalWeight += collection.weight * collection.quantity  * 1;
-
+       let ceng = produceList.value[i].detail[j].technologyNumber.length
+        if (produceList.value[i].processName!=""){
+          for (let k = 0; k < produceList.value[i].detail[j].technologyNumber.length; k++) {
+            totalWeight += collection.width * collection.height * collection.quantity / 1000000 * collection.separation * 2.5 * 1;
+          }
         }else {
           totalWeight += collection.width * collection.height * collection.quantity / 1000000 * collection.separation * 2.5 * 1;
-
         }
+
       }
 
       //姣忎釜搴忓彿鍛ㄩ暱
@@ -317,7 +321,7 @@
   <!--  <el-button id="printButton" @click="printFlowCard();">{{ $t('basicData.print') }}</el-button>-->
   <div id="printFlowCard">
 <div id="contentDiv" v-for="(item,id) in produceList" :key="id">
-  <table  id="contentTable"  style="border-bottom: none">
+  <table  id="contentTable"  style="border-bottom: none;margin-bottom: 20px">
     <thead>
     <tr v-for="(itemFlow,index) in item.detail" :key="index">
       <td  colspan="31">
@@ -326,7 +330,7 @@
         <div id="bj" v-else style="float: right;font-size: 28px"></div>
         <div>{{ company.companyName }}</div>
         <div>
-          鐢熶骇娴佺▼鍗�<span style="font-weight: bold" v-if="printProject!=null">({{ printProject }})</span>
+          ({{itemFlow.order_type}})鐢熶骇娴佺▼鍗�<span style="font-weight: bold" v-if="printProject!=null">({{ printProject }})</span>
           <span style="font-weight: bold" v-if="props.compound!=null">({{ props.compound }}灞傚悓鏋�)</span>
         </div>
         <div  style="font-weight: bolder;display: flex;justify-content:space-between">
@@ -367,7 +371,8 @@
       <td v-if="name=='澶╂触鍖楃幓鐜荤拑宸ヤ笟鎶�鏈湁闄愬叕鍙革紙TJBB-QR7.1-01锛�'"  colspan="4">{{ itemTr.other_remarks }}</td>
       <td v-else colspan="4">{{ itemTr.edging_type }}</td>
       <td class="tdNowrap">鍗曠墖鍚嶇О锛�</td>
-      <td colspan="3">{{ itemTr.glass_child }}</td>
+      <td v-if="!company.processFontSize" colspan="3">{{ itemTr.glass_child }}</td>
+      <td v-else colspan="3" style="font-size: 18px;">{{ itemTr.glass_child }}</td>
       <td class="tdNowrap">浜у搧鍚嶇О锛�</td>
 
       <td v-if="!company.processFontSize" :colspan="2+item.processList.length*2">{{ itemTr.product_name }}</td>
@@ -503,12 +508,20 @@
       </tr>
       </tfoot>
     </table>
-  <el-image
-      v-for="(img, index) in getPicturesByDetailList(item.detailList)"
-      :key="index"
-      :src="img.imageBase64"
-      fit="contain"
-      style="max-width: 100%;"
+<!--  <el-image-->
+<!--      v-for="(img, index) in getPicturesByDetailList(item.detailList)"-->
+<!--      :key="index"-->
+<!--      :src="img.imageBase64"-->
+<!--      fit="contain"-->
+<!--      style="max-width: 100%;margin: 50px"-->
+<!--  />-->
+  <ImageSizeEditor
+      :images="getPicturesByDetailList(item.detailList)"
+      v-model:sizeMap="imgSizeMap"
+      key-field="orderNumber"
+      src-field="imageBase64"
+      :default-width="300"
+      :default-height="300"
   />
   </div>
   </div>
@@ -595,7 +608,10 @@
 
   @page {
     size: auto;  /* auto is the initial value */
-    margin: 4mm 5mm 10mm 5mm  /* this affects the margin in the printer settings */
+    margin: 4mm 5mm 10mm 5mm;  /* this affects the margin in the printer settings */
+    @top-right {
+      content: none !important;
+    }
 
   }
 

--
Gitblit v1.8.0