付宇航 1 рік тому
батько
коміт
340442406e

+ 88 - 23
src/components/ConstructionDetails/index.vue

@@ -79,11 +79,17 @@
 
                       >
                       <el-select v-model="i.specifications" placeholder="请选择规格" style="width: 100%" :disabled="status == 'read-only' ">
-                          <el-option
+                          <!-- <el-option
                           v-for="e in specificationsList"
                           :key="e.id"
                           :label="e.name"
                           :value="e.id"
+                          ></el-option> -->
+                          <el-option
+                          v-for="e in corrosionLevelListAll.filter(e => e.materId == i.materialQuality)"
+                          :key="e.id"
+                          :label="e.name"
+                          :value="e.id"
                           ></el-option>
                       </el-select>
                     </el-form-item>
@@ -95,7 +101,7 @@
                       label-width="95px"
                       >
                       <div class="block" style="display: inline-block; margin-right: 20px;">
-                        <el-input v-model="i.number" placeholder="请输入数量" style="width: 100%" type="number" maxlength="11" :disabled="status == 'read-only'"></el-input>
+                        <el-input v-model="i.number" placeholder="请输入数量" style="width: 100%" type="number" oninput="value = value.replace(/[^\d]/g, '');if(value.length>9); value=value.slice(0,9)" max="999999999" :disabled="status == 'read-only'"></el-input>
                       </div>
                     </el-form-item>
                     <el-form-item
@@ -162,6 +168,23 @@
                           ></el-option>
                       </el-select>
                     </el-form-item>
+                    <el-form-item
+                      :prop="i.brand"
+                      label="品牌"
+                      v-show="i.brand != null"
+                      label-width="95px"
+                      >
+                      <!--                  :rules="{required: true, message: '请输入材质', trigger: 'blur'}"-->
+                      <!--                  <el-input v-model="item.materialQuality" placeholder="请输入材质" style="width: 100%"/>-->
+                      <el-select v-model="i.brand" placeholder="请选择品牌" style="width: 100%" :disabled="status == 'read-only' ">
+                          <el-option
+                          v-for="e in dict.type.brand"
+                          :key="e.value"
+                          :label="e.label"
+                          :value="e.value"
+                          ></el-option>
+                      </el-select>
+                    </el-form-item>
                 </el-form>
                 <!-- <el-input size="mini" v-if="i.brand" style="width: 80%" v-model="i.brand" placeholder="请输入品牌">
                   <template slot="prepend">品牌</template>
@@ -206,11 +229,12 @@
       :visible.sync="checkingVisible"
       width="30%"
       class="checkingDialog"
-      :before-close="null">
-      <el-form :model="checkingInfo" ref="checking" class="nodeForm">
+      :before-close="handleChecking">
+      <el-form :model="checkingInfo" ref="checking" :rules="checkingRule" class="nodeForm">
         <el-form-item
-          label-width="70px"
+          label-width="85px"
           label="审核状态"
+          prop="reviewStatus"
           >
           <el-select v-model="checkingInfo.reviewStatus" placeholder="请选择审核状态" style="width: 100%" label="审核状态">
               <el-option
@@ -223,20 +247,21 @@
         </el-form-item>
 
         <el-form-item
-          label-width="70px"
+          label-width="85px"
           label="审核内容"
+          prop="reviewContent"
           >
           <div class="block" style="display: inline-block; margin-right: 20px;">
               <el-input
                 v-model="checkingInfo.reviewContent"
                 placeholder="请输入审核内容"
                 type="textarea"
-                style="width: 100%"/>
+                style="width: 97%"/>
           </div>
         </el-form-item>
       </el-form>
       <span slot="footer" class="dialog-footer">
-        <el-button @click="checkingVisible = false">取 消</el-button>
+        <el-button @click="handleChecking">取 消</el-button>
         <el-button type="primary" @click=checkingSubmit>确 定</el-button>
       </span>
     </el-dialog>
