啊鑫
2025-07-20 fca192d3c38c5dcfbb6ace8bc71d6078f6a079b2
pages/QC/LLJ/List.vue
@@ -30,7 +30,6 @@
         </view>
      </view>
      <!-- 检验单列表 -->
      <view class="inspection-list">
         <!-- 检验单卡片1 -->
@@ -38,10 +37,16 @@
            <view class="card-header">
               <text class="badge urgent" v-if="item.urgentFlag == 1">急料</text>
               <text class="badge urgent" v-if="item.jycs == 1">超时</text>
               <text class="badge normal" v-if="item.ftype == 1">委外</text>
               <text class="badge normal" v-if="item.first == 1">首次来料</text>
               <text class="card-title">检验单号: {{item.releaseNo}}</text>
               <text class="status pending" v-if="item.userName==null && item.activeTab==0">待分配</text>
               <view v-if="item.userName == null && item.activeTab == 0">
                       <text class="status pending" :class="{ 'emergency-pending': item.lotNo1 === '紧急放行,请勿验退!' }">
                       {{ item.lotNo1 === '紧急放行,请勿验退!' ? '紧急放行/待分配' : '待分配' }}
                       </text>
                   </view>
               <text class="status assigned" v-if="item.userName!=null && item.activeTab==0">已分配</text>
               <text class="status pass" v-if="item.fcheckResu=='合格' && item.activeTab==1">合格</text>
               <text class="status Unqualified" v-if="item.fcheckResu=='不合格' && item.activeTab==1">不合格</text>
@@ -121,7 +126,7 @@
            pageIndex: 1,
            limit: 20,
            IQCJL: 0,
            options: ['项目', '物料编号', '物料名称', '供应商', '采购员'],
            options: ['项目', '物料编号', '物料名称', '供应商', '采购员','到货单号','检验单号','物料规格'],
            searchValue: ''
         }
@@ -140,7 +145,10 @@
               1: 'itemNo', // 物料编号
               2: 'itemName', // 物料名称
               3: 'suppName', // 供应商
               4: 'purchaser' // 采购员
               4: 'purchaser' ,// 采购员
               5: 'lotNO' ,// 到货单号
               6: 'releaseNO' ,// 检验单号
               7: 'ItemModel',//物料规格
            };
            this.selectedField = fieldMap[this.optionsIndex];
         },
@@ -173,7 +181,8 @@
                  result: result,
                  SearchValue: this.searchValue,
                  selectedIndex: this.optionsIndex, //下拉框筛选条件
                  userIndex: this.projectIndex
                  userIndex: this.projectIndex,
                  emergency:this.meergency,
               }
            }).then(res => {
               if (this.pageIndex === 1) {
@@ -183,6 +192,7 @@
                  this.inspectionList.forEach((item, index) => {
                     this.$set(item, 'activeTab', this.activeTab);
                     this.$set(item, 'IQCJL', this.IQCJL);
                     this.$set(item, 'EMERGENCY', item.emergency || null);
                  });
               } else {
@@ -193,6 +203,7 @@
                     this.inspectionList.forEach((item, index) => {
                        this.$set(item, 'activeTab', this.activeTab);
                        this.$set(item, 'IQCJL', this.IQCJL);
                        this.$set(item, 'EMERGENCY', item.emergency || null);
                     });
                  }
@@ -290,10 +301,19 @@
         },
         onShow() {
            //每次进入页面都会执行的方法
            // this.pageIndex = 1;
            // this.data = [];
            // //this.current = 0
            // 检查是否需要刷新数据
            const app = getApp();
            if (app.globalData && app.globalData.needRefreshList) {
               // 清除标记
               app.globalData.needRefreshList = false;
               // 强制刷新数据
               this.pageIndex = 1; // 重置页码
               this.inspectionList = []; // 清空列表数据
               this.init(); // 重新加载数据
            } else {
               // 正常刷新
            this.init();
            }
         },
         async onLoad() {
            if (this.$loginInfo.roleid.indexOf("90134") != -1 || this.$loginInfo.account == "PL017") {
@@ -467,6 +487,12 @@
      color: white;
   }
   .badge.emergency {
      background-color: #ff4d4f;
      color: white;
      margin-right: 5px;
   }
   .status {
      font-size: 12px;
      padding: 4px 8px;
@@ -607,5 +633,9 @@
      order: 4;
      width: 100%;
    } */
   .status.emergency-pending {
       background-color: #ff0000; /* 红色背景 */
       color: white;
   }
   }
</style>