Browse Source

市政,封堵,审核

wangzhe 1 year ago
parent
commit
93b74ae929

+ 35 - 3
src/views/zdsz/engineeringAirWall/index.vue

@@ -124,6 +124,14 @@
           >新增顶管工程
           </el-button>
           <el-button
+              size="mini"
+              type="text"
+              icon="el-icon-circle-check"
+              @click="viewSource(scope.row,'check')"
+              v-hasPermi="['zdsz:engineeringIndustry:review']"
+          >审核
+          </el-button>
+          <el-button
             type="text"
             icon="el-icon-edit"
             size="mini"
@@ -318,7 +326,9 @@
       ref="ConstructionDetails"
       :status="status"
       :currentCollapses="currentCollapses"
+      :zEngineeringNodeBo="zEngineeringNodeBo"
       @updateNodeOption="updateNodeOption"
+      @checkWorking="checkWorking"
       :enginType="enginType"
     />
   </div>
@@ -337,7 +347,7 @@ import {getDicts} from "@/api/system/dict/data";
 import EngineePipe from '@/components/EngineePipe'
 import {validPhoneMobile} from '@/api/rules'
 import ConstructionDetails from '@/components/ConstructionDetails/index.vue'
-import {getEnginMaterialQualityList} from '@/api/zdsz/enginee'
+import {getEnginMaterialQualityList , engineeringCivilReview} from '@/api/zdsz/enginee'
 import {getEnginSpecificationsList} from '@/api/zdsz/enginSpecifications'
 
 export default {
@@ -361,6 +371,8 @@ export default {
       })
     }
     return {
+      // 审核时间
+      createTime: null,
       // 按钮loading
       buttonLoading: false,
       // 遮罩层
@@ -505,6 +517,23 @@ export default {
     });
   },
   methods: {
+    // 节点单项审核
+    checkWorking(checkingInfo){
+      console.log('checkingInfo===',checkingInfo)
+      let params = checkingInfo
+      params.createTime = this.createTime
+      engineeringCivilReview(params).then(res => {
+        if(res.code == 200){
+          this.$message({
+            message: '审核成功',
+            type: 'success'
+          });
+          setTimeout(() => {
+            this.viewNodeSource()
+          },1000)
+        }
+      })
+    },
       parseDict(dictValue, dictionary) {
         const dict = this.dict.type[dictionary]
         for(let i = 0; i < dict.length; i++){
@@ -690,7 +719,7 @@ export default {
       }, 'add', data)
     },
     // 历史查询
-    viewSource(e) {
+    viewSource(e, type = null) {
       console.log('历史查询', e)
       console.log('历史查询e.enginType', e.enginType)
       this.currentId = e.id
@@ -710,7 +739,7 @@ export default {
         this.$refs.ConstructionDetails.open([{
           value: "历史数据",
           label: "历史数据"
-        }], e.enginType,null,e.enginName,null,null,null,e.enginType)
+        }], e.enginType,type,e.enginName,null,null,null,e.enginType)
         // this.$refs.ConstructionDetails.open(dict, this.form.type,null,null,null,null,null,this.form.type === '1' ? "工业工程" : "市政工程")
         this.status = 'read-only'
       })
