zss
2025-02-19 b984c7c63ec686298846555bb2fe14839cc6e1c5
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) " 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,35 @@
      <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="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 :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">
          慎重:如果还有其他样品在检,点击结束可能会中断,请确保所有样品都检验且复核完成再点击
        </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 +712,7 @@
        getInsProduct2:false,
        claim:false,
        review:false,
        verifyPlan2:false,
        connect:false,
        inspection:false,
        isLook:false,//是否是查看历史页面
@@ -704,6 +735,12 @@
          ids:[]
        },
        sampleCodeBtnDisabled:true,
        upInsReviewDia:false,
        verifyPlanInfo:{
          tell:null,
          type:null
        },
        reviewLoading:false
         }
      },
    watch:{
@@ -959,6 +996,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++) {
@@ -970,6 +1008,9 @@
               }
               if (power[i].menuMethod == 'verifyPlan') {
                  review = true
               }
          if (power[i].menuMethod == 'verifyPlan2') {
                  verifyPlan2 = true
               }
          if (power[i].menuMethod == 'claimInsOrderPlan') {
                  claim = true
@@ -990,21 +1031,22 @@
        // 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
@@ -1287,6 +1329,41 @@
        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 = JSON.parse(JSON.stringify(row));
        this.$set(this.verifyPlanInfo,'tell',null)
        this.$set(this.verifyPlanInfo,'type',null)
        this.upInsReviewDia = true
      }
      }
   }