ysy пре 1 година
родитељ
комит
4ceb067af8

+ 1 - 1
src/views/factoryModel/station/components/edit.vue

@@ -97,7 +97,7 @@
               v-if="form.extInfo.type == 3"
             >
               <el-select
-                            style="width: 100%"
+                style="width: 100%"
                 v-model="form.extInfo.teamId"
                 clearable
                 :filterable="true"

+ 0 - 238
src/views/material/BOMmanage/qualityTesting/inspectionClassify/components/edit.vue

@@ -1,238 +0,0 @@
-<!-- 用户编辑弹窗 -->
-<template>
-  <el-dialog
-    class="ele-dialog-form"
-    title="质检项"
-    :visible.sync="visible"
-    :before-close="handleClose"
-    :close-on-click-modal="false"
-    :close-on-press-escape="false"
-    width="1000px"
-    append-to-body
-  >
-    <el-form ref="form" :model="form" :rules="rules" label-width="100px">
-      <el-table
-        style="margin-top: 15px"
-        :data="form.parameterStandards"
-        border
-        height="40vh"
-        @selection-change="handleSelectionChange"
-      >
-        <el-table-column type="selection" align="center" width="55">
-        </el-table-column>
-
-        <el-table-column :label="form.singleWeightDivision" align="center">
-          <el-table-column
-            label="参数上限"
-            align="center"
-            v-if="form.parameterType == 3"
-          >
-            <template slot-scope="scope">
-              <el-form-item label-width="0" prop="finalValue">
-                <el-input
-                  clearable
-                  :disabled="type == 'detail'"
-                  v-model="scope.row.finalValue"
-                  placeholder="请输入"
-                />
-              </el-form-item>
-            </template>
-          </el-table-column>
-          <el-table-column
-            label="参数下限"
-            align="center"
-            v-if="form.parameterType == 3"
-          >
-            <template slot-scope="scope">
-              <el-form-item label-width="0" prop="initialValue">
-                <el-input
-                  :disabled="type == 'detail'"
-                  clearable
-                  v-model="scope.row.initialValue"
-                  placeholder="请输入"
-                />
-              </el-form-item>
-            </template>
-          </el-table-column>
-          <el-table-column
-            label="默认值"
-            align="center"
-            v-if="form.parameterType != 3"
-          >
-            <template slot-scope="scope">
-              <el-form-item label-width="0" prop="defaultValue">
-                <el-input
-                  clearable
-                  :disabled="type == 'detail'"
-                  v-model="scope.row.defaultValue"
-                  placeholder="请输入"
-                />
-              </el-form-item>
-            </template>
-          </el-table-column>
-        </el-table-column>
-
-        <el-table-column :label="form.tolerance" align="center">
-          <el-table-column label="质检标准" align="center">
-            <template slot-scope="scope">
-              <el-form-item label-width="0" prop="inspectionStandard">
-                <el-input
-                  clearable
-                  v-model="scope.row.toleranceValue"
-                  placeholder="请输入"
-                  :disabled="type == 'detail'"
-                >
-                  <DictSelection
-                    style="width: 100px"
-                    slot="prepend"
-                    clearable
-                    :disabled="type == 'detail'"
-                    dictName="数学字符"
-                    v-model="scope.row.symbol"
-                  ></DictSelection>
-                </el-input>
-                <!-- </el-form-item> -->
-              </el-form-item>
-            </template>
-          </el-table-column>
-        </el-table-column>
-      </el-table>
-    </el-form>
-
-    <template v-slot:footer>
-      <el-button @click="handleClose">取消</el-button>
-      <el-button type="primary" :loading="loading" @click="save">
-        保存
-      </el-button>
-    </template>
-  </el-dialog>
-</template>
-
-<script>
-  import { EventBus } from '@/utils/eventBus';
-  export default {
-    components: {},
-
-    data() {
-      const defaultForm = function () {
-        return {
-          parameterStandards: [],
-          linePoints: []
-        };
-      };
-      return {
-        defaultForm,
-        // 表单数据
-        form: { ...defaultForm() },
-
-        // 表单验证规则
-        rules: {},
-        visible: false,
-
-        type: '',
-        loading: false,
-
-        multipleSelection: [],
-        rowObj: {}
-      };
-    },
-
-    created() {},
-    methods: {
-      open(type, rowItem) {
-        this.rowObj = rowItem;
-        let row = rowItem.qualityStandard || {};
-        this.type = type;
-        if (this.type != 'add') {
-          row.linePoints = row.linePoints || [];
-          if (!row.parameterStandards) {
-            row.parameterStandards = [];
-          } else {
-            row.singleWeightDivision =
-              row.parameterStandards[0]?.singleWeightDivision;
-            row.tolerance = row.parameterStandards[0]?.tolerance;
-            row.parameterType = row.parameterStandards[0]?.parameterType;
-          }
-          this.form = JSON.parse(JSON.stringify(row));
-  
-        }
-        this.visible = true;
-      },
-
-      handleSelectionChange(val) {
-        this.multipleSelection = val;
-      },
-
-      /* 保存编辑 */
-      save() {
-        let _row = JSON.parse(JSON.stringify(this.rowObj));
-        let row = _row.qualityStandard || {};
-
-        if (!row.parameterStandards) {
-          row.parameterStandards = [];
-        } else {
-          row.singleWeightDivision =
-            row.parameterStandards[0]?.singleWeightDivision;
-          row.tolerance = row.parameterStandards[0]?.tolerance;
-          row.parameterType = row.parameterStandards[0]?.parameterType;
-        }
-
-
-        row.parameterStandards = this.multipleSelection;
-        _row.qualityStandard = row;
-        EventBus.$emit('inspectionSelection', { message: _row });
-
-        this.handleClose();
-      },
-      restForm() {
-        this.form = { ...this.defaultForm() };
-        this.$nextTick(() => {
-          this.$refs.form.clearValidate();
-        });
-      },
-      handleClose() {
-        this.restForm();
-        this.visible = false;
-      }
-    }
-  };
-</script>
-
-<style lang="scss" scoped>
-  .location-warp {
-    display: flex;
-
-    .detail {
-      margin-left: 10px;
-    }
-  }
-
-  :deep(
-      .el-dialog:not(.ele-dialog-form)
-        .el-dialog__body
-        .el-form
-        .el-form-item:last-child
-    ) {
-    margin-bottom: 22px;
-  }
-  :deep(
-      .el-dialog:not(.ele-dialog-form)
-        .el-dialog__body
-        .el-form
-        .el-table__body
-        .el-table__row
-        .el-form-item:last-child
-    ) {
-    margin-bottom: 0 !important;
-  }
-  .add-product {
-    width: 100%;
-    display: flex;
-    align-items: center;
-    justify-content: flex-end;
-    font-size: 30px;
-    color: #1890ff;
-    margin: 10px 0;
-    cursor: pointer;
-  }
-</style>

