licp
2024-04-01 d5c18517bf33ae8eafcf2e34ac11fe11a0bfd761
src/components/do/b1-inspect-order-plan/Inspection.vue
@@ -124,6 +124,7 @@
         <el-col :span="12" style="text-align: right;">
            <el-button size="small" type="primary" @click="sampleVisible=true">样品切换</el-button>
            <el-button size="small" type="primary" @click="taskVisible=true">任务切换</el-button>
        <el-button size="small" type="primary" @click="submit" v-show="state==1" :loading="submitLoading">提交</el-button>
        <!-- 复核 -->
        <el-button size="medium" type="primary" @click="upInsReview(1)" :loading="reviewLoading"
                  v-show="state>1">通过</el-button>
@@ -241,7 +242,7 @@
            :componentData="componentData" :key="upIndex" />
      </el-drawer>
    <el-dialog title="检验复核" :visible.sync="reviewDia" width="400px">
         <div class="body" style="display: flex;align-items: center;" v-if="reviewDia">
         <div class="body" style="display: flex;" v-if="reviewDia">
            <div class="search_label" style="width: 120px;"><span class="required-span">* </span>不通过原因:</div>
            <div class="search_input">
               <el-input size="small" clearable v-model="noReason" type="textarea" :autosize="{ minRows: 3, maxRows: 5}"></el-input>
@@ -266,6 +267,7 @@
         return {
            sampleVisible: false,
            taskVisible: false,
        submitLoading:false,
            searchForm: {
               sampleName: null,
               state: null
@@ -331,7 +333,8 @@
         id(val) {
            this.loading = true
            this.$axios.post(this.$api.insOrderPlan.doInsOrder, {
               id: val
               id: val,
          laboratory: this.sonLaboratory
            }).then(res => {
               this.insOrder = res.data.insOrder;
               this.urgentList.forEach(m => {
@@ -820,16 +823,12 @@
            type:1,
            laboratory:this.sonLaboratory,
            tell:null
          }, {
               headers: {
                  'Content-Type': 'application/json'
               }
          }).then(res => {
            if (res.code === 200 && res.data) {
              this.reviewLoading = false;
              this.$message.success("复核通过")
            if (res.code === 200) {
              this.$message.success("操作成功")
              this.$emit('goback')
            }
            this.reviewLoading = false;
          }).catch(error => {
            console.error(error)
            this.reviewLoading = false;
@@ -847,16 +846,12 @@
            type:0,
            laboratory:this.sonLaboratory,
            tell:this.noReason
          }, {
               headers: {
                  'Content-Type': 'application/json'
               }
          }).then(res => {
            if (res.code === 200 && res.data) {
              this.reviewLoading = false;
              this.$message.success("复核不通过")
            if (res.code === 200) {
              this.$message.success("操作成功")
              this.$emit('goback')
            }
            this.reviewLoading = false;
          }).catch(error => {
            console.error(error)
            this.reviewLoading = false;
@@ -865,6 +860,22 @@
          this.$message.error('未输入不通过原因')
        }
      },
      submit(){
        this.submitLoading = true;
        this.$axios.post(this.$api.insOrderPlan.submitPlan, {
            orderId:this.orderId,
            laboratory:this.sonLaboratory,
        }).then(res => {
          if (res.code === 200) {
            this.$message.success("操作成功")
            this.$emit('goback')
          }
          this.submitLoading = false;
        }).catch(error => {
          console.error(error)
          this.submitLoading = false;
        })
      }
     }
}
</script>