licp
2024-12-09 a20109bc9662cd6638900fe1a6975d69cbd3f896
电路试验互调数采
已修改3个文件
61 ■■■■■ 文件已修改
src/components/do/b1-inspect-order-plan/Inspection.vue 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/do/b1-inspect-order-plan/circuit-parameters1.vue 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/do/b1-inspect-order-plan/circuit-parameters2.vue 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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>
@@ -3720,22 +3720,35 @@
        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++
          }
                }
            },
      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 === '电路试验'&&!this.$refs.CircuitParameters.allBandList.find(m=>m.band)){
          this.$message.error('上传附件前请先填写并保存频段');
          return false
        }else{
          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('上传失败')
src/components/do/b1-inspect-order-plan/circuit-parameters1.vue
@@ -36,9 +36,8 @@
      <el-col :span="7">
        <div style="display: flex;align-items: center;justify-content: flex-end;flex-wrap: wrap;" class="btns" v-if="!isLook">
          <el-button type="primary" size="small" @click="addList(allBandList,'频段')" :disabled="state>1" style="margin: 4px;">添加频段</el-button>
          <el-button size="small" @click="deleteList(allBandList.length-1,allBandList,'删除频段')" :disabled="state>1" style="margin: 4px;">删除频段</el-button>
          <el-button type="primary" size="small" @click="addList(angleList)" :disabled="state>1" style="margin: 4px;">添加角度</el-button>
          <el-button size="small" @click="deleteList(angleList.length-1,angleList)" :disabled="state>1" style="margin: 4px;">删除角度</el-button>
          <el-button type="success" size="small" @click="addList(angleList)" :disabled="state>1" style="margin: 4px;">添加角度</el-button>
          <el-button size="small" @click="deleteList(angleList.length-1,angleList)" :disabled="state>1" style="margin: 4px;" type="danger">删除角度</el-button>
        </div>
      </el-col>
    </el-row>
@@ -70,8 +69,9 @@
            :value="item.value">
          </el-option>
        </el-select>
        <el-button size="small" @click="deleteList(y,allBandList,'删除频段')" :disabled="state>1" style="margin-left: 16px;" type="danger">删除频段</el-button>
        <el-button type="primary" size="small" @click="addList(h.projectList,'互调')" style="margin-left: 16px;" :disabled="state>1" v-show="!isLook&&intermodulationNum>0">添加互调</el-button>
        <el-button size="small" @click="deleteList(0,h.projectList,'互调')" :disabled="state>1" v-show="!isLook&&intermodulationNum>0">删除互调</el-button>
        <!-- <el-button size="small" @click="deleteList(0,h.projectList,'互调')" :disabled="state>1" v-show="!isLook&&intermodulationNum>0">删除互调</el-button> -->
        <el-button type="primary" size="small" @click="save(h,y)" :disabled="state>1" :loading="loading[y]" v-show="!isLook">保 存</el-button>
      </div>
      <el-divider></el-divider>
@@ -145,6 +145,7 @@
                            :value="item.value">
                          </el-option>
                        </el-select>
                        <el-button type="danger" icon="el-icon-delete" circle size="small" @click="deleteList(j,h.projectList,'互调')" :disabled="state>1" v-show="!isLook&&intermodulationNum>0" style="margin-left: 20px;"></el-button>
                      </div>
                    </td>
                  </tr>
@@ -581,11 +582,11 @@
      this.upTemplateState = false;
      if(list.length>1){
        if(type=='互调'){
          let index = null;
          // let index = null;
          let num = 0;
          list.forEach((m,i)=>{
            if(m.inspectionItemSubclass.includes('互调')){
              index = i;
              // index = i;
              num++
            }
          })
src/components/do/b1-inspect-order-plan/circuit-parameters2.vue
@@ -36,9 +36,8 @@
      <el-col :span="7" v-if="!isLook">
        <div style="display: flex;align-items: center;justify-content: flex-end;" class="btns">
          <el-button type="primary" size="small" @click="addList(allBandList,'频段')" :disabled="state>1" style="margin: 4px;">添加频段</el-button>
          <el-button size="small" @click="deleteList(allBandList.length-1,allBandList,'删除频段')" :disabled="state>1" style="margin: 4px;">删除频段</el-button>
          <el-button type="primary" size="small" @click="addList(angleList)" v-if="!(state>1)&&intermodulationNum>0" style="margin: 4px;">添加角度</el-button>
          <el-button size="small" @click="deleteList(angleList.length-1,angleList)" v-if="!(state>1)&&intermodulationNum>0" style="margin: 4px;">删除角度</el-button>
          <el-button type="success" size="small" @click="addList(angleList)" v-if="!(state>1)&&intermodulationNum>0" style="margin: 4px;">添加角度</el-button>
          <el-button size="small" @click="deleteList(angleList.length-1,angleList)" v-if="!(state>1)&&intermodulationNum>0" style="margin: 4px;" type="danger">删除角度</el-button>
        </div>
      </el-col>
    </el-row>
@@ -70,8 +69,9 @@
            :value="item.value">
          </el-option>
        </el-select>
        <el-button size="small" @click="deleteList(y,allBandList,'删除频段')" :disabled="state>1" style="margin-left: 16px;" type="danger">删除频段</el-button>
        <el-button type="primary" size="small" @click="addList(h.projectList,'互调')" style="margin-left: 16px;" v-if="intermodulationNum>0&&!(state>1)">添加互调</el-button>
        <el-button size="small" @click="deleteList(0,h.projectList,'互调')" v-if="intermodulationNum>0&&!(state>1)">删除互调</el-button>
        <!-- <el-button size="small" @click="deleteList(0,h.projectList,'互调')" v-if="intermodulationNum>0&&!(state>1)">删除互调</el-button> -->
        <el-button type="primary" size="small" @click="save(h,y)" :disabled="state>1" :loading="loading[y]" style="margin-left: 16px;" v-show="!isLook">保 存</el-button>
      </div>
      <el-divider></el-divider>
@@ -145,6 +145,7 @@
                            :value="item.value">
                          </el-option>
                        </el-select>
                        <el-button type="danger" icon="el-icon-delete" circle size="small" @click="deleteList(j,h.projectList,'互调')" :disabled="state>1" v-show="!isLook&&intermodulationNum>0" style="margin-left: 20px;"></el-button>
                      </div>
                    </td>
                  </tr>
@@ -454,11 +455,11 @@
      this.upTemplateState = false
      if(list.length>1){
        if(type=='互调'){
          let index = null;
          // let index = null;
          let num = 0;
          list.forEach((m,i)=>{
            if(m.inspectionItemSubclass.includes('互调')){
              index = i;
              // index = i;
              num++
            }
          })