value
2023-09-21 4f5549cd814eeaecd0ff04de62452d8d5fb4cbc5
src/components/view/processInspection.vue
@@ -25,17 +25,16 @@
        <el-input size="small" style="width: 224px;margin-right: 30px;" v-model="search.techfather"
          placeholder="请输入工序"></el-input>
        <el-button size="mini"><span>重 置</span></el-button>
        <el-button size="mini" @click="searchPro" type="primary" style="background: #004EA2;"><span>查 询</span></el-button>
            <el-button size="mini" @click="searchPro" type="primary" style="background: #004EA2;"><span>查
                  询</span></el-button>
      </div>
      <div class="content-body">
        <div class="inspectionTable">
          <el-table ref="inspectionTable" height="calc(100vh - 320px)" :cell-style="{ textAlign: 'center' }"
            :header-cell-style="{
               <el-table ref="inspectionTable" height="calc(100vh - 320px)" :header-cell-style="{
              border: '0px',
              background: '#f5f7fa',
              color: '#606266',
              boxShadow: 'inset 0 1px 0 #ebeef5',
              textAlign: 'center'
            }" border :data="inspectionTable" style="width: 100%">
            <el-table-column type="selection" width="50"> </el-table-column>
            <el-table-column label="序号" type="index" width="60"></el-table-column>
@@ -46,21 +45,23 @@
            <el-table-column prop="techname" label="工艺名称" min-width="70" />
            <el-table-column prop="unit" label="单位" min-width="50" />
            <el-table-column prop="quantity" label="数量" min-width="50" />
            <el-table-column prop="createTime" label="报检日期" min-width="60" />
                  <el-table-column prop="createTime" label="报检日期" min-width="70" />
            <el-table-column prop="name" label="报检人" min-width="50" />
            <el-table-column prop="updateTime" label="检测日期" min-width="60" />
            <el-table-column prop="result" label="合格状态" min-width="80">
                  <el-table-column prop="updateTime" label="检测日期" min-width="70" />
                  <el-table-column prop="result" label="合格状态" min-width="60">
              <template slot-scope="scope">
                <span style="color: #34BD66;" v-if="scope.row.result == 1">合格</span>
                <span style="color: #E84738;" v-else-if="scope.row.result == 0">不合格</span>
              </template>
            </el-table-column>
            <el-table-column label="操作" min-width="80">
                  <el-table-column label="操作" min-width="75">
              <template slot-scope="scope">
                <el-button type="text" size="small" @click="handleClick(scope.row)" style="margin-left: 0;">详情</el-button>
                <el-button type="text" size="small">查看</el-button>
                        <el-button type="text" size="small" @click="handleClick(scope.row)" style="margin-left: 0;"><span
                              style="font-size: 8px;">详情</span></el-button>
                        <el-button type="text" size="small" style="margin-left: 0;"><span
                              style="font-size: 8px;">查看</span></el-button>
                <el-button v-if="scope.row.result == null" type="text" size="small" style="margin-left: 0;"
                  @click="updateInsInfo(scope.row)">编辑</el-button>
                           @click="updateInsInfo(scope.row)"><span style="font-size: 8px;">编辑</span></el-button>
              </template>
            </el-table-column>
          </el-table>
@@ -68,8 +69,8 @@
        <!-- 分页器 -->
        <div class="pagination">
          <el-pagination :current-page="currentPage" :page-sizes="[10, 20, 30, 40]" :page-size="pageSize"
            layout="total, sizes, prev, pager, next, jumper" :total="inspectionTableTotal" @size-change="handleSizeChange"
            @current-change="handleCurrentChange" />
                  layout="total, sizes, prev, pager, next, jumper" :total="inspectionTableTotal"
                  @size-change="handleSizeChange" @current-change="handleCurrentChange" />
        </div>
      </div>
    </div>
@@ -98,9 +99,10 @@
              </el-col>
              <el-col :span="7">
                <el-form-item label="产品名称:">
                  <el-select style="width: 210px;" size="small" @change="selectSample" v-model="processInspectVo.material"
                    placeholder="请选择产品">
                    <el-option v-for="item in optionsSamplename" :key="item.value" :label="item.name" :value="item.name">
                           <el-select style="width: 210px;" size="small" @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>
                  </el-select>
                </el-form-item>
@@ -148,7 +150,8 @@
              </el-col>
              <el-col :span="7">
                <el-form-item label="数量:">
                  <el-input style="width: 210px;" size="small" v-model="processInspectVo.quantity" placeholder="请输入数量" />
                           <el-input style="width: 210px;" size="small" v-model="processInspectVo.quantity"
                              placeholder="请输入数量" />
                </el-form-item>
              </el-col>
              <el-col :span="10" style="display: flex;justify-content: end;">
