ysy 1 yıl önce
ebeveyn
işleme
f0c10545bd

+ 1 - 1
src/views/material/BOMmanage/qualityTesting/inspectionClassify/index.vue

@@ -208,7 +208,7 @@
           {
             prop: 'itemVO.toolList',
             slot: 'toolList',
-            label: '设备名称',
+            label: '工具名称',
             align: 'center',
             minWidth: 150
           },

+ 50 - 49
src/views/material/BOMmanage/qualityTesting/term.vue

@@ -1,12 +1,5 @@
 <template>
   <div>
-    <el-button
-      @click="() => this.$refs.termRef.open()"
-      size="small"
-      type="primary"
-      >新增</el-button
-    >
-
     <ele-pro-table
       ref="table"
       :columns="columns"
@@ -17,7 +10,14 @@
       row-key="id"
       :selection.sync="selection"
     >
-      <!-- 表头工具栏 -->
+      <template v-slot:toolbar>
+        <el-button
+          @click="handAdd"
+          size="mini"
+          type="primary"
+          >新增质检项</el-button
+        >
+      </template>
 
       <template v-slot:textType="{ row }">
         {{
@@ -43,37 +43,50 @@
 
       <template v-slot:defaultValue="{ row }">
         <div style="display: flex">
-          <div v-if="row.itemVO.textType == 3 "style="display: flex">
-
+          <div
+            v-if="row.itemVO.textType == 3"
+            style="display: flex; align-items: center"
+          >
             <el-input
-            style="width: 115px;"
+              style="width: 132px"
               v-model="row.itemVO.minValue"
             ></el-input>
-
+            <span>&nbsp;&nbsp;-</span>
             <el-input
-              style="width: 115px; margin-left: 10px;"
+              style="width: 132px; margin-left: 10px"
               v-model="row.itemVO.maxValue"
-              ></el-input>
-         
+            ></el-input>
           </div>
 
-          <div v-else style="width: 240px">
+          <div v-else style="width: 290px">
             <el-input
               v-model="row.itemVO.defaultValue"
               placeholder="请输入"
             ></el-input>
           </div>
 
-          <DictSelection
-            style="width: 80px; margin-left: 8px"
-            dictName="工艺参数单位"
-            clearable
-            filterable
+          <el-input
+            style="margin-left: 10px; width: 80px"
             v-model="row.itemVO.unit"
+            disabled
           >
-          </DictSelection>
+          </el-input>
         </div>
       </template>
+
+      <template v-slot:action="{ row, $index }">
+        <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>
 
     <termPop ref="termRef" @selectChange="selectChange"></termPop>
@@ -118,27 +131,11 @@
             minWidth: 110
           },
 
-          {
-            prop: 'itemVO.inspectionCode',
-            label: '参数编码',
-            showOverflowTooltip: true,
-            align: 'center',
-            minWidth: 110
-          },
           {
             prop: 'itemVO.inspectionName',
-            label: '参数名称',
-            showOverflowTooltip: true,
-            align: 'center',
-            minWidth: 110
-          },
-
-          {
-            prop: 'itemVO.textType',
-            label: '参数类型',
+            label: '质检名称',
             showOverflowTooltip: true,
             align: 'center',
-            slot: 'textType',
             minWidth: 110
           },
 
@@ -147,7 +144,7 @@
             slot: 'defaultValue',
             label: '工艺参数',
             align: 'center',
-            minWidth: 240
+            minWidth: 260
           },
 
           {
@@ -158,19 +155,17 @@
                 row.itemVO.symbol + ' ' + cellValue + ' ' + row.itemVO.unit
               );
             },
-            minWidth: 150
-          },
-          {
-            label: '标准类型',
-            prop: 'itemVO.type',
-            slot: 'type'
+            minWidth: 350
           },
 
           {
-            prop: 'itemVO.qualityStandardName',
-            label: '标准名称',
+            columnKey: 'action',
+            label: '操作',
+            width: 80,
             align: 'center',
-            minWidth: 110
+            resizable: false,
+            slot: 'action',
+            fixed: 'right'
           }
         ]
       };
@@ -213,6 +208,10 @@
           .catch(() => {});
       },
 
+      handAdd() {
+        this.$refs.termRef.open()
+      },
+
       async getDictList(code) {
         let { data: res } = await getByCode(code);
         this.dictList = res.map((item) => {
@@ -224,6 +223,8 @@
         });
       },
 
+      remove() {},
+
       getDate() {
         return this.list;
       },