licp
2024-09-03 07959b422026f1de7bbd90af23e440ebd4fea567
src/components/do/b1-inspect-order-plan/Inspection.vue
@@ -261,9 +261,10 @@
        <el-button size="small" type="primary" @click="handleSubmit" v-if="state==1"
          :loading="submitLoading">提交</el-button>
        <!-- 复核 -->
        <el-button size="medium" type="primary" @click="upInsReview(1)" :loading="reviewLoading"
          v-if="state>1">通过</el-button>
        <el-button size="medium" @click="upInsReview(0)" v-if="state>1">不通过</el-button>
        <el-button size="small" type="primary" @click="upInsReview(1)" :loading="reviewLoading"
          v-if="state>1">继续试验</el-button>
        <el-button size="small" @click="upInsReview(0)" v-if="state>1" type="danger">再次试验</el-button>
        <el-button size="small" @click="upInsReview(2)" v-if="state>1">结束试验</el-button>
        <el-button size="small" @click="$emit('goback')">返回</el-button>
      </el-col>
    </el-row>
@@ -438,6 +439,9 @@
                  </template>
                  <template v-else-if="n.v.ps!=undefined && n.v.ps.value==='样品型号'">
                    <div :style="`font-family:${n.v.ff} !important;`" v-if="currentSample.model!==undefined&&currentSample.model!==null">{{currentSample.model}}</div>
                  </template>
                  <template v-else-if="n.v.ps!=undefined && n.v.ps.value==='试验标准'">
                    <div :style="`font-family:${n.v.ff} !important;`" v-if="currentSample.testRequirements!==undefined&&currentSample.testRequirements!==null">{{currentSample.testRequirements}}</div>
                  </template>
                  <template v-else-if="n.v.ps!=undefined && n.v.ps.value==='套管'">
                    <div style="display: flex;flex-wrap: nowrap;align-items: center;">
@@ -2738,6 +2742,7 @@
              }
            }
          })
          console.log(4444,a.template)
          // 操作赋值--主要赋值单位,试验方法等信息
          ids.forEach(id => {
            for (let b = 0; b < a.template.length; b++) {
@@ -2750,6 +2755,9 @@
                    .ps.value === '检测方法')) {
                  a.template[b].v.v = id.product.methodS
                }
                // if (a.template[b].v.ps != undefined && (a.template[b].v.ps.value === '试验标准')) {
                //   a.template[b].v.v = id.product.testRequirements
                // }
              }
            }
          })
@@ -3291,12 +3299,12 @@
      },
      // 复核
      upInsReview(e) {
        if (e == 1) {
          // 通过
        if (e == 1||e==2) {
          // 继续试验
          this.reviewLoading = true;
          this.$axios.post(this.$api.insOrderPlan.verifyPlan, {
            orderId: this.orderId,
            type: 1,
            type: e,
            laboratory: this.sonLaboratory,
            tell: null
          }).then(res => {
@@ -3309,8 +3317,8 @@
            console.error(error)
            this.reviewLoading = false;
          })
        } else {
          // 不通过
        } else{
          // 再次试验
          this.reviewDia = true;
        }
      },
@@ -3337,7 +3345,7 @@
        }
      },
      handleSubmit(){
        if(this.insOrder.departmentLims=='检测中心'&&this.insOrder.orderType=='C'){
        if(this.insOrder.orderType=='C'){
          this.verifyUser = this.insOrder.prepareUserId
          this.submit()
        }else{
@@ -3402,8 +3410,9 @@
                  orderId: this.orderId,
                  laboratory: this.sonLaboratory,
                  verifyUser: this.verifyUser
                }).then(res => {
                }).then( res => {
                  if (res.code === 200) {
                    this.submitLoading = false;
                    this.$message.success("操作成功")
                    this.$emit('goback')
                  }
@@ -3414,13 +3423,26 @@
            }
          }
          this.submitLoading = false;
        }).catch(error => {
          console.error(error)
          this.submitLoading = false;
        })
        return
      },
      async handleCType(){
        if(this.insOrder.departmentLims=='质量部'){
          await this.$axios.post(this.$api.insOrderPlan.verifyPlan, {
            orderId: this.orderId,
            type: 1,
            laboratory: this.sonLaboratory,
            tell: null
          }).then(res => {
            if (res.code === 200) {
            }
          }).catch(error => {
          })
        }
      },
      // 统一在这里保存数据
      saveInsContext() {
        try {