llj
2026-01-26 04de7ddfcd4853fe122fae6aff541909f1bb1e8f
pages/EmployeeRecords/EmployeeRecordsBill.vue
@@ -84,12 +84,47 @@
         <view :class="tabs == 2 ? 'on':''" @tap="tabs = 2">制单信息</view>
      </view>
      <!-- 装箱信息 -->
      <view v-if="tabs == 1">
         <zb-table id="list-table" :checked-highlight="true" :fit="true" :style="{height: `${listTableHeight}px`}"
            :columns="columns" :data="listData" :show-header="true" :border="true" :row-key="row => row.index"
            @toggleRowSelection="handleSelect" @toggleAllSelection="handleSelectAll"
            @rowClick="onTableRowClickHandler" />
      </view>
      <view v-if="tabs == 1" class="work-order-cards">
               <view v-for="(item, index) in listData" :key="item.index" class="work-order-card">
                  <view class="card-header">
                     <text class="card-title">工单信息 {{ index + 1 }}</text>
                     <checkbox :checked="item.checked" style="transform:scale(0.8)" color="#3A78FF"
                        @change="onCardCheckChange(item, index)" />
                  </view>
                  <view class="card-content">
                     <view class="card-row">
                        <text class="card-label">流转卡号:</text>
                        <text class="card-value">{{ item['流转卡号'] || '-' }}</text>
                     </view>
                     <view class="card-row">
                        <text class="card-label">物料代码:</text>
                        <text class="card-value">{{ item['物料代码'] || '-' }}</text>
                     </view>
                     <view class="card-row">
                        <text class="card-label">物料名称:</text>
                        <text class="card-value">{{ item['物料名称'] || '-' }}</text>
                     </view>
                     <view class="card-row">
                        <text class="card-label">规格型号:</text>
                        <text class="card-value">{{ item['规格型号'] || '-' }}</text>
                     </view>
                     <view class="card-row">
                        <text class="card-label">数量:</text>
                        <text class="card-value">{{ item['数量'] || '0' }}</text>
                     </view>
                     <view class="card-row">
                        <text class="card-label">生产资源:</text>
                        <text class="card-value">{{ item['生产资源'] || '-' }}</text>
                     </view>
                  </view>
               </view>
               <view v-if="listData.length === 0" class="empty-card">
                  <uni-icons type="info" size="30" color="#999"></uni-icons>
                  <text class="empty-text">暂无工单信息</text>
                  <text class="empty-tip">请先扫描条码获取工单信息</text>
               </view>
            </view>
      <view v-if="tabs == 0" class="machine-info-container">
         <view class="form-item" v-if="false">
            <view class="title">设备ID:</view>
@@ -282,7 +317,8 @@
            arrayHProcName: [], //工序
            HProcNameList: [],
            
            maskShow:false,
            printInfo:false,
            EnableScanBarCodePack: true,
            EnableSubmit: true,
            HBarCodePackFocus: false,
@@ -434,6 +470,18 @@
         }
      },
      methods: {
         onCardCheckChange(item, index) {
                     item.checked = !item.checked;
                     if (item.checked) {
                        this.selectedRows.push(item);
                     } else {
                        const idx = this.selectedRows.findIndex(row => row.index === item.index);
                        if (idx > -1) {
                           this.selectedRows.splice(idx, 1);
                        }
                     }
                     console.log('当前选中的行:', this.selectedRows);
                  },
         onTableRowClickHandler(row, index) {
            console.log('row: ', row);
            if (!this.listData[index].checked) {
@@ -760,7 +808,6 @@
            })
         },
         GetMeesageByBarCode(HBarCode) {
            let sBarCode = this.HBarCode
            if (!sBarCode) {
               return uni.showToast({
@@ -790,6 +837,7 @@
                     this.hform.HMouldNo = data[0][0].模具编码
                     this.hform.HMouldName = data[0][0].模具名称
                     this.hform.HMouldState = data[0][0].模具状态
                     this.listData = []
                     let tabledata = data[1][0]
                     if (data[1].length > 0) {
@@ -802,11 +850,23 @@
                           }))
                        }
                     }
                     if(data[0][0].模具id===0 && data[0][0].模具编码===""&& data[0][0].模具名称===""&&data[1].length<=0)
                     {
                        CommonUtils.playSound(0)
                        this.listData = []
                        this.HBarCodeFocusRefresh()
                        uni.showToast({
                           icon: 'none',
                           title: Message
                        })
                        return;
                     }
                  } else {
                     CommonUtils.playSound(0)
                     this.listData = []
                     this.HBarCodeFocusRefresh()
                     uni.showToast({
                        icon: 'none',
@@ -1493,4 +1553,88 @@
         }
      }
   }
   .work-order-cards {
         padding: 30rpx;
         display: flex;
         flex-direction: column;
         gap: 20rpx;
         .work-order-card {
            background: #fff;
            border-radius: 16rpx;
            padding: 24rpx;
            box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.08);
            border: 1px solid #e8e8e8;
            .card-header {
               display: flex;
               justify-content: space-between;
               align-items: center;
               padding-bottom: 20rpx;
               border-bottom: 1px solid #f0f0f0;
               margin-bottom: 20rpx;
               .card-title {
                  font-size: 32rpx;
                  font-weight: bold;
                  color: #333;
               }
            }
            .card-content {
               .card-row {
                  display: flex;
                  align-items: center;
                  padding: 12rpx 0;
                  border-bottom: 1px dashed #f5f5f5;
                  &:last-child {
                     border-bottom: none;
                  }
                  .card-label {
                     width: 160rpx;
                     font-size: 28rpx;
                     color: #666;
                     flex-shrink: 0;
                  }
                  .card-value {
                     flex: 1;
                     font-size: 28rpx;
                     color: #333;
                     word-break: break-all;
                  }
               }
            }
            &:hover {
               box-shadow: 0 4rpx 16rpx rgba(58, 120, 255, 0.15);
               border-color: #3a78ff;
            }
         }
         .empty-card {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 80rpx 30rpx;
            background: #f8f9fa;
            border-radius: 16rpx;
            border: 2rpx dashed #dcdfe6;
            .empty-text {
               font-size: 30rpx;
               color: #999;
               margin-top: 20rpx;
               margin-bottom: 10rpx;
            }
            .empty-tip {
               font-size: 26rpx;
               color: #ccc;
            }
         }
      }
</style>