spring
2025-03-25 5fa8a62362c5a12f68d53e0a2e9e1f5d8d562356
src/components/view/b1-inspect-order-plan.vue
@@ -97,14 +97,17 @@
   .view-self-checkbox {
      margin-left: 50px;
   }
  .draggable-row {
    cursor: move;
    position: relative;
  }
  .node_i {
    color: orange;
    font-size: 18px;
  }
  .custom-tree-node .el-button {
    opacity: 0;
  }
@@ -112,6 +115,7 @@
  .custom-tree-node:hover .el-button {
    opacity: 1;
  }
  .el-dialog {
    position: relative;
  }
@@ -139,7 +143,8 @@
            <div class="search_thing">
               <div class="search_label">检验状态:</div>
               <div class="search_input">
                  <el-select size="small" v-model="componentData.entity.insState" style="width: 100%;" @change="refreshTable()">
            <el-select size="small" v-model="componentData.entity.insState" style="width: 100%;"
              @change="refreshTable()">
                     <el-option v-for="(a, i) in insStateList" :key="i" :label="a.label" :value="a.value"></el-option>
                  </el-select>
               </div>
@@ -147,8 +152,8 @@
        <div class="search_thing">
               <div class="search_label">样品编号:</div>
               <div class="search_input">
                  <el-input size="small" placeholder="请输入" clearable
                     v-model="componentData.entity.sampleCOde" @keyup.enter.native="refreshTable()"></el-input>
            <el-input size="small" placeholder="请输入" clearable v-model="componentData.entity.sampleCOde"
              @keyup.enter.native="refreshTable()"></el-input>
               </div>
            </div>
            <div class="search_thing" style="padding-left: 30px;">
@@ -162,7 +167,8 @@
                  <el-col :span="18">
                     <div style="display: flex;align-items: center;margin-bottom: 10px;">
                        <ul class="tab">
                           <li v-for="(m,i) in tabList" :key="i" :class="{active:i==tabIndex}" @click="handleTab(m,i)">{{m.label.replace('试验室','')}}
                  <li v-for="(m, i) in tabList" :key="i" :class="{ active: i == tabIndex }" @click="handleTab(m, i)">
                    {{ m.label.replace('试验室', '') }}
                           </li>
                        </ul>
                        <div>
@@ -173,8 +179,10 @@
                  </el-col>
                  <el-col :span="6">
                     <div class="center-title">
                <el-button size="small" type="primary" @click="qrCodeVisible=true" v-if="selectWarehouse">扫码报检</el-button>
                <el-button size="small" type="primary" @click="exportVisible=true" style="margin-right: 16px;" v-if="selectWarehouse">出库</el-button>
                <el-button size="small" type="primary" @click="qrCodeVisible = true"
                  v-if="selectWarehouse">扫码报检</el-button>
                <el-button size="small" type="primary" @click="exportVisible = true" style="margin-right: 16px;"
                  v-if="selectWarehouse">出库</el-button>
                        <span>总计任务数量:</span>
                        <span>{{total}}</span>
                     </div>
