快乐的昕的电脑
2025-11-05 f7123f58082c88056fb7bc1d0b46a76e4519e2ac
components/WorkOrderPrint.vue
@@ -10,6 +10,9 @@
                  <button v-if="isGeneratingBarcode" class="reset-btn-header" @click="resetGenerateState">重置</button>
               </view>
            </view>
            <!-- 数采总产量 -->
            <view class="section-title">数采总产量</view>
            <div class="table-scroll">
               <table class="report-table">
                  <thead>
@@ -28,33 +31,55 @@
                     </tr>
                  </thead>
                  <tbody>
                     <!-- 当前实时统计(保持原来单行) -->
                     <tr class="summary-row">
                     <tr class="summary-row highlight-row">
                        <td>{{ nowTime }}</td>
                        <td>{{ staffDisplay || '-' }}</td>
                        <td>{{ orderNo || '-' }}</td>
                        <td>{{ order.daa003 || '-' }}</td>
                        <td>{{ planQtyDisplay }}</td>
                        <td>{{ machineNo || '-' }}</td>
                        <td>{{ order.initCjNum }}</td><!--初始采集数-->
                        <td>{{ order.currentCjNum }}</td><!--报工时采集数-->
                        <td>{{ order.currentCjNum - order.initCjNum }}</td><!--报工数(计算)-->
                        <td>{{ realTimeDefectiveCount }}</td><!--不良数-->
                        <td>{{ realTimeOkCount }}</td><!--良品数(计算)-->
                        <td>{{ order.initCjNum }}</td>
                        <td>{{ order.currentCjNum }}</td>
                        <td>{{ order.currentCjNum - order.initCjNum }}</td>
                        <td>{{ realTimeDefectiveCount }}</td>
                        <td>{{ realTimeOkCount }}</td>
                     </tr>
                     <!-- 历史报工记录行 -->
                  </tbody>
               </table>
            </div>
            <!-- 历史报工记录 -->
            <view class="section-title history-title">历史报工记录</view>
            <div class="table-scroll">
               <table class="report-table">
                  <thead>
                     <tr>
                        <th>时间</th>
                        <th>报工人</th>
                        <th>工单号</th>
                        <th>产品名称</th>
                        <th>计划生产数</th>
                        <th>机台号</th>
                        <th>初始采集数</th>
                        <th>报工时采集数</th>
                        <th>报工数(计算)</th>
                        <th>不良数</th>
                        <th>良品数(计算)</th>
                     </tr>
                  </thead>
                  <tbody>
                     <tr v-for="(r, idx) in reportingHistory" :key="idx">
                        <td>{{ r.bgDate }}</td><!--时间-->
                        <td>{{ r.staff || '-' }}</td><!--报工人-->
                        <td>{{ r.orderNo || '-' }}</td><!--工单号-->
                        <td>{{ order.daa003 || '-' }}</td><!--产品名称-->
                        <td>{{ planQtyDisplay }}</td><!--计划生产数-->
                        <td>{{ r.machineNo || '-' }}</td><!--机台号-->
                        <td>{{ r.initialValue }}</td><!--初始采集数-->
                        <td>{{ r.productionCount }}</td><!--报工时采集数-->
                        <td>{{ r.totalProduction }}</td><!--报工数(计算)-->
                        <td>{{ r.BfQty }}</td><!--不良数-->
                        <td>{{ r.OkQty }}</td><!--良品数(计算)-->
                        <td>{{ r.bgDate }}</td>
                        <td>{{ r.staff || '-' }}</td>
                        <td>{{ r.orderNo || '-' }}</td>
                        <td>{{ order.daa003 || '-' }}</td>
                        <td>{{ planQtyDisplay }}</td>
                        <td>{{ r.machineNo || '-' }}</td>
                        <td>{{ r.initialValue }}</td>
                        <td>{{ r.productionCount }}</td>
                        <td>{{ r.totalProduction }}</td>
                        <td>{{ r.BfQty }}</td>
                        <td>{{ r.OkQty }}</td>
                     </tr>
                     <tr v-if="!reportingHistory.length">
                        <td colspan="11" class="no-data">暂无历史报工记录</td>
@@ -123,7 +148,7 @@
                  <button v-if="userSearch" class="user-search-clear" @click="userSearch=''">清空</button>
                  <view class="user-search-info">
                     匹配:{{ filteredUsers.length }} / {{ users.length }}
                  </view>
         </view>
               </view>
               <view class="user-list-scroll">
                  <template v-if="filteredUsers.length">
@@ -463,7 +488,26 @@
</script>
<style scoped>
   /* 原样式保持,新增几行辅助样式 */
   .section-title {
      font-size: 20px;
      font-weight: bold;
      margin: 18px 0 8px 0;
      color: #fff;
      background: #007aff;
      padding: 8px 18px;
      border-radius: 8px 8px 0 0;
      display: inline-block;
   }
   .history-title {
      background: #555;
   }
   .highlight-row {
      background: #ffe9b3 !important;
      font-weight: bold;
   }
   .report-table .summary-row {
      background: #f0f8ff;
      font-weight: 600;
@@ -475,7 +519,6 @@
      font-size: 14px;
   }
   /* 新增:标题行样式 */
   .report-header {
      display: flex;
      justify-content: space-between;
@@ -516,8 +559,6 @@
      .reset-btn-header:hover {
         background: #e94d4d;
      }
   /* 其余样式保持不变 */
   .page {
      padding: 1.2vh 2vw;
@@ -782,7 +823,7 @@
      display: flex;
      flex-direction: column;
   }
   /* 搜索条样式 */
   .user-search-bar {
      display: flex;
      align-items: center;
@@ -969,13 +1010,13 @@
         font-size: 13px;
      }
      .user-list-btn .user-code {
         font-size: 13px;
      }
         .user-list-btn .user-code {
            font-size: 13px;
         }
      .user-list-btn .user-name {
         font-size: 12px;
      }
         .user-list-btn .user-name {
            font-size: 12px;
         }
      .reason-btn {
         font-size: 12px;