@@ -750,10 +779,13 @@ export default {
         id: this.currentId,
         type: e
       }).then(res => {
+        this.createTime = res.data.createTime
         console.log("{id, type}",res)
         this.form = res.data
         try {
           this.currentCollapses = res.data.zEngineeringNodeBo.zEngineeringInfoBoList
+          this.$refs.ConstructionDetails.setEngineId(res.data.zEngineeringNodeBo.id || null)
+          // this.zEngineeringNodeBo=res.data.zEngineeringNodeBo
         } catch (error) {
           this.currentCollapses = [];
         }

+ 35 - 3
src/views/zdsz/engineeringIndustry/index.vue

@@ -121,6 +121,14 @@
           >新增顶管工程
           </el-button>
           <el-button
+              size="mini"
+              type="text"
+              icon="el-icon-circle-check"
+              @click="viewSource(scope.row,'check')"
+              v-hasPermi="['zdsz:engineeringIndustry:review']"
+          >审核
+          </el-button>
+          <el-button
             type="text"
             icon="el-icon-edit"
             size="mini"
@@ -315,7 +323,9 @@
       ref="ConstructionDetails"
       :status="status"
       :currentCollapses="currentCollapses"
+      :zEngineeringNodeBo="zEngineeringNodeBo"
       @updateNodeOption="updateNodeOption"
+      @checkWorking="checkWorking"
       :enginType="this.$route.query.type == '1' ? '工业工程' : '市政工程'"
     />
   </div>
@@ -333,7 +343,7 @@ import {getDicts} from "@/api/system/dict/data";
 import EngineePipe from '@/components/EngineePipe'
 import {validPhoneMobile} from '@/api/rules'
 import ConstructionDetails from '@/components/ConstructionDetails/index.vue'
-import {getEnginMaterialQualityList} from '@/api/zdsz/enginee'
+import {getEnginMaterialQualityList, engineeringCivilReview} from '@/api/zdsz/enginee'
 import {getEnginSpecificationsList} from '@/api/zdsz/enginSpecifications'
 
 export default {
@@ -357,6 +367,8 @@ export default {
       })
     }
     return {
+      // 审核时间
+      createTime: null,
       // 按钮loading
       buttonLoading: false,
       // 遮罩层
@@ -497,6 +509,23 @@ export default {
     });
   },
   methods: {
+    // 节点单项审核
+    checkWorking(checkingInfo){
+      console.log('checkingInfo===',checkingInfo)
+      let params = checkingInfo
+      params.createTime = this.createTime
+      engineeringCivilReview(params).then(res => {
+        if(res.code == 200){
+          this.$message({
+            message: '审核成功',
+            type: 'success'
+          });
+          setTimeout(() => {
+            this.viewNodeSource()
+          },1000)
+        }
+      })
+    },
     filesUpload(url){
       console.log('upload successfully')
       this.form.files = url
@@ -675,7 +704,7 @@ export default {
       }, 'add', data)
     },
     // #003 历史施工
-    viewSource(e) {
+    viewSource(e, type = null) {
       console.log('历史施工', e)
       this.currentId = e.id
       let val = e.enginType + "_" + e.enginClassification
@@ -695,7 +724,7 @@ export default {
             value: "历史数据",
             label: "历史数据"
           }
-        ], this.form.type,null,null,null,null,null,this.form.type === '1' ? "工业工程" : "市政工程")
+        ], this.form.type,type,null,null,null,null,this.form.type === '1' ? "工业工程" : "市政工程")
         this.status = 'read-only'
       })
       // this.$refs.ConstructionDetails.open(_, this.form.type,null,null,null,null,null,this.form.type === '1' ? "工业工程" : "市政工程")
@@ -735,10 +764,13 @@ export default {
         id: this.currentId,
         type: e
       }).then(res => {
+        this.createTime = res.data.createTime
         console.log("{id, type}",res)
         this.form = res.data
         try {
           this.currentCollapses = res.data.zEngineeringNodeBo.zEngineeringInfoBoList
+          this.$refs.ConstructionDetails.setEngineId(res.data.zEngineeringNodeBo.id || null)
+          // this.zEngineeringNodeBo=res.data.zEngineeringNodeBo
         } catch (error) {
           this.currentCollapses = [];
         }

+ 4 - 1
src/views/zdsz/engineeringInfrastructure/index.vue

@@ -718,6 +718,7 @@ export default {
     },
    // 节点单项审核
    checkWorking(checkingInfo){
+     console.log('checkingInfo===',checkingInfo)
     let params = checkingInfo
     params.createTime = this.createTime
     engineeringCivilReview(params).then(res => {
@@ -778,6 +779,8 @@ export default {
   },
   // 查看历史
   viewSource(e,type = null){
+    console.log('历史查询', e)
+    console.log('历史查询e.enginType', e.enginType)
     let params = this.dict.type.engineering_infrastructure
     if(type == 'check'){
       // 审核
@@ -827,7 +830,7 @@ export default {
       type:e || this.currentEnginName
     }).then(res => {
       this.createTime = res.data.createTime
-      console.log(res)
+      console.log('这个值是什么=',res)
       try {
         this.updateParams = res.data
         this.currentCollapses = res.data.zEngineeringNodeBo.zEngineeringInfoBoList