licp
2024-12-19 36a30a262c16b6c37be7d1817c46d6693a324cc4
src/components/do/b1-inspect-order-plan/Inspection.vue
@@ -259,7 +259,7 @@
    <el-row class="title">
      <el-col :span="12" style="padding-left: 20px;text-align: left;" :class="{noShow:noBack}">检验单详情
      </el-col>
      <el-col :span="12" style="text-align: right;display: flex;align-items: center;justify-content: end;margin-top: 16px;">
      <el-col :span="12" style="text-align: right;display: flex;align-items: center;justify-content: end;margin-bottom: 16px;">
        <el-button size="small" type="primary" @click="versionDialogVisible=true" v-if="state==1&&tableLists.find(m=>m.templateId==currentTable)&&tableLists.find(m=>m.templateId==currentTable).templateName.includes('电路试验')">电调/非电调模板切换</el-button>
        <el-select v-model="template" size="medium" placeholder="电路预设模板" style="margin-right: 10px;margin-left: 10px;" v-if="state==1&&tableLists.find(m=>m.templateId==currentTable)&&tableLists.find(m=>m.templateId==currentTable).templateName.includes('电路试验')"
          @change="selectInsProductTemplateById">
@@ -757,7 +757,7 @@
      }"
      v-if="state==1&&fileAdd"
      :on-success="handleSuccessUp" :show-file-list="false"
        accept='.jpg,.jpeg,.png,.gif,.docx,.xls,.xlsx,.pdf,.zip,.rar,.csv' :headers="headers" :on-change="beforeUpload"
        accept='.jpg,.jpeg,.png,.gif,.docx,.xls,.xlsx,.pdf,.zip,.rar,.csv' :headers="headers" :before-upload="beforeUpload"
        style="width: 80px !important;"
        :on-error="onError" ref='upload'>
        <el-button size="small" type="primary" v-if="state==1">附件上传</el-button></el-upload>
@@ -802,7 +802,7 @@
    </el-drawer>
    <el-dialog title="检验复核" :visible.sync="reviewDia" width="500px">
      <div class="body" style="display: flex;padding: 10px;" v-if="reviewDia">
        <div class="search_label" style="width: 150px;"><span class="required-span">* </span>不通过的理由:</div>
        <div class="search_label" style="width: 150px;"><span class="required-span">* </span>再次试验的理由:</div>
        <div class="search_input" style="width: 100%;">
          <el-input size="small" clearable v-model="noReason" type="textarea" :autosize="{ minRows: 4}"></el-input>
        </div>
@@ -3319,7 +3319,7 @@
          this.addVerifyDia = true
        }
      },
      handleSubmit(){
      async handleSubmit(){
        if(!this.otherForm.temperature){
          this.$message.error('请输入温度')
          return
@@ -3328,8 +3328,12 @@
          this.$message.error('请输入湿度')
          return
        }
        if(this.sonLaboratory === '电路试验'&&!this.$refs.CircuitParameters.saveAll()){
        this.loading = true
        if(this.sonLaboratory === '电路试验'&&!(await this.$refs.CircuitParameters.saveAll())){
          this.loading = false
          return
        }else{
          this.loading = false
        }
        this.experimentDia = true
        this.newUserInfo = []
@@ -3720,22 +3724,39 @@
        let list = await this.getCurrentProduct(this.currentFiberOptic.id,2)
        this.getTableLists0(list)
      },
      handleSuccessUp(response, ) {
      async handleSuccessUp(response, ) {
        this.upLoading = false;
            if (response.code == 200) {
          this.$message.success('上传成功');
          this.$refs.fileList.selectList()
          if(this.sonLaboratory === '电路试验'){
            // // 电路试验数采
            // 获取当前样品的检验项
            let list = await this.getCurrentProduct(this.currentSample.id,0)
            this.currentSample.insProduct = this.HaveJson(list)
            this.currentNum++
          }
            }else {
          this.$message.error(response.message);
            }
         },
      beforeUpload(file) {
            if (file.size > 1024 * 1024 * 10) {
               this.$message.error('上传文件不超过10M');
               this.$refs.upload.clearFiles()
               return false;
            } else {
          this.upLoading = true;
               return true;
            }
        if(this.sonLaboratory === '电路试验'&&(file.name.includes('交调')||file.name.includes('互调'))&&!this.$refs.CircuitParameters.allBandList.find(m=>m.band)){
          this.$message.error('上传附件前请先填写并保存频段');
          return false
        }else{
          // if(file.name.includes('交调')||file.name.includes('互调')){
          //   this.$refs.CircuitParameters.saveAll()
          // }
          if (file.size > 1024 * 1024 * 10) {
            this.$message.error('上传文件不超过10M');
            this.$refs.upload.clearFiles()
            return false;
          } else {
            this.upLoading = true;
            return true;
          }
        }
         },
      onError(err, file, fileList) {
            this.$message.error('上传失败')
@@ -3833,9 +3854,13 @@
            confirmButtonText: '确定',
            cancelButtonText: '取消',
            type: 'warning'
          }).then(() => {
            if(this.$refs.CircuitParameters.saveAll()){
          }).then(async () => {
            this.loading = true
            if(await this.$refs.CircuitParameters.saveAll()){
              this.$emit('goback')
              this.loading = false
            }else{
              this.loading = false
            }
          })
        }else{