695593266@qq.com пре 1 месец
родитељ
комит
7b97d299e4

+ 1 - 3
src/views/batchRecord/index.vue

@@ -480,9 +480,7 @@
           this.productBody.param = productCode;
           this.productBody.pageNum = 1;
           await this.getAllProductInWorkOrder();
-          product = this.productList.find(
-            (p) => p.productCode === productCode
-          );
+          product = this.productList.find((p) => p.productCode === productCode);
         }
         if (!product) {
           this.$message.warning(`未找到产品:${productCode}`);

+ 130 - 102
src/views/produceOrder/printFlowCard.vue

@@ -12,46 +12,57 @@
         v-for="(card, cIndex) in printList"
         :key="cIndex"
       >
-        <div class="flow-card-title">工&nbsp;&nbsp;序&nbsp;&nbsp;流&nbsp;&nbsp;转&nbsp;&nbsp;卡</div>
-
-        <table class="flow-card-header">
-          <tr>
-            <td class="label">产&nbsp;&nbsp;品&nbsp;&nbsp;代&nbsp;&nbsp;号</td>
-            <td class="value">{{ card.topCategoryCode }}</td>
-            <td class="label">产&nbsp;&nbsp;品&nbsp;&nbsp;名&nbsp;&nbsp;称</td>
-            <td class="value">{{ card.topCategoryName }}</td>
-          </tr>
-          <tr>
-            <td class="label">零(部)件代号</td>
-            <td class="value">{{ card.productCode }}</td>
-            <td class="label">零(部)件名称</td>
-            <td class="value">{{ card.productName }}</td>
-          </tr>
-          <tr>
-            <td class="label">产品批号(编号)</td>
-            <td class="value">{{ card.batchNo }}</td>
-            <td class="label">原材料本厂合格证号</td>
-            <td class="value">{{ card.materialFactoryCertNo }}</td>
-          </tr>
-          <tr>
-            <td class="label">原材料炉(批)号</td>
-            <td class="value">{{ card.materialFurnaceNo }}</td>
-            <td class="label">半成品合格证号</td>
-            <td class="value">{{ card.semiProductCertNo }}</td>
-          </tr>
-        </table>
-
         <table class="flow-card-detail">
+          <colgroup>
+            <col style="width: 7%" />
+            <col style="width: 17%" />
+            <col style="width: 8%" />
+            <col style="width: 10%" />
+            <col style="width: 8%" />
+            <col style="width: 12%" />
+            <col style="width: 12%" />
+            <col style="width: 13%" />
+            <col style="width: 13%" />
+          </colgroup>
           <thead>
+            <tr class="title-row">
+              <th colspan="9" class="title-cell">
+                <div class="flow-card-title">工序流转卡</div>
+              </th>
+            </tr>
+            <tr class="info-row">
+              <td colspan="2" class="label">产品代号</td>
+              <td colspan="3" class="value">{{ card.topCategoryCode }}</td>
+              <td colspan="2" class="label">产品名称</td>
+              <td colspan="2" class="value">{{ card.topCategoryName }}</td>
+            </tr>
+            <tr class="info-row">
+              <td colspan="2" class="label">零(部)件代号</td>
+              <td colspan="3" class="value">{{ card.productCode }}</td>
+              <td colspan="2" class="label">零(部)件名称</td>
+              <td colspan="2" class="value">{{ card.productName }}</td>
+            </tr>
+            <tr class="info-row">
+              <td colspan="2" class="label">产品批号(编号)</td>
+              <td colspan="3" class="value">{{ card.batchNo }}</td>
+              <td colspan="2" class="label">原材料本厂合格证号</td>
+              <td colspan="2" class="value">{{ card.materialFactoryCertNo }}</td>
+            </tr>
+            <tr class="info-row">
+              <td colspan="2" class="label">原材料炉(批)号</td>
+              <td colspan="3" class="value">{{ card.materialFurnaceNo }}</td>
+              <td colspan="2" class="label">半成品合格证号</td>
+              <td colspan="2" class="value">{{ card.semiProductCertNo }}</td>
+            </tr>
             <tr>
               <th rowspan="2" class="col-no">工<br />序<br />号</th>
               <th rowspan="2" class="col-name">工序名称</th>
               <th rowspan="2" class="col-num">转<br />入<br />数</th>
               <th rowspan="2" class="col-leader">工序负<br />责人</th>
               <th rowspan="2" class="col-num">转<br />出<br />数</th>
-              <th colspan="2" class="col-bad">不&nbsp;&nbsp;合&nbsp;&nbsp;格&nbsp;&nbsp;数</th>
-              <th rowspan="2" class="col-date">日&nbsp;&nbsp;&nbsp;期</th>
-              <th rowspan="2" class="col-remark">备&nbsp;&nbsp;注</th>
+              <th colspan="2" class="col-bad">不合格数</th>
+              <th rowspan="2" class="col-date">日期</th>
+              <th rowspan="2" class="col-remark">备注</th>
             </tr>
             <tr>
               <th class="col-bad-sub">返工<br />品数</th>
@@ -138,6 +149,10 @@
         };
       },
       buildCard(row, taskList) {
+        const filtered = taskList.filter((item) => {
+          const name = item.taskTypeName || item.taskName || '';
+          return name !== '完结';
+        });
         return {
           topCategoryCode: row.topCategoryCode || '',
           topCategoryName: row.topCategoryName || '',
@@ -149,7 +164,7 @@
           semiProductCertNo: row.semiProductCertNo || '',
           issueDate: row.issueDate || '',
           recoverDate: row.recoverDate || '',
-          taskList: taskList.map((item, idx) => ({
+          taskList: filtered.map((item, idx) => ({
             taskNo: idx + 1,
             taskName: item.taskTypeName || item.taskName || ''
           }))
@@ -204,68 +219,73 @@
     print-color-adjust: exact;
   }
   .flow-card-page {
-    width: 190mm;
+    width: 100%;
     box-sizing: border-box;
     page-break-after: always;
   }
   .flow-card-page:last-child { page-break-after: auto; }
   .flow-card-title {
     text-align: center;
-    font-size: 28px;
+    font-size: 26px;
     font-weight: bold;
-    letter-spacing: 16px;
+    letter-spacing: 30px;
+    text-indent: 30px;
     text-decoration: underline;
-    margin: 0 0 8mm 0;
-    padding-top: 2mm;
+    margin: 0;
   }
   table {
-    width: 190mm;
+    width: 100%;
     border-collapse: collapse;
     table-layout: fixed;
   }
-  .flow-card-header td {
+  .flow-card-detail thead { display: table-header-group; }
+  .flow-card-detail tbody tr { page-break-inside: avoid; }
+
+  .flow-card-detail .title-cell {
+    border: none;
+    padding: 20mm 0 5mm 0;
+    text-align: center;
+    font-weight: normal;
+    height: auto;
+  }
+
+  .flow-card-detail .info-row td {
     border: 1px solid #000;
-    height: 11mm;
-    padding: 0 6px;
-    font-size: 16px;
+    height: 9mm;
+    padding: 0 3mm;
+    font-size: 15px;
     vertical-align: middle;
+    white-space: nowrap;
+    text-align: left;
+    font-weight: normal;
   }
-  .flow-card-header td.label {
-    width: 22%;
-    text-align: center;
-  }
-  .flow-card-header td.value { width: 28%; }
+  .flow-card-detail .info-row td.label { text-align: center; }
 
   .flow-card-detail th,
-  .flow-card-detail td {
+  .flow-card-detail tbody td {
     border: 1px solid #000;
     text-align: center;
     vertical-align: middle;
-    font-size: 14px;
+    font-size: 13px;
     padding: 1px 2px;
-    line-height: 1.3;
+    line-height: 1.2;
     white-space: nowrap;
   }
   .flow-card-detail th { font-weight: bold; }
-  .flow-card-detail thead th { height: 7mm; }
-  .flow-card-detail tbody td { height: 9mm; }
-
-  .col-no { width: 7%; }
-  .col-name { width: 17%; }
-  .col-num { width: 7%; }
-  .col-leader { width: 10%; }
-  .col-bad { width: 14%; }
-  .col-bad-sub { width: 7%; }
-  .col-date { width: 13%; }
-  .col-remark { width: 11%; }
+  .flow-card-detail thead th { height: 6mm; }
+  .flow-card-detail tbody td { height: 7mm; }
+  .flow-card-detail thead th.col-bad {
+    text-align: center;
+    letter-spacing: 4px;
+  }
 
   .flow-card-footer {
     display: flex;
-    justify-content: space-between;
-    margin-top: 6mm;
-    font-size: 16px;
+    justify-content: flex-start;
+    margin-top: 4mm;
+    font-size: 15px;
   }
-  .flow-card-footer .footer-item { width: 45%; }
+  .flow-card-footer .footer-item { width: 50%; }
 </style>
 </head>
 <body>
@@ -303,47 +323,59 @@ ${printSection.innerHTML}
 
   .flow-card-title {
     text-align: center;
-    font-size: 26pt;
+    font-size: 26px;
     font-weight: bold;
-    letter-spacing: 14px;
+    letter-spacing: 60px;
+    text-indent: 60px;
     text-decoration: underline;
-    margin: 0 0 6mm 0;
-    padding-bottom: 2mm;
+    margin: 0;
   }
 
-  .flow-card-header,
   .flow-card-detail {
     width: 100%;
     border-collapse: collapse;
     table-layout: fixed;
-  }
 
-  .flow-card-header td {
-    border: 1px solid #000;
-    height: 11mm;
-    padding: 0 6px;
-    font-size: 13pt;
-    vertical-align: middle;
+    thead {
+      display: table-header-group;
+    }
 
-    &.label {
-      width: 22%;
+    tbody tr {
+      page-break-inside: avoid;
+    }
+
+    .title-cell {
+      border: none;
+      padding: 20mm 0 5mm 0;
       text-align: center;
+      font-weight: normal;
+      height: auto;
     }
 
-    &.value {
-      width: 28%;
+    .info-row td {
+      border: 1px solid #000;
+      height: 9mm;
+      padding: 0 3mm;
+      font-size: 15px;
+      vertical-align: middle;
+      white-space: nowrap;
+      text-align: left;
+      font-weight: normal;
+
+      &.label {
+        text-align: center;
+      }
     }
-  }
 
-  .flow-card-detail {
     th,
-    td {
+    tbody td {
       border: 1px solid #000;
       text-align: center;
       vertical-align: middle;
-      font-size: 11pt;
+      font-size: 13px;
       padding: 1px 2px;
-      line-height: 1.25;
+      line-height: 1.2;
+      white-space: nowrap;
     }
 
     th {
@@ -351,31 +383,27 @@ ${printSection.innerHTML}
     }
 
     thead th {
-      height: 7mm;
+      height: 6mm;
     }
 
     tbody td {
-      height: 9mm;
+      height: 7mm;
     }
-  }
 
-  .col-no { width: 7%; }
-  .col-name { width: 17%; }
-  .col-num { width: 7%; }
-  .col-leader { width: 10%; }
-  .col-bad { width: 14%; }
-  .col-bad-sub { width: 7%; }
-  .col-date { width: 13%; }
-  .col-remark { width: 11%; }
+    thead th.col-bad {
+      text-align: center;
+      letter-spacing: 4px;
+    }
+  }
 
   .flow-card-footer {
     display: flex;
-    justify-content: space-between;
-    margin-top: 6mm;
-    font-size: 13pt;
+    justify-content: flex-start;
+    margin-top: 4mm;
+    font-size: 15px;
 
     .footer-item {
-      width: 45%;
+      width: 50%;
     }
   }
 </style>

+ 9 - 1
src/views/produceOrder/workReport.vue

@@ -269,6 +269,8 @@
       <addPlease ref="addPleaseRef" @refresh="refreshPlease"></addPlease>
 
       <qualityInspection ref="qualityInspectionRef"></qualityInspection>
+
+      <encodingDialog ref="encodingDialogRef" />
     </el-drawer>
   </div>
 </template>
@@ -321,6 +323,7 @@
   import workOrderHandover from '@/views/produce/components/workOrderHandover/index.vue';
   import { checkProductionResult } from '@/api/producetaskrulerecord/index.js';
   import { getPlanDotLine } from '@/api/produceOrder/index.js';
+  import encodingDialog from '../produce/components/encodingDialog/index.vue';
 
   export default {
     components: {
@@ -351,7 +354,8 @@
       addPlease,
       qualityInspection,
       prenatalExamination,
-      workOrderHandover
+      workOrderHandover,
+      encodingDialog
     },
     data() {
       return {
@@ -1046,6 +1050,10 @@
         if (t == 'feed') {
         }
 
+        if (t == 'encoding') {
+          this.$refs.encodingDialogRef.open([this.workOrderInfo]);
+        }
+
         // 委外
         if (t == 'Outsourcing') {
           if (this.workListIds.length > 1) {