王震
2023-09-24 941fff624eddc4b9f369f1b91f65fdb50309851d
src/components/view/processInspectionUpdate.vue
@@ -24,29 +24,31 @@
                     <el-form-item label="产品名称:">
                        <el-select style="width: 210px;" size="small" disabled @change="selectSample"
                           v-model="processInspectVo.material" placeholder="请选择产品">
                           <el-option v-for="item in optionsSamplename" :key="item.value" :label="item.name" :value="item.name">
                           <el-option v-for="item in optionsSamplename" :key="item.value" :label="item.name"
                              :value="item.name">
                           </el-option>
                        </el-select>
                     </el-form-item>
                  </el-col>
                  <el-col :span="7">
                     <el-form-item label="产品编码:">
                        <el-input style="width: 210px;" size="small" disabled v-model="processInspectVo.materialCode"
                           placeholder="请输入产品编码" />
                        <el-input style="width: 210px;" size="small" disabled
                           v-model="processInspectVo.materialCode" placeholder="请输入产品编码" />
                     </el-form-item>
                  </el-col>
               </el-row>
               <el-row :gutter="230">
                  <el-col :span="7">
                     <el-form-item label="规格型号:">
                        <el-input style="width: 210px;" size="small" disabled v-model="processInspectVo.specificationsModel"
                           placeholder="请输入规格型号" />
                        <el-input style="width: 210px;" size="small" disabled
                           v-model="processInspectVo.specificationsModel" placeholder="请输入规格型号" />
                     </el-form-item>
                  </el-col>
                  <el-col :span="7">
                     <el-form-item label="工序名称:">
                        <el-select @change="changeOptionSoptionSprocesses" disabled v-model="processInspectVo.techfather"
                           placeholder="请选择" style="width: 210px;" size="small">
                        <el-select @change="changeOptionSoptionSprocesses" disabled
                           v-model="processInspectVo.techfather" placeholder="请选择" style="width: 210px;"
                           size="small">
                           <el-option v-for="item in optionSoptionSprocesses" :key="item.name" :label="item.name"
                              :value="item.name">
                           </el-option>
@@ -55,8 +57,8 @@
                  </el-col>
                  <el-col :span="7">
                     <el-form-item label="工艺名称:">
                        <el-select v-model="processInspectVo.techname" disabled placeholder="请选择" style="width: 210px;"
                           size="small">
                        <el-select v-model="processInspectVo.techname" disabled placeholder="请选择"
                           style="width: 210px;" size="small">
                           <el-option v-for="item in optionTechnology" :key="item.id" :label="item.name"
                              :value="item.id + '-' + item.name">
                           </el-option>
@@ -89,7 +91,8 @@
            <el-col :span="12" class="inspectionProject_span">检验项目</el-col>
            <el-col v-if="!isUpBtn" :span="12" class="inspectionProject_span">
               <el-button size="mini" @click="clickDeleteInspectionColumn()">删除检验值列</el-button>
               <el-button style="margin-right: 30px;" size="mini" @click="clickAddInspectionColumn()">添加检验值列</el-button>
               <el-button style="margin-right: 30px;" size="mini"
                  @click="clickAddInspectionColumn()">添加检验值列</el-button>
               <!-- <el-button
              size="mini"
              style="margin-right: 30px;"
@@ -165,10 +168,11 @@
         <div class="div_device_dialog">
            <el-input placeholder="输入关键字进行过滤" v-model="filterText" style="margin-bottom: 6px;">
            </el-input>
            <el-tree class="filter-tree" :data="materialOptions" :props="defaultProps" default-expand-all highlight-current
               @node-click="nodeClick" :filter-node-method="filterNode" ref="tree">
            <el-tree class="filter-tree" :data="materialOptions" :props="defaultProps" default-expand-all
               highlight-current @node-click="nodeClick" :filter-node-method="filterNode" ref="tree">
               <div class="custom-tree-node" slot-scope="{ data }">
                  <span><i :class="`node_i ${data.children ? 'el-icon-folder-opened' : 'el-icon-tickets'}`"></i>{{ data.name }}</span>
                  <span><i :class="`node_i ${data.children ? 'el-icon-folder-opened' : 'el-icon-tickets'}`"></i>{{
                     data.name }}</span>
               </div>
            </el-tree>
         </div>
@@ -317,6 +321,41 @@
               });
               return
            }
         let pro = this.inspectionItems.filter(item => {
            return item.result === 0;
         })
         if (pro.length > 0) {
            this.$prompt('请输入不合格数量', '不合格数量', {
               confirmButtonText: '确定',
               cancelButtonText: '取消',
               inputPattern: /^\d+$/,
               inputErrorMessage: '请输入正确数字格式'
            }).then(({ value }) => {
               this.$axios.post(this.$api.url.processInspectUpdateProcessInspectsById, {
                  id: this.detailId,
                  number: value
               }).then(res => {
                  if (res.code == 200) {
                     // this.$message({
                     //    message: '上报成功',
                     //    type: 'success'
                     // });
                     this.$parent.combackMain(true)
                  } else {
                     this.$message({
                        message: res.message,
                        type: 'warning'
                     });
                  }
               })
            }).catch(() => {
               this.$message({
                  type: 'info',
                  message: '取消输入'
               });
            });
         } else {
            this.$axios.post(this.$api.url.processInspectUpdateProcessInspectsById, {
               id: this.detailId
            }).then(res => {
@@ -341,6 +380,7 @@
               }
            })
         }
         },
         handleClick() {},
         updateInsInfo(row) {