zouyu
2023-11-06 6c39483f61a39553ad5993147d58e2d17e3b6f89
Merge branch 'master' of http://114.132.189.42:9002/r/mes-ocea-before
已修改9个文件
已添加3个文件
718 ■■■■■ 文件已修改
package.json 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/equipment/metering.js 53 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/quality/processInspect.js 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/quality/rawMaterial.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/common/ztt-table.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/equipment/equipment/index.vue 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/equipment/metering/index.vue 268 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/equipment/metering/metering-form.vue 201 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/quality/finishedProductInspection/finishedProduct-form.vue 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/quality/processInspect/index.vue 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/quality/processInspect/processInspect-form.vue 110 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/quality/processconfiguration/index.vue 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
package.json
@@ -46,7 +46,8 @@
    "vue-quill-editor": "3.0.6",
    "vue-router": "^3.0.2",
    "vuedraggable": "^2.24.3",
    "vuex": "^3.0.1"
    "vuex": "^3.0.1",
    "xlsx-style": "^0.8.13"
  },
  "devDependencies": {
    "@vue/cli-plugin-babel": "~3.8.0",
src/api/equipment/metering.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,53 @@
import request from '@/router/axios'
export function fetchList(query) {
  return request({
    url: '/mes/equipmentDevice/page',
    method: 'get',
    params: query
  })
}
export function pullEquip() {
  return request({
    url: '/mes/equipmentDevice/updateDevicd',
    method: 'post',
  })
}
export function addObj(obj) {
  return request({
    url: '/mes/equipmentDevice/addDevicd',
    method: 'post',
    data: obj
  })
}
export function getObj(id) {
  return request({
    url: '/mes/equipmentDevice/' + id,
    method: 'get'
  })
}
export function delObj(id) {
  return request({
    url: '/mes/equipmentDevice/' + id,
    method: 'delete'
  })
}
export function putObj(obj) {
  return request({
    url: '/mes/equipmentDevice/updateDevicd',
    method: 'post',
    data: obj
  })
}
export function getEquipmentPageByWorkstation(id) {
  return request({
    url: '/mes/equipmentDevice/page/' + id,
    method: 'get'
  })
}
src/api/quality/processInspect.js
@@ -78,3 +78,19 @@
        params: obj
    })
}
export function selectDevice() {
  return request({
    url: '/mes/qualityProcessInsProduct/selectDevice',
    method: 'get',
  })
}
export function exportProcessInsProduct(query) {
  return request({
    url: '/mes/qualityProcessInspect/exportExcel',
    method: 'get',
    responseType : 'blob',
    params: query
  })
}
src/api/quality/rawMaterial.js
@@ -10,7 +10,7 @@
export function selectDevice() {
  return request({
    url: '/mes/rawInsProduct/selectDevice',
    url: '/mes/qualityFinishedInsProduct/scope',
    method: 'get',
  })
}
src/views/common/ztt-table.vue
@@ -937,7 +937,7 @@
      }
    },
    getDataList(selectedId) {
      this.dataListLoading = true
      // this.dataListLoading = true
      var criteria = {}
      criteria.dateTimeFilters = this.dateTimeFilters
      criteria.multiSearchFilter = this.multiSearchFilter
src/views/equipment/equipment/index.vue
@@ -198,12 +198,12 @@
            type: 'primary',
            fun: this.addOrUpdateHandle
          },
          {
            text: '同步',
            type: 'primary',
            loading: false,
            fun: this.pullEquipFun
          }
          // {
          //   text: '同步',
          //   type: 'primary',
          //   loading: false,
          //   fun: this.pullEquipFun
          // }
        ],
        operator: [
          {
src/views/equipment/metering/index.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,268 @@
<template>
    <div class="mod-config">
      <basic-container>
        <ttable
          :table="table"
          @handleSelectionChange="handleSelectionChange"
          :uploadInfo="uploadInfo"
          :prelang="prelang"
          :options="options"
          :ajaxFun="ajaxFun"
          ref="equipmentTable"
        >
          <template #toolbar></template>
        </ttable>
        <!-- å¼¹çª—, æ–°å¢ž / ä¿®æ”¹ -->
        <table-form
          v-if="addOrUpdateVisible"
          ref="addOrUpdate"
          @refreshDataList="getData"
        ></table-form>
      </basic-container>
    </div>
  </template>
  <script>
  import { delObj, fetchList,pullEquip } from '@/api/equipment/metering'
  import TableForm from './metering-form'
  import ttable from '@/views/common/ztt-table.vue'
  import { mapGetters } from 'vuex'
  import * as fecha from 'element-ui/lib/utils/date'
  import { remote } from '../../../api/admin/dict'
  export default {
    data() {
      return {
        ajaxFun: fetchList,
        multipleSelection: [],
        uploadInfo: {
          // æ˜¯å¦å±•示上传EXCEL以及对应的url
          isShow: true,
          url: '/mes/equipment/upload'
        },
        prelang: 'workstation',
        options: {
          height: 300, // é»˜è®¤é«˜åº¦-为了表头固定
          stripe: true, // æ˜¯å¦ä¸ºæ–‘马纹 table
          highlightCurrentRow: false, // æ˜¯å¦è¦é«˜äº®å½“前行
          border: true, // æ˜¯å¦æœ‰çºµå‘边框
          lazy: false, // æ˜¯å¦éœ€è¦æ‡’加载
          fit: true, // åˆ—的宽度是否自撑开
          multiSelect: true, //
          seqNo: true,
          isRefresh: true, // æ˜¯å¦æ˜¾ç¤ºåˆ·æ–°æŒ‰é’®
          isShowHide: true, // æ˜¯å¦æ˜¾ç¤ºæ˜¾å½±æŒ‰é’®
          isSearch: false, // é«˜çº§æŸ¥è¯¢æŒ‰é’®
          defaultOrderBy: { column: 'manufactureDate', direction: 'desc' }
        },
        table: {
          total: 0,
          currentPage: 1,
          pageSize: 20,
          data: [],
          // æ ‡é¢˜
          column: [
            // è®¾å¤‡ç¼–号
            {
              minWidth: '30',
              prop: 'code',
              label: '设备编号',
              sort: true,
              isTrue: true,
              formatter: (row, column, cellValue) => {
                return cellValue
              },
              isSearch: true,
              searchInfoType: 'text'
            },
            // è®¾å¤‡åç§°
            {
              minWidth: '30',
              prop: 'name',
              label: '设备名称',
              sort: true,
              isTrue: true,
              isSearch: true,
              searchInfoType: 'text'
            },
            // å·¥åŽ‚
            // {
            //   minWidth: '30',
            //   prop: 'factoryName',
            //   label: '工厂',
            //   sort: true,
            //   isTrue: true,
            //   isSearch: true,
            //   searchInfoType: 'text'
            // },
            {
              minWidth: '30',
              prop: 'type',
              label: '设备类型',
            //   sort: true,
              isTrue: true,
              isSearch: true,
            //   searchInfoType: 'select',
              formatter: this.workShopFormatter,
            //   optList: () => {
            //     return this.workshopList
            //   }
            },
            // åž‹å·è§„æ ¼
            {
              minWidth: '30',
              prop: 'supplier',
              label: '厂家',
              sort: true,
              isTrue: true,
              isSearch: false,
              searchInfoType: 'text'
            },
                         // çŠ¶æ€
                         {
              minWidth: '30',
              prop: 'status',
              label: '状态',
              sort: true,
              isTrue: true,
              isSearch: true,
              searchInfoType: 'text'
            },
            // åˆ¶é€ æ—¥æœŸ
            {
              minWidth: '150',
              width: '250',
              prop: 'createTime',
              label: '创建时间',
              sort: true,
              isTrue: true,
              formatter: this.formatReceiveTime,
              isSearch: true,
              searchInfoType: 'datetime'
            },
            {
              minWidth: '150',
              width: '250',
              prop: 'updateTime',
              label: '修改时间',
              sort: true,
              isTrue: true,
              formatter: this.formatReceiveTime,
              isSearch: true,
              searchInfoType: 'datetime'
            },
          ],
          toolbar: [
            {
              text: '新增',
              type: 'primary',
              fun: this.addOrUpdateHandle
            },
            // {
            //   text: '同步',
            //   type: 'primary',
            //   loading: false,
            //   fun: this.pullEquipFun
            // }
          ],
          operator: [
            {
              text: '修改',
              icon: 'el-icon-edit',
              type: 'text',
              size: 'small',
              fun: this.addOrUpdateHandle
            },
            {
              text: '删除',
              icon: 'el-icon-delete',
              type: 'text',
              size: 'small',
              fun: this.deleteHandle
            }
          ],
          operatorConfig: {
            fixed: 'right',
            label: '操作',
            width: 130,
            minWidth: 130
          }
        },
        addOrUpdateVisible: false,
        workshopList: []
      }
    },
    components: {
      ttable,
      TableForm
    },
    computed: {
      ...mapGetters(['permissions'])
    },
    created() {
      remote('work_shop').then((response) => {
        if (response.data.code === 0) {
          this.workshopList = response.data.data
        } else {
          this.workshopList = []
        }
      })
    },
    methods: {
      pullEquipFun(){
        this.table.toolbar.find((e) => e.text === '同步').loading = true
        pullEquip().then(res=>{
          this.$message.success(res.data.data.msg)
          this.table.toolbar.find((e) => e.text === '同步').loading = false
        }).catch(error=>{
          this.$message.error("同步失败",error)
          this.getData()
          this.table.toolbar.find((e) => e.text === '同步').loading = false
        })
      },
      workShopFormatter(row, column, cellValue) {
        if(cellValue==='原材料检验'){
            cellValue=="原材料检验"
        }
        if(cellValue==='过程检验'){
            cellValue=="过程检验"
        }
        return cellValue
      },
      // èŽ·å–æ•°æ®åˆ—è¡¨
      getData() {
        this.$refs.equipmentTable.getDataList()
      },
      formatReceiveTime(row, column, cellValue) {
        return cellValue ? fecha.format(new Date(cellValue), 'yyyy-MM-dd HH:mm:ss') : ''
      },
      handleSelectionChange(val) {
        this.multipleSelection = val
      },
      // æ–°å¢ž / ä¿®æ”¹
      addOrUpdateHandle(row) {
        this.addOrUpdateVisible = true
        this.$nextTick(() => {
          this.$refs.addOrUpdate.init(row == null ? null : row.id)
        })
      },
      // åˆ é™¤
      deleteHandle(row) {
        this.$confirm('是否确认删除设备名称为' + row.name, '提示', {
          confirmButtonText: '确定',
          cancelButtonText: '取消',
          closeOnClickModal: false,
          type: 'warning'
        })
          .then(function() {
            return delObj(row.id)
          })
          .then((data) => {
            this.$message.success('删除成功')
            this.getData()
          })
      }
    }
  }
  </script>
src/views/equipment/metering/metering-form.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,201 @@
<template>
    <el-dialog
      :title="!dataForm.id ? '新增' : '修改'"
      :close-on-click-modal="false"
      :visible.sync="visible"
    >
      <el-form
        :model="dataForm"
        :rules="dataRule"
        ref="dataForm"
        label-width="80px"
        class="l-mes"
      >
        <el-row>
          <el-col :span="12">
            <el-form-item label="编号" prop="code">
              <el-input v-model="dataForm.code" placeholder="编号"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="名称" prop="name">
              <el-input v-model="dataForm.name" placeholder="名称"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="类型" prop="type">
              <el-select
                v-model="dataForm.type"
                filterable
                placeholder="请选择"
                style="width:100%"
              >
                <el-option
                  v-for="item in workshopList"
                  :key="item.id"
                  :label="item.label"
                  :value="item.value"
                >
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="厂家" prop="supplier">
              <el-input
                v-model="dataForm.supplier"
                placeholder="厂家"
              ></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="状态" prop="state">
              <el-select
                v-model="dataForm.status"
                placeholder="状态"
                filterable
                style="width: 100%"
              >
                <el-option
                  v-for="item in equipmentState"
                  :key="item.id"
                  :label="item.label"
                  :value="item.label"
                />
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button @click="visible = false">取消</el-button>
        <el-button
          type="primary"
          :disabled="isSubmit"
          v-thinclick="`dataFormSubmit`"
          >确定</el-button
        >
      </span>
    </el-dialog>
  </template>
  <script>
  import { getObj, addObj, putObj } from '@/api/equipment/metering'
  import { loadFactoryList } from '@/api/basic/factory'
  import { remote } from '../../../api/admin/dict'
  export default {
    data() {
      return {
        // options: regionData,
        visible: false,
        dataForm: {
          id: 0,
          number: '',
          name: '',
          factoryId: '',
          workshop: '',
          position: '',
          email: '',
          supplier: '',
          manufacturer: '',
          typeSpecification: '',
          manufactureDate: '',
          installDate: '',
          state: '',
          description: '',
          value1: '',
          code: null,
          type: null,
          status: null,
          supplier: null
        },
        dataRule: {
          number: [{ required: true, message: '编号不能为空', trigger: 'blur' }],
          name: [{ required: true, message: '名称不能为空', trigger: 'blur' }]
        },
        factoryOptions: [],
        equipmentState: [],
        isSubmit: false,
        workshopList: [{
            label: "原材料检验",
            value: '原材料检验'
        },{
            label: '过程检验',
            value: '过程检验'
        }]
      }
    },
    methods: {
      init(id) {
        this.dataForm.id = id || 0
        this.visible = true
        this.$nextTick(() => {
          this.$refs.dataForm.resetFields()
          if (this.dataForm.id) {
            getObj(this.dataForm.id).then((response) => {
              this.dataForm = response.data.data
            })
          } else {
            if (this.factoryOptions.length > 0) {
              this.dataForm.factoryId = this.factoryOptions[0].id
            }
          }
        })
      },
      // è¡¨å•提交
      getEquipmentState() {
        remote('equipment_state').then((response) => {
          if (response.data.code === 0) {
            this.equipmentState = response.data.data
          }
        })
      },
      dataFormSubmit() {
        this.isSubmit = true
        this.$refs.dataForm.validate((valid) => {
          if (valid) {
            if (this.dataForm.id) {
              putObj(this.dataForm).then((data) => {
                this.$message.success('修改成功')
                this.visible = false
                this.isSubmit = false
                this.$emit('refreshDataList')
              })
            } else {
              addObj(this.dataForm).then((data) => {
                this.$message.success('添加成功')
                this.visible = false
                this.isSubmit = false
                this.$emit('refreshDataList')
              })
            }
          } else {
            this.isSubmit = false
          }
        })
      },
      initFactorySelect() {
        loadFactoryList().then((res) => {
          this.factoryOptions = res.data
          if (this.factoryOptions.length > 0) {
            this.dataForm.factoryId = this.factoryOptions[0].id
          }
        })
      }
    },
    created() {
      this.initFactorySelect()
      this.getEquipmentState()
    //   remote('work_shop').then((response) => {
    //     if (response.data.code === 0) {
    //       this.workshopList = response.data.data
    //     } else {
    //       this.workshopList = []
    //     }
    //   })
    }
  }
  </script>
src/views/quality/finishedProductInspection/finishedProduct-form.vue
@@ -97,6 +97,7 @@
                        <el-table-column prop="inspectionValue" v-for="(item, index) in empiricalValueAdd" :key="index" label="检测值"
                            width="240" style="text-align: center;">
                            <template slot-scope="scope">
                                <el-col v-if="scope.row.itype === '1'">
                                <el-tooltip v-if="scope.row.iname!=null" :disabled="scope.row.eId != null" 
                                class="item" effect="dark" content="请先选择设备!"
                                    placement="top-start">
@@ -104,17 +105,31 @@
                                        @blur="changeState(scope.row, index)" placeholder="请输入检测值"></el-input>
                                    <span v-if="resultVal != null" v-text="scope.row.empiricalValueAddss[index]"></span>
                                    </el-tooltip>
                                </el-col>
                                <el-col v-else>
                                        <el-tooltip v-if="scope.row.iname != null" :disabled="scope.row.eId != null"
                                            class="item" effect="dark" content="请先选择设备!" placement="top-start">
                                            <el-select style="width: 100%;" @change="changeState(scope.row, index)" :disabled="scope.row.eId == null" v-model="scope.row.empiricalValueAddss[index]" placeholder="请选择">
                                                <el-option v-for="item in dataVal" :key="item.value" :label="item.label"
                                                    :value="item.value">
                                                </el-option>
                                            </el-select>
                                            <span v-if="resultVal != null && processInspectVo.id != null"
                                                v-text="scope.row.empiricalValueAddss[index]"></span>
                                        </el-tooltip>
                                    </el-col>
                            </template>
                        </el-table-column>
                        <el-table-column prop="deviceName" label="试验设备" min-width="250">
                            <template slot-scope="scope">
                                <span v-if="resultVal!=null && processInspectVo.id!=null" v-text="scope.row.ename"></span>
                                <div v-else>
                                    <el-select style="width:100%" v-model="scope.row.eId"
                                    <el-input  v-model="scope.row.eId"  v-if="scope.row.iname != null" placeholder="请输入设备号"></el-input>
                                    <!-- <el-select style="width:100%" v-model="scope.row.eId"
                                    v-if="scope.row.iname != null" filterable @change="updateDevice(scope.row,scope.$index)">
                                        <el-option v-for="(item,index) in deviceList" 
                                        :key="index" :value="item.id" :label="item.number +'-'+ item.name"></el-option>
                                    </el-select>
                                    </el-select> -->
                                </div>
                            </template>
                        </el-table-column>
@@ -175,6 +190,13 @@
export default {
    data() {
        return {
            dataVal: [{
                label: '是',
                value: '是'
            }, {
                label: '否',
                value: '否'
            }],
            resultVal: null,
            deviceList: [],
            hasChildren: true,
@@ -220,6 +242,7 @@
        this.init()
    },
    methods: {
        submitSave(){
            let pro = 0
            this.inspectionItems.forEach(item => {
@@ -323,7 +346,8 @@
        },
        getDeviceList(){
            selectDevice(null).then(res=>{
                this.deviceList = res.data.data
                // this.deviceList = res.data.data
                console.log(res);
            })
        },
        updateDevice(row,index){
src/views/quality/processInspect/index.vue
@@ -20,7 +20,8 @@
    import ttable from '@/views/common/ztt-table.vue'
    import * as fecha from 'element-ui/lib/utils/date'
    import processInspectForm from './processInspect-form'
    import { page,deleteById } from '@/api/quality/processInspect'
    import { transform } from '@/util/fileTransform'
    import { page,deleteById,exportProcessInsProduct } from '@/api/quality/processInspect'
    export default {
        components: {
            processInspectForm,
@@ -153,6 +154,7 @@
                    },
                    {
                        text: '导出',
                        fun: this.exportExcel
                    }
                    ],
                    operator: [{
@@ -172,6 +174,14 @@
        },
        created() { },
        methods: {
            exportExcel(){
                let queryParam=this.$refs.processInspect.getQueryParam();
                delete queryParam.criteria
                console.log(queryParam);
                exportProcessInsProduct(queryParam).then((res)=>{
                    transform(res)
                })
            },
            deleteHandle(row){
                this.$confirm('确认删除该数据吗?', '提示', {
                confirmButtonText: '确定',
src/views/quality/processInspect/processInspect-form.vue
@@ -13,8 +13,8 @@
        </div>
        <div class="page-main">
            <div class="finishedProduct-basic">
                <el-form :model="processInspectVo" ref="addInspectionform" class="l-mes"
                label-position="right" label-width="120px" style="width: 100%" size="small">
                <el-form :model="processInspectVo" ref="addInspectionform" class="l-mes" label-position="right"
                    label-width="120px" style="width: 100%" size="small">
                    <div class="formwrapper">
                        <el-row>
                            <el-col :span="6">
@@ -25,24 +25,25 @@
                            </el-col>
                            <el-col :span="6">
                                <el-form-item label="产品名称:">
                                    <el-select style="width: 100%" @change="changeOptionsSamplename" :disabled="processInspectVo.id != null"
                                        v-model="processInspectVo.material" size="small" placeholder="请选择产品名称">
                                        <el-option v-for="(item,index) in optionsSamplename" :key="index" :label="item.material"
                                            :value="item.materialCode">
                                    <el-select style="width: 100%" @change="changeOptionsSamplename"
                                        :disabled="processInspectVo.id != null" v-model="processInspectVo.material"
                                        size="small" placeholder="请选择产品名称">
                                        <el-option v-for="(item, index) in optionsSamplename" :key="index"
                                            :label="item.material" :value="item.materialCode">
                                        </el-option>
                                    </el-select>
                                </el-form-item>
                            </el-col>
                            <el-col :span="6">
                                <el-form-item label="产品编码:">
                                    <el-input disabled v-model="processInspectVo.materialCode"
                                        placeholder="请输入产品编码" autocomplete="off" />
                                    <el-input disabled v-model="processInspectVo.materialCode" placeholder="请输入产品编码"
                                        autocomplete="off" />
                                </el-form-item>
                            </el-col>
                            <el-col :span="6">
                                <el-form-item label="规格型号:">
                                    <el-input disabled v-model="processInspectVo.specs"
                                        placeholder="请输入规格型号" autocomplete="off" />
                                    <el-input disabled v-model="processInspectVo.specs" placeholder="请输入规格型号"
                                        autocomplete="off" />
                                </el-form-item>
                            </el-col>
                        </el-row>
@@ -59,16 +60,16 @@
                            </el-col>
                            <el-col :span="6">
                                <el-form-item label="单位:">
                                    <el-input disabled v-model="processInspectVo.unit"
                                        placeholder="请输入单位" autocomplete="off" />
                                    <el-input disabled v-model="processInspectVo.unit" placeholder="请输入单位"
                                        autocomplete="off" />
                                </el-form-item>
                            </el-col>
                        </el-row>
                        <el-row>
                            <el-col :span="6">
                                <el-form-item label="数量:">
                                    <el-input v-model="processInspectVo.quantity" placeholder="请输入数量"
                                        autocomplete="off" :disabled="processInspectVo.id != null" />
                                    <el-input v-model="processInspectVo.quantity" placeholder="请输入数量" autocomplete="off"
                                        :disabled="processInspectVo.id != null" />
                                </el-form-item>
                            </el-col>
                        </el-row>
@@ -87,33 +88,52 @@
                    <el-col :span="24">
                        <el-table border :data="inspectionItems" height="400"
                            :header-cell-style="{textAlign:'center',color:'black',backgroundColor:'#fafafa'}" 
                            :cell-style="{textAlign:'center'}" row-key="iid" default-expand-all
                            style="width: 100%" ref="table" :tree-props="{children: 'children', hasChildren: 'hasChildren'}">
                            :cell-style="{ textAlign: 'center' }" row-key="iid" default-expand-all style="width: 100%"
                            ref="table" :tree-props="{ children: 'children', hasChildren: 'hasChildren' }">
                            <el-table-column type="index" label="序号" width="60"></el-table-column>
                            <el-table-column label="项目" prop="father" width="240" ></el-table-column>
                            <el-table-column prop="iname" label="指标" width="240" ></el-table-column>
                            <el-table-column prop="iunit" label="单位" width="240" ></el-table-column>
                            <el-table-column prop="required" label="标准值" width="240" ></el-table-column>
                            <el-table-column prop="inspectionValue" v-for="(item, index) in empiricalValueAdd" :key="index" label="检测值"
                                width="240" style="text-align: center;">
                            <el-table-column prop="inspectionValue" v-for="(item, index) in empiricalValueAdd" :key="index"
                                label="检测值" width="240" style="text-align: center;">
                                <template slot-scope="scope">
                                    <el-col v-if="scope.row.itype === '1'">
                                        <el-tooltip v-if="scope.row.iname!=null" :disabled="scope.row.eId != null" 
                                        class="item" effect="dark" content="请先选择设备!"
                                            placement="top-start">
                                            <el-input :disabled="scope.row.eId == null" v-model="scope.row.empiricalValueAddss[index]"
                                            class="item" effect="dark" content="请先选择设备!" placement="top-start">
                                            <el-input :disabled="scope.row.eId == null"
                                                v-model="scope.row.empiricalValueAddss[index]"
                                                @blur="changeState(scope.row, index)" placeholder="请输入检测值"></el-input>
                                            <span v-if="resultVal != null && processInspectVo.id!=null" v-text="scope.row.empiricalValueAddss[index]"></span>
                                            <span v-if="resultVal != null && processInspectVo.id != null"
                                                v-text="scope.row.empiricalValueAddss[index]"></span>
                                        </el-tooltip>
                                    </el-col>
                                    <el-col v-else>
                                        <el-tooltip v-if="scope.row.iname != null" :disabled="scope.row.eId != null"
                                            class="item" effect="dark" content="请先选择设备!" placement="top-start">
                                            <!-- <el-input :disabled="scope.row.eId == null"
                                                v-model="scope.row.empiricalValueAddss[index]"
                                                @blur="changeState(scope.row, index)" placeholder="请输入检测值"></el-input> -->
                                            <el-select style="width: 100%;" @change="changeState(scope.row, index)" :disabled="scope.row.eId == null" v-model="scope.row.empiricalValueAddss[index]" placeholder="请选择">
                                                <el-option v-for="item in dataVal" :key="item.value" :label="item.label"
                                                    :value="item.value">
                                                </el-option>
                                            </el-select>
                                            <span v-if="resultVal != null && processInspectVo.id != null"
                                                v-text="scope.row.empiricalValueAddss[index]"></span>
                                        </el-tooltip>
                                    </el-col>
                                </template>
                            </el-table-column>
                            <el-table-column prop="deviceName" label="试验设备" min-width="250">
                                <template slot-scope="scope">
                                    <span v-if="resultVal != null && scope.row.iname != null" v-text="scope.row.ename"></span>
                                    <span v-if="resultVal != null && scope.row.iname != null"
                                        v-text="scope.row.ename"></span>
                                    <div v-else>
                                        <el-select style="width:100%" v-model="scope.row.eId"
                                        v-if="scope.row.iname != null" filterable @change="updateDevice(scope.row,scope.$index)">
                                            <el-option v-for="(item,index) in deviceList"
                                            :key="index" :value="item.id" :label="item.number +'-'+ item.name"></el-option>
                                        <el-select style="width:100%" v-model="scope.row.eId" v-if="scope.row.iname != null"
                                            filterable @change="updateDevice(scope.row, scope.$index)">
                                            <el-option v-for="(item, index) in deviceList" :key="index" :value="item.id"
                                                :label="item.code + '-' + item.name"></el-option>
                                        </el-select>
                                    </div>
                                </template>
@@ -151,7 +171,8 @@
                            </el-table-column>
                            <el-table-column  label="操作">
                                <template>
                                    <el-button type="text" :disabled="resultVal != null && processInspectVo.id!=null"  @click="submitSave()" size="small">上报</el-button>
                                    <el-button type="text" :disabled="resultVal != null && processInspectVo.id != null"
                                        @click="submitSave()" size="small">上报</el-button>
                                </template>
                            </el-table-column>
                        </el-table>
@@ -171,10 +192,17 @@
        updateProcessInsProduct,
        updateProcessInspectsById,
     } from '@/api/quality/processInspect'
    import { selectDevice } from '@/api/quality/rawMaterial'
import { selectDevice } from '@/api/quality/processInspect'
    export default {
        data() {
            return {
            dataVal: [{
                label: '是',
                value: '是'
            }, {
                label: '否',
                value: '否'
            }],
                resultVal: null,
                technologyList: [],
                deviceList: [],
@@ -333,10 +361,11 @@
                })
            },
            updateDevice(row,index){
                updateDeviceBypppId({equiomentId:row.eId,ppid:row.iId}).then(res=>{
            updateDeviceBypppId({ deviceId: row.eId, ppid: row.iid }).then(res => {
                    this.inspectionItems.forEach(obj=>{
                    console.log(obj);
                        if(obj.children){
                            obj.children[index-1].inspectionValue = ''
                        obj.children[index - 1].inspectionValue = null
                            obj.children[index-1].iresult = null
                            obj.children[index-1].empiricalValueAddss = []
                        }
@@ -367,7 +396,7 @@
                        return
                    }
                    let obj = {
                        equiomentId: row.eId,
                    devideId: row.eId,
                        ppid: row.iid,
                        inspectionValue: str
                    }
@@ -479,31 +508,24 @@
      border: 1px solid #ddd;
      box-sizing: border-box;
    }
    /*自定义disabled状态下checkbox的样式*/
    .completeproductstructure-checkout
      .el-checkbox__input.is-disabled.is-checked
      .el-checkbox__inner {
.completeproductstructure-checkout .el-checkbox__input.is-disabled.is-checked .el-checkbox__inner {
      background-color: #006eff;
      border-color: #006eff;
    }
    
    .completeproductstructure-checkout
      .el-checkbox__input.is-disabled.is-checked
      + span.el-checkbox__label {
.completeproductstructure-checkout .el-checkbox__input.is-disabled.is-checked+span.el-checkbox__label {
      color: #006eff;
      border-color: #006eff;
    }
    
    .completeproductstructure-checkout
      .el-checkbox__input.is-disabled
      .el-checkbox__inner {
.completeproductstructure-checkout .el-checkbox__input.is-disabled .el-checkbox__inner {
      background-color: #ffffff;
      cursor: pointer;
    }
    
    .completeproductstructure-checkout
      .el-checkbox__input.is-disabled
      + span.el-checkbox__label {
.completeproductstructure-checkout .el-checkbox__input.is-disabled+span.el-checkbox__label {
      color: #606266;
      cursor: pointer;
    }
src/views/quality/processconfiguration/index.vue
@@ -43,14 +43,23 @@
                      <el-radio label="接收">接收</el-radio>
                      <el-radio label="降级使用">降级使用</el-radio> 
                      <el-radio label="报废">报废</el-radio> 
                      <el-radio label="降为他用">降为他用</el-radio>
                    </el-radio-group>
                </div>
                <div v-if="type ===  '过程检验'">
                    <el-radio-group v-model="checkList">
                      <el-row>
                          <div style="padding: 20px;">
                      <el-radio label="返修">返修</el-radio>
                      <el-radio label="接收">接收</el-radio>
                      <el-radio label="降级使用">降级使用</el-radio> 
                      <el-radio label="报废">报废</el-radio> 
                          </div>
                          <div style="padding: 20px;">
                          <el-radio label="返工">返工</el-radio>
                          <el-radio label="降为他用">降为他用</el-radio>
                          </div>
                    </el-row>
                    </el-radio-group>
                </div>
            </el-form>