@@ -256,7 +281,7 @@ export default {
   dicts:[
       'visit_type',
       'self_closing_valve_type',
-
+      'brand'
   ],
   props: ['currentCollapses','nodeDetailType','enginType','status','zEngineeringNodeBo'],
   data() {
@@ -298,6 +323,15 @@ export default {
       isChecking:true,
       currentEnginId:null,
       reviewStatus:null,
+      corrosionLevelListAll:[],
+      checkingRule:{
+        reviewStatus: [
+          {required: true, message: "审核状态不能为空", trigger: "blur"}
+        ],
+        reviewContent: [
+          {required: true, message: "审核内容不能为空", trigger: "change"}
+        ],
+      }
     }
   },
   created(){
@@ -306,6 +340,10 @@ export default {
           console.log('材质',res)
           this.materialQualityList = res.data
       })
+      getEnginSpecificationsList().then(res => {
+        console.log('规格',res.data)
+        this.corrosionLevelListAll = res.data
+      })
       // 获取腐蚀等级
       getDictType({dictType:'corrosion_level'}).then(res => {
           console.log('腐蚀等级',res)
@@ -354,26 +392,53 @@ export default {
     }
   },
   methods: {
-    // 保存节点Id
-    setEngineId(e){
-      this.currentEnginId = e
-    },
-    // 提交审核
-    checkingSubmit(){
-      try {
-        this.checkingInfo.engInfoId = this.currentEnginId
-        this.$emit('checkWorking',this.checkingInfo)
-      } catch (error) {
-        this.checkingInfo.engInfoId = null
-      }
-      this.dialogVisible = false
+    handleChecking(){
       this.checkingVisible = false
       this.checkingInfo = {
         reviewStatus:'',               // 审核状态
         reviewContent:'',              // 审核内容
         engInfoId:'',                  // 节点Id
         createTime:'',                 // 工程创建时间
-      }
+      },
+      this.$refs.checking.resetFields()
+    },
+    getSpecificationsList(id){
+      getEnginSpecificationsList({materId:id}).then(res => {
+        console.log('________a',res.data)
+        return res.data
+      })
+    },
+    // 保存节点Id
+    setEngineId(e){
+      this.currentEnginId = e
+    },
+    // 提交审核
+    checkingSubmit(){
+      this.$refs.checking.validate(valid => {
+        if(valid){
+          try {
+            this.checkingInfo.engInfoId = this.currentEnginId
+            this.$emit('checkWorking',this.checkingInfo)
+          } catch (error) {
+            this.checkingInfo.engInfoId = null
+          }
+          // this.dialogVisible = false
+          this.checkingVisible = false
+          this.checkingInfo = {
+            reviewStatus:'',               // 审核状态
+            reviewContent:'',              // 审核内容
+            engInfoId:'',                  // 节点Id
+            createTime:'',                 // 工程创建时间
+          }
+        } else {
+          this.$message({
+            message: '请完善信息',
+            type: 'error'
+          });
+          throw 'valid Failed'
+        }
+      })
+      
     },
     // 查看单节点历史
     viewSource(e) {

+ 37 - 14
src/components/EnginNodeInfo/index.vue

@@ -267,7 +267,14 @@ export default {
       zEngineeringMaterialBo:[
 
       ],                                         //  用料信息
-
+      nodeRules:{
+        zEngiineeringPhotoBoList: [
+          {required: true, message: "至少上传一张图片", trigger: "change"}
+        ],
+        constructTime: [
+          {required: true, message: "请选择施工时间", trigger: "change"}
+        ],
+      }
     }
   },
   created(){
@@ -318,21 +325,33 @@ export default {
   methods:{
     // 收集节点信息
     infoCollection(){
-      // 收集主节点信息
-      this.currentContain.forEach(e => {
-        if( e instanceof Array){
-          // 包含用料 特殊处理
-          return
+      let result = null
+      this.$refs.fangxianForm.validate(valid => {
+        if(valid){
+          // 收集主节点信息
+          this.currentContain.forEach(e => {
+            if( e instanceof Array){
+              // 包含用料 特殊处理
+              return
+            }
+            this.nodeInfoBo[e] = this.nodeInfo[e]
+          })
+          this.nodeInfoBo.type = this.name
+          // 接口数据格式修改 图片和用料放到nodeInfoBo节点详情对象中
+          this.nodeInfoBo.zEngineeringInfoBo.zEngiineeringPhotoBoList = this.nodeInfo.zEngiineeringPhotoBoList
+          this.nodeInfoBo.zEngineeringInfoBo.zEngineeringMaterialBo = this.zEngineeringMaterialBo
+          delete this.nodeInfo.zEngiineeringPhotoBoList
+          console.log('即将返回的节点Info',this.nodeInfoBo)
+          result = this.nodeInfoBo
+        } else {
+          this.$message({
+            message: '请完善信息',
+            type: 'error'
+          });
+          throw 'valid Failed'
         }
-        this.nodeInfoBo[e] = this.nodeInfo[e]
       })
-      this.nodeInfoBo.type = this.name
-      // 接口数据格式修改 图片和用料放到nodeInfoBo节点详情对象中
-      this.nodeInfoBo.zEngineeringInfoBo.zEngiineeringPhotoBoList = this.nodeInfo.zEngiineeringPhotoBoList
-      this.nodeInfoBo.zEngineeringInfoBo.zEngineeringMaterialBo = this.zEngineeringMaterialBo
-      delete this.nodeInfo.zEngiineeringPhotoBoList
-      console.log('即将返回的节点Info',this.nodeInfoBo)
-      return this.nodeInfoBo
+      return result
     },
     addMaterial(){
       let materialBo = {}
@@ -391,6 +410,10 @@ export default {
     .el-form-item__label{
       width: 113px !important;
     }
+    .el-form-item__error{
+      position: relative;
+      left: -10%;
+    }
   }
 
   .obsActiveImage{

+ 1 - 1
src/views/zdsz/enginee/material/progres_statistics/progres_statistics.vue

@@ -175,7 +175,7 @@ export default {
       this.resetForm("queryForm");
       this.tableData=[]
       this.queryParams = {pageNum:1,pageSize:10, areaId:undefined,enginCycle:"0"};
-      this.handleQuery();
+      this.getList();
     },
       getList()
       {

+ 10 - 2
src/views/zdsz/engineeringCivil/index.vue

@@ -1363,6 +1363,10 @@ export default {
     /** 重置按钮操作 */
     resetQuery() {
       this.resetForm("queryForm");
+      this.areaList = []
+      this.buildingList = []
+      this.unitList = []
+      this.currentEnginTypeChangeOptions1 = []
       this.handleQuery();
     },
     // 多选框选中数据
@@ -1387,15 +1391,19 @@ export default {
           // 收集节点信息
           this.currentCheckList.forEach((e, idx) => {
             let nodeItem = this.$refs['EnginNodeInfo' + idx][0].infoCollection()
-            //  console.log(nodeItem)
             nodeCollection.push(nodeItem)
+            setTimeout(() =>{
+              console.log('nodeCollection:', nodeItem)
+            console.log('nodeCollection:', this.$refs['EnginNodeInfo' + idx][0])
+            },2000)
+            
           })
           this.queryParams.zEngineeringNodeBoList = nodeCollection
           if (this.enginNodeStatus == '修改') {
             putEngineeringCivil(this.queryParams).then(res => {
               if (res.code == 200) {
                 this.$message({
-                  message: '添加成功',
+                  message: '修改成功',
                   type: 'success'
                 });
                 this.open = false

+ 21 - 3
src/views/zdsz/engineeringMaterialsResets/index.vue

@@ -76,7 +76,7 @@
 <!--      <el-table-column label="小区" align="center" prop="areaName" />-->
       <el-table-column label="材质" align="center" prop="materialQualityName" />
       <el-table-column label="规格" align="center" prop="estimatedSpecificationsName" />
-      <el-table-column label="预估尺寸" align="center" prop="estimatedSize" />
+      <el-table-column label="预估尺寸(米)" align="center" prop="estimatedSize" />
       <el-table-column label="工程周期" align="center" prop="enginCycle" >
         <template slot-scope="scope">
           <dict-tag :options="dict.type.engin_cycle" :value="scope.row.enginCycle"/>
@@ -124,8 +124,8 @@
             </el-option>
           </el-select>
         </el-form-item>
-        <el-form-item label="预估尺寸" prop="estimatedSize">
-          <el-input-number  v-model="form.estimatedSize" controls-position="right" placeholder="请输入预估尺寸" style="width: 100%"   :max="999999999"/>
+        <el-form-item label="预估尺寸(米)" prop="estimatedSize" class="estimatedSizeStyle">
+          <el-input-number @input.native="changeInput($event)" v-model="form.estimatedSize" controls-position="right" placeholder="请输入预估尺寸" style="width: 100%"   :max="999999999"/>
         </el-form-item>
         <el-form-item label="工程周期" prop="enginCycle">
 <!--          <el-input-number  v-model="form.enginCycle" controls-position="right" placeholder="请输入工程周期" style="width: 100%" />-->
@@ -253,6 +253,11 @@ export default {
     this.getEnginMaterialQualityList();
   },
   methods: {
+    changeInput(e){
+      if(e.target.value.indexOf('.') >= 0){
+        e.target.value = e.target.value.substring(0,e.target.value.indexOf('.') + 3); 
+      }
+    },
     getAreaList() {
       getAreaList().then(res => this.areaList = res.data)
     },
@@ -384,3 +389,16 @@ export default {
   }
 };
 </script>
+
+<style lang="scss" scoped>
+
+::v-deep .estimatedSizeStyle{
+  width: 559px;
+  .el-form-item__label{
+    width: 120px !important;
+    position: absolute;
+    left: 1.4%;
+  }
+}
+
+</style>