王震
2023-09-24 941fff624eddc4b9f369f1b91f65fdb50309851d
src/components/view/finishedProductInspectionUp.vue
@@ -24,14 +24,14 @@
                  </el-col>
                  <el-col :span="7">
                     <el-form-item label="客户名称:">
                        <el-input disabled style="width: 180px;" v-model="processInspectVo.prname" placeholder="请输入客户名称"
                           autocomplete="off" />
                        <el-input disabled style="width: 180px;" v-model="processInspectVo.prname"
                           placeholder="请输入客户名称" autocomplete="off" />
                     </el-form-item>
                  </el-col>
                  <el-col :span="7">
                     <el-form-item label="工程名称:">
                        <el-input disabled style="width: 180px;" v-model="processInspectVo.sname" placeholder="请输入工程名称"
                           autocomplete="off" />
                        <el-input disabled style="width: 180px;" v-model="processInspectVo.sname"
                           placeholder="请输入工程名称" autocomplete="off" />
                     </el-form-item>
                  </el-col>
               </el-row>
@@ -54,8 +54,8 @@
                  </el-col>
                  <el-col :span="7">
                     <el-form-item label="产品编码:">
                        <el-input disabled style="width: 180px;" v-model="processInspectVo.mcode" placeholder="请输入产品编码"
                           autocomplete="off" />
                        <el-input disabled style="width: 180px;" v-model="processInspectVo.mcode"
                           placeholder="请输入产品编码" autocomplete="off" />
                     </el-form-item>
                  </el-col>
               </el-row>
@@ -68,14 +68,14 @@
                  </el-col>
                  <el-col :span="7">
                     <el-form-item label="单位:">
                        <el-input disabled style="width: 180px;" v-model="processInspectVo.unit" placeholder="请输入产品编码"
                           autocomplete="off" />
                        <el-input disabled style="width: 180px;" v-model="processInspectVo.unit"
                           placeholder="请输入产品编码" autocomplete="off" />
                     </el-form-item>
                  </el-col>
                  <el-col :span="7">
                     <el-form-item label="数量:">
                        <el-input disabled style="width: 180px;" v-model="processInspectVo.quantity" placeholder="请输入数量"
                           autocomplete="off" />
                        <el-input disabled style="width: 180px;" v-model="processInspectVo.quantity"
                           placeholder="请输入数量" autocomplete="off" />
                     </el-form-item>
                  </el-col>
                  <el-col :span="3" style="display: flex;justify-content: end;">
@@ -88,9 +88,11 @@
      <div class="inspectionProject">
         <el-row>
            <el-col :span="12" class="inspectionProject_span">检验项目</el-col>
            <el-col v-if="!isUpBtn" :span="12" class="inspectionProject_span" style="display: flex;justify-content: end;">
            <el-col v-if="!isUpBtn" :span="12" class="inspectionProject_span"
               style="display: flex;justify-content: end;">
               <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;"
@@ -164,11 +166,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>
@@ -321,17 +323,21 @@
               });
               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.finishedInspectUpdateFinishInspectsById, {
               id: this.detailId
                  id: this.detailId,
                  number: value
            }).then(res => {
               if (res.code == 200) {
                  if (res.message === '项目未检验完!') {
                     this.$message({
                        message: res.message,
                        type: 'warning'
                     });
                     return
                  }
                  this.$message({
                     message: '上报成功',
                     type: 'success'
@@ -343,8 +349,39 @@
                     type: 'warning'
                  });
               }
            })
               })
            }).catch(() => {
               this.$message({
                  type: 'info',
                  message: '取消输入'
               });
            });
         } else {
            this.$axios.post(this.$api.url.finishedInspectUpdateFinishInspectsById, {
               id: this.detailId
            }).then(res => {
               if (res.code == 200) {
                  if (res.message === '项目未检验完!') {
                     this.$message({
                        message: res.message,
                        type: 'warning'
                     });
                     return
                  }
                  // this.$message({
                  //    message: '上报成功',
                  //    type: 'success'
                  // });
                  this.$parent.comBackMain(true)
               } else {
                  this.$message({
                     message: res.message,
                     type: 'warning'
                  });
               }
            })
         }
         },
         changeOptionsSamplename() {
            let id = this.processInspectVo.material.split("-")[0]