spring
2025-02-18 58da649268732dfb1ca4b03ecf3453c4496fb98c
src/components/view/b1-inspect-order-plan.vue
@@ -277,6 +277,7 @@
            <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) ||(scope.row.checkName&&!scope.row.checkName.includes(userName))" 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>
@@ -442,6 +443,34 @@
      <span slot="footer" class="dialog-footer">
        <el-button @click="exportVisible = false">取 消</el-button>
        <el-button type="primary" @click="confirmExport" :loading="upLoadExport">确 定</el-button>
      </span>
    </el-dialog>
    <el-dialog title="纠正复核" :visible.sync="upInsReviewDia" width="600px">
      <el-radio-group
        v-model="verifyPlanInfo.type"
        style="display: flex;flex-direction: column"
      >
        <el-radio :label="1" style="margin: 10px 0; "
          >继续测试下一个样品或其他站点任务</el-radio
        >
        <el-radio :label="0" style="margin: 10px 0; ">再次检验该样品</el-radio>
        <el-radio :label="2" style="margin: 10px 0; ">此委托单结束</el-radio>
        <p style="font-size: 12px;color:red">
          慎重:如果还有其他样品在检,点击结束可能会中断,请确保所有样品都检验且复核完成再点击
        </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>
      <span slot="footer" class="dialog-footer">
        <el-button @click="upInsReviewDia = false">取 消</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>
@@ -682,6 +711,7 @@
        getInsProduct2:false,
        claim:false,
        review:false,
        verifyPlan2:false,
        connect:false,
        inspection:false,
        isLook:false,//是否是查看历史页面
@@ -704,12 +734,16 @@
          ids:[]
        },
        sampleCodeBtnDisabled:true,
        upInsReviewDia:false,
        verifyPlanInfo:{},
        reviewLoading:false
         }
      },
    watch:{
      qrCodeVisible(newVal){
        if(newVal){
            // this.$message.success('扫码:打开')
            this.selectList()
            this.sampleCode = null
            this.entrustCode = null
            let input = document.getElementById('ScanCodeInfo');
@@ -774,20 +808,37 @@
          this.storageList = this.HaveJson(res.data).map(item=>{
            item.warehouseShelfList&&item.warehouseShelfList.length>0&&item.warehouseShelfList.map(m=>{
              let warehouseShelfList = [];
              for (let i=1;i<m.row+1;i++){
                let warehouseShelfList0 = []
                for (let j=1;j<m.col+1;j++){
              let warehouseShelfList0 = []
              let warehouseCellList = m.warehouseCellList?m.warehouseCellList:[]
              warehouseCellList.forEach(a=>{
                if(warehouseShelfList.find(n=>n.id==a.row)){
                  warehouseShelfList0.push({
                    name:j+' 列',
                    id:j,
                    name:a.col+'列',
                    id:a.col
                  })
                }else if(warehouseShelfList.length==0){
                  warehouseShelfList.push({
                    name:a.row+'层',
                    id:a.row
                  })
                  warehouseShelfList0.push({
                    name:a.col+'列',
                    id:a.col
                  })
                }else if(!warehouseShelfList.find(n=>n.id==a.row)){
                  warehouseShelfList[warehouseShelfList.length-1].warehouseShelfList = JSON.parse(JSON.stringify(warehouseShelfList0))
                  warehouseShelfList0 = []
                  warehouseShelfList.push({
                    name:a.row+'层',
                    id:a.row
                  })
                  warehouseShelfList0.push({
                    name:a.col+'列',
                    id:a.col
                  })
                }
                warehouseShelfList.push({
                  name:i+' 层',
                  id:i,
                  warehouseShelfList:warehouseShelfList0
                })
              }
              })
              warehouseShelfList[warehouseShelfList.length-1].warehouseShelfList = JSON.parse(JSON.stringify(warehouseShelfList0))
              m.warehouseShelfList = warehouseShelfList;
              return m;
            })
@@ -941,6 +992,7 @@
            let review = false
        let claim = false
        let jumpTeam = false
        let verifyPlan2 = false
        // let getInsProduct2 = false
        // let getInsOrderUserList = false
            for (var i = 0; i < power.length; i++) {
@@ -952,6 +1004,9 @@
               }
               if (power[i].menuMethod == 'verifyPlan') {
                  review = true
               }
          if (power[i].menuMethod == 'verifyPlan2') {
                  verifyPlan2 = true
               }
          if (power[i].menuMethod == 'claimInsOrderPlan') {
                  claim = true
@@ -967,27 +1022,27 @@
               }
          if (power[i].menuMethod == 'scanInsOrderState') {
                  this.selectWarehouse = true
            this.selectList()
               }
            }
        // if (!getInsProduct2) {
            //    this.componentData.do.splice(5, 1)
            // }
            if (!claim) {
               this.componentData.do.splice(4, 1)
            }
            if (!review) {
               this.componentData.do.splice(3, 1)
            }
        if (!connect) {
               this.componentData.do.splice(2, 1)
            }
            if (!inspection) {
               this.componentData.do.splice(1, 1)
            }
            // if (!claim) {
            //    this.componentData.do.splice(4, 1)
            // }
            // if (!review) {
            //    this.componentData.do.splice(3, 1)
            // }
        // if (!connect) {
            //    this.componentData.do.splice(2, 1)
            // }
            // if (!inspection) {
            //    this.componentData.do.splice(1, 1)
            // }
        // this.getInsProduct2 = getInsProduct2
        this.claim = claim
        this.review = review
        this.verifyPlan2 =verifyPlan2
        this.connect = connect
        this.inspection = inspection
        this.jumpTeam = jumpTeam
@@ -1270,6 +1325,39 @@
        this.orderStateId = this.currentHistory.orderStateId
        this.num1 = row.num
        this.historyDialogVisible = false
      },
      // 纠正复核
      upInsReview(){
        if(this.verifyPlanInfo.type!=0&&this.verifyPlanInfo.type!=1&&this.verifyPlanInfo.type!=2){
          return this.$message.error("请选择复核状态");
        }
        if(!this.verifyPlanInfo.tell){
          return this.$message.error("请输入纠正复核的原因");
        }
        this.reviewLoading = true;
        this.$axios
          .post(this.$api.insOrderPlan.verifyPlan2, {
            sampleId: this.verifyPlanInfo.sampleId,
            type: this.verifyPlanInfo.type,
            laboratory: this.componentData.entity.sonLaboratory,
            tell: this.verifyPlanInfo.tell
          })
          .then(res => {
            if (res.code === 200) {
              this.$message.success("操作成功");
              this.upInsReviewDia = false;
              this.refreshTable()
            }
            this.reviewLoading = false;
          })
          .catch(error => {
            console.error(error);
            this.reviewLoading = false;
          });
      },
      handleReview0(row){
        this.verifyPlanInfo = row;
        this.upInsReviewDia = true
      }
      }
   }