付宇航 1 år sedan
förälder
incheckning
1bfa6f00da

+ 4 - 2
src/components/EnginNodeInfo/index.vue

@@ -178,10 +178,9 @@
         </el-col>
         <el-col :span="7" v-show="materialComponList.includes('brand')">
           <el-form-item
-            :prop="'zEngineeringMaterialBo.' + index + '.brand'"
             label-width="50px"
             label="品牌"
-
+            :rules="nodeRules.brand"
           >
             <!--                  :rules="{required: true, message: '请输入规格', trigger: 'blur'}"-->
             <!--                  <el-input v-model="item.specifications" placeholder="请输入规格" style="width: 100%"/>-->
@@ -314,6 +313,9 @@ export default {
         constructTime: [
           {required: true, message: "请选择施工时间", trigger: "change"}
         ],
+        brand:[
+          {required: true, message: "请选择品牌", trigger: "change"}
+        ]
       }
     }
   },

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

@@ -1188,7 +1188,7 @@ export default {
             try {
               status = e.zEngineeringInfoBoList[0].zEngineeringReviewBo.reviewStatus
             } catch (error) {
-              status = '1'
+              status = '0'
             }
             this.currentCheckingEnginList.push({
               label:e.type,
@@ -1533,6 +1533,7 @@ export default {
     },
     /** 新增按钮操作 */
     handleAdd() {
+      this.currentCheckingEnginList = []
       this.enginNodeStatus = '新增'
       this.reset();
       this.open = true;

+ 29 - 0
src/views/zdsz/engineeringInfrastructure/index.vue

@@ -188,6 +188,7 @@
         <el-form-item label="环节" prop="currentCheckList" style="width: 100%;margin-left: 0;" v-if="title!=='修改基建工程'">
           <el-checkbox-group v-model="currentCheckList" @change="console.log(currentCheckList)" :rules="{required: true, message: '请输入材质', trigger: 'blur'}">
             <el-checkbox
+              :disabled=enginNodeStatusExecuted(item)
               :rules="{required: true, message: '请输入材质', trigger: 'blur'}"
               :label="item.label"
               v-for="item in checkList"
@@ -694,6 +695,7 @@ export default {
       zEngineeringNodeBo:{
 
       },
+      currentCheckingEnginList:[]
 
     };
   },
@@ -705,6 +707,14 @@ export default {
     this.checkList = this.dict.type.engineering_infrastructure
   },
   methods: {
+    enginNodeStatusExecuted(item){
+      try {
+        let flag
+        if(this.currentCheckingEnginList.filter(e => e.label == item.dictValue)[0].status == '1') return true
+      } catch (error) {
+        return false
+      }
+    },
    // 节点单项审核
    checkWorking(checkingInfo){
     let params = checkingInfo
@@ -737,6 +747,24 @@ export default {
     this.reset();
     const id = data.id || this.ids
     viewEngineeringInfrastructure(id).then(res => {
+      this.currentCheckingEnginList = []
+        // 处理当前已审核通过的节点
+      try {
+        res.data.zEngineeringNodeBoList.forEach(e => {
+          let status
+          try {
+            status = e.zEngineeringInfoBoList[0].zEngineeringReviewBo.reviewStatus
+          } catch (error) {
+            status = '0'
+          }
+          this.currentCheckingEnginList.push({
+            label:e.type,
+            status
+          })
+        })
+      } catch (error) {
+        this.currentCheckingEnginList = []
+      }
       this.loading = false;
       let newData = res.data
       this.queryParams = newData
@@ -1124,6 +1152,7 @@ export default {
     /** 新增按钮操作 */
     handleAdd() {
       this.reset();
+      this.currentCheckingEnginList = []
       this.open = true;
       this.enginNodeStatus == '新增'
       this.title = "新增工程";