@@ -185,100 +193,58 @@
                    :isColumnWidth="true"
               :url="$api.insOrderPlan.selectInsOrderPlanList" :upUrl="$api.user.updateUser" :componentData="componentData" @handleInspection="handleInspection"
               :key="upIndex"/> -->
          <el-table
          :data="tableData"
          ref="table0"
          border
          style="width: 100%;"
          height="calc(100% - 80px)"
          :row-class-name="rowClassName"
          v-loading="tableLoading"
          row-key="orderStateId"
        >
          <el-table-column
            prop="entrustCode"
            label="委托编号"
            width="140px"
          >
        <el-table :data="tableData" ref="table0" border style="width: 100%;" height="calc(100% - 80px)"
          :row-class-name="rowClassName" v-loading="tableLoading" row-key="orderStateId" @sort-change="sortChange">
          <el-table-column prop="entrustCode" label="委托编号" width="140px">
            <template slot-scope="scope">
              <el-button @click="selectAllByOne(scope.row)" type="text" size="small">{{ scope.row.entrustCode }}</el-button>
              <el-button @click="selectAllByOne(scope.row)" type="text" size="small">{{ scope.row.entrustCode
                }}</el-button>
            </template>
          </el-table-column>
          <el-table-column
            prop="sample"
            label="样品名称"
            width="100px"
          ></el-table-column>
          <el-table-column
            prop="sampleCode"
            label="样品编号"
            width="170px"
          ></el-table-column>
          <el-table-column
            prop="type"
            label="紧急程度"
            width="100px"
          >
          <el-table-column prop="sample" label="样品名称" width="100px"></el-table-column>
          <el-table-column prop="sampleCode" label="样品编号" width="170px"></el-table-column>
          <el-table-column prop="type" label="紧急程度" width="100px">
            <template slot-scope="scope">
              <el-tag :type="typeList.find(m=>m.value==scope.row.type)?typeList.find(m=>m.value==scope.row.type).type:''" size="small">{{ typeList.find(m=>m.value==scope.row.type)?typeList.find(m=>m.value==scope.row.type).label:'' }}</el-tag>
              <el-tag
                :type="typeList.find(m => m.value == scope.row.type) ? typeList.find(m => m.value == scope.row.type).type : ''"
                size="small">{{
                  typeList.find(m => m.value == scope.row.type) ? typeList.find(m => m.value == scope.row.type).label : ''
                }}</el-tag>
            </template>
          </el-table-column>
          <el-table-column
            prop="insState"
            label="状态"
            width="100px"
          >
          <el-table-column prop="insState" label="状态" width="100px">
          <template slot-scope="scope">
              <el-tag :type="insStateList.find(m=>m.value==scope.row.insState).type" size="small">{{ insStateList.find(m=>m.value==scope.row.insState).label }}</el-tag>
              <el-tag :type="insStateList.find(m => m.value == scope.row.insState).type" size="small">{{
                insStateList.find(m => m.value == scope.row.insState).label }}</el-tag>
            </template></el-table-column>
          <el-table-column
            prop="userName"
            label="检验人"
            width="140px"
          ></el-table-column>
          <el-table-column
            prop="checkName"
            label="复核人"
            width="100px"
          ></el-table-column>
          <el-table-column
            prop="appointed"
            label="约定时间"
            width="120px"
          ></el-table-column>
          <el-table-column
            prop="sendTime"
            label="下发时间"
            width="160px"
          ></el-table-column>
          <el-table-column
            prop="insTime"
            label="检验开始时间"
            width="160px"
          ></el-table-column>
          <el-table-column
            prop="submitTime"
            label="检验结束时间"
            width="160px"
          ></el-table-column>
          <el-table-column
            prop="verifyTell"
            label="理由"
            width="150px"
          ></el-table-column>
          <el-table-column
            fixed="right"
            align="center" label="操作"
            width="340px"
          >
          <el-table-column prop="userName" label="检验人" width="140px"></el-table-column>
          <el-table-column prop="checkName" label="复核人" width="100px"></el-table-column>
          <el-table-column prop="createTime" label="报检时间" width="120px" sortable></el-table-column>
          <el-table-column prop="appointed" label="约定时间" width="120px" sortable></el-table-column>
          <el-table-column prop="sendTime" label="下发时间" width="160px" sortable></el-table-column>
          <el-table-column prop="insTime" label="检验开始时间" width="160px" sortable></el-table-column>
          <el-table-column prop="submitTime" label="检验结束时间" width="160px" sortable></el-table-column>
          <el-table-column prop="verifyTell" label="理由" width="150px"></el-table-column>
          <el-table-column fixed="right" align="center" label="操作" width="340px">
          <template slot-scope="scope">
            <el-button @click="handleDataLook(scope.row)" type="text" size="small">数据查看</el-button>
            <el-button @click="handleInspection(scope.row)" type="text" size="small" :disabled="scope.row.userName == null || scope.row.insState == 3 || scope.row.insState == 5||scope.row.insState == 6||(scope.row.userName&&!scope.row.userName.includes(userName))" v-if="inspection">检验</el-button>
            <el-button @click="handleConnect(scope.row)" type="text" size="small" :disabled="scope.row.userName == null || scope.row.insState == 5  || scope.row.insState == 3||scope.row.insState == 6||(scope.row.userName&&!scope.row.userName.includes(userName))" v-if="connect">交接</el-button>
            <el-button @click="cancelSubmitPlan(scope.row)" type="text" size="small" :disabled="scope.row.userName == null || scope.row.insState != 3 ||(scope.row.userName&&!scope.row.userName.includes(userName))" v-if="inspection">撤销</el-button>
            <el-button @click="handleReview(scope.row)" type="text" size="small" :disabled="scope.row.userName == null || scope.row.insState != 3 ||(scope.row.checkName&&!scope.row.checkName.includes(userName))" v-if="review">复核</el-button>
            <el-button @click="handleReview0(scope.row)" type="text" size="small" :disabled="scope.row.userName == null || (scope.row.insState != 4&&scope.row.insState != 5&&scope.row.insState != 6) " v-if="verifyPlan2">纠正复核</el-button>
            <el-button @click="claimFun(scope.row)" type="text" size="small" :disabled="scope.row.userName != null || scope.row.checkName!=null" v-if="claim">认领</el-button>
              <el-button @click="handleInspection(scope.row)" type="text" size="small"
                :disabled="scope.row.userName == null || scope.row.insState == 3 || scope.row.insState == 5 || scope.row.insState == 6 || (scope.row.userName && !scope.row.userName.includes(userName))"
                v-if="inspection">检验</el-button>
              <el-button @click="handleConnect(scope.row)" type="text" size="small"
                :disabled="scope.row.userName == null || scope.row.insState == 5 || scope.row.insState == 3 || scope.row.insState == 6 || (scope.row.userName && !scope.row.userName.includes(userName))"
                v-if="connect">交接</el-button>
              <el-button @click="cancelSubmitPlan(scope.row)" type="text" size="small"
                :disabled="scope.row.userName == null || scope.row.insState != 3 || (scope.row.userName && !scope.row.userName.includes(userName))"
                v-if="inspection">撤销</el-button>
              <el-button @click="handleReview(scope.row)" type="text" size="small"
                :disabled="scope.row.userName == null || scope.row.insState != 3 || (scope.row.checkName && !scope.row.checkName.includes(userName))"
                v-if="review">复核</el-button>
              <el-button @click="handleReview0(scope.row)" type="text" size="small"
                :disabled="scope.row.userName == null || (scope.row.insState != 4 && scope.row.insState != 5 && scope.row.insState != 6)"
                v-if="verifyPlan2">纠正复核</el-button>
              <el-button @click="claimFun(scope.row)" type="text" size="small"
                :disabled="scope.row.userName != null || scope.row.checkName != null" v-if="claim">认领</el-button>
            <el-button @click="lookHistory0(scope.row)" type="text" size="small">查看记录</el-button>
          </template>
          </el-table-column>
