Procházet zdrojové kódy

Merge branch 'dev' of http://110.41.163.243:9980/kd-aiot/kd-aiot-frontend into dengfei

695593266@qq.com před 3 týdny
rodič
revize
11bb71b1bf

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

@@ -49,7 +49,7 @@
 
       <template v-slot:defaultValue="{ row }">
         <div class="main-parameter-cell">
-          <div class="main-parameter-symbol">
+          <div class="main-parameter-symbol" v-if="row.textType != 8">
             <DictSelection
               clearable
               dictName="数学字符"
@@ -57,17 +57,40 @@
               :disabled="isView"
             ></DictSelection>
           </div>
-          <div v-if="row.textType == 3" class="main-parameter-range">
+          <div
+            v-if="row.textType == 3 || row.textType == 8"
+            class="main-parameter-range"
+          >
             <el-input
               v-model="row.minValue"
               :disabled="isView"
-              style="width: 45%"
+              :style="{ width: row.textType == 3 ? '45%' : '150px' }"
             ></el-input>
-            <span>&nbsp;&nbsp;-</span>
+            <span v-if="row.textType == 3">&nbsp;&nbsp;-</span>
+
+            <el-input
+              v-else
+              v-model="row.defaultValue"
+              style="width: 250px; margin-left: 10px"
+            >
+              <template slot="append">
+                <DictSelection
+                  dictName="工艺参数单位"
+                  clearable
+                  filterable
+                  v-model="row.unitName"
+                  style="width: 80px"
+                >
+                </DictSelection
+              ></template>
+            </el-input>
             <el-input
               v-model="row.maxValue"
               :disabled="isView"
-              style="width: 45%; margin-left: 10px"
+              :style="{
+                width: row.textType == 3 ? '45%' : '150px',
+                marginLeft: '10px'
+              }"
             ></el-input>
           </div>
           <div v-else class="main-parameter-input">
@@ -77,7 +100,7 @@
               :disabled="isView"
             ></el-input>
           </div>
-          <div class="main-parameter-unit">
+          <div class="main-parameter-unit" v-if="row.textType != 8">
             <DictSelection
               dictName="工艺参数单位"
               clearable
@@ -415,6 +438,7 @@
             v-if="
               itemForm.textType == 1 ||
               itemForm.textType == 3 ||
+              itemForm.textType == 8 ||
               itemForm.textType == 4 ||
               itemForm.textType == 5
             "
@@ -425,6 +449,7 @@
                   dictName="数学字符"
                   clearable
                   v-model="itemForm.symbol"
+                  :isProhibit="itemForm.textType == 8"
                 ></DictSelection>
                 <el-input
                   v-model="itemForm.defaultValue"
@@ -479,7 +504,10 @@
             </el-form-item>
           </el-col>
 
-          <el-col :span="12" v-if="itemForm.textType == 3">
+          <el-col
+            :span="12"
+            v-if="itemForm.textType == 3 || itemForm.textType == 8"
+          >
             <el-form-item label="参数上限">
               <el-input
                 v-model="itemForm.maxValue"
@@ -487,7 +515,10 @@
               ></el-input>
             </el-form-item>
           </el-col>
-          <el-col :span="12" v-if="itemForm.textType == 3">
+          <el-col
+            :span="12"
+            v-if="itemForm.textType == 3 || itemForm.textType == 8"
+          >
             <el-form-item label="参数下限">
               <el-input
                 v-model="itemForm.minValue"
@@ -668,6 +699,7 @@
           { value: 1, label: '数值' },
           { value: 2, label: '选择' },
           { value: 3, label: '上下限' },
+          { value: 8, label: '专业上下限' },
           { value: 4, label: '规格' },
           { value: 5, label: '时间' },
           { value: 6, label: '范围' },
@@ -834,6 +866,13 @@
             row.unitName || row.unit || ''
           }`;
         }
+        if (row.textType == 8) {
+          return `标准值:${row.defaultValue}${row.unitName || ''}  下限:${
+            row.minValue || 0
+          }${row.unitName || ''} 上限:${row.maxValue || 0}${
+            row.unitName || ''
+          }`;
+        }
         return `${row.symbol || ''}${row.defaultValue || ''}${
           row.unitName || row.unit || ''
         }`;
@@ -950,6 +989,9 @@
         } else if (this.itemForm.textType == 2) {
           this.itemForm.unitName = '';
         }
+        if (this.itemForm.textType == 8) {
+          this.itemForm.symbol = '=';
+        }
       },
       defaultInput(value) {
         if (this.itemForm.textType != 1) {