Browse Source

fix: 工程信息单

Howie 1 year ago
parent
commit
3881a1897f

+ 13 - 1
src/views/commercialEngineering/mixin/index.js

@@ -226,7 +226,19 @@ export default {
         ...this.resetData,
         id: this.detailId
       }
+    },
+    // 校验机型数量
+    verificationModel(){
+      if (!this.formData.items.length) {
+         this.$errorMsg('机型明细不能为空')
+         return false
+      }
+      console.log(this.formData.items)
+      const bol =  this.formData.items.every(k=>!['', null, undefined,0, '0'].includes(k.qty))
+      if (!bol) {
+          this.$errorMsg('机型信息数量不能为空')
+      }
+      return  bol
     }
-
   }
 }

+ 3 - 3
src/views/supply/engin/components/engin_form.vue

@@ -473,12 +473,12 @@
       <div>
         <el-row :gutter="20">
           <el-form ref="formData" :model="formData" label-width="0" :inline="false" size="small">
-            <el-col :span="6">
+            <el-col :span="18">
               <el-form-item prop="projectNo">
                 <el-input v-model="formData.projectNo" placeholder="请输入项目编号" />
               </el-form-item>
             </el-col>
-            <el-col :span="6">
+            <!-- <el-col :span="6">
               <el-form-item prop="projectName">
                 <el-input v-model="formData.projectName" placeholder="请输入项目名称" />
               </el-form-item>
@@ -487,7 +487,7 @@
               <el-form-item prop="address">
                 <el-input v-model="formData.address" placeholder="请输入项目地址" />
               </el-form-item>
-            </el-col>
+            </el-col> -->
             <el-col :span="6" style="text-align: right;">
               <el-button size="small" @click="currentPage2 = 1; getLoginOrderList()">查询</el-button>
               <el-button size="small" type="primary" @click="resetGoodsScreenForm2">重置</el-button></el-col>