+ 114 - 61
src/views/material/BOMmanage/qualityTesting/inspectionClassify/components/user-list.vue

@@ -2,7 +2,6 @@
   <div>
     <user-search @search="reload" ref="searchRef"> </user-search>
     <!-- 数据表格 -->
-
     <ele-pro-table
       ref="table"
       :columns="columns"
@@ -10,46 +9,54 @@
       height="calc(100vh - 365px)"
       full-height="calc(100vh - 116px)"
       tool-class="ele-toolbar-form"
-      cache-key="systemOrgUserTable"
+      cache-key="inspectionClassify"
+      row-key="id"
     >
-      <!-- 编码列 -->
-
-      <template v-slot:name="{ row }">
-        {{  row.qualityStandard && row.qualityStandard.name }}
-      </template>
-
-      <template v-slot:code="{ row }">
-        <el-link
-          @click="openDetail(row)"
-          type="primary"
-          :underline="false"
-        >
-          {{  row.qualityStandard && row.qualityStandard.code }}
-        </el-link>
+      <!-- 表头工具栏 -->
+
+      <template v-slot:textType="{ row }">
+        {{
+          row.itemVO.textType == 1
+            ? '数值'
+            : row.itemVO.textType == 2
+            ? '选择'
+            : row.itemVO.textType == 3
+            ? '上下限'
+            : row.itemVO.textType == 4
+            ? '规格'
+            : row.itemVO.textType == 5
+            ? '时间'
+            : row.itemVO.textType == 6
+            ? '范围'
+            : ''
+        }}
       </template>
 
       <template v-slot:type="{ row }">
-        {{ getDictValue('质检标准类型',  row.qualityStandard && row.qualityStandard.type) }}
+        {{ getDictValue('质检标准类型', row.itemVO.type) }}
       </template>
 
-      <template v-slot:standardCode="{ row }">
-        {{  row.qualityStandard && row.qualityStandard.standardCode }}
-      </template>
 
