licailing 4 years ago
parent
commit
91266393f9
1 changed files with 16 additions and 1 deletions
  1. 16 1
      src/main/vue/src/components/PackageEdit.vue

+ 16 - 1
src/main/vue/src/components/PackageEdit.vue

@@ -90,7 +90,22 @@
                         <el-row>
                             <el-col :span="8">
                                 <span>规格{{ index + 1 }}</span>
-                                <el-input placeholder="规格" class="input" v-model="item.specification"></el-input>
+                                <el-input
+                                    placeholder="规格"
+                                    class="input"
+                                    v-model="item.specification"
+                                    :rules="
+                                        stockList.length > 0
+                                            ? {
+                                                  required: false,
+                                                  validator: (rule, value, callback) => {
+                                                      callback();
+                                                  },
+                                                  trigger: 'change'
+                                              }
+                                            : getRule('企业资质/其它证明文件不能为空', 'change', true)
+                                    "
+                                ></el-input>
                             </el-col>
                             <el-col :span="8">
                                 <span>日期</span>