zjh
2025-04-23 8b34fa36bfc735e53460159ac13814ff073c908a
pages/QC/LLJ/List.vue
@@ -16,24 +16,16 @@
      </view>
      <!-- 新增搜索框和按钮 -->
              <view class="search-container">
                <input
                  class="search-input"
                  v-model="searchValue"
                  :placeholder="'请输入'+options[optionsIndex]"
                  @confirm="handleSearch"
                />
               <input class="search-input" v-model="searchValue" :placeholder="'请输入'+options[optionsIndex]"
                  @confirm="handleSearch" />
                <button class="search-button" @click="handleSearch">搜索</button>
              </view>
      
        <view class="status-tabs">
          <button
            :class="['tab-button', activeTab === 0 ? 'active' : '']"
            @click="switchTab(0)"
          >未检验({{uncheckedCount}})</button>
          <button
            :class="['tab-button', activeTab === 1 ? 'active' : '']"
            @click="switchTab(1)"
          >{{checkedCount}}</button>
               <button :class="['tab-button', activeTab === 0 ? 'active' : '']"
                  @click="switchTab(0)">未检验({{uncheckedCount}})</button>
               <button :class="['tab-button', activeTab === 1 ? 'active' : '']"
                  @click="switchTab(1)">{{checkedCount}}</button>
        </view>
      
      </view>
@@ -61,10 +53,7 @@
              <text class="info-label">物料信息</text>
              <text class="info-content">{{item.itemNo}} | {{item.itemName}}<br>{{item.itemModel}}</text>
            </view>
            <view class="info-item">
              <text class="info-label">数量</text>
              <text class="info-content highlight">{{item.fcovertQty}}</text>
            </view>
          </view>
          
          <view class="info-row">
@@ -76,6 +65,18 @@
              <text class="info-label">项目</text>
              <text class="info-content">{{item.projectCodes}}</text>
            </view>
                  <view class="info-item" v-if="item.extendNo1!=null">
                     <text class="info-label">技改状态</text>
                     <text class="info-content">{{item.extendNo1}}</text>
                  </view>
                  <view class="info-item">
                     <text class="info-label">数量</text>
                     <text class="info-content highlight">{{item.fcovertQty}}</text>
                  </view>
               </view>
               <view class="info-row">
          </view>
      <view class="info-row" >
        <view class="info-item" v-if="item.newFngDesc!=null">
@@ -89,13 +90,16 @@
      </view>
         
          <view class="meta-info">
            <text class="meta-item"><uni-icons type="calendar" size="14" color="#95a5a6"></uni-icons> {{item.createDate}}</text>
            <text class="meta-item"><uni-icons type="person" size="14" color="#95a5a6"></uni-icons> {{item.userName}}</text>
                  <text class="meta-item"><uni-icons type="calendar" size="14" color="#95a5a6"></uni-icons>
                     {{item.createDate}}</text>
                  <text class="meta-item"><uni-icons type="person" size="14" color="#95a5a6"></uni-icons>
                     {{item.userName}}</text>
          </view>
        </view>
        
        <view class="card-actions">
          <button v-if="item.activeTab==0 && item.IQCJL==1"  @click="assignTask(item)">{{item.userName == null ? '分配' : '重新分配'}}</button>
               <button v-if="item.activeTab==0 && item.IQCJL==1"
                  @click="assignTask(item)">{{item.userName == null ? '分配' : '重新分配'}}</button>
          <button v-if="item.activeTab==0" class="primary" @click="startInspection(item)">开始检验</button>
        <button v-if="item.activeTab==1" class="primary" @click="startInspection(item)">查看</button>
        </view>
@@ -235,13 +239,16 @@
    },
   //跳转检验单
    startInspection(item) {
            console.log(this.activeTab);
      if (this.activeTab === 1) {
         uni.navigateTo({
           url: 'Add?id='+item.id+'&lotNo='+item.lotNo+'&releaseNo='+item.releaseNo+'&current=1'
                  url: 'Add?id=' + item.id + '&lotNo=' + item.lotNo + '&releaseNo=' + item.releaseNo +
                     '&current=B'
         })
      }else{
         uni.navigateTo({
           url: 'Add?id='+item.id+'&lotNo='+item.lotNo+'&releaseNo='+item.releaseNo+'&current=0'
                  url: 'Add?id=' + item.id + '&lotNo=' + item.lotNo + '&releaseNo=' + item.releaseNo +
                     '&current=A'
         })
      }
    
@@ -253,7 +260,8 @@
      // })
      // 这里可以添加分配任务的逻辑
     uni.navigateTo({
        url: 'UpdateCheckBy?releaseNo=' + item.releaseNo+'&userID='+this.$loginInfo.account+'&staffName='+item.userName
               url: 'UpdateCheckBy?releaseNo=' + item.releaseNo + '&userID=' + this.$loginInfo.account +
                  '&staffName=' + item.userName
     });
    },
   /**
@@ -289,11 +297,9 @@
      this.init();
   },
   async onLoad() {
      if(this.$loginInfo.roleid.indexOf("90134") != -1 || this.$loginInfo.account=="PL017")
      {
            if (this.$loginInfo.roleid.indexOf("90134") != -1 || this.$loginInfo.account == "PL017") {
         this.IQCJL=1;
      }else
      {
            } else {
         this.IQCJL=0;
      }
      await this.init(); // 自定义的刷新函数
@@ -322,12 +328,14 @@
  color: #2c3e50;
  margin-bottom: 16px;
}
/* 新增搜索框样式 */
.search-container {
  display: flex;
  flex: 1;
  margin: 0 10px;
   height: 36px; /* 与其他控件高度一致 */
      height: 36px;
      /* 与其他控件高度一致 */
}
.search-input {
@@ -348,6 +356,7 @@
  font-size: 14px;
  margin: 0;
}
/* .filter-controls {
  display: flex;
  justify-content: space-between;
@@ -370,6 +379,7 @@
.dropdown-filter {
  min-width: 70px;
}
.filter-label {
  font-size: 14px;
  color: #7f8c8d;
@@ -390,10 +400,12 @@
  overflow: hidden;
  background-color: #ecf0f1;
}
 .status-tabs {
  flex: 1;
  min-width: 200px;
}
.tab-button {
  padding: 0px 16px;
  border: none;
@@ -450,6 +462,7 @@
  background-color: #e74c3c;
  color: white;
}
.badge.normal {
  background-color: #ffaa00;
  color: white;
@@ -471,10 +484,12 @@
  background-color: #3498db;
  color: white;
}
.status.pass {
  background-color: #00cd00;
  color: white;
}
.status.Unqualified {
  background-color: #ff0000;
  color: white;
@@ -562,6 +577,7 @@
  }
 
}
/* 响应式设计 */
@media (min-width: 300px) {
 .inspection-list {
@@ -572,6 +588,7 @@
  .info-row {
    flex-direction: row;
  }
  .picker {
    padding: 8px 12px;
    border: 1px solid #ddd;
@@ -580,6 +597,7 @@
    font-size: 14px;
    min-width: 10px;
  }
 /*   .search-container {
      order: 3;
      width: 100%;