-      <template v-slot:status="{ row }">
-        {{  row.qualityStandard && row.qualityStandard.status == 1 ? '启用' : '停用' }}
-      </template>
-
-      <template v-slot:mode="{ row }">
-        {{ getDictValue('质检方式', row.mode) }}
-      </template>
+      <template v-slot:toolList="{ row }">
+             <div style="display: inline-block;" v-for="(item,idx) in row.itemVO.toolList" :key="idx">{{ item.name }}  <span v-if="row.itemVO.toolList && idx != row.itemVO.toolList.length - 1">, </span></div>
+        </template>
 
-      <template v-slot:version="{ row }">
-        {{  row.qualityStandard && row.qualityStandard.version }}
+      <template v-slot:action="{ row }">
+        <el-popconfirm
+          class="ele-action"
+          title="确定要删除此质检项吗?"
+          @confirm="remove(row)"
+        >
+          <template v-slot:reference>
+            <el-link type="danger" :underline="false" icon="el-icon-delete">
+              删除
+            </el-link>
+          </template>
+        </el-popconfirm>
       </template>
     </ele-pro-table>
 
-    <Detail ref="detailRef" ></Detail>
+
   </div>
 </template>
 
@@ -57,11 +64,11 @@
   import userSearch from './user-search.vue';
   import { getList } from '@/api/material/inspectionClassify';
   import dictMixins from '@/mixins/dictMixins';
-  import Detail from './edit.vue';
+
 
   export default {
     mixins: [dictMixins],
-    components: { userSearch, Detail },
+    components: { userSearch },
     props: {
       // 类别id
 
@@ -72,57 +79,105 @@
         // 当前编辑数据
         current: null,
 
-        // 表格列配置
         columns: [
+
+        {
+            width: 45,
+            type: 'selection',
+            columnKey: 'selection',
+            align: 'center',
+            reserveSelection: true
+          },
+          
           {
-            columnKey: 'index',
-            type: 'index',
-            label: '序号',
-            width: 55,
-            align: 'center'
+            prop: 'itemVO.inspectionCode',
+            label: '参数编码',
+            showOverflowTooltip: true,
+            align: 'center',
+            minWidth: 110
           },
-
           {
-            prop: 'code',
-            label: '标准编码',
+            prop: 'itemVO.inspectionName',
+            label: '参数名称',
             showOverflowTooltip: true,
-            minWidth: 110,
-            slot: 'code'
+            align: 'center',
+            minWidth: 110
           },
 
           {
-            prop: 'name',
-            label: '标准名称',
+            prop: 'itemVO.textType',
+            label: '参数类型',
             showOverflowTooltip: true,
-            minWidth: 110,
-            slot: 'name'
+            align: 'center',
+            slot: 'textType',
+            minWidth: 110
           },
 
+          {
+            prop: 'itemVO.maxValue',
+            label: '参数上限',
+            align: 'center',
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'itemVO.minValue',
+            label: '参数下限',
+            align: 'center',
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'itemVO.defaultValue',
+            label: '默认值',
+            align: 'center',
+            showOverflowTooltip: true
+          },
+          {
+            label: '工艺要求',
+            prop: 'itemVO.inspectionStandard',
+            formatter: (row, column, cellValue) => {
+              return (
+                row.itemVO.symbol + ' ' + cellValue + ' ' + row.itemVO.unit
+              );
+            },
+            minWidth: 150
+          },
           {
             label: '标准类型',
-            prop: 'type',
+            prop: 'itemVO.type',
             slot: 'type'
           },
 
           {
-            label: '标准代码',
-            prop: 'standardCode'
+            prop: 'itemVO.qualityStandardName',
+            label: '标准名称',
+            align: 'center',
+            minWidth: 110
           },
 
           {
-            prop: 'status',
             label: '状态',
-            align: 'center',
-            minWidth: 110,
-            slot: 'status'
+            prop: 'status',
+            formatter: (row, column, cellValue) => {
+              return cellValue == 1 ? '启用' : cellValue === 0 ? '停用' : '';
+            }
           },
 
           {
-            prop: 'version',
-            label: '版本号',
+            prop: 'itemVO.toolList',
+            slot: 'toolList',
+            label: '设备名称',
             align: 'center',
-            minWidth: 110,
-            slot: 'version'
+            minWidth: 150
+          },
+
+          {
+            label: '备注',
+            prop: 'inspectionRemark'
+          },
+          {
+            label: '操作',
+            slot: 'action',
+            showOverflowTooltip: true
           }
         ]
       };
@@ -162,9 +217,7 @@
         this.reload();
       },
 
-      openDetail(row) {
-        this.$refs.detailRef.open('detail',row);
-      }
+
     }
   };
 </script>

+ 0 - 179
src/views/material/BOMmanage/qualityTesting/term.vue

@@ -7,185 +7,6 @@
       >新增</el-button
     >
 