@@ -304,11 +270,7 @@
        <div class="search_label" style="width:90px"><span class="required-span">* </span>交接人员:</div>
        <div class="search_input">
          <el-select v-model="connect.connectPerson" placeholder="请选择" style="width: 100%;" filterable>
            <el-option
              v-for="item in personList"
              :key="item.value"
              :label="item.label"
              :value="item.value">
            <el-option v-for="item in personList" :key="item.value" :label="item.label" :value="item.value">
            </el-option>
          </el-select>
        </div>
@@ -334,47 +296,28 @@
      <div style="width: 100%;height: 100%;" v-if="activeFace >0">
         <Add :active="activeFace" :currentId="currentId" :examine="examine"/>
      </div>
    <Inspection v-if="state>0" @goback="goback" :orderId="orderId" :inspectorList="inspectorList" :sonLaboratory="componentData.entity.sonLaboratory" :state="state" :orderStateId="orderStateId" :version="version" :isLook="isLook" :num1="num1" :orderId0="orderId0" :userInfo="userInfo" ref="Inspection" />
    <Inspection v-if="state > 0" @goback="goback" :orderId="orderId" :inspectorList="inspectorList"
      :sonLaboratory="componentData.entity.sonLaboratory" :state="state" :orderStateId="orderStateId" :version="version"
      :isLook="isLook" :num1="num1" :orderId0="orderId0" :userInfo="userInfo" ref="Inspection" />
      <el-dialog title="数据查看" :visible.sync="dataDialogVisible" width="80%">
            <div style="height: 70vh;overflow-y: auto;" v-if="dataDialogVisible">
               <ValueTable ref="ValueTableDataLook" :rowKey="'insProductId'" :url="$api.insOrder.selectSampleAndProductByOrderId"
                  :componentData="componentDataDataLook"/>
        <ValueTable ref="ValueTableDataLook" :rowKey="'insProductId'"
          :url="$api.insOrder.selectSampleAndProductByOrderId" :componentData="componentDataDataLook" />
            </div>
         </el-dialog>
      <el-dialog title="查看记录" :visible.sync="historyDialogVisible" width="50%">
        <el-table
          :data="historyList"
          border
          style="width: 100%">
          <el-table-column
            prop="submitTime"
            label="提交日期"
            min-width="150">
      <el-table :data="historyList" border style="width: 100%">
        <el-table-column prop="submitTime" label="提交日期" min-width="150">
          </el-table-column>
          <el-table-column
            prop="submitUserName"
            label="提交人"
            min-width="90">
        <el-table-column prop="submitUserName" label="提交人" min-width="90">
          </el-table-column>
          <el-table-column
            prop="term"
            label="实验阶段"
            min-width="120">
        <el-table-column prop="term" label="实验阶段" min-width="120">
          </el-table-column>
          <el-table-column
            prop="note"
            label="实验操作"
            min-width="120">
        <el-table-column prop="note" label="实验操作" min-width="120">
          </el-table-column>
          <el-table-column
            prop="tell"
            label="再次检验原因"
            min-width="120">
        <el-table-column prop="tell" label="再次检验原因" min-width="120">
          </el-table-column>
          <el-table-column
            fixed="right"
            label="操作"
            min-width="100">
        <el-table-column fixed="right" label="操作" min-width="100">
            <template slot-scope="scope">
              <el-button @click="lookHistory(scope.row)" type="text" size="small">查看</el-button>
            </template>
