tjx
2025-11-04 a563361b45430e4c99ddc625d995154f34b3e556
components/WorkOrderPrint.vue
@@ -1,8 +1,15 @@
<template>
   <view class="page wide-layout" :class="{'has-overlay': (isShowUserSelect || isShow || barcodeIsShow)}">
      <view class="status-section">
         <!-- 报工记录表部分,在标题行添加刷新按钮 -->
         <view class="report-table-wrapper">
            <view class="report-title">报工记录表</view>
            <view class="report-header">
               <view class="report-title">报工记录表</view>
               <view class="header-buttons">
                  <button class="refresh-btn-header" @click="refresh">刷新</button>
                  <button v-if="isGeneratingBarcode" class="reset-btn-header" @click="resetGenerateState">重置</button>
               </view>
            </view>
            <div class="table-scroll">
               <table class="report-table">
                  <thead>
@@ -57,7 +64,7 @@
            </div>
         </view>
         <!-- 下面原有内容保持不变 -->
         <!-- 移除了原来的状态行中的按钮组 -->
         <view class="status-row">
            <!--<view class="status-box">
               <text>机台面板数:</text>
@@ -81,31 +88,25 @@
               <text>已生产数:</text>
               <input v-model="calculatedTotalProduction" class="highlight" disabled />
            </view>-->
            <view class="btn-group">
               <button class="refresh-btn-inline" @click="refresh">刷新</button>
               <button v-if="isGeneratingBarcode" class="reset-btn-inline" @click="resetGenerateState">重置</button>
            </view>
         </view>
         <view class="flex-row gap-lg">
            <!-- 当前报工人部分移到左边 -->
            <view class="current-user-section fill-width">
            <!-- 当前报工人部分 -->
            <view class="current-user-section">
               <text>当前报工人:</text>
               <text class="current-user-name">{{ staffDisplay || '未选择' }}</text>
               <button class="select-user-btn" @click="isShowUserSelect = true">选人</button>
            </view>
            <!-- 不良数量部分移到右边 -->
            <view class="print-section flex-grow">
               <view class="barcode-info">
                  <view class="user-select">
                     <text>不良数量:</text>
                     <input v-model="customAmount" class="inp bad-input" placeholder="请输入数量" />
                  </view>
                  <view class="user-select">
                     <button class="details-btn" @click="confirmCustomAmount">确认提交</button>
                  </view>
               </view>
            <!-- 不良数量部分 -->
            <view class="defective-section">
               <text>不良数量:</text>
               <input v-model="customAmount" class="inp bad-input" placeholder="请输入数量" />
            </view>
            <!-- 确认提交按钮 -->
            <view class="submit-section">
               <button class="details-btn" @click="confirmCustomAmount">确认提交</button>
            </view>
         </view>
@@ -473,6 +474,49 @@
      color: #777;
      font-size: 14px;
   }
   /* 新增:标题行样式 */
   .report-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 8px;
   }
   .header-buttons {
      display: flex;
      align-items: center;
      gap: 12px;
   }
   .refresh-btn-header {
      background: #00A2E9;
      color: #fff;
      border: none;
      font-size: 16px;
      border-radius: 8px;
      padding: 8px 20px;
      transition: background 0.15s;
   }
      .refresh-btn-header:hover {
         background: #0086c0;
      }
   .reset-btn-header {
      background: #ff6b6b;
      color: #fff;
      border: none;
      font-size: 14px;
      border-radius: 8px;
      padding: 8px 16px;
      transition: background 0.15s;
   }
      .reset-btn-header:hover {
         background: #e94d4d;
      }
   /* 其余样式保持不变 */
   .page {
@@ -507,7 +551,7 @@
      font-size: 24px;
      font-weight: 600;
      text-align: center;
      margin: 0 0 8px;
      margin: 0;
   }
   .report-table {
@@ -618,7 +662,7 @@
      display: flex;
      flex-wrap: wrap;
      gap: 20px;
      align-items: flex-start;
      align-items: stretch;
   }
   .flex-grow {
@@ -629,17 +673,16 @@
      gap: 30px;
   }
   .print-section {
      padding: 6px 0 14px;
      margin-bottom: 0;
      flex: 1;
   .defective-section {
      display: flex;
      align-items: center;
      gap: 14px;
      font-size: 18px;
   }
   .barcode-info {
   .submit-section {
      display: flex;
      flex-wrap: wrap;
      align-items: flex-start;
      gap: 30px;
      align-items: center;
   }
   .inp {
@@ -682,10 +725,7 @@
      padding: 14px 22px;
      background: #fff;
      gap: 14px;
   }
   .fill-width {
      flex: 0 1 380px;
      flex: 0 0 auto;
   }
   .current-user-name {
@@ -793,8 +833,8 @@
   .user-list-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill,minmax(150px,1fr));
      gap: 24px 24px;
      grid-template-columns: repeat(auto-fill,minmax(110px,1fr));
      gap: 12px 12px;
   }
   .user-list-btn {
@@ -802,14 +842,14 @@
      flex-direction: column;
      justify-content: center;
      align-items: center;
      gap: 6px;
      padding: 16px 10px;
      height: 120px;
      font-size: 18px;
      gap: 4px;
      padding: 10px 8px;
      height: 75px;
      font-size: 14px;
      background: #00a2e9;
      color: #fff;
      border: none;
      border-radius: 10px;
      border-radius: 8px;
      cursor: pointer;
      box-sizing: border-box;
      word-break: break-word;
@@ -817,11 +857,11 @@
      .user-list-btn .user-code {
         font-weight: 600;
         font-size: 18px;
         font-size: 14px;
      }
      .user-list-btn .user-name {
         font-size: 16px;
         font-size: 13px;
      }
      .user-list-btn.selected {
@@ -925,12 +965,30 @@
      }
      .user-list-btn {
         height: 110px;
         font-size: 16px;
         height: 70px;
         font-size: 13px;
      }
      .user-list-btn .user-code {
         font-size: 13px;
      }
      .user-list-btn .user-name {
         font-size: 12px;
      }
      .reason-btn {
         font-size: 12px;
      }
      .refresh-btn-header {
         font-size: 14px;
         padding: 6px 16px;
      }
      .reset-btn-header {
         font-size: 12px;
         padding: 6px 12px;
      }
   }
</style>