@@ -192,21 +195,16 @@
          </el-table-column>
          <el-table-column prop="dname" label="试验设备" min-width="100">
            <template slot-scope="scope">
              <el-button v-if="!scope.row.isSelectDevice" type="text" @click="clickTableSelect(scope)">{{
                scope.row.dname == null ? "请选择" : scope.row.dname
                     <el-button type="text" @click="clickTableSelect(scope)">{{
                       scope.row.deviceId == null ? "请选择" : scope.row.deviceName
              }}</el-button>
              <el-select v-if="scope.row.isSelectDevice" style="width: 100%;" @change="clickNodeSure(scope.row)"
                v-model="filterText" placeholder="请选择">
                <el-option v-for="item in materialOptions" :key="item.id" :label="item.device" :value="item.id">
                </el-option>
              </el-select>
            </template>
          </el-table-column>
          <el-table-column label="结论">
            <template slot-scope="scope">
              <span style="color: #34BD66;" v-if="scope.row.result === 1">合格</span>
              <span style="color: #E84738;" v-else-if="scope.row.result === 0">不合格</span>
              <span v-show="scope.row.result === null">暂未结论</span>
                     <span v-show="scope.row.result === null">{{null}}</span>
            </template>
          </el-table-column>
          <!-- <el-table-column v-if="detailId == null" label="操作" width="100">
@@ -248,7 +246,10 @@
import processInspectionUpdate from '../view/processInspectionUpdate.vue'
import processInspectionLook from '../view/processInspectionLook.vue'
export default {
  components: { processInspectionUpdate, processInspectionLook },
      components: {
         processInspectionUpdate,
         processInspectionLook
      },
  data() {
    return {
      showUp: false,
@@ -289,8 +290,7 @@
        unit: null
      },
      InspectioniD: null,
      addInspectionform: [
        {
            addInspectionform: [{
          number: "",
          username: "",
          projectname: "",
@@ -303,18 +303,15 @@
          group: "",
          worker: "",
          machine: ""
        }]
      ,
            }],
      inspectionItems: [], // 新增检验项目表格
      inspectionResultForm: [
        {
            inspectionResultForm: [{
          id: "",
          name: "",
          inspecter: "",
          conclusion: "",
          operation: ""
        }
      ],
            }],
      options: [],
      value: "",
      rowList: [],
@@ -406,10 +403,7 @@
    },
    // 点击表格选择触发
    clickTableSelect(scope) {
      // this.centerDialogVisible = true;
      if (this.clickSelectDevice.index != null) {
        this.$set(this.inspectionItems[this.clickSelectDevice.index], 'isSelectDevice', false)
      }
            this.centerDialogVisible = true;
      this.clickSelectDevice.index = scope.$index;
      this.clickSelectDevice.rpId = scope.row.id;
      this.getOptions(scope.row)
@@ -469,7 +463,9 @@
          inspectionItemId: row.id,
          inspectionValue: str.slice(0, -1)
        }, {
          headers: { "Content-Type": "application/json" }
                  headers: {
                     "Content-Type": "application/json"
                  }
        }).then(res => {
          if (res.message === '内控值输入格式有问题!') {
            this.$message({
@@ -493,7 +489,12 @@
      this.search.countSize = val;
      this.defaultInitializationTable();
    },
    handleSpanMethod({ row, column, rowIndex, columnIndex }) {
         handleSpanMethod({
            row,
            column,
            rowIndex,
            columnIndex
         }) {
      if (columnIndex === 0) {
        const _row = this.spanArr[rowIndex];
        const _col = _row > 0 ? 1 : 0;
@@ -554,7 +555,9 @@
        techId: Number(val.technologyId),
        unit: val.unit
      }, {
        headers: { "Content-Type": "application/json" }
               headers: {
                  "Content-Type": "application/json"
               }
      }).then(res => {
        if (res.code === 201) {
          this.$message({
@@ -690,8 +693,7 @@
    },
    // 删除检验值列
    clickDeleteInspectionColumn() {
      if (this.empiricalValueAdd - 1 === 0) {
      } else {
            if (this.empiricalValueAdd - 1 === 0) {} else {
        if (this.empiricalValueAddMaxNumber != this.empiricalValueAdd - 1) {
          this.empiricalValueAdd = this.empiricalValueAdd - 1;
          this.inspectionItems.forEach(i => {