-    <div class="content_box" v-if="list.length > 0">
-      <div class="content_box_list" v-for="(item, idx) in list" :key="idx">
-        <div class="content_ll">
-          <div class="name">质检类型</div>
-          <div>
-            {{
-            item.categoryLevelName
-            }}
-          </div>
-        </div>
-
-
-        <div class="content_ll">
-
-          <div class="name">标准类型</div>
-          <div>
-            {{
-              getDictValue(
-                '质检标准类型',
-                item.qualityStandard && item.qualityStandard.type
-              )
-            }}
-          </div>
-        </div>
-
-
-        <div class="content_ll">
-          <div class="name">标准编码</div>
-          <div class="">{{
-            item.qualityStandard && item.qualityStandard.code
-          }}</div>
-        </div>
-
-        <div class="content_ll">
-          <div class="name">标准名称</div>
-          <div class="">{{
-            item.qualityStandard && item.qualityStandard.name
-          }}</div>
-        </div>
-
-        <el-link
-          type="danger"
-          :underline="false"
-          icon="el-icon-delete"
-          @click="handDel(idx)"
-        >
-          删除
-        </el-link>
-
-        <el-form ref="form" style="width: 100%">
-          <el-table
-            style="margin-top: 15px"
-            :data="
-              item.qualityStandard && item.qualityStandard.parameterStandards
-            "
-            border
-          >
-            <el-table-column
-              :label="
-                item.qualityStandard &&
-                item.qualityStandard.singleWeightDivision
-              "
-              align="center"
-            >
-              <el-table-column
-                label="参数上限"
-                align="center"
-                v-if="
-                  item.qualityStandard &&
-                  item.qualityStandard.parameterType == 3
-                "
-              >
-                <template slot-scope="scope">
-                  <el-form-item label-width="0" prop="finalValue">
-                    <el-input
-                      clearable
-                      :disabled="type == 'detail'"
-                      v-model="scope.row.finalValue"
-                      placeholder="请输入"
-                    />
-                  </el-form-item>
-                </template>
-              </el-table-column>
-              <el-table-column
-                label="参数下限"
-                align="center"
-                v-if="
-                  item.qualityStandard &&
-                  item.qualityStandard.parameterType == 3
-                "
-              >
-                <template slot-scope="scope">
-                  <el-form-item label-width="0" prop="initialValue">
-                    <el-input
-                      clearable
-                      v-model="scope.row.initialValue"
-                      placeholder="请输入"
-                    />
-                  </el-form-item>
-                </template>
-              </el-table-column>
-              <el-table-column
-                label="默认值"
-                align="center"
-                v-if="
-                  item.qualityStandard &&
-                  item.qualityStandard.parameterType != 3
-                "
-              >
-                <template slot-scope="scope">
-                  <el-form-item label-width="0" prop="defaultValue">
-                    <el-input
-                      clearable
-                      v-model="scope.row.defaultValue"
-                      placeholder="请输入"
-                    />
-                  </el-form-item>
-                </template>
-              </el-table-column>
-            </el-table-column>
-
-            <el-table-column
-              :label="item.qualityStandard && item.qualityStandard.tolerance"
-              align="center"
-            >
-              <el-table-column label="质检标准" align="center">
-                <template slot-scope="scope">
-                  <el-form-item label-width="0" prop="inspectionStandard">
-
-                    <!-- <el-select
-                      v-model="scope.row.symbol"
-                      style="width: 100px"
-                      clearable
-                    >
-                      <el-option
-                        v-for="item in dictList"
-                        :key="item.value"
-                        :value="item.value"
-                        :label="item.label"
-                      ></el-option>
-                    </el-select>
-                  -->
-                  
-                    <el-input
-                      clearable
-                      v-model="scope.row.toleranceValue"
-                      placeholder="请输入"
-                    >
-
-                    <DictSelection
-                        style="width: 100px"
-                        slot="prepend"
-                        clearable
-                        dictName="数学字符"
-                        v-model="scope.row.symbol"
-                      ></DictSelection>
-
-                    </el-input>
-                  </el-form-item>
-                </template>
-              </el-table-column>
-            </el-table-column>
-
-            <el-table-column label="操作" align="center" width="70">
-              <template slot-scope="scope">
-                <el-link
-                  type="danger"
-                  :underline="false"
-                  icon="el-icon-delete"
-                  @click="handDel2(idx, scope.$index)"
-                >
-                  删除
-                </el-link>
-              </template>
-            </el-table-column>
-          </el-table>
-        </el-form>
-      </div>
-    </div>
 
     <termPop ref="termRef"></termPop>
   </div>