Ver código fonte

民用 批量审核

付宇航 1 ano atrás
pai
commit
80478e7be0

+ 9 - 0
src/api/zdsz/enginee.js

@@ -192,6 +192,15 @@ export function engineeringCivilReview(data) {
     })
 }
 
+// 民用批量审核
+export function engineeringCivilAllReview(data) {
+    return request({
+      url: '/zdsz/engineeringCivil/batchReview?enginClassification',
+      method: 'post',
+      data
+    })
+}
+
 // 修改民用工程
 export function putEngineeringCivil(data) {
     return request({

+ 1 - 0
src/components/ConstructionDetails/index.vue

@@ -377,6 +377,7 @@ export default {
         debugger
         this.dialogVisible = true
         this.currentDicts = dicts
+        console.log('历史字典',this.currentDicts)
       }
 
       this.dialogVisible = true

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

@@ -276,8 +276,6 @@ export default {
         console.log('当前节点name',this.name)
         console.log('update',this.updateOption)
         console.log('当前节点currentContain',this.currentContain)
-        // 至少存在一条物料
-        this.addMaterial()
         this.materialComponList = this.currentContain.find(e => {
             if( e instanceof Array){
                 return e
@@ -295,6 +293,11 @@ export default {
             })
             this.nodeInfo.zEngiineeringPhotoBoList = this.updateOption.zEngineeringInfoBoList[0].zEngiineeringPhotoBoList
         }
+
+        setTimeout(() => {
+            // 至少存在一条物料
+            this.addMaterial()
+        },1000)
         console.log('用料组件',this.materialComponList)
         console.log('用料信息',this.zEngineeringMaterialBo)
         console.log('节点信息',this.nodeInfo)

+ 183 - 24
src/components/EngineePipe/index.vue

@@ -12,7 +12,7 @@
         <el-form ref="form" :model="queryParams" :rules="rules" label-width="110px">
           <el-row :gutter="20">
             <el-col :span="12">
-              <el-form-item label="工程类型" prop="type" v-show="!queryParams.id">
+              <!-- <el-form-item label="工程类型" prop="type" v-show="!queryParams.id">
                 <el-select v-model="queryParams.type" placeholder="请选择类型" disabled >
                   <el-option
                     v-for="e in dict.type.engin_type"
@@ -21,7 +21,7 @@
                     :value="e.value"
                   ></el-option>
                 </el-select>
-              </el-form-item>
+              </el-form-item> -->
             </el-col>
 <!--            <el-col :span="12">-->
 <!--              <el-form-item label="节点类型" prop="zEngineeringNodeBoType">-->
@@ -39,43 +39,43 @@
           <el-row :gutter="20">
             <el-col :span="12">
               <el-form-item label="工程名称" prop="enginName">
-                <el-input v-model="queryParams.enginName" placeholder="请填写工程名称" maxlength="50"></el-input>
+                <el-input v-model="queryParams.enginName" placeholder="请填写工程名称" maxlength="50" :disabled="title == '添加用料' "></el-input>
               </el-form-item>
             </el-col>
             <el-col :span="12">
               <el-form-item label="工程地址" prop="enginAddre">
-                <el-input v-model="queryParams.enginAddre" placeholder="请填写工程地址" maxlength="100"></el-input>
+                <el-input v-model="queryParams.enginAddre" placeholder="请填写工程地址" maxlength="100" :disabled="title == '添加用料' "></el-input>
               </el-form-item>
             </el-col>
           </el-row>
           <el-row :gutter="20">
             <el-col :span="12">
               <el-form-item label="工程编码" prop="enginCode">
-                <el-input v-model="queryParams.enginCode" placeholder="请填写工程编码" maxlength="50"></el-input>
+                <el-input v-model="queryParams.enginCode" placeholder="请填写工程编码" maxlength="50" :disabled="title == '添加用料' "></el-input>
               </el-form-item>
             </el-col>
             <el-col :span="12">
               <el-form-item label="施工单位" prop="constructUnit">
-                <el-input v-model="queryParams.constructUnit" placeholder="请填写施工单位" maxlength="100"></el-input>
+                <el-input v-model="queryParams.constructUnit" placeholder="请填写施工单位" maxlength="100" :disabled="title == '添加用料' "></el-input>
               </el-form-item>
             </el-col>
           </el-row>
           <el-row :gutter="20">
             <el-col :span="12">
               <el-form-item label="工程规模" prop="enginScale">
-                <el-input v-model="queryParams.enginScale" placeholder="请填写工程规模" maxlength="50"></el-input>
+                <el-input v-model="queryParams.enginScale" placeholder="请填写工程规模" maxlength="50" :disabled="title == '添加用料' "></el-input>
               </el-form-item>
             </el-col>
             <el-col :span="12">
               <el-form-item label="施工质量" prop="constructQuality">
-                <el-input v-model="queryParams.constructQuality" placeholder="请填写施工质量" maxlength="50"></el-input>
+                <el-input v-model="queryParams.constructQuality" placeholder="请填写施工质量" maxlength="50" :disabled="title == '添加用料' "></el-input>
               </el-form-item>
             </el-col>
           </el-row>
           <el-row :gutter="20">
             <el-col :span="12">
               <el-form-item label="施工进度" prop="constructSchedule">
-                <el-input v-model="queryParams.constructSchedule" placeholder="请填写施工进度" maxlength="50"/>
+                <el-input v-model="queryParams.constructSchedule" placeholder="请填写施工进度" maxlength="50" :disabled="title == '添加用料' "/>
               </el-form-item>
             </el-col>
             <el-col :span="12">
@@ -85,6 +85,7 @@
                   type="textarea"
                   placeholder="请输入内容"
                   maxlength="255"
+                  :disabled="title == '添加用料' "
                 />
               </el-form-item>
             </el-col>
@@ -92,18 +93,38 @@
           <el-row :gutter="20">
             <el-col :span="24">
               <el-form-item label="文件" prop="" v-if="currentType=='put'">
-                <ObsFileUpload ref="obsFileUpload" :file-size="100" :file-type="['dwg','dwt','doc','docx','xls','xlsx','png', 'jpg', 'jpeg']" :limit="9999"  :value="queryParams.pics"
+                <ObsFileUpload ref="obsFileUpload" :file-size="100" :file-type="['dwg','dwt','doc','docx','xls','xlsx','png', 'jpg', 'jpeg']" :limit="9999"  :value="queryParams.pics" :disabled="title == '添加用料' " 
                 ></ObsFileUpload>
               </el-form-item>
               <el-form-item label="文件" prop="" v-if="currentType=='add'">
-                <ObsFileUpload ref="obsFileUpload" :file-size="100" :file-type="['dwg','dwt','doc','docx','xls','xlsx','png', 'jpg', 'jpeg']" :limit="9999"  :value="queryParams.files"
+                <ObsFileUpload ref="obsFileUpload" :file-size="100" :file-type="['dwg','dwt','doc','docx','xls','xlsx','png', 'jpg', 'jpeg']" :limit="9999"  :value="queryParams.files" :disabled="title == '添加用料' "
                 ></ObsFileUpload>
               </el-form-item>
             </el-col>
           </el-row>
+          <el-form-item label="节点" style="width: 100%;margin-left: 0;" v-if="title!=='修改顶管信息' ">
+            <el-checkbox-group v-model="currentCheckList">
+              <el-checkbox 
+                :label="item.label" 
+                v-for="item in checkList"
+                :key="item.label"
+                ></el-checkbox>
+            </el-checkbox-group>
+          </el-form-item>
+          <EnginNodeInfo
+            v-for="(e,idx) in currentCheckList"
+            :key="idx"
+            :name="e"
+            :ref="'EnginNodeInfo'+idx"
+            :currentContain="(listContain.find(i => i.name == e)).components"
+            :updateOption='(updateOption.find(i => i.type == e)) || {}'
+            :types="currentCheckList"
+            :status="enginNodeStatus"
+            enginType="顶管工程"
+          />
         </el-form>
         <div slot="footer" class="dialog-footer">
-          <el-button  type="primary" @click="submitData">提交</el-button>
+          <!-- <el-button  type="primary" @click="submitData">提交</el-button> -->
           <el-button :loading="buttonLoading" type="primary" @click="toNodeDetail">{{keyWork}}</el-button>
           <el-button @click="cancel">取 消</el-button>
         </div>
@@ -119,10 +140,12 @@
 
 <script>
 import {getComprehensive, delComprehensive} from "@/api/zdsz/comprehensive";
+import EnginNodeInfo from "@/components/EnginNodeInfo/index";
 import {
   getEngineeList,                            // 查询工程列表
   addEnginee,                                // 新增工程
   getDictList, putEngineeringPipeJacking,
+  addEngineeringPipeJacking 
 } from "@/api/zdsz/enginee"
 import EngineeNode from '@/components/EngineeNode/index'
 // 节点信息
@@ -130,7 +153,8 @@ import EngineeNode from '@/components/EngineeNode/index'
 export default {
   name: "EngineePipe",
   components: {
-    EngineeNode
+    EngineeNode,
+    EnginNodeInfo
   },
   dicts: ['pipe_jack'],
   data() {
@@ -141,7 +165,7 @@ export default {
       loading: true,
       // 选中数组
       ids: [],
-      keyWork:'填写节点信息',
+      keyWork:'新增',
       // 非单个禁用
       single: true,
       // 非多个禁用
@@ -159,15 +183,14 @@ export default {
       // 查询参数
       queryParams: {
         files:[],
-        enginId: null,           // 外建工程
-        enginName: '',            // 工程名称
-        enginAddre: '',            // 工程地址
-        enginScale: '',           // 工程名称联系方式
-        enginCode: '',       // 工程编码
-        constructQuality: '',      // 施工质量
+        enginId: null,               // 外建工程
+        enginName: '',               // 工程名称
+        enginAddre: '',              // 工程地址
+        enginScale: '',              // 工程名称联系方式
+        enginCode: '',               // 工程编码
+        constructQuality: '',        // 施工质量
         constructSchedule: "",       // 施工进度
-        type: null,                // 类型
-        remark: '',                // 备注
+        remark: '',                  // 备注
         constructUnit: null,
         zEngineeringNodeBo: {
           type: null,
@@ -237,13 +260,77 @@ export default {
 
       },
       currentType: null, // 组件类型 put修改 add新增
+      currentCheckList:[],
+      enginNodeStatus:null,
+      checkList:[],
+      updateOption:[],
+      listContain:[
+        {
+          name:'进场',
+          components:[
+            [
+              'materialQuality',                       // 材质
+              'specifications',                        // 规格
+              'number',                                // 数量
+            ],
+            'constructTime',                           // 施工时间
+            'zEngiineeringPhotoBoList',                // 照片
+            'remark',                                  // 描述
+          ]
+        },
+        {
+          name:'导向',
+          components:[
+            [
+              'materialQuality',                       // 材质
+              'specifications',                        // 规格
+              'number',                                // 数量
+            ],
+            'constructTime',                           // 施工时间
+            'zEngiineeringPhotoBoList',                // 照片
+            'remark',                                  // 描述
+          ]
+        },
+        {
+          name:'扩孔',
+          components:[
+            [
+              'materialQuality',                       // 材质
+              'specifications',                        // 规格
+              'number',                                // 数量
+            ],
+            'constructTime',                           // 施工时间
+            'zEngiineeringPhotoBoList',                // 照片
+            'remark',                                  // 描述
+          ]
+        },
+        {
+          name:'回拖',
+          components:[
+            [
+              'materialQuality',                       // 材质
+              'specifications',                        // 规格
+              'number',                                // 数量
+            ],
+            'constructTime',                           // 施工时间
+            'zEngiineeringPhotoBoList',                // 照片
+            'remark',                                  // 描述
+          ]
+        }
+        
+      ]
+
     };
   },
   created() {
   },
+  mounted(){
+    this.checkList = this.dict.type.pipe_jack
+  },
   methods: {
     // 顶管工程修改
     async putEnginPipe(data, type) {
+      this.enginNodeStatus = '修改'
       await this.reset();
       let newData = data
       // let zEngineeringNodeBo = {
@@ -254,7 +341,7 @@ export default {
       this.currentType = type
       if (this.currentType=='put'){
         this.title = '修改顶管信息'
-        this.keyWork = '编辑节点信息'
+        this.keyWork = '修改'
       }
       this.queryParams = newData
       this.zEngineeringInfoBo = newData.zEngineeringNodeBoList
@@ -270,15 +357,31 @@ export default {
       }
     },
     async openDialog(data, type,sata) {
+      console.log(data,sata)
       await this.reset();
       this.currentType = type
       if (this.currentType == 'add') {
         this.title = '新增顶管信息'
       } else if (this.currentType == 'put') {
         this.title = '修改顶管信息'
+      } else if (this.currentType == 'addMaterial') {
+        this.title = '添加用料'
+        this.enginNodeStatus == '添加用料'
+        this.queryParams = sata
+        this.open = true
+        return
       }
       this.queryParams.enginId = data.id
       this.queryParams.type = data.type
+      //带值(民用工程、工业工程、市政工程)
+      if (data.type=='民用工程'){
+        this.queryParams.enginAddre =
+          sata.district + ' - ' + sata.areaName + ' - ' + sata.buildingName + ' - ' + sata.unitName + ' - ' + sata.houseName;
+      }
+      if (['工业工程','市政工程'].includes(data.type)){
+        this.queryParams.enginName = sata.enginName;
+      }
+      console.log('顶管params',this.queryParams)
       //带值
       this.queryParams.enginName = sata.enginName?sata.enginName:'';
       this.open = true
@@ -288,7 +391,7 @@ export default {
     },
     submitData(){
 
-      this.queryParams.files = this.$refs.obsFileUpload.fileList;
+      // this.queryParams.files = this.$refs.obsFileUpload.fileList;
       if (this.$refs.obsFileUpload.fileList==null||this.$refs.obsFileUpload.fileList.length===0){
         this.$message.warning('必须上传文件!')
         return
@@ -307,6 +410,60 @@ export default {
         }})
     },
     toNodeDetail() {
+      let nodeCollection = []
+      // 收集节点信息
+      this.currentCheckList.forEach((e, idx) => {
+        let nodeItem = this.$refs['EnginNodeInfo' + idx][0].infoCollection()
+        //  console.log(nodeItem)
+        nodeCollection.push(nodeItem)
+      })
+      this.queryParams.zEngineeringNodeBoList = nodeCollection
+      if (this.enginNodeStatus == '修改') {
+        this.queryParams.files = this.$refs.obsFileUpload.fileList;
+        if (this.$refs.obsFileUpload.fileList==null||this.$refs.obsFileUpload.fileList.length===0){
+          this.$message.warning('必须上传文件!')
+          return
+        }
+        this.$refs["form"].validate(valid => {
+          if (valid) {
+            if (this.queryParams.id != null) {
+              putEngineeringPipeJacking(this.queryParams).then(response => {
+                this.$modal.msgSuccess("修改成功");
+                this.open = false;
+                this.currentCheckList = []
+                // this.getList();
+              })
+            }
+          }})
+      } else if(this.enginNodeStatus == '添加用料'){
+        addEngineeringPipeJacking(this.queryParams).then(res => {
+          if(res.code == 200){
+            this.$message({
+              message: '添加成功',
+              type: 'success'
+            });
+            this.open = false
+            console.log('选中节点集合',this.currentCheckList)
+            this.currentCheckList = []
+            this.getList()
+            // this.$emit('closeToSucceed')
+          }
+        })
+      } else {
+        addEngineeringPipeJacking(this.queryParams).then(res => {
+          if (res.code == 200) {
+            this.$message({
+              message: '新增成功',
+              type: 'success'
+            });
+            this.open = false
+            console.log('选中节点集合', this.currentCheckList)
+            this.currentCheckList = []
+            // this.$emit('closeToSucceed')
+          }
+        })
+      }
+      return
       if (this.$refs.obsFileUpload.fileList==null||this.$refs.obsFileUpload.fileList.length===0){
         this.$message.warning('必须上传文件!')
         return
@@ -368,6 +525,8 @@ export default {
     box-sizing: border-box;
   }
   .el-dialog__body {
+    overflow: hidden;
+    overflow-y: scroll;
     height: 85%;
   }
 

+ 183 - 5
src/views/zdsz/engineeringCivil/index.vue

@@ -109,7 +109,7 @@
           type="danger"
           icon="el-icon-circle-check"
           size="mini"
-          @click="handleExport"
+          @click="handleCheckings"
           v-hasPermi="['zdsz:engineeringCivil:export']"
         >批量审核
         </el-button>
@@ -402,6 +402,95 @@
       enginType="民用工程"
     />
 
+    <!-- 批量审核 -->
+    <el-dialog
+      ref="checkingAllForm"
+      title="批量审核"
+      :visible.sync="checkingsVisible"
+      class="checkingAll"
+      >
+      <el-form :model="checkingForm">
+        <el-form-item label="工程类型" prop="enginType">
+          <el-select
+            v-model="checkingForm.enginType"
+            placeholder="请选择工程类型"
+            @change="enginTypeHasChanged"
+          >
+            <el-option
+              v-for="e in enginTypeOption"
+              :key="e.value"
+              :label="e.label"
+              :value="e.value"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="工程分类" prop="enginClassification">
+          <el-select
+            v-model="checkingForm.enginClassification"
+            placeholder="请选择工程分类"
+            @change="currentCheckingAllEnginTypeChanged"
+          >
+            <el-option
+              v-for="e in currentEnginTypeChangeOptions"
+              :key="e.dictValue"
+              :label="e.dictLabel"
+              :value="e.dictValue"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="节点" label-width="68px">
+          <el-select
+            v-model="checkingForm.type"
+            placeholder="请选择工程分类"
+          >
+            <el-option
+              v-for="e in checkingAllList"
+              :key="e.dictValue"
+              :label="e.dictLabel"
+              :value="e.dictValue"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item prop="" label="工程创建时间" style="margin-left: -5%;">
+          <el-date-picker
+            v-model="checkingForm.reviewTime"
+            type="month"
+            value-format="yyyy-MM"
+            placeholder="选择月">
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item
+          label-width="70px"
+          label="审核状态"
+          >
+          <el-select v-model="checkingForm.reviewStatus" placeholder="请选择审核状态" label="审核状态">
+              <el-option
+              v-for="e in reviewStatusList"
+              :key="e.label"
+              :label="e.label"
+              :value="e.value"
+              ></el-option>
+          </el-select>
+        </el-form-item>
+
+        <el-form-item
+          label-width="70px"
+          label="审核内容"
+          >
+          <div class="block" style="display: inline-block; margin-right: 20px;">
+              <el-input 
+                v-model="checkingForm.reviewContent" 
+                placeholder="请输入审核内容" 
+                type="textarea"
+                style="width: 100%"/>
+          </div>
+        </el-form-item>
+      </el-form>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="checkingsVisible = false">取 消</el-button>
+        <el-button type="primary" @click=checkingAllSubmit>提 交</el-button>
+      </span>
+    </el-dialog>
     <!-- 顶管工程新增 -->
     <EngineePipe ref="enginPipe"/>
 
@@ -422,7 +511,7 @@ import {
   putEngineeringCivil,                       // 民用工程修改
   viewEngineeringCivil,                      // 民用工程查看详情
   deleteEngineeringCivil,                    // 删除民用工程
-  getDictList, viewEngineeringInfrastructureSource, viewEngineeringCivilSource,engineeringCivilReview
+  getDictList, viewEngineeringInfrastructureSource, viewEngineeringCivilSource,engineeringCivilReview,engineeringCivilAllReview
 } from "@/api/zdsz/enginee"
 import {getAreaList} from "@/api/zdsz/area";
 import {getBuildingList} from "@/api/zdsz/building";
@@ -432,6 +521,20 @@ import EnginNodeInfo from "@/components/EnginNodeInfo/index";
 import EngineePipe from '@/components/EngineePipe'
 import ConstructionDetails from "@/components/ConstructionDetails/index.vue";
 
+function formatDate(date) {
+    const days = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];
+    const months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
+
+    const day = days[date.getUTCDay()];
+    const month = months[date.getUTCMonth()];
+    const dateNum = String(date.getUTCDate()).padStart(2, '0');
+    const hours = String(date.getUTCHours()).padStart(2, '0');
+    const minutes = String(date.getUTCMinutes()).padStart(2, '0');
+    const seconds = String(date.getUTCSeconds()).padStart(2, '0');
+    const year = date.getUTCFullYear();
+
+    return `${day} ${month} ${dateNum} ${hours}:${minutes}:${seconds} CST ${year}`;
+  }
 export default {
   components: {
     ConstructionDetails,
@@ -458,6 +561,7 @@ export default {
       nodeDetailType:null,
       currentCollapses: [],
       enginId: undefined,
+      checkingsVisible:false,
       updateOption: [],
       listContain: [
         {
@@ -818,6 +922,25 @@ export default {
       updateParams:{},
       status:null,
       createTime:'',               // 工程创建时间
+      checkingForm:{
+        reviewStatus:'',               // 审核状态
+        reviewContent:'',              // 审核内容
+        enginType:null,
+        enginClassification:null,
+        reviewTime:'',
+        type:'',
+      },
+      checkingAllList:[],
+      reviewStatusList:[
+        {
+          value:'1',
+          label:'通过'
+        },
+        {
+          value:'0',
+          label:'不通过'
+        }
+      ],  
     };
   },
   created() {
@@ -831,6 +954,30 @@ export default {
     }
   },
   methods: {
+    checkingAllSubmit(){
+      // this.checkingForm.createTime = formatDate(this.checkingForm.createTime)
+      engineeringCivilAllReview(this.checkingForm).then(res => {
+        if(res.code == 200){
+          this.$message({
+            message: '提交成功',
+            type: 'success'
+          });
+          this.checkingsVisible = false
+          this.checkingForm = {
+            reviewStatus:'',               // 审核状态
+            reviewContent:'',              // 审核内容
+            enginType:null,
+            enginClassification:null,
+            reviewTime:'',
+            type:'',
+          }
+        }
+      })
+    },
+    // 批量审核
+    handleCheckings(){
+      this.checkingsVisible = true
+    },
     // 节点单项审核
     checkWorking(checkingInfo){
       let params = checkingInfo
@@ -910,8 +1057,6 @@ export default {
         this.status = 'read-only'
       })
     },
-
-
     // 新增顶管工程
     addNewPipe(data) {
       this.$refs.enginPipe.openDialog({
@@ -964,6 +1109,17 @@ export default {
         this.checkList = res.data
       })
     },
+    currentCheckingAllEnginTypeChanged() {
+      this.checkingAllList = []
+      if (this.checkingForm.enginType == undefined || this.checkingForm.enginType == ''
+        || this.checkingForm.enginClassification == undefined || this.checkingForm.enginClassification == ''
+      )
+        return
+      let val = this.checkingForm.enginType + "_" + this.checkingForm.enginClassification
+      getDicts(val).then(res => {
+        this.checkingAllList = res.data
+      })
+    },
     // 当前所选行政区发生改变 查询当前小区集合
     districtHasChanged(district) {
       this.queryParams.areaId = null
@@ -1293,7 +1449,10 @@ export default {
 
 ::v-deep .addDialog {
   width: 60%;
-  height: 85%;
+  // height: 85%;
+  max-height: 85%;
+  overflow: hidden;
+  overflow-y: scroll;
 }
 
 ::v-deep .appendElDialog {
@@ -1352,4 +1511,23 @@ export default {
     margin-top: 0.5%;
   }
 }
+
+::v-deep .checkingAll{
+  .el-dialog{
+    width: 40%;
+    height: 70%;
+  }
+  .el-dialog__body{
+    padding-left: 28%;
+  }
+
+  .el-form div:not(:nth-child(1)){
+    margin-top: 1%;
+  }
+
+  .el-textarea__inner{
+    width: 360px;
+    height: 115px;
+  }
+}
 </style>

+ 3 - 3
src/views/zdsz/engineeringInfrastructure/index.vue

@@ -75,7 +75,7 @@
       <el-table-column label="备注" align="center" prop="enginContent" show-overflow-tooltip/>
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="400">
         <template slot-scope="scope">
-          <el-button
+          <!-- <el-button
             type="text"
             icon="el-icon-edit"
             size="mini"
@@ -87,7 +87,7 @@
             icon="el-icon-edit"
             @click="handleUpdate(scope.row)"
             v-hasPermi="['zdsz:comprehensive:edit']"
-          >修改</el-button>
+          >修改</el-button> -->
             <el-button
               size="mini"
               type="text"
@@ -189,6 +189,7 @@
           <ObsFileUpload ref="obsFileUpload" :file-size="100" :file-type="['dwg','dwt','doc','docx','xls','xlsx','png', 'jpg', 'jpeg']" :limit="9999"  :value="queryParams.files" @input="filesUpload"
           ></ObsFileUpload>
         </el-form-item>
+        
         <el-form-item label="工程内容" prop="enginContent">
           <el-input
             v-model="queryParams.enginContent"
@@ -822,7 +823,6 @@ export default {
   onClose(){
     console.log(this.currentCheckList)
     this.currentCheckList = []
-    this.checkList =[]
     this.$refs.nodeForm.resetFields()
   },
   closeToSucceed(){

+ 162 - 9
src/views/zdsz/engineeringPipeJacking/index.vue

@@ -53,21 +53,52 @@
             <el-table-column label="施工质量" align="center" prop="constructQuality" />
             <el-table-column label="施工进度" align="center" prop="constructSchedule" />
             <el-table-column label="备注" align="center" prop="remark" show-overflow-tooltip/>
-            <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+            <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="300">
               <template slot-scope="scope">
-                  <el-button
+                  <!-- <el-button
                     type="text"
                     icon="el-icon-edit"
                     size="mini"
                     @click="viewSource(scope.row)"
-                  >历史</el-button>
+                  >历史</el-button> -->
+                  <!-- <el-button
+                    size="mini"
+                    type="text"
+                    icon="el-icon-circle-check"
+                    @click="viewSource(scope.row,'check')"
+                    v-hasPermi="['zdsz:engineeringCivil:remove']"
+                  >审核
+                  </el-button> -->
+                  <el-button
+                    size="mini"
+                    type="text"
+                    icon="el-icon-time"
+                    @click="viewSource(scope.row)"
+                    v-hasPermi="['zdsz:engineeringCivil:remove']"
+                  >历史用料
+                  </el-button>
                 <el-button
                   size="mini"
                   type="text"
                   icon="el-icon-edit"
                   @click="handleUpdate(scope.row)"
                   v-hasPermi="['zdsz:engineeringPipeJacking:edit']"
-                >修改</el-button>
+                >修改工程信息</el-button>
+                <el-button
+                  size="mini"
+                  type="text"
+                  icon="el-icon-edit"
+                  @click="addNodeInfo(scope.row)"
+                  v-hasPermi="['zdsz:engineeringCivil:edit']"
+                >填写节点信息
+                </el-button>
+                <el-button
+                  size="mini"
+                  type="text"
+                  icon="el-icon-edit"
+                  @click="addMaterial(scope.row)"
+                >添加用料
+                </el-button>
                 <el-button
                   size="mini"
                   type="text"
@@ -239,6 +270,10 @@
           <ConstructionDetails
             ref="ConstructionDetails"
             :currentCollapses="currentCollapses"
+            @checkWorking="checkWorking"
+            @updateNodeOption="updateNodeOption"
+            :status="status"
+            enginType="顶管工程"
             />
         </div>
       </template>
@@ -252,7 +287,9 @@
         viewEngineeringPipeJacking,                // 顶管工程查看详情
         deleteEngineeringPipeJacking,              // 删除工程查看详情
         detailEngineeringPipeJacking,              // 历史
-        getDictList
+        getDictList,
+        engineeringCivilReview,
+        putEngineeringPipeJacking
       } from "@/api/zdsz/enginee"
       import {getDicts} from "@/api/system/dict/data";
 
@@ -440,28 +477,125 @@
               ],
 
             },
+            currentType:null,
             nodeList:[],
+            checkList:[],
+            currentCheckList:[],
+            enginNodeStatus:null,
+            status:null,
+            createTime:'',
+            enginId:null,
+            updateParams:{}
           };
         },
         created() {
           this.getList();
         },
         methods: {
+          // 填写节点信息
+          updateNodeOption(zEngineeringInfoBoList){
+            delete this.updateParams.zEngineeringNodeBoList
+            this.updateParams.zEngineeringNodeBo.zEngineeringInfoBoList = zEngineeringInfoBoList
+            putEngineeringPipeJacking(this.updateParams).then(res => {
+              console.log(res)
+              if(res.code == 200){
+                this.$message({
+                  message: '修改成功',
+                  type: 'success'
+                });
+                this.$refs.ConstructionDetails.dialogVisible = false
+                this.updateParams = {}
+                
+              }
+            })
+          },
+          // 节点单项审核
+          checkWorking(checkingInfo){
+            let params = checkingInfo
+            params.createTime = this.createTime
+            params.engInfoId = this.currentId
+            engineeringCivilReview(params).then(res => {
+              if(res.code == 200){
+                this.$message({
+                  message: '审核成功',
+                  type: 'success'
+                });
+              }
+            })
+          },
+          async addNodeInfo(e){
+            this.nodeDetailType = '修改'
+            this.currentId = e.id
+            this.enginId = e.id
+            this.status = 'put'
+            let val = e.enginType + "_" + e.enginClassification
+            const res = await getDicts('pipe_jack');
+            const r = res.data!=null?res.data.map(o=>{return {label:o.dictLabel,value:o.dictValue}}):[];
+            this.$refs.ConstructionDetails.open(r)
+            return
+            getDicts(val).then(res => {
+              let dict = []
+              for (let i = 0; i < res.data.length; i++) {
+                dict.push({
+                  "label": res.data[i].dictLabel,
+                  "value": res.data[i].dictValue,
+                })
+              }
+              
+            })
+          },
+          // 新增物料
+          addMaterial(data) {
+            this.title = "添加用料";
+            this.enginNodeStatus = '添加用料'
+            this.loading = true;
+            this.reset();
+            const id = data.id || this.ids
+            viewEngineeringPipeJacking(id).then(res => {
+              this.loading = false;
+              let newData = res.data
+              // let val = newData.enginType + "_" + newData.enginClassification
+              this.currentCheckList = []
+              // getDicts(val).then(res => {
+              //   this.checkList = res.data
+              // })
+
+              this.queryParams = newData
+              console.log(this.queryParams.areaId)
+
+              // console.log('选中节点集合',this.currentCheckList)
+              // this.enginClassification = zEngineeringNodeBo.type
+              // newData.zEngineeringNodeBo = zEngineeringNodeBo
+              this.currentType = 'addMaterial'
+              console.log('顶管工程详情',res.data)
+              this.$refs.enginPipe.openDialog({
+                id: data.id,
+                type: '顶管工程'
+              }, 'addMaterial',res.data)
+              // this.open = true
+
+            })
+          },
           // 查看历史
-          async viewSource(e){
+          async viewSource(e,type = null){
             const res = await getDicts('pipe_jack');
             const r = res.data!=null?res.data.map(o=>{return {label:o.dictLabel,value:o.dictValue}}):[];
             this.currentId = e.id
-            this.$refs.ConstructionDetails.open(r)
+            this.status = 'read-only'
+            console.log('__________',r)
+            this.$refs.ConstructionDetails.open(r,_,type)
           },
           viewNodeSource(e){
-            console.log(e)
+            console.log('查看历史传值',e,this.currentId)
             detailEngineeringPipeJacking({
               id:this.currentId,
               type:e
             }).then(res => {
+              console.log(res)
+              this.createTime = res.data.createTime
               try {
-                this.currentCollapses = res.data.zEngineeringNodeBoList[0].zEngineeringInfoBoList
+                this.updateParams = res.data
+                this.currentCollapses = res.data.zEngineeringNodeBo.zEngineeringInfoBoList
               } catch (error) {
                 this.currentCollapses = [];
               }
@@ -534,6 +668,25 @@
           },
           /** 修改按钮操作 */
           handleUpdate(row) {
+            this.title = "修改顶管工程";
+            // const id = row.id || this.ids;
+            // viewEngineeringPipeJacking(id).then(res => {
+            //   console.log(res)
+            //   let newData = res.data
+            //   console.log(newData)
+            //   console.log(res.data.zEngineeringNodeBoList[0].type)
+            //   let zEngineeringNodeBo = {
+            //       type:res.data.zEngineeringNodeBoList[0].type,
+            //       zEngineeringInfoBo:res.data.zEngineeringNodeBoList[0].zEngineeringInfoBo
+            //   }
+            //   newData.zEngineeringNodeBo = zEngineeringNodeBo
+            //   this.currentType = 'put'
+            //   this.queryParams = newData
+            //   console.log(this.queryParams)
+            //   this.zEngineeringInfoBo = newData.zEngineeringNodeBo.zEngineeringInfoBo
+            //   this.open = true
+            // })
+            // return
             const id = row.id || this.ids;
             viewEngineeringPipeJacking(id).then(res => {
               this.$refs.enginPipe.putEnginPipe(res.data,'put')