@@ -388,7 +331,8 @@
          <div class="search_input">
            <el-input v-model="sampleCode" size="small" clearable :disabled="sampleCodeBtnDisabled">
              <el-tooltip :content="sampleCodeBtnDisabled?'手动输入':'扫码枪输入'" placement="top" slot="append">
                <el-button type="primary" icon="el-icon-edit" @click="sampleCodeBtnDisabled=!sampleCodeBtnDisabled"></el-button>
                <el-button type="primary" icon="el-icon-edit"
                  @click="sampleCodeBtnDisabled = !sampleCodeBtnDisabled"></el-button>
              </el-tooltip>
            </el-input>
          </div>
@@ -403,8 +347,7 @@
      </el-row>
      <el-tree :data="storageList" ref="tree" :props="{ children: 'warehouseShelfList', label: 'name' }" node-key="id"
               :filter-node-method="filterNode" @node-click="handleNodeClick" highlight-current @node-expand="nodeOpen"
               @node-collapse="nodeClose" :default-expanded-keys="expandedKeys" v-if="qrCodeVisible"
               empty-text="暂无数据">
        @node-collapse="nodeClose" :default-expanded-keys="expandedKeys" v-if="qrCodeVisible" empty-text="暂无数据">
        <div class="custom-tree-node" slot-scope="{ node, data }">
          <el-row>
            <el-col :span="24">
