zouyu
2023-12-26 a0c0c57709d1f2f82f536a02b113f65d7b338209
src/views/quality/rawMaterial/rawMaterial-form.vue
@@ -28,16 +28,16 @@
            </el-col>
              <el-col :span="6">
                <el-form-item label="零件号" prop="code">
                <el-input v-model="dataForm.code" disabled>
                <el-input v-model="dataForm.code">
                  <el-button
                    slot="append"
                    icon="el-icon-search"
                    :disabled="resultVal!=null && dataForm.id!=null"
                    :disabled="resultVal!=null"
                    @click="queryCode"></el-button>
                    <el-button
                    slot="append"
                    icon="el-icon-full-screen"
                    :disabled="resultVal!=null && dataForm.id!=null"
                    :disabled="resultVal!=null"
                    @click="Turnonthecamera"></el-button>
                </el-input>
                </el-form-item>
@@ -115,14 +115,14 @@
        <el-tabs class="rawMaterial-detail" @tab-click="tabsClick">
          <el-tab-pane label="检验项目">
            <el-row style="width:100%;z-index: 10;height:50px;">
                <el-col :xs="12" :lg="18"></el-col>
                <el-col :xs="4" :lg="2" style="text-align: right;">
                <el-col :sm="12" :lg="18"></el-col>
                <el-col :sm="4" :lg="2" style="text-align: right;">
                  <el-button v-if="dataForm.id==null" size="small" @click="clickAddLine()">添加检验项目</el-button>
                </el-col>
                <el-col :xs="4" :lg="2" style="text-align: right;">
                <el-col :sm="4" :lg="2" style="text-align: right;">
                  <el-button class="pad-addcol-btn" v-if="resultVal==null || dataForm.id==null" size="small" @click="addTeatValueColumn()">添加检测值列</el-button>
                </el-col>
                <el-col :xs="4" :lg="2" style="text-align: right;">
                <el-col :sm="4" :lg="2" style="text-align: right;">
                  <el-button v-if="resultVal==null || dataForm.id==null" size="small" @click="delTeatValueColumn()">删除检测值列</el-button>
                </el-col>
            </el-row>
@@ -241,6 +241,7 @@
              element-loading-text="请稍等,文件上传中"
            >
              <el-upload
                :disabled="dataForm.rawInsNo==null"
                drag
                ref="upload"
                action="/mes/rawInsProduct/upload"
@@ -388,11 +389,13 @@
  updateRawInsProduct,
  updateRawInspectsById,
  getProcessConfigFiles,
  downloadProcessConfigFile,
  deleteProcessConfigFile,
  updateDeviceById, chooseIFS} from '@/api/quality/rawMaterial'
  import rawMaterialPartDialog from '@/views/common/rawMaterial-part'
  import { getStore } from '@/util/store'
  import qrCodeApp from '@/views/common/qrCodeApp'
  import transformImage from '@/util/fileTransform'
  export default {
  components:{
    rawMaterialPartDialog,
@@ -491,6 +494,10 @@
    methods:{
      tabsClick(tab,even){
        if(tab.index == 1){
          if(this.dataForm.rawInsNo==null){
            this.$message.error("请先保存原材料检验信息")
            return
          }
            this.getConfigFiles();
        }
      },
@@ -504,11 +511,11 @@
        })
      },
      downloadProcessConfigFile(row) {
        // downloadProcessConfigFile(
        //   row.fileName,
        //   row.bucketName,
        //   row.originalFileName
        // )
        downloadProcessConfigFile({
            bucket: row.bucketName,
            fileName: row.fileName,
            originalFileName: row.originalFileName
        })
      },
      delProcessConfigFile(row) {
          this.$confirm('是否删除该附件', '提示', {
@@ -516,13 +523,11 @@
            cancelButtonText: '取消',
            type: 'warning',
            closeOnClickModal: false
          }).then(function() {
            return deleteProcessConfigFile(row.id)
          }).then((data) => {
            this.getConfigFiles()
          })
            .then(function() {
              return deleteProcessConfigFile(row.id)
            })
            .then((data) => {
              this.getConfigFiles()
            })
      },
      submitUpload() {
        this.paramData.rawInsNo = this.dataForm.rawInsNo
@@ -537,7 +542,6 @@
        this.deviceCode = false
      },
      getDeviceResultInfo(val){
        console.log("扫描后数据",val);
        let id=val.split("id@")[1]
        if(id!=undefined&&id!=''&&id!=null){
          let filterData=this.deviceList.filter(item=>{