瀏覽代碼

质检信息功能优化:抽检比例改为取样数量并增加单位选择,修复模板选择逻辑

yusheng 9 月之前
父節點
當前提交
d1cb92e85b
共有 2 個文件被更改,包括 22 次插入6 次删除
  1. 16 3
      src/views/material/product/components/QualityInfo.vue
  2. 6 3
      src/views/material/product/detail.vue

+ 16 - 3
src/views/material/product/components/QualityInfo.vue

@@ -74,16 +74,22 @@
           :span="6"
           v-if="form.isComeCheck == 1 && form.checkFormula == 2"
         >
-          <el-form-item label="抽检比例" prop="checkProportion">
+          <el-form-item label="取样数量" prop="sampleProportion">
             <el-input
               type="number"
               :min="0.0"
-              v-model="form.checkProportion"
+              v-model="form.sampleProportion"
               placeholder="请输入"
+              style="width: calc(100% - 85px)"
               clearable
             >
-              <template slot="append">%</template>
             </el-input>
+            <DictSelection
+              style="width: 85px"
+              dictName="计量单位"
+              placeholder=" "
+              v-model="form.sampleProportionUnit"
+            ></DictSelection>
           </el-form-item>
         </el-col>
 
@@ -94,8 +100,10 @@
               v-model="form.qualityTemplateIds"
               filterable
               multiple
+              :multiple-limit="1"
             >
               <el-option
+                @click.native="qualityTemplateIdsChange(item)"
                 v-for="item in qualityTemplateList"
                 :key="item.id"
                 :value="item.id"
@@ -178,6 +186,11 @@
       //     };
       //   });
       // },
+      qualityTemplateIdsChange(data){
+        this.form.sampleProportion=data.sampleProportion
+        this.form.sampleProportionUnit=data.sampleProportionUnit
+
+      },
       levelChange(val) {
         this.form.levelItem = val;
       },

+ 6 - 3
src/views/material/product/detail.vue

@@ -439,7 +439,8 @@
     {
       categoryId: '',
       checkDepart: null,
-      checkFormula: null,
+      sampleProportion: null,
+      sampleProportionUnit:'%',
       checkPerson: null,
       checkProportion: null,
       createTime: '',
@@ -455,7 +456,8 @@
     {
       categoryId: '',
       checkDepart: null,
-      checkFormula: null,
+      sampleProportion: null,
+      sampleProportionUnit:'%',
       checkPerson: null,
       checkProportion: null,
       createTime: '',
@@ -471,7 +473,8 @@
     {
       categoryId: '',
       checkDepart: null,
-      checkFormula: null,
+      sampleProportion: null,
+      sampleProportionUnit:'%',
       checkPerson: null,
       checkProportion: null,
       createTime: '',