@@ -427,7 +370,8 @@
          <div class="search_input">
            <el-input v-model="sampleCode" size="small" clearable :disabled="sampleCodeBtnDisabled">
              <el-tooltip :content="sampleCodeBtnDisabled?'手动输入':'扫码枪输入'" placement="top" slot="append">
                <el-button type="primary" icon="el-icon-edit" @click="sampleCodeBtnDisabled=!sampleCodeBtnDisabled"></el-button>
                <el-button type="primary" icon="el-icon-edit"
                  @click="sampleCodeBtnDisabled = !sampleCodeBtnDisabled"></el-button>
              </el-tooltip>
            </el-input>
          </div>
@@ -446,14 +390,8 @@
      </span>
    </el-dialog>
    <el-dialog title="纠正复核" :visible="upInsReviewDia" width="600px" :close-on-click-modal="false" :show-close="false">
      <el-radio-group
        v-model="verifyPlanInfo.type"
        style="display: flex;flex-direction: column"
        v-if="upInsReviewDia"
      >
        <el-radio :label="1" style="margin: 10px 0; "
        :inert="false">继续测试下一个样品或其他站点任务</el-radio
        >
      <el-radio-group v-model="verifyPlanInfo.type" style="display: flex;flex-direction: column" v-if="upInsReviewDia">
        <el-radio :label="1" style="margin: 10px 0; " :inert="false">继续测试下一个样品或其他站点任务</el-radio>
        <el-radio :label="0" style="margin: 10px 0; " :inert="false">再次检验该样品</el-radio>
        <el-radio :label="2" style="margin: 10px 0; " :inert="false">此委托单结束</el-radio>
        <p style="font-size: 12px;color:red">
@@ -461,20 +399,15 @@
        </p>
      </el-radio-group>
      <p style="margin-top: 16px;margin-bottom: 6px;"><span style="color:red;margin-right: 4px;">*</span>纠正原因:</p>
      <el-input
        type="textarea"
        :rows="2"
        placeholder="请输入"
        v-model="verifyPlanInfo.tell">
      <el-input type="textarea" :rows="2" placeholder="请输入" v-model="verifyPlanInfo.tell">
      </el-input>
      <span slot="footer" class="dialog-footer">
        <el-button @click="upInsReviewDia = false">取 消</el-button>
        <el-button type="primary" @click="upInsReview" :loading="reviewLoading"
          >确 定</el-button
        >
        <el-button type="primary" @click="upInsReview" :loading="reviewLoading">确 定</el-button>
      </span>
    </el-dialog>
    <input id="ScanCodeInfo" v-model="codeInfo" @keyup.enter="keyup" style="opacity: 0;height: 0px;margin: 0px;padding: 0px;position: absolute;top: 0;"></input>
    <input id="ScanCodeInfo" v-model="codeInfo" @keyup.enter="keyup"
      style="opacity: 0;height: 0px;margin: 0px;padding: 0px;position: absolute;top: 0;"></input>
  </div>
</template>
@@ -570,6 +503,10 @@
                  insState: null,
                  userId: null,
            sampleCode:null,
          orderBy: {
            field: 'createTime,appointed,sendTime,insTime,submitTime',
            order: 'asc'
          }
               },
          sortable:true,
               isIndex: true,
@@ -1364,6 +1301,16 @@
        this.$set(this.verifyPlanInfo,'tell',null)
        this.$set(this.verifyPlanInfo,'type',null)
        this.upInsReviewDia = true
    },
    sortChange(ob) {
      this.componentData.entity.orderBy = {}
      this.componentData.entity.orderBy.field = ob.prop
      if (ob.order == 'ascending') {
        this.componentData.entity.orderBy.order = 'asc'
      } else if (ob.order == 'descending') {
        this.componentData.entity.orderBy.order = 'desc'
      }
      this.refreshTable()